/* Investigation OS — the experience layer.
   Art direction approved 2026-10-27: boot, archive desktop, case drawer, case takeover,
   tabletop with picked-up evidence. Ported from the approved mocks. */

:root {
  --lamp: #ffd9a0; --brass: #c9a227; --brass-lo: #7d6415;
  --paper: #efe6d4; --ink: #cbd2d5; --muted: #7d868a;
  --green: #8fd6bd; --red: #b03a2c;
  --line: rgba(255,255,255,.09);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.dk, .dk * { box-sizing: border-box; min-width: 0; }
.dk { position: fixed; inset: 0; font-family: var(--sans); color: var(--ink); background: #05080a; overflow: hidden; }
@media (max-width: 760px) { .dk { position: relative; min-height: 100vh; overflow: auto; } }

  html[data-surface="boot"] .screen[data-frame="boot"],
  html[data-surface="desktop"] .screen[data-frame="desktop"],
  html[data-surface="collection"] .screen[data-frame="collection"],
  html[data-surface="transition"] .screen[data-frame="transition"],
  html[data-surface="case"] .screen[data-frame="case"],
  html[data-surface="mob-archive"] .screen[data-frame="mob-archive"],

  .room::before {
    content: ""; position: absolute; inset: 0;
    background:
      repeating-linear-gradient(96deg, rgba(255,255,255,.022) 0 1px, transparent 1px 84px),
      repeating-linear-gradient(6deg, rgba(0,0,0,.22) 0 2px, transparent 2px 96px);
    opacity: .8;
  }
  .room::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(118% 84% at 50% 36%, transparent 42%, rgba(0,0,0,.7) 100%),
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='.16'/></svg>");
    mix-blend-mode: screen;
  }

  /* ------------- top bar / dock ------------- */
  .topbar {
    position: relative; z-index: 5; display: flex; align-items: center; gap: 12px;
    height: 40px; padding: 0 18px; font-size: 11.5px; color: var(--muted);
    background: linear-gradient(180deg, rgba(16,23,26,.95), rgba(8,11,12,.86));
    border-bottom: 1px solid rgba(201,162,39,.16);
  }
  .topbar .crest { font-family: var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); font-size: 12px; white-space: nowrap; }
  .topbar .crest b { color: var(--brass); font-weight: 600; }
  .topbar .sp { flex: 1; }
  .topbar .who { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }

  .dock {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
    display: flex; gap: 10px; padding: 9px 12px; border-radius: 16px;
    background: rgba(14,20,22,.72); border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 22px 44px rgba(0,0,0,.6); backdrop-filter: blur(8px);
  }
  .dock i {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--muted);
    background: linear-gradient(168deg, #232c30, #101619); border: 1px solid rgba(255,255,255,.1);
  }
  .dock i.on { color: var(--lamp); border-color: rgba(201,162,39,.5); box-shadow: 0 0 0 1px rgba(201,162,39,.18), 0 8px 18px rgba(0,0,0,.5); }

  /* ------------- desktop icons ------------- */
  .icons { position: absolute; left: 20px; top: 58px; z-index: 4; display: flex; flex-direction: column; gap: 16px; }
  .icon { width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .icon .g { width: 42px; height: 42px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: linear-gradient(168deg, #29343a, #0e1417); box-shadow: 0 10px 20px rgba(0,0,0,.5); position: relative; }
  .icon .g::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 12px; height: 10px; border-radius: 2px; background: linear-gradient(180deg, rgba(255,217,160,.5), rgba(255,217,160,.12)); }
  .icon .lb { font-size: 10px; letter-spacing: .04em; color: #a8b1b4; text-align: center; }
  .icon.on .lb { color: var(--lamp); }

  /* ------------- windows ------------- */
  .win {
    position: absolute; z-index: 4; border-radius: 12px; overflow: hidden;
    background: linear-gradient(176deg, rgba(22,30,33,.96), rgba(9,13,15,.97));
    border: 1px solid rgba(255,255,255,.11);
    box-shadow: 0 34px 70px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.08);
  }
  .win .tb { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: linear-gradient(180deg, rgba(38,48,53,.85), rgba(16,22,25,.9)); border-bottom: 1px solid rgba(255,255,255,.07); }
  .win .tb .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.16); }
  .win .tb .ti { font-family: var(--mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: #a8b1b4; }
  .win .tb .sp { flex: 1; }


  .preview { left: 96px; top: 366px; width: 616px; }
  .preview .body { display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 15px; padding: 15px 17px; }
  .preview .cov { border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: linear-gradient(168deg, #2b3339, #0b1013); position: relative; overflow: hidden; }
  .preview .cov::after { content: ""; position: absolute; inset: 0; background: radial-gradient(56% 66% at 66% 26%, rgba(255,217,160,.45), transparent 70%); }
  .preview h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 18px; color: var(--paper); }
  .preview .tags { display: flex; gap: 7px; margin-top: 7px; }
  .preview .tags span { padding: 3px 7px; border-radius: 3px; border: 1px solid rgba(201,162,39,.4); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: var(--lamp); }
  .preview .one { margin: 9px 0 0; font-size: 12px; line-height: 1.5; color: #9aa3a6; }
  .preview .open { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 8px; border: 1px solid rgba(255,217,160,.5); background: rgba(255,217,160,.1); color: var(--lamp); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }


  .notice { left: 96px; top: 566px; width: 452px; }
  .notice .body { padding: 12px 15px; display: flex; flex-direction: column; gap: 8px; }
  .notice .row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: #9aa3a6; }
  .notice .row b { color: var(--lamp); font-weight: 500; }
  .notice .row .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
  .sticky { position: absolute; right: 54px; top: 392px; width: 196px; padding: 16px 14px 14px; z-index: 4;
    background: linear-gradient(168deg, #e8dba6, #cfc084); border-radius: 2px; transform: rotate(-2deg);
    box-shadow: 0 18px 30px rgba(0,0,0,.6); color: #2a2418; }
  .sticky::before { content: ""; position: absolute; left: 38%; top: -8px; width: 46px; height: 15px; background: rgba(255,255,255,.35); transform: rotate(-3deg); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
  .sticky .h { font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(42,36,24,.55); }
  .sticky .l { margin-top: 8px; font-size: 12px; line-height: 1.55; }

  /* collection cards */
  .archive { left: 118px; top: 66px; right: 40px; bottom: 76px; }
  .archive .body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; height: calc(100% - 34px); }
  .archive h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 25px; color: var(--paper); }
  .archive .sub { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .coll {
    position: relative; border-radius: 11px; overflow: hidden; border: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(170deg, rgba(30,39,43,.9), rgba(10,14,16,.95)); cursor: pointer;
    display: flex; flex-direction: column;
  }
  .coll .cover { position: relative; height: 118px; background: linear-gradient(168deg, #2b3339, #0b1013); overflow: hidden; }
  .coll .cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(58% 66% at 68% 24%, rgba(255,217,160,.42), transparent 70%); }
  .coll .cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(74deg, rgba(0,0,0,.3) 0 2px, transparent 2px 14px); opacity: .45; }
  .coll.c2 .cover { background: linear-gradient(170deg, #1b3038, #08100f); }
  .coll.c2 .cover::before { background: radial-gradient(80% 40% at 30% 78%, rgba(126,196,214,.28), transparent 72%); }
  .coll.c2 .cover::after { background: repeating-linear-gradient(180deg, rgba(0,0,0,.22) 0 2px, transparent 2px 11px); opacity: .55; }
  .coll.c3 .cover { background: linear-gradient(170deg, #241f1d, #0a0a0b); }
  .coll.c3 .cover::before { background: radial-gradient(50% 60% at 50% 40%, rgba(255,217,160,.16), transparent 72%); }
  .coll.c3 .cover::after { background: linear-gradient(58deg, transparent 46%, rgba(226,214,190,.28) 47% 53%, transparent 54%), linear-gradient(-58deg, transparent 46%, rgba(226,214,190,.22) 47% 53%, transparent 54%); }
  .cont { margin-top: auto; border-top: 1px solid rgba(255,255,255,.07); padding-top: 14px; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 16px; }
  .cont .k { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
  .cont .big { margin-top: 6px; font-family: var(--serif); font-size: 19px; color: var(--paper); line-height: 1.25; }
  .cont .fine { margin-top: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .cont .pbar { margin-top: 11px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
  .cont .pbar i { display: block; height: 100%; width: 21%; background: linear-gradient(90deg, var(--brass-lo), var(--lamp)); }
  .act { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: #9aa3a6; }
  .act:last-child { border-bottom: none; }
  .act .sw { width: 16px; height: 20px; border-radius: 2px; background: linear-gradient(168deg, #d0bf9c, #ac9873); }
  .coll .meta { padding: 11px 12px 12px; }
  .coll .nm { font-family: var(--serif); font-size: 16px; color: var(--paper); }
  .coll .ct { margin-top: 3px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .coll:hover { border-color: rgba(201,162,39,.45); }

  /* case folders */
  .drawer { left: 96px; top: 58px; right: 34px; height: 286px; bottom: auto; }
  .drawer .body { padding: 15px 17px; height: calc(100% - 34px); display: grid; grid-template-columns: minmax(0, 1fr) 226px; gap: 16px; }
  .folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: min-content; gap: 13px; align-content: start; }
  .folder {
    position: relative; padding: 22px 12px 12px; border-radius: 4px 10px 10px 10px; cursor: pointer;
    background: linear-gradient(168deg, #d9c9a6, #c2ae86); color: #241f18;
    box-shadow: 0 14px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.4);
  }
  .folder::before { content: ""; position: absolute; left: 0; top: -7px; width: 44%; height: 10px; border-radius: 4px 4px 0 0; background: #cdb98f; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
  .folder .nm { font-family: var(--serif); font-size: 13.5px; line-height: 1.25; }
  .folder .row2 { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: #5b5344; }
  .folder .tag { padding: 2px 5px; border-radius: 2px; border: 1px solid rgba(36,31,24,.4); }
  .folder .tag.cold { border-color: rgba(150,42,32,.6); color: rgba(140,36,28,.95); }
  .folder.sel { outline: 2px solid rgba(201,162,39,.9); outline-offset: 3px; transform: translateY(-2px); }
  .folders-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .drawer .rail { display: flex; flex-direction: column; gap: 12px; }
  .railbox { border-radius: 10px; border: 1px solid var(--line); padding: 12px; background: rgba(255,255,255,.02); }
  .railbox .k { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
  .railbox .v { margin-top: 5px; font-family: var(--serif); font-size: 15px; color: var(--paper); }
  .railbox .n { margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.5; }
  .mini-case { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .mini-case:last-child { border-bottom: none; }
  .mini-case .sw { width: 22px; height: 28px; border-radius: 2px; background: linear-gradient(168deg, #d9c9a6, #b7a37c); }
  .mini-case .t { font-size: 11px; color: var(--ink); }

  /* ------------- boot ------------- */
  .boot { position: absolute; inset: 0; display: grid; place-items: center; background: #040607; z-index: 9; }
  .boot .inner { width: min(520px, 84vw); text-align: left; }
  .crest-big { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
  .seal {
    width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(201,162,39,.55);
    display: grid; place-items: center; color: var(--brass); font-family: var(--serif); font-size: 20px;
    box-shadow: 0 0 34px rgba(201,162,39,.22), inset 0 0 18px rgba(201,162,39,.12);
  }
  .crest-big .txt b { display: block; font-family: var(--serif); letter-spacing: .2em; text-transform: uppercase; font-size: 15px; color: var(--paper); font-weight: 500; }
  .crest-big .txt span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-lo); }
  .bootlog { font-family: var(--mono); font-size: 11.5px; line-height: 2; color: #6f7a7d; }
  .bootlog b { color: var(--green); font-weight: 400; }
  .bootlog .cursor { display: inline-block; width: 7px; height: 13px; background: var(--green); vertical-align: -2px; }
  .bootbar { margin-top: 22px; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
  .bootbar i { display: block; height: 100%; width: 72%; background: linear-gradient(90deg, var(--brass-lo), var(--lamp)); box-shadow: 0 0 14px rgba(255,217,160,.6); }

  /* ------------- transition ------------- */
  .dim { position: absolute; inset: 0; background: rgba(3,5,6,.76); z-index: 7; }
  .grow {
    position: absolute; left: 8%; right: 8%; top: 7%; bottom: 7%; z-index: 8; border-radius: 14px;
    background: linear-gradient(176deg, rgba(20,28,31,.98), rgba(7,11,13,.99));
    border: 1px solid rgba(201,162,39,.5);
    box-shadow: 0 60px 120px rgba(0,0,0,.85), 0 0 0 1px rgba(201,162,39,.18), 0 0 90px rgba(201,162,39,.16);
    display: grid; place-items: center;
  }
  .grow .mid { text-align: center; }
  .grow .case-nm { font-family: var(--serif); font-size: 30px; color: var(--paper); letter-spacing: .01em; }
  .grow .st { margin-top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }
  .grow .hair { margin: 22px auto 0; width: 220px; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
  .grow .hair i { display: block; height: 100%; width: 46%; background: var(--lamp); box-shadow: 0 0 14px rgba(255,217,160,.7); }
  .ghost-folder { position: absolute; left: 12%; top: 22%; width: 190px; height: 132px; border-radius: 4px 12px 12px 12px; background: linear-gradient(168deg, rgba(217,201,166,.22), rgba(194,174,134,.12)); border: 1px dashed rgba(217,201,166,.35); z-index: 8; }

  /* ------------- inside a case (experience, minimal copy) ------------- */
  .casewrap { position: absolute; inset: 40px 0 0; z-index: 4; display: grid; grid-template-columns: minmax(0, 1fr); }
  .table { position: relative; margin: 16px; border-radius: 12px; overflow: hidden;
    background:
      radial-gradient(70% 60% at 50% 18%, rgba(255,217,160,.16), transparent 66%),
      linear-gradient(176deg, #1b2426, #0c1113 60%, #070b0c);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 40px 80px rgba(0,0,0,.5); }
  .table .grain { position: absolute; inset: 0; background: repeating-linear-gradient(92deg, rgba(0,0,0,.2) 0 3px, transparent 3px 11px); opacity: .55; }
  .obj { position: absolute; cursor: pointer; }
  .obj .cap { position: absolute; left: 50%; transform: translateX(-50%); bottom: -20px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.42); white-space: nowrap; }

  /* case file folder on the table */
  .o-file { left: 8%; top: 14%; width: 208px; transform: rotate(-2.4deg); }
  .o-file .f { height: 150px; border-radius: 3px 9px 9px 9px; background: linear-gradient(168deg, #d9c9a6, #bda379); box-shadow: 0 22px 36px rgba(0,0,0,.6); position: relative; }
  .o-file .f::before { content: ""; position: absolute; left: 0; top: -7px; width: 46%; height: 9px; border-radius: 3px 3px 0 0; background: #cdb98f; }
  .o-file .f .stamp { position: absolute; left: 14px; bottom: 12px; font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: rgba(36,31,24,.55); }

  /* phone on the table */
  .o-phone { left: 41%; top: 9%; width: 186px; }
  .o-phone .p { height: 292px; border-radius: 22px; padding: 6px; background: linear-gradient(168deg, #333c41, #12181b 62%, #222b2f); box-shadow: 0 30px 50px rgba(0,0,0,.72), inset 0 0 0 1px rgba(255,255,255,.14); }
  .o-phone .g { height: 100%; border-radius: 17px; background: linear-gradient(178deg, #0d191d, #081114 60%, #0a1614); padding: 11px 9px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
  .o-phone .bub { padding: 6px 8px; border-radius: 9px; font-size: 9px; line-height: 1.4; color: #d7e8e2; background: rgba(255,255,255,.06); }
  .o-phone .bub.me { align-self: flex-end; background: rgba(143,214,189,.18); }
  .o-phone .dots { display: flex; gap: 5px; margin-top: auto; }
  .o-phone .dots i { width: 16px; height: 16px; border-radius: 4px; background: rgba(143,214,189,.18); }

  /* documents */
  .o-docs { right: 11%; top: 18%; width: 178px; transform: rotate(1.8deg); }
  .o-docs .sheet { height: 132px; border-radius: 2px; background: linear-gradient(168deg, #f1e9d7, #ddd0b4); box-shadow: 0 18px 30px rgba(0,0,0,.55); position: relative; }
  .o-docs .sheet::after { content: ""; position: absolute; left: 12px; right: 12px; top: 16px; height: 70px; background: repeating-linear-gradient(180deg, rgba(36,31,24,.22) 0 1px, transparent 1px 9px); }
  .o-docs .sheet.back { position: absolute; left: 8px; top: 9px; transform: rotate(-3deg); z-index: -1; }

  /* prints */
  .o-prints { right: 13%; bottom: 13%; display: flex; gap: 10px; }
  .o-prints .pr { width: 78px; padding: 5px 5px 14px; background: #f4ecdc; border-radius: 2px; box-shadow: 0 14px 24px rgba(0,0,0,.55); }
  .o-prints .pr .im { height: 62px; background: radial-gradient(circle at 62% 32%, rgba(255,224,168,.6), #0c1113 72%); }
  .o-prints .pr:nth-child(2) { transform: rotate(3.5deg); }


  /* lamp pool + desk clutter, so the table isn't an empty field */
  .table .lamp { position: absolute; left: -6%; top: -22%; width: 52%; height: 78%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(255,217,160,.2), rgba(255,217,160,.06) 58%, transparent 76%); filter: blur(4px); }
  .o-note { left: 14%; bottom: 12%; width: 168px; transform: rotate(-1.6deg); }
  .o-note .pad { height: 96px; border-radius: 3px; background: linear-gradient(168deg, #f4eddd, #ded2ba); box-shadow: 0 16px 26px rgba(0,0,0,.5); position: relative; }
  .o-note .pad::after { content: ""; position: absolute; left: 10px; right: 10px; top: 12px; height: 56px; background: repeating-linear-gradient(180deg, rgba(36,31,24,.2) 0 1px, transparent 1px 9px); }
  .o-stamp { right: 7%; top: 47%; width: 96px; transform: rotate(7deg); opacity: .85; }
  .o-stamp .rd { height: 34px; border-radius: 3px; border: 1.5px solid rgba(178,46,34,.55); color: rgba(178,46,34,.75); display: grid; place-items: center; font-family: var(--mono); font-size: 9px; letter-spacing: .18em; }

  /* the lifted state: one object comes forward, the rest recede */
  .table.picked .obj { opacity: .72; filter: saturate(.72) brightness(.86); }
  .table.picked .obj.sel { opacity: 1; filter: none; z-index: 4; }
  .table.picked .sel.o-phone { transform: translate(-7%, -3%) scale(1.42); }
  .table.picked .sel .cap { color: var(--lamp); bottom: -26px; }
  .table .halo { position: absolute; z-index: 2; pointer-events: none; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,217,160,.18), transparent 76%); }
  .table.picked .halo { left: 26%; top: 2%; width: 46%; height: 92%; }
  .table .hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 5;
    font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,217,160,.55); }

  .casestrip { padding: 18px 16px; display: flex; flex-direction: column; gap: 13px; }
  .strip-h { font-family: var(--serif); font-size: 17px; color: var(--paper); line-height: 1.25; }
  .bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
  .bar i { display: block; height: 100%; width: 21%; background: linear-gradient(90deg, var(--brass-lo), var(--lamp)); }
  .tally { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
  .chapters { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
  .ch { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #9aa3a6; }
  .ch .n { font-family: var(--mono); font-size: 8.5px; color: var(--brass); }
  .ch.done { color: var(--ink); }
  .ch .d { margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.18); }
  .ch.done .d { background: var(--green); box-shadow: 0 0 8px rgba(143,214,189,.8); }
  .accuse { margin-top: auto; padding: 10px 11px; border-radius: 9px; border: 1px dashed rgba(255,255,255,.16); font-size: 11px; color: var(--muted); line-height: 1.5; }

  /* ------------- mobile ------------- */

  .stbar { display: flex; justify-content: space-between; padding: 12px 18px 6px; font-family: var(--mono); font-size: 10px; color: #7fa79a; }
  .mhead { padding: 6px 18px 12px; }
  .mhead .k { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
  .mhead h1 { margin: 6px 0 0; font-family: var(--serif); font-weight: 500; font-size: 27px; color: var(--paper); }
  .msearch { margin: 0 16px 12px; display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #7fa79a; }
  .mlist { flex: 1; overflow: hidden; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
  .mrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
  .mrow .cov { height: 54px; border-radius: 9px; background: linear-gradient(168deg, #2b3339, #0b1013); position: relative; overflow: hidden; }
  .mrow .cov::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 66% 24%, rgba(255,217,160,.45), transparent 70%); }
  .mrow .nm { font-family: var(--serif); font-size: 14.5px; color: var(--paper); }
  .mrow .ct { margin-top: 3px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .mrow .go { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(201,162,39,.42); display: grid; place-items: center; color: var(--lamp); font-size: 11px; }
  .mnav { display: flex; padding: 10px 8px 16px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(7,12,14,.9); }
  .mnav div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 9px; letter-spacing: .06em; color: #5f6b6e; }
  .mnav div i { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,.14); }
  .mnav div.on { color: var(--lamp); }
  .mnav div.on i { border-color: rgba(201,162,39,.55); box-shadow: 0 0 12px rgba(201,162,39,.3); }

  /* mobile case open */
  .mcase { flex: 1; position: relative; display: flex; flex-direction: column; }
  .mhero { flex: 1; position: relative; margin: 0 12px; border-radius: 16px; overflow: hidden;
    background: radial-gradient(70% 50% at 50% 20%, rgba(255,217,160,.16), transparent 68%), linear-gradient(176deg, #16201f, #080d0e); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
  .mhero .bubble { position: absolute; left: 14px; right: 64px; padding: 9px 11px; border-radius: 13px; background: rgba(255,255,255,.07); font-size: 11.5px; line-height: 1.45; color: #d7e8e2; }
  .mhero .bubble.me { left: 64px; right: 14px; background: rgba(143,214,189,.18); }
  .mhero .lbl { position: absolute; left: 14px; top: 12px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(143,214,189,.8); }
  .msheet { margin: 10px 12px 0; padding: 10px 12px 12px; border-radius: 16px 16px 0 0; background: rgba(16,24,26,.96); border: 1px solid rgba(255,255,255,.09); border-bottom: none; }
  .mgrab { width: 38px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); margin: 0 auto 10px; }
  .msheet .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .msheet .t { font-family: var(--serif); font-size: 14px; color: var(--paper); }
  .msheet .k { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .mtabs { display: flex; gap: 7px; margin-top: 10px; }
  .mtabs span { flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px; border: 1px solid rgba(255,255,255,.1); font-size: 9.5px; letter-spacing: .06em; color: #8b9699; }
  .mtabs span.on { border-color: rgba(255,217,160,.45); background: rgba(255,217,160,.1); color: var(--lamp); }


  .msec { margin-top: 16px; }
  .msec .k { font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); padding: 0 2px 9px; }
  .mrail { display: flex; gap: 10px; overflow: hidden; }
  .mfold { flex: 0 0 104px; height: 118px; border-radius: 3px 9px 9px 9px; padding: 24px 9px 9px; position: relative;
    background: linear-gradient(168deg, #d9c9a6, #bda379); box-shadow: 0 12px 22px rgba(0,0,0,.5); }
  .mfold::before { content: ""; position: absolute; left: 0; top: -6px; width: 46%; height: 8px; border-radius: 3px 3px 0 0; background: #cdb98f; }
  .mfold .nm { font-family: var(--serif); font-size: 10.5px; line-height: 1.25; color: #241f18; }
  .mfold .ct { position: absolute; left: 9px; bottom: 8px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; text-transform: uppercase; color: #5b5344; }
  .mnav div i { display: grid; place-items: center; font-family: var(--mono); font-size: 8px; color: inherit; }

  .toast { position: fixed; left: 50%; bottom: 168px; transform: translateX(-50%); z-index: 40; padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(158,224,179,.45); background: rgba(16,34,26,.96); color: #c8f2d6; font-size: 11.5px; }


  html[data-surface="phone"] .screen[data-frame="phone"],
  html[data-surface="doc"] .screen[data-frame="doc"],
  html[data-surface="print"] .screen[data-frame="print"],

  .behind::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(94deg, rgba(0,0,0,.22) 0 3px, transparent 3px 12px);
  }
  .veil { position: absolute; inset: 0; background: radial-gradient(72% 64% at 50% 42%, rgba(4,7,8,.16), rgba(3,5,6,.72)); }
  .sil { position: absolute; z-index: 2; filter: blur(1.4px) brightness(.62) saturate(.7); }
  .sil.f { left: 5%; top: 16%; width: 210px; height: 152px; border-radius: 3px 10px 10px 10px; background: linear-gradient(168deg, #cdb98f, #a08c66); transform: rotate(-2.5deg); box-shadow: 0 24px 40px rgba(0,0,0,.6); }
  .sil.s { right: 6%; top: 20%; width: 190px; height: 136px; border-radius: 2px; background: linear-gradient(168deg, #e6dbc2, #bfae8b); transform: rotate(2deg); box-shadow: 0 22px 36px rgba(0,0,0,.6); }
  .sil.p { right: 12%; bottom: 12%; width: 150px; height: 104px; padding: 6px 6px 16px; background: #eee4cf; transform: rotate(3deg); box-shadow: 0 18px 30px rgba(0,0,0,.6); }
  .sil.p i { display: block; height: 100%; background: radial-gradient(circle at 60% 34%, rgba(255,224,168,.5), #0c1113 74%); }
  .sil.n { left: 10%; bottom: 14%; width: 176px; height: 96px; border-radius: 3px; background: linear-gradient(168deg, #f2ecdc, #d8ccb2); transform: rotate(-1.6deg); box-shadow: 0 16px 26px rgba(0,0,0,.55); }
  .sil.lamp { left: 30%; top: -6%; width: 40%; height: 60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,217,160,.16), transparent 76%); filter: blur(10px); }

  .topbar {
    position: relative; z-index: 6; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 18px;
    font-size: 11px; color: var(--muted); background: linear-gradient(180deg, rgba(16,23,26,.95), rgba(8,11,12,.86));
    border-bottom: 1px solid rgba(201,162,39,.16);
  }
  .topbar .crest { font-family: var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); font-size: 11.5px; }
  .topbar .crest b { color: var(--brass); font-weight: 600; }
  .topbar .sp { flex: 1; }
  .topbar .who { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; white-space: nowrap; }
  .put { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

  .stage { position: relative; z-index: 4; height: calc(100vh - 40px); display: grid; place-items: center; }
  .backhint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,217,160,.42); }

  /* ---- held object: a thin brass tray, nothing else ---- */
  .held { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 54px; align-items: center; }
  .tray { position: relative; filter: drop-shadow(0 50px 80px rgba(0,0,0,.8)); }
  .tray::before { content: ""; position: absolute; inset: -14px -16px; border-radius: 26px; border: 1px solid rgba(201,162,39,.18);
    background: radial-gradient(70% 60% at 50% 10%, rgba(255,217,160,.1), transparent 72%); }

  /* phone */
  .phone { width: 344px; height: 662px; border-radius: 40px; padding: 11px; background: linear-gradient(168deg, #39433f, #101614 60%, #26302c);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), inset 0 1px 0 rgba(255,255,255,.24); }
  .phone .glass { height: 100%; border-radius: 30px; background: linear-gradient(178deg, #0d191d, #081114 58%, #0a1614); padding: 16px 13px 10px;
    display: flex; flex-direction: column; gap: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); position: relative; }
  .phone .notch { position: absolute; left: 50%; top: 7px; transform: translateX(-50%); width: 74px; height: 17px; border-radius: 10px; background: #05090a; }
  .phone .st { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8.5px; color: #7fa79a; padding-bottom: 2px; }
  .phone .hdr { display: flex; align-items: center; gap: 8px; padding: 5px 2px 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
  .phone .hdr .av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(160deg, #33403c, #12191b); border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; font-family: var(--mono); font-size: 8px; color: #a9c3ba; }
  .phone .hdr .nm { font-size: 11.5px; color: #dfeee8; }
  .phone .hdr .mt { font-family: var(--mono); font-size: 8px; color: #7fa79a; }
  .daydiv { text-align: center; font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: #6fbfa3; opacity: .85; margin: 3px 0; }
  .bub { max-width: 90%; padding: 8px 10px; border-radius: 12px; font-size: 11.5px; line-height: 1.45; color: #daeae4; background: rgba(255,255,255,.055); }
  .bub.me { align-self: flex-end; background: rgba(143,214,189,.17); }
  .bub .hl { background: rgba(255,217,160,.3); border-radius: 2px; color: #fff8e8; }
  .bub.ph { padding: 6px; }
  .bub.ph span.im { display: block; height: 96px; border-radius: 9px; background: radial-gradient(circle at 66% 34%, rgba(255,224,168,.6), #0b1112 74%); }
  .bub.ph span.cp { display: block; margin-top: 4px; font-family: var(--mono); font-size: 8px; color: #7fa79a; }
  .curtain { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(180deg, transparent, rgba(8,17,20,.94)); pointer-events: none; }

  /* source strip — the only "UI" while held */
  .src { width: 268px; display: flex; flex-direction: column; gap: 14px; }
  .src .k { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
  .src .t { font-family: var(--serif); font-size: 21px; line-height: 1.3; color: var(--paper); }
  .src .m { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; color: var(--muted); line-height: 1.7; }
  .src .filed { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px;
    border: 1px solid rgba(158,224,179,.45); background: rgba(158,224,179,.1); color: #c8f2d6; font-size: 11px; }
  .src .same { font-size: 11.5px; line-height: 1.55; color: #9aa3a6; }

  /* document */
  .pages { position: relative; width: 600px; }
  .page { position: relative; border-radius: 2px; padding: 34px 40px; color: #241f18;
    background: linear-gradient(172deg, #f2ead8, #ddd0b3); box-shadow: 0 40px 70px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.08); transform: rotate(-.7deg); }
  .page.behind1 { position: absolute; inset: 10px -12px -14px 14px; transform: rotate(1.4deg); background: linear-gradient(172deg, #e6dbc2, #cfc0a0); z-index: -1; box-shadow: 0 26px 40px rgba(0,0,0,.5); }
  .page h1 { margin: 0 0 4px; font-family: var(--serif); font-size: 21px; font-weight: 600; }
  .page .sub { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #6d6552; }
  .page .rule { height: 1px; background: rgba(36,31,24,.22); margin: 14px 0; }
  .page .typed { font-family: var(--mono); font-size: 11.5px; line-height: 1.85; white-space: pre-wrap; }
  .page .redact { background: #241f18; color: transparent; border-radius: 1px; padding: 0 2px; }
  .page .sig { margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 16px; color: #4a4438; }
  .lens { position: absolute; width: 186px; height: 186px; border-radius: 50%; right: 24px; bottom: 30px; z-index: 6;
    border: 2px solid rgba(201,162,39,.72); overflow: hidden; background: linear-gradient(172deg, #f7f0e0, #e6dbc2);
    box-shadow: 0 24px 50px rgba(0,0,0,.6), inset 0 0 26px rgba(0,0,0,.18); }
  .lens .in { position: absolute; left: 8px; top: 44px; font-family: var(--mono); font-size: 24px; line-height: 1.42; color: #241f18; white-space: nowrap; }
  .lens .in b { font-weight: 700; }
  .lens::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, transparent 62%, rgba(0,0,0,.28) 100%); }

  /* print */
  .printwrap { position: relative; }
  .photo { position: relative; width: 660px; height: 460px; border-radius: 2px; overflow: hidden;
    background: radial-gradient(46% 60% at 62% 30%, rgba(255,224,168,.55), rgba(255,217,160,.12) 52%, transparent 74%), linear-gradient(176deg, #1c2426, #080c0d 70%);
    box-shadow: 0 44px 80px rgba(0,0,0,.78), inset 0 0 0 1px rgba(0,0,0,.5); }
  .photo::before { content: ""; position: absolute; left: 8%; top: 6%; width: 34%; height: 88%; border-left: 2px solid rgba(255,255,255,.07); border-right: 1px solid rgba(255,255,255,.05); }
  .photo::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(168deg, rgba(255,255,255,.05) 0 2px, transparent 2px 8px); opacity: .5; mix-blend-mode: overlay; }
  .photo .grain2 { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(0,0,0,.6)); }
  .photo .label { position: absolute; left: 18px; bottom: 16px; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }

  .photo .wall { position: absolute; left: 0; top: 0; bottom: 0; width: 26%; background: linear-gradient(90deg, rgba(255,255,255,.05), transparent 82%); }
  .photo .door { position: absolute; left: 7%; top: 14%; width: 16%; height: 60%; border: 1px solid rgba(255,255,255,.09); background: rgba(0,0,0,.35); }
  .photo .rail { position: absolute; left: 30%; right: 34%; bottom: 6%; height: 34%; border-top: 2px solid rgba(255,255,255,.14);
    background: repeating-linear-gradient(84deg, rgba(255,255,255,.13) 0 2px, transparent 2px 26px); }
  .photo .cable { position: absolute; left: 56%; top: 0; bottom: 34%; width: 1px; background: rgba(255,255,255,.1); }
  .photo .bulb { position: absolute; right: 26%; top: 24%; width: 74px; height: 74px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,244,214,.95), rgba(255,217,160,.5) 46%, transparent 78%); filter: blur(1px); }
  .photo .lens2 { position: absolute; width: 190px; height: 190px; border-radius: 50%; right: 44px; top: 62px; border: 2px solid rgba(201,162,39,.75); overflow: hidden;
    background: radial-gradient(46% 60% at 52% 34%, rgba(255,240,200,.9), rgba(255,217,160,.35) 48%, rgba(10,14,15,.9) 86%); box-shadow: 0 20px 40px rgba(0,0,0,.7); }
  .photo .lens2::after { content: ""; position: absolute; left: 50%; top: 58%; width: 46px; height: 30px; transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255,255,255,.5); border-radius: 3px; background: rgba(255,255,255,.08); }
  .pn { width: 660px; margin-top: 14px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); }

  /* accusation board */
  .boardwrap { width: min(1120px, 92vw); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .cork { position: relative; border-radius: 12px; padding: 24px; min-height: 340px;
    background: linear-gradient(168deg, #4a3c2a, #2c241a 62%, #221b12); box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), inset 0 10px 30px rgba(0,0,0,.5); }
  .string { position: absolute; height: 1px; background: linear-gradient(90deg, rgba(176,58,44,.85), rgba(176,58,44,.5)); transform-origin: left center; z-index: 0; }
  .pc { position: relative; z-index: 2; width: calc(33.333% - 12px); min-width: 150px; display: inline-block; vertical-align: top; margin: 0 10px 12px 0;
    padding: 16px 12px 11px; border-radius: 2px; background: #f2ead6; color: #241f18; font-family: var(--mono); font-size: 9.5px; line-height: 1.5;
    box-shadow: 0 10px 20px rgba(0,0,0,.5); }
  .pc:nth-child(odd) { transform: rotate(-1.2deg); }
  .pc:nth-child(even) { transform: rotate(.9deg); }
  .pc b { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
  .pc .pin { position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; border-radius: 50%; transform: translateX(-50%);
    background: radial-gradient(circle at 34% 30%, #ff8f7a, #a3231a); box-shadow: 0 2px 4px rgba(0,0,0,.55); }
  .pc.want { background: #f7f0de; outline: 2px solid rgba(201,162,39,.85); }
  .pc.want b { color: #7a2418; }
  .pc.claim { width: calc(66.666% - 12px); background: #f7f1e2; font-family: var(--sans); font-size: 12.5px; line-height: 1.5; }
  .pc.claim b { font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: #7a2418; margin-bottom: 6px; }
  .citebox { display: flex; flex-direction: column; gap: 12px; }
  .sus { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
  .sus .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(160deg, #33403c, #12191b); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--mono); font-size: 9px; color: #a9c3ba; }
  .sus .nm { font-size: 12.5px; color: var(--paper); }
  .sus .rl { display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .sus.on { border-color: rgba(255,217,160,.55); background: linear-gradient(170deg, rgba(58,46,20,.7), rgba(16,19,20,.9)); }
  .req { padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(158,224,179,.4); background: rgba(158,224,179,.07); }
  .req .l { font-size: 11.5px; line-height: 1.45; color: #cfe6dd; }
  .req .s { display: block; margin-top: 3px; font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
  .gobtn { padding: 13px; border-radius: 10px; border: 1px solid rgba(158,224,179,.45); background: rgba(158,224,179,.12); color: #d8f7e3;
    font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
  .note { font-family: var(--mono); font-size: 8.5px; letter-spacing: .07em; line-height: 1.6; color: var(--muted); }

/* ---------- live wiring additions ---------- */

.dk button { font-family: inherit; color: inherit; }
.dk button.icon, .dk button.coll, .dk button.folder, .dk button.act, .dk button.mini-case,
.dk button.obj, .dk button.pr, .dk button.pagelist-row, .dk button.sus { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.dk button.coll, .dk button.folder, .dk button.pr, .dk button.pagelist-row, .dk button.sus, .dk button.act { background-image: none; }

.dk .icon { background: none; border: 0; }
.dk .coll { padding: 0; }
.dk .folder { display: block; width: 100%; }
.dk .act { display: flex; width: 100%; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: #9aa3a6; align-items: center; gap: 9px; }
.dk .act .sw { width: 16px; height: 20px; border-radius: 2px; background: linear-gradient(168deg, #d0bf9c, #ac9873); }
.dk .big.linklike { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-family: var(--serif); font-size: 19px; color: var(--paper); }
.dk .big.linklike:hover { color: #fff; }

.dk .obj { border: 0; background: none; padding: 0; }
.dk .obj .f, .dk .obj .p, .dk .obj .sheet, .dk .obj .pr { display: block; }
.dk .obj .bub { display: block; }
.dk .obj .cap { pointer-events: none; }

/* held surfaces */
.dk .tray { min-height: 200px; display: grid; place-items: center; }
.dk .bub.tap { width: 100%; text-align: left; display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.dk .bub.tap:hover { background: rgba(255,255,255,.1); }
.dk .newdot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 8px rgba(255,217,160,.8); margin-top: 5px; }
.dk .ev-back { background: none; border: 0; padding: 2px 0 8px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.dk .ev-back:hover { color: var(--paper); }
.dk .appchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dk .chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); font-size: 10px; letter-spacing: .06em; cursor: pointer; }
.dk .chip.on { border-color: rgba(255,217,160,.5); background: rgba(255,217,160,.12); color: var(--lamp); }

.dk .pagelist { width: 560px; display: flex; flex-direction: column; gap: 8px; }
.dk .pagelist-row { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; }
.dk .pagelist-row:hover { border-color: rgba(201,162,39,.45); }
.dk .pagelist-row .nm { font-family: var(--serif); font-size: 14px; color: var(--paper); }
.dk .pagelist-row .ct { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dk .empty-line { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 0; }

.dk .printgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 620px; }
.dk .printgrid .pr { padding: 7px 7px 18px; background: #f4ecdc; border-radius: 2px; box-shadow: 0 18px 30px rgba(0,0,0,.55); cursor: pointer; display: block; }
.dk .printgrid .pr .im { display: block; height: 112px; width: 100%; background: radial-gradient(circle at 62% 32%, rgba(255,224,168,.6), #0c1113 72%); }
.dk .printgrid .pr .cap { display: block; margin-top: 6px; font-family: var(--mono); font-size: 8px; color: #6d6552; text-align: center; }
.dk .photo .photoimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.dk .ledgerheld { width: 420px; display: flex; flex-direction: column; gap: 12px; }
.dk .filedlist { display: flex; flex-direction: column; gap: 7px; max-height: 46vh; overflow: auto; }
.dk .filedrow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: 11.5px; color: #9aa3a6; }
.dk .filedrow.on { border-color: rgba(143,214,189,.35); color: var(--ink); }
.dk .filedrow b { font-family: var(--serif); font-weight: 500; font-size: 13px; color: var(--paper); }
.dk .filedrow span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.dk .gobtn { border: 1px solid rgba(158,224,179,.45); background: rgba(158,224,179,.12); color: #d8f7e3; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 13px; border-radius: 10px; cursor: pointer; }
.dk .gobtn[disabled] { border-color: var(--line); background: rgba(255,255,255,.03); color: var(--muted); cursor: default; }
.dk .gobtn.small { padding: 9px; font-size: 10px; letter-spacing: .12em; }

.dk .stage.accusations { display: grid; place-items: center; overflow: auto; }
.dk .req.miss { border-color: rgba(176,58,44,.45); background: rgba(176,58,44,.08); }
.dk .note.accent { color: var(--lamp); }

@media (max-width: 980px) {
  .dk .stage { height: auto; padding: 18px 12px 70px; }
  .dk .held { grid-template-columns: minmax(0, 1fr); gap: 22px; justify-items: center; }
  .dk .src { width: min(420px, 92vw); }
  .dk .printgrid, .dk .pagelist, .dk .pages, .dk .ledgerheld { width: min(520px, 92vw); }
  .dk .printgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dk .casewrap { grid-template-columns: minmax(0, 1fr); }
  .dk .table { margin: 12px; height: 460px; }
  .dk .casestrip { padding: 14px 14px 60px; }
  .dk .boardwrap { grid-template-columns: minmax(0, 1fr); }
  .dk .pc { width: calc(50% - 12px); }
}


/* ---------- fixes after live check ---------- */

.coll .meta .nm, .coll .meta .ct { display: block; }
.archive { height: 648px; bottom: auto; }

/* message rows keep the bubble material: they are buttons, not links */
.dk .bub.tap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.06);
  font-size: 11.5px;
  line-height: 1.45;
  color: #daeae4;
  cursor: pointer;
  text-align: left;
}
.dk .bub.tap:hover { background: rgba(255,255,255,.11); border-color: rgba(255,217,160,.35); }
.dk .phone .glass .bub.tap + .bub.tap { margin-top: 2px; }
.dk .chat, .dk .phone .glass { gap: 8px; }

/* the blurred desk behind must never eat clicks */
.dk .sil { pointer-events: none; }
.dk .behind, .dk .veil, .dk .grain, .dk .lamp, .dk .halo, .dk .curtain, .dk .grain2, .dk .bulb { pointer-events: none; }


/* recording rows read as players, not text */
.dk .bub.rec { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.dk .bub.rec .tri { width: 20px; height: 20px; border-radius: 50%; background: rgba(143,214,189,.24); border: 1px solid rgba(143,214,189,.42); display: grid; place-items: center; font-size: 7px; color: #cdeee0; }
.dk .bub.rec .wave { height: 14px; background: repeating-linear-gradient(90deg, rgba(143,214,189,.6) 0 2px, transparent 2px 5px);
  clip-path: polygon(0 45%,8% 22%,16% 62%,24% 32%,32% 70%,40% 40%,48% 74%,56% 30%,64% 60%,72% 36%,80% 66%,88% 42%,100% 52%,100% 62%,0 62%); }
.dk .bub.rec .tm { font-family: var(--mono); font-size: 8px; color: #7fa79a; }

/* the desk behind: give the silhouettes a little texture */
.dk .sil.f::before { content: ""; position: absolute; left: 0; top: -7px; width: 46%; height: 9px; border-radius: 3px 3px 0 0; background: #c2ad84; }
.dk .sil.s::after { content: ""; position: absolute; left: 14px; right: 14px; top: 18px; height: 74px; background: repeating-linear-gradient(180deg, rgba(36,31,24,.22) 0 1px, transparent 1px 9px); }
.dk .sil.n::after { content: ""; position: absolute; left: 12px; right: 12px; top: 14px; height: 52px; background: repeating-linear-gradient(180deg, rgba(36,31,24,.16) 0 1px, transparent 1px 9px); }

/* ---------- the pocket case file ---------- */

.dk.mob {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  background: linear-gradient(178deg, #0b1417, #070c0e 60%, #0a1315);
  overflow: hidden;
}
.dk.mob .stbar { display: flex; justify-content: space-between; padding: 14px 18px 6px; font-family: var(--mono); font-size: 10px; color: #7fa79a; }
.dk.mob .mhead { padding: 2px 18px 10px; }
.dk.mob .mhead .k { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.dk.mob .mhead h1 { margin: 5px 0 0; font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--paper); }
.dk.mob .ev-back { background: none; border: 0; padding: 2px 0 4px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.dk.mob .msearch { margin: 0 16px 12px; padding: 11px 13px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #7fa79a; }
.dk.mob .mlist { flex: 1; padding: 0 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.dk.mob .mrow {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 11px; border-radius: 14px; background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07); text-align: left; cursor: pointer; font-family: inherit;
}
.dk.mob .mrow .cov { height: 54px; border-radius: 9px; background: linear-gradient(168deg, #2b3339, #0b1013); position: relative; overflow: hidden; }
.dk.mob .mrow .cov::after { content: ""; position: absolute; inset: 0; background: radial-gradient(58% 68% at 66% 24%, rgba(255,217,160,.42), transparent 70%); }
.dk.mob .mrow .nm { font-family: var(--serif); font-size: 14.5px; color: var(--paper); }
.dk.mob .mrow .ct { margin-top: 3px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dk.mob .mrow .go { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(201,162,39,.42); display: grid; place-items: center; color: var(--lamp); font-size: 11px; }
.dk.mob .msec { margin-top: 8px; }
.dk.mob .msec .k { font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); padding: 0 2px 9px; }
.dk.mob .mrail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.dk.mob .mfold { flex: 0 0 108px; height: 120px; border-radius: 3px 9px 9px 9px; padding: 24px 9px 20px; position: relative; text-align: left;
  background: linear-gradient(168deg, #d9c9a6, #bda379); box-shadow: 0 12px 22px rgba(0,0,0,.5); border: 0; cursor: pointer; font-family: inherit; }
.dk.mob .mfold::before { content: ""; position: absolute; left: 0; top: -6px; width: 46%; height: 8px; border-radius: 3px 3px 0 0; background: #cdb98f; }
.dk.mob .mfold .nm { display: block; font-family: var(--serif); font-size: 10.5px; line-height: 1.25; color: #241f18; }
.dk.mob .mfold .ct { position: absolute; left: 9px; bottom: 8px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; text-transform: uppercase; color: #5b5344; }
.dk.mob .mpbar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; margin: 9px 0 12px; }
.dk.mob .mpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass-lo), var(--lamp)); }
.dk.mob .mchap { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 12px; color: #9aa3a6; }
.dk.mob .mchap span { font-family: var(--mono); font-size: 8.5px; color: var(--brass); }
.dk.mob .mchap b { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.dk.mob .mbubble { margin-top: 8px; padding: 9px 11px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 12px; line-height: 1.45; color: #d7e8e2; }
.dk.mob .msheet { padding: 10px 12px 8px; border-radius: 16px 16px 0 0; background: rgba(16,24,26,.96); border-top: 1px solid rgba(255,255,255,.09); }
.dk.mob .mgrab { width: 38px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); margin: 0 auto 10px; }
.dk.mob .mtabs { display: flex; gap: 7px; }
.dk.mob .mtabs button { flex: 1; padding: 9px 4px; border-radius: 9px; border: 1px solid rgba(255,255,255,.1); background: none; font-size: 9.5px; letter-spacing: .06em; color: #8b9699; cursor: pointer; }
.dk.mob .mtabs button.on { border-color: rgba(255,217,160,.45); background: rgba(255,217,160,.1); color: var(--lamp); }
.dk.mob .mnav { display: flex; padding: 10px 8px 18px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(7,12,14,.9); }
.dk.mob .mnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; font-size: 9px; letter-spacing: .06em; color: #5f6b6e; cursor: pointer; }
.dk.mob .mnav button i { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; font-family: var(--mono); font-size: 8px; }
.dk.mob .mnav button.on { color: var(--lamp); }
.dk.mob .mnav button.on i { border-color: rgba(201,162,39,.55); box-shadow: 0 0 12px rgba(201,162,39,.3); }
.dk.mob .mtoast { position: fixed; left: 50%; bottom: 172px; transform: translateX(-50%); padding: 9px 14px; border-radius: 999px;
  border: 1px solid rgba(158,224,179,.45); background: rgba(16,34,26,.96); color: #c8f2d6; font-size: 11.5px; z-index: 40; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }

/* the tray's brass edge is decoration: it must never eat a click */
.dk .tray::before { pointer-events: none; }
.dk .tray > * { position: relative; z-index: 1; }

/* graded verdict: the board doesn't need to stretch */
.dk .boardwrap.graded { align-items: start; }
.dk .boardwrap.graded .cork { min-height: 210px; }
.dk .topbar .put { flex: 0 0 auto; white-space: nowrap; }

/* ---------- witness statements: the fifth thing on the table ---------- */

.dk .o-talk { left: 8%; bottom: 13%; width: 176px; transform: rotate(-1.2deg); }
.dk .o-talk .pad { display: block; height: 112px; border-radius: 3px; background: linear-gradient(168deg, #f2ecdc, #d9cdb4); box-shadow: 0 16px 26px rgba(0,0,0,.55); position: relative; }
.dk .o-talk .pad .lines { position: absolute; left: 12px; right: 12px; top: 22px; height: 62px; background: repeating-linear-gradient(180deg, rgba(36,31,24,.2) 0 1px, transparent 1px 10px); }
.dk .o-talk .pad .clipmark { position: absolute; right: 14px; top: -6px; width: 10px; height: 26px; border: 1.5px solid rgba(36,31,24,.45); border-radius: 5px; transform: rotate(8deg); }
.dk .o-talk .cap { position: absolute; left: 50%; transform: translateX(-50%); bottom: -20px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.42); white-space: nowrap; }

.dk .talk { width: 520px; display: flex; flex-direction: column; gap: 12px; }
.dk .talk-who { display: flex; align-items: baseline; gap: 10px; }
.dk .talk-who b { font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--paper); }
.dk .talk-who span { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dk .talk-prompt { margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink); }
.dk .talk-options { display: flex; flex-direction: column; gap: 9px; }
.dk .talk-ask { display: flex; flex-direction: column; gap: 7px; width: 100%; padding: 12px 14px; border-radius: 9px; text-align: left;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; font-family: inherit; }
.dk .talk-ask:hover { border-color: rgba(201,162,39,.45); background: rgba(201,162,39,.06); }
.dk .talk-ask .q { font-size: 12.5px; color: var(--chrome-ink); }
.dk .talk-ask.used { border-color: rgba(143,214,189,.3); background: rgba(143,214,189,.05); cursor: default; }
.dk .talk-ask .reply { font-size: 12.5px; line-height: 1.55; color: #cfe0da; padding-left: 11px; border-left: 2px solid rgba(143,214,189,.35); }
.dk .talk-ask .yield { font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--good, #9ee0b3); }

/* mobile: questions and answers */
.dk.mob .maskan { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); text-align: left; font-family: inherit; cursor: pointer; }
.dk.mob .maskan .q { font-size: 12px; color: var(--chrome-ink); }
.dk.mob .maskan.used { border-color: rgba(143,214,189,.3); background: rgba(143,214,189,.05); cursor: default; }
.dk.mob .maskan .r { font-size: 12px; line-height: 1.5; color: #cfe0da; padding-left: 10px; border-left: 2px solid rgba(143,214,189,.35); }
.dk.mob .maskan .y { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: #9ee0b3; }
.dk.mob .mtabs button { flex: 1 1 0; min-width: 0; }

.dk .talk .ev-back { align-self: flex-start; text-align: left; }

/* ---------- archive: fill the window with things that matter ---------- */

.dk .win.archive .body { display: flex; flex-direction: column; gap: 16px; justify-content: flex-start; }
.dk .arc-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.dk .arc-count { display: flex; align-items: baseline; gap: 9px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dk .arc-count b { font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: 0; color: var(--paper); font-weight: 500; }

.dk .arc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 16px; align-items: stretch; }
.dk .shelf { display: flex; flex-direction: column; gap: 9px; }
.dk .shelf .collections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dk .arc-grid .coll { display: flex; flex-direction: column; gap: 8px; padding: 0; background: none; border: none; }
.dk .arc-grid .coll .cover { position: relative; display: block; height: 136px; border-radius: 9px 9px 3px 3px; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease; box-shadow: 0 12px 24px rgba(0,0,0,.45); }
.dk .arc-grid .coll:hover .cover { transform: translateY(-2px); box-shadow: 0 18px 30px rgba(0,0,0,.55); }
.dk .arc-grid .coll .cover .chip { position: absolute; top: 10px; left: 11px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.78); background: rgba(8,8,10,.46);
  border: 1px solid rgba(255,255,255,.16); padding: 3px 8px; border-radius: 999px; }
.dk .arc-grid .coll .cover .ttl { position: absolute; left: 12px; right: 12px; bottom: 11px; font-family: var(--serif);
  font-size: 17px; line-height: 1.15; color: #f4eddd; text-shadow: 0 1px 12px rgba(0,0,0,.8); }
.dk .arc-grid .coll .meta { display: flex; align-items: center; gap: 8px; }

.dk .arc-rail { display: flex; flex-direction: column; gap: 9px; padding-left: 16px; border-left: 1px solid var(--line); }
.dk .arc-rail .k { margin-top: 4px; }
.dk .rcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.028); text-align: left; cursor: pointer;
  font-family: inherit; transition: border-color .15s ease, background .15s ease; }
.dk .rcard:hover { border-color: rgba(201,162,39,.42); background: rgba(201,162,39,.07); }
.dk .rcard .t { font-family: var(--serif); font-size: 14.5px; line-height: 1.25; color: var(--paper); }
.dk .rcard .n { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--muted); align-self: start; }
.dk .rcard .c { grid-column: 1 / -1; font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.4); }
.dk .rcard .pbar { grid-column: 1 / -1; display: block; height: 3px; margin-top: 6px; border-radius: 3px;
  background: rgba(255,255,255,.08); overflow: hidden; }
.dk .rcard .pbar i { display: block; height: 100%; background: var(--accent, #c9a227); }
.dk .cont-card { border-color: rgba(201,162,39,.38); background: rgba(201,162,39,.08); }

.dk .arc-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.34); }

/* the shelf owns the height it is given */
.dk .win.archive .body { min-height: 0; }
.dk .arc-grid { flex: 1 1 auto; min-height: 0; }
.dk .shelf { min-height: 0; }
.dk .shelf .collections { flex: 1 1 auto; min-height: 0; grid-auto-rows: 1fr; }
.dk .arc-grid .coll { min-height: 0; }
.dk .arc-grid .coll .cover { height: 100%; min-height: 168px;
  background-image:
    radial-gradient(120% 90% at 22% 12%, rgba(255,255,255,.14), transparent 60%),
    repeating-linear-gradient(63deg, rgba(255,255,255,.045) 0 1px, transparent 1px 9px); }
.dk .arc-grid .coll.c2 .cover { background-image:
    radial-gradient(120% 90% at 70% 8%, rgba(156,204,216,.18), transparent 62%),
    repeating-linear-gradient(-58deg, rgba(255,255,255,.04) 0 1px, transparent 1px 10px); }
.dk .arc-grid .coll.c3 .cover { background-image:
    radial-gradient(90% 80% at 50% 0%, rgba(201,162,39,.16), transparent 65%),
    repeating-linear-gradient(74deg, rgba(255,255,255,.04) 0 1px, transparent 1px 8px); }

.dk .arc-rail { min-height: 0; }
.dk .caselist { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: auto; }
.dk .lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px;
  border: none; border-radius: 6px; background: none; text-align: left; cursor: pointer; font-family: inherit; }
.dk .lrow:hover { background: rgba(255,255,255,.05); }
.dk .lrow .t { font-size: 12.5px; color: rgba(255,255,255,.76); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk .lrow .n { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.38); }

/* covers stay covers; the case files carry the rest of the shelf */
.dk .shelf .collections { grid-auto-rows: auto; }
.dk .arc-grid .coll .cover { height: 186px; min-height: 0; }
.dk .shelf { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dk .shelf .casegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; align-content: start;
  min-height: 0; overflow: auto; padding-right: 2px; }
.dk .casecard { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px 11px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  text-align: left; cursor: pointer; font-family: inherit; transition: border-color .15s ease, transform .15s ease; }
.dk .casecard:hover { border-color: rgba(201,162,39,.45); transform: translateY(-1px); }
.dk .casecard .tab { width: 26px; height: 20px; flex: 0 0 auto; border-radius: 2px 3px 2px 2px;
  background: linear-gradient(165deg, #e6d7b0, #c3ad82); box-shadow: 0 3px 8px rgba(0,0,0,.45); position: relative; }
.dk .casecard .tab::before { content: ''; position: absolute; left: 0; top: -4px; width: 12px; height: 5px;
  border-radius: 2px 2px 0 0; background: #d9c69c; }
.dk .casecard .info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.dk .casecard .nm { font-family: var(--serif); font-size: 13.5px; line-height: 1.25; color: var(--paper);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk .casecard .sub2 { font-family: var(--mono); font-size: 10px; letter-spacing: .07em; color: rgba(255,255,255,.42);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk .casecard .stamp { flex: 0 0 auto; font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.34); border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; padding: 3px 7px; }
.dk .casecard .stamp.warm { color: #d8c07a; border-color: rgba(201,162,39,.5); }

.dk .shelf .casegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }

.dk .casecard .nm { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; text-overflow: clip; }
.dk .arc-stats { display: flex; flex-direction: column; gap: 7px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: rgba(255,255,255,.02); }
.dk .arc-stats span { display: flex; align-items: baseline; gap: 7px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.42); }
.dk .arc-stats b { font-family: var(--serif); font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--paper); font-weight: 500; }

/* ---------- the desk: composed, not scattered ---------- */

.dk .o-file { left: 9%; top: 15%; }
.dk .o-phone { left: 40%; top: 8%; }
.dk .o-docs { right: 13%; top: 16%; }
.dk .o-talk { left: 13%; bottom: 16%; }
.dk .o-prints { right: 18%; bottom: 15%; }
.dk .o-file .f .stamp { left: 12px; right: 12px; bottom: 11px; font-size: 10px; line-height: 1.3; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(36,31,24,.62); }
.dk .prop { position: absolute; z-index: 1; pointer-events: none; }
.dk .prop.pen { left: 45%; bottom: 27%; width: 152px; height: 7px; border-radius: 4px; transform: rotate(-13deg);
  background: linear-gradient(90deg, #23282b, #7b8288 55%, #262b2e); box-shadow: 0 10px 16px rgba(0,0,0,.55); }
.dk .prop.pen::after { content: ''; position: absolute; right: -9px; top: 1px; width: 11px; height: 5px;
  border-radius: 3px 1px 1px 3px; background: #b9a477; }
.dk .prop.ring { left: 62%; bottom: 13%; width: 104px; height: 38px; border-radius: 50%;
  border: 5px solid rgba(124,88,48,.2); transform: rotate(-7deg); filter: blur(.5px); }

.dk .casestrip { background: linear-gradient(180deg, rgba(14,17,18,.96), rgba(9,11,12,.96)); border-left: 1px solid var(--line);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.dk .casestrip .chapters { flex: 1 1 auto; overflow: auto; }
.dk .casestrip .peopleline { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: rgba(255,255,255,.02); }
.dk .casestrip .peopleline .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.4); }
.dk .casestrip .peopleline .v { font-size: 12px; color: rgba(255,255,255,.72); }

/* ---------- holding an object: one physical thing, one caption bar ---------- */

.dk .stage .sil { display: none; }
.dk .stage .grain { opacity: .5; }
.dk .stage .held { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  width: 100%; height: 100%; }
.dk .stage .held .tray { min-height: 0; max-height: 66vh; overflow: auto; }
.dk .stage .held .src { position: static; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  width: auto; max-width: min(760px, 92vw); padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px;
  background: rgba(10,12,13,.72); backdrop-filter: blur(6px); }
.dk .stage .held .src .k { flex: 0 0 auto; margin: 0; }
.dk .stage .held .src .t { font-size: 15px; }
.dk .stage .held .src .m { margin: 0; }
.dk .stage .held .src .filed { margin-left: auto; }
.dk .stage .held .src .same { display: none; }
.dk .stage .held .src .appchips { flex-basis: 100%; }

/* the caption plate belongs to the desk, not to the object */
.dk .stage .held { justify-content: flex-start; padding-top: 5vh; }
.dk .stage .held .src { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); }
.dk .stage .held .tray { max-height: 62vh; }

/* each object keeps its own physical edge when picked up */
.dk .stage .tray { padding: 0; background: none; border: none; }
.dk .stage .tray.t-file { padding: 14px; border-radius: 6px; background: linear-gradient(168deg, #c9b58c, #a8916a);
  box-shadow: 0 30px 60px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.14); }
.dk .stage .tray.t-docs { padding: 12px; border-radius: 3px; background: linear-gradient(168deg, #f0e7d4, #d3c4a6);
  box-shadow: 0 28px 54px rgba(0,0,0,.66); }
.dk .stage .tray.t-prints { padding: 10px; border-radius: 3px; background: #efe6d2; box-shadow: 0 28px 54px rgba(0,0,0,.66); }
.dk .stage .tray.t-talk { padding: 12px; border-radius: 3px; background: linear-gradient(168deg, #f2ecdc, #d9cdb4);
  box-shadow: 0 28px 54px rgba(0,0,0,.66); }
.dk .stage .tray.t-phone { background: none; }

/* the desk behind stays a desk, not a pile of grey boxes */
.dk .stage .sil { opacity: .22; filter: brightness(.5) saturate(.35); }

/* the top bar keeps its own button inside the window */
.dk .topbar { padding-right: 22px; }
.dk .topbar .put { max-width: none; }

/* a folder edge around a dark insert — text stays legible */
.dk .stage .tray.t-file { padding: 0; border-radius: 8px; background: linear-gradient(168deg, #c9b58c, #9f8763);
  border: 11px solid #c3ae85; box-shadow: 0 30px 60px rgba(0,0,0,.72); }
.dk .stage .tray.t-docs { padding: 0; border-radius: 4px; background: #b8a888; border: 9px solid #efe6d2;
  box-shadow: 0 28px 54px rgba(0,0,0,.68); }
.dk .stage .tray.t-prints { padding: 0; border-radius: 4px; background: #b8a888; border: 9px solid #efe6d2;
  box-shadow: 0 28px 54px rgba(0,0,0,.68); }
.dk .stage .tray.t-talk { padding: 0; border-radius: 4px; background: #b8a888; border: 9px solid #f2ecdc;
  box-shadow: 0 28px 54px rgba(0,0,0,.68); }
.dk .stage .held .src { position: static; transform: none; margin-top: 18px; }
.dk .stage .held { justify-content: center; padding-top: 0; }

/* the folder holds a dark page, the folder edge stays manila */
.dk .stage .tray.t-file .ledgerheld { background: linear-gradient(180deg, #141a1e, #0e1316); border-radius: 3px;
  padding: 22px 24px 18px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.dk .stage .tray.t-file .ledgerheld .k { color: rgba(255,255,255,.42); }
.dk .stage .tray.t-file .ledgerheld .strip-h { color: #f2ece0; }
.dk .stage .held[data-held='file'] .src .filed { display: none; }

.dk .tray[data-held='file'] + .src .filed { display: none; }

/* ---------- legibility floor: nothing readable ships under 10px ---------- */
.dk { --lbl: 10.5px; }
.dk .who, .dk .ct, .dk .fine, .dk .k, .dk .tag, .dk .cap, .dk .hint, .dk .backhint, .dk .filed,
.dk .tally, .dk .stamp, .dk .chip, .dk .appchips .chip, .dk .dock i, .dk .icons .lb, .dk .src .m,
.dk .src .k, .dk .src .same, .dk .casestrip .k, .dk .casestrip .accuse, .dk .chapter .n,
.dk .chapters .ch, .dk .rcard .c, .dk .rcard .n, .dk .casecard .sub2, .dk .casecard .stamp,
.dk .arc-count, .dk .lrow .n, .dk .arc-stats span, .dk .peopleline .k, .dk .citebox .k,
.dk .cork .pc b, .dk .talk-who span, .dk .talk-ask .yield, .dk .o-prints .cap, .dk .o-docs .cap,
.dk.mob .ct, .dk.mob .k, .dk.mob .mhead .k, .dk.mob .mnav button, .dk.mob .mtabs button,
.dk.mob .maskan .y { font-size: var(--lbl); }
.dk .o-file .f .stamp, .dk .rcard .pbar, .dk .pbar { font-size: 10px; }

.dk .o-phone .bub.empty { color: rgba(215,232,226,.45); font-style: italic; }
.dk .o-docs .sheet .head { position: absolute; left: 12px; top: 8px; right: 12px; font-family: var(--mono); font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(36,31,24,.5); }
.dk .casestrip .chapters { flex: 0 0 auto; overflow: visible; }
.dk .casestrip .desklist { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
.dk .casestrip .desklist .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.4); }
.dk .casestrip .desklist .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,.7); }
.dk .casestrip .desklist .row span:last-child { font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  color: rgba(255,255,255,.4); }
.dk .prop.ring { left: 55%; }

.dk .casestrip .desklist { margin-top: 0; }
.dk .casestrip .gobtn.small { margin-top: auto; }
.dk .o-docs .sheet::before { content: 'SHEET'; position: absolute; left: 12px; top: 9px; font-family: var(--mono);
  font-size: 10px; letter-spacing: .14em; color: rgba(36,31,24,.42); }

/* mobile store header, search and thumbnails */
.dk.mob .msearch input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--chrome-ink); font-family: inherit; font-size: 13px; }
.dk.mob .msearch input::placeholder { color: rgba(255,255,255,.34); }
.dk.mob .mrow .cov { width: 52px; height: 40px; border-radius: 3px; flex: 0 0 auto; }
.dk.mob .mrow .cov.folio { background: linear-gradient(168deg, #e6d7b0, #b9a179); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); position: relative; }
.dk.mob .mrow .cov.folio::after { content: ''; position: absolute; left: 0; top: -4px; width: 22px; height: 5px;
  border-radius: 2px 2px 0 0; background: #d6c199; }
.dk.mob .mhead.casehead { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: baseline; }
.dk.mob .mhead.casehead h1 { grid-column: 1 / -1; }
.dk.mob .mhead.casehead .k { grid-column: 1 / -1; }
.dk.mob .mhead.casehead .ev-back { justify-self: start; }

.dk.mob .mrow.skel { height: 62px; border-style: dashed; opacity: .5;
  background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03));
  background-size: 200% 100%; animation: dksh 1.4s linear infinite; }
@keyframes dksh { from { background-position: 0 0; } to { background-position: -200% 0; } }

/* last stragglers under the legibility floor */
.dk .topbar .put { font-size: 10.5px; }
.dk .o-phone .bub, .dk .o-phone .bub.empty { font-size: 10px; }
.dk .obj .cap { font-size: 10.5px; }
.dk .casestrip .chapter .n, .dk .casestrip .ch .n { font-size: 10px; }
.dk.mob .ct, .dk.mob .k { font-size: 10.5px; }
.dk.mob .mfold .ct, .dk.mob .mrow .ct { font-size: 10.5px; }
.dk.mob .mfold .nm { font-size: 13px; }
.dk.mob .stbar span { font-size: 10.5px; }
.dk .casecard { min-height: 58px; }

.dk.mob .msec .k, .dk.mob .mhead .k { font-size: 10.5px; }

.dk.mob .mtabs button { font-size: 10.5px; }
.dk.mob .mnav button { font-size: 10.5px; }
.dk .arc-grid .casecard { align-self: stretch; }

.dk .crest-big .mark { width: 54px; height: 54px; border-radius: 13px; box-shadow: 0 10px 22px rgba(0,0,0,.55); }
.dk .topbar .crest .mini { width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 7px; }

/* ---------- the machine: taskbar, draggable windows, context menu ---------- */

.dk .taskbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 12px; background: linear-gradient(180deg, rgba(16,22,25,.96), rgba(7,10,11,.98));
  border-top: 1px solid rgba(201,162,39,.22); box-shadow: 0 -18px 34px rgba(0,0,0,.55); }
.dk .tb-start { display: flex; align-items: center; gap: 9px; padding: 6px 13px 6px 8px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.12); background: linear-gradient(168deg, rgba(46,58,63,.9), rgba(14,20,23,.9));
  color: #cfd6d8; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.dk .tb-start img { border-radius: 4px; }
.dk .tb-start.on, .dk .tb-start:hover { border-color: rgba(201,162,39,.5); color: var(--lamp); }
.dk .tb-wins { display: flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.dk .tb-win { max-width: 260px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03); color: #a8b1b4; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.dk .tb-win.on { color: var(--lamp); border-color: rgba(201,162,39,.45); background: rgba(201,162,39,.1); }
.dk .tb-right { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; color: rgba(255,255,255,.6); }
.dk .tb-right .clock { color: #f0ece2; font-size: 12px; letter-spacing: .04em; }
.dk .tb-right .date { color: rgba(255,255,255,.4); }

.dk .win.focus { border-color: rgba(201,162,39,.34); box-shadow: 0 40px 80px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.1); }
.dk .win .wctl { margin-left: 8px; width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: #9aa3a6; font-size: 13px; line-height: 1; cursor: pointer; }
.dk .win .wctl:hover { color: #f0ece2; border-color: rgba(201,162,39,.5); }
.dk .win .tb { user-select: none; touch-action: none; }

.dk .ctxmenu { position: fixed; z-index: 40; width: 208px; padding: 6px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(26,34,38,.98), rgba(10,14,16,.99)); border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 26px 50px rgba(0,0,0,.7); }
.dk .ctxmenu button { display: block; width: 100%; padding: 8px 10px; border-radius: 6px; border: none; background: none;
  text-align: left; color: #cfd6d8; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; cursor: pointer; }
.dk .ctxmenu button:hover { background: rgba(201,162,39,.14); color: var(--lamp); }
.dk .win.archive { bottom: 58px; }

/* the shelf packs from the top: no stretched covers, no gap before case files */
.dk .shelf .collections { flex: 0 0 auto; align-content: start; }
.dk .shelf { justify-content: flex-start; }
.dk .shelf .casegrid { flex: 0 0 auto; align-content: start; }
.dk .arc-grid { align-content: start; }

/* ---------- drawer: explicit, so nothing about it depends on cascade luck ---------- */

.dk .win.drawer { height: 300px; background: linear-gradient(176deg, rgba(22,30,33,.985), rgba(9,13,15,.99)); }
.dk .win.drawer .body { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 18px; padding: 15px 17px;
  height: calc(100% - 34px); box-sizing: border-box; }
.dk .win.drawer .folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: min-content;
  gap: 14px; align-content: start; }
.dk .win.drawer .folder { display: block; width: 100%; min-height: 84px; padding: 24px 13px 13px; border: none;
  border-radius: 4px 10px 10px 10px; text-align: left; cursor: pointer; font-family: inherit;
  background: linear-gradient(168deg, #d9c9a6, #c2ae86); color: #241f18;
  box-shadow: 0 14px 26px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.4); }
.dk .win.drawer .folder .nm { display: block; font-family: var(--serif); font-size: 13.5px; line-height: 1.25; color: #241f18; }
.dk .win.drawer .folder .row2 { display: flex; align-items: center; justify-content: space-between; margin-top: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #5b5344; }
.dk .win.drawer .folder.sel { outline: 2px solid rgba(201,162,39,.9); outline-offset: 3px; }
.dk .win.drawer .rail { display: flex; flex-direction: column; gap: 11px; overflow: auto; }
.dk .win.preview { background: linear-gradient(176deg, rgba(22,30,33,.985), rgba(9,13,15,.99)); }

/* a window is a column: title bar, then body — never two columns of chrome */
.dk .win.archive, .dk .win.drawer, .dk .win.preview { display: flex; flex-direction: column; }
.dk .win > .tb { flex: 0 0 34px; width: 100%; box-sizing: border-box; }
.dk .win > .body { flex: 1 1 auto; min-height: 0; width: 100%; box-sizing: border-box; }

/* ---------- windows own their box: resize edges and maximise ---------- */

.dk .win.drawer, .dk .win.preview { left: 0; top: 0; right: auto; bottom: auto; }
.dk .win .rz { position: absolute; z-index: 3; }
.dk .win .rz-e { top: 34px; right: 0; bottom: 10px; width: 8px; cursor: ew-resize; }
.dk .win .rz-s { left: 10px; right: 10px; bottom: 0; height: 8px; cursor: ns-resize; }
.dk .win .rz-se { right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }
.dk .win .rz-se::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px;
  border-right: 2px solid rgba(255,255,255,.3); border-bottom: 2px solid rgba(255,255,255,.3); }
.dk .win .wctl { flex: 0 0 auto; }
.dk .win.drawer .body, .dk .win.preview .body { overflow: auto; }

/* ---------- the accusation board: a wall you pin a case to ---------- */

.dk .stage.accusations { display: flex; align-items: stretch; padding: 12px 24px 34px; }
.dk .boardwrap { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px;
  align-items: stretch; min-height: 0; }
.dk .boardwrap .cork { height: auto; min-height: 0; overflow: auto; border-radius: 10px; }
.dk .boardwrap .cork .pc { position: relative; }
.dk .boardwrap .cork .pc.missing { background: rgba(20,18,14,.55); border: 1px dashed rgba(201,162,39,.35);
  box-shadow: none; }
.dk .citebox { display: flex; flex-direction: column; gap: 11px; min-height: 0; overflow: auto; padding-right: 2px; }
.dk .citebox .gobtn { margin-top: auto; width: 100%; height: 44px; letter-spacing: .14em; }
.dk .citebox .gobtn:not([disabled]) { background: linear-gradient(180deg, rgba(201,162,39,.95), rgba(150,118,26,.95));
  color: #14100a; border-color: rgba(255,226,150,.7); box-shadow: 0 12px 24px rgba(0,0,0,.5); }
.dk .citebox .note { margin-top: 2px; }
.dk .citebox .req { text-align: left; }
.dk .citebox .req.notmet { opacity: .55; }

/* accusation board: states you can read at a glance */
.dk .boardwrap { max-width: 1280px; margin: 0 auto; }
.dk .boardwrap .cork { align-content: start; }
.dk .cork .pc .st { display: block; margin-top: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(36,31,24,.55); }
.dk .cork .pc.want { background: rgba(18,16,13,.6); border: 1px dashed rgba(201,162,39,.4); box-shadow: none; }
.dk .cork .pc.want b { color: #cfc3a6; }
.dk .cork .pc.want .st { color: rgba(207,195,166,.55); }
.dk .cork .pc.want .pin { opacity: .45; }
.dk .cork .pc.have { background: linear-gradient(168deg, #f3ead4, #ded1b4); }
.dk .citebox .sus { position: relative; }
.dk .citebox .sus.on { border-color: rgba(201,162,39,.85); background: rgba(201,162,39,.14); }
.dk .citebox .sus.on::after { content: '✓'; position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  color: var(--lamp); font-size: 13px; }
.dk .citebox .sus .rl { font-size: 10.5px; }
.dk .citebox .req .s { font-size: 10.5px; }
.dk .citebox .k { font-size: 10.5px; }

/* the wall is balanced, not top-heavy: cards centre on it */
.dk .boardwrap { max-height: 100%; align-self: center; }
.dk .boardwrap .cork { align-content: center; }
.dk .boardwrap .cork .pc { height: fit-content; }

/* the verdict is a report, not a sticky note */
.dk .boardwrap.graded { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.dk .boardwrap.graded .cork { display: flex; align-items: flex-start; justify-content: center; padding: 34px 30px;
  min-height: 0; height: auto; }
.dk .boardwrap.graded .pc.verdict { width: 100%; max-width: 760px; padding: 30px 34px 26px; border-radius: 3px;
  display: flex; flex-direction: column; gap: 12px; transform: none; }
.dk .boardwrap.graded .pc.verdict .vh { font-family: var(--serif); font-size: 25px; line-height: 1.15; color: #241f18; }
.dk .boardwrap.graded .pc.verdict .vt { font-size: 14.5px; line-height: 1.62; color: #38301f; }
.dk .boardwrap.graded .pc.verdict .vf { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(36,31,24,.5); margin-top: 4px; }
.dk .boardwrap.graded .pc.verdict.want { background: rgba(18,16,13,.66); }
.dk .boardwrap.graded .pc.verdict.want .vh { color: #e7dcc4; }
.dk .boardwrap.graded .pc.verdict.want .vt { color: #c9bda4; }

/* ---------- the icon family ---------- */

.dk .ico { display: inline-block; vertical-align: -0.18em; }
.dk .icon .g { display: grid; place-items: center; color: #cdbb84; }
.dk .icon .g .ico { filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.dk .icon.on .g { color: var(--lamp); border-color: rgba(201,162,39,.5); }
.dk .icon .g::after { display: none; }
.dk .obj .cap { display: inline-flex; align-items: center; gap: 6px; }
.dk .obj .cap .ico { color: rgba(255,217,160,.62); }
.dk .obj:hover .cap .ico { color: var(--lamp); }
.dk.mob .mtabs button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.dk.mob .mtabs button .ico { color: rgba(255,255,255,.45); }
.dk.mob .mtabs button.on .ico { color: var(--lamp); }
.dk.mob .mnav button { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dk.mob .mnav button .ico { color: rgba(255,255,255,.4); }
.dk.mob .mnav button.on .ico { color: var(--lamp); }

/* ---------- the terminal skin: a CRT that answers this case ---------- */

.dk.term { position: fixed; inset: 0; display: grid; place-items: center; padding: 26px;
  background: radial-gradient(120% 90% at 50% 0%, #0a1410, #050807 70%); }
.dk.term .scan { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.32) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; }
.dk.term .scan::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(72% 62% at 50% 42%, transparent 55%, rgba(0,0,0,.62)); }
.dk.term .crt { position: relative; width: min(1080px, 100%); height: min(720px, 100%); border-radius: 14px;
  background: linear-gradient(180deg, #06100c, #030806); border: 1px solid rgba(120,220,170,.28);
  box-shadow: 0 40px 90px rgba(0,0,0,.8), inset 0 0 90px rgba(60,200,140,.07), 0 0 0 1px rgba(0,0,0,.6); overflow: hidden; }
.dk.term .tshell { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%;
  font-family: var(--mono); color: #8fe6b4; text-shadow: 0 0 8px rgba(120,240,180,.35); }
.dk.term .thead { display: flex; align-items: center; gap: 12px; padding: 11px 16px; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(150,230,190,.62);
  border-bottom: 1px solid rgba(120,220,170,.18); background: rgba(10,30,22,.5); }
.dk.term .thead .path { color: #b9f4d3; text-transform: none; letter-spacing: .02em; }
.dk.term .thead .sp { flex: 1; }
.dk.term .thead button { padding: 4px 11px; border-radius: 5px; border: 1px solid rgba(120,220,170,.4);
  background: rgba(120,220,170,.08); color: #b9f4d3; font-family: inherit; font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.dk.term .thead button:hover { background: rgba(120,220,170,.18); }
.dk.term .tout { flex: 1 1 auto; overflow: auto; padding: 18px 20px; font-size: 13px; line-height: 1.62;
  white-space: pre-wrap; }
.dk.term .tl.head { color: #d6ffe7; letter-spacing: .04em; }
.dk.term .tl.in { color: #cfe9ff; }
.dk.term .tl.good { color: #9dffc4; }
.dk.term .tl.warn { color: #ffc9a0; }
.dk.term .tl.out { color: rgba(143,230,180,.86); }
.dk.term .tprompt { display: flex; align-items: center; gap: 10px; padding: 12px 20px 16px;
  border-top: 1px solid rgba(120,220,170,.18); background: rgba(8,24,18,.6); }
.dk.term .tprompt .sig { color: #9dffc4; font-size: 12.5px; white-space: nowrap; }
.dk.term .tprompt input { flex: 1 1 auto; background: none; border: none; outline: none; color: #d6ffe7;
  font-family: inherit; font-size: 13px; letter-spacing: .02em; }
.dk.term .tprompt .caret { width: 8px; height: 15px; background: #9dffc4; animation: blink 1.05s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.dk .put.skin { margin-right: 8px; }

.dk.term .tprompt input { caret-color: #9dffc4; }

/* mobile file tab: the case's own material, not a void */
.dk.mob .mchip { display: block; padding: 9px 12px; margin-top: 6px; border-radius: 9px; border: 1px solid rgba(201,162,39,.24);
  background: rgba(201,162,39,.07); font-size: 12.5px; color: #eadfc6; }
.dk.mob .maccuse { padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.dk.mob .maccuse p { margin: 0 0 10px; font-family: var(--serif); font-size: 14.5px; line-height: 1.45; color: #eadfc6; }
.dk.mob .maccuse .mstate { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.45); }
.dk.mob .maccuse .mstate.ready { color: #e2c96f; }
.dk.mob .maccuse .mopts { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0 9px; }
.dk.mob .maccuse .mo { padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  font-size: 12px; color: rgba(255,255,255,.72); }
.dk.mob .maccuse .mnote { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.45); }


/* ══ the device, as an object ═════════════════════════════════════════════════
   Solstice 7: a handset with a lock, a home screen built from the case's own
   installed apps, and one screen per record. Sizes are tuned for the 356px-wide
   frame the desk holds; nothing here scales a desktop down. */

/* The handset is as tall as the desk allows: a phone that scrolls inside a clamping tray
   loses its status bar and its keypad, which is the whole object. */
.dk .stage .tray.t-device { max-height: calc(100vh - 300px); overflow: visible; }
.dk .phone.dv-phone { --h: clamp(500px, calc(100vh - 312px), 700px); height: var(--h); width: calc(var(--h) * 0.516);
  border-radius: 44px; padding: 10px;
  background: linear-gradient(158deg, #2b3037 0%, #101318 34%, #191c22 68%, #0a0c10 100%);
  box-shadow: inset 0 0 0 1px #33383f, 0 46px 90px -34px rgba(0,0,0,.92), inset 0 2px 0 rgba(255,255,255,.05); }
.dk .phone.dv-phone::before { content: ""; position: absolute; right: -3px; top: 168px; width: 3px; height: 62px;
  border-radius: 3px; background: linear-gradient(#2d323a, #14171c); box-shadow: 0 78px 0 0 #1a1d22; }
.dk .phone.dv-phone::after { content: ""; position: absolute; left: -3px; top: 146px; width: 3px; height: 96px;
  border-radius: 3px; background: linear-gradient(#2d323a, #14171c); }

.dv { position: relative; height: 100%; border-radius: 35px; overflow: hidden; display: flex; flex-direction: column;
  background: #0b0e11; color: #e6e8ee; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); text-align: left; }
.dv button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; text-align: left; }
.dv-wall { position: absolute; inset: 0; background: #0d1014 center/cover no-repeat; filter: saturate(.5) brightness(.42) contrast(1.06); }
.dv-wall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,8,10,.78), rgba(6,8,10,.44) 42%, rgba(6,8,10,.88)); }
.dv-status { position: relative; z-index: 3; flex: none; height: 30px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; font-family: var(--bc-font-mono, monospace); font-size: 9px; letter-spacing: .1em; color: rgba(233,237,244,.72); text-transform: lowercase; }
.dv-bar { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); width: 112px; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.3); z-index: 6; cursor: pointer; }

/* lock */
.dv-lockbody { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 22px 26px; color: rgba(233,237,244,.62); }
.dv-owner { margin-top: 8px; font-family: var(--bc-font-mono, monospace); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: rgba(233,237,244,.8); }
.dv-model { font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .18em; text-transform: uppercase; color: rgba(201,162,39,.82); margin-top: 4px; }
.dv-dots { display: flex; gap: 15px; margin: 34px 0 12px; }
.dv-dots i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.2px rgba(233,237,244,.55); }
.dv-dots i.on { background: #e9edf4; box-shadow: 0 0 10px rgba(233,237,244,.5); }
.dv-hint { font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .07em; line-height: 1.7; color: rgba(233,237,244,.4); text-align: center; max-width: 250px; }
.dv-candidates { margin-top: 12px; width: 100%; }
.dv-candidates .k { font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(201,162,39,.85); margin-bottom: 6px; }
.dv-cand { display: flex; gap: 8px; align-items: baseline; width: 100%; padding: 7px 9px; margin-bottom: 5px; border-radius: 6px;
  background: rgba(201,162,39,.07); box-shadow: inset 0 0 0 1px rgba(201,162,39,.24); }
.dv-cand b { font-family: var(--bc-font-mono, monospace); font-size: 12px; color: #efe2bd; letter-spacing: .1em; }
.dv-cand span { font-size: 9px; color: rgba(233,237,244,.5); line-height: 1.4; }
.dv-pad { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; width: 100%; }
.dv-pad button { height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; color: #f0f3f8;
  background: rgba(255,255,255,.045); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); transition: background .12s; }
.dv-pad button:hover { background: rgba(255,255,255,.1); }
.dv-pad button.del { font-family: var(--bc-font-mono, monospace); font-size: 9px; letter-spacing: .1em; color: rgba(233,237,244,.6); background: none; box-shadow: none; }
.dv-footline { min-height: 14px; margin-top: 10px; font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .08em;
  color: rgba(180,57,47,.9); text-align: center; line-height: 1.5; }
.shake-0 .dv-dots, .shake-1 .dv-dots { animation: dv-shake .28s ease; }
@keyframes dv-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* home */
.dv-home { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding: 6px 18px 22px; }
.dv-widget { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 6px; padding: 12px 13px;
  border-radius: 15px; background: rgba(14,17,21,.46); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.dv-widget .wt { font-size: 38px; line-height: .9; letter-spacing: -.03em; color: #f2f5f9; }
.dv-widget .wd { font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(233,237,244,.5); margin-top: 7px; }
.dv-widget .wr { text-align: right; }
.dv-widget .wr .k { font-family: var(--bc-font-mono, monospace); font-size: 6.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(233,237,244,.36); }
.dv-widget .wr .v { font-family: var(--bc-font-mono, monospace); font-size: 8.5px; color: rgba(240,243,248,.86); margin: 2px 0 6px; }
.dv-label { margin: 18px 2px 8px; font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(233,237,244,.36); }
.dv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px 8px; }
.dv-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; }
.dv-tile .ic { position: relative; z-index: 1; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  color: color-mix(in srgb, var(--accent, #8fbcc6) 72%, #ffffff 28%);
  background: color-mix(in srgb, var(--accent, #33565f) 22%, rgba(12,15,19,.9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 16px -12px rgba(0,0,0,.9); transition: transform .12s, box-shadow .12s; }
.dv-tile:hover .ic { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 12px 20px -12px rgba(0,0,0,.9); }
.dv-tile .nm { font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .02em; color: rgba(240,243,248,.88); }
.dv-tile.quiet .ic { color: rgba(233,237,244,.28); background: rgba(255,255,255,.04); }
.dv-tile.quiet .nm { color: rgba(240,243,248,.4); }
.dv-tile .badge { position: absolute; z-index: 3; top: -4px; right: 9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  display: grid; place-items: center; background: #d8dde6; color: #0b0d10; font-family: var(--bc-font-mono, monospace); font-size: 9px; font-weight: 700; box-shadow: 0 3px 7px rgba(0,0,0,.6); }
.dv-tile .loose { position: absolute; z-index: 3; top: 0; right: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: #c9a227; box-shadow: 0 0 8px rgba(201,162,39,.8); }
.dv-bin { display: flex; align-items: center; gap: 10px; margin-top: 16px; width: 100%; padding: 10px 11px; border-radius: 13px;
  background: rgba(14,17,21,.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.dv-bin .bi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  color: rgba(233,237,244,.34); background: rgba(255,255,255,.05); }
.dv-bin .bt { min-width: 0; }
.dv-bin .k { display: block; font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .15em; text-transform: uppercase; color: rgba(233,237,244,.38); }
.dv-bin .v { display: block; font-size: 9.5px; line-height: 1.5; color: rgba(240,243,248,.6); margin-top: 3px; }
.dv-bin.open { box-shadow: inset 0 0 0 1px rgba(201,162,39,.4); }
.dv-bin.open .bi { color: #d6b56a; }
.dv-homefoot { margin-top: auto; padding-top: 12px; font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(233,237,244,.28); text-align: center; }

/* app header */
.dv-ah { position: relative; z-index: 3; flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07); }
.dv-back { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: rgba(233,237,244,.62); flex: none; }
.dv-back:hover { background: rgba(255,255,255,.08); color: #fff; }
.dv-ah .ttl { font-family: var(--bc-font-mono, monospace); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: #e9edf4; }
.dv-ah .meta { margin-left: auto; font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .1em; color: rgba(233,237,244,.42); }

/* lists */
.dv-list { flex: 1; overflow-y: auto; padding-bottom: 4px; }
.dv-list::-webkit-scrollbar { width: 0; }
.dv-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.dv-row:hover { background: rgba(255,255,255,.035); }
.dv-row .av { width: 34px; height: 34px; border-radius: 50%; flex: none; background: #191d22 center/cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.dv-row .col { min-width: 0; flex: 1; display: block; }
.dv-row .t { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: #eceff4; }
.dv-row .t .time { margin-left: auto; font-family: var(--bc-font-mono, monospace); font-size: 8px; color: rgba(233,237,244,.4); letter-spacing: .05em; }
.dv-row .t .amt { margin-left: auto; font-family: var(--bc-font-mono, monospace); font-size: 10px; color: #dfe6ef; }
.dv-row .s { display: block; font-size: 9.5px; color: rgba(206,214,228,.55); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-row .who { display: inline-block; margin-top: 5px; font-family: var(--bc-font-mono, monospace); font-size: 6.5px; letter-spacing: .1em;
  text-transform: uppercase; color: #d6b56a; padding: 2px 5px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(201,162,39,.34); }
.dv-row .who.own { color: rgba(233,237,244,.5); box-shadow: inset 0 0 0 1px rgba(206,214,228,.2); }
.dv-row .dir { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #9ec4b0; background: rgba(60,90,74,.3); }
.dv-row .dir.missed { color: #d98a80; background: rgba(180,57,47,.22); }
.dv-row .livedot, .dv-row .mark.loose { width: 7px; height: 7px; border-radius: 50%; background: #c9a227; flex: none; box-shadow: 0 0 8px rgba(201,162,39,.7); }
.dv-row .mark.filed, .dv-rec .mark.filed, .dv-gallery .tick { font-family: var(--bc-font-mono, monospace); font-size: 6px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(143,214,189,.8); flex: none; }
.dv-empty { padding: 26px 18px; font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .1em; line-height: 1.8;
  text-transform: uppercase; color: rgba(233,237,244,.32); text-align: center; }
.dv-appfoot { flex: none; padding: 10px 14px 18px; border-top: 1px solid rgba(255,255,255,.06);
  font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .1em; line-height: 1.6; text-transform: uppercase;
  color: rgba(233,237,244,.3); text-align: center; }

/* recorder rows */
.dv-rec { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.dv-rec:hover { background: rgba(255,255,255,.035); }
.dv-rec .pi { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #e8ddcf;
  background: rgba(122,82,48,.26); box-shadow: inset 0 0 0 1px rgba(199,160,116,.3); }
.dv-rec .col { flex: 1; min-width: 0; display: block; }
.dv-rec .t { display: flex; align-items: baseline; font-size: 11.5px; color: #eceff4; }
.dv-rec .t .time { margin-left: auto; font-family: var(--bc-font-mono, monospace); font-size: 7px; color: rgba(233,237,244,.4); }
.dv-rec .s { display: block; font-size: 9px; font-style: italic; color: rgba(206,214,228,.5); margin-top: 3px; }
.dv-rec .wave.mini { display: flex; align-items: center; gap: 1.5px; height: 18px; margin-top: 7px; }
.dv-rec .wave.mini i { flex: 1; background: rgba(199,160,116,.4); border-radius: 1px; }

/* gallery */
.dv-gallery { flex: 1; overflow-y: auto; }
.dv-gallery .grouphdr { font-family: var(--bc-font-mono, monospace); font-size: 7px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(233,237,244,.36); padding: 12px 14px 7px; }
.dv-gallery .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 0 2px; }
.dv-gallery .cell { position: relative; aspect-ratio: 1; background: #14181d center/cover; overflow: hidden; padding: 0; }
.dv-gallery .cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dv-gallery .cell .blank { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #12161b 0 8px, #171c22 8px 16px); }
.dv-gallery .cell .tick { position: absolute; left: 4px; bottom: 4px; padding: 1px 3px; border-radius: 2px; background: rgba(8,10,12,.7); }

/* conversation */
.dv-convo { flex: 1; overflow-y: auto; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 7px; }
.dv-convo .daymark { align-self: center; font-family: var(--bc-font-mono, monospace); font-size: 7px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(233,237,244,.34); margin-bottom: 2px; }
.dv-convo .bubble { max-width: 82%; padding: 8px 10px; border-radius: 13px; font-size: 11px; line-height: 1.5; }
.dv-convo .bubble .tx { display: block; }
.dv-convo .bubble .stamp { display: block; font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .06em; color: rgba(233,237,244,.5); margin-top: 4px; }
.dv-convo .bubble.them { align-self: flex-start; background: #1a1f25; color: #e4e9f0; border-bottom-left-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.dv-convo .bubble.me { align-self: flex-end; background: #2c3a33; color: #e8f0ea; border-bottom-right-radius: 4px; box-shadow: inset 0 0 0 1px rgba(143,214,189,.16); }

/* photo viewer */
.dv-viewer { flex: 1; display: flex; flex-direction: column; background: #05070a; min-height: 0; }
.dv-viewer img { flex: 1; width: 100%; min-height: 0; object-fit: contain; background: #05070a; }
.dv-viewer .noimg { flex: 1; background: repeating-linear-gradient(135deg, #0c1014 0 9px, #10161b 9px 18px); }
.dv-facts { flex: none; padding: 11px 14px 16px; border-top: 1px solid rgba(255,255,255,.07); background: #0a0d10; }
.dv-facts .cap { font-size: 11px; color: #e7ebf2; line-height: 1.5; }
.dv-facts .tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.dv-facts .tag { font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .08em; text-transform: uppercase;
  color: #b9c2d0; padding: 3px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.dv-facts .when { margin-top: 9px; font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(201,162,39,.75); }

/* recording player */
.dv-player { flex: 1; overflow-y: auto; padding: 13px 14px 6px; }
.dv-player .k { font-family: var(--bc-font-mono, monospace); font-size: 7px; letter-spacing: .16em; text-transform: uppercase; color: rgba(233,237,244,.42); }
.dv-player .wave { display: flex; align-items: center; gap: 2px; height: 52px; margin: 12px 0; }
.dv-player .wave i { flex: 1; background: rgba(233,237,244,.26); border-radius: 1px; }
.dv-player audio { width: 100%; height: 30px; filter: saturate(.4) brightness(.9); }
.dv-player .dv-none { font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .1em; color: rgba(180,57,47,.8); padding: 8px 0; }
.dv-player .tr { margin-top: 8px; }
.dv-player .line { display: flex; gap: 9px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.05); }
.dv-player .line .at { font-family: var(--bc-font-mono, monospace); font-size: 8.5px; color: rgba(201,162,39,.8); padding-top: 2px; width: 28px; flex: none; }
.dv-player .line .txt { font-size: 10.5px; line-height: 1.55; color: rgba(228,233,240,.82); }
.dv-player .line .txt b { color: #fff; font-weight: 600; }
.dv-player .line .txt.quiet { color: rgba(228,233,240,.4); }

/* note + file */
.dv-note { margin: 14px; padding: 14px 14px 18px; border-radius: 3px; background: #efe6d2; color: #20130f;
  box-shadow: 0 12px 26px -14px #000; }
.dv-note .nt { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.dv-note .nb { font-family: var(--bc-font-mono, monospace); font-size: 10px; line-height: 1.8; white-space: pre-line; }
.dv-note .nst { font-family: var(--bc-font-mono, monospace); font-size: 6.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(32,19,15,.45); margin-top: 12px; }
.dv-filebody { flex: 1; overflow-y: auto; padding: 14px; font-family: var(--bc-font-mono, monospace); font-size: 10px;
  line-height: 1.9; color: rgba(230,232,238,.86); white-space: pre-line; }

/* generic detail */
.dv-detail { flex: 1; overflow-y: auto; padding: 16px 15px; }
.dv-detail .big { font-size: 18px; color: #eef1f6; letter-spacing: -.01em; }
.dv-detail .big .u { font-family: var(--bc-font-mono, monospace); font-size: 8px; letter-spacing: .12em; color: rgba(233,237,244,.45); text-transform: uppercase; }
.dv-detail .sub { font-family: var(--bc-font-mono, monospace); font-size: 8.5px; letter-spacing: .1em; color: rgba(233,237,244,.55); margin-top: 7px; text-transform: uppercase; }
.dv-detail .payer { display: inline-block; margin-top: 12px; padding: 4px 8px; border-radius: 4px; font-family: var(--bc-font-mono, monospace);
  font-size: 7.5px; letter-spacing: .12em; text-transform: uppercase; color: #d6b56a; box-shadow: inset 0 0 0 1px rgba(201,162,39,.34); }
.dv-detail .when { margin-top: 14px; font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .1em; color: rgba(233,237,244,.4); }
.dv-detail .pinrow { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.dv-detail .pinrow .pi { width: 8px; height: 8px; border-radius: 50%; background: #c9a227; margin-top: 4px; flex: none; box-shadow: 0 0 8px rgba(201,162,39,.7); }
.dv-detail .pinrow b { color: #eef1f6; font-weight: 600; }
.dv-detail .pinrow .note-dim { color: rgba(206,214,228,.5); font-size: 10px; }

/* health gap */
.dv-gap { margin: 10px 14px; padding: 9px 10px; border-radius: 5px; background: rgba(180,57,47,.07); box-shadow: inset 0 0 0 1px rgba(180,57,47,.28); }
.dv-gap .k { display: block; font-family: var(--bc-font-mono, monospace); font-size: 7px; letter-spacing: .14em; text-transform: uppercase; color: #d98a80; }
.dv-gap .v { display: block; font-size: 9.5px; color: #e2c8c4; margin-top: 4px; line-height: 1.5; }

/* map */
.dv-map { position: relative; flex: none; height: 226px; margin: 10px 12px 6px; border-radius: 6px; overflow: hidden;
  background:
    radial-gradient(circle at 30% 28%, rgba(51,86,95,.34), transparent 58%),
    radial-gradient(circle at 74% 64%, rgba(63,111,87,.24), transparent 52%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 28px),
    #0b1014; }
.dv-map .pin { position: absolute; transform: translate(-50%, -50%); padding: 0; }
.dv-map .pd { display: block; width: 10px; height: 10px; border-radius: 50%; background: #c9a227;
  box-shadow: 0 0 0 4px rgba(201,162,39,.18), 0 0 12px rgba(201,162,39,.55); }
.dv-map .pl { position: absolute; left: 14px; top: -6px; white-space: nowrap; font-family: var(--bc-font-mono, monospace);
  font-size: 7px; letter-spacing: .06em; color: rgba(233,237,244,.82); background: rgba(10,13,16,.82); padding: 3px 5px; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.dv-map .pin.label-left .pl { left: auto; right: 14px; }
.dv-map .mapempty { position: absolute; inset: 0; display: grid; place-items: center; }

.dv-force { margin-top: 9px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: center;
  font-family: var(--bc-font-mono, monospace); font-size: 7.5px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(233,237,244,.62); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.dv-force:hover { color: #eef1f6; background: rgba(255,255,255,.09); }

.dk .stage .held .src .appchips { flex: 0 0 auto; display: flex; align-items: center; }
.dk .stage .held .src .appchips .chip { flex: 0 0 auto; height: 26px; min-height: 0; padding: 0 12px; border-radius: 13px;
  display: inline-grid; place-items: center; font-family: var(--bc-font-mono, monospace); letter-spacing: .1em;
  font-size: 10px; text-transform: uppercase; color: rgba(233,237,244,.62);
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.dk .stage .held .src .appchips .chip.on { color: #0d1013; background: #c9a227; box-shadow: none; }


/* ── the device on a phone: no handset inside a handset ───────────────────────
   The player is already holding a phone, so the case's phone is full-bleed: the
   app grid is the landing, and every screen keeps the same shapes it has on the
   desk, only larger and in thumb reach. */

.dk.mob .mdevice { flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; }
.dk.mob .mdevice .dv-bare { flex: 1 1 auto; min-height: 0; height: auto; border-radius: 0; box-shadow: none;
  background: linear-gradient(178deg, #0c1114, #080d10 62%); }
.dk.mob .mdevice .dv-bare .dv-status,
.dk.mob .mdevice .dv-bare .dv-bar { display: none; }
.dk.mob .mdevice .dv-bare .dv-wall { opacity: .5; }

/* the grid is the phone's home screen, so the tiles get room to be tapped */
.dk.mob .mdevice .dv-home { padding: 10px 18px 16px; }
.dk.mob .mdevice .dv-tile .ic { width: 60px; height: 60px; border-radius: 18px; }
.dk.mob .mdevice .dv-grid { gap: 20px 10px; }
.dk.mob .mdevice .dv-tile .nm { font-size: 9.5px; }
.dk.mob .mdevice .dv-widget .wt { font-size: 44px; }
.dk.mob .mdevice .dv-bin { margin-top: 18px; padding: 13px 12px; }
.dk.mob .mdevice .dv-bin .v { font-size: 10.5px; }
.dk.mob .mdevice .dv-ah { padding: 8px 14px 12px; }
.dk.mob .mdevice .dv-ah .ttl { font-size: 10.5px; }
.dk.mob .mdevice .dv-back { width: 32px; height: 32px; }
.dk.mob .mdevice .dv-row { padding: 13px 16px; }
.dk.mob .mdevice .dv-row .t { font-size: 12.5px; }
.dk.mob .mdevice .dv-row .s { font-size: 10.5px; }
.dk.mob .mdevice .dv-row .av { width: 38px; height: 38px; }
.dk.mob .mdevice .dv-convo .bubble { font-size: 12px; max-width: 84%; }
.dk.mob .mdevice .dv-appfoot { font-size: 8.5px; padding-bottom: 12px; }
.dk.mob .mdevice .dv-gallery .grid { gap: 3px; padding: 0 3px; }
.dk.mob .mdevice .dv-map { height: 250px; }
.dk.mob .mdevice .dv-lockbody { padding: 12px 26px 24px; }
.dk.mob .mdevice .dv-pad button { height: 52px; }
.dk.mob .mdevice .dv-widget .wr .v { font-size: 9.5px; }

/* the device takes the chrome back: on the phone's own screens the case header
   collapses to its identity so the apps get the height */
.dk.mob.dev .stbar { display: none; }
.dk.mob.dev .mhead.casehead { padding: 10px 18px 8px; }
.dk.mob.dev .mhead.casehead .ev-back { padding-bottom: 2px; }
.dk.mob.dev .mhead.casehead h1 { margin-top: 3px; font-size: 19px; }
.dk.mob.dev .mhead.casehead .k { margin-top: 3px; font-size: 8px; }


/* ── paper: the typed sheet, the print, the board, the ledger ─────────────────
   These are objects, not panels: a sheet has a stamp and a fold, a print has a
   border and a lens, a card has a pin. The case supplies every word. */

.pp-sheet { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 22px 26px 26px;
  background: linear-gradient(172deg, #efe7d6, #e4dac6 68%, #dcd0b8);
  color: #241f18; border-radius: 2px; box-shadow: 0 18px 34px rgba(0,0,0,.42), inset 0 0 40px rgba(120,96,54,.12);
  transform: rotate(-.25deg); }
.pp-sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 2px;
  background: repeating-linear-gradient(180deg, rgba(120,96,54,.05) 0 1px, transparent 1px 27px); }
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }
.pp-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pp-no { font-family: var(--mono); font-size: 8.5px; letter-spacing: .22em; color: #7b6642; }
.pp-name { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: #241f18; word-break: break-all; }
.pp-stamp { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 9px 6px;
  border: 2px solid rgba(150,42,32,.62); border-radius: 3px; color: rgba(150,42,32,.82);
  font-family: var(--mono); font-size: 8px; letter-spacing: .18em; transform: rotate(4deg); }
.pp-stamp .pp-caseno { font-size: 8px; letter-spacing: .12em; opacity: .8; }
.pp-rule { height: 1px; margin: 14px 0; background: linear-gradient(90deg, rgba(90,72,40,.42), rgba(90,72,40,.08)); position: relative; z-index: 1; }
.pp-log { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.pp-log li { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px dotted rgba(90,72,40,.28);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; }
.pp-log li .t { color: #8a3a2c; letter-spacing: .04em; }
.pp-log li .x { color: #241f18; }
.pp-typed { position: relative; z-index: 1; }
.pp-typed p { margin: 0 0 9px; font-family: var(--mono); font-size: 11.5px; line-height: 1.65; color: #241f18; }
.pp-typed.empty p { color: #6d5f48; font-style: italic; }
.pp-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; position: relative; z-index: 1; }
.pp-prove { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pp-prove .k, .pp-boardtitle .k, .pp-cites .k { font-family: var(--mono); font-size: 8px; letter-spacing: .2em;
  text-transform: uppercase; color: #7b6642; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-chip { padding: 3px 7px; border-radius: 2px; font-family: var(--mono); font-size: 9px; letter-spacing: .02em; }
.pp-chip.have { background: rgba(43,84,60,.16); color: #21422f; border: 1px solid rgba(43,84,60,.4); }
.pp-chip.want { background: rgba(150,42,32,.09); color: #7d2f24; border: 1px dashed rgba(150,42,32,.45); }
.pp-none { font-family: var(--mono); font-size: 9.5px; color: #6d5f48; }
.pp-at { flex: none; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; color: #7b6642; text-align: right; }

/* the ledger */
.pp-table { width: 100%; border-collapse: collapse; position: relative; z-index: 1; }
.pp-table { position: relative; }
.pp-table thead th { position: sticky; top: 0; background: #e7ddc9; z-index: 2; }
.pp-table th { text-align: left; padding: 0 8px 5px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em;
  text-transform: uppercase; color: #7b6642; border-bottom: 1px solid rgba(90,72,40,.4); }
.pp-table td { padding: 4px 8px; vertical-align: top; border-bottom: 1px dotted rgba(90,72,40,.26);
  font-family: var(--mono); font-size: 9.5px; line-height: 1.4; }
.pp-table td.no { width: 22px; color: #8a7a5c; }
.pp-table td.rec { color: #241f18; }
.pp-table td.rec .ch { display: block; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: #8a7a5c; margin-top: 2px; }
.pp-table td.from { color: #4a4136; }
.pp-table td.from .ref { display: block; font-size: 8px; color: #8a7a5c; letter-spacing: .04em; }
.pp-table td.st { width: 74px; text-align: right; text-transform: uppercase; font-size: 8px; letter-spacing: .1em; }
.pp-table tr.have td.st { color: #21422f; }
.pp-table tr.want td { color: #5d5344; }
.pp-table tr.want td.st { color: #8a3a2c; }
.pp-sheet.pp-ledger { padding-bottom: 18px; }
.pp-sheet.pp-ledger .pp-rule { margin: 9px 0; }

/* the print */
.pp-print { margin: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 460px; }
.pp-frame { position: relative; padding: 9px 9px 26px; background: #f4efe4; border-radius: 2px;
  box-shadow: 0 16px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(120,96,54,.22); transform: rotate(.6deg); }
.pp-print.raised .pp-frame { transform: rotate(-.2deg) translateY(-2px); }
.pp-frame img { display: block; width: 100%; height: auto; filter: saturate(.82) contrast(1.04); }
.pp-frame .pp-noimg { display: grid; place-items: center; height: 190px; background: #ded4c0; color: #6d5f48;
  font-family: var(--mono); font-size: 9px; }
.pp-lens { position: absolute; right: 16px; top: 16px; width: 84px; height: 84px; border-radius: 50%;
  background-repeat: no-repeat; background-size: 300% auto; background-position: 68% 26%;
  box-shadow: 0 0 0 2px rgba(244,239,228,.9), 0 0 0 4px rgba(24,20,14,.5), 0 10px 18px rgba(0,0,0,.45);
  opacity: .96; mix-blend-mode: normal; pointer-events: none; }
.pp-printno { position: absolute; left: 10px; bottom: 7px; font-family: var(--mono); font-size: 7.5px;
  letter-spacing: .18em; color: #6d5f48; }
.pp-cap { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.pp-cap .c { font-family: var(--serif); font-size: 13px; color: var(--paper); }
.pp-cap .m { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; color: var(--muted); }
.pp-facts { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pp-facts li { position: relative; padding-left: 13px; font-family: var(--mono); font-size: 9.5px; color: #b9c6c2; }
.pp-facts li::before { content: ""; position: absolute; left: 0; top: 5px; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(201,162,39,.5); }
.pp-facts li.clock { color: var(--lamp); }
.pp-facts li.clock::before { background: var(--lamp); box-shadow: 0 0 10px rgba(255,217,160,.7); }
.pp-facts li.dim-fact { color: var(--muted); font-style: italic; }
.pp-facts li.dim-fact::before { background: rgba(255,255,255,.18); }
.pp-lead { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 8px;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(255,217,160,.7); }
.pp-lead .lensmark { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,217,160,.6); }

/* the board */
.pp-board { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 18px 20px; border-radius: 4px; background:
    radial-gradient(120% 90% at 20% 0%, rgba(94,72,48,.34), transparent 60%),
    repeating-linear-gradient(48deg, rgba(255,255,255,.018) 0 2px, transparent 2px 4px), #241d16;
  box-shadow: inset 0 0 60px rgba(0,0,0,.6); }
.pp-board.empty { justify-content: center; align-items: center; text-align: center; }
.pp-boardtitle { display: flex; flex-direction: column; gap: 5px; }
.pp-boardtitle .k { color: rgba(201,162,39,.85); }
.pp-boardtitle .q { font-family: var(--serif); font-size: 16px; color: var(--paper); }
.pp-cards { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.pp-card { position: relative; flex: 0 0 150px; display: flex; flex-direction: column; gap: 3px; padding: 12px 11px 11px;
  text-align: left; background: linear-gradient(178deg, #efe7d6, #e2d7c0); color: #241f18; border: 0;
  border-radius: 2px; box-shadow: 0 12px 22px rgba(0,0,0,.45); cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease; }
.pp-card:nth-child(odd) { transform: rotate(-.8deg); }
.pp-card:nth-child(even) { transform: rotate(.7deg); }
.pp-card:hover:not(:disabled) { transform: translateY(-3px) rotate(0deg); }
.pp-card.on { box-shadow: 0 0 0 2px var(--lamp), 0 16px 26px rgba(0,0,0,.5); transform: translateY(-3px) rotate(0deg); }
.pp-card.owner { cursor: default; filter: grayscale(.35) brightness(.92); }
.pp-card.blank { background: rgba(239,231,214,.1); border: 1px dashed rgba(239,231,214,.35); color: rgba(239,231,214,.62);
  box-shadow: none; cursor: default; }
.pp-card.blank .face { opacity: .35; }
.pp-card .pinmark { position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 50%; background: radial-gradient(circle at 34% 30%, #ffe9b8, #b8892a 62%, #6d4f14);
  box-shadow: 0 2px 4px rgba(0,0,0,.55); }
.pp-card .face { width: 100%; aspect-ratio: 1; border-radius: 1px; overflow: hidden; background: #cbbfa6;
  display: grid; place-items: center; }
.pp-card .face { position: relative; }
.pp-card .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.25) contrast(1.05); }
.pp-card .face .ini { font-family: var(--serif); font-size: 26px; color: #5d5344; }
.pp-card .nm { font-family: var(--serif); font-size: 12.5px; line-height: 1.2; margin-top: 4px; }
.pp-card .rl { font-family: var(--mono); font-size: 7.5px; line-height: 1.35; letter-spacing: .03em; color: #6d5f48;
  text-transform: uppercase; }
.pp-card .st { font-family: var(--mono); font-size: 7px; letter-spacing: .12em; text-transform: uppercase; color: #8a3a2c; }
.pp-card.blank .st { color: rgba(239,231,214,.55); }
.pp-card .cross { position: absolute; left: 6px; right: 6px; top: 42%; height: 2px; background: rgba(150,42,32,.72);
  transform: rotate(-13deg); box-shadow: 0 0 0 1px rgba(150,42,32,.2); }
.pp-cites { display: flex; flex-direction: column; gap: 6px; }
.pp-cites .k { color: rgba(201,162,39,.85); }
.pp-stub { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 9px;
  background: rgba(239,231,214,.07); border-left: 2px solid rgba(201,162,39,.5);
  font-family: var(--mono); font-size: 9.5px; color: #cfd8d4; }
.pp-stub.have { border-left-color: #6fae84; }
.pp-stub.miss { border-left-color: rgba(190,84,68,.85); color: #b9a6a3; }
.pp-stub .s { font-size: 7.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(201,162,39,.8); }
.pp-stub.miss .s { color: rgba(190,84,68,.9); }
.pp-note { font-family: var(--mono); font-size: 8.5px; line-height: 1.6; color: rgba(255,217,160,.72);
  padding: 8px 10px; border: 1px dashed rgba(201,162,39,.4); border-radius: 3px; }

/* the drawer of sheets and the prints lying on the desk */
.pp-drawer { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 0; padding-top: 22px; }
.pp-tabs { position: absolute; left: 14px; top: 0; right: 0; display: flex; gap: 4px; flex: none; z-index: 2; }
.pp-tab { padding: 5px 12px 6px; border: 1px solid rgba(255,255,255,.12); border-bottom: 0; border-radius: 4px 4px 0 0;
  background: rgba(20,28,30,.92); font-family: var(--mono); font-size: 8px; letter-spacing: .16em; color: #7f8a8d; cursor: pointer; }
.pp-tab:hover { color: #cfd8d4; }
.pp-tab.on { background: linear-gradient(180deg, #efe7d6, #e5dbc6); color: #4a4136; border-color: rgba(239,231,214,.85);
  box-shadow: 0 -1px 0 rgba(255,255,255,.5) inset; }
.pp-tab.ledger { margin-left: 8px; }
.pp-stack { flex: 1 1 auto; min-height: 0; display: flex; position: relative; z-index: 1; }
.pp-none.stand-alone { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.pp-prints { display: none; }
.pp-stack > .pp-print { flex: 1 1 auto; min-height: 0; display: grid; align-items: start; gap: 22px;
  grid-template-columns: minmax(0, 336px) minmax(0, 344px); justify-content: center;
  margin: 4px 0 0; max-width: none; }
.pp-stack > .pp-print .pp-frame { width: 100%; }
.pp-stack > .pp-print .pp-frame img { max-height: min(468px, calc(100vh - 330px)); object-fit: contain; }
.pp-notes { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 8px; }

/* the notes that came with the print are their own slip of paper, tucked behind it */
.pp-stack > .pp-print .pp-notes { position: relative; margin: 26px 0 0 -18px; padding: 16px 16px 14px;
  border-radius: 2px; border: 1px solid rgba(90,72,40,.22);
  background: linear-gradient(170deg, #f5eedd, #e6d9be);
  box-shadow: 0 16px 30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.4);
  transform: rotate(-.7deg); }
.pp-stack > .pp-print .pp-notes::before { content: ""; position: absolute; top: -8px; left: 30px;
  width: 54px; height: 15px; background: rgba(214,198,160,.6); transform: rotate(-3deg);
  box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.pp-notes-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 7px; border-bottom: 1px solid rgba(90,72,40,.28); }
.pp-notes-h .k { font-family: var(--mono); font-size: 7.5px; letter-spacing: .2em; text-transform: uppercase;
  color: #8a7550; }
.pp-notes-h .n { font-family: var(--mono); font-size: 8px; letter-spacing: .16em; color: #6d5f48; }
.pp-stack > .pp-print .pp-cap .c { font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: #2b2419; }
.pp-stack > .pp-print .pp-cap .m { font-family: var(--mono); font-size: 8.5px; letter-spacing: .06em; color: #6b5b3f; }
.pp-stack > .pp-print .pp-cap .m + .m { color: #7d6a49; }
.pp-stack > .pp-print .pp-facts { gap: 6px; margin-top: 4px; }
.pp-stack > .pp-print .pp-facts li { font-size: 9px; line-height: 1.55; color: #4a3f30;
  border-bottom: 1px dotted rgba(90,72,40,.22); padding-bottom: 5px; }
.pp-stack > .pp-print .pp-facts li::before { top: 6px; width: 4px; height: 4px; background: #8a7550; }
.pp-stack > .pp-print .pp-facts li.clock { color: #962a20; }
.pp-stack > .pp-print .pp-facts li.clock::before { background: #962a20; box-shadow: none; }
.pp-stack > .pp-print .pp-lead { color: #7a5a1f; letter-spacing: .12em; }
.pp-stack > .pp-print .pp-lead .lensmark { border-color: rgba(150,42,32,.7); }
.pp-cap .m + .m { color: rgba(154,163,166,.7); }
.pp-printwrap { display: block; flex: none; width: 100%; max-width: 460px; padding: 0; border: 0; background: none;
  cursor: pointer; text-align: left; transition: opacity .18s ease; }
.pp-printwrap > .pp-print { margin: 0 auto; }
.pp-printwrap.off { opacity: .62; }
.pp-printwrap.on { opacity: 1; }

/* on a phone the print and its notes stack */
.dk.mob .pp-stack > .pp-print { display: flex; flex-direction: column; gap: 10px; }
.dk.mob .pp-stack > .pp-print .pp-frame img { max-height: none; }
.dk.mob .pp-notes { padding-top: 0; }
.dk.mob .pp-sheet { padding: 16px 16px 18px; transform: none; }
.dk.mob .pp-table td { font-size: 9px; }
.dk.mob .pp-table th, .dk.mob .pp-table td { padding-left: 4px; padding-right: 4px; }
.dk.mob .pp-table td.st { width: 56px; font-size: 7px; }
.dk.mob .pp-cards { gap: 9px; }
.dk.mob .pp-card { flex: 0 0 calc(50% - 5px); }
.dk.mob .pp-tab { padding: 5px 9px 6px; }

/* the sheets and prints are the artefacts now: the tray is the desk, not a mount board.
   Last, because the mount-board rules further up have the same specificity. */
.dk .stage .tray.t-docs,
.dk .stage .tray.t-prints { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.dk .stage .tray.t-docs::before,
.dk .stage .tray.t-prints::before { display: none; }

/* paper on a phone fills the list area rather than sitting in it */
.dk.mob .mpaper { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 8px 8px; }
.dk.mob .mpaper .pp-drawer { flex: 1 1 auto; min-height: 0; }
.dk.mob .mpaper .pp-stack { flex: 1 1 auto; min-height: 0; display: flex; overflow: auto; }
.dk.mob .mpaper .pp-print { max-width: 100%; }
.dk.mob .mpaper .pp-frame img { max-height: 38vh; }
/* nothing on a phone print may shrink: the stack scrolls instead */
.dk.mob .mpaper .pp-print, .dk.mob .mpaper .pp-frame, .dk.mob .mpaper .pp-notes { flex: none; }
.dk.mob .mpaper .pp-facts { padding-bottom: 6px; }
.dk.mob .mpaper .pp-sheet { overflow: auto; }

/* the statement: a typed sheet with a mugshot, what they said, and what nobody has pressed */
.pp-role { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: #7b6642; }
.pp-mug { position: relative; flex: none; width: 58px; height: 58px; border-radius: 1px; overflow: hidden;
  background: #cbbfa6; display: grid; place-items: center; box-shadow: 0 5px 12px rgba(0,0,0,.28);
  filter: grayscale(.3) contrast(1.06); }
.pp-mug img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-mug .ini { font-family: var(--serif); font-size: 20px; color: #5d5344; }
.pp-note-line { margin-top: 8px; font-family: var(--mono); font-size: 9.5px; font-style: italic; color: #6d5f48; }
.pp-answers { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.pp-answer .q { font-family: var(--mono); font-size: 9.5px; letter-spacing: .02em; color: #8a3a2c; }
.pp-answer .q::before { content: "you · "; opacity: .7; }
.pp-answer .a { margin-top: 4px; font-family: var(--mono); font-size: 11px; line-height: 1.6; color: #241f18; }
.pp-answer .st { margin-top: 3px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em;
  text-transform: uppercase; color: #8a7a5c; }
.pp-answer .st.yield { color: #21422f; }
.pp-unasked { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
.pp-ask { text-align: left; padding: 7px 10px; border: 1px dashed rgba(90,72,40,.5); border-radius: 2px;
  background: rgba(255,255,255,.28); font-family: var(--mono); font-size: 10px; line-height: 1.45;
  color: #4a4136; cursor: pointer; }
.pp-ask:hover:not(:disabled) { background: rgba(255,255,255,.6); border-style: solid; }
.pp-ask:disabled { opacity: .5; cursor: default; }
.pp-tab.quiet { border-style: dashed; border-bottom: 0; color: #6c777a; cursor: default; }
.dk.mob .mpaper .pp-sheet.statement { padding: 14px 14px 16px; }
.dk.mob .pp-mug { width: 46px; height: 46px; }

/* paper surfaces get one generous width on the desk, whatever they are */
.dk .stage .held .tray.t-docs,
.dk .stage .held .tray.t-prints,
.dk .stage .held .tray.t-talk { width: min(880px, 92vw); }
.dk .stage .tray.t-talk { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.dk .stage .tray.t-talk::before { display: none; }
.dk .stage .held .tray.t-docs .pp-drawer,
.dk .stage .held .tray.t-prints .pp-drawer,
.dk .stage .held .tray.t-talk .pp-drawer { width: 100%; }
.pp-unasked .pp-ask + .pp-ask { margin-top: 4px; }
.pp-unasked .k { margin-bottom: 2px; }
.pp-sheet.statement .pp-foot { margin-top: 10px; }

.pp-ask { display: flex; gap: 9px; align-items: baseline; max-width: 78%; }
.pp-ask .say { flex: none; font-size: 7.5px; letter-spacing: .18em; text-transform: uppercase;
  color: #8a3a2c; opacity: .85; }
.dk.mob .pp-ask { max-width: 100%; }

/* a page is as tall as its writing, not as tall as the screen it sits on */
.dk.mob .mpaper .pp-sheet.statement { flex: 0 0 auto; width: 100%; align-self: flex-start; }

/* an app icon the case shipped, worn on the tile */
.dv-tile .ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block;
  mix-blend-mode: screen; }
.dv-tile .ic:has(img) {
  background: color-mix(in srgb, var(--accent, #33565f) 52%, #0a0d11);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 8px 16px -12px rgba(0,0,0,.9);
}
.dk.mob .mdevice .dv-tile .ic img { border-radius: 18px; }

/* ── the charge sheet ─────────────────────────────────────────────── */
.dk .stage.accusations .boardwrap.chargewrap {
  display: flex; gap: 22px; align-items: flex-start; width: min(1180px, 94vw);
}
.pp-charge { flex: 1 1 auto; min-width: 0; }
.pp-charge-q { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(32,28,22,.16); }
.pp-charge-q:first-of-type { border-top: 0; margin-top: 6px; padding-top: 0; }
.pp-charge-q .qn { display: flex; gap: 10px; align-items: baseline; }
.pp-charge-q .qn .n { flex: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  background: #20201c; color: #f4efe4; font-family: var(--bc-font-mono, monospace); font-size: 9px; }
.pp-charge-q .qn .t { font-size: 14.5px; line-height: 1.35; color: #1b1a16; }
.pp-charge .opts { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 8px 27px; }
.pp-charge .opt { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 9px; border-radius: 4px;
  border: 1px solid rgba(32,28,22,.34); background: rgba(255,252,244,.5); color: #241f19;
  font: inherit; font-size: 12.5px; cursor: pointer; transition: background .12s, border-color .12s; }
.pp-charge .opt:hover:not(:disabled):not(.on) { background: #fffdf7; border-color: rgba(32,28,22,.6); }
.pp-charge .opt:disabled { cursor: default; opacity: .92; }
.pp-charge .opt .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(32,28,22,.55); flex: none; }
.pp-charge .opt.on { background: #20201c; border-color: #20201c; color: #f4efe4;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.pp-charge .opt.on .dot { background: #f4efe4; border-color: #f4efe4; }
.pp-charge .opt.right { background: #2c4433; border-color: #2c4433; }
.pp-charge .opt.wrong { background: #5c2a20; border-color: #5c2a20; }
.pp-supp { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0 0 2px 27px;
  font-family: var(--bc-font-mono, monospace); font-size: 9.5px; line-height: 1.5; }
.pp-supp .k { text-transform: uppercase; letter-spacing: .12em; color: #6b6055; }
.pp-supp.ok .v { color: #2f4a37; }
.pp-supp.short .v { color: #7a3826; }
.pp-supp .c { color: #6b6055; }
.pp-exhibits { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(32,28,22,.16);
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline;
  font-family: var(--bc-font-mono, monospace); font-size: 9.5px; }
.pp-exhibits .k { text-transform: uppercase; letter-spacing: .12em; color: #6b6055; }
.pp-exhibits .v { color: #241f19; }
.pp-file-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pp-file-row .why { font-family: var(--bc-font-mono, monospace); font-size: 9.5px; color: #6b6055; }
.pp-verdict { margin-top: 14px; padding: 12px 13px; border-radius: 4px; display: grid; gap: 6px;
  background: rgba(238,232,218,.85); border-left: 3px solid #20201c; }
.pp-verdict.have { border-left-color: #2f6b45; }
.pp-verdict.want { border-left-color: #8a3a2c; }
.pp-verdict .vh { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #4a4238; }
.pp-verdict .vt { font-size: 13.5px; line-height: 1.45; color: #1b1a16; }
.pp-verdict .vf { font-family: var(--bc-font-mono, monospace); font-size: 9.5px; color: #6b6055; }
.pp-stamp.ready { background: #2f4a37; color: #f2f0e6; }
.pp-stamp.have { background: #2f6b45; color: #f2f0e6; }
.pp-stamp.want { background: #8a3a2c; color: #f7efe6; }
.pp-stamp.idle { background: rgba(32,28,22,.14); color: #3a332b; }
.pp-quiet { font-size: 12.5px; line-height: 1.5; color: #4a4238; margin: 8px 0 0; }
/* on a phone the sheet is the page; the board goes under it */
.dk.mob .mpaper .pp-charge .opts,
.dk.mob .mpaper .pp-charge .pp-supp { margin-left: 0; }
.dk.mob .mpaper .pp-charge .opt { font-size: 11.5px; padding: 5px 9px; }

/* the charge on a phone is a block in the page, not a sheet in the paper stack */
.dk.mob .msec.charge-sec { display: block; }
.dk.mob .msec.charge-sec .pp-charge { width: 100%; overflow: visible; }
.dk.mob .msec.charge-sec .pp-charge .opts,
.dk.mob .msec.charge-sec .pp-charge .pp-supp { margin-left: 0; }
.dk.mob .msec.charge-sec .opt { font-size: 11.5px; padding: 5px 9px; }

/* ── the aside: one record set down, read against another ─────────────────────
   It lives in the strip that already says what you are holding, as one more chip
   in the row. Nothing to open, nothing to pick from a list. */

.dk .stage .held .src { max-width: min(820px, 92vw); justify-content: center; row-gap: 10px; }
.dk .src .aside { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dk .src .asidebar { white-space: nowrap; font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(201,162,39,.92); }
.dk .src .asidebtn { flex: none; padding: 7px 12px; border: 1px solid rgba(158,224,179,.35); border-radius: 999px;
  background: rgba(158,224,179,.08); color: #cfe9dc; cursor: pointer; font-family: var(--mono);
  font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.dk .src .asidebtn:hover { background: rgba(158,224,179,.16); }
.dk .src .asidebtn.on { border-color: rgba(201,162,39,.5); background: rgba(201,162,39,.1); color: #f0d9a8; }
.dk .src .asidebtn.go { border-color: rgba(201,162,39,.6); background: rgba(201,162,39,.16); color: #ffe9bd; }

/* a notice never lands on the strip it is describing */
.dk .stage ~ .toast { bottom: auto; top: 86px; left: auto; right: 26px; transform: none;
  max-width: 440px; text-align: right; line-height: 1.5; }
/* the strip keeps clear of the hint under it */
.dk .stage .held { padding-bottom: 58px; }

/* search, on the phone itself */
.dv-searchrow { display: flex; align-items: center; gap: 9px; margin: 10px 0 2px; padding: 10px 13px;
  border: 0; border-radius: 12px; background: rgba(255,255,255,.06); color: rgba(240,243,248,.82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); font-family: var(--mono); font-size: 10px;
  letter-spacing: .16em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(8px); }
.dv-searchrow:hover { background: rgba(255,255,255,.1); }
.dv-searchline { display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07); color: rgba(233,237,244,.6); }
.dv-searchline input { flex: 1; border: 0; background: none; outline: none; color: #f2f4f8;
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
.dv-searchline input::placeholder { color: rgba(233,237,244,.4); }
.dv-searchline input::-webkit-search-cancel-button,
.dv-searchline input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

/* ── the interactions wheel ───────────────────────────────────────────────────
   A grip on the right edge of the desk. Hover it and the handful of things you can
   do with what you are looking at fan out along an arc. No menus at the bottom, no
   list of objectives: the actions belong to the object in front of you. */

.dk .wh { position: fixed; right: 0; top: 50%; width: 190px; height: 360px;
  transform: translateY(-50%); z-index: 46; }
.dk .wh.off { pointer-events: none; }

.dk .wh-grip { position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 26px; height: 84px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 0; border: 0; border-radius: 10px 0 0 10px;
  background: rgba(12,16,14,.62); backdrop-filter: blur(10px); cursor: pointer;
  box-shadow: -8px 0 22px rgba(0,0,0,.4); transition: width .2s ease, background .2s ease, opacity .2s ease; }
.dk .wh.off .wh-grip { opacity: .28; pointer-events: none; }
.dk .wh-grip i { width: 4px; height: 4px; border-radius: 50%; background: rgba(233,221,190,.5);
  transition: background .2s ease, transform .2s ease; }
.dk .wh.on .wh-grip { width: 30px; background: rgba(22,29,24,.85); }
.dk .wh.on .wh-grip i { background: rgba(201,162,39,.95); transform: scale(1.15); }

.dk .wh-arc { position: absolute; right: 0; top: 50%; }
.dk .wh-item { position: absolute; right: 0; top: 50%; transform-origin: 100% 50%;
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(158,224,179,.24);
  border-radius: 999px; background: rgba(13,18,15,.94); color: #dfe9e2; white-space: nowrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase;
  opacity: 0; pointer-events: none; cursor: pointer; backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  transform: translateY(-50%) rotate(var(--a)) translateX(-92px) rotate(calc(-1 * var(--a)));
  transition: opacity .16s ease, transform .3s cubic-bezier(.2,.85,.2,1), border-color .16s ease, color .16s ease;
  transition-delay: calc(var(--i) * 26ms); }
.dk .wh.on .wh-item { opacity: 1; pointer-events: auto; }
.dk .wh-item:hover, .dk .wh-item:focus-visible { border-color: rgba(201,162,39,.62); color: #ffe9bd; outline: none; }
.dk .wh-item.go { border-color: rgba(201,162,39,.55); background: rgba(52,40,18,.92); color: #ffe9bd; }
.dk .wh-ic { display: inline-flex; opacity: .85; }
.dk .wh-lb { display: inline-block; }

@media (max-width: 900px) {
  .dk .wh { width: 150px; height: 320px; }
  .dk .wh-item { transform: translateY(-50%) rotate(var(--a)) translateX(-78px) rotate(calc(-1 * var(--a)));
    font-size: 8.5px; padding: 7px 10px; }
}

/* ── the case file: a folder, opened on the desk ──────────────────────────── */

.dk .pp-folder { position: relative; width: min(660px, 94vw); padding-top: 26px; }
.dk .pp-folder::before { content: ""; position: absolute; inset: 18px -14px -14px -14px; z-index: 0;
  border-radius: 3px; background: linear-gradient(168deg, #cdb389, #b89a6f 60%, #a98d63);
  box-shadow: 0 26px 46px rgba(0,0,0,.62); transform: rotate(.5deg); }
.dk .pp-folder-tab { position: relative; z-index: 2; display: inline-block; margin-left: 18px;
  padding: 7px 16px 6px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #ddc59c, #c9ad80);
  color: #4a3a22; font-family: var(--mono); font-size: 8px; letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 -1px 0 rgba(255,255,255,.4) inset; }
.dk .pp-folder .pp-sheet { position: relative; z-index: 1; max-height: min(78vh, 680px); overflow: auto;
  padding-bottom: 14px; }

.dk .pp-casebar { position: relative; height: 5px; margin: 2px 0 8px; background: rgba(90,72,40,.16);
  border-radius: 99px; overflow: hidden; }
.dk .pp-casebar .fill { display: block; height: 100%; background: #962a20; border-radius: 99px;
  transition: width .4s ease; }
.dk .pp-ledgerline { display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em; text-transform: uppercase; color: #8a7550; }

.dk .pp-chapter { margin: 9px 0 0; }
.dk .pp-chapter-h { display: flex; align-items: baseline; gap: 9px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(90,72,40,.3); }
.dk .pp-chapter-h .n { font-family: var(--mono); font-size: 8px; letter-spacing: .16em; color: #962a20; }
.dk .pp-chapter-h .t { flex: 1; font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: #241f18; }
.dk .pp-chapter-h .c { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; color: #8a7550; }
.dk .pp-entry { display: flex; gap: 9px; align-items: baseline; padding: 4.5px 0;
  border-bottom: 1px dotted rgba(90,72,40,.22); font-family: var(--mono); font-size: 9px; color: #8b7c62; }
.dk .pp-entry .mk { color: rgba(90,72,40,.35); }
.dk .pp-entry .tx { flex: 1; line-height: 1.5; }
.dk .pp-entry.on { color: #2b2419; }
.dk .pp-entry.on .mk { color: #962a20; }
.dk .pp-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.dk .pp-foot .note { font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em;
  text-transform: uppercase; color: #8a7550; }
.dk .pp-stampbtn { padding: 8px 14px; border: 2px solid rgba(150,42,32,.6); border-radius: 3px;
  background: none; color: #962a20; font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em;
  text-transform: uppercase; cursor: pointer; transform: rotate(-.6deg); }
.dk .pp-stampbtn:hover { background: rgba(150,42,32,.08); }

/* ── the case file's own sheets: brief, people, exhibits, charge ───────────── */

.dk .pp-filedrawer { padding-top: 24px; }
.dk .pp-filedrawer .pp-sheet { max-height: min(66vh, 578px); }

.dk .pp-face { display: flex; flex-direction: column; }
.dk .pp-frow { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px;
  padding: 9px 0; border-bottom: 1px dotted rgba(90,72,40,.26); }
.dk .pp-frow:last-child { border-bottom: 0; }
.dk .pp-frow .k { padding-top: 2px; font-family: var(--mono); font-size: 7.5px; letter-spacing: .2em;
  text-transform: uppercase; color: #8a7550; }
.dk .pp-frow .v { font-family: var(--mono); font-size: 10px; line-height: 1.65; color: #2b2419; }
.dk .pp-frow .v i { display: block; margin-top: 2px; font-style: normal; font-size: 8.5px; color: #7d6a49; }

.dk .pp-body { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.dk .pp-body p { margin: 0; font-family: var(--mono); font-size: 9px; line-height: 1.7; color: #4a3f30; }
.dk .pp-body b { color: #241f18; font-weight: 600; letter-spacing: .06em; }

.dk .pp-people { display: flex; flex-direction: column; }
.dk .pp-person { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 2px; border: 0; border-bottom: 1px dotted rgba(90,72,40,.26); background: none;
  text-align: left; cursor: pointer; }
.dk .pp-person[disabled] { cursor: default; opacity: .58; }
.dk .pp-person.open:hover { background: rgba(120,96,54,.07); }
.dk .pp-person .av { display: block; width: 52px; height: 52px; overflow: hidden;
  border: 1px solid rgba(90,72,40,.3); background: #ded4c0; }
.dk .pp-person .av .im { display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.8) contrast(1.05); }
.dk .pp-person .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dk .pp-person b { font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: #241f18; }
.dk .pp-person i { font-style: normal; font-family: var(--mono); font-size: 8px; letter-spacing: .1em;
  text-transform: uppercase; color: #7d6a49; }
.dk .pp-person em { font-family: var(--serif); font-size: 11.5px; color: #4a3f30; }
.dk .pp-person .go { font-family: var(--mono); font-size: 7.5px; letter-spacing: .16em;
  text-transform: uppercase; color: #962a20; }
.dk .pp-person[disabled] .go { color: #a2927a; }

.dk .pp-log { display: flex; flex-direction: column; }
.dk .pp-ex { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px dotted rgba(90,72,40,.22);
  font-family: var(--mono); font-size: 9px; color: #a2927a; }
.dk .pp-ex .n { font-size: 8px; letter-spacing: .14em; color: #b0a08a; }
.dk .pp-ex.on { color: #2b2419; }
.dk .pp-ex.on .n { color: #962a20; }
.dk .pp-ex .ch { font-size: 7px; letter-spacing: .14em; color: #8a7550; }

.dk .pp-charge { padding: 10px 0 6px; border-bottom: 1px dotted rgba(90,72,40,.24); }
.dk .pp-charge-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dk .pp-charge-h .n, .dk .pp-charge-h .s { font-family: var(--mono); font-size: 7.5px;
  letter-spacing: .18em; text-transform: uppercase; }
.dk .pp-charge-h .n { color: #8a7550; }
.dk .pp-charge-h .s { color: #962a20; }
.dk .pp-charge-h .s.on { color: #2f6b45; }
.dk .pp-charge .q { margin: 6px 0 8px; font-family: var(--mono); font-size: 10.5px; line-height: 1.6;
  color: #241f18; }
.dk .pp-charge .opts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 8px; padding: 0; }
.dk .pp-charge .opts button { display: block; padding: 4px 9px; border: 1px solid rgba(90,72,40,.3);
  border-radius: 2px; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 8.5px; color: #6b5b3f; }
.dk .pp-charge .opts button:hover { border-color: rgba(90,72,40,.6); color: #241f18; }
.dk .pp-charge .opts li.on { border-color: rgba(150,42,32,.6); color: #962a20; }
.dk .pp-charge .cites { display: flex; flex-wrap: wrap; gap: 6px; }
.dk .pp-charge .cite { padding: 4px 8px; border: 1px dashed rgba(90,72,40,.35);
  font-family: var(--mono); font-size: 8px; letter-spacing: .08em; color: #a2927a; }
.dk .pp-charge .cite.on { border-style: solid; border-color: rgba(47,107,69,.5); color: #2f6b45; }

.dk .pp-stampbtn[disabled] { opacity: .4; cursor: default; }
/* =========================================================================
   The Black Codex · Case Desk
   One design system, two skins. Every colour comes from a theme token, so the
   archive desk and the retro desktop differ only in what :root carries.
   ========================================================================= */

:root {
  color-scheme: dark;
  --bc-radius: 3px;
  --bc-gap: 18px;
  --bc-shadow-lift: 0 30px 60px -40px #000;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bc-bg);
  color: var(--bc-text);
  font-family: var(--bc-font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

.app {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(ellipse at 50% 118%, rgba(185, 129, 45, 0.16), transparent 62%),
    radial-gradient(ellipse at 88% -12%, rgba(141, 20, 25, 0.16), transparent 48%),
    linear-gradient(170deg, color-mix(in srgb, var(--bc-bg) 78%, #2a1a12), var(--bc-bg) 68%);
  position: relative;
  isolation: isolate;
}
.app::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(232, 215, 184, 0.12) 1px, transparent 1px);
  background-size: 4px 4px;
}

/* ---------------- portal chrome ---------------- */
.portal {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--bc-line);
  background: linear-gradient(180deg, rgba(9, 8, 7, 0.72), rgba(9, 8, 7, 0.24));
  backdrop-filter: blur(8px);
  position: sticky; top: 0;
}
.portal-brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
}
.portal-mark {
  width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--bc-accent); border-radius: 50% 44% 50% 46%;
  color: var(--bc-accent); font-family: var(--bc-font-mono); font-weight: 700; font-size: 12px;
  background: radial-gradient(circle, rgba(185, 129, 45, 0.18), rgba(9, 8, 7, 0.7));
  box-shadow: inset 0 0 0 3px rgba(185, 129, 45, 0.1);
}
.portal-brand b {
  display: block; font-family: var(--bc-font-display); font-weight: 400;
  font-size: 1.05rem; letter-spacing: 0.02em; line-height: 1;
}
.portal-brand small {
  display: block; font-family: var(--bc-font-mono); font-size: 0.5rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--bc-accent); margin-top: 3px;
}
.portal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  border: 1px solid var(--bc-line); background: rgba(9, 8, 7, 0.4);
  color: var(--bc-text); padding: 7px 11px; cursor: pointer;
  font-family: var(--bc-font-mono); font-size: 0.56rem; letter-spacing: 0.16em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: 160ms ease;
}
.chip:hover { border-color: var(--bc-accent); color: var(--bc-accent); }
.chip.primary { border-color: var(--bc-accent); color: var(--bc-accent); }
.chip.ghost { opacity: 0.7; }

/* ---------------- shared furniture ---------------- */
.stage {
  position: relative;
  z-index: 2;
  display: grid;
  /* one column that is allowed to shrink: an auto column sizes to min-content,
     which is what shoved the portal 37px past a 390px phone. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--bc-gap);
  min-width: 0;
  max-width: 100%;
}
.kicker {
  margin: 0; font-family: var(--bc-font-mono); font-size: 0.55rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--bc-accent);
}
.display { font-family: var(--bc-font-display); font-weight: 400; margin: 0; line-height: 1.02; letter-spacing: -0.02em; }
.muted { color: color-mix(in srgb, var(--bc-text) 62%, transparent); }
.mono { font-family: var(--bc-font-mono); }
.rule { height: 1px; background: var(--bc-line); border: 0; margin: 0; }

/* ---------------- cabinet ---------------- */
.cabinet-screen { padding: clamp(16px, 4vw, 46px) clamp(14px, 4vw, 54px) 40px; align-content: space-between; min-height: calc(100vh - 66px); }
.cabinet-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.cabinet-head h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); }
.cabinet-head p { max-width: 46ch; margin: 6px 0 0; font-size: 1rem; line-height: 1.55; color: color-mix(in srgb, var(--bc-text) 76%, transparent); }
.cabinet-body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(18px, 3vw, 42px); align-items: start;
}
.cabinet { display: grid; gap: 10px; }
.drawer {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
  padding: clamp(16px, 2.2vh, 24px) 18px; cursor: pointer; text-align: left; color: inherit;
  background:
    repeating-linear-gradient(88deg, rgba(255, 236, 200, 0.03) 0 2px, rgba(0, 0, 0, 0.06) 2px 6px, transparent 6px 13px),
    linear-gradient(178deg, #513a27, #3a2919 62%, #2d1f13);
  border: 1px solid rgba(232, 215, 184, 0.13); border-radius: 2px;
  box-shadow: inset 0 8px 14px -8px rgba(0, 0, 0, 0.85), inset 0 -1px 0 rgba(255, 236, 200, 0.1), 0 2px 0 rgba(0, 0, 0, 0.5);
  transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 380ms ease, background 240ms ease;
}
.drawer:hover, .drawer:focus-visible {
  transform: translateY(2px) scale(1.008);
  background:
    repeating-linear-gradient(88deg, rgba(255, 236, 200, 0.04) 0 2px, rgba(0, 0, 0, 0.05) 2px 6px, transparent 6px 13px),
    linear-gradient(178deg, #5d442d, #43301d 62%, #352417);
  box-shadow: inset 0 10px 18px -8px rgba(0, 0, 0, 0.9), 0 26px 30px -26px #000, 0 0 0 1px rgba(185, 129, 45, 0.38);
  outline: none;
}
.drawer-slip {
  justify-self: start; display: grid; gap: 2px; padding: 8px 14px 7px;
  background: linear-gradient(160deg, #efe2c4, #cfb994); color: #20130f;
  box-shadow: inset 0 0 0 1px rgba(32, 19, 15, 0.3), 0 1px 2px rgba(0, 0, 0, 0.5);
  position: relative; min-width: 64%;
}
.drawer-slip::before {
  content: ''; position: absolute; inset: -6px; z-index: -1; border-radius: 2px;
  border: 1px solid rgba(200, 160, 92, 0.8);
  background: linear-gradient(160deg, rgba(185, 129, 45, 0.55), rgba(120, 82, 34, 0.55));
}
.drawer-slip b { font-family: var(--bc-font-mono); font-size: 0.52rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(32, 19, 15, 0.66); }
.drawer-slip span { font-size: 1rem; line-height: 1.15; }
.drawer-slip i { font-family: var(--bc-font-mono); font-size: 0.48rem; letter-spacing: 0.14em; text-transform: uppercase; font-style: normal; color: rgba(32, 19, 15, 0.52); }
.drawer-pull {
  width: 54px; height: 20px; justify-self: end; border: 2px solid #c9a765; border-top: 0;
  border-radius: 0 0 14px 14px; position: relative;
  background: linear-gradient(180deg, rgba(255, 240, 200, 0.12), rgba(0, 0, 0, 0.25));
  box-shadow: 0 6px 8px -6px rgba(0, 0, 0, 0.9), inset 0 -2px 3px rgba(0, 0, 0, 0.45);
}
.drawer-pull::after {
  content: ''; display: block; width: 18px; height: 5px; margin: -14px auto 0;
  border-radius: 999px; background: linear-gradient(180deg, #e2c07f, #8f6a35);
}
.cabinet-side { display: grid; gap: 14px; align-content: start; }
.side-note {
  border-left: 2px solid var(--bc-accent); padding: 2px 0 2px 12px;
  font-size: 0.92rem; line-height: 1.55; color: color-mix(in srgb, var(--bc-text) 78%, transparent);
}
.side-note b { display: block; font-family: var(--bc-font-mono); font-size: 0.54rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bc-accent); margin-bottom: 4px; }
.lorehaven-link {
  display: grid; gap: 8px; padding: 14px; border: 1px solid var(--bc-line);
  background: rgba(9, 8, 7, 0.42); text-decoration: none;
}
.lorehaven-link b { font-family: var(--bc-font-display); font-size: 1.05rem; }
.lorehaven-link span { font-family: var(--bc-font-mono); font-size: 0.54rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bc-accent); }

/* ---------------- pack rail ---------------- */
.pack-screen { padding: clamp(14px, 3vw, 34px) 0 28px; align-content: space-between; min-height: calc(100vh - 66px); }
.pack-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 0 clamp(14px, 4vw, 54px);
}
.pack-head h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.pack-head .crumb { display: flex; gap: 8px; align-items: center; font-family: var(--bc-font-mono); font-size: 0.54rem; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in srgb, var(--bc-text) 60%, transparent); }
.pack-head .crumb button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; letter-spacing: inherit; font: inherit; }
.pack-head .crumb button:hover { color: var(--bc-accent); }
.rail-nav { display: flex; gap: 6px; }
.rail {
  display: flex; gap: clamp(14px, 2.2vw, 26px); align-items: stretch;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 26px clamp(14px, 4vw, 54px) 18px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.folder-card {
  scroll-snap-align: center; flex: 0 0 min(320px, 82vw);
  display: grid; grid-template-rows: 168px auto; gap: 0; padding: 0;
  background: linear-gradient(158deg, #efe2c6, #d3bc98); color: #20130f;
  border: 0; cursor: pointer; text-align: left; font: inherit;
  box-shadow: 0 40px 70px -46px #000; border-radius: 2px;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 320ms ease;
  position: relative; overflow: hidden;
}
.folder-card::before {
  content: ''; position: absolute; top: 0; left: 26px; width: 104px; height: 16px;
  background: linear-gradient(160deg, #efe2c6, #d6bf9c); border-radius: 5px 7px 0 0; z-index: 2;
}
.folder-card:hover, .folder-card:focus-visible { transform: translateY(-8px); box-shadow: 0 56px 80px -44px #000; outline: none; }
.folder-thumb { position: relative; overflow: hidden; background: #1a1410; }
.folder-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.92) contrast(1.02); }
.folder-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24, 16, 12, 0.05), rgba(207, 185, 148, 0.55));
}
.folder-body { display: grid; gap: 7px; padding: 14px 16px 18px; }
.folder-body .no { font-family: var(--bc-font-mono); font-size: 0.5rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(32, 19, 15, 0.6); }
.folder-body h3 { margin: 0; font-family: var(--bc-font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.05; }
.folder-body .meta { font-family: var(--bc-font-mono); font-size: 0.5rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(32, 19, 15, 0.58); }
.folder-body .stamp {
  justify-self: start; margin-top: 2px; padding: 3px 7px;
  border: 1.5px solid rgba(141, 20, 25, 0.6); color: rgba(141, 20, 25, 0.88);
  font-family: var(--bc-font-mono); font-size: 0.46rem; letter-spacing: 0.18em;
  text-transform: uppercase; transform: rotate(-2deg);
}
.folder-body .stamp.clean { border-color: rgba(90, 100, 60, 0.55); color: rgba(70, 84, 46, 0.92); }
.folder-body .stamp.theme { border-color: rgba(32, 19, 15, 0.4); color: rgba(32, 19, 15, 0.72); transform: none; }
.rail-empty { padding: 40px clamp(14px, 4vw, 54px); color: color-mix(in srgb, var(--bc-text) 60%, transparent); }

/* ---------------- case file (flip open) ---------------- */
.case-screen { padding: clamp(14px, 3vw, 34px) clamp(14px, 4vw, 54px) 34px; align-content: start; }
.flip-wrap { perspective: 2000px; max-width: 1120px; width: 100%; margin: 0 auto; }
.flip {
  position: relative; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr;
  transform-style: preserve-3d;
}
.flip-face {
  grid-area: 1 / 1;
  border-radius: 3px;
  background: linear-gradient(158deg, #f1e5ca, #d2bb96); color: #20130f;
  box-shadow: 0 60px 100px -60px #000;
  display: grid;
  min-height: min(520px, 66vh);
  transition: transform 640ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 320ms ease;
  transform-origin: left center;
}
.flip-face.front { transform: rotateY(0deg); }
.flip-face.back { transform: rotateY(180deg); opacity: 0; pointer-events: none; }
.flip.open .flip-face.front { transform: rotateY(-180deg); opacity: 0; pointer-events: none; }
.flip.open .flip-face.back { transform: rotateY(0deg); opacity: 1; pointer-events: auto; }
.face-front { position: relative; }
.face-front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.face-front .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 11, 8, 0.35), rgba(16, 11, 8, 0.82) 62%, rgba(16, 11, 8, 0.94)); }
.face-front .front-copy { position: relative; align-self: end; padding: clamp(18px, 3vw, 34px); display: grid; gap: 8px; color: #f4e9d3; }
.face-front h2 { margin: 0; font-family: var(--bc-font-display); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.9rem); line-height: 1; }
.face-front .front-meta { font-family: var(--bc-font-mono); font-size: 0.54rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244, 233, 211, 0.74); }
.face-front .open-cue {
  justify-self: start; margin-top: 8px; padding: 9px 14px; border: 1px solid rgba(244, 233, 211, 0.5);
  background: rgba(16, 11, 8, 0.4); font-family: var(--bc-font-mono); font-size: 0.54rem;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.face-back { padding: clamp(20px, 3vw, 36px); display: grid; gap: 18px; align-content: start; }
.face-back h2 { margin: 0; font-family: var(--bc-font-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.face-back p { margin: 0; font-size: 1rem; line-height: 1.62; max-width: 68ch; }
.face-back .cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: start; }
.case-facts { display: grid; gap: 6px; font-family: var(--bc-font-mono); font-size: 0.56rem; letter-spacing: 0.08em; }
.case-facts dt { color: rgba(32, 19, 15, 0.55); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.5rem; }
.case-facts dd { margin: 0 0 2px; font-weight: 700; }
.case-facts dt:not(:first-child) { margin-top: 6px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.person { display: flex; align-items: center; gap: 9px; }
.person img, .person > b {
  width: 34px; height: 34px; flex: 0 0 auto; object-fit: cover; border-radius: 2px;
  display: grid; place-items: center; background: rgba(32, 19, 15, 0.12);
  font-family: var(--bc-font-mono); font-size: 0.8rem; color: #20130f;
  border: 1px solid rgba(32, 19, 15, 0.22);
}
.person span { display: grid; line-height: 1.25; }
.person span b { font-size: 0.92rem; font-weight: 600; }
.person span small { font-family: var(--bc-font-mono); font-size: 0.46rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(32, 19, 15, 0.55); }
.image-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.image-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid rgba(32, 19, 15, 0.18); }
.person-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.person-chip {
  border: 1px solid rgba(32, 19, 15, 0.28); padding: 4px 8px;
  font-family: var(--bc-font-mono); font-size: 0.52rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.chapter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chapter-list li { border-left: 2px solid rgba(185, 129, 45, 0.6); padding-left: 10px; font-size: 0.92rem; }
.chapter-list b { display: block; font-family: var(--bc-font-mono); font-size: 0.5rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(32, 19, 15, 0.55); }
.play-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  border: 1px solid rgba(32, 19, 15, 0.65); background: rgba(32, 19, 15, 0.06);
  color: #20130f; padding: 10px 16px; cursor: pointer;
  font-family: var(--bc-font-mono); font-size: 0.56rem; letter-spacing: 0.18em; text-transform: uppercase;
  transition: 160ms ease;
}
.btn:hover { background: rgba(32, 19, 15, 0.14); }
.btn.solid { background: #20130f; color: #f2e6cd; border-color: #20130f; }
.btn.solid:hover { background: #8d1419; border-color: #8d1419; }
.theme-pick { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- play: shared ---------------- */
.play-screen { position: relative; z-index: 12; display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.play-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(12px, 3vw, 26px); border-bottom: 1px solid var(--bc-line);
  background: rgba(9, 8, 7, 0.5); backdrop-filter: blur(6px); flex-wrap: wrap;
}
.play-bar h1 { margin: 0; font-family: var(--bc-font-display); font-weight: 400; font-size: clamp(1rem, 2.4vw, 1.3rem); }
.play-bar .bar-meta { font-family: var(--bc-font-mono); font-size: 0.5rem; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in srgb, var(--bc-text) 60%, transparent); }
.play-body { display: grid; grid-template-columns: 250px minmax(0, 1fr) 270px; gap: 14px; padding: 14px clamp(12px, 3vw, 26px) 20px; align-items: start; min-height: 0; }
.portal-signin { display: flex; gap: 6px; padding: 0 clamp(14px, 3vw, 34px) 10px; }
.portal-signin[hidden] { display: none; }
.portal-signin input { padding: 7px 10px; border: 1px solid var(--bc-line); background: rgba(9,8,7,.5); color: var(--bc-text); font-family: var(--bc-font-mono); font-size: .6rem; }
.panel {
  border: 1px solid var(--bc-line); background: rgba(9, 8, 7, 0.42);
  display: grid; gap: 10px; padding: 12px; align-content: start; border-radius: 2px;
}
.panel h2 { margin: 0; font-family: var(--bc-font-mono); font-size: 0.54rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bc-accent); }
.stage-card {
  background: linear-gradient(158deg, #f1e5ca, #d3bc98); color: #20130f;
  padding: 18px; border-radius: 2px; box-shadow: var(--bc-shadow-lift); display: grid; gap: 12px; align-content: start;
  min-height: 340px;
}
.stage-card h3 { margin: 0; font-family: var(--bc-font-display); font-weight: 400; font-size: 1.5rem; }
.surface-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.surface-tab {
  border: 1px solid var(--bc-line); background: transparent; color: var(--bc-text);
  padding: 7px 10px; cursor: pointer; font-family: var(--bc-font-mono);
  font-size: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.surface-tab[aria-pressed='true'] { border-color: var(--bc-accent); color: var(--bc-accent); background: rgba(185, 129, 45, 0.12); }
.evidence-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.evidence-item {
  display: grid; gap: 2px; padding: 8px 10px; cursor: pointer; text-align: left;
  background: rgba(232, 215, 184, 0.05); border: 1px solid var(--bc-line);
  color: var(--bc-text); font: inherit;
}
.evidence-item[data-found='true'] { border-color: rgba(110, 160, 90, 0.7); background: rgba(110, 160, 90, 0.1); }
.evidence-item b { font-family: var(--bc-font-mono); font-size: 0.5rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bc-accent); }
.evidence-item span { font-size: 0.86rem; line-height: 1.35; }
.evidence-item small { font-family: var(--bc-font-mono); font-size: 0.46rem; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--bc-text) 55%, transparent); }
/* anything inside the paper stage card must use ink colours, not the shell's */
.stage-card .evidence-item { background: rgba(32, 19, 15, 0.05); border-color: rgba(32, 19, 15, 0.2); color: #20130f; }
.stage-card .evidence-item b { color: #8d1419; }
.stage-card .evidence-item small { color: rgba(32, 19, 15, 0.58); }
.stage-card .evidence-item[data-found='true'] { border-color: rgba(70, 92, 40, 0.65); background: rgba(90, 120, 50, 0.1); }
.stage-card .muted { color: rgba(32, 19, 15, 0.62); }
.stage-card .kicker { color: #8d1419; }
.stage-card .mono { color: rgba(32, 19, 15, 0.7); }
.stage-card .doc-head { color: rgba(32, 19, 15, 0.6); }
.stage-card .image-strip img { border-color: rgba(32, 19, 15, 0.2); }
.app-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.app-tile { display: grid; gap: 5px; justify-items: center; text-align: center; font-family: var(--bc-font-mono); font-size: 0.46rem; letter-spacing: 0.06em; color: #2a1a14; }
.app-tile i {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(32, 19, 15, 0.14), rgba(32, 19, 15, 0.06));
  border: 1px solid rgba(32, 19, 15, 0.24); font-style: normal; font-size: 0.9rem; overflow: hidden;
}
.app-tile img { width: 100%; height: 100%; object-fit: cover; }
.doc-page { background: #f7efdd; border: 1px solid rgba(32, 19, 15, 0.18); padding: 14px; display: grid; gap: 8px; font-size: 0.9rem; line-height: 1.6; }
.doc-page .doc-head { display: flex; justify-content: space-between; font-family: var(--bc-font-mono); font-size: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(32, 19, 15, 0.6); }
.meter { height: 6px; background: rgba(232, 215, 184, 0.14); position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--bc-accent), var(--bc-accent-strong)); display: block; }
.accuse-box { display: grid; gap: 8px; }
.accuse-box ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.88rem; }
.hud-toggle { display: none; }
input, select, textarea {
  font: inherit; color: var(--bc-text); background: rgba(9, 8, 7, 0.45);
  border: 1px solid var(--bc-line); padding: 8px 10px; border-radius: 2px;
  font-family: var(--bc-font-mono); font-size: 0.72rem; letter-spacing: 0.02em;
}
input:focus-visible, select:focus-visible { outline: 1px solid var(--bc-accent); border-color: var(--bc-accent); }
.retro input, .retro select { background: #fff; color: #101010; border: 2px solid; border-color: #808080 #ffffff #ffffff #808080; font-family: Tahoma, Verdana, sans-serif; }

/* ---------------- mobile ---------------- */
@media (max-width: 900px) {
  .cabinet-body { grid-template-columns: 1fr; }
  .play-body { grid-template-columns: 1fr; padding: 12px 12px 90px; }
  .play-body .panel.side { display: none; }
  .hud-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    position: fixed; right: 14px; bottom: 16px; z-index: 40;
    padding: 12px 16px; border-radius: 999px;
    border: 1px solid var(--bc-accent); background: rgba(9, 8, 7, 0.82);
    color: var(--bc-accent); font-family: var(--bc-font-mono); font-size: 0.54rem;
    letter-spacing: 0.16em; text-transform: uppercase; backdrop-filter: blur(10px);
  }
  .hud {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px); z-index: 45;
    padding-top: max(16px, env(safe-area-inset-top));
    background: rgba(9, 8, 7, 0.72); backdrop-filter: blur(18px) saturate(1.1);
    border-left: 1px solid var(--bc-accent); padding: 16px; overflow: auto;
    transform: translateX(102%); transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
    display: grid; gap: 14px; align-content: start;
  }
  .hud[data-open='true'] { transform: none; }
  .hud-scrim {
    position: fixed; inset: 0; z-index: 44; background: rgba(3, 3, 3, 0.45);
    opacity: 0; pointer-events: none; transition: opacity 240ms ease;
  }
  .hud-scrim[data-open='true'] { opacity: 1; pointer-events: auto; }
  .folder-card { flex-basis: min(300px, 86vw); }
  .face-back .cols { grid-template-columns: 1fr; }
  .flip-face { min-height: 0; }
  .flip-face.back { position: static; transform: none; }
  .flip.open { transform: none; }
  .flip.open .flip-face.front { display: none; }
  .flip:not(.open) .flip-face.back { display: none; }
  .flip-face.back { transform: none; }
}

@media (max-width: 560px) {
  .portal { padding: 8px 12px; gap: 8px; }
  .portal-brand b { font-size: 0.92rem; white-space: nowrap; }
  .portal-brand small { display: none; }
  .portal-mark { width: 30px; height: 30px; font-size: 0.6rem; }
  .portal-nav { gap: 4px; }
  .chip { padding: 6px 8px; font-size: 0.5rem; letter-spacing: 0.1em; }
  .portal-nav .chip.ghost[title] { display: none; }
  .play-bar { padding: 8px 12px; }
  .play-bar h1 { font-size: 1rem; }
  .surface-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .surface-tabs::-webkit-scrollbar { display: none; }
  .stage-card { padding: 14px; }
  .retro-title { font-size: 0.66rem; }
}

/* ---------------- retro desktop skin ---------------- */
.retro { --bc-radius: 0px; }
.retro .app { background: #0a4a4a; }
.retro .portal {
  background: linear-gradient(180deg, #b8b8b8, #a0a0a0);
  border-bottom: 2px solid #808080; color: #101010; backdrop-filter: none;
}
.retro .portal-brand b { font-family: Tahoma, Verdana, sans-serif; font-weight: 700; }
.retro .portal-brand small { color: #000080; }
.retro .portal-mark { border-radius: 2px; background: #c3c3c3; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; color: #000080; box-shadow: none; font-family: Tahoma, sans-serif; }
.retro .chip {
  background: #c3c3c3; color: #101010; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff;
  border-radius: 0; font-family: Tahoma, Verdana, sans-serif; letter-spacing: 0.08em;
}
.retro .chip:hover { background: #d4d4d4; color: #000080; }
.retro .chip.primary { border-color: #ffffff #808080 #808080 #ffffff; color: #000080; }
.retro .desktop-wallpaper {
  background:
    linear-gradient(180deg, #0a4a4a, #063232);
  min-height: 100%;
}
.retro .display, .retro .face-back h2, .retro .folder-body h3, .retro .stage-card h3 {
  font-family: Tahoma, Verdana, sans-serif; font-weight: 700; letter-spacing: 0;
}
.retro .folder-card { background: #c3c3c3; color: #101010; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; }
.retro .folder-body .stamp { border-radius: 0; font-family: Tahoma, sans-serif; }
.retro .stage-card, .retro .flip-face, .retro .drawer-slip { background: #c3c3c3; color: #101010; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; box-shadow: none; }
.retro .panel { background: #c3c3c3; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; }
.retro .panel h2 { color: #000080; font-family: Tahoma, sans-serif; }
.retro .evidence-item { background: #d8d8d8; border: 1px solid #808080; color: #101010; }
.retro .evidence-item b { color: #000080; }
.retro .evidence-item small { color: #444; }
.retro .surface-tab { background: #c3c3c3; color: #101010; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; }
.retro .surface-tab[aria-pressed='true'] { background: #dcdcdc; color: #000080; }
.retro .play-bar { background: #b8b8b8; border-bottom: 2px solid #808080; color: #101010; }
.retro .play-bar h1 { font-family: Tahoma, sans-serif; font-weight: 700; }
.retro .play-bar .bar-meta { color: #333; }
.retro .btn { background: #c3c3c3; color: #101010; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff; }
.retro .btn.solid { background: #c3c3c3; color: #101010; }
.retro .doc-page { background: #ffffff; border: 1px solid #808080; }

/* the retro desktop window frame used by the play view */
.retro-desktop {
  position: relative; z-index: 2;
  min-height: calc(100vh - 66px);
  padding: 18px clamp(12px, 3vw, 28px) 56px;
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: clamp(12px, 2vw, 24px);
  align-items: start;
  background:
    radial-gradient(ellipse at 74% 8%, rgba(0, 0, 0, 0.24), transparent 60%),
    linear-gradient(180deg, #0a4a4a, #052e2e);
}
.desktop-icons { display: grid; gap: 6px; align-content: start; }
.desktop-window { max-width: 1180px; width: 100%; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); }
@media (max-width: 900px) {
  .retro-desktop { grid-template-columns: 1fr; padding: 10px 10px 20px; }
  .desktop-icons { grid-auto-flow: column; grid-auto-columns: 76px; overflow-x: auto; }
}
.retro-window { display: grid; gap: 0; border: 2px solid; border-color: #ffffff #404040 #404040 #ffffff; background: #c3c3c3; }
.retro-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff;
  padding: 5px 8px; font-family: Tahoma, Verdana, sans-serif; font-size: 0.72rem; font-weight: 700;
}
.retro-title .controls { display: flex; gap: 3px; }
.retro-title .controls span {
  width: 16px; height: 14px; display: grid; place-items: center;
  background: #c3c3c3; color: #101010; border: 1px solid; border-color: #ffffff #808080 #808080 #ffffff;
  font-size: 0.6rem; line-height: 1;
}
.retro-window .window-body { padding: 12px; display: grid; gap: 10px; }
.retro-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.retro-icon {
  display: grid; gap: 4px; justify-items: center; padding: 8px 4px; cursor: pointer;
  background: transparent; border: 1px dotted transparent; color: #fff; text-align: center;
  font-family: Tahoma, sans-serif; font-size: 0.6rem; line-height: 1.2;
}
.retro-icon:hover, .retro-icon[aria-pressed='true'] { background: rgba(0, 0, 128, 0.35); border-color: #fff; }
.retro-icon i {
  width: 34px; height: 30px; display: grid; place-items: center; font-style: normal; font-size: 1rem;
  background: #d8d8d8; color: #101010; border: 1px solid; border-color: #ffffff #808080 #808080 #ffffff;
}
.retro-taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 4px 6px;
  background: #c3c3c3; border-top: 2px solid #ffffff; color: #101010;
  font-family: Tahoma, Verdana, sans-serif; font-size: 0.62rem;
}
.retro-taskbar .start {
  padding: 4px 10px; background: #c3c3c3; border: 2px solid; border-color: #ffffff #808080 #808080 #ffffff;
  font-weight: 700; display: flex; align-items: center; gap: 6px;
}
.retro-taskbar .tasks { display: flex; gap: 6px; overflow: hidden; }
.retro-taskbar .task { padding: 4px 10px; background: #c3c3c3; border: 2px solid; border-color: #808080 #ffffff #ffffff #808080; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.retro-taskbar .tray { margin-left: auto; display: flex; gap: 8px; padding: 3px 8px; border: 1px solid; border-color: #808080 #ffffff #ffffff #808080; }
@media (max-width: 900px) { .retro-taskbar { display: none; } }

/* ---------------------------------------------------------------------------
   Motion
   Screens arrive as paper would: a small lift and fade, with the objects on the
   desk following one after another. View Transitions handles the cross-fade
   between shelves where the browser supports it.
   --------------------------------------------------------------------------- */
::view-transition-old(root) {
  animation: 200ms cubic-bezier(0.3, 0, 0.7, 1) both vt-out;
}
::view-transition-new(root) {
  animation: 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both vt-in;
}
@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.998);
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.996);
  }
}

.screen {
  animation: screen-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.screen > section > *,
.screen .stagger > * {
  animation: rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * var(--step, 55ms));
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.drawer:hover .drawer-bail,
.folder:hover .folder-tab {
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.case-folder.open {
  animation: folder-open 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: 50% 0%;
}
@keyframes folder-open {
  from {
    transform: perspective(1400px) rotateX(-8deg) translateY(10px);
    opacity: 0.4;
  }
}

/* phones: everything tappable clears 44px, and fixed chrome respects the notch */
@media (max-width: 720px) {
  .chip,
  .action,
  button.chip,
  .theme-picker button {
    min-height: 44px;
    min-width: 44px;
  }
  .portal-header {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
  .hud,
  .evidence-drawer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .app {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .screen > section > *,
  .screen .stagger > *,
  .case-folder.open,
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* The themed desktop also has to work on a phone: the window scrolls, the HUD
   button stays reachable, and the taskbar does not eat the bottom of the screen. */
@media (max-width: 720px) {
  .retro-desktop {
    min-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .retro-window.desktop-window {
    max-height: none;
  }
  .retro-taskbar {
    position: sticky;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 30;
  }
  /* the drawer is portalled to <body>, so these cannot be scoped to a theme */
  .hud-toggle {
    display: inline-flex;
    position: fixed;
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 60;
  }
  .hud {
    position: fixed;
    z-index: 61;
  }
  .hud-scrim {
    z-index: 59;
  }
}

/* Phones must never scroll sideways, whatever the theme. */
@media (max-width: 720px) {
  html,
  body,
  .app {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .retro-window.desktop-window,
  .retro-desktop .window-body,
  .stage,
  .desk {
    max-width: 100%;
  }
}

/* Studio authoring fields: label above, control full width — no squeezed inputs. */
.field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.field > span {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(216, 195, 155, 0.72);
}
.field input,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(216, 195, 155, 0.22);
  border-radius: 4px;
  color: inherit;
  font: inherit;
  padding: 10px 12px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(216, 195, 155, 0.55);
}
.field textarea {
  resize: vertical;
}

/* ---------------------------------------------------------------------------
   Collections gallery
   A curated shelf with covers, not a list. Each card is one series, its cover is
   the hero image of the first case inside it.
   --------------------------------------------------------------------------- */
.collections-screen {
  display: grid;
  gap: 28px;
  padding: 8px clamp(16px, 4vw, 56px) 64px;
  box-sizing: border-box;
}
.collections-head {
  display: grid;
  gap: 10px;
  max-width: 62ch;
}
.collections-head h1 {
  margin: 0;
}
.collections-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}
.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.collection-card {
  min-width: 0;
}
.collection-open {
  display: grid;
  grid-template-rows: 190px 1fr;
  width: 100%;
  padding: 0;
  text-align: left;
  background: linear-gradient(180deg, rgba(28, 22, 18, 0.92), rgba(14, 11, 9, 0.96));
  border: 1px solid rgba(216, 195, 155, 0.2);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  transition:
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 260ms ease,
    box-shadow 260ms ease;
}
.collection-open:hover,
.collection-open:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(216, 195, 155, 0.5);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.55);
  outline: none;
}
.collection-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(216, 195, 155, 0.07) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 30% 20%, rgba(216, 195, 155, 0.14), transparent 60%),
    #14100d;
}
.collection-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) contrast(1.05) brightness(0.85);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 320ms ease;
}
.collection-open:hover .collection-cover img {
  transform: scale(1.045);
  filter: saturate(1) contrast(1.05) brightness(0.95);
}
.collection-stamp,
.collection-count {
  position: absolute;
  bottom: 10px;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  background: rgba(10, 8, 6, 0.72);
  border: 1px solid rgba(216, 195, 155, 0.3);
}
.collection-stamp {
  left: 10px;
  color: #d9c79f;
}
.collection-count {
  right: 10px;
  color: #cbb894;
}
.collection-body {
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
}
.collection-year {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}
.collection-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.2;
}
.collection-tagline {
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0.82;
}
.collection-cases,
.collection-summary {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}
.collection-cta {
  margin-top: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d9c79f;
}

@media (max-width: 720px) {
  .collections-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .collection-open {
    grid-template-rows: 210px 1fr;
  }
  .collections-meta {
    gap: 10px;
  }
}

/* ---------------------------------------------------------------------------
   Terminal theme
   Same content, read off a CRT: phosphor glow, scanlines, monospace labels.
   --------------------------------------------------------------------------- */
.app[data-theme='terminal'] {
  --bc-radius: 2px;
}
.app[data-theme='terminal']::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 42;
  background: repeating-linear-gradient(
    180deg,
    rgba(53, 224, 127, 0.055) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: screen;
}
.app[data-theme='terminal']::after {
  background: radial-gradient(ellipse at 50% 45%, rgba(53, 224, 127, 0.1), transparent 62%);
}
.app[data-theme='terminal'] .picker,
.app[data-theme='terminal'] .panel,
.app[data-theme='terminal'] .stage-card,
.app[data-theme='terminal'] .evidence-item,
.app[data-theme='terminal'] .retro-window {
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(53, 224, 127, 0.25), 0 0 24px rgba(53, 224, 127, 0.09) inset;
}
.app[data-theme='terminal'] .kicker,
.app[data-theme='terminal'] .mono,
.app[data-theme='terminal'] .display {
  text-shadow: 0 0 12px rgba(53, 224, 127, 0.35);
  letter-spacing: 0.08em;
}
.app[data-theme='terminal'] .display::before {
  content: '> ';
  color: var(--bc-accent);
}
.app[data-theme='terminal'] .evidence-item[data-found='true'] {
  border-color: rgba(53, 224, 127, 0.7);
  background: rgba(53, 224, 127, 0.08);
}
.app[data-theme='terminal'] .portal {
  border-bottom: 1px solid rgba(53, 224, 127, 0.35);
}

/* ---------------------------------------------------------------------------
   Cabinet, second pass
   The drawer has to look like furniture: wood face, brass label holder, bail
   handle. The rail beside it explains the rules; the numbers live in the header
   instead of stranded at the bottom of the page.
   --------------------------------------------------------------------------- */
.cabinet-screen {
  padding: clamp(20px, 3vw, 40px) clamp(16px, 4vw, 56px) 72px;
  gap: clamp(20px, 3vw, 34px);
}
.cabinet-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cabinet-title {
  display: grid;
  gap: 10px;
  max-width: 60ch;
}
.cabinet-title .display {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.05;
}
.cabinet-lede {
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.06rem);
  line-height: 1.55;
  max-width: 54ch;
  color: color-mix(in srgb, var(--bc-text) 78%, transparent);
}
.cabinet-meta {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.cabinet-meta div {
  display: grid;
  gap: 2px;
}
.cabinet-meta dt {
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-accent) 80%, #fff);
  opacity: 0.85;
}
.cabinet-meta dd {
  margin: 0;
  font-family: var(--bc-font-display);
  font-size: 1.7rem;
  line-height: 1;
  color: var(--bc-text);
}

.cabinet-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

/* the carcass */
.cabinet-frame {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px 18px 0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.06) 22%, rgba(0, 0, 0, 0.5)),
    repeating-linear-gradient(
      92deg,
      rgba(120, 78, 38, 0.5) 0 3px,
      rgba(96, 60, 28, 0.5) 3px 7px,
      rgba(132, 88, 44, 0.46) 7px 11px
    ),
    #4a2f18;
  box-shadow:
    0 1px 0 rgba(255, 232, 190, 0.22) inset,
    0 -1px 0 rgba(0, 0, 0, 0.6) inset,
    0 26px 48px rgba(0, 0, 0, 0.55);
}
.cabinet-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  padding: 7px 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(233, 200, 133, 0.95), rgba(164, 122, 58, 0.95));
  color: #25190c;
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 2px 6px rgba(0, 0, 0, 0.45);
}
.cabinet-plate span:last-child {
  opacity: 0.7;
}
.cabinet-plinth {
  height: 14px;
  margin: 0 -18px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.75));
}

/* drawers */
.cabinet {
  display: grid;
  gap: 10px;
}
.cabinet .drawer {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.drawer-face {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 46%) 1fr auto;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  min-height: 104px;
  padding: 14px 22px 14px 16px;
  border-radius: 4px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 226, 176, 0.16) 0%,
      rgba(146, 100, 52, 0.05) 26%,
      rgba(0, 0, 0, 0.34) 100%
    ),
    repeating-linear-gradient(
      90deg,
      rgba(150, 101, 52, 0.55) 0 4px,
      rgba(116, 74, 34, 0.55) 4px 9px
    ),
    #54351b;
  box-shadow:
    0 1px 0 rgba(255, 234, 196, 0.3) inset,
    0 -2px 6px rgba(0, 0, 0, 0.5) inset,
    0 6px 14px rgba(0, 0, 0, 0.35);
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 240ms ease,
    filter 240ms ease;
}
.cabinet .drawer:hover .drawer-face,
.cabinet .drawer:focus-visible .drawer-face {
  transform: translateY(3px) translateX(4px);
  box-shadow:
    0 2px 0 rgba(255, 234, 196, 0.34) inset,
    0 -2px 6px rgba(0, 0, 0, 0.5) inset,
    0 16px 30px rgba(0, 0, 0, 0.55);
  filter: brightness(1.08);
  outline: none;
}

/* the label holder screwed to the face */
.drawer-label {
  display: block;
  padding: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #e3bf7d, #a97f3d 62%, #7d5a26);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 3px 8px rgba(0, 0, 0, 0.55);
}
.drawer-card {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f6efdc, #e6dcc0);
  color: #241a12;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset;
}
.drawer-card b {
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a2b22;
}
.drawer-name {
  font-family: var(--bc-font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.15;
}
.drawer-card i {
  font-family: var(--bc-font-mono);
  font-size: 0.6rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(36, 26, 18, 0.66);
}
.drawer-teaser {
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(246, 236, 216, 0.8);
  align-self: center;
  max-width: 34ch;
}

/* brass bail handle */
.drawer-pull {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 46px;
}
.drawer-pull .mount {
  position: absolute;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffeec2, #b58a45 70%, #6f4c1c);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.drawer-pull .mount.left {
  left: 8px;
}
.drawer-pull .mount.right {
  right: 8px;
}
.drawer-pull .bail {
  position: absolute;
  top: 10px;
  width: 58px;
  height: 26px;
  border: 4px solid transparent;
  border-radius: 0 0 26px 26px;
  border-bottom-color: #d9b071;
  border-left-color: #c39a55;
  border-right-color: #c39a55;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  transition: transform 200ms ease;
}
.cabinet .drawer:hover .drawer-pull .bail {
  transform: translateY(2px) scaleY(0.94);
}

/* rail */
.cabinet-rail {
  display: grid;
  gap: 22px;
  padding-top: 6px;
}
.rail-block {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 195, 155, 0.24);
}
.rail-block h2 {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-accent) 85%, #fff);
}
.rail-block p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--bc-text) 78%, transparent);
}
.rail-link {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 195, 155, 0.24);
  text-decoration: none;
  color: inherit;
}
.rail-link span {
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.62;
}
.rail-link b {
  font-family: var(--bc-font-display);
  font-size: 1.3rem;
  color: color-mix(in srgb, var(--bc-accent) 88%, #fff);
}
.rail-link i {
  font-style: normal;
  font-size: 0.82rem;
  opacity: 0.72;
}
.rail-link:hover b {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .cabinet-body {
    grid-template-columns: 1fr;
  }
  .drawer-face {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 96px;
    padding: 12px 14px;
    gap: 12px;
  }
  .drawer-teaser {
    display: none;
  }
  .cabinet-meta dd {
    font-size: 1.35rem;
  }
}

/* ---------------------------------------------------------------------------
   Pack screen, second pass
   Header, then the rail right under it. Folders are folder-shaped: a tab, a
   cover, a title, what's inside, and one honest stamp.
   --------------------------------------------------------------------------- */
.pack-screen {
  padding: clamp(18px, 2.6vw, 34px) clamp(16px, 4vw, 56px) 56px;
  align-content: start;
  gap: clamp(22px, 3vw, 34px);
  min-height: 0;
}
.pack-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(216, 195, 155, 0.18);
}
.pack-title {
  display: grid;
  gap: 8px;
  max-width: 62ch;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-text) 62%, transparent);
}
.crumb button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crumb button:hover {
  color: var(--bc-accent);
}
.pack-title .display {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.05;
  text-wrap: balance;
}
.pack-tagline {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  line-height: 1.55;
  color: color-mix(in srgb, var(--bc-text) 76%, transparent);
}
.pack-side {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}
.pack-count {
  display: grid;
  gap: 2px;
  margin: 0;
  text-align: right;
}
.pack-count b {
  font-family: var(--bc-font-display);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--bc-text);
}
.pack-count span,
.pack-count i {
  font-family: var(--bc-font-mono);
  font-size: 0.54rem;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.66;
}
.rail-nav {
  display: flex;
  gap: 6px;
}
.rail-nav .chip {
  min-width: 40px;
  justify-content: center;
}

/* the rail itself: folders you flip through */
.rail {
  display: flex;
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 26px 4px 18px;
  margin-top: -26px;
  scrollbar-width: thin;
}
.folder-card {
  position: relative;
  flex: 0 0 clamp(228px, 24vw, 268px);
  display: grid;
  grid-template-rows: 148px 1fr;
  padding: 0;
  border: 1px solid rgba(216, 195, 155, 0.22);
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(180deg, #efe4c9, #e2d3b0);
  color: #241a12;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 240ms ease;
}
/* the tab that makes it a folder rather than a card */
.folder-tab {
  position: absolute;
  top: 0;
  left: 14px;
  transform: translateY(-100%);
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 22px;
  padding: 0 10px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #e7d9b8, #d9c69f);
  color: rgba(36, 26, 18, 0.72);
  font-family: var(--bc-font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.4) inset;
}
.folder-card:hover,
.folder-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.55);
  outline: none;
}
.folder-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1b1512;
}
.folder-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) brightness(0.92);
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 300ms ease;
}
.folder-card:hover .folder-thumb img {
  transform: scale(1.04);
  filter: saturate(1) brightness(1);
}
.folder-stamp {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 7px;
  border-radius: 2px;
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(10, 8, 6, 0.74);
  border: 1px solid rgba(216, 195, 155, 0.45);
  color: #e8d7b8;
}
.folder-stamp.partial {
  border-color: rgba(180, 60, 40, 0.7);
  color: #ffb9a4;
}
.folder-body {
  display: grid;
  gap: 6px;
  padding: 14px 14px 12px;
  align-content: start;
}
.folder-body h3 {
  margin: 0;
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: 1.16rem;
  line-height: 1.2;
}
.folder-body .meta {
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(36, 26, 18, 0.62);
}
.folder-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(36, 26, 18, 0.16);
}
.folder-theme {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(36, 26, 18, 0.6);
}
.folder-warn {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8d1419;
  text-align: right;
}

@media (max-width: 720px) {
  .pack-head {
    align-items: flex-start;
  }
  .pack-side {
    width: 100%;
    justify-content: space-between;
  }
  .folder-card {
    flex: 0 0 78vw;
    grid-template-rows: 132px 1fr;
  }
  .rail {
    padding-bottom: 8px;
  }
}

/* folder tab lives in the flow so it cannot be clipped by the cover */
.folder-card {
  overflow: hidden;
  grid-template-rows: 24px 148px 1fr;
  padding-top: 0;
}
.folder-tab {
  position: static;
  transform: none;
  width: 46%;
  height: 24px;
  border-radius: 4px 6px 0 0;
  justify-self: start;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 1px 0 0 rgba(36, 26, 18, 0.12);
}
.folder-thumb {
  grid-row: 2;
}
.folder-body {
  grid-row: 3;
}
.rail {
  padding-top: 4px;
  margin-top: 0;
}
.pack-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 195, 155, 0.18);
  font-family: var(--bc-font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-text) 58%, transparent);
}
.pack-foot-hint {
  text-transform: none;
  letter-spacing: 0.04em;
  font-family: var(--bc-font);
  font-size: 0.82rem;
  opacity: 0.7;
}
.cabinet-title .display {
  text-wrap: balance;
}

/* folder tab: a small numbered tab on the card's own stock, not a pale slab */
.folder-tab {
  width: 58px;
  padding: 0;
  background: linear-gradient(180deg, #efe4c9, #e0d0ab);
  color: rgba(36, 26, 18, 0.66);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  border-radius: 5px 10px 0 0;
}

/* the pack page fills the viewport instead of ending in a void */
.pack-screen {
  grid-template-rows: auto 1fr auto;
  min-height: calc(100dvh - 72px);
  align-content: stretch;
}
.rail {
  align-items: center;
}
@media (max-width: 720px) {
  .pack-screen {
    min-height: 0;
    grid-template-rows: auto auto auto;
  }
}

/* the tab number must be legible at a glance */
.folder-tab {
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: rgba(36, 26, 18, 0.8);
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Case folder, second pass
   A bounded cover that flips, the file beside it, images in a strip, actions in
   a bar. Nothing is allowed to become a full-screen wallpaper again.
   --------------------------------------------------------------------------- */
.case-screen {
  padding: clamp(16px, 2.4vw, 30px) clamp(16px, 4vw, 56px) 92px;
  align-content: start;
  gap: clamp(16px, 2.4vw, 26px);
}
.case-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(216, 195, 155, 0.18);
}
.case-head-title {
  display: grid;
  gap: 6px;
  max-width: 64ch;
}
.case-head-title .display {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.06;
  text-wrap: balance;
}
.case-sub {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-text) 60%, transparent);
}
.case-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-body {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
}

/* the cover: bounded, so it can never eat the page */
.case-cover-wrap {
  display: grid;
  gap: 8px;
}
.case-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 46vh;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}
.case-cover.is-open {
  transform: perspective(1600px) rotateY(-4deg) rotateX(1.5deg);
}
.case-cover-face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: clamp(14px, 2vw, 22px);
  backface-visibility: hidden;
}
.case-cover-face.front {
  cursor: pointer;
}
.case-cover-face.front img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-blank {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(216, 195, 155, 0.08) 0 2px, transparent 2px 7px), #1b1512;
}
.cover-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 9, 7, 0.05) 24%, rgba(12, 9, 7, 0.88) 100%);
}
.cover-copy {
  position: relative;
  display: grid;
  gap: 5px;
  color: #f6ecd8;
}
.cover-kicker {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 236, 216, 0.74);
}
.cover-copy h2 {
  margin: 0;
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}
.cover-meta {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 236, 216, 0.66);
}
.case-cover-face.back {
  background: linear-gradient(180deg, #efe4c9, #ded0ac);
  color: #241a12;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
}
.case-cover-face.back .kicker {
  color: #8a2b22;
}
.cover-logline {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.5;
}
.cover-facts {
  display: flex;
  gap: 18px;
  margin: 4px 0 0;
}
.cover-facts div {
  display: grid;
  gap: 1px;
}
.cover-facts dt {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
}
.cover-facts dd {
  margin: 0;
  font-family: var(--bc-font-display);
  font-size: 1.25rem;
}
.cover-hint {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* the file itself */
.case-file {
  display: grid;
  gap: 18px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid rgba(216, 195, 155, 0.18);
  border-radius: 5px;
  background: rgba(18, 14, 11, 0.55);
}
.file-block {
  display: grid;
  gap: 8px;
}
.file-block h2 {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-accent) 82%, #fff);
}
.case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.case-facts div {
  display: grid;
  gap: 2px;
}
.case-facts dt {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}
.case-facts dd {
  margin: 0;
  font-size: 0.92rem;
}
.case-facts dd.hash {
  font-family: var(--bc-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.people {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(216, 195, 155, 0.2);
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.4);
}
.person img,
.person > b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: rgba(216, 195, 155, 0.18);
  font-size: 0.8rem;
}
.person span {
  display: grid;
  line-height: 1.2;
}
.person span b {
  font-size: 0.82rem;
}
.person span small {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
}
.chapter-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.file-warn {
  margin: 0;
  padding: 8px 10px;
  border-left: 2px solid #b43c28;
  background: rgba(180, 60, 40, 0.09);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #f2c7b8;
}

/* recovered images */
.case-strip {
  display: grid;
  gap: 8px;
}
.case-strip h2 {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-accent) 82%, #fff);
}
.strip-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(110px, 12vw, 150px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.strip-row img {
  width: 100%;
  height: 104px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(216, 195, 155, 0.22);
  filter: saturate(0.92) brightness(0.95);
}

/* action bar */
.case-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 56px);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(10, 8, 6, 0.72), rgba(10, 8, 6, 0.96));
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(216, 195, 155, 0.22);
}
.theme-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.theme-pick > span {
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.theme-pick .chip[data-active='true'] {
  border-color: var(--bc-accent);
  color: var(--bc-accent);
  background: color-mix(in srgb, var(--bc-accent) 12%, transparent);
}

@media (max-width: 900px) {
  .case-body {
    grid-template-columns: 1fr;
  }
  .case-cover {
    max-height: 38vh;
  }
  .case-actions .btn.solid {
    flex: 1 1 100%;
  }
}

/* the cover is a real flip: two faces, one visible at a time */
.case-cover {
  perspective: 1600px;
  transform-style: preserve-3d;
  transform: none;
}
.case-cover-face {
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 320ms ease;
}
.case-cover-face.front {
  transform: rotateY(0deg);
}
.case-cover-face.back {
  transform: rotateY(180deg);
  opacity: 0;
}
.case-cover.is-open .case-cover-face.front {
  transform: rotateY(-180deg);
  opacity: 0;
}
.case-cover.is-open .case-cover-face.back {
  transform: rotateY(0deg);
  opacity: 1;
}
.case-cover.is-open {
  transform: none;
}

/* chips that sit on paper need ink, not shell colours */
.case-cover-face.back .chip {
  justify-self: start;
  margin-top: 4px;
  border-color: rgba(36, 26, 18, 0.35);
  color: #241a12;
  background: rgba(36, 26, 18, 0.06);
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.case-cover-face.back .chip:hover {
  border-color: #8a2b22;
  color: #8a2b22;
}

/* file labels were ink-on-ink; they are brass, always readable */
.file-block h2,
.case-strip h2 {
  color: #d9c49c;
}
.case-facts dt,
.cover-facts dt {
  color: rgba(216, 195, 155, 0.7);
}

/* paper labels on paper: ink, not brass */
.case-cover-face.back .cover-facts dt {
  color: rgba(36, 26, 18, 0.62);
}

/* ---------------------------------------------------------------------------
   Codex Noir shell — cool ink, aged gold, paper only on the evidence.
   --------------------------------------------------------------------------- */
:root {
  --bc-radius: 5px;
}
.app {
  background:
    radial-gradient(1120px 620px at 78% -12%, rgba(201, 162, 39, 0.1), transparent 62%),
    radial-gradient(880px 520px at 6% 108%, rgba(158, 43, 37, 0.12), transparent 66%),
    #0a0b0e;
  color: var(--bc-text);
}
.portal {
  border-bottom: 1px solid var(--bc-line);
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(16px);
}
.portal-mark {
  background: linear-gradient(160deg, #c9a227, #8a6f18);
  color: #0a0b0e;
  font-weight: 700;
}
.portal-brand b {
  font-family: var(--bc-font-display);
  letter-spacing: 0.01em;
}
.portal-nav .chip[data-active='true'] {
  border-color: rgba(201, 162, 39, 0.7);
  color: #f0dfa8;
  background: rgba(201, 162, 39, 0.12);
}
.portal-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.portal-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--bc-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--bc-text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.portal-user > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(160deg, #c9a227, #8a6f18);
  color: #0a0b0e;
  font-weight: 700;
  font-size: 0.78rem;
}
.portal-user:hover {
  border-color: rgba(201, 162, 39, 0.6);
}
.portal-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 200px;
  padding: 10px;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: #101218;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}
.portal-menu p {
  margin: 0 0 8px;
  font-family: var(--bc-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
  word-break: break-all;
}
.portal-menu button {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--bc-line);
  border-radius: 3px;
  background: transparent;
  color: var(--bc-text);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.portal-menu button:hover {
  border-color: rgba(201, 162, 39, 0.6);
  color: #f0dfa8;
}
.portal-guest {
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* buttons in the noir shell */
.btn.solid {
  background: linear-gradient(170deg, #d9b334, #a5821c);
  color: #0a0b0e;
  border-color: transparent;
  font-weight: 600;
}
.btn.solid:hover {
  background: linear-gradient(170deg, #e6c245, #b28d1f);
}
.btn.ghost {
  border: 1px solid var(--bc-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--bc-text);
}
.btn.ghost:hover {
  border-color: rgba(201, 162, 39, 0.6);
  color: #f0dfa8;
}

/* ---------------------------------------------------------------------------
   The door
   --------------------------------------------------------------------------- */
.signin-screen {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 72px);
  padding: 40px 20px;
}
.signin-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--bc-line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 23, 30, 0.96), rgba(12, 14, 18, 0.98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.signin-card .display {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
}
.signin-lede {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--bc-text) 76%, transparent);
}
.signin-form {
  display: grid;
  gap: 12px;
}
.signin-form label {
  display: grid;
  gap: 5px;
}
.signin-form label span {
  font-family: var(--bc-font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.62;
}
.signin-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bc-line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--bc-text);
  font: inherit;
  font-size: 0.94rem;
}
.signin-form input:focus {
  outline: none;
  border-color: rgba(201, 162, 39, 0.7);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.14);
}
.signin-alt {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: color-mix(in srgb, var(--bc-text) 68%, transparent);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.signin-alt:hover {
  color: #f0dfa8;
}
.signin-note {
  margin: 0;
  padding: 8px 10px;
  border-left: 2px solid var(--bc-accent-strong);
  background: rgba(158, 43, 37, 0.12);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #f3c3b6;
}
.signin-foot {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--bc-line);
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.66;
}
.signin-foot a {
  color: #f0dfa8;
}

/* ---------------------------------------------------------------------------
   Portal dashboard
   --------------------------------------------------------------------------- */
.portal-screen {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
  padding: clamp(20px, 3vw, 38px) clamp(16px, 4vw, 56px) 64px;
  align-content: start;
}
.portal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bc-line);
}
.portal-hero .display {
  margin: 4px 0 6px;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.04;
}
.portal-lede {
  margin: 0;
  max-width: 56ch;
  font-size: 0.96rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--bc-text) 74%, transparent);
}
.portal-hero-actions {
  display: flex;
  gap: 10px;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: clamp(18px, 2.6vw, 32px);
  align-items: start;
}
.portal-main {
  display: grid;
  gap: 18px;
}
.portal-side {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: rgba(255, 255, 255, 0.02);
}

/* continue card */
.resume-card {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: linear-gradient(140deg, rgba(28, 32, 41, 0.94), rgba(14, 16, 21, 0.96));
}
.resume-card.empty {
  grid-template-columns: 1fr;
}
.resume-art img {
  width: 100%;
  height: 100%;
  min-height: 168px;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) brightness(0.9);
}
.resume-copy {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: clamp(16px, 2vw, 24px);
}
.resume-copy h2 {
  margin: 0;
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.12;
}
.resume-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bc-text) 66%, transparent);
}
.resume-meta .bar {
  display: block;
  width: 92px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.resume-meta .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c9a227, #f0dfa8);
}
.resume-copy .btn {
  justify-self: start;
}

/* tiles */
.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.tile {
  display: grid;
  gap: 3px;
  padding: 16px;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: rgba(255, 255, 255, 0.02);
  color: var(--bc-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
}
.tile:hover {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.06);
  transform: translateY(-2px);
}
.tile-count {
  font-family: var(--bc-font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: #f0dfa8;
}
.tile-label {
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tile-note {
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.6;
}

/* featured */
.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: rgba(10, 12, 16, 0.8);
}
.feature-art img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
}
.feature-copy {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: clamp(16px, 2vw, 26px);
}
.feature-copy h2 {
  margin: 0;
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  line-height: 1.12;
}
.feature-logline {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--bc-text) 74%, transparent);
}
.feature-copy .btn {
  justify-self: start;
}

/* side blocks */
.side-block {
  display: grid;
  gap: 8px;
}
.side-block + .side-block {
  padding-top: 14px;
  border-top: 1px solid var(--bc-line);
}
.side-block h2 {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9c49c;
}
.pack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.pack-list button {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--bc-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.pack-list button:hover {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.06);
}
.pack-list b {
  font-weight: 500;
  font-size: 0.9rem;
}
.pack-list span {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}
.side-link {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--bc-line);
  border-radius: 4px;
  color: var(--bc-text);
  text-decoration: none;
  font-size: 0.9rem;
}
.side-link:hover {
  border-color: rgba(201, 162, 39, 0.5);
  color: #f0dfa8;
}
.side-link span {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}
.side-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.6;
}
.side-account {
  margin: 0;
  display: grid;
  gap: 2px;
  font-size: 0.88rem;
}
.side-account span {
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
  word-break: break-all;
}

/* ---------------------------------------------------------------------------
   Orders
   --------------------------------------------------------------------------- */
.orders-screen {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 38px) clamp(16px, 4vw, 56px) 64px;
  align-content: start;
}
.orders-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bc-line);
}
.orders-head .display {
  margin: 4px 0 6px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}
.orders-lede {
  margin: 0;
  max-width: 62ch;
  font-size: 0.94rem;
  line-height: 1.6;
  opacity: 0.74;
}
.orders-empty {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: clamp(20px, 3vw, 34px);
  border: 1px dashed var(--bc-line);
  border-radius: var(--bc-radius);
  background: rgba(255, 255, 255, 0.015);
}
.orders-empty-mark {
  margin: 0;
  font-family: var(--bc-font-display);
  font-size: 1.4rem;
  color: #f0dfa8;
}
.orders-empty p {
  margin: 0;
  max-width: 62ch;
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.74;
}
.orders-plan {
  display: grid;
  gap: 8px;
  max-width: 72ch;
}
.orders-plan h2 {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9c49c;
}
.orders-plan ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .resume-card,
  .feature-card {
    grid-template-columns: 1fr;
  }
  .resume-art img,
  .feature-art img {
    min-height: 150px;
    max-height: 200px;
  }
  .portal-hero-actions {
    width: 100%;
  }
  .portal-hero-actions .btn {
    flex: 1;
  }
  .portal-user b {
    display: none;
  }
}

/* featured art is a band, not a billboard */
.feature-art {
  max-height: 260px;
  overflow: hidden;
}
.feature-art img {
  min-height: 0;
  height: 260px;
}
.resume-art {
  max-height: 220px;
  overflow: hidden;
}
.resume-art img {
  min-height: 0;
  height: 100%;
}
/* the LoreHaven chip needs normal tracking or it reads LORE HAVEN */
.portal-nav a.chip {
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------------------------
   Phone header: two rows and a scrollable nav, never three cramped lines.
   --------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .portal {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 14px 0;
  }
  .portal-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    /* the desktop rule is flex-end; inside a scroller that pushes the first
       chip out of reach on the left, so the row has to start at the left edge */
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .portal-nav::-webkit-scrollbar {
    display: none;
  }
  .portal-nav .chip {
    flex: 0 0 auto;
  }
  .portal-right {
    margin-left: auto;
  }
  .portal-brand small {
    display: none;
  }
}

/* phone type must not run off the page */
@media (max-width: 760px) {
  .portal-hero .display,
  .orders-head .display {
    font-size: clamp(1.45rem, 7.4vw, 2rem);
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .portal-lede,
  .orders-lede {
    font-size: 0.9rem;
  }
  .resume-meta {
    display: grid;
    gap: 6px;
    letter-spacing: 0.1em;
    line-height: 1.5;
    min-width: 0;
  }
  .resume-meta .bar {
    width: 100%;
  }
  .portal-hero-actions {
    gap: 8px;
  }
  .portal-hero-actions .btn {
    flex: 1 1 140px;
    min-width: 0;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
  }
  .portal {
    padding-right: 12px;
  }
  .resume-copy,
  .feature-copy {
    min-width: 0;
  }
}

/* flex and grid children default to min-width:auto, which is what pushed the
   hero 21px past a 390px phone. Nothing in the portal may do that. */
.portal-screen > *,
.portal-hero > *,
.portal-grid > *,
.portal-main > *,
.orders-screen > *,
.orders-head > *,
.case-head > *,
.pack-head > * {
  min-width: 0;
}

/* The app shell is a grid; an auto column sizes to its widest child's min-content,
   and the header's nav row is what made a 390px phone lay out at 427px. */
.app {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
}

/* ---------------------------------------------------------------------------
   The play desk: evidence as objects you pick up.
   --------------------------------------------------------------------------- */
.play-screen {
  padding: 0 !important;
  gap: 0 !important;
  min-height: calc(100dvh - 72px);
  align-content: start;
}
.play-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--bc-line);
  background: rgba(8, 9, 12, 0.6);
}
.play-bar h1 {
  margin: 0;
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
}
.play-bar .bar-meta {
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* the shelf of objects */
.desk-objects {
  display: flex;
  gap: clamp(10px, 1.4vw, 18px);
  padding: 14px clamp(16px, 4vw, 44px) 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.desk-objects::-webkit-scrollbar {
  display: none;
}
.desk-object {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--bc-text);
  font: inherit;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.desk-object:hover {
  background: rgba(255, 255, 255, 0.03);
}
.desk-object[aria-pressed='true'] {
  border-color: rgba(201, 162, 39, 0.55);
  background: rgba(201, 162, 39, 0.09);
  transform: translateY(-2px);
}
.object-art {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.object-label {
  display: grid;
  gap: 1px;
  text-align: left;
}
.object-label b {
  font-weight: 500;
  font-size: 0.88rem;
}
.object-label small {
  font-family: var(--bc-font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* folder */
.obj-folder {
  position: relative;
  width: 28px;
  height: 20px;
  border-radius: 2px 3px 2px 2px;
  background: linear-gradient(180deg, #d8c39b, #a98f5f);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.obj-folder::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 12px;
  height: 5px;
  border-radius: 2px 2px 0 0;
  background: #cbb388;
}
.obj-folder i {
  position: absolute;
  inset: 3px 3px auto 3px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}
/* phone */
.obj-phone {
  position: relative;
  width: 17px;
  height: 28px;
  border-radius: 3px;
  border: 1.5px solid #cfd6e2;
  background: linear-gradient(180deg, #2a3040, #10141c);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}
.obj-phone i {
  position: absolute;
  inset: 3px 2px 5px;
  border-radius: 1px;
  background: linear-gradient(160deg, #6f8fa8, #26313f);
}
/* paper stack */
.obj-papers {
  position: relative;
  width: 24px;
  height: 26px;
}
.obj-papers i {
  position: absolute;
  left: 0;
  width: 22px;
  height: 24px;
  border-radius: 1px;
  background: #efe6d2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.obj-papers i:nth-child(1) { transform: rotate(-6deg) translate(1px, 1px); }
.obj-papers i:nth-child(2) { transform: rotate(3deg) translate(2px, 0); background: #f7f1e3; }
.obj-papers i:nth-child(3) { transform: rotate(-1deg); background: #fffaf0; }
/* prints */
.obj-prints {
  position: relative;
  width: 26px;
  height: 24px;
}
.obj-prints i {
  position: absolute;
  width: 16px;
  height: 19px;
  border: 2px solid #fffaf0;
  border-bottom-width: 5px;
  background: linear-gradient(160deg, #4a5b52, #1d2621);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.obj-prints i:nth-child(1) { transform: rotate(-9deg) translate(0, 2px); }
.obj-prints i:nth-child(2) { transform: rotate(4deg) translate(6px, 0); }
.obj-prints i:nth-child(3) { transform: rotate(-3deg) translate(11px, 3px); }

/* the desk surface */
.play-body {
  display: grid;
  grid-template-columns: minmax(200px, 252px) minmax(0, 1fr) minmax(200px, 252px);
  gap: clamp(12px, 1.6vw, 20px);
  align-items: start;
  padding: 8px clamp(16px, 4vw, 44px) 40px;
  min-width: 0;
}
.play-body > * {
  min-width: 0;
}
.desk-stage {
  padding: clamp(14px, 2vw, 26px);
  border-radius: 6px;
  border: 1px solid rgba(206, 214, 228, 0.14);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(180deg, rgba(24, 28, 36, 0.9), rgba(12, 14, 19, 0.96));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-height: 420px;
}
.desk-stage[data-surface='file'] {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 62%),
    linear-gradient(180deg, #f5eddd, #e6dbc4);
  border-color: rgba(36, 26, 18, 0.25);
  color: #1d1811;
}
.desk-stage[data-surface='file'] .kicker,
.desk-stage[data-surface='file'] h2,
.desk-stage[data-surface='file'] h3 {
  color: #7a2418;
}
.desk-stage[data-surface='file'] .display {
  color: #14100b;
}
.panel.side {
  padding: 14px;
  border: 1px solid var(--bc-line);
  border-radius: 6px;
  background: rgba(10, 12, 16, 0.6);
}
.panel.side h2 {
  margin: 0 0 8px;
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d9c49c;
}

@media (max-width: 1100px) {
  .play-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .play-body .panel.side:first-child {
    order: 2;
  }
}

/* ---------------------------------------------------------------------------
   The device is a phone, not a list on paper.
   --------------------------------------------------------------------------- */
.phone-shell {
  display: grid;
  place-items: center;
  padding: 4px 0;
}
.phone-screen {
  position: relative;
  width: min(374px, 100%);
  height: min(74vh, 700px);
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 16px 34px;
  border-radius: 34px;
  border: 9px solid #0c0e12;
  background: linear-gradient(180deg, #12151c, #0a0c11 62%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  color: #e6e8ee;
}
.phone-screen::-webkit-scrollbar {
  display: none;
}
.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--bc-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.phone-status .pill {
  width: 54px;
  height: 14px;
  border-radius: 999px;
  background: #05070a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-home {
  position: absolute;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  width: 116px;
  height: 4px;
  border-radius: 999px;
  background: rgba(230, 232, 238, 0.45);
}
.phone-screen h3 {
  margin: 0;
  font-family: var(--bc-font-display);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.15;
}
.phone-screen .kicker {
  color: #d9c49c;
}
.phone-screen .app-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 6px;
}
.phone-screen .app-tile {
  display: grid;
  gap: 4px;
  justify-items: center;
  color: inherit;
}
.phone-screen .app-tile i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  overflow: hidden;
}
.phone-screen .app-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phone-screen .app-tile span {
  font-family: var(--bc-font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.66;
}
.phone-screen .evidence-item {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  color: #e6e8ee;
}
.phone-screen .evidence-item b {
  color: #d9c49c;
}
@media (max-width: 760px) {
  .phone-screen {
    height: min(64vh, 560px);
    border-width: 7px;
    border-radius: 28px;
  }
}

/* ---------------------------------------------------------------------------
   Retro desktop, taken to the same standard as the noir desk:
   a patterned wallpaper, pixel icons, a real 95 window with menu and status bar,
   and MS Sans style typography instead of Times.
   --------------------------------------------------------------------------- */
.retro-desktop {
  position: relative;
  min-height: calc(100dvh - 72px);
  padding: 20px 22px 70px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  background-color: #0a4a4a;
  background-image:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.05), transparent 42%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 4px),
    linear-gradient(160deg, #0d5858, #063a3a 70%);
  font-family: Tahoma, Verdana, 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #000;
}
.retro-desktop * {
  font-family: inherit;
}

/* desktop icons: beveled tiles with pixel-ish glyphs */
.desktop-icons {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: center;
}
.retro-icon {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 76px;
  padding: 4px 2px;
  border: 1px dotted transparent;
  background: none;
  color: #fff;
  font-size: 10.5px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}
.retro-icon:focus-visible,
.retro-icon[aria-pressed='true'] {
  border-color: #fff;
  background: rgba(0, 0, 128, 0.45);
}
.retro-icon i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #000;
  background: #c0c0c0;
  box-shadow: inset -2px -2px 0 #808080, inset 2px 2px 0 #fff;
}
.retro-icon i span {
  display: block;
  width: 20px;
  height: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #000;
}
.px-file span {
  background: linear-gradient(#ffe9a8, #d8b356);
  border-top: 4px solid #c9a227;
}
.px-device span {
  width: 12px;
  height: 20px;
  background: #101820;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #4a6d86;
}
.px-documents span {
  background: repeating-linear-gradient(#fff 0 3px, #b8b8b8 3px 4px);
}
.px-images span {
  background: linear-gradient(160deg, #4a7f6a 40%, #1f4a3c);
}
.px-locker span {
  background: #808080;
  box-shadow: inset 0 0 0 1px #000, inset 0 -7px 0 #5a5a5a;
}

/* the window */
.retro-window.desktop-window {
  margin: 0;
  width: 100%;
  max-width: 1180px;
  border: 1px solid #000;
  background: #c0c0c0;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf, 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.retro-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 4px 3px 5px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.retro-title .controls span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 14px;
  border: 1px solid #000;
  background: #c0c0c0;
  color: #000;
  font-size: 9px;
  font-weight: 700;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
.retro-menu {
  display: flex;
  gap: 14px;
  padding: 2px 8px 3px;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
  font-size: 11.5px;
}
.retro-menu span {
  cursor: default;
  padding: 1px 2px;
}
.retro-menu span:hover {
  background: #000080;
  color: #fff;
}
.window-body {
  margin: 3px;
  padding: 12px 14px 16px;
  border: 2px inset #dfdfdf;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
  max-height: calc(100dvh - 260px);
  overflow-y: auto;
}
/* 95 typography: bold sans, no serif anywhere, no letterspaced mono headings */
.retro-desktop h3,
.retro-desktop h2,
.retro-desktop .display {
  font-family: Tahoma, Verdana, sans-serif !important;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
}
.retro-desktop h3 {
  font-size: 15px;
  margin: 6px 0 8px;
}
.retro-desktop .kicker,
.retro-desktop .bar-meta {
  font-family: Tahoma, Verdana, sans-serif !important;
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
  color: #000080;
  font-weight: 700;
}
.retro-desktop .surface-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}
.retro-desktop .surface-tab {
  padding: 3px 10px;
  border: 1px solid #000;
  background: #c0c0c0;
  color: #000;
  font-size: 11.5px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
  cursor: pointer;
}
.retro-desktop .surface-tab[aria-pressed='true'] {
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
  background: #d8d8d8;
  font-weight: 700;
}
.retro-desktop .evidence-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 2px inset #dfdfdf;
  border-color: #808080 #fff #fff #808080;
  background: #dfdfdf;
  color: #000;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.retro-desktop .evidence-item[data-found='true'] {
  background: #e8f0e0;
}
.retro-desktop .evidence-item b {
  font-size: 11px;
  color: #000080;
}
.retro-desktop .evidence-item span {
  font-size: 12px;
}
.retro-desktop .evidence-item small {
  font-size: 10px;
  color: #404040;
}
.retro-desktop button.chip,
.retro-desktop .btn {
  border: 1px solid #000;
  background: #c0c0c0;
  color: #000;
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
.retro-desktop button.chip:hover,
.retro-desktop .btn:hover {
  background: #d4d4d4;
}
.retro-desktop .phone-shell {
  padding: 6px 0 2px;
}
.retro-statusbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 3px;
  padding: 2px 6px;
  border: 2px inset #dfdfdf;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
  font-size: 10.5px;
  color: #000;
}
.retro-statusbar span {
  padding: 1px 6px;
  border: 1px solid #808080;
  border-color: #808080 #fff #fff #808080;
}
.retro-statusbar .grip {
  margin-left: auto;
  width: 16px;
  border: 0;
  height: 14px;
  background: repeating-linear-gradient(135deg, #808080 0 1px, transparent 1px 3px);
}
.retro-taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 3px 4px;
  border-top: 2px solid #fff;
  background: #c0c0c0;
  font-family: Tahoma, Verdana, sans-serif;
  color: #000;
}
.retro-taskbar .start {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 6px;
  border: 1px solid #000;
  background: #c0c0c0;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
.retro-taskbar .tasks {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.retro-taskbar .task {
  padding: 4px 10px;
  border: 1px solid #000;
  background: #c0c0c0;
  font-size: 11.5px;
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
}
.retro-taskbar .tray {
  padding: 3px 8px;
  border: 2px inset #dfdfdf;
  border-color: #808080 #fff #fff #808080;
  background: #c0c0c0;
  font-size: 11px;
}
@media (max-width: 760px) {
  .retro-desktop {
    grid-template-columns: 1fr;
    padding: 10px 10px 64px;
  }
  .desktop-icons {
    grid-auto-flow: column;
    justify-content: start;
    overflow-x: auto;
  }
  .window-body {
    max-height: none;
  }
}

/* clearer pixel glyphs and a status bar that belongs to the window */
.retro-icon i span {
  width: 22px;
  height: 18px;
}
.px-file span {
  background: linear-gradient(#ffe9a8, #d8b356);
  border-top: 5px solid #c9a227;
  box-shadow: inset 0 0 0 1px #6b5416;
}
.px-device span {
  width: 13px;
  height: 22px;
  background: #101820;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 4px #2f5a72;
}
.px-documents span {
  background: repeating-linear-gradient(#fff 0 2px, #9aa0a6 2px 3px);
  box-shadow: inset 0 0 0 1px #000;
}
.px-images span {
  background: linear-gradient(150deg, #4a7f6a 45%, #1f4a3c 45%);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #fff;
}
.px-locker span {
  background: linear-gradient(#a8a8a8 0 45%, #808080 45% 55%, #a8a8a8 55%);
  box-shadow: inset 0 0 0 1px #000;
}
.retro-window .retro-statusbar {
  margin: 0 3px 3px;
}
.retro-desktop {
  align-content: start;
}

/* the window should sit on the wallpaper like a maximised app, not float in it */
.retro-window.desktop-window {
  min-height: calc(100dvh - 190px);
}
.retro-window.desktop-window .window-body {
  max-height: calc(100dvh - 320px);
  min-height: calc(100dvh - 390px);
}

/* ---------------------------------------------------------------------------
   Orders, the shelf and the generation job
   --------------------------------------------------------------------------- */
.orders-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}
.orders-block {
  display: grid;
  gap: 10px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}
.orders-block h2,
.job-panel h2 {
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9c49c;
}
.orders-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  opacity: 0.7;
}
.order-list,
.shelf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.order-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--bc-line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
}
.order-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.order-main b {
  font-weight: 500;
  font-size: 0.92rem;
}
.order-id,
.order-date {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}
.order-status {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  color: #f0dfa8;
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.order-total {
  font-family: var(--bc-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}
.shelf-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(206, 214, 228, 0.09);
}
.shelf-list li div {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.shelf-list b {
  font-weight: 500;
  font-size: 0.88rem;
}
.shelf-list div span {
  font-family: var(--bc-font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
}
.shelf-state {
  font-family: var(--bc-font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--bc-line);
  white-space: nowrap;
}
.shelf-state[data-owned='true'] {
  border-color: rgba(120, 180, 120, 0.55);
  color: #b6e2b6;
}
.shelf-empty {
  font-size: 0.84rem;
  opacity: 0.6;
}
.orders-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* generation job */
.job-panel {
  border-color: rgba(201, 162, 39, 0.4);
}
.job-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--bc-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.job-status span {
  opacity: 0.55;
  letter-spacing: 0.06em;
  text-transform: none;
}
.job-panel[data-status='failed'] .job-status b,
.job-error {
  color: #f2a191;
}
.job-steps {
  margin: 4px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
}
.job-steps b {
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: 8px;
  opacity: 0.75;
}
.job-steps li[data-state='failed'] span {
  color: #f2a191;
}
.job-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  opacity: 0.78;
}
.locked-note {
  font-family: var(--bc-font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0b8a8;
}

/* ---------------------------------------------------------------------------
   Terminal theme: the case file is phosphor, not paper.
   --------------------------------------------------------------------------- */
[data-theme='terminal'] .desk-stage,
[data-theme='terminal'] .desk-stage[data-surface='file'] {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(70, 255, 150, 0.07), transparent 62%),
    #030906;
  border-color: rgba(70, 255, 150, 0.35);
  color: #9dffbe;
  font-family: var(--bc-font-mono);
  box-shadow: 0 0 0 1px rgba(70, 255, 150, 0.15), 0 24px 60px rgba(0, 0, 0, 0.7),
    inset 0 0 60px rgba(70, 255, 150, 0.05);
}
[data-theme='terminal'] .desk-stage .kicker,
[data-theme='terminal'] .desk-stage h2,
[data-theme='terminal'] .desk-stage h3,
[data-theme='terminal'] .desk-stage .display {
  color: #6effa8;
  font-family: var(--bc-font-mono);
}
[data-theme='terminal'] .desk-stage .evidence-item {
  border-color: rgba(70, 255, 150, 0.28);
  background: rgba(70, 255, 150, 0.05);
  color: #b6ffcf;
  font-family: var(--bc-font-mono);
}
[data-theme='terminal'] .desk-stage .evidence-item[data-found='true'] {
  border-color: rgba(70, 255, 150, 0.7);
  background: rgba(70, 255, 150, 0.12);
}
[data-theme='terminal'] .desk-object {
  color: #b6ffcf;
}
[data-theme='terminal'] .desk-object[aria-pressed='true'] {
  border-color: rgba(70, 255, 150, 0.6);
  background: rgba(70, 255, 150, 0.09);
}
[data-theme='terminal'] .phone-screen {
  border-color: #04120a;
  background: linear-gradient(180deg, #05130b, #020805);
  color: #9dffbe;
}
[data-theme='terminal'] .phone-screen .evidence-item {
  border-color: rgba(70, 255, 150, 0.25);
  background: rgba(70, 255, 150, 0.05);
  color: #b6ffcf;
}

@media (max-width: 900px) {
  .orders-grid {
    grid-template-columns: 1fr;
  }
  .order-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* the case file surface is its own card; the terminal skin has to claim it too */
[data-theme='terminal'] .desk-stage .stage-card,
[data-theme='terminal'] .desk-stage .stage-card[data-surface] {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(70, 255, 150, 0.06), transparent 60%),
    #040b07;
  border: 1px solid rgba(70, 255, 150, 0.32);
  color: #b6ffcf;
  font-family: var(--bc-font-mono);
  box-shadow: inset 0 0 40px rgba(70, 255, 150, 0.05);
}
[data-theme='terminal'] .desk-stage .stage-card h2,
[data-theme='terminal'] .desk-stage .stage-card h3,
[data-theme='terminal'] .desk-stage .stage-card .display,
[data-theme='terminal'] .desk-stage .stage-card .kicker {
  color: #6effa8;
  font-family: var(--bc-font-mono);
}
[data-theme='terminal'] .desk-stage .stage-card p,
[data-theme='terminal'] .desk-stage .stage-card li,
[data-theme='terminal'] .desk-stage .stage-card span,
[data-theme='terminal'] .desk-stage .stage-card small {
  color: #9dffbe;
}
[data-theme='terminal'] .desk-stage .stage-card .claim,
[data-theme='terminal'] .desk-stage .stage-card [class*='claim'] {
  background: rgba(70, 255, 150, 0.05);
  border-color: rgba(70, 255, 150, 0.3);
}

/* terminal: accusation options and statement labels must be visible, not ink */
[data-theme='terminal'] .desk-stage .stage-card button,
[data-theme='terminal'] .desk-stage .stage-card .accuse,
[data-theme='terminal'] .desk-stage .stage-card [role='button'] {
  color: #b6ffcf;
  border-color: rgba(70, 255, 150, 0.32);
  background: rgba(70, 255, 150, 0.06);
  font-family: var(--bc-font-mono);
}
[data-theme='terminal'] .desk-stage .stage-card button:hover {
  border-color: rgba(70, 255, 150, 0.7);
  background: rgba(70, 255, 150, 0.14);
}
[data-theme='terminal'] .desk-stage .stage-card button:disabled {
  color: rgba(157, 255, 190, 0.45);
  border-color: rgba(70, 255, 150, 0.16);
}
[data-theme='terminal'] .desk-stage .stage-card small,
[data-theme='terminal'] .desk-stage .stage-card .mono {
  color: #7fe0a3;
}

/* ---- the build sheet: following one generation job ---- */
.gen-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 8, 10, 0.78);
  backdrop-filter: blur(3px);
}
.gen-sheet {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 22px;
  background: linear-gradient(180deg, #12161a, #0c1013);
  border: 1px solid rgba(214, 176, 96, 0.34);
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.gen-head h2 { margin: 2px 0 6px; font-size: 24px; }
.gen-status { margin: 0; color: rgba(233, 226, 214, 0.72); font-size: 13.5px; line-height: 1.5; }
.gen-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(233, 226, 214, 0.12);
  overflow: hidden;
}
.gen-track-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d6b060, #f0d79a);
  transition: width 420ms ease;
}
.gen-track-fill[data-failed='true'] { background: linear-gradient(90deg, #b4563f, #d98060); }
.gen-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.gen-steps li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(233, 226, 214, 0.07);
}
.gen-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.gen-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(233, 226, 214, 0.3);
  align-self: center;
}
.gen-steps li[data-state='running'] .gen-mark {
  border-color: #d6b060;
  background: #d6b060;
  animation: genPulse 1.1s ease-in-out infinite;
}
.gen-steps li[data-state='succeeded'] .gen-mark { border-color: #7fb685; background: #7fb685; }
.gen-steps li[data-state='failed'] .gen-mark { border-color: #b4563f; background: #b4563f; }
.gen-name { font-size: 13.5px; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(233, 226, 214, 0.9); }
.gen-state { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(233, 226, 214, 0.55); }
.gen-steps li[data-state='running'] .gen-state { color: #f0d79a; }
.gen-steps li[data-state='succeeded'] .gen-state { color: #9ccfa2; }
.gen-steps li[data-state='failed'] .gen-state { color: #e0906f; }
.gen-detail {
  grid-column: 2 / -1;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(233, 226, 214, 0.6);
}
.gen-error { margin: 0; color: #f0a184; font-size: 13px; line-height: 1.5; }
.gen-note { margin: 0; color: rgba(233, 226, 214, 0.65); font-size: 12.5px; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
@keyframes genPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}
@media (prefers-reduced-motion: reduce) {
  .gen-track-fill { transition: none; }
  .gen-steps li[data-state='running'] .gen-mark { animation: none; }
}
@media (max-width: 560px) {
  .gen-sheet { padding: 18px; border-radius: 12px; }
  .gen-head h2 { font-size: 20px; }
}

.gen-meta {
  margin: 8px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(233, 226, 214, 0.45);
}
.gen-meta .mono { color: rgba(214, 176, 96, 0.8); }
.gen-sheet[data-phase='done'] { border-color: rgba(127, 182, 133, 0.45); }
.gen-sheet[data-phase='failed'] { border-color: rgba(180, 86, 63, 0.5); }

.studio-resume {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px dashed rgba(214, 176, 96, 0.32);
  border-radius: 10px;
}

.gen-validation {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: #f0b79c;
  font-size: 12.5px;
  line-height: 1.45;
}
/* ============================================================================
   Investigation OS — the shell and the case desk.
   Tokens come first; every skin below is materials over one structure:
   a shelf (how evidence is laid out), a focus (what opens), a ledger (progress).
   ========================================================================== */

.codex {
  --room-0: #060809;
  --room-1: #0d1214;
  --room-2: #151d20;
  --lamp: #ffd9a0;
  --brass: #c9a227;
  --brass-dim: #8a6f1d;
  --paper: #efe6d4;
  --paper-2: #e0d4bc;
  --ink: #1d1a15;
  --ink-soft: #4a4438;
  --chrome-ink: #cbd2d5;
  --chrome-muted: #7d868a;
  --line: rgba(255, 255, 255, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: var(--chrome-ink);
  font-family: var(--sans);
  background:
    radial-gradient(120% 62% at 50% -8%, rgba(255, 217, 160, 0.14), transparent 62%),
    linear-gradient(178deg, var(--room-1), var(--room-2) 46%, var(--room-0));
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.codex::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(118% 82% at 50% 34%, transparent 44%, rgba(0, 0, 0, 0.72) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.2'/></svg>");
  mix-blend-mode: screen;
  opacity: 0.42;
}

/* ---------------- system bar ---------------- */

.codex .sysbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 44px;
  padding: 0 20px;
  font-size: 12.5px;
  color: var(--chrome-muted);
  background: linear-gradient(180deg, rgba(19, 27, 30, 0.94), rgba(9, 12, 13, 0.9));
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  backdrop-filter: blur(14px);
}

.codex .sysbar .brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--serif);
  font-size: 14.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chrome-ink);
}

.codex .sysbar .brand b { color: var(--brass); font-weight: 600; }
.codex .sysbar .spacer { flex: 1; }
.codex .sysbar .stat { display: flex; align-items: center; gap: 7px; }
.codex .sysbar .dot { width: 6px; height: 6px; border-radius: 50%; background: #6ecb8b; box-shadow: 0 0 10px #6ecb8b; }
.codex .sysbar .clock { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; }
.codex .sysbar .crumb { color: var(--chrome-muted); }
.codex .sysbar .crumb em { color: var(--paper); font-style: normal; }

.codex .sysbar .ghost {
  white-space: nowrap;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--chrome-ink);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.codex .sysbar .ghost.accent { border-color: rgba(201, 162, 39, 0.45); color: var(--lamp); background: rgba(201, 162, 39, 0.09); }

/* ---------------- desktop ---------------- */

.codex .desktop {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 22px 92px;
  overflow: auto;
}

.codex .rail { align-self: start; display: flex; flex-direction: column; gap: 9px; }

.codex .rail .label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chrome-muted);
  padding-left: 4px;
}

.codex .cabinet {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(30, 40, 44, 0.72), rgba(13, 18, 20, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 22px rgba(0, 0, 0, 0.45);
  color: var(--chrome-ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.codex .cabinet .drawer {
  width: 40px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(180deg, #24333a, rgba(22, 32, 36, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.09);
  position: relative;
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.5);
}

.codex .cabinet .drawer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 15px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #d9b667, #907326);
}

.codex .cabinet .meta { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--chrome-muted); margin-top: 2px; }
.codex .cabinet .count { font-family: var(--mono); font-size: 10.5px; color: var(--chrome-muted); }

.codex .cabinet[aria-selected="true"] {
  border-color: rgba(201, 162, 39, 0.55);
  background: linear-gradient(160deg, rgba(58, 46, 20, 0.85), rgba(20, 24, 25, 0.9));
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255, 217, 160, 0.22), 0 14px 30px rgba(0, 0, 0, 0.55);
}

.codex .canvas { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.codex .canvas .head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.codex .canvas .head .eyebrow { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); }
.codex .canvas .head h1 { margin: 6px 0 0; font-family: var(--serif); font-weight: 500; font-size: 27px; color: var(--paper); }
.codex .canvas .head p { margin: 6px 0 0; font-size: 12.5px; color: var(--chrome-muted); max-width: 52ch; line-height: 1.5; }

.codex .folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 18px;
}

.codex .folder-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 244px;
  padding: 14px 15px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(168deg, rgba(26, 35, 39, 0.9), rgba(11, 15, 17, 0.95));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  color: inherit;
}

.codex .folder-card:hover { border-color: rgba(201, 162, 39, 0.45); box-shadow: 0 24px 44px rgba(0, 0, 0, 0.6); }

.codex .folder-card .tab {
  position: absolute;
  top: -1px;
  left: 15px;
  width: 82px;
  height: 11px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.44), rgba(201, 162, 39, 0.04));
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-top: none;
}

.codex .folder-card .cover {
  position: relative;
  height: 118px;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: linear-gradient(150deg, #2b3a3f, #0d1416 55%, #3b2a17);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.codex .folder-card .cover .shaft {
  position: absolute;
  left: 13%;
  top: -14%;
  width: 34%;
  height: 130%;
  background: linear-gradient(184deg, rgba(255, 232, 186, 0.5), rgba(255, 232, 186, 0.04) 74%);
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
  filter: blur(1px);
}

.codex .folder-card .cover .door {
  position: absolute;
  right: 16%;
  bottom: 0;
  width: 31%;
  height: 75%;
  background: linear-gradient(180deg, #05090a, #0a0f10);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 236, 200, 0.15);
}

.codex .folder-card .cover .door::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 12%;
  height: 33%;
  background: linear-gradient(180deg, rgba(255, 232, 186, 0.3), transparent);
}

.codex .folder-card .cover .stamp {
  position: absolute;
  top: 9px;
  right: 10px;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: rgba(8, 12, 13, 0.55);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: rgba(255, 217, 160, 0.9);
}

.codex .folder-card h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.25;
  color: var(--paper);
}

.codex .folder-card .tag { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--chrome-muted); }
.codex .folder-card .floor { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.codex .folder-card .facts { display: flex; gap: 10px; font-family: var(--mono); font-size: 10px; color: var(--chrome-muted); }
.codex .folder-card .state { padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); font-size: 9.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--chrome-muted); }
.codex .folder-card .state.held { border-color: rgba(255, 217, 160, 0.4); color: var(--lamp); background: rgba(255, 217, 160, 0.08); }

.codex .worked {
  margin-top: 6px;
  padding: 14px 15px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(22, 29, 32, 0.62), rgba(9, 12, 14, 0.7));
}

.codex .worked-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.codex .worked-head .eyebrow { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); }
.codex .worked-head .hint { font-family: var(--mono); font-size: 10px; color: var(--chrome-muted); }
.codex .worked ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.codex .worked li button {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--chrome-ink);
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}
.codex .worked li button:hover { border-color: rgba(201, 162, 39, 0.4); }
.codex .worked li .ct { font-family: var(--mono); font-size: 10px; color: var(--lamp); white-space: nowrap; }

.codex .cabs-row { margin-top: 6px; }
.codex .cab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 10px; }
.codex .cab-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(28, 37, 41, 0.6), rgba(10, 14, 16, 0.66));
  color: var(--chrome-ink);
  text-align: left;
  cursor: pointer;
}
.codex .cab-card.on { border-color: rgba(201, 162, 39, 0.5); background: linear-gradient(160deg, rgba(52, 42, 19, 0.7), rgba(16, 19, 20, 0.8)); }
.codex .cab-card .drawer {
  width: 34px;
  height: 27px;
  border-radius: 4px;
  background: linear-gradient(180deg, #24333a, rgba(22, 32, 36, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.09);
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.5);
}
.codex .cab-card .drawer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #d9b667, #907326);
}
.codex .cab-card b { display: block; font-weight: 500; font-size: 13px; }
.codex .cab-card .mt { display: block; margin-top: 2px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--chrome-muted); }

/* ---------------- dock ---------------- */

.codex .dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 37, 41, 0.9), rgba(10, 14, 16, 0.94));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.codex .dock button { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 60px; background: none; border: none; cursor: pointer; }
.codex .dock .glyph { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(180deg, #223035, #121a1d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09); position: relative; }
.codex .dock .glyph::before { content: ""; position: absolute; inset: 10px; border-radius: 3px; border: 1.5px solid rgba(201, 162, 39, 0.55); }
.codex .dock .glyph.round::before { border-radius: 50%; }
.codex .dock .glyph.bars::before { inset: 12px 10px; border: none; background: repeating-linear-gradient(180deg, rgba(201, 162, 39, 0.6) 0 2px, transparent 2px 5px); }
.codex .dock span { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--chrome-muted); }
.codex .dock button:hover span { color: var(--paper); }

/* ---------------- case desk (shared) ---------------- */

.codex .case-shell {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 16px 20px 20px;
  align-content: start;
  overflow: auto;
}

.codex .case-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.codex .case-top .back { background: none; border: none; color: var(--chrome-muted); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.codex .case-top .back:hover { color: var(--paper); }
.codex .case-top h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 23px; color: var(--paper); }
.codex .case-top .meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--chrome-muted); }
.codex .case-top .spacer { flex: 1; }

.codex .theme-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lamp);
  cursor: pointer;
}

.codex .desk-stage {
  position: relative;
  min-height: 560px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(58% 46% at 46% 20%, rgba(255, 217, 160, 0.16), transparent 74%),
    linear-gradient(172deg, #1a2124 0%, #12181a 42%, #0a0e10 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -60px 90px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.codex .desk-stage .front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(180deg, rgba(24, 18, 12, 0.2), rgba(14, 10, 7, 0.92));
  border-top: 1px solid rgba(255, 226, 178, 0.1);
  box-shadow: 0 -18px 30px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.codex .obj {
  position: absolute;
  display: block;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: transform 160ms ease, filter 160ms ease;
}

.codex .obj:focus-visible { outline: 2px solid var(--brass); outline-offset: 6px; }
.codex .obj:hover { transform: translateY(-3px); }
.codex .obj .tag {
  position: absolute;
  top: -12px;
  right: -6px;
  z-index: 3;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(10, 14, 15, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.32);
  font-size: 8.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--chrome-muted);
  white-space: nowrap;
}

.codex .obj.is-active .tag { color: var(--lamp); border-color: rgba(255, 217, 160, 0.5); }

/* desk objects */
.codex .obj-file { left: 4%; bottom: 16%; width: 238px; height: 162px; }
.codex .obj-file .folder {
  position: absolute;
  inset: 0;
  border-radius: 6px 8px 8px 8px;
  background: linear-gradient(168deg, #b79a63, #8a6f42 58%, #6d5733);
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 243, 214, 0.5);
  transform: rotate(-3deg);
}
.codex .obj-file .folder::before {
  content: "";
  position: absolute;
  left: 13px;
  top: -10px;
  width: 92px;
  height: 13px;
  border-radius: 4px 6px 0 0;
  background: linear-gradient(180deg, #c2a56d, #9a7c4b);
}
.codex .obj-file .plate {
  position: absolute;
  left: 18px;
  top: 38px;
  right: 18px;
  padding: 10px 11px;
  border-radius: 3px;
  background: linear-gradient(170deg, rgba(255, 249, 236, 0.95), rgba(238, 228, 206, 0.92));
  color: var(--ink);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  transform: rotate(-0.5deg);
}
.codex .obj-file .plate b { display: block; font-family: var(--serif); font-size: 14px; letter-spacing: 0; margin-bottom: 3px; }

.codex .obj-device { left: 40%; top: 10%; width: 250px; height: 500px; }
.codex .obj-device .body {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(168deg, #2a3236, #0d1214 62%, #1b2326);
  box-shadow: 0 32px 52px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: rotate(1.5deg);
  padding: 10px;
}
.codex .obj-device .glass {
  position: relative;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(178deg, #0d191d, #081114 60%, #0a1614);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.codex .obj-device .glass .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8.5px; color: #8fd6bd; letter-spacing: 0.07em; }
.codex .obj-device .bub { max-width: 92%; padding: 7px 9px; border-radius: 11px; font-size: 11px; line-height: 1.45; color: #daeae4; background: rgba(255, 255, 255, 0.055); }
.codex .obj-device .appgrid { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.codex .obj-device .appgrid i { height: 34px; border-radius: 6px; background: linear-gradient(180deg, #22303a, #121b21); border: 1px solid rgba(255, 255, 255, 0.07); display: grid; place-items: center; font-size: 7px; letter-spacing: 0.04em; color: #93a6a0; font-style: normal; text-transform: uppercase; }

.codex .obj-docs { right: 5%; top: 10%; width: 222px; height: 280px; }
.codex .obj-docs .sheet {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(172deg, var(--paper), var(--paper-2));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.6);
  padding: 18px 16px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.65;
  transform: rotate(2.4deg);
  overflow: hidden;
}
.codex .obj-docs .sheet.back { transform: rotate(-2deg) translate(-8px, -5px); background: linear-gradient(172deg, #ded2b8, #cdbfa2); }
.codex .obj-docs .sheet h3 { margin: 0 0 7px; font-family: var(--serif); font-size: 13px; }

.codex .obj-prints { right: 8%; bottom: 15%; width: 216px; height: 146px; }
.codex .obj-prints .print {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 140px;
  height: 106px;
  background: #f4ede0;
  padding: 6px 6px 16px;
  border-radius: 2px;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.6);
}
.codex .obj-prints .print:nth-child(1) { transform: rotate(-5deg) translate(-26px, 10px); }
.codex .obj-prints .print:nth-child(2) { transform: rotate(2deg) translate(12px, 0); }
.codex .obj-prints .print:nth-child(3) { transform: rotate(8deg) translate(48px, 18px); }
.codex .obj-prints .print .im { width: 100%; flex: 1; min-height: 0; background: linear-gradient(158deg, #26343a, #0c1114 62%, #3a2c1c); position: relative; overflow: hidden; }
.codex .obj-prints .print .im::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 38% 24%, rgba(255, 226, 170, 0.4), transparent 70%); }
.codex .obj-prints .print .cap { position: absolute; left: 6px; right: 6px; bottom: 3px; font-family: var(--mono); font-size: 6.5px; color: #6d6552; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- ledger rail ---------------- */

.codex .ledger {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(26, 34, 37, 0.9), rgba(10, 14, 15, 0.94));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.codex .ledger .eyebrow { font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin-bottom: 4px; }
.codex .ledger h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 17px; color: var(--paper); }
.codex .ledger .bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.codex .ledger .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass-dim), var(--lamp)); box-shadow: 0 0 14px rgba(255, 217, 160, 0.5); }
.codex .ledger .tally { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--chrome-muted); }
.codex .ledger ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.codex .ledger li { display: flex; gap: 9px; align-items: baseline; font-size: 12px; color: var(--chrome-ink); }
.codex .ledger li .n { font-family: var(--mono); font-size: 9.5px; color: var(--chrome-muted); min-width: 16px; }
.codex .ledger li.done .n { color: #9ee0b3; }
.codex .ledger li.locked { color: var(--chrome-muted); font-style: italic; }
.codex .ledger .div { height: 1px; background: var(--line); }
.codex .ledger .accuse { padding: 11px 12px; border-radius: 9px; border: 1px dashed rgba(255, 255, 255, 0.14); color: var(--chrome-muted); font-size: 11.5px; line-height: 1.5; }
.codex .ledger .accuse b { display: block; color: var(--chrome-ink); font-family: var(--serif); font-size: 13.5px; font-weight: 500; margin-bottom: 3px; }

/* ---------------- focus: the object held up ---------------- */

.codex .hold {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(70% 60% at 50% 40%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.88));
  backdrop-filter: blur(4px);
}

.codex .hold .close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--chrome-ink);
  font-size: 16px;
  cursor: pointer;
}

.codex .hold .pane {
  width: min(760px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  background: linear-gradient(170deg, rgba(23, 30, 33, 0.98), rgba(9, 12, 14, 0.99));
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  padding: 20px;
}

.codex .hold .pane h2 { margin: 0 0 4px; font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--paper); }
.codex .hold .pane .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--chrome-muted); }
.codex .hold .pane .body { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.codex .row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.codex .row .text { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; color: var(--chrome-ink); }
.codex .row .text .why { display: block; margin-top: 3px; font-size: 10.5px; color: var(--chrome-muted); }
.codex .row .file-btn {
  padding: 7px 11px;
  border-radius: 7px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.1);
  color: var(--lamp);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.codex .row .file-btn[data-filed="true"] { border-color: rgba(158, 224, 179, 0.45); background: rgba(158, 224, 179, 0.12); color: #9ee0b3; }
.codex .row .file-btn[disabled] { opacity: 0.55; cursor: default; }

.codex .empty { padding: 14px; border-radius: 9px; border: 1px dashed rgba(255, 255, 255, 0.14); color: var(--chrome-muted); font-size: 12px; }

/* paper rows (documents, prints) */
.codex .paper-row { background: linear-gradient(172deg, var(--paper), var(--paper-2)); color: var(--ink); border: none; }
.codex .paper-row .text { color: var(--ink); font-family: var(--mono); font-size: 11px; line-height: 1.6; }
.codex .paper-row .text b { font-family: var(--serif); font-size: 13.5px; display: block; margin-bottom: 4px; }

/* ---------------- retro desktop skin ---------------- */

.codex[data-skin="retro"] {
  --room-1: #0a2a2c;
  --room-2: #061c1e;
  --face: #c8cfcb;
  --face-hi: #f2f6f3;
  --face-lo: #5c6660;
  --title-1: #1f3350;
  --title-2: #3d5c86;
  --chrome-ink: #e6ece9;
  --chrome-muted: #9fb0aa;
  font-family: Tahoma, Geneva, Verdana, "DejaVu Sans", sans-serif;
}

.codex[data-skin="retro"] .case-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }

.codex[data-skin="retro"] .win {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--face);
  padding: 3px;
  border-top: 2px solid var(--face-hi);
  border-left: 2px solid var(--face-hi);
  border-right: 2px solid var(--face-lo);
  border-bottom: 2px solid var(--face-lo);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.55);
}

.codex[data-skin="retro"] .win > .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 5px 0 6px;
  background: linear-gradient(90deg, var(--title-1), var(--title-2));
  color: #eef3f7;
  font-size: 11.5px;
  font-weight: 700;
}
.codex[data-skin="retro"] .win > .titlebar .t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codex[data-skin="retro"] .win > .titlebar .btns { display: flex; gap: 2px; }
.codex[data-skin="retro"] .win > .titlebar .btns b {
  display: grid;
  place-items: center;
  width: 17px;
  height: 15px;
  font-size: 9px;
  color: #101010;
  background: var(--face);
  border-top: 1px solid var(--face-hi);
  border-left: 1px solid var(--face-hi);
  border-right: 1px solid var(--face-lo);
  border-bottom: 1px solid var(--face-lo);
}
.codex[data-skin="retro"] .win > .body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 8px; overflow: auto; }
.codex[data-skin="retro"] .win > .foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 6px;
  font-size: 10px;
  color: #3b413c;
  border-top: 1px solid var(--face-lo);
  border-left: 1px solid var(--face-lo);
  border-right: 1px solid var(--face-hi);
  border-bottom: 1px solid var(--face-hi);
}

.codex[data-skin="retro"] .win-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
  align-content: start;
}
.codex[data-skin="retro"] .row { background: #fffef6; border: 1px solid #b9b2a0; color: #1d1a15; }
.codex[data-skin="retro"] .row .text { color: #1d1a15; }
.codex[data-skin="retro"] .row .text .why { color: #6d6552; }
.codex[data-skin="retro"] .row .file-btn { border-color: #7d887f; background: var(--face); color: #101010; border-radius: 0; }
.codex[data-skin="retro"] .row .file-btn[data-filed="true"] { background: #d8ded9; color: #1c3b28; }
.codex[data-skin="retro"] .empty { background: #fffef6; border: 1px dashed #a89f8a; color: #6d6552; border-radius: 0; }
.codex[data-skin="retro"] .ledger { background: var(--face); border: 2px solid; border-color: var(--face-hi) var(--face-lo) var(--face-lo) var(--face-hi); color: #1d1a15; }
.codex[data-skin="retro"] .ledger h2, .codex[data-skin="retro"] .ledger .accuse b { color: #101010; }
.codex[data-skin="retro"] .ledger .eyebrow { color: #1f3350; }
.codex[data-skin="retro"] .ledger li { color: #1d1a15; }
.codex[data-skin="retro"] .ledger .accuse { border-color: #a89f8a; color: #4a4438; }
.codex[data-skin="retro"] .case-top h1, .codex[data-skin="retro"] .case-top .back { color: #eef3f7; }
/* the panel headings are light-on-dark by default; on beige they have to invert */
.codex[data-skin="retro"] .win .body h2,
.codex[data-skin="retro"] .hold .pane h2 { color: #101010; }
.codex[data-skin="retro"] .win .body .sub,
.codex[data-skin="retro"] .hold .pane .sub { color: #4a4438; }
.codex[data-skin="retro"] .win .body .row span[style],
.codex[data-skin="retro"] .hold .pane .row span[style] { color: #1d1a15 !important; border-color: #b9b2a0 !important; box-shadow: none !important; }
.codex[data-skin="retro"] .win .body .text,
.codex[data-skin="retro"] .hold .pane .text { color: #1d1a15; }
.codex[data-skin="retro"] .win .body .text .why,
.codex[data-skin="retro"] .hold .pane .text .why { color: #6d6552; }
.codex[data-skin="retro"] .win .body .state { border-color: #a89f8a; color: #3b413c; }
.codex[data-skin="retro"] .hold .pane { background: var(--face); border: 2px solid; border-color: var(--face-hi) var(--face-lo) var(--face-lo) var(--face-hi); }
.codex[data-skin="retro"] .hold .pane h2 { color: #101010; }

/* the thumb drawer exists only on a phone */
.codex .drawer-bar { display: none; }

/* ---------------- mobile ---------------- */

@media (max-width: 760px) {
  .codex .sysbar {
    height: auto;
    min-height: 46px;
    padding: 7px 12px;
    gap: 8px;
    font-size: 11px;
    flex-wrap: nowrap;
  }
  /* the crumb already says where you are, so the wordmark can go on a phone */
  .codex .sysbar .brand { display: none; }
  .codex .sysbar .crumb, .codex .sysbar .stat { display: none; }
  .codex .sysbar .ghost { padding: 9px 11px; font-size: 10.5px; white-space: nowrap; min-height: 44px; display: inline-grid; place-items: center; }

  .codex .desktop { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 96px; gap: 14px; }
  .codex .rail { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .codex .rail .label { display: none; }
  .codex .cabinet { grid-template-columns: minmax(0, 1fr) auto; flex: 0 0 auto; padding: 10px 12px; }
  .codex .cabinet .drawer { display: none; }
  .codex .cabinet .meta { display: none; }
  .codex .canvas .head h1 { font-size: 21px; }
  .codex .folders { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .codex .folder-card { min-height: 0; }
  .codex .folder-card .cover { height: 108px; }
  .codex .dock { gap: 6px; padding: 8px 10px; bottom: 12px; border-radius: 15px; }
  .codex .dock button { min-width: 52px; }
  .codex .dock .glyph { width: 33px; height: 33px; }

  .codex .case-shell { grid-template-columns: minmax(0, 1fr); padding: 10px 12px 0; gap: 10px; }
  .codex .case-top { flex-wrap: wrap; gap: 8px; padding-bottom: 9px; }
  .codex .case-top h1 { font-size: 17px; }
  .codex .case-top .meta { font-size: 9.5px; }
  .codex .desk-stage { min-height: 380px; }
  .codex .obj-file { left: 6%; bottom: 22%; width: 46%; height: 118px; }
  .codex .obj-device { left: auto; right: 8%; top: 6%; width: 44%; height: 74%; }
  .codex .obj-docs { display: none; }
  .codex .obj-prints { display: none; }
  .codex .ledger { display: none; }

  .codex .drawer-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 7px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(26, 34, 38, 0.96), rgba(9, 13, 15, 0.99));
    border-top: 1px solid var(--line);
    box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.55);
  }
  .codex .drawer-bar button {
    flex: 1;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--chrome-muted);
    font-size: 8.5px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }
  .codex .drawer-bar button .ico { width: 19px; height: 19px; border: 1.5px solid rgba(201, 162, 39, 0.5); border-radius: 4px; }
  .codex .drawer-bar button .ico.round { border-radius: 50%; }
  .codex .drawer-bar button .ico.lines { border: none; background: repeating-linear-gradient(180deg, rgba(201, 162, 39, 0.55) 0 2px, transparent 2px 5px); }
  .codex .drawer-bar button.on { border-color: rgba(255, 217, 160, 0.5); background: rgba(255, 217, 160, 0.1); color: var(--paper); }

  .codex .hold { padding: 0; }
  .codex .hold .pane { width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: none; padding: 16px 14px 90px; }
  .codex .hold .close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .codex .obj, .codex .folder-card { transition: none; }
  .codex .obj:hover { transform: none; }
}

/* ============================================================================
   Evidence browsing — the loop: open an object, open a record, notice a finding.
   ========================================================================== */

.codex .loose {
  margin-left: 9px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 217, 160, 0.42);
  background: rgba(255, 217, 160, 0.1);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--lamp);
  vertical-align: middle;
}

.codex .ev-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }

.codex .ev-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 8px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34, 44, 48, 0.7), rgba(12, 17, 19, 0.8));
  color: var(--chrome-ink);
  cursor: pointer;
}
.codex .ev-app:hover { border-color: rgba(201, 162, 39, 0.45); }
.codex .ev-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--lamp);
  background: linear-gradient(180deg, #26333a, #131c20);
  border: 1px solid rgba(201, 162, 39, 0.3);
}
.codex .ev-app-name { font-size: 11.5px; }
.codex .ev-app-count { font-family: var(--mono); font-size: 9.5px; color: var(--chrome-muted); }

.codex .ev-list { display: flex; flex-direction: column; gap: 7px; }

.codex .ev-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.codex .ev-row:hover { border-color: rgba(201, 162, 39, 0.4); background: rgba(201, 162, 39, 0.05); }
.codex .ev-row .thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.codex .ev-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.codex .ev-title { font-size: 12.5px; color: var(--paper); }
.codex .ev-body { font-size: 11.5px; color: var(--chrome-muted); line-height: 1.45; }
.codex .ev-meta { font-family: var(--mono); font-size: 9.5px; color: var(--chrome-muted); text-align: right; display: flex; align-items: center; gap: 7px; }
.codex .loose-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 10px rgba(255, 217, 160, 0.8); }

.codex .ev-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--chrome-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 0 6px;
}
.codex .ev-back:hover { color: var(--paper); }

.codex .ev-detail { display: flex; flex-direction: column; gap: 10px; }
.codex .ev-detail h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 19px; color: var(--paper); }
.codex .ev-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chrome-muted); }
.codex .ev-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--chrome-ink); }
.codex .ev-photo { margin: 0; }
.codex .ev-photo img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.codex .ev-audio { width: 100%; }
.codex .ev-transcript { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.codex .ev-transcript li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; font-size: 12px; line-height: 1.5; }
.codex .ev-transcript .spk { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.codex .ev-transcript .txt { color: var(--chrome-ink); }
.codex .ev-facts { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.55; color: var(--chrome-muted); }
.codex .ev-status { font-size: 11.5px; color: var(--chrome-muted); padding: 9px 11px; border-radius: 8px; border: 1px dashed var(--line); }
.codex .ev-status.fresh { color: #9ee0b3; border-color: rgba(158, 224, 179, 0.4); background: rgba(158, 224, 179, 0.07); }

.codex .ev-prints { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.codex .ev-print {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 6px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #f4ede0;
  cursor: pointer;
}
.codex .ev-print img, .codex .ev-print .blank { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; background: #d9d0bd; }
.codex .ev-print .cap { font-family: var(--mono); font-size: 8px; color: #6d6552; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codex .ev-print.fresh { outline: 2px solid rgba(201, 162, 39, 0.75); outline-offset: 1px; }

/* the desktop objects get real thumbnails now */
.codex .obj-prints .print .im { object-fit: cover; }
.codex .obj-device .glass .bub { display: block; }

.codex .toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 80;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(158, 224, 179, 0.45);
  background: rgba(16, 34, 26, 0.96);
  color: #c8f2d6;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.6);
  animation: toast-in 220ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 760px) {
  .codex .toast { bottom: 84px; font-size: 11.5px; padding: 10px 14px; max-width: calc(100% - 28px); text-align: center; }
  .codex .ev-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .codex .ev-detail h3 { font-size: 17px; }
}
