:root {
  --bg: #0b0d0b;
  --panel: rgba(25, 28, 24, 0.86);
  --panel-soft: rgba(34, 38, 33, 0.72);
  --line: rgba(236, 231, 219, 0.15);
  --ink: #ece7db;
  --muted: rgba(236, 231, 219, 0.58);
  --danger: #c98c80;
  --font-display: "Cormorant Dream", Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans Dream", Arial, sans-serif;
}

@font-face {
  font-family: "Cormorant Dream";
  src: url("./assets/cormorant-garamond-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans Dream";
  src: url("./assets/dm-sans-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #0b0d0b;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 18%, rgba(236, 231, 219, 0.08), transparent 24%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

.developer-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.developer-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.68);
  padding: 34px 24px;
}

.developer-sidebar h1,
.workspace-top h2,
.wide-card h3 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  font-family: var(--font-display);
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.developer-nav {
  display: grid;
  gap: 10px;
  margin: 34px 0;
}

.nav-item,
.ghost-link,
.quiet-button,
.primary-button,
.danger-button {
  border: 1px solid var(--line);
  background: rgba(22, 25, 21, 0.76);
  color: var(--ink);
  min-height: 44px;
  padding: 10px 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item.active,
.primary-button {
  background: rgba(45, 55, 48, 0.9);
}

.danger-button {
  color: var(--danger);
}

.ghost-link {
  display: block;
  color: var(--muted);
}

.developer-workspace {
  min-width: 0;
  padding: 32px;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.status {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card,
.wide-card,
.list-column,
.editor-column,
.content-item,
.media-item {
  border: 1px solid var(--line);
  background: var(--panel);
}

.stat-card {
  min-height: 130px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.stat-card span,
.content-item span,
.media-item span,
label {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: 38px;
  line-height: 1;
}

.wide-card {
  padding: 24px;
}

.wide-card p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.storage-report {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.storage-report strong {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.storage-report p {
  margin: 0;
}

.split-panel {
  grid-template-columns: minmax(280px, 0.85fr) minmax(460px, 1.35fr);
  gap: 18px;
}

.split-panel.active {
  display: grid;
}

.list-column,
.editor-column {
  min-height: calc(100vh - 150px);
  padding: 18px;
}

.list-header,
.editor-actions,
.publish-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.publish-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 18px;
}

.setting-row {
  border: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.34);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.setting-row input {
  width: auto;
}

.list-header h3 {
  margin: 0;
  font-size: 24px;
}

.content-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.content-item {
  width: 100%;
  padding: 14px;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.content-item.active {
  outline: 1px solid rgba(236, 231, 219, 0.34);
  background: rgba(43, 50, 43, 0.72);
}

.content-item strong {
  font-size: 18px;
}

.editor-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.72);
  color: var(--ink);
  padding: 12px;
  outline: none;
}

input[readonly] {
  color: var(--dim);
  cursor: default;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

select[multiple] {
  min-height: 150px;
}

.hidden-picker-source {
  display: none;
}

.picker-button {
  width: 100%;
}

.label-with-info > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-info-button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 231, 219, 0.12);
  color: var(--muted);
  padding: 0;
  font-size: 11px;
}

.feeling-picker-card {
  display: grid;
  gap: 12px;
}

.feeling-picker-list {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}

.feeling-picker-option {
  border: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.42);
  color: var(--ink);
  padding: 11px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.feeling-picker-option small {
  color: var(--muted);
}

.feeling-picker-option.selected {
  background: rgba(78, 66, 45, 0.55);
}

.upload-box {
  position: relative;
  border: 1px dashed rgba(236, 231, 219, 0.22);
  background: rgba(9, 10, 9, 0.4);
  padding: 16px;
  cursor: pointer;
  overflow: hidden;
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.audio-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.image-card,
.media-item,
.audio-card {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.image-card img,
.media-item img,
.image-missing {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96);
}

.image-missing {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--dim);
  font-size: 13px;
}

.image-card button {
  border: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.52);
  padding: 8px;
  cursor: pointer;
}

.audio-card:empty {
  display: none;
}

.audio-card audio {
  width: 100%;
}

.audio-card button {
  border: 1px solid var(--line);
  background: rgba(9, 10, 9, 0.52);
  padding: 8px;
  cursor: pointer;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.diagnostic-list {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.access-list {
  display: grid;
  gap: 10px;
}

.access-item {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.access-item span {
  color: var(--muted);
  word-break: break-all;
}

.batch-key-tool {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.batch-key-tool label {
  max-width: 220px;
}

.batch-key-list {
  min-height: 48px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.batch-key-list code,
.batch-key-list span {
  color: var(--muted);
  word-break: break-all;
}

.batch-key-list code {
  color: var(--ink);
  font: 600 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.confirm-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  z-index: 50;
}

.confirm-layer[hidden] {
  display: none;
}

.confirm-box {
  width: min(460px, calc(100vw - 36px));
  border: 1px solid var(--line);
  background: #10120f;
  padding: 24px;
}

.confirm-box h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.confirm-box p {
  color: var(--muted);
}

.curator-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    linear-gradient(120deg, rgba(117, 102, 181, 0.12), transparent 42%),
    radial-gradient(circle at 70% 18%, rgba(236, 231, 219, 0.07), transparent 26%),
    #0b0d0b;
}

.curator-shell {
  position: relative;
  width: min(430px, 100vw);
  min-height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(150deg, rgba(32, 29, 39, 0.9), rgba(12, 14, 12, 0.96)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.curator-shell .developer-sidebar {
  position: static;
  height: auto;
  padding: max(22px, env(safe-area-inset-top)) 20px 14px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(31, 29, 39, 0.86), rgba(15, 17, 15, 0.46)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px);
}

.curator-shell .developer-sidebar h1 {
  font-size: 31px;
  letter-spacing: 0;
}

.curator-shell .developer-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 10px;
}

.curator-shell .nav-item,
.curator-shell .ghost-link,
.curator-shell .quiet-button,
.curator-shell .primary-button {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(54, 48, 65, 0.72), rgba(18, 20, 17, 0.78));
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: center;
}

.curator-shell .nav-item.active,
.curator-shell .primary-button {
  background:
    linear-gradient(180deg, rgba(88, 78, 111, 0.9), rgba(42, 47, 41, 0.84));
}

.curator-shell .ghost-link {
  margin-top: 10px;
}

.curator-shell .developer-workspace {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 20px 92px;
  overscroll-behavior: contain;
}

.curator-shell .developer-workspace::-webkit-scrollbar {
  width: 0;
}

.curator-shell .workspace-top {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.curator-shell .workspace-top h2 {
  font-size: 28px;
}

.curator-shell .status {
  max-width: none;
  text-align: left;
}

.curator-shell .wide-card,
.curator-shell .stat-card,
.curator-shell .list-column,
.curator-shell .editor-column,
.curator-shell .content-item,
.curator-shell .media-item,
.curator-shell .image-card {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.82), rgba(17, 19, 16, 0.84)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 4px);
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.curator-shell .wide-card,
.curator-shell .list-column,
.curator-shell .editor-column {
  padding: 18px;
}

.curator-shell .wide-card h3 {
  font-size: 26px;
}

.curator-shell .stat-grid,
.curator-shell .split-panel.active {
  grid-template-columns: 1fr;
}

.curator-shell .stat-grid {
  gap: 10px;
}

.curator-shell .stat-card {
  min-height: 92px;
}

.curator-shell .stat-card strong {
  font-size: 30px;
}

.curator-shell .split-panel {
  gap: 12px;
}

.curator-shell .list-column,
.curator-shell .editor-column {
  min-height: auto;
}

.curator-shell input,
.curator-shell textarea,
.curator-shell select,
.curator-shell .upload-box {
  border-radius: 8px;
  background: rgba(9, 10, 9, 0.58);
}

.curator-shell input,
.curator-shell textarea,
.curator-shell select {
  font-size: 16px;
}

.curator-shell .editor-actions,
.curator-shell .publish-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.curator-tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(19, 18, 24, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.curator-tabbar a {
  height: 43px;
  min-height: 43px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
}

.curator-tabbar a.active {
  color: var(--ink);
  background: linear-gradient(145deg, rgba(117, 102, 181, 0.28), rgba(116, 137, 126, 0.15));
}

.curator-tabbar span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.curator-tabbar img {
  width: 23px;
  height: 23px;
  opacity: 0.48;
  filter: invert(92%) sepia(8%) saturate(329%) hue-rotate(7deg) brightness(95%);
}

.curator-tabbar a.active img {
  opacity: 0.92;
}

@media (max-width: 900px) {
  body {
    min-height: 100dvh;
  }

  .developer-shell {
    grid-template-columns: 1fr;
  }

  .developer-sidebar {
    position: static;
    height: auto;
    padding: 22px 18px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .developer-sidebar h1,
  .workspace-top h2,
  .wide-card h3 {
    font-size: 28px;
  }

  .developer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 22px 0 12px;
  }

  .nav-item,
  .ghost-link,
  .quiet-button,
  .primary-button,
  .danger-button {
    min-height: 42px;
    padding: 10px 12px;
    text-align: center;
  }

  .developer-workspace {
    padding: 20px 18px 28px;
  }

  .workspace-top {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
  }

  .status {
    max-width: none;
    text-align: left;
  }

  .stat-grid,
  .split-panel.active {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 92px;
  }

  .wide-card,
  .list-column,
  .editor-column {
    padding: 18px;
  }

  .editor-actions,
  .publish-actions {
    grid-template-columns: 1fr;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .curator-page {
    padding: 0;
    place-items: stretch;
  }

  .curator-shell {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-inline: 0;
    border-block: 0;
  }

  .developer-sidebar h1,
  .workspace-top h2,
  .wide-card h3 {
    font-size: 24px;
  }

  .developer-nav {
    grid-template-columns: 1fr 1fr;
  }

  .developer-workspace {
    padding-inline: 14px;
  }

  .curator-shell .developer-workspace {
    padding-inline: 20px;
  }
}
.developer-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.developer-switch-row > span:first-child {
  display: grid;
  gap: 4px;
}

.developer-switch-row small {
  color: var(--muted);
  font-weight: 400;
}

.developer-switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.developer-slim-switch {
  position: relative;
  width: 42px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 160ms ease, border-color 160ms ease;
}

.developer-slim-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.developer-switch-row input:checked + .developer-slim-switch {
  background: rgba(214, 205, 177, 0.18);
  border-color: rgba(214, 205, 177, 0.55);
}

.developer-switch-row input:checked + .developer-slim-switch::after {
  transform: translateX(20px);
  background: var(--ink);
}
