:root {
  --clip-w: 272px;
  --paper: #f3efe4;
  --paper-line: rgba(70, 90, 140, .16);
  --pencil: #3a3a40;
  --stamp: #b3261e;
  --ink: #1e1d1b;
  --masonite: #7b5233;
  --sky-top: #c9b9b4;
  --ground: #2b2420;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { font: 15px/1.45 "Courier Prime", ui-monospace, Menlo, monospace; overflow: hidden; }
button { font: inherit; color: inherit; }

/* ---------- the rooftop */
#scene { position: fixed; inset: 0; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-top) 40%, var(--ground) 60%); touch-action: manipulation; }
.plate { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-select: none; pointer-events: none; }
#plate-night { opacity: 0; transition: opacity 1.2s ease; }
body.night #plate-night { opacity: 1; }
#board { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
#crew { position: absolute; left: 0; top: 0; pointer-events: none; }
#board-hit { position: absolute; left: 0; top: 0; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#board-hit:focus-visible { outline: 2px solid rgba(255, 211, 90, .75); outline-offset: 5px; }
#board { transition: filter .25s ease; }
@media (hover: hover) { #scene:has(#board-hit:hover) #board { filter: brightness(1.07); } }
#plate-name { position: absolute; margin: 0; padding: 0 .55em; transform: translate(-50%, 0); background: #24382c; color: #e9e4d2; font: 600 10px/1.65 Oswald, "Arial Narrow", sans-serif; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 1px 1px rgba(0,0,0,.4); }
body.night #plate-name { background: #1c2a22; color: #d9d2bd; }

#sound { position: absolute; z-index: 5; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(20, 18, 16, .55); cursor: pointer; display: grid; place-items: center; }
#sound span { width: 18px; height: 18px; display: block; background: #efe9da; -webkit-mask: var(--spk) center/contain no-repeat; mask: var(--spk) center/contain no-repeat; }
#sound { --spk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3z'/%3E%3Cpath d='M16 8.5a5 5 0 0 1 0 7M18.5 6a8.5 8.5 0 0 1 0 12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
#sound[aria-pressed="false"] { --spk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3z'/%3E%3Cpath d='M16 9l6 6M22 9l-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
#sound:focus-visible { outline: 2px solid #ffd35a; outline-offset: 2px; }

/* ---------- the crew's clipboard */
#clip { position: fixed; z-index: 4; left: 50%; bottom: 10px; width: min(1240px, calc(100vw - 28px)); transform: translateX(-50%); max-height: 62vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-top: 10px; }
.clipboard { position: relative; padding: 22px 12px 10px; border-radius: 10px;
  background:
    radial-gradient(120% 70% at 30% 10%, rgba(255,255,255,.10), transparent 60%),
    repeating-linear-gradient(97deg, rgba(0,0,0,.05) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #8a5d3b, #6c4528);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 2px 0 rgba(255,255,255,.12) inset, 0 -2px 0 rgba(0,0,0,.25) inset; }
.clip-metal { position: absolute; z-index: 2; left: 50%; top: -9px; width: 112px; height: 34px; transform: translateX(-50%); border-radius: 8px 8px 14px 14px;
  background: linear-gradient(#e6e7e9, #9da1a6 45%, #c9ccd0 55%, #8b8f94); box-shadow: 0 3px 6px rgba(0,0,0,.4), inset 0 1px 0 #fff; }
.clip-metal i { position: absolute; left: 50%; top: 9px; width: 30px; height: 9px; transform: translateX(-50%); border-radius: 5px; background: #4d5156; box-shadow: inset 0 2px 2px rgba(0,0,0,.6); }
.paper { position: relative; padding: 12px 14px 12px; background: var(--paper); border-radius: 2px;
  background-image: linear-gradient(transparent 0 30px, var(--paper-line) 30px 31px, transparent 31px), repeating-linear-gradient(transparent 0 21px, var(--paper-line) 21px 22px);
  background-size: 100% 31px, 100% 22px; background-repeat: no-repeat, repeat; background-position: 0 0, 0 64px;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.paper-head { display: flex; align-items: center; gap: 14px; margin-bottom: 9px; }
.paper-head .paper-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
.paper-head h1 { margin: 0; font: 700 13px/1.1 "Courier Prime", monospace; letter-spacing: .12em; text-transform: uppercase; }

.lever { position: relative; flex: none; width: 74px; height: 28px; cursor: pointer; touch-action: none; border-radius: 14px; }
.lever:focus-visible { outline: 2px solid #c9821f; outline-offset: 3px; }
.lever .slot { position: absolute; left: 10px; right: 10px; top: 11px; height: 6px; border-radius: 3px; background: #3a342c; box-shadow: inset 0 1px 2px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.6); }
.lever .slot i { position: absolute; top: 9px; width: 2px; height: 5px; background: #6b645a; }
.lever .slot i:nth-child(1) { left: 0; } .lever .slot i:nth-child(2) { left: calc(50% - 1px); } .lever .slot i:nth-child(3) { right: 0; }
.lever .knob { position: absolute; top: 2px; left: 0; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffdf8e, #c9821f 60%, #8a5212); box-shadow: 0 2px 3px rgba(0,0,0,.45); transition: left .18s cubic-bezier(.3,1.4,.6,1); }
.lever[aria-valuenow="2"] .knob { left: 25px; }
.lever[aria-valuenow="3"] .knob { left: 50px; }

#schedule { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 9px 8px; }
#schedule li { min-width: 0; }
.card { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; position: relative; border-radius: 2px; -webkit-tap-highlight-color: transparent; }
.card:focus-visible { outline: 2px solid #c9821f; outline-offset: 2px; }
.card .proof { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #1d1b19; box-shadow: 0 1px 2px rgba(0,0,0,.35); overflow: hidden; }
.card .proof img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
/* a contact sheet: the proofs alone, each one's name on a strip of tape when you point at it */
.card .nm { position: absolute; left: 0; right: 0; bottom: 0; display: block; padding: 3px 4px 2px; background: rgba(243, 239, 228, .95); font: 500 10px/1.12 Oswald, "Arial Narrow", sans-serif; letter-spacing: .03em; text-transform: uppercase; color: #2a2926; opacity: 0; transform: translateY(2px); transition: opacity .12s ease, transform .12s ease; pointer-events: none; }
.card:hover .nm, .card:focus-visible .nm { opacity: 1; transform: none; }
.card .stamp { position: absolute; right: -3px; top: -9px; font: 600 19px/1 Caveat, cursive; color: var(--stamp); transform: rotate(-4deg); opacity: 0; pointer-events: none; text-shadow: 0 0 2px var(--paper), 0 0 3px var(--paper), 0 0 4px var(--paper); }
.card.posted .stamp { opacity: .9; }
.card .mark { position: absolute; right: -2px; top: -10px; font: 600 16px/1 Caveat, cursive; color: var(--pencil); transform: rotate(-8deg); opacity: 0; pointer-events: none; text-shadow: 0 0 2px var(--paper), 0 0 3px var(--paper), 0 0 4px var(--paper); }
.card.next .mark { opacity: 1; }
.card.next .stamp { opacity: 0; }
.card.up .proof { box-shadow: 0 0 0 2px #c9821f, 0 1px 2px rgba(0,0,0,.35); }
.card:hover .proof { box-shadow: 0 0 0 2px rgba(201,130,31,.6), 0 1px 2px rgba(0,0,0,.35); }
.paper-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-top: 16px; padding-top: 8px; border-top: 1px dashed rgba(0,0,0,.25); font-size: 12px; }
.paper-foot button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.paper-foot button:focus-visible, .paper-foot a:focus-visible { outline: 2px solid #c9821f; outline-offset: 2px; }
.paper-foot a { color: inherit; overflow-wrap: anywhere; }

/* ---------- a project, opened: the job folder */
dialog { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(14, 12, 10, .72); }
#sheet, #about { width: 100vw; height: 100vh; height: 100dvh; margin: 0; }
.sheet-paper { position: relative; width: min(980px, 100%); height: 100%; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--paper); padding: 28px clamp(16px, 4vw, 44px) 56px; box-shadow: 0 0 60px rgba(0,0,0,.5);
  --ab-fg: #1e1d1b; --ab-muted: #5f5a52; --ab-accent: #c9821f; --ab-chrome: 96px; }
.sheet-close { position: sticky; top: 0; float: right; z-index: 3; width: 44px; height: 44px; margin: -12px -12px 0 8px; border: 0; border-radius: 50%; background: #24382c; color: #f3efe4; font: 28px/44px system-ui, sans-serif; cursor: pointer; }
.sheet-close:focus-visible { outline: 2px solid #c9821f; outline-offset: 2px; }
.sheet-head { margin: 0 0 22px; padding-bottom: 14px; border-bottom: 2px solid #1e1d1b; }
.sheet-client { margin: 0 0 4px; font: 600 12px/1.2 Oswald, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #5f5a52; }
.sheet-title { margin: 0; font: 400 clamp(30px, 6vw, 56px)/1 Anton, Impact, sans-serif; letter-spacing: .01em; text-transform: uppercase; }
.sheet-body { font: 16px/1.55 "Courier Prime", monospace; }
.sheet-body .ab-heading { font: 600 15px/1.2 Oswald, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.sheet-body .ab-lede { font-size: 17px; }
.sheet-body .ab-film figcaption, .sheet-body .ab-audio figcaption { font: 600 12px/1.3 Oswald, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.about-paper h2 { margin: 6px 0 4px; font: 400 clamp(32px, 6vw, 54px)/1 Anton, Impact, sans-serif; text-transform: uppercase; }
.about-title { margin: 0 0 18px; font: 600 14px/1.3 Oswald, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #5f5a52; }
.about-bio { max-width: 60ch; font-size: 17px; }
.about-jobs { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 10px; }
.about-jobs li { padding-bottom: 10px; border-bottom: 1px dashed rgba(0,0,0,.2); }
.about-jobs b { font: 600 14px/1.3 Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.about-contact a { color: inherit; font-weight: 700; }

/* ---------- loading: the board takes its blank sheets */
#loader { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #1d1a17; transition: opacity .5s ease, visibility .5s; }
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.load-board { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: min(66vw, 420px); aspect-ratio: 3.3 / 1; padding: 6px; background: #24382c; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.load-board i { background: #3a3631; transform-origin: 50% 0; transition: background .25s ease; }
.load-board i.on { background: #ebe7dc; }

/* ---------- phones: the board across the top, the clipboard under it */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  body { overflow: auto; overflow-x: hidden; }
  #scene { position: sticky; top: 0; inset: auto; width: 100%; height: var(--scene-h, 240px); z-index: 2; }
  #clip { position: relative; z-index: 1; left: auto; bottom: auto; transform: none; width: 100%; max-height: none; padding: 14px 10px max(16px, env(safe-area-inset-bottom)); overflow: visible; }
  .clipboard { padding: 26px 8px 10px; }
  #schedule { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 7px; }
  .paper-head { gap: 10px; }
  .paper-head h1 { font-size: 12px; letter-spacing: .08em; }
  #mail { display: none; }
  .card .nm { position: relative; left: auto; right: auto; bottom: auto; margin-top: 3px; padding: 0 16px 0 0; background: none; font-size: 10px; opacity: 1; transform: none; }
  .card .stamp { top: auto; right: 0; bottom: 0; font-size: 17px; text-shadow: none; }
  .card .mark { top: auto; right: -2px; bottom: -2px; font-size: 15px; text-shadow: none; }
  #sound { width: 40px; height: 40px; left: 8px; bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .lever .knob, #loader, #plate-night { transition: none; } }
dialog:focus, dialog:focus-visible { outline: none; }
.sheet-paper:focus { outline: none; }
