* { box-sizing: border-box; }
:root {
  --desk: #2f3a35;
  --desk-dark: #232c28;
  --paper: #f1eadb;
  --ink: #26221c;
  --muted: #6e6656;
  --line: #cfc5b0;
  --red: #a8322a;
  --green: #3f7a4f;
  --amber: #b5812a;
}
html, body { margin: 0; height: 100%; }
body {
  background: var(--desk);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.4;
}
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.15; }
.primary {
  background: var(--red); color: #fff; border: 0;
  padding: .65em 1.3em; border-radius: 3px; font-weight: bold;
}
.primary:hover:not(:disabled) { filter: brightness(1.1); }
.primary:disabled { background: #8a8578; cursor: not-allowed; }
.primary:focus-visible, .stamp:focus-visible, .tile:focus-visible { outline: 3px solid #ffd98a; outline-offset: 2px; }

/* Title */
.screen { max-width: 1160px; margin: 0 auto; padding: 14px 20px; animation: fade .3s ease-out; }
.title { text-align: center; color: var(--paper); padding-top: 6vh; max-width: 760px; }
.title h1 { font-size: 88px; letter-spacing: .08em; color: var(--paper); border: 6px solid var(--red); display: inline-block; padding: .08em .3em; transform: rotate(-2deg); margin: .2em 0; }
.crest { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; opacity: .8; margin: 0; }
.slogan { font-style: italic; }
.brief { max-width: 600px; margin: 20px auto; text-align: left; }
.relaxed { display: block; margin: 16px 0; font-size: 14px; }
@keyframes fade { from { opacity: 0; } }

/* Morning: the paper is one headline, the city does the rest */
.morning { display: flex; flex-direction: column; gap: 8px; min-height: 100vh; }
.courier { background: var(--paper); padding: 8px 16px 6px; border-radius: 2px; }
.masthead { font-weight: bold; letter-spacing: .1em; font-size: 13px; border-bottom: 3px double var(--ink); padding-bottom: 3px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.masthead span { font-weight: normal; letter-spacing: 0; font-style: italic; }
.courier h2 { font-size: 26px; margin: 0; }
.story { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.city-wrap { border-radius: 2px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.35); line-height: 0; }
.city { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 360; max-height: 46vh; transition: filter 1.4s ease; background: #a9cfe0; }
.ticker { overflow: hidden; white-space: nowrap; background: var(--desk-dark); color: var(--paper); font-size: 13px; padding: 2px 0; }
.ticker span { display: inline-block; padding-left: 100%; animation: ticker 26s linear infinite; }
.ticker:hover span { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* Morning cards: your stamp, then what it caused */
.reel { flex: 1; min-height: 140px; }
.card { display: flex; gap: 16px; align-items: center; background: var(--paper); border-radius: 2px; padding: 10px 16px; box-shadow: 0 3px 12px rgba(0,0,0,.3); animation: card-in .3s ease-out; }
@keyframes card-in { from { transform: translateY(12px); opacity: 0; } }
.card-face { flex: 0 0 92px; height: 100px; overflow: hidden; background: #d8cfba; border-radius: 3px; }
.card-face .person { width: 100%; display: block; }
.wire-icon { display: flex; align-items: center; justify-content: center; background: var(--ink); }
.wire-icon svg { width: 66%; stroke: #ff6f5e; fill: #ff6f5e; }
.card-text { flex: 1; min-width: 0; }
.card-kicker { margin: 0 0 3px; font-size: 15px; font-weight: bold; }
.card-kicker small { font-weight: normal; color: var(--muted); }
.link-card .card-kicker { color: var(--red); }
.card-news { margin: 0 0 3px; font-size: 15px; line-height: 1.3; }
.card-next { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dots { display: flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ink); }
.mini-stamp { display: inline-block; border: 2px solid; padding: 0 6px; font-size: 12px; letter-spacing: .06em; transform: rotate(-2deg); margin-right: 4px; }
.mini-stamp.approve { color: var(--green); }
.mini-stamp.conditions { color: var(--amber); }
.mini-stamp.reject { color: var(--red); }
.mini-stamp.auto { color: #fff; background: var(--red); border-color: var(--red); }
.impact { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.impact-label { color: var(--muted); margin-right: 6px; font-style: italic; }
.chip { display: inline-block; padding: 0 7px; border-radius: 9px; margin: 1px 3px 1px 0; color: #fff; }
.chip.won { background: var(--green); }
.chip.lost { background: var(--red); }
.bulletin { justify-content: space-between; }
.bulletin h3 { font-size: 15px; margin: 0 0 2px; }
.bulletin ul { margin: 0; padding-left: 18px; font-size: 15px; }
.bulletin-text { flex: 1; }
.bulletin .ad { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.city-hint { margin: 0 0 6px; font-weight: bold; }
.closing { font-size: 18px; margin: 0; font-style: italic; }
.directive { color: var(--red); font-weight: bold; margin: 4px 0 0; font-size: 15px; }

/* City art */
.sign-text { font: bold 12px "Courier New", monospace; text-anchor: middle; }
.sign-text.big { font-size: 13px; }
.place-label { font: 11px Georgia, serif; text-anchor: middle; fill: #3b382f; opacity: .75; }
.place-label.lit { font-weight: bold; opacity: 1; font-size: 13px; }
.smoke circle { fill: #ffffffb0; animation: smoke 3.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.smoke circle:nth-child(2) { animation-delay: -1.6s; }
.no-smoke .smoke { display: none; }
/* Solarpunk pieces */
.spin { animation: spin 5s linear infinite; transform-box: view-box; }
@keyframes spin { to { transform: rotate(360deg); } }
.tram { animation: tram 26s linear infinite; }
@keyframes tram { from { transform: translateX(-110px); } to { transform: translateX(1140px); } }
.airship { animation: airship 70s linear infinite; }
@keyframes airship { from { transform: translateX(-80px); } to { transform: translateX(1280px); } }
.festive .citizen > * { animation: hop .45s ease-in-out infinite alternate; transform-box: fill-box; }
@keyframes hop { to { transform: translateY(-5px); } }
@keyframes smoke { from { transform: translateY(0) scale(.6); opacity: .9; } to { transform: translateY(-46px) scale(1.5); opacity: 0; } }
.citizen.ltr { animation-name: walk-ltr; animation-timing-function: linear; animation-iteration-count: infinite; }
.citizen.rtl { animation-name: walk-rtl; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes walk-ltr { from { transform: translateX(-20px); } to { transform: translateX(1130px); } }
@keyframes walk-rtl { from { transform: translateX(1130px); } to { transform: translateX(-20px); } }
.cone { fill: rgba(224, 74, 58, .2); animation: sweep 4.5s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } }
.hand { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.beat { animation: beat 1.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes beat { 50% { transform: scale(1.14); } }
.device.pop { animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) both; transform-box: fill-box; transform-origin: center bottom; }
@keyframes pop { from { transform: scale(0); opacity: 0; } }
.pop-slow { animation: pop 1.1s cubic-bezier(.2, 1.3, .4, 1) both; transform-box: fill-box; transform-origin: center; }
.grow { animation: grow 1.6s cubic-bezier(.2, .8, .3, 1) both; transform-box: fill-box; transform-origin: center bottom; }
@keyframes grow { from { transform: scaleY(.3); } }
.sail-away { animation: sail 5s ease-in forwards; }
@keyframes sail { to { transform: translateX(120px); } }
.ring { fill: none; stroke: #b3261e; stroke-width: 4; animation: ring 1.1s ease-out 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.wire-line { fill: none; stroke: #b3261e; stroke-width: 2.5; }
.wire-data { fill: none; stroke: #ffd2c8; stroke-width: 2.5; stroke-dasharray: 3 16; animation: data 1s linear infinite; }
@keyframes data { to { stroke-dashoffset: -19; } }
.wire-end { fill: #b3261e; }
.wire.fresh .wire-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s ease-out var(--delay) forwards; }
.wire.fresh .wire-data, .wire.fresh .wire-end { opacity: 0; animation-name: data, appear; animation-duration: 1s, .4s; animation-iteration-count: infinite, 1; animation-delay: 0s, calc(var(--delay) + 1s); animation-fill-mode: none, forwards; animation-timing-function: linear; }
.wire.fresh .wire-end { animation-name: appear; animation-duration: .4s; animation-iteration-count: 1; animation-delay: var(--delay); animation-fill-mode: forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
.pupil { animation: look 5s ease-in-out infinite alternate; }
@keyframes look { from { transform: translateX(-7px); } to { transform: translateX(7px); } }

/* Desk: one screen, nothing to scroll */
.desk-screen { height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; animation: fade .3s ease-out; }
.topbar { display: flex; gap: 22px; align-items: center; background: var(--desk-dark); color: var(--paper); padding: 6px 18px; font-size: 15px; }
.day-tag { opacity: .75; }
.clock-box { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 460px; }
.clock { font-family: "Courier New", monospace; font-size: 24px; font-weight: bold; }
.clock.late { color: #ff8d7e; }
.clock-bar { flex: 1; height: 8px; background: #00000055; border-radius: 4px; overflow: hidden; }
#clockFill { height: 100%; background: var(--paper); transition: width .25s linear; }
#clockFill.late { background: #ff8d7e; }
.earned { font-family: "Courier New", monospace; font-weight: bold; }
.growth { font-size: 13px; opacity: .9; }
.growth i { display: inline-block; width: 9px; height: 9px; border: 1px solid var(--paper); border-radius: 50%; margin-left: 3px; }
.growth i.on { background: var(--paper); }
.rules-btn { margin-left: auto; background: #dcd3bf; color: var(--ink); border: 0; padding: .35em .9em; border-radius: 3px; font-weight: bold; }
.rules-btn.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 217, 138, .55); background: #ffd98a; } }

.desk { display: grid; grid-template-columns: minmax(340px, 37%) minmax(0, 1fr); min-height: 0; }

/* Left: the person in front of you */
.booth { --visitor: min(250px, 44vh); position: relative; overflow: hidden; background: linear-gradient(#46554e, #33403a); border-right: 6px solid var(--desk-dark); }
.poster { position: absolute; top: 36%; right: 16px; width: 92px; padding: 6px; font-size: 11px; font-style: italic; text-align: center; background: var(--paper); color: var(--red); transform: rotate(2deg); opacity: .8; }
.door { position: absolute; bottom: 74px; width: 56px; height: 176px; background: #26302b; border: 3px solid #1c2320; border-bottom: 0; }
.door span { position: absolute; top: -21px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--paper); opacity: .7; white-space: nowrap; }
.door-queue { left: 0; border-left: 0; }
.door-out { right: 0; border-right: 0; background: #e8d9a8; }
.queue-line { position: absolute; left: 6px; bottom: 74px; display: flex; flex-direction: column-reverse; gap: 0; }
.waiting { display: block; width: 34px; height: 30px; position: relative; }
.waiting::before { content: ""; position: absolute; left: 11px; top: 0; width: 12px; height: 12px; background: #8d9a92; border-radius: 50%; }
.waiting::after { content: ""; position: absolute; left: 6px; top: 13px; width: 22px; height: 15px; background: #8d9a92; border-radius: 8px 8px 0 0; }
.visitor { position: absolute; left: 50%; bottom: 66px; width: var(--visitor); margin-left: calc(var(--visitor) / -2); z-index: 1; }
.visitor .person { display: block; width: 100%; }
.walk-in { animation: walk-in .55s ease-out both; }
.walk-in .person, .walk-through .person, .walk-back .person { animation: bob .22s ease-in-out infinite alternate; }
.walk-through { animation: walk-through .65s ease-in forwards; }
.walk-back { animation: walk-back .65s ease-in forwards; }
@keyframes walk-in { from { transform: translateX(-340px); opacity: 0; } }
@keyframes walk-through { to { transform: translateX(380px); opacity: 0; } }
@keyframes walk-back { to { transform: translateX(-380px); opacity: 0; } }
@keyframes bob { to { transform: translateY(-9px); } }
.bubble { position: absolute; bottom: calc(66px + var(--visitor) * 1.25 - 26px); left: 6%; right: 6%; z-index: 2; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 10px; font-size: 15px; line-height: 1.3; min-height: 3.5em; opacity: 0; transform: translateY(-6px); transition: opacity .15s, transform .15s; cursor: default; pointer-events: none; }
.bubble small { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -11px; margin-left: -9px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.counter { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; background: #6b4f33; border-top: 6px solid #8a6a47; z-index: 2; }
.offer { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 3; }
.envelope { background: #d9c79e; padding: 6px 10px; font-size: 13px; line-height: 1.25; border-radius: 2px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.envelope p { margin: 0; }
.envelope small { grid-column: 1; color: #5c4d33; }
.envelope button { grid-column: 2; grid-row: 1 / span 2; background: #efe6cf; border: 1px solid var(--muted); padding: .35em .7em; border-radius: 2px; font-size: 13px; }
.envelope button:hover { background: #fff6dd; }
.envelope button.taken { background: var(--ink); color: var(--paper); }
.slide-up { animation: slide-up .35s ease-out both; }
@keyframes slide-up { from { transform: translateY(26px); opacity: 0; } }
.fade-out { opacity: 0; transition: opacity .3s; }

/* The rulebook slides over the person, so the file stays in view next to it */
.rulebook { position: absolute; inset: 0; z-index: 5; background: #dcd3bf; padding: 12px 16px; font-size: 15px; transform: translateX(-102%); transition: transform .22s ease-out; overflow: auto; }
.rulebook.open { transform: none; }
.rulebook-head { display: flex; justify-content: space-between; align-items: center; }
.rulebook-head h3 { margin: 0; }
.rulebook-head button { background: #efe6cf; border: 1px solid var(--muted); border-radius: 2px; }
.rulebook ol { padding-left: 20px; margin: 10px 0; }
.rulebook li { margin-bottom: .6em; }
.rulebook li.new { font-weight: bold; }
.charter-btn + .rules-btn { margin-left: -12px; }
.charter { background: #dfe8d6; }
.charter ul { padding-left: 18px; margin: 8px 0; }
.charter li { margin-bottom: .5em; }
.charter-note { margin: 6px 0 0; font-style: italic; font-size: 13px; }
.charter-rule { margin: 6px 0 0; padding: 6px 8px; background: #f3f0e4; border-left: 4px solid #3f7a4f; }

/* Right: the file and the stamps */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 14px; padding: 14px; min-height: 0; overflow: hidden; }
.file { min-height: 0; overflow: hidden; display: flex; }
.sheet { position: relative; width: 100%; max-width: 620px; margin: 0 auto; align-self: flex-start; max-height: 100%; background: var(--paper); padding: 16px 22px; border-radius: 2px; box-shadow: 0 6px 20px rgba(0,0,0,.4); overflow: auto; }
.slide-in { animation: slide-in .4s ease-out both; }
@keyframes slide-in { from { transform: translateX(-90px) rotate(-3deg); opacity: 0; } }
.hit { animation: hit .16s ease-out; }
@keyframes hit { 30% { transform: translateY(5px) scale(.992); } }
.slide-through { transform: translateX(120%) rotate(6deg); opacity: 0; transition: transform .45s ease-in, opacity .45s; }
.slide-back { transform: translateX(-120%) rotate(-6deg); opacity: 0; transition: transform .45s ease-in, opacity .45s; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sheet-head h2 { font-size: 25px; margin: 0 0 3px; }
.sector { font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.pitch { font-size: 18px; font-style: italic; margin: 0 0 10px; line-height: 1.3; }
.sheet table { border-collapse: collapse; font-size: 14px; margin-bottom: 10px; font-family: "Courier New", monospace; }
.sheet th { text-align: left; padding: 1px 14px 1px 0; color: var(--muted); font-weight: normal; vertical-align: top; white-space: nowrap; }
.annex { border-top: 1px dashed var(--muted); padding-top: 8px; font-size: 14px; font-family: "Courier New", monospace; }
.annex ul { padding-left: 18px; margin: 0; }
.annex-open { animation: unfold .25s ease-out; }
@keyframes unfold { from { transform: translateY(-6px); opacity: 0; } }
.annex button { background: #e2d9c4; border: 1px solid var(--muted); padding: .3em .7em; font-size: 14px; border-radius: 2px; font-family: inherit; }
.annex button span { color: var(--red); margin-left: 4px; }
.annex button:hover { background: #d6ccb4; }
.your-terms { font-family: Georgia, serif; margin: 8px 0 0; padding: 6px 9px; border-left: 4px solid var(--amber); background: #f6e7c8; font-size: 14px; }
.your-terms em { color: var(--red); font-style: normal; }
.empty { color: var(--paper); text-align: center; margin: auto; font-size: 20px; }

.stamp-mark { position: absolute; top: 42%; left: 50%; font-size: 40px; font-weight: bold; letter-spacing: .08em; border: 5px solid; padding: 2px 14px; opacity: 0; transform: translate(-50%, -50%) rotate(-10deg) scale(2); pointer-events: none; white-space: nowrap; background: #f1eadb88; }
.stamp-mark.show { opacity: .9; transform: translate(-50%, -50%) rotate(-10deg) scale(1); transition: transform .09s ease-in, opacity .09s; }
.stamp-mark.approve { color: var(--green); }
.stamp-mark.conditions { color: var(--amber); }
.stamp-mark.reject { color: var(--red); }

.actions { display: flex; flex-direction: column; justify-content: flex-start; }
.stamps.busy { opacity: .45; pointer-events: none; }
.stamp { display: block; width: 100%; padding: 16px 8px; margin-bottom: 10px; color: #fff; border: 0; font-weight: bold; letter-spacing: .08em; border-radius: 3px; box-shadow: 0 4px 0 rgba(0,0,0,.35); transition: transform .06s; }
.stamp:hover { filter: brightness(1.1); }
.stamp:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.stamp small { display: block; font-weight: normal; letter-spacing: 0; margin-top: 2px; font-size: 12px; }
.stamp.approve { background: var(--green); }
.stamp.conditions { background: var(--amber); }
.stamp.reject { background: var(--red); }
.pop-in { animation: pop-in .25s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop-in { from { transform: scale(.7); opacity: 0; } }

.fax { position: fixed; right: 16px; bottom: 14px; width: 310px; display: flex; flex-direction: column; gap: 8px; z-index: 20; pointer-events: none; }
.citation { background: #f7d9d3; border-left: 5px solid var(--red); padding: 8px 12px; font-size: 13px; font-family: "Courier New", monospace; box-shadow: 0 4px 12px rgba(0,0,0,.45); animation: citation 4.2s ease-out both; }
.citation p { margin: 4px 0 0; }
@keyframes citation { 0% { transform: translateY(30px); opacity: 0; } 6%, 92% { transform: none; opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

.float-text { position: fixed; z-index: 30; font: bold 20px "Courier New", monospace; pointer-events: none; animation: float-up 1.25s ease-out forwards; text-shadow: 0 1px 3px #000; transform: translate(-50%, 0); }
.float-text.good { color: #9be3a9; }
.float-text.bad { color: #ff9e91; }
@keyframes float-up { to { transform: translate(-50%, 34px); opacity: 0; } }

/* Evening */
.evening { display: flex; flex-direction: column; gap: 10px; }
.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 14px; align-items: start; }
.family, .ledger { background: var(--paper); padding: 12px 16px; border-radius: 2px; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.ledger h2 { font-size: 22px; margin-bottom: 6px; }
.ledger table { width: 100%; border-collapse: collapse; margin-bottom: 8px; font-size: 15px; }
.ledger th { text-align: left; font-weight: normal; padding: 1px 0; }
.ledger td { text-align: right; font-family: "Courier New", monospace; }
.ledger .total th, .ledger .total td { border-top: 1px solid var(--ink); font-weight: bold; padding-top: 4px; font-size: 17px; }
#bills label { display: flex; gap: 8px; padding: 2px 0; cursor: pointer; }
#bills label.required { cursor: default; color: var(--muted); }
#bills span { margin-left: auto; font-family: "Courier New", monospace; }
.left { border-top: 1px solid var(--ink); padding-top: 5px; margin: 6px 0 4px; }
.forecast { min-height: 1.3em; margin: 0 0 8px; color: var(--red); font-size: 14px; }
.home-scene { display: block; width: 100%; height: auto; max-height: 56vh; border-radius: 2px; }
.home-scene g, .home-scene .chill, .home-scene .frost { transition: opacity .4s; }
.rad { fill: #d68a54; transition: fill .4s; }
.off-heat .rad { fill: #7d97a8; }
.off-heat #h-heat, .off-food #h-food, .off-meds #h-meds { opacity: 0; }
.frost { opacity: 0; }
.chill { opacity: 0; }
.cold-1 .chill { opacity: .18; } .cold-1 .frost { opacity: .45; }
.cold-2 .chill { opacity: .34; } .cold-2 .frost { opacity: .85; }
.cold-1 #h-heat, .cold-2 #h-heat { opacity: 0; }
.cough { font: italic 15px Georgia, serif; fill: #7a2a2a; }
.note { font: italic 13px Georgia, serif; fill: #333; }
.status { list-style: none; padding: 0; margin: 8px 0 0; display: flex; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.letter { background: #fff; padding: 6px 10px; margin: 8px 0 0; font-size: 14px; border: 1px solid var(--line); font-style: italic; }
.auto { display: flex; align-items: center; gap: 12px; background: #f7d9d3; padding: 6px 12px; border-left: 5px solid var(--red); }
.auto p { margin: 0; font-size: 15px; }
.auto-faces { display: flex; }
.auto-faces span { width: 42px; margin-right: -8px; }
.auto-faces .person { display: block; width: 100%; }

/* Ending */
.ending { display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.newspaper { background: var(--paper); padding: 10px 18px; border-radius: 2px; }
.newspaper h2 { font-size: 34px; margin: 0; }
.ending-title { margin: 2px 0 0; font-style: italic; color: var(--muted); }
.city-wrap.final .city { max-height: none; }
.ending-text { background: var(--paper); padding: 12px 18px; margin: 0; font-size: 17px; border-radius: 2px; }
.record { background: var(--paper); padding: 14px 18px; border-radius: 2px; }
.record h3 { margin: 12px 0 8px; }
.record h3 small { font-weight: normal; font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.stats div { background: #e6dfcd; padding: 6px 4px; text-align: center; border-radius: 2px; }
.stats b { display: block; font: bold 24px "Courier New", monospace; }
.stats span { font-size: 12px; color: var(--muted); }
.at-home { margin: 8px 0 0; font-style: italic; }
.cast { display: flex; flex-direction: column; gap: 6px; }
.cast-day { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.cast-label { flex: 0 0 44px; font-size: 13px; color: var(--muted); padding-top: 8px; }
.tile { position: relative; width: 86px; padding: 0 0 3px; background: #e6dfcd; border: 3px solid var(--line); border-radius: 3px; overflow: hidden; line-height: 1.1; }
.tile .person { display: block; width: 100%; height: 68px; }
.tile small { display: block; font-size: 10px; padding: 2px 2px 0; height: 2.3em; overflow: hidden; }
.tile.approve { border-color: var(--green); }
.tile.conditions { border-color: var(--amber); }
.tile.reject { border-color: var(--red); }
.tile.auto { border-color: var(--ink); border-style: dashed; }
.tile.picked { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.unread-tag { position: absolute; top: 0; left: 0; background: var(--ink); color: #fff; font: normal 9px "Courier New", monospace; padding: 1px 3px; }
.cast-detail { margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); min-height: 76px; }
.hidden-part { margin: 0 0 4px; font-size: 15px; color: var(--red); }
.record details { margin: 10px 0; font-size: 13px; }
.record pre { max-height: 180px; overflow: auto; background: #e6dfcd; padding: 8px; font-size: 11px; }

/* Projectors and big monitors: use the room instead of leaving a dark margin. */
@media (min-width: 1500px) and (min-height: 850px) {
  .screen { max-width: 1500px; }
  body { font-size: 18px; }
  .card-news, .card-kicker, .bulletin ul, .directive { font-size: 18px; }
  .courier h2 { font-size: 34px; }
  .story { font-size: 16px; }
  .impact { font-size: 15px; }
  .card-face { flex-basis: 120px; height: 130px; }
  .bubble { font-size: 19px; }
  .pitch { font-size: 22px; }
  .sheet { max-width: 780px; }
  .sheet table, .annex, .annex button, .your-terms { font-size: 17px; }
  .sheet-head h2 { font-size: 32px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 220px; }
  .booth { --visitor: 340px; }
}

@media (max-width: 900px) {
  .desk-screen { height: auto; overflow: visible; }
  .desk, .workspace, .columns { grid-template-columns: 1fr; }
  .booth { height: 420px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .title h1 { font-size: 56px; }
}

/* Respect the system setting for people who get sick from motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
}
