/* One More Cup prototype. Direction B from Design.md: the whole viewport is Jim's desk.
   Palette is the Office Jim palette; flat fills, ink outlines, no glows or gradients. */
:root {
  --ink: #0B0B0A; --carbon: #121211; --paper: #F1EFE6; --chart: #C8FF3D; --cobalt: #3D63FF;
  --gold: #E5B84B; --cold: #777771;
  --paper-2: #E4E1D6; /* paper in the desk's shade: ink at 6% over paper */
  --mono: ui-monospace, "SF Mono", Menlo, "Roboto Mono", "Courier New", monospace;
  --cond: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --body: "Avenir Next", "Helvetica Neue", Arial, system-ui, sans-serif;
  --dock-h: 72px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
@media (min-width: 761px) { html, body { overflow: hidden; overflow: clip; } }
body {
  background: var(--carbon); color: var(--paper); font: 16px/1.4 var(--body);
  -webkit-tap-highlight-color: transparent; overflow: hidden;
}
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--chart); outline-offset: 3px; }
.sheet :focus-visible, .files :focus-visible, .report :focus-visible { outline-color: var(--cobalt); }

/* ---------- frame */
.room { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100svh; }
.room > .strip { grid-column: 1; grid-row: 1; }
.room > .office { grid-column: 1 / -1; grid-row: 2; }
.room > .dock { grid-column: 2; grid-row: 1; }
.strip {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 44px); padding: 10px clamp(12px, 2vw, 28px) 8px;
  border-bottom: 3px solid var(--ink);
}
.filetab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-right: auto; }
.filetab-name {
  background: var(--chart); color: var(--ink); font: 800 15px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em;
  padding: 7px 12px 6px; border: 2px solid var(--ink); border-radius: 6px 6px 0 0; box-shadow: 0 2px 0 var(--ink);
}
.filetab-year { font: 600 12px/1 var(--mono); color: var(--paper); opacity: .7; letter-spacing: .08em; text-transform: uppercase; padding-left: 4px; }
.readout { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.readout-label { font: 700 11px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; opacity: .72; }
.readout-value { display: inline-block; font: 700 clamp(22px, 2.6vw, 34px)/1.1 var(--mono); font-variant-numeric: tabular-nums; transform-origin: 100% 60%; }
.readout-credits .readout-value { font-size: clamp(28px, 3.4vw, 46px); }
.readout-rate .readout-value { color: var(--chart); }

.office { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 27%, 400px); min-height: 0; }

/* ---------- the scene: sizes in container units so the desk scales as one picture */
.scene { position: relative; container-type: size; overflow: hidden; overflow: clip; min-height: 0; isolation: isolate; }
.wall { position: absolute; inset: 0 0 auto 0; height: 44.5%; background: var(--carbon); border-bottom: max(5px, 1.1cqh) solid var(--paper-2); box-shadow: 0 2px 0 var(--ink); }
/* the floor between the wall and the desk: everything shares one vanishing point (50%, 28%) */
.floor { position: absolute; left: 0; right: 0; top: 44.5%; height: 5.5%; background: #1b1b19; overflow: hidden; }
.floor-seams, .desk-seams { position: absolute; left: 0; top: 0; width: 100%; display: block; pointer-events: none; }
.floor-seams { height: 100%; }
.desk-seams { height: 78%; }
.wall::before { /* panel seams */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 2px), var(--ink) calc(25% - 2px) 25%);
}
.window { position: absolute; right: 4cqw; top: 6cqh; width: 28cqw; height: 34cqh; overflow: visible; }
.window .lights rect { fill: var(--ink); transition: fill .6s; }
.window .lights rect.on { fill: var(--paper); }
.window .lights rect.on:nth-child(3n) { fill: var(--chart); }
.blimp, .crane, .sill-mug { opacity: 0; transition: opacity .8s; }
.blimp-text { font: 800 6px var(--cond); fill: var(--ink); letter-spacing: .04em; }
body.blimp-on .blimp { opacity: 1; animation: blimp 38s linear infinite; }
@keyframes blimp { from { transform: translate(-30px, 26px); } to { transform: translate(250px, 18px); } }
body.crane-on .crane { opacity: 1; }
body.crane-on .crane-load, body.crane-on .crane-hook { animation: crane 7s ease-in-out infinite; }
@keyframes crane { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
body.sill-on .sill-mug { opacity: 1; }
.window-note {
  position: absolute; right: 5cqw; top: 13cqh; z-index: 1; width: 11cqw; min-width: 76px; padding: 6px 7px;
  background: var(--chart); color: var(--ink); border: 2px solid var(--ink); transform: rotate(4deg);
  font: 600 clamp(10px, 1.3cqw, 13px)/1.15 var(--mono);
}
.window-note span { display: block; font: 800 clamp(11px, 1.5cqw, 15px)/1 var(--cond); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.poke { padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.poke svg { width: 100%; display: block; overflow: visible; }
.poke-window { position: absolute; right: 4cqw; top: 6cqh; width: 28cqw; height: 34cqh; z-index: 1; }
.frame { position: absolute; left: 29.5cqw; top: 9cqh; width: 5cqw; min-width: 34px; z-index: 1; transform-origin: 50% 0; }

/* the corkboard: memos tell the office's story */
.board {
  position: absolute; left: 2.5cqw; top: 5cqh; width: 24cqw; height: 36cqh; z-index: 1;
  background: var(--paper-2); border: 3px solid var(--ink); border-radius: 4px; padding: 22px 8px 8px;
}
.board-title {
  position: absolute; top: -3px; left: 50%; translate: -50% 0; background: var(--ink); color: var(--paper);
  font: 800 11px/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; padding: 5px 10px 4px; border-radius: 0 0 4px 4px; white-space: nowrap;
}
.memos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; height: 100%; align-content: start; }
.memo {
  position: relative; min-height: 44px; aspect-ratio: 1; padding: 10px 5px 4px; cursor: pointer; overflow: hidden; text-align: left;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); transform: rotate(var(--tilt));
  font: 600 clamp(7px, .82cqw, 11px)/1.2 var(--mono); transition: transform .12s;
}
.memo-1 { background: var(--chart); } .memo-2 { background: #fff; }
.memo i { position: absolute; top: 2px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--cobalt); border: 1.5px solid var(--ink); }
.memo span { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.memo:hover { transform: rotate(0) scale(1.08); z-index: 2; }

/* props that arrive as the office grows (their lower halves hide behind the desk) */
.prop { position: absolute; z-index: 0; transform-origin: 50% 100%; }
.cabinet { left: 38cqw; bottom: 54.6cqh; width: 5cqw; }
.cabinet .cab-drawer { transition: transform .25s; }
.cabinet.open .cab-drawer { transform: translateY(4px) scale(1.06); }
.prop-label { font: 800 5px var(--cond); fill: var(--ink); letter-spacing: .05em; }
.rack { left: 44.5cqw; bottom: 54.6cqh; width: 4.2cqw; }
.cooler { left: 50cqw; bottom: 54.6cqh; width: 4.4cqw; }
.cooler.glug .bubble { animation: glug .8s ease-out; }
@keyframes glug { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(-6px); opacity: 1; } }
.chair { position: absolute; left: 56cqw; bottom: 52.5cqh; width: 5cqw; min-width: 32px; z-index: 0; }
.desk {
  position: absolute; inset: 50% 0 0 0; z-index: 1; background: var(--paper);
  border-top: max(4px, .9cqh) solid var(--ink);
}
.desk::after { /* the desk's front edge, nearest us, where the drawer lives */
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: var(--paper-2); border-top: 2px solid var(--ink);
}
.lamp { position: absolute; right: 3.5cqw; bottom: 44cqh; width: 5.5cqw; min-width: 36px; z-index: 3; }
.lamp.off .lamp-light { opacity: 0; }
.plant { position: absolute; left: 63cqw; bottom: 46cqh; width: 3.5cqw; min-width: 26px; z-index: 2; transform-origin: 50% 100%; }

/* the hand brewer is the Brew control */
.brewer {
  position: absolute; left: 2.5cqw; bottom: 13cqh; z-index: 4; width: min(16cqw, 40cqh); padding: 0; border: 0;
  background: none; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.brewer svg { width: 100%; display: block; transform-origin: 50% 100%; overflow: visible; }
.brewer text { font: 800 12px var(--cond); letter-spacing: .1em; fill: var(--ink); }
.brewer .lever-arm { transform-origin: 104px 30px; transform-box: view-box; }
.brewer .drip { opacity: 0; }
.brewer .needle { transform-origin: 81px 34px; transform-box: view-box; transform: rotate(-120deg); transition: transform .18s cubic-bezier(.3,1.6,.5,1); }
.brewer .whistle-steam { opacity: 0; }
.brewer.blow .whistle-steam { animation: blow .9s ease-out; }
.brewer.blow .whistle { animation: toot .5s ease-out; transform-origin: 41px 19px; transform-box: view-box; }
@keyframes blow { 0% { opacity: 0; transform: translateY(4px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px) scale(1.3); } }
@keyframes toot { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.25, .8); } 60% { transform: scale(.9, 1.15); } }
.brewer-label {
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 3px 8px 2px;
  font: 700 clamp(11px, 1.25cqw, 14px)/1.2 var(--mono); white-space: nowrap;
}
.brewer:hover .plate rect { fill: #d6ff6b; }
.brewer:hover .lever-arm { animation: leverHover 1s ease-in-out infinite; }
@keyframes leverHover { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
.pips { display: flex; gap: 3px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); transition: background .1s, transform .1s; }
.pips i.on { background: var(--chart); transform: scale(1.15); }
.refill { display: block; width: 70%; height: 4px; background: var(--ink); border-radius: 2px; overflow: hidden; }
.refill i { display: block; height: 100%; background: var(--chart); transform-origin: 0 50%; }

.shared { position: absolute; left: 19.5cqw; bottom: 16cqh; z-index: 3; width: min(13cqw, 34cqh); }
.shared svg { width: 100%; display: block; transform-origin: 50% 100%; overflow: visible; }
.shared-name { font: 800 11px var(--cond); letter-spacing: .12em; fill: var(--ink); }
.shared-steam { opacity: 0; }
body[data-paused="no"] .shared-steam { animation: steam 2.6s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-8px); } }
.count-plate {
  position: absolute; right: -6%; top: 18%; background: var(--chart); color: var(--ink); border: 2px solid var(--ink);
  border-radius: 4px; padding: 1px 6px; font: 800 clamp(12px, 1.5cqw, 16px)/1.2 var(--mono); display: inline-block;
}
.team {
  position: absolute; left: 34cqw; width: 26cqw; bottom: 25cqh; z-index: 3; height: min(9.5cqw, 22cqh);
  display: flex; align-items: flex-end; justify-content: center;
}
.team-back { bottom: 33cqh; left: 36cqw; width: 22cqw; height: min(7cqw, 16cqh); z-index: 2; }
.mate {
  position: relative; display: block; flex: 0 0 auto; width: min(9.5cqw, 22cqh); height: 100%; margin: 0 -1.4cqw; padding: 0;
  border: 0; background: none; cursor: pointer; transform-origin: 50% 100%;
}
.team-back .mate { width: min(7cqw, 16cqh); margin: 0 -0.6cqw; }
.mate-jim { display: block; width: 100%; height: 100%; }
.mate svg { width: 100%; height: 100%; display: block; overflow: visible; }
.nameplate {
  position: absolute; left: 50%; bottom: -4px; translate: -50% 0; white-space: nowrap; pointer-events: none;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; padding: 0 4px;
  font: 800 clamp(8px, .85cqw, 11px)/1.35 var(--cond); letter-spacing: .06em; text-transform: uppercase; opacity: 0; transition: opacity .15s;
}
.team-back .nameplate { display: none; }
body.hurry-ready .team .mate:hover { transform: translateY(-6%); }
.mate:hover .nameplate, .mate:focus-visible .nameplate { opacity: 1; }
body.hurry-ready .mate .nameplate::after { content: " · hurry"; color: var(--cobalt); }
.team-count { left: auto; right: 41cqw; top: auto; bottom: calc(25cqh + min(9.5cqw, 22cqh)); z-index: 4; }
.trays { position: absolute; left: 36cqw; width: 22cqw; bottom: 21cqh; z-index: 4; display: flex; justify-content: center; gap: 1cqw; }
.trays i { display: block; width: 4.4cqw; height: max(7px, 1.4cqh); background: var(--cobalt); border: 2px solid var(--ink); border-radius: 2px 2px 5px 5px; }
.hurry {
  position: absolute; left: 38cqw; bottom: 13.8cqh; z-index: 8; min-height: 40px; padding: 4px 10px; overflow: hidden; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 0 3px 0 var(--ink);
  font: 700 clamp(12px, 1.2cqw, 14px)/1 var(--mono); display: inline-flex; align-items: center; gap: 6px;
}
.hurry-fill { position: absolute; inset: 0; background: var(--chart); opacity: .4; transform-origin: 0 50%; }
.hurry.ready { background: var(--chart); }
.hurry.ready .hurry-fill { opacity: 0; }
.hurry > *:not(.hurry-fill) { position: relative; }
.hurry:active { transform: translateY(3px); box-shadow: none; }

.boss { position: absolute; left: 61cqw; bottom: 11cqh; z-index: 5; width: min(25cqw, 54cqh); aspect-ratio: 1; }
.jim-host { display: block; width: 100%; height: 100%; line-height: 0; }
.jim-host svg { overflow: visible; }
.say {
  position: absolute; bottom: 92%; right: 58%; z-index: 6; width: max-content; max-width: min(30cqw, 280px);
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 7px 11px;
  font: 600 clamp(13px, 1.5cqw, 16px)/1.3 var(--mono); transform-origin: 90% 100%;
}
.say::after { content: ""; position: absolute; right: -10px; bottom: 10px; border: 7px solid transparent; border-left: 9px solid var(--ink); }

.orders {
  position: absolute; left: 53cqw; bottom: 15cqh; z-index: 9; width: 8cqw; min-width: 64px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
}
.spike { width: 46%; display: block; }
.slips { position: absolute; left: 6%; right: 6%; top: 8%; height: 60%; pointer-events: none; }
.slips i {
  position: absolute; left: 0; right: 0; top: calc(var(--i) * 12%); padding: 3px 4px; background: var(--paper); border: 1.5px solid var(--ink);
  font: 600 clamp(7px, .75cqw, 10px)/1.2 var(--mono); color: var(--ink); transform: rotate(calc((var(--i) - 1) * 5deg)); font-style: normal;
}
.slips b { display: block; font: 800 clamp(8px, .85cqw, 11px)/1 var(--cond); letter-spacing: .1em; color: var(--cobalt); }
.orders-label { position: relative; margin-top: 2px; background: var(--chart); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 2px 6px; font: 700 clamp(11px, 1.15cqw, 13px)/1.2 var(--mono); white-space: nowrap; }
.orders.stamped .slips::after {
  content: "APPROVED"; position: absolute; left: 50%; top: 30%; translate: -50% 0; rotate: -12deg; padding: 2px 5px; border: 3px solid var(--cobalt); color: var(--cobalt);
  font: 900 clamp(10px, 1.2cqw, 15px)/1 var(--cond); letter-spacing: .08em; background: var(--paper); animation: stampIn .6s ease-out forwards;
}
@keyframes stampIn { 0% { transform: scale(2.2); opacity: 0; } 25% { transform: scale(.9); opacity: 1; } 40% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

.rail { position: absolute; left: 2cqw; right: 2cqw; bottom: 11cqh; z-index: 6; height: max(10px, 2.4cqh); }
.rail-track {
  height: 100%; border: 2px solid var(--ink); border-radius: 3px; background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 22px), var(--cold);
}
.cups { position: absolute; left: 0; right: 0; bottom: calc(11cqh + max(10px, 2.4cqh) - 2px); height: 7cqh; z-index: 7; pointer-events: none; }
.fly { position: absolute; left: 0; bottom: 0; height: max(18px, 6cqh); display: flex; align-items: flex-end; transform-origin: 50% 100%; will-change: transform; }
.fly svg { width: max(18px, 6cqh); height: max(18px, 6cqh); display: block; }
.fly.tray { padding: 0 3px 3px; border-bottom: 4px solid var(--cobalt); gap: 0; }
.fly.tray svg { margin: 0 -2px; }
.served-tray {
  position: absolute; right: 1cqw; bottom: 8cqh; z-index: 8; width: 9cqw; min-width: 60px; height: 8cqh;
  display: flex; align-items: flex-end; justify-content: center;
}
.served-tray span {
  display: block; width: 100%; height: 70%; background: var(--paper); border: 2px solid var(--ink); border-top-width: 4px; border-radius: 2px 2px 6px 6px;
  font: 800 clamp(10px, 1.2cqw, 13px)/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  display: flex; align-items: center; justify-content: center; transform-origin: 50% 100%;
}
.drawer {
  position: absolute; left: 41cqw; bottom: 1.4cqh; z-index: 8; width: 16cqw; min-width: 110px; height: max(44px, 8cqh); padding: 0;
  border: 0; background: none; cursor: pointer;
}
.drawer-front {
  position: absolute; inset: 0; display: block; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 3px;
  transition: transform .25s cubic-bezier(.3,1.4,.5,1); transform-origin: 50% 0;
}
.drawer-knob { position: absolute; left: 50%; top: 50%; width: 26%; height: 18%; translate: -50% -50%; background: var(--cobalt); border: 2px solid var(--ink); border-radius: 10px; }
.drawer-glint { position: absolute; right: 8%; top: 22%; width: 12px; height: 12px; opacity: 0; background: conic-gradient(from 45deg, var(--gold) 0 25%, transparent 0 50%, var(--gold) 0 75%, transparent 0); }
.drawer.full .drawer-glint { opacity: 1; }
.drawer.full .drawer-front { transform: translateY(3px); }
.drawer.rattle .drawer-front { animation: rattle .45s ease-in-out 3; }
.drawer.open .drawer-front { transform: translateY(14%) scaleY(1.14); }
.drawer:hover .drawer-front { transform: translateY(4px); }
@keyframes rattle { 0%, 100% { translate: 0 0; } 25% { translate: -3px 1px; rotate: -1.5deg; } 75% { translate: 3px 0; rotate: 1.5deg; } }
.catch-layer { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.catch-layer > * { pointer-events: auto; }
.wobble {
  position: absolute; width: max(44px, 7cqh); height: max(44px, 7cqh); padding: 0; border: 0; background: none; cursor: grab;
  transform: translate(-50%, -100%); transform-origin: 50% 100%;
}
.wobble svg { width: 100%; height: 100%; display: block; }
.wobble span {
  position: absolute; top: -10px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--chart); border: 2px solid var(--ink);
  color: var(--ink); font: 900 13px/16px var(--cond); text-align: center;
}
.wobble.landed { transform: translate(-50%, -100%); cursor: pointer; }
.wobble.landed span { background: var(--paper); }
.mate-say {
  position: absolute; z-index: 13; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 3px 7px;
  font: 700 clamp(11px, 1.1cqw, 13px)/1.2 var(--mono);
}

.gift {
  position: absolute; right: 1.5cqw; bottom: 16cqh; z-index: 9; width: min(11cqw, 26cqh); min-width: 72px; padding: 6px 4px 4px;
  background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.gift-mug { width: 64%; aspect-ratio: 1; display: block; }
.gift-spark { position: absolute; top: -10%; left: 50%; width: 84%; transform: translateX(-50%); pointer-events: none; z-index: -1; }
.gift { isolation: isolate; }
.gift:hover .gift-mug { animation: giftHover .8s ease-in-out infinite; }
@keyframes giftHover { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg) translateY(-3px); } }
.gift-label {
  position: relative; background: var(--gold); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 2px 6px;
  font: 700 clamp(11px, 1.2cqw, 13px)/1.2 var(--mono); white-space: nowrap;
}
.slip {
  position: absolute; top: 4cqh; left: 50%; z-index: 10; translate: -50% 0; max-width: 80cqw; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 3px; padding: 8px 14px;
  font: 600 15px/1.3 var(--mono);
}

/* desktop: hover tooltips and key hints, only where there's a mouse */
kbd.hint { display: none; font: 700 10px/1 var(--mono); padding: 2px 4px; border: 1.5px solid currentColor; border-radius: 3px; opacity: .7; vertical-align: 1px; }
.keys-card { display: none; }
@media (hover: hover) and (pointer: fine) {
  kbd.hint { display: inline-block; }
  .buy kbd.hint { position: absolute; top: 3px; right: 4px; }
  .keys-card { display: block; margin-top: 14px; padding: 10px; border: 2px dashed var(--ink); border-radius: 6px; font: 500 13px/2 var(--mono); }
  .keys-card kbd { font: 700 11px var(--mono); border: 1.5px solid var(--ink); border-radius: 3px; padding: 1px 5px; background: var(--paper); }
  [data-tip]:hover::after {
    content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; z-index: 30; white-space: nowrap; pointer-events: none;
    background: var(--ink); color: var(--paper); border-radius: 4px; padding: 4px 8px; font: 700 12px/1.2 var(--mono);
  }
  .poke:hover { filter: brightness(1.04); }
  .poke:hover svg { transform: translateY(-2px); transition: transform .12s; }
}
.rate-next { display: block; min-height: 1em; font: 700 12px/1 var(--mono); color: var(--chart); opacity: .85; text-align: right; }
.memo-big {
  width: min(420px, 92vw); background: var(--chart); color: var(--ink); border: 3px solid var(--ink); padding: 26px 24px 18px; transform: rotate(-1.5deg);
  font: 600 19px/1.4 var(--mono); text-align: center; position: relative;
}
.memo-big::before { content: ""; position: absolute; top: 8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--cobalt); border: 2px solid var(--ink); }
.memo-head { font: 800 13px var(--cond); letter-spacing: .2em; text-transform: uppercase; margin: 6px 0 10px; }
.memo-from { font-size: 14px; opacity: .8; }
.keylist { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0 0; align-items: baseline; }
.keylist dt { white-space: nowrap; } .keylist dd { margin: 0; font-size: 15px; }
.keylist kbd { font: 700 13px var(--mono); border: 2px solid var(--ink); border-radius: 4px; padding: 1px 6px; }

/* ---------- the roster clipboard */
.clipboard { position: relative; padding: 26px clamp(12px, 1.6vw, 24px) 14px 4px; min-height: 0; display: flex; }
.clip {
  position: absolute; top: 12px; left: calc(50% - 50px); width: 100px; height: 26px; z-index: 2;
  background: var(--cobalt); border: 3px solid var(--ink); border-radius: 8px 8px 4px 4px;
}
.sheet {
  flex: 1; min-height: 0; overflow: auto; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 6px; padding: 26px 16px 14px; overscroll-behavior: contain;
}
.next {
  margin: 0 0 14px; padding: 8px 10px; background: var(--chart); border: 2px solid var(--ink); transform: rotate(-.8deg);
  font: 600 15px/1.3 var(--mono); min-height: 44px;
}
.sheet-title { margin: 0 0 4px; font: 800 13px/1 var(--cond); letter-spacing: .16em; text-transform: uppercase; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 2px dashed var(--ink); }
.row-icon { width: 44px; height: 44px; display: block; }
.row-icon svg { width: 100%; height: 100%; display: block; }
.row-main p { margin: 0; }
.row-name { font: 800 18px/1.15 var(--cond); letter-spacing: .02em; }
.row-owned { font: 700 15px var(--mono); color: var(--cobalt); margin-left: 4px; }
.row-rate { font: 500 14px/1.3 var(--mono); }
.row-milestone { font: 500 13px/1.3 var(--mono); opacity: .78; }
.row.milestone .row-milestone { color: var(--cobalt); font-weight: 700; opacity: 1; }
.buy {
  position: relative; overflow: hidden; min-width: 100px; min-height: 54px; padding: 4px 12px; cursor: pointer;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 7px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
  box-shadow: 0 3px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.buy-fill { position: absolute; inset: 0; background: var(--chart); opacity: .45; transform-origin: 0 50%; transform: scaleX(0); }
.buy-verb, .buy-cost { position: relative; }
.buy-verb { font: 800 13px var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.buy-cost { font: 700 19px var(--mono); font-variant-numeric: tabular-nums; }
.buy-cost::after { content: " cr"; font-size: 12px; opacity: .7; }
.row.can .buy { background: var(--chart); }
.row.can .buy-fill { opacity: 0; }
.row.can .buy:hover { background: #d6ff6b; }
.buy:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.row-next { display: block; padding: 12px 10px; margin-top: 10px; border: 2px dashed var(--ink); border-radius: 6px; font: 500 14px/1.35 var(--mono); }
.row[hidden] { display: none; }

/* ---------- dock */
.dock {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px clamp(12px, 2vw, 28px) 8px 4px;
  border-bottom: 3px solid var(--ink); background: var(--carbon); position: relative; z-index: 30;
}
.dock .dock-btn { min-width: 0; min-height: 44px; padding: 6px 12px; }
.phone-toys { display: none; }
.dock-btn {
  min-height: 48px; min-width: 96px; padding: 6px 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink);
  font: 700 15px var(--mono);
}
.dock-btn[aria-pressed="true"] { background: var(--chart); }
.dock-btn .ico { font-size: 13px; letter-spacing: -2px; }
.dock-btn:active, .dock-brew:active { transform: translateY(3px); box-shadow: none; }
.dock-stop { background: var(--cobalt); color: var(--paper); }
.dock-stop[hidden], .dock-btn[hidden] { display: none; }
.dock-brew { display: none; }

/* ---------- overlays */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.pop {
  position: fixed; left: 0; top: 0; padding: 3px 9px; border: 2px solid var(--ink); border-radius: 6px; white-space: nowrap;
  font: 800 20px/1.1 var(--mono); background: var(--chart); color: var(--ink); will-change: transform, opacity;
}
.pop-cost { background: var(--paper); font-size: 17px; }
.pop-stamp { --tilt: -9deg; background: var(--paper); color: var(--cobalt); border: 3px solid var(--cobalt); font: 900 34px/1 var(--cond); padding: 4px 12px; }
.pop-gold { background: var(--gold); font-size: 24px; }

.paused { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(11, 11, 10, .55); }
.paused[hidden], .sheet-wrap[hidden], .banner[hidden], .failure[hidden], .slip[hidden], .say[hidden], .gift[hidden], .shared[hidden],
.plant[hidden], .chair[hidden], .window-note[hidden], .count-plate[hidden], .report-body[hidden], .report-stage[hidden],
.prop[hidden], .lamp[hidden], .hurry[hidden], .orders[hidden] { display: none; }
.card {
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 18px 22px; max-width: min(380px, 90vw);
  text-align: center; font: 500 16px/1.4 var(--mono);
}
.card-title { font: 800 24px var(--cond); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 6px; }
.btn {
  min-height: 48px; padding: 8px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink);
  font: 700 15px var(--mono);
}
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn-go { background: var(--chart); margin-top: 10px; }
.btn-quiet { background: transparent; box-shadow: none; text-decoration: underline; }

.banner {
  position: fixed; top: 10px; left: 50%; translate: -50% 0; z-index: 40; width: min(620px, 94vw);
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-left: 12px solid var(--cobalt); border-radius: 8px;
  padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 600 15px/1.35 var(--mono);
}
.banner p { margin: 0; flex: 1 1 240px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(11, 11, 10, .66); padding: 12px; }
.report, .files {
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; width: min(460px, 94vw);
  max-height: calc(100svh - 24px); overflow: auto; padding: 18px 22px 20px; font: 500 16px/1.45 var(--mono);
}
.files { width: min(580px, 94vw); }
.report { text-align: center; }
.report-jim { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.receipts { position: absolute; left: 20%; right: 20%; top: 70%; height: 16%; pointer-events: none; }
.receipts i { position: absolute; width: 38%; height: 100%; background: var(--paper); border: 1.5px solid var(--ink); }
.receipts i::after { content: ""; position: absolute; inset: 22% 14%; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.receipts i:nth-child(1) { left: 4%; transform: rotate(-9deg); }
.receipts i:nth-child(2) { left: 32%; top: 10%; transform: rotate(4deg); }
.receipts i:nth-child(3) { right: 2%; transform: rotate(12deg); }
.report-stage { font-style: italic; margin: 6px 0 0; }
.report h2 { font: 800 26px/1.1 var(--cond); letter-spacing: .06em; text-transform: uppercase; margin: 6px 0 8px; }
.report-big { font-weight: 800; font-size: 19px; margin: 0 0 6px; }
.report-quote { font-style: italic; }
.figures { text-align: left; margin: 10px 0; border-top: 2px dashed var(--ink); padding-top: 8px; }
.figures summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.figures dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0 0; font-size: 14px; }
.figures dt { opacity: .75; } .figures dd { margin: 0; font-variant-numeric: tabular-nums; }
.files-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.files h2 { font: 800 26px var(--cond); letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.files h3 { font: 800 14px var(--cond); letter-spacing: .16em; text-transform: uppercase; margin: 18px 0 6px; padding-top: 12px; border-top: 2px dashed var(--ink); }
.files p { margin: 0 0 8px; }
.files kbd { font: 700 14px var(--mono); border: 2px solid var(--ink); border-radius: 4px; padding: 0 5px; }
.files-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ledger { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ledger li { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: start; opacity: .55; }
.ledger li.got { opacity: 1; }
.ledger .stamp { grid-row: span 2; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-weight: 900; }
.ledger li.got .stamp { background: var(--chart); }
.ledger b { font: 800 16px var(--cond); letter-spacing: .03em; }
.ledger span:last-child { font-size: 14px; }
.credit { margin-top: 18px; padding-top: 12px; border-top: 2px dashed var(--ink); font-size: 14px; }
.failure {
  position: fixed; left: 50%; top: 40%; translate: -50% -50%; z-index: 70; width: min(440px, 90vw); text-align: center;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 18px; font: 600 16px/1.5 var(--mono);
}
.failure a { color: var(--cobalt); }



/* ---------- phone: a close-up desk, the roster below, Brew in a fixed dock */
@media (max-width: 760px) {
  body { overflow: auto; }
  .room { display: grid; grid-template-columns: 1fr; height: auto; min-height: 100svh; grid-template-rows: auto auto; padding-bottom: calc(var(--dock-h) + 14px + env(safe-area-inset-bottom)); }
  .room > .office { grid-column: 1; }
  .strip { position: sticky; top: 0; z-index: 20; background: var(--carbon); gap: 12px; padding: 8px 12px 6px; }
  .filetab-name { font-size: 12px; padding: 5px 8px 4px; }
  .filetab-year { font-size: 10px; }
  .readout-label { font-size: 10px; letter-spacing: .08em; }
  .readout-value { font-size: 20px; }
  .readout-credits .readout-value { font-size: 24px; }
  .rate-next { display: none; }
  .strip { gap: 10px; }
  .readout-value { font-size: 18px; }
  .readout { min-width: 0; }
  .filetab-year .ph { display: none; }
  .office { grid-template-columns: 1fr; }
  .scene { height: clamp(250px, 40svh, 360px); }
  .wall { height: 46%; }
  .desk { top: 46%; }
  .window, .poke-window { right: 3cqw; top: 5cqh; width: 36cqw; height: 32cqh; }
  .window-note { right: 4cqw; top: 8cqh; width: 18cqw; }
  .board { left: 2cqw; top: 4cqh; width: 34cqw; height: 34cqh; padding: 16px 5px 5px; }
  .board-title { font-size: 9px; padding: 3px 7px; }
  .memos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .memo:nth-child(n+3) { display: none; }
  .memo { font-size: 7px; aspect-ratio: auto; height: 44px; }
  .frame { left: 39cqw; top: 8cqh; width: 8cqw; }
  .cabinet, .rack { display: none; }
  .cooler { left: 50cqw; bottom: 46cqh; width: 7cqw; }
  .chair { left: 39cqw; bottom: 47cqh; width: 8cqw; }
  .plant { left: 58cqw; bottom: 52cqh; width: 5cqw; }
  .lamp { right: auto; left: 69cqw; bottom: 42cqh; width: 8cqw; z-index: 2; }
  .brewer { left: 1.5cqw; bottom: 17cqh; width: min(22cqw, 38cqh); gap: 2px; }
  .brewer-label { display: none; }
  .brewer .refill { display: none; }
  .brewer .pips i { width: 6px; height: 6px; }
  .shared { left: 22cqw; bottom: 20cqh; width: min(16cqw, 30cqh); }
  .team { left: 39cqw; width: 32cqw; bottom: 29cqh; height: min(14cqw, 22cqh); }
  .team-back { left: 43cqw; width: 24cqw; bottom: 37cqh; height: min(10cqw, 16cqh); }
  .mate { width: min(14cqw, 22cqh); margin: 0 -2.2cqw; }
  .team-back .mate { width: min(10cqw, 16cqh); margin: 0 -1cqw; }
  .team-count { right: 27cqw; bottom: calc(29cqh + min(14cqw, 22cqh)); }
  .trays { left: 41cqw; width: 28cqw; bottom: 25cqh; }
  .trays i { width: 6cqw; }
  .hurry { left: 38cqw; bottom: 15cqh; min-height: 34px; font-size: 12px; padding: 3px 8px; }
  .boss { left: auto; right: 0; bottom: 12cqh; width: min(34cqw, 52cqh); }
  .say { right: 64%; bottom: 80%; max-width: 56cqw; font-size: 13px; padding: 6px 9px; }
  .orders { left: 2cqw; bottom: 0.8cqh; width: auto; min-width: 0; z-index: 9; }
  .orders .spike, .orders .slips { display: none; }
  .orders-label { margin: 0; min-height: 40px; display: inline-flex; align-items: center; font-size: 13px; }
  .orders-label::after { content: attr(data-n); margin-left: 4px; }
  .rail { left: 2cqw; right: 2cqw; bottom: 11cqh; }
  .cups { bottom: calc(11cqh + max(10px, 2.4cqh) - 2px); }
  .served-tray { right: 1cqw; bottom: 9cqh; width: 15cqw; height: 9cqh; }
  .drawer { left: 34cqw; width: 30cqw; height: max(40px, 9cqh); bottom: 0.5cqh; }
  .gift { right: auto; left: 37cqw; bottom: auto; top: 3cqh; width: 22cqw; min-width: 0; z-index: 11; }
  .gift-label { font-size: 11px; }
  .shared .count-plate { top: -8%; right: -14%; }
  .dock-brew .refill { background: rgba(11, 11, 10, .2); }
  .dock-brew .refill i { background: var(--ink); }
  .slip { top: auto; bottom: 18cqh; font-size: 14px; width: max-content; }
  .clipboard { padding: 22px 10px 10px; }
  .clip { top: 8px; }
  .sheet { overflow: visible; padding: 22px 12px 10px; }
  .row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 10px 0; }
  .row-icon { width: 40px; height: 40px; }
  .row-name { font-size: 17px; }
  .row-rate { font-size: 13px; }
  .row-milestone { font-size: 12px; display: none; }
  .row.milestone .row-milestone { display: block; }
  .next { font-size: 14px; padding: 6px 9px; margin-bottom: 8px; min-height: 0; }
  .buy { min-width: 88px; }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); min-height: var(--dock-h); border-top: 3px solid var(--ink);
  }
  .dock-btn { min-width: 0; padding: 4px 6px; flex-direction: column; gap: 2px; font-size: 12px; min-height: 48px; }
  .dock-btn .ico { font-size: 14px; }
  .dock-brew {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; grid-column: span 2;
    min-height: 56px; cursor: pointer; background: var(--chart); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px;
    box-shadow: 0 4px 0 var(--ink); font: 800 20px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase;
    touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  }
  .dock-brew .refill { width: 60%; }
  .dock-brew .pips { gap: 4px; }
  .dock-brew .pips i { width: 7px; height: 7px; }
  
  kbd.hint, .keys-card { display: none !important; }
}
@media (max-width: 760px) and (max-height: 640px) { .scene { height: clamp(210px, 36svh, 300px); } }
@media (min-width: 761px) and (max-height: 560px) { .strip { padding-top: 6px; padding-bottom: 4px; } .readout-credits .readout-value { font-size: 28px; } }

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


/* ---------- the city plan (the window folds down into it with the first floor) */
.plan, .plan-tab, .hatch, .lift, .trolley { display: none; }
body.city .window, body.city .poke-window, body.city .window-note { display: none; }
body.city .plan { display: block; position: absolute; right: 3cqw; top: 6cqh; width: 46cqw; height: 38cqh; transform-origin: 50% 0; }
body.city .plan-tab {
  display: block; position: absolute; right: 3cqw; top: calc(6cqh - 18px); background: var(--chart); color: var(--ink); border: 2px solid var(--ink); border-bottom: 0;
  border-radius: 5px 5px 0 0; padding: 3px 9px 2px; font: 800 11px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase;
}
.plan .bld, .plan .pin, .plan .dot, .plan .busstop, .plan .hq, .plan .cart { opacity: 0; transition: opacity .6s; }
.plan .bld.on, .plan .pin.on, .plan .dot.on, .plan .busstop.on { opacity: 1; }
.plan .bld .win { fill: var(--ink); }
body.dept .plan .hq { opacity: 1; }
body.dept .plan .bld[data-i="6"] { opacity: 0 !important; }
body.p-cart .plan .cart { opacity: 1; }
body.p-nightshift .plan-ground { fill: #1d2a6b; }
body.p-nightshift .plan .bld .win { fill: var(--chart); }
.hq-text { font: 800 6.5px var(--cond); fill: var(--ink); letter-spacing: .06em; }
.bus-text { font: 800 5px var(--cond); fill: var(--ink); }
.prop-label.big { font-size: 7px; }
.lift-num { font: 800 8px var(--mono); fill: var(--chart); }
body.p-hatch .hatch { display: block; position: absolute; left: 37cqw; top: 9cqh; width: 8cqw; }
body.p-hatch .hatch-door { animation: hatch 5s ease-in-out infinite; transform-origin: 50% 0; transform-box: fill-box; }
@keyframes hatch { 0%, 70%, 100% { transform: scaleY(1); } 80%, 90% { transform: scaleY(.2); } }
body.p-lift .lift { display: block; position: absolute; left: 28.5cqw; bottom: 54.6cqh; width: 8cqw; z-index: 0; }
body.p-lift .lift-l { animation: liftL 9s ease-in-out infinite; transform-box: fill-box; }
body.p-lift .lift-r { animation: liftR 9s ease-in-out infinite; transform-box: fill-box; }
@keyframes liftL { 0%, 80%, 100% { transform: none; } 85%, 95% { transform: translateX(-60%) scaleX(.4); } }
@keyframes liftR { 0%, 80%, 100% { transform: none; } 85%, 95% { transform: translateX(60%) scaleX(.4); } }
body.p-trolley .trolley { display: block; position: absolute; left: 2cqw; bottom: calc(11cqh + max(10px, 2.4cqh) - 3px); width: max(46px, 6cqw); z-index: 7; animation: trolley 18s linear infinite; pointer-events: none; }
@keyframes trolley { from { transform: translateX(0); } to { transform: translateX(84cqw); } }
.trolley svg { width: 100%; display: block; }
body.p-handbook .team .mate::after {
  content: ""; position: absolute; left: 18%; bottom: 36%; width: 16%; height: 14%; background: var(--cobalt); border: 1.5px solid var(--ink); border-radius: 1px; pointer-events: none;
}
body.p-whistle .brewer .whistle rect:first-of-type { fill: var(--gold); }

/* ---------- office projects on the roster */
.projects-title { margin-top: 18px; }
.projects { list-style: none; margin: 0; padding: 0; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--ink); }
.project-main p { margin: 0; }
.project-name { font: 800 17px/1.15 var(--cond); }
.project-note { font: 700 13px/1.3 var(--mono); color: var(--cobalt); }
.project-rate { font: 500 13px/1.3 var(--mono); opacity: .8; }
.project.can .buy { background: var(--chart); }
.project.can .buy-fill { opacity: 0; }
.project-next { margin: 10px 0 0; font: 500 13px/1.35 var(--mono); opacity: .75; }
.project-next[hidden], .projects-title[hidden], .year-card[hidden], .ledger-toast[hidden] { display: none; }

.ledger-toast {
  position: fixed; top: 74px; right: 16px; z-index: 45; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-left: 8px solid var(--chart);
  border-radius: 6px; padding: 7px 12px; font: 600 14px/1.3 var(--mono); pointer-events: none;
}
.ledger-toast b { font: 800 12px var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); margin-right: 6px; }
#files-open.new::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--chart); border: 2px solid var(--ink); margin-left: 2px; }
@media (max-width: 760px) {
  body.city .plan { right: 3cqw; top: 6cqh; width: 40cqw; height: 32cqh; }
  body.city .plan-tab { right: 3cqw; top: calc(6cqh - 15px); font-size: 9px; padding: 2px 6px; }
  body.p-hatch .hatch, body.p-lift .lift { display: none; }
  .ledger-toast { top: 64px; right: 10px; left: 10px; text-align: center; }
}

/* ---------- fiscal years and the ending */
.year-card { margin: 16px 0 4px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper-2); font: 500 14px/1.35 var(--mono); }
.year-card p { margin: 0 0 6px; }
.year-card-title { font: 800 16px/1.1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.year-card.ready { background: var(--chart); transform: rotate(-.6deg); }
.year-card .buy { width: 100%; min-height: 48px; background: var(--paper); }
.year-bar { display: block; height: 8px; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; background: var(--paper); }
.year-bar i { display: block; height: 100%; background: var(--cobalt); transform-origin: 0 50%; }
.year-sheet h2 { margin-bottom: 6px; }
.year-lede { font-weight: 700; }
.year-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.year-cols h3 { margin-top: 8px; }
.year-cols ul { margin: 0; padding-left: 18px; font-size: 14px; }
.year-small { font-size: 13px; opacity: .75; }
.files-actions.center { justify-content: center; }
.undo-year {
  position: fixed; left: 50%; bottom: 18px; translate: -50% 0; z-index: 41; min-height: 48px; padding: 8px 16px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--ink); font: 700 15px var(--mono);
}
.undo-year[hidden] { display: none; }
.years { margin: 0; padding-left: 18px; font-size: 14px; }
@media (max-width: 760px) { .undo-year { bottom: calc(var(--dock-h) + 22px); } .year-cols { grid-template-columns: 1fr; } }

/* round 3: window sill, junk drawer that points at itself */
.sill { position: absolute; right: 3cqw; top: 40cqh; width: 30cqw; height: max(6px, 1.4cqh); background: var(--paper-2); border: 2px solid var(--ink); border-radius: 2px; z-index: 1; }
body.city .sill { display: none; }
.drawer-plate { position: absolute; left: 6%; top: 50%; translate: 0 -50%; padding: 1px 5px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2); color: var(--ink); font: 800 clamp(9px, .9cqw, 12px)/1.2 var(--cond); letter-spacing: .14em; }
.drawer-arrow {
  position: absolute; left: 50%; bottom: calc(100% + 4px); translate: -50% 0; display: none; white-space: nowrap; pointer-events: none;
  background: var(--chart); color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 1px 6px; font: 800 12px/1.2 var(--mono);
}
.drawer.full .drawer-arrow { display: block; animation: arrowBob 1.1s ease-in-out infinite; }
.drawer.full .drawer-front { outline: 3px solid var(--chart); outline-offset: 2px; animation: drawerNudge 5s ease-in-out infinite; }
.drawer.point .drawer-arrow { animation: arrowBob .35s ease-in-out 5; }
@keyframes arrowBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes drawerNudge { 0%, 12%, 100% { translate: 0 3px; rotate: 0deg; } 3% { translate: -5px 2px; rotate: -2.5deg; } 6% { translate: 5px 3px; rotate: 2.5deg; } 9% { translate: -3px 2px; rotate: -1deg; } }
@media (max-width: 760px) { .sill { right: 3cqw; top: 37cqh; width: 36cqw; } .drawer-arrow { font-size: 11px; } }

/* round 3: an army of Jims, receding toward the back of the desk */
.team-r2, .team-r3, .team-r4 { display: flex; align-items: flex-end; justify-content: center; }
.team-r2 { left: 32cqw; width: 30cqw; bottom: 39.5cqh; height: min(5cqw, 9cqh); z-index: 2; }
.team-r3 { left: 30cqw; width: 35cqw; bottom: 43.5cqh; height: min(3.8cqw, 7cqh); z-index: 1; }
.team-r4 { left: 28cqw; width: 40cqw; bottom: 46.8cqh; height: min(2.9cqw, 5.4cqh); z-index: 1; }
.mini { position: relative; flex: 0 0 auto; height: 100%; aspect-ratio: 40 / 52; margin: 0 -0.15cqw; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% 100%; }
.mini svg { width: 100%; height: 100%; display: block; overflow: visible; animation: miniBob 2.4s ease-in-out infinite; animation-delay: calc(var(--d) * -1); transform-origin: 50% 100%; }
@keyframes miniBob { 0%, 100% { transform: none; } 50% { transform: translateY(-4%) scale(1.02, .98); } }
body[data-paused="yes"] .mini svg { animation: none; transform: rotate(-8deg) translateY(4%); }
.crowd {
  position: absolute; left: 50%; bottom: 49.2cqh; z-index: 0; translate: -50% 0; height: max(8px, 2.2cqh); width: calc(10cqw + 34cqw * var(--fill, 0));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath d='M2 2h8l-.7 9H2.7z' fill='%23F1EFE6' stroke='%230B0B0A' stroke-width='1'/%3E%3Cpath d='M2.1 3.4h7.8' stroke='%23C8FF3D' stroke-width='1.2'/%3E%3Ccircle cx='5' cy='6' r='.7' fill='%230B0B0A'/%3E%3Ccircle cx='7' cy='6' r='.7' fill='%230B0B0A'/%3E%3C/svg%3E");
  background-size: calc(max(8px, 2.2cqh) * .86 * var(--dense, 1)) 100%; background-repeat: repeat-x; background-position: center bottom;
}
.crowd[hidden] { display: none; }
/* names: on hover, on tap, and for a moment whenever a Jim does something */
.mini::after, .mate::before {
  content: attr(data-tag); position: absolute; left: 50%; bottom: calc(100% + 2px); translate: -50% 0; white-space: nowrap; pointer-events: none; z-index: 20;
  background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; padding: 1px 5px;
  font: 800 11px/1.3 var(--cond); letter-spacing: .05em; opacity: 0; transition: opacity .15s;
}
.mate::before { bottom: calc(100% - 6px); }
.mini:hover::after, .mini.named::after, .mate:hover::before, .mate.named::before { opacity: 1; }
.mate .nameplate { display: none; }
.team-count { left: auto; right: 35cqw; bottom: calc(46.8cqh + min(2.9cqw, 5.4cqh)); z-index: 6; }
@media (max-width: 760px) {
  .team-r2 { left: 38cqw; width: 34cqw; bottom: 40cqh; height: min(6cqw, 8cqh); }
  .team-r3 { left: 37cqw; width: 38cqw; bottom: 44cqh; height: min(4.6cqw, 6cqh); }
  .team-r4 { left: 36cqw; width: 42cqw; bottom: 47.5cqh; height: min(3.6cqw, 4.8cqh); }
  .crowd { bottom: 50.5cqh; left: 57cqw; }
  .team-count { right: 2cqw; bottom: calc(47.5cqh + 6cqh); }
  .mini::after, .mate::before { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .mini svg { animation: none; } }

/* round 3: desktop fits one screen. Shortcuts live behind "?", the roster is compact. */
.dock-keys { min-width: 44px !important; padding: 6px 10px !important; font-size: 17px !important; }
@media (hover: none), (max-width: 760px) { .dock-keys { display: none !important; } }
@media (min-width: 761px) {
  .row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet { padding: 22px 14px 10px; }
  .next { margin-bottom: 8px; padding: 6px 9px; font-size: 14px; min-height: 0; }
  .row { padding: 7px 0; gap: 8px; }
  .row-name { font-size: 17px; }
  .row-rate { font-size: 13px; }
  .row-milestone { display: none; font-size: 12px; }
  .row.milestone .row-milestone { display: block; }
  .buy { min-height: 48px; min-width: 92px; }
  .buy-cost { font-size: 17px; }
  .year-card { margin: 10px 0 2px; padding: 7px 10px; font-size: 13px; }
  .year-card .buy { min-height: 44px; }
  .projects-title { margin-top: 10px; }
  .project { padding: 6px 0; gap: 8px; }
  .project-name { font-size: 15px; }
  .project-note, .project-rate { font-size: 12px; }
  .project-next { margin-top: 6px; font-size: 12px; }
}
@media (min-width: 761px) and (max-height: 860px) {
  .row-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row-rate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .next { font-size: 13px; }
  .row-icon { width: 36px; height: 36px; }
  .row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .project .project-rate { display: none; }
}

.project.fit-hide { display: none; }
.year-card:not(.ready) p { margin: 0 0 4px; }
@media (min-width: 761px) { .project-main .project-note { display: inline; } }

/* round 3: the wall fills up as the office grows */
.decor { position: absolute; inset: 0 0 auto 0; height: 44.5%; z-index: 1; pointer-events: none; }
.decor > * { position: absolute; }
.decor [hidden] { display: none; }
.plaques { left: 28cqw; top: 1.6cqh; width: 22cqw; display: flex; gap: .5cqw; pointer-events: auto; }
.plaques i { position: relative; width: 2.3cqw; min-width: 16px; aspect-ratio: 3 / 4; background: var(--cobalt); border: 2px solid var(--ink); border-radius: 2px; display: grid; place-items: center; }
.plaques b { width: 50%; aspect-ratio: 1; background: var(--chart); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 78%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.plaques i:hover::after { content: attr(data-tag); position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; white-space: nowrap; z-index: 30; background: var(--ink); color: var(--paper); border-radius: 4px; padding: 3px 7px; font: 700 12px/1.2 var(--mono); }
.clock { left: 45.2cqw; top: 5cqh; width: 5.4cqw; }
.clock-text { font: 800 5.4px var(--cond); fill: var(--paper); letter-spacing: .06em; }
.calendar { left: 39.4cqw; top: 20cqh; width: 4.6cqw; min-width: 34px; background: var(--paper); border: 2px solid var(--ink); border-radius: 2px; display: flex; flex-direction: column; text-align: center; perspective: 200px; }
.cal-top { background: var(--cobalt); color: var(--paper); font: 800 clamp(7px, .75cqw, 10px)/1.5 var(--cond); letter-spacing: .08em; border-bottom: 2px solid var(--ink); }
.cal-page { display: block; color: var(--ink); font: 900 clamp(9px, 1.05cqw, 14px)/1.9 var(--cond); letter-spacing: .02em; transform-origin: 50% 0; }
.poster { width: 5cqw; min-width: 38px; padding: 3px 3px 4px; background: var(--paper); border: 2px solid var(--ink); display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.poster b { font: 900 clamp(7px, .78cqw, 10px)/1 var(--cond); letter-spacing: .08em; color: var(--ink); }
.poster i { font: 600 clamp(6px, .62cqw, 8px)/1.15 var(--mono); color: var(--ink); font-style: normal; }
.poster-art { width: 100%; background: var(--chart); border: 1.5px solid var(--ink); }
.poster-art svg { width: 100%; display: block; }
.poster-team { left: 45.4cqw; top: 16.5cqh; }
.poster-growth { left: 33.2cqw; top: 1.2cqh; display: none; }
.poster-growth:not([hidden]) { display: flex; }
.plaques:has(i:nth-child(3)) ~ .poster-growth { top: 19cqh; left: 29cqw; }
.sun, .balloon { opacity: 0; transition: opacity .8s; }
body.sun-on .sun { opacity: 1; }
body.balloon-on .balloon { opacity: 1; animation: balloon 46s linear infinite; }
@keyframes balloon { from { transform: translate(230px, 60px); } to { transform: translate(-20px, 30px); } }
.balloon-text { font: 900 7px var(--cond); fill: var(--ink); }
@media (max-width: 760px) {
  .plaques, .calendar, .poster { display: none !important; }
  .clock { left: 49cqw; top: 8cqh; width: 9cqw; }
}

/* round 3: memos with a purpose */
.memo em { position: absolute; top: 1px; right: 2px; font: 800 clamp(6px, .6cqw, 8px)/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; font-style: normal; opacity: .7; }
.memo.unread em { opacity: 1; background: var(--ink); color: var(--chart); padding: 1px 3px; border-radius: 2px; }
.memo-tip i { background: var(--chart); } .memo-bonus i { background: var(--gold); }
.memo-bonus { background: #fff6dc; }
.board.has-new .board-title { background: var(--chart); color: var(--ink); }
.memo-means { font-size: 15px; font-weight: 700; border-top: 2px dashed var(--ink); padding-top: 8px; }
.memo-big[data-kind="bonus"] { background: var(--gold); }
.memo-big[data-kind="story"] { background: var(--paper); }

.tomorrow-tray { display: none; }
body.tomorrow .tomorrow-tray {
  display: block; position: absolute; right: 4cqw; top: calc(6cqh + 38cqh - 22px); z-index: 2; transform: rotate(-3deg);
  background: var(--cobalt); color: var(--paper); border: 2px solid var(--ink); border-radius: 3px; padding: 2px 8px; font: 900 12px/1.2 var(--cond); letter-spacing: .14em;
}

/* round 4: Golden Hour */
.gift.hour .gift-label { background: var(--ink); color: var(--gold); border-color: var(--gold); animation: hourPulse 1.2s ease-in-out infinite; }
.gift.hour .gift-spark { animation: hourSpin 6s linear infinite; }
@keyframes hourPulse { 50% { transform: scale(1.08); } }
@keyframes hourSpin { to { transform: translateX(-50%) rotate(360deg); } }
.golden-banner {
  position: absolute; left: 50%; top: 2.5cqh; translate: -50% 0; z-index: 14; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; padding: 6px 14px 10px; font: 700 16px/1 var(--mono);
}
.golden-banner b { font: 900 22px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.golden-banner i { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 4px; background: rgba(11, 11, 10, .25); border-radius: 2px; overflow: hidden; }
.golden-banner em { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; }
.golden-banner[hidden] { display: none; }
body.golden .scene::after { content: ""; position: absolute; inset: 0; z-index: 13; pointer-events: none; border: max(6px, 1cqh) solid var(--gold); box-shadow: inset 0 0 0 3px var(--ink); }
body.golden .wall { background: #2a2414; }
body.golden .window .lights rect { fill: var(--gold); }
.goldfall { position: absolute; width: max(44px, 7cqh); height: max(44px, 7cqh); padding: 0; border: 0; background: none; cursor: pointer; transform: translate(-50%, -100%); z-index: 12; }
.goldfall svg { width: 100%; height: 100%; display: block; }
.goldfall:hover svg { transform: scale(1.12) rotate(-6deg); }
@media (prefers-reduced-motion: reduce) { .gift.hour .gift-label, .gift.hour .gift-spark { animation: none; } }
@media (max-width: 760px) { .golden-banner { flex-wrap: nowrap; white-space: nowrap; top: 1.2cqh; padding: 3px 9px 7px; gap: 6px; font-size: 13px; border-width: 2px; } .golden-banner b { font-size: 15px; letter-spacing: .08em; } }

/* round 4: buy ×1 / ×10 / Max and the rebuild helper */
.roster-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.roster-head .sheet-title { margin: 0; }
.buymode { display: inline-flex; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.buymode button { min-height: 32px; min-width: 40px; padding: 2px 8px; border: 0; border-left: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 800 13px var(--mono); cursor: pointer; }
.buymode button:first-child { border-left: 0; }
.buymode button[aria-pressed="true"] { background: var(--ink); color: var(--chart); }
.year-card .rebuild { margin-top: 6px; background: var(--chart); flex-direction: row; justify-content: space-between; gap: 8px; padding: 4px 10px; }
.year-card .rebuild[aria-pressed="true"] { background: var(--cobalt); color: var(--paper); }
.rebuild-pct { font: 600 12px var(--mono); }
@media (max-width: 760px) { .buymode button { min-height: 40px; min-width: 46px; } }


/* ---------- round 5: the phone game fits one screen ----------
   Header with counters, the office scene, the next purchases, and a bottom bar: Roster · Projects ·
   BREW · Year · Files. Roster, projects and the year open in a slide-up sheet (only it scrolls). */
.quick, .sheet-bar, .dock-tab { display: none; }
@media (max-width: 760px) {
  :root { --bar-h: 66px; }
  html, body { overflow: hidden; height: 100%; overscroll-behavior: none; }
  .room { height: 100vh; height: 100dvh; min-height: 0; grid-template-rows: auto minmax(0, 1fr); padding-bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); }
  .strip { position: relative; padding: calc(4px + env(safe-area-inset-top)) 104px 4px 10px; gap: 6px; justify-content: space-between; }
  .filetab { display: none; }
  .readout { align-items: flex-start; }
  .readout-label { font-size: 9px; letter-spacing: .06em; }
  .readout-value { font-size: 15px; line-height: 1.15; }
  .readout-credits .readout-value { font-size: 22px; }
  #sound, #pause {
    position: fixed; top: calc(5px + env(safe-area-inset-top)); z-index: 31; width: 44px; height: 44px; min-height: 44px; padding: 0;
    flex-direction: row; border-radius: 10px;
  }
  #pause { right: 8px; } #sound { right: 58px; }
  #sound .lbl, #pause .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #sound .ico, #pause .ico { font-size: 17px; letter-spacing: -2px; }
  .office { display: flex; flex-direction: column; min-height: 0; }
  .scene { flex: 1 1 auto; height: auto; min-height: max(200px, 46dvh); max-height: min(122vw, 100%); }
  .quick { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 76px; max-height: 40dvh; gap: 4px; padding: 5px 8px 0; background: var(--carbon); border-top: 3px solid var(--ink); overflow: hidden; }
  .quick-note { margin: 0; color: var(--paper); font: 600 12px/1.3 var(--mono); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: none; }
  .quick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .quick-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; align-items: center; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 7px; padding: 3px 6px; flex: none; }
  .quick-row[hidden] { display: none; }
  .quick-row.best { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--chart); }
  .quick-row .row-icon { width: 30px; height: 30px; }
  .quick-main { min-width: 0; }
  .quick-main p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .quick-name { font: 800 14px/1.2 var(--cond); }
  .quick-line { font: 500 12px/1.25 var(--mono); }
  .quick-row .buy { min-height: 44px; min-width: 84px; padding: 2px 8px; box-shadow: 0 2px 0 var(--ink); }
  .quick-row .buy-verb { font-size: 11px; } .quick-row .buy-cost { font-size: 15px; }
  .quick-row.can .buy { background: var(--chart); } .quick-row.can .buy-fill { opacity: 0; }

  /* bottom bar */
  .dock { display: flex; gap: 6px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); height: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); min-height: 0; box-sizing: border-box; align-items: stretch; overflow: hidden; }
  .dock > * { min-height: 0 !important; }
  .dock > * { flex: 1 1 0; min-width: 0; }
  .dock .dock-brew { flex: 2.4 1 0; font-size: 18px; gap: 3px; }
  .dock-tab { display: flex; position: relative; flex-direction: column; gap: 1px; padding: 3px 2px; font-size: 11px; }
  .dock-tab[hidden] { display: none; }
  .dock-tab .ico, #files-open .ico { font-size: 15px; }
  #files-open { font-size: 11px; }
  .dock-tab[aria-expanded="true"] { background: var(--chart); }
  .tab-dot { display: none; position: absolute; top: 4px; right: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--chart); border: 2px solid var(--ink); }
  .dock-tab.dot .tab-dot { display: block; }
  .dock-tab[aria-expanded="true"] .tab-dot { background: var(--paper); }

  /* the roster as a slide-up sheet */
  .clipboard {
    position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); z-index: 28;
    max-height: 72%; padding: 0 6px 6px; background: var(--carbon); border-top: 3px solid var(--ink);
    display: flex; flex-direction: column; transform: translateY(115%); transition: transform .22s cubic-bezier(.2,.8,.3,1); visibility: hidden;
  }
  .clipboard.open { transform: none; visibility: visible; }
  .clip { display: none; }
  .sheet-bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; color: var(--paper); }
  .sheet-bar b { font: 800 14px var(--cond); letter-spacing: .12em; text-transform: uppercase; }
  .sheet-close { width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); font: 800 16px var(--mono); cursor: pointer; }
  .sheet { overflow: auto; flex: 1 1 auto; min-height: 0; padding: 8px 10px; overscroll-behavior: contain; }
  .sheet .next { display: none; }
  .clipboard[data-tab="roster"] :is(.projects-title, #projects, #project-next, #year-card) { display: none !important; }
  .clipboard[data-tab="projects"] :is(.roster-head, #rows, #year-card) { display: none !important; }
  .clipboard[data-tab="year"] :is(.roster-head, #rows, .projects-title, #projects, #project-next) { display: none !important; }
  .row-milestone { display: none; } .row.milestone .row-milestone { display: block; }
  .undo-year { bottom: auto; top: calc(58px + env(safe-area-inset-top)); z-index: 32; } /* clear of the sheet and its buttons */
  
}
@media (max-width: 760px) and (max-height: 700px) {
  .scene { min-height: max(190px, 44dvh); }
  .readout-credits .readout-value { font-size: 20px; }
  .quick-note { -webkit-line-clamp: 1; }
}

/* round 5: the game doesn't zoom or select text on touch (inputs stay normal) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
html, body, button, a { touch-action: manipulation; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* "Made by Really Bad Studio" credit, from brand/made-by/made-by.css */
.rbs-made-by{--rbs-mark:36px;--rbs-icon:18px;--rbs-hit:44px;--rbs-gap:16px;--rbs-dim:.72;display:flex;flex-wrap:wrap;align-items:center;gap:8px var(--rbs-gap)}
.rbs-made-by__credit{display:inline-flex;align-items:center;gap:10px;min-height:var(--rbs-hit);color:inherit;text-decoration:none}
.rbs-made-by__mark{width:var(--rbs-mark);height:var(--rbs-mark);flex:none;display:block}
.rbs-made-by__text{display:flex;flex-direction:column;line-height:1.15}
.rbs-made-by__text small{font-size:10px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;opacity:var(--rbs-dim)}
.rbs-made-by__text b{font-weight:600}
.rbs-made-by__credit:hover b{text-decoration:underline;text-underline-offset:3px}
.rbs-social{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}
.rbs-social a{display:grid;place-items:center;width:var(--rbs-hit,44px);height:var(--rbs-hit,44px);color:inherit;opacity:var(--rbs-dim,.72);transition:opacity .15s}
.rbs-social a:hover,.rbs-social a:focus-visible{opacity:1}
.rbs-social svg{width:var(--rbs-icon,18px);height:var(--rbs-icon,18px);display:block}

/* Public release: readable controls; Files retains normal reading and pinch zoom. */
html.reading, html.reading body, .reading #files, .reading #files * { touch-action: auto; }
.reading #files { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.files p { font-size: 16px; line-height: 1.5; }
@media (max-width: 760px) {
  .quick-note { font-size: 14px; }
  .quick-name { font-size: 16px; }
  .quick-line, .quick-row .buy-verb, .dock-tab, #files-open { font-size: 14px; }
  .quick-row .buy-cost { font-size: 16px; }
  .dock-tab, #files-open { font-family: var(--cond); font-weight: 800; }
  .row-rate, .row-milestone, .project-note, .project-rate, .project-next { font-size: 14px; }
}

/* ---------- the receipt: prints out of a slot, a line at a time */
.receipt-sheet { width: min(440px, 94vw); text-align: center; }
.printer { position: relative; height: 18px; margin: 14px 6px 0; background: var(--ink); border-radius: 6px; z-index: 1; }
.printer i { position: absolute; right: 10px; top: 5px; width: 8px; height: 8px; background: var(--chart); }
.receipt-out { display: grid; justify-items: center; margin: -4px 20px 0; min-height: 120px; overflow: hidden; }
.receipt-out img { display: block; height: min(56svh, 600px); max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 6px 6px; }
.receipt-out.printing img { animation: receipt-print 1.5s steps(14, end) both; }
@keyframes receipt-print { from { clip-path: inset(0 0 100% 0); transform: translateY(-40px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.receipt-sheet .files-actions { justify-content: center; }
.receipt-sheet .btn[disabled] { opacity: .5; cursor: progress; }
.receipt-status { min-height: 1.45em; font-size: 14px; }
.report .files-actions { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .receipt-out.printing img { animation: none; } }
@media (max-width: 760px) { .receipt-out img { height: min(52svh, 560px); } }
