/* =========================================================
   CONCEPT A — "Viewport"
   A dark 3D-editor style interface. Projects lie on a ground
   plane; click one and the camera flies to it, then the
   project opens in a render panel beside the viewport.
   ========================================================= */

@font-face { font-family: "Utara"; src: url("/assets/fonts/Utara-VF.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Kiyosuna Sans"; src: url("/assets/fonts/KiyosunaSans-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* same palette as the main site */
  --bg: #0d0d0d;
  --text: #ece7df;
  --muted: #8a857e;
  --dim: #55514c;
  --rose: #e3aeb1;              /* selection */
  --rose-soft: rgba(227, 174, 177, 0.16);
  --butter: #e9d8a6;            /* hover, interactive, keyframes */
  --butter-soft: rgba(233, 216, 166, 0.13);
  --sage: #b3cfa6;              /* time, playback, collections */
  --sage-soft: rgba(179, 207, 166, 0.14);

  /* editor greys */
  --gap: #070707;
  --area: #141414;
  --header: #1b1b1b;
  --field: #232323;
  --field-hover: #2c2c2c;
  --line: #262422;

  --x: #d7898f;   /* axis colours from the palette */
  --y: #9fbf91;
  --z: #dcc583;

  --ui: "Inter", system-ui, sans-serif;
  --display: "Utara", "Helvetica Neue", Arial, sans-serif;
  --body: "Kiyosuna Sans", "Helvetica Neue", Arial, sans-serif;

  --right: 300px;
  --render: 0px;          /* width of the render panel — animated */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--gap);
  color: var(--text);
  font: 400 12px/1.4 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
::selection { background: var(--rose); color: var(--bg); }

/* Before the interface is built, keep the page content hidden */
body:not(.ready) > main { display: none; }

/* =========================================================
   APP GRID
   ========================================================= */
.app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: 30px 1fr 74px 24px;
  grid-template-columns: 1fr var(--render) var(--right);
  grid-template-areas:
    "top      top     top"
    "view     render  outliner"
    "timeline timeline outliner"
    "status   status  status";
  gap: 3px;
  padding: 0 3px;
  transition: grid-template-columns 0.55s cubic-bezier(.7,0,.2,1);
}
.app.render-open { --render: 46%; }
.app.no-side { --right: 0px; }
.app.no-side .side { display: none; }
.app.no-timeline { grid-template-rows: 30px 1fr 0 24px; }
.app.no-timeline .timeline { display: none; }   /* keep in step with RENDER_SHARE in scene.js */

.area {
  background: var(--area);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  min-width: 0;
  min-height: 0;
}

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 8px;
  background: var(--gap);
  white-space: nowrap;
  overflow: hidden;
}
.logo {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--header);
}
.logo:hover { color: var(--rose); }
.menus { display: flex; gap: 2px; }
.menu-btn { padding: 4px 8px; border-radius: 4px; color: var(--muted); }
.menu-btn:hover { background: var(--header); color: var(--text); }
.menu-btn:focus { outline: none; }
.menu-btn:focus-visible { outline: 1px solid var(--butter); }
.menu-btn.is-open { background: var(--butter-soft); color: var(--butter); }

.tabs { display: flex; gap: 2px; margin-left: 6px; }
.tab {
  padding: 5px 10px;
  border-radius: 5px 5px 0 0;
  color: var(--muted);
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--area); color: var(--text); }

.scene-name { margin-left: auto; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.scene-name b {
  font-weight: 400;
  color: var(--text);
  background: var(--field);
  padding: 3px 10px;
  border-radius: 4px;
}

/* =========================================================
   3D VIEWPORT
   ========================================================= */
.viewport { grid-area: view; background: #101010; }
.viewport canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
.viewport canvas.is-hovering { cursor: pointer; }
.viewport canvas.is-dragging { cursor: grabbing; }

.vp-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  background: rgba(27, 27, 27, 0.92);
  z-index: 3;
  white-space: nowrap;
}
.vp-header .menu-btn:hover { background: var(--field); }
.vp-header .spacer { flex: 1; }
.vp-btn {
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--field);
  color: var(--text);
}
.vp-btn:hover { background: var(--field-hover); }
.shading { display: flex; gap: 1px; margin-left: 6px; }
.shading span {
  width: 24px; height: 20px;
  display: grid; place-items: center;
  background: var(--field);
  border-radius: 4px;
}
.shading span.on { background: #3a3536; }
.shading svg { width: 12px; height: 12px; }

.vp-info {
  position: absolute;
  top: 38px; left: 56px;
  z-index: 2;
  color: var(--muted);
  pointer-events: none;
  line-height: 1.5;
}
.vp-info b { font-weight: 400; color: var(--text); }

.toolbar {
  position: absolute;
  top: 40px; left: 8px;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 3px;
  background: rgba(27, 27, 27, 0.92);
  border-radius: 6px;
}
.toolbar button {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: var(--muted);
}
.toolbar button:hover { background: var(--field); color: var(--butter); }
.toolbar button.on { background: var(--rose-soft); color: var(--rose); }
.toolbar svg { width: 16px; height: 16px; }
.toolbar hr { border: 0; height: 1px; background: var(--line); margin: 3px 2px; }

.gizmo {
  position: absolute;
  top: 38px; right: 10px;
  width: 92px; height: 92px;
  z-index: 2;
  cursor: grab;
  touch-action: none;
}
.gizmo .gz-bg { fill: transparent; transition: fill 0.2s; }
.gizmo:hover .gz-bg { fill: rgba(255,255,255,0.05); }
.gizmo .gz-ball { cursor: pointer; }
.gizmo text { font: 500 10px var(--ui); text-anchor: middle; dominant-baseline: central; fill: #0d0d0d; pointer-events: none; }

.nav-btns {
  position: absolute;
  top: 138px; right: 33px;
  z-index: 2;
  display: grid; gap: 6px;
}
.nav-btns button {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(40, 40, 40, 0.7);
  color: var(--muted);
  touch-action: none;
}
.nav-btns button:hover { background: var(--butter-soft); color: var(--butter); }
.nav-btns [data-nav="pan"], .nav-btns [data-nav="zoom"] { cursor: grab; }
.nav-btns svg { width: 15px; height: 15px; }

.vp-transform {
  position: absolute;
  top: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(27, 27, 27, 0.92);
  color: var(--butter);
  font-variant-numeric: tabular-nums;
  white-space: pre;
  pointer-events: none;
}
.viewport canvas.is-transforming { cursor: move; }

.vp-hint {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--muted);
  background: rgba(20,20,20,0.85);
  padding: 6px 12px;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.6s ease;
  white-space: nowrap;
}
.vp-hint.gone { opacity: 0; }

/* =========================================================
   RENDER PANEL — where the project page appears
   ========================================================= */
.render {
  grid-area: render;
  display: flex;
  flex-direction: column;
  background: #0f0f0f;
}
.render-head {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 10px;
  background: var(--header);
  white-space: nowrap;
  overflow: hidden;
}
.render-head .label { color: var(--muted); }
.render-head .title { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.render-head .close {
  margin-left: auto;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 4px;
  color: var(--muted);
}
.render-head .close:hover { background: var(--field); color: var(--rose); }

.render-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px clamp(18px, 3vw, 40px) 40px;
  min-width: 340px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}
.render-body main {
  transition: opacity 0.3s ease;
  font: 300 15px/1.65 var(--body);
}
.render-body main.is-leaving { opacity: 0; }
.render-body main:focus { outline: none; }

/* project page content (same structure as the main site) */
.project-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 6px 20px;
  padding-bottom: 16px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.project-head h1 { font: 400 clamp(24px, 2.6vw, 38px)/1.08 var(--display); margin: 0; }
.project-head .meta { margin: 0; color: var(--muted); font-size: 13px; }
.project-text { max-width: 60ch; margin: 0 0 32px; }
.project-text p { margin: 0 0 1em; }
.project-text .role { color: var(--muted); font-size: 14px; }
.section-title { font: 400 20px/1.2 var(--display); margin: 44px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.media { margin: 0 0 14px; }
.media img { width: 100%; height: auto; }
.media figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }
.media-grid .media { margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; background: #161616; margin: 0 0 14px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video.vertical { aspect-ratio: 9 / 16; max-width: 400px; margin-left: auto; margin-right: auto; }
.video-placeholder, .media-placeholder {
  display: grid; place-items: center;
  color: var(--muted); font-size: 13px;
  border: 1px dashed #2a2826;
  /* checkerboard, like an empty render */
  background:
    conic-gradient(#141414 25%, #181818 0 50%, #141414 0 75%, #181818 0) 0 0 / 24px 24px;
}
.video-placeholder { position: absolute; inset: 0; }
.media-placeholder { aspect-ratio: 3 / 2; margin-bottom: 14px; }
.next-project {
  display: inline-block; margin-top: 28px;
  font-family: var(--display); color: var(--muted);
}
.next-project:hover { color: var(--rose); }

.about { max-width: 52ch; }
.about h1 { font: 400 32px/1.1 var(--display); margin: 0 0 18px; }
.about p { margin: 0 0 1em; }
.about .poem { color: var(--rose); }
.about a { color: var(--rose); }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.not-found h1 { font: 400 clamp(22px, 2.6vw, 34px)/1.25 var(--display); max-width: 22ch; margin: 0 auto 16px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.not-found .nf-img { display: block; width: min(420px, 100%); height: auto; margin: 8px auto 20px; }
.not-found a { color: var(--muted); font-family: var(--display); }
.not-found a:hover { color: var(--rose); }

/* =========================================================
   OUTLINER + PROPERTIES (right column)
   ========================================================= */
.side {
  grid-area: outliner;
  display: grid;
  grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 3px;
  background: none;
  border-radius: 0;
}
.panel { background: var(--area); border-radius: 6px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-head {
  height: 28px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: var(--header);
  color: var(--muted);
}
.panel-head svg { width: 13px; height: 13px; }
.panel-head .count { margin-left: auto; color: var(--dim); }

.tree { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.tree li { margin: 0; }
.row {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
  height: 22px;
  padding: 0 8px 0 calc(8px + var(--depth, 0) * 16px);
  text-align: left;
  white-space: nowrap;
  color: var(--text);
}
.row .name { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.row svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--muted); }
.row .eye { opacity: 0.45; }
.tree li:nth-child(even) .row.obj { background: rgba(255,255,255,0.012); }
.row.obj svg:first-child { color: #b9ab84; }
.row.obj:hover { background: #1f1f1f; color: var(--butter); }
.row.obj.is-active { background: var(--rose-soft); color: var(--rose); }
.row.obj.is-active svg { color: var(--rose); }
.row.collection { color: var(--muted); cursor: default; }
.row.collection svg { color: var(--sage); }

.props { flex: 1; overflow-y: auto; padding: 10px 12px 14px; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.props .empty { color: var(--dim); padding: 6px 0; }
.prop-name {
  display: flex; align-items: center; gap: 8px;
  background: var(--field);
  border-radius: 4px;
  padding: 5px 8px;
  margin-bottom: 12px;
  color: var(--rose);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prop-name svg { width: 13px; height: 13px; flex-shrink: 0; }
.prop-section { margin-bottom: 12px; }
.prop-section h3 {
  font-size: 12px; font-weight: 500; margin: 0 0 6px;
  display: flex; align-items: center; gap: 6px;
}
.prop-section h3::before { content: "▾"; color: var(--muted); font-size: 10px; }
.prop-row { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; margin-bottom: 3px; }
.prop-row label { color: var(--muted); text-align: right; }
.field {
  background: var(--field);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.prop-gap { height: 6px; }
.num {
  position: relative;
  display: flex; align-items: stretch;
  background: var(--field);
  border-radius: 4px;
  height: 21px;
  overflow: hidden;
}
.num.x { box-shadow: inset 2px 0 0 var(--x); }
.num.y { box-shadow: inset 2px 0 0 var(--y); }
.num.z { box-shadow: inset 2px 0 0 var(--z); }
.num:hover { background: var(--field-hover); }
.num input {
  flex: 1; min-width: 0;
  border: 0; background: none; color: var(--text);
  font: inherit; font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0;
  cursor: ew-resize;
}
.num input:focus { outline: none; cursor: text; background: #1a1a1a; text-align: left; padding: 0 8px; color: var(--butter); }
.num.is-dragging input { color: var(--butter); }
.num .step { width: 16px; color: var(--muted); opacity: 0; font-size: 13px; line-height: 1; }
.num:hover .step { opacity: 1; }
.num .step:hover { color: var(--butter); }
.num:focus-within .step { display: none; }
.prop-open {
  width: 100%;
  margin-top: 6px;
  padding: 6px;
  border-radius: 4px;
  background: #3a3536;
  color: var(--text);
}
.prop-open:hover { background: var(--rose); color: var(--bg); }
.prop-copy {
  width: 100%;
  margin-top: 4px;
  padding: 5px;
  border-radius: 4px;
  background: var(--field);
  color: var(--muted);
}
.prop-copy:hover { color: var(--butter); background: var(--field-hover); }

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline { grid-area: timeline; display: flex; flex-direction: column; }
.tl-head {
  height: 24px; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px;
  background: var(--header);
  color: var(--muted);
}
.tl-controls { display: flex; gap: 2px; margin-left: auto; }
.tl-controls button {
  width: 24px; height: 18px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--field);
  color: var(--muted);
}
.tl-controls button:hover { color: var(--sage); background: var(--field-hover); }
.tl-controls svg { width: 10px; height: 10px; }
.tl-controls .tl-play { width: 30px; color: var(--sage); }
.tl-head .frame { margin-left: 12px; display: flex; gap: 6px; align-items: center; }
.tl-head .frame b { font-weight: 400; color: var(--text); background: var(--field); padding: 1px 10px; border-radius: 4px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.tl-track { position: relative; flex: 1; margin: 0 14px; cursor: ew-resize; touch-action: none; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 60%; height: 1px; background: #1d1d1d; }
.tl-ticks { position: absolute; inset: 0; }
.tl-ticks span {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid #1d1d1d;
  font-size: 10px; color: var(--dim);
  padding-left: 3px;
}
.tl-key {
  position: absolute; top: 60%;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  transform: rotate(45deg);
  background: #8f8566;
  border: 1px solid #0d0d0d;
  pointer-events: none;
  transition: background 0.2s, transform 0.2s;
}
.tl-key.is-active { background: var(--rose); transform: rotate(45deg) scale(1.25); }
.tl-playhead {
  position: absolute; top: 0; bottom: 0;
  width: 1px; background: var(--sage);
  pointer-events: none;
}
.tl-playhead::before {
  content: attr(data-frame);
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  background: var(--sage); color: var(--bg);
  font-size: 10px; padding: 0 5px; border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   STATUS BAR
   ========================================================= */
.statusbar {
  grid-area: status;
  display: flex; align-items: center; gap: 18px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap; overflow: hidden;
}
.statusbar .hint { display: flex; align-items: center; gap: 5px; }
.statusbar .hint i {
  font-style: normal;
  border: 1px solid var(--dim);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 10px;
}
.statusbar .hints { display: flex; gap: 18px; }
.st-report { color: var(--butter); opacity: 0; transition: opacity 0.4s; }
.st-report.on { opacity: 1; }
.statusbar .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.st-edited { color: var(--butter); font-size: 11px; padding: 1px 8px; border-radius: 3px; background: var(--butter-soft); }
.st-edited:hover { background: var(--butter); color: var(--bg); }
.statusbar a:hover { color: var(--rose); }

/* phones: outliner toggle */
.outliner-toggle { display: none; }

/* =========================================================
   SMALLER SCREENS
   ========================================================= */
@media (max-width: 1100px) {
  :root { --right: 250px; }
  .scene-name, .shading { display: none; }
}

@media (max-width: 760px) {
  .app {
    grid-template-rows: 30px 1fr 24px;
    grid-template-columns: 1fr;
    grid-template-areas: "top" "view" "status";
  }
  .tabs .tab[data-home], .scene-name, .st-copy, .timeline, .toolbar, .statusbar .hints, .vp-header .menu-btn, .st-edited { display: none; }
  .vp-info { left: 10px; }
  .topbar { gap: 8px; }
  .tab { padding: 5px 7px; }

  /* outliner slides up from the bottom */
  .side {
    position: fixed;
    left: 3px; right: 3px; bottom: 27px;
    height: 58vh;
    z-index: 20;
    grid-template-rows: 1fr;
    transform: translateY(calc(100% + 40px));
    transition: transform 0.35s cubic-bezier(.7,0,.2,1);
  }
  .side .props-panel { display: none; }
  .app.outliner-open .side { transform: none; }
  .outliner-toggle {
    display: block;
    position: absolute; left: 50%; bottom: 14px;
    transform: translateX(-50%);
    z-index: 4;
    padding: 9px 18px;
    border-radius: 20px;
    background: var(--header);
    color: var(--text);
    font-size: 13px;
  }
  .vp-hint { display: none; }

  /* render panel covers the screen */
  .render {
    position: fixed;
    inset: 33px 3px 27px;
    z-index: 30;
    border-radius: 6px;
    transform: translateY(calc(100% + 40px));
    transition: transform 0.45s cubic-bezier(.7,0,.2,1);
  }
  .app.render-open .render { transform: none; }
  .render-body { min-width: 0; }
  .media-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* =========================================================
   DROPDOWN MENUS & SMALL WINDOWS
   ========================================================= */
.dropdown {
  position: fixed;
  z-index: 100;
  min-width: 230px;
  padding: 4px;
  background: #1c1c1c;
  border: 1px solid #2c2c2c;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  font: 400 12px/1.4 var(--ui);
  color: var(--text);
  animation: dd-in 0.12s ease-out;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-3px); } }
.dd-item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 10px 4px 6px;
  border-radius: 4px;
  text-align: left;
  white-space: nowrap;
}
.dd-item:hover { background: var(--butter-soft); color: var(--butter); }
.dd-item.disabled { color: var(--dim); cursor: default; }
.dd-item.disabled:hover { background: none; color: var(--dim); }
.dd-check { color: var(--sage); font-size: 11px; }
.dd-key { color: var(--muted); font-size: 11px; padding-left: 24px; }
.dd-item:hover .dd-key { color: inherit; opacity: 0.7; }
.dd-sep { height: 1px; background: #2a2a2a; margin: 4px 6px; }

.modal-wrap {
  position: fixed; inset: 0;
  z-index: 120;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.45);
  padding: 16px;
}
.modal {
  width: min(560px, 100%);
  max-height: 85vh;
  display: flex; flex-direction: column;
  background: var(--area);
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  font: 400 12px/1.5 var(--ui);
}
.modal-head { display: flex; align-items: center; height: 30px; padding: 0 6px 0 12px; background: var(--header); color: var(--muted); }
.modal-head .close { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; }
.modal-head .close:hover { color: var(--rose); background: var(--field); }
.modal-body { padding: 14px; overflow: auto; }
.modal-body p { margin: 0 0 10px; color: var(--muted); }
.modal textarea {
  width: 100%; height: 260px;
  resize: vertical;
  background: #0f0f0f; color: var(--text);
  border: 1px solid #2a2a2a; border-radius: 4px;
  padding: 10px;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}
.modal textarea:focus { outline: 1px solid var(--butter); }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.btn-primary { padding: 6px 14px; border-radius: 4px; background: #3a3536; }
.btn-primary:hover { background: var(--rose); color: var(--bg); }
.controls { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.controls dt { color: var(--butter); }
.controls dd { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .nav-btns, .gizmo { display: none; }
  .menus { display: none; }
}

.showings { display: grid; grid-template-columns: 3.2em 1fr; gap: 10px 14px; margin: 0; }
.showings dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.showings dd { margin: 0; }
.showings b { font-weight: 400; color: var(--text); font-family: var(--display); }