/* THE ASYLUM: ADMISSIONS - screen furniture. (Carried forward from the
 * Caretaker; the paper at the bottom is this series' own.)
 *
 * Every control in here is drawn for this game. Nothing is a browser default:
 * no system button, no select, no checkbox, no confirm(). A grey OS widget
 * dropped over a dark room is the fastest way there is to tell a player they
 * are looking at a web page.
 *
 * Palette: bone and firelight, with lightning white.
 *
 * No web fonts: the clerk types in Courier, and the patients write in
 * whatever hand the player's machine has for handwriting.
 */


:root {
  --brass:      #c8b27a;
  --brass-lit:  #ece0bf;
  --ink:        #0a0a09;
  --card:       #151513;
  --card-edge:  #4f4a3a;
  --paper:      #e9e0c7;
  --paper-ink:  #3b3326;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #050505;
  overflow: hidden;
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

/* The game is 800x600 and nothing inside is allowed to size itself to the
   browser window. If the window is smaller, the whole frame SCALES; it never
   reflows, so the composition can never come out a shape it was not
   designed in. */
#frame {
  position: fixed; left: 50%; top: 50%;
  width: 800px; height: 600px;
  transform: translate(-50%, -50%) scale(var(--fit, 1));
  transform-origin: 50% 50%;
  overflow: hidden;
  background: #07060a;
  user-select: none;
  cursor: default;
}

#stage { position: absolute; inset: 0; }
#stage canvas { display: block; }

/* Sits over the render, takes no clicks, and does most of the work of making
   a lit box of geometry feel like a room you are shut inside. */
#vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(ellipse 78% 76% at 50% 46%,
      rgba(0,0,0,0) 38%, rgba(4,4,3,0.42) 74%, rgba(0,0,0,0.88) 100%);
}
/* THE COLD. The edges of the screen go blue-grey, slowly, the way your
   fingers notice before you do. */
#vignette::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 5s ease;
  background: radial-gradient(ellipse 80% 78% at 50% 46%, rgba(40,60,90,0) 45%, rgba(40,60,90,0.28) 82%, rgba(60,80,110,0.4) 100%);
}
#vignette.cold::after { opacity: 1; }

/* ------------------------------------------------------------------ *
 * HUD
 * ------------------------------------------------------------------ */

#hud {
  position: absolute; left: 14px; top: 12px; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}

#timer {
  font-family: "Courier New", monospace;
  font-size: 17px; letter-spacing: 0.12em;
  color: #cbbc94;
  text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,0.8);
  opacity: 0.62;
  padding: 2px 4px;
}

#hint-btn {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(#241f15e0, #14110ae0);
  border: 1px solid #5d4f2a; border-radius: 3px;
  color: #b8a778; font-family: Georgia, serif; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 11px 5px 8px; cursor: pointer;
  opacity: 0.55; transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
#hint-btn:hover { opacity: 1; color: var(--brass-lit); border-color: var(--brass); }
#hint-btn svg {
  width: 15px; height: 15px; fill: none;
  stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
}

/* The way out of a close-up. Bottom left corner, clear of the centred
   inventory - it used to be a full-height pad down the left edge, which put it
   across the side of whatever was being inspected. */
#back-btn {
  position: absolute; left: 14px; bottom: 18px; z-index: 6;
  height: 34px;
  display: none; flex-direction: row; align-items: center; justify-content: center;
  gap: 7px; padding: 0 17px 0 12px; cursor: pointer;
  border: 1px solid #5d4f2a; border-radius: 3px;
  background: linear-gradient(#241f15e6, #14110ae6);
  box-shadow: 0 2px 10px rgba(0,0,0,0.55);
  color: #c3b184;
  opacity: 0.82; transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-family: Georgia, serif; font-size: 12px;
  letter-spacing: 0.2em; text-transform: uppercase;
}
#back-btn.show { display: flex; }
#back-btn:hover { opacity: 1; color: var(--brass-lit); border-color: var(--brass); }
#back-btn svg {
  width: 17px; height: 17px; fill: none;
  stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------------ *
 * the text: what you are pointing at, and what the room said
 *
 * AT THE TOP, and that is the whole point of it. The bottom of an 800x600
 * frame already belongs to the inventory bar, so a caption sitting above that
 * lands at about 78% of the height - straight across whatever is being
 * inspected, because an inspected object is centred and fills the frame. No
 * amount of shading behind the words fixes being in the middle of the picture.
 * The top strip is the one part nothing else uses.
 *
 * Laid out as ONE column anchored above the inventory rather than as two
 * lines at fixed heights. A two-line message at a fixed offset grows upward
 * through the label above it, and then the name of the thing under the
 * cursor is written across the middle of the sentence describing it.
 * ------------------------------------------------------------------ */

#bottom {
  /* As high as it can go without touching the timer or the cog. At 80px the
     message sat across the top of close-ups - right over the jar lid the
     player was reaching for. */
  position: absolute; left: 0; right: 0; top: 12px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; padding: 0 120px;
}

/* Both lines carry their own soft ground. Without it the words sit directly
   on whatever the player is looking at and read as painted onto the object -
   which is exactly how it looked written across the base of the lamp. */
#caption {
  font-size: 12.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: #d8c491; opacity: 0; transition: opacity 0.14s ease;
  text-shadow: 0 1px 4px #000, 0 0 14px rgba(0,0,0,0.9);
  padding: 3px 16px;
  background: radial-gradient(ellipse 72% 150% at 50% 50%,
              rgba(6,4,2,0.82), rgba(6,4,2,0));
}
#caption.show { opacity: 0.85; }

#message {
  max-width: 560px; text-align: center;
  padding: 6px 26px;
  background: radial-gradient(ellipse 68% 150% at 50% 50%,
              rgba(6,4,2,0.86), rgba(6,4,2,0));
  font-size: 15px; line-height: 1.42; color: #f0e6cd;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  text-shadow: 0 1px 3px #000, 0 2px 14px rgba(0,0,0,0.95);
}
#message.show { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------------ *
 * inventory
 * ------------------------------------------------------------------ */

#inv {
  position: absolute; left: 0; right: 0; bottom: 0; height: 78px; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 16px;
  background: linear-gradient(rgba(8,6,3,0) 0%, rgba(10,7,4,0.72) 42%, rgba(8,5,2,0.92) 100%);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
#inv.has { opacity: 1; pointer-events: auto; }

#inv .slot {
  position: relative; width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #4a3d22; border-radius: 3px;
  background: linear-gradient(#241e13cc, #12100acc);
  box-shadow: inset 0 1px 0 #ffffff12, 0 2px 8px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
#inv .slot:hover { border-color: #9a8144; transform: translateY(-3px); }
#inv .slot.sel {
  border-color: var(--brass);
  box-shadow: inset 0 1px 0 #ffffff1a, 0 0 0 1px #c9a22755, 0 0 18px #c9a22744;
  transform: translateY(-3px);
}
#inv .slot canvas { width: 52px; height: 52px; pointer-events: none; }

/* A folded corner on anything that can be READ. The papers were the only
   slots in the bar that never did anything on their own, and nothing
   distinguished them from a tool you select. */
#inv .slot.readable::after {
  content: ''; position: absolute; right: 3px; bottom: 3px;
  width: 0; height: 0; pointer-events: none;
  border-left: 9px solid transparent;
  border-bottom: 9px solid #c9b784;
  opacity: 0.55; transition: opacity 0.16s ease;
}
#inv .slot.readable:hover::after { opacity: 1; }

#inv .slot-name {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #e2d0a2; opacity: 0; transition: opacity 0.16s ease;
  text-shadow: 0 1px 4px #000; pointer-events: none;
}
#inv .slot:hover .slot-name, #inv .slot.sel .slot-name { opacity: 1; }
/* one name at a time: pointing at a slot hides the selected one's name */
#inv:hover .slot.sel:not(:hover) .slot-name { opacity: 0; }

/* ------------------------------------------------------------------ *
 * overlays
 * ------------------------------------------------------------------ */

.overlay {
  position: absolute; inset: 0; z-index: 9;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
  background: radial-gradient(ellipse 80% 80% at 50% 50%,
              rgba(6,4,2,0.86), rgba(2,1,0,0.96));
}
.overlay.show { opacity: 1; visibility: visible; }

.overlay .card {
  width: 430px; padding: 30px 34px 26px; text-align: center;
  background: linear-gradient(#1b1811f2, #100d08f2);
  border: 1px solid var(--card-edge); border-radius: 5px;
  box-shadow: 0 12px 60px rgba(0,0,0,0.8), inset 0 1px 0 #ffffff14;
}
.overlay h1 {
  font-size: 25px; font-weight: normal; letter-spacing: 0.22em;
  color: var(--brass-lit); text-indent: 0.3em;
}
.overlay h2 {
  font-size: 12px; font-weight: normal; letter-spacing: 0.28em;
  text-transform: uppercase; color: #8b8065; margin: 6px 0 20px;
}
.overlay p {
  font-size: 14.5px; line-height: 1.6; color: #cbbfa2; margin-bottom: 9px;
}

button.big {
  margin-top: 22px; padding: 11px 34px; cursor: pointer;
  background: linear-gradient(#2c2617, #171308);
  border: 1px solid #7d6a34; border-radius: 3px;
  color: var(--brass-lit); font-family: Georgia, serif;
  font-size: 14px; letter-spacing: 0.3em; text-indent: 0.3em;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
button.big:hover {
  border-color: var(--brass); color: #fff3d2;
  box-shadow: 0 0 22px #c9a22733, inset 0 1px 0 #ffffff1a;
}

.overlay .foot {
  display: block; margin-top: 18px;
  font-size: 10.5px; letter-spacing: 0.17em; text-transform: uppercase; color: #6e6450;
}

/* the printer's pilot lamp over the title: a small red light, steady, and
   every so often it goes out for a moment and comes back */
.pilot-mark { position: relative; height: 26px; margin: -6px auto 12px; }
.pilot-mark span {
  position: absolute; left: 50%; top: 6px; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffb0a0, #d8342a 55%, #6a0e08);
  box-shadow: 0 0 12px #ff3a2288, 0 0 30px #ff3a2244;
  animation: pilot 7s infinite;
}
@keyframes pilot {
  0%, 81%, 86%, 100% { opacity: 1; }
  82%, 85% { opacity: 0.12; }
}

.win-time {
  font-family: "Courier New", monospace; font-size: 40px;
  color: #f3e6c0; letter-spacing: 0.1em; margin: 6px 0 2px;
  text-shadow: 0 0 24px rgba(201,162,39,0.35);
}
.win-best {
  font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--brass); min-height: 14px;
}

/* --- readable paper ------------------------------------------------ */

#paper .sheet {
  position: relative; cursor: pointer;
  background: var(--paper); color: var(--paper-ink);
  box-shadow: 0 18px 60px rgba(0,0,0,0.85), inset 0 0 60px rgba(146,124,84,0.28);
  transform: rotate(-1.1deg);
}
#paper .sheet::after {
  /* the fibre of the paper, so it is not a white rectangle */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(120,100,66,0.05) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 30% 20%, rgba(122,98,58,0.12), transparent 60%);
}
#paper .sheet-close {
  position: absolute; left: 0; right: 0; bottom: -26px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #7d7156; text-align: center;
}

/* --- hint ---------------------------------------------------------- */

#hintbox .hint-card {
  width: 400px; padding: 26px 30px 22px; text-align: center; cursor: pointer;
  background: linear-gradient(#1b1811f2, #100d08f2);
  border: 1px solid var(--card-edge); border-radius: 5px;
  box-shadow: 0 12px 60px rgba(0,0,0,0.8), inset 0 1px 0 #ffffff14;
}
#hintbox .hint-head {
  display: block; font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 14px;
}
#hintbox p { font-size: 15px; line-height: 1.6; color: #ddd2b4; }
#hintbox .hint-close {
  display: block; margin-top: 18px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #6e6450;
}

/* The settings panel takes the clicks while it is up, so nothing below it can
   be reached. That is why the game needs no pause - but the inventory and the
   back arrow have to get out of its way. */
#frame.gs-paused #inv,
#frame.gs-paused #back-btn,
#frame.gs-paused #hud,
#frame.gs-paused #bottom { opacity: 0; pointer-events: none; }

/* the series line under the title, and the sting on the end card */
.overlay .series {
  display: block; margin: -12px 0 18px; font-size: 10.5px; letter-spacing: 0.32em;
  text-transform: uppercase; color: #8a7a52;
}
#victory .series { margin: 4px 0 0; }
#victory .tbc { margin: 18px 0 0; font-style: italic; color: #d8cba8; }

/* "start over", under CONTINUE when there is a save: there, but quiet */
button.quiet {
  display: block; margin: 12px auto 0; padding: 4px 10px; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid transparent;
  font-family: Georgia, serif; font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: #7d7156;
  transition: color 0.2s ease, border-color 0.2s ease;
}
button.quiet:hover { color: var(--brass-lit); border-bottom-color: #7d6a34; }

/* ------------------------------------------------------------------ *
 * THE TWO MARKS (series HANDOFF §03)
 *
 * THE CLERK: typed forms and notices. Courier, blue-black ribbon, cream
 * paper gone yellow at the edges, and never a word out of place.
 * THE PATIENTS: scratched into paint, pencilled on the backs of things.
 * ------------------------------------------------------------------ */

#paper .clerk {
  width: 470px; padding: 34px 38px 30px;
  font-family: "Courier New", Courier, monospace; color: #1c2233;
  background: #ddd5bf;
  box-shadow: 0 18px 60px rgba(0,0,0,0.85), inset 0 0 60px rgba(120,96,56,0.3);
}
#paper .clerk .k-head { font-weight: bold; font-size: 15px; letter-spacing: 0.08em; text-align: center; white-space: nowrap; }
#paper .clerk .k-title {
  font-weight: bold; font-size: 25px; letter-spacing: 0.12em; text-align: center;
  margin: 4px 0 18px; padding-bottom: 10px; border-bottom: 3px solid #1c2233;
}
#paper .clerk .k-line { font-size: 16px; line-height: 1.7; white-space: nowrap; }
#paper .clerk .k-line.indent { padding-left: 34px; margin-top: -4px; }
#paper .clerk .k-foot {
  margin-top: 20px; text-align: center; font-weight: bold; font-size: 16px;
  letter-spacing: 0.1em; color: #7a1a14;
}

/* the visitors' book: a ruled register, and to-day's line at the bottom */
#paper .clerk.book { width: 560px; transform: rotate(0.5deg); }
#paper .clerk.book table { width: 100%; border-collapse: collapse; margin-top: 12px; }
#paper .clerk.book th {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; text-align: left;
  border-bottom: 2px solid #1c2233; padding: 4px 6px;
}
#paper .clerk.book td {
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 14px; color: #2a2a44; padding: 7px 6px; white-space: nowrap;
  border-bottom: 1px solid rgba(60,80,120,0.35);
}
#paper .clerk.book td.c0 { width: 116px; }
#paper .clerk.book tr.today td { color: #1c2233; font-family: "Courier New", monospace; font-weight: bold; }
#paper .clerk.book tr.today td.c1 { border-bottom: 1px dashed #1c2233; }

/* the admission record: ruled rows, most of them empty */
#paper .clerk.form .f-row { display: flex; align-items: baseline; margin: 12px 0; }
#paper .clerk .f-k { width: 150px; font-size: 14px; letter-spacing: 0.1em; flex: none; }
#paper .clerk .f-v {
  flex: 1; min-height: 24px; border-bottom: 1.5px solid rgba(28,34,51,0.6);
  font-size: 19px; font-weight: bold; padding-left: 8px;
}
#paper .clerk .f-note { margin-top: 18px; font-size: 13.5px; font-style: italic; line-height: 1.5; }
#paper .clerk .f-steps { margin-top: 14px; }
#paper .clerk .f-steps .f-note { margin-top: 0; font-style: normal; white-space: nowrap; }
#paper .clerk.pass { width: 400px; background: #e3dcc2; transform: rotate(1.2deg); border-top: 6px solid #2c4a3c; }
#paper .clerk .f-v.hand { font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; font-weight: normal; font-size: 18px; color: #2a2a44; }
#paper .clerk .f-sign { margin-top: 18px; font-size: 13px; }
#paper .clerk .f-sign .ink {
  font-family: "Segoe Print", "Bradley Hand", cursive; font-style: italic; font-size: 20px;
  color: #1a2250; margin-left: 10px;
}

/* the index card, and the back of it */
#paper .clerk.indexcard { width: 480px; background: #e0d8c2; border-top: 3px solid #9a2a22; transform: rotate(-0.8deg); }
#paper .clerk.indexcard .i-no { font-size: 24px; font-weight: bold; margin-bottom: 8px; }
#paper .clerk.indexcard .f-row { display: flex; align-items: baseline; margin: 7px 0; }
#paper .clerk.indexcard .scored {
  display: inline-block; width: 210px; height: 16px; vertical-align: middle;
  background: repeating-linear-gradient(-8deg, #1e1914 0 3px, transparent 3px 6px);
}
#paper .clerk.indexcard .i-back {
  margin-top: 20px; padding-top: 14px; border-top: 1px dashed rgba(28,34,51,0.4);
}
#paper .clerk.indexcard .i-turn { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #6a6250; }
#paper .pencil {
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 22px; line-height: 1.5; color: #4a4a4a; white-space: nowrap;
  transform: rotate(-1.2deg);
}

/* THE WALL: pale scratches through green paint, and three days of tallies */
#paper .patient.wall {
  width: 520px; padding: 40px 44px 36px; cursor: pointer;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.05), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 54px),
    #2c4a3c;
  box-shadow: 0 18px 60px rgba(0,0,0,0.85), inset 0 0 70px rgba(0,0,0,0.5);
  transform: rotate(0.4deg);
}
#paper .patient.wall::after { background: none; }
#paper .patient .s-line {
  font-family: "Arial Black", "Arial Bold", Arial, sans-serif; font-size: 32px;
  letter-spacing: 0.04em; line-height: 1.5; white-space: nowrap;
  color: rgba(222,220,204,0.82);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5), -1px 0 0 rgba(255,255,255,0.12);
}
#paper .patient .s-line .c { display: inline-block; }
#paper .patient .s-tally { margin-top: 12px; display: flex; gap: 22px; }
#paper .patient .s-tally span {
  position: relative; display: block; width: 40px; height: 44px;
  background: repeating-linear-gradient(90deg, rgba(222,220,204,0.75) 0 3px, transparent 3px 10px);
}
#paper .patient .s-tally span::after {
  content: ''; position: absolute; left: -6px; top: 20px; width: 56px; height: 3px;
  background: rgba(222,220,204,0.75); transform: rotate(-36deg);
}

#intro h1 { line-height: 1.16; margin-bottom: 16px; }
#intro h2 { margin-bottom: 8px; }

/* ---------------------------------------------------------------- *
 * THE DAYROOM's own sheets
 * ---------------------------------------------------------------- */

/* THE SCHEDULE: the ward's routine, the hour and the thing, in two columns.
 * VISITORS crossed out twice, and NO VISITORS stamped over it in red. */
#paper .clerk.schedule { width: 470px; }
#paper .clerk .r-line { display: flex; align-items: baseline; gap: 18px; position: relative; }
#paper .clerk .r-at { width: 64px; text-align: right; flex: none; font-weight: bold; }
#paper .clerk .r-what { letter-spacing: 0.06em; }
#paper .clerk .r-line.struck .r-what { text-decoration: line-through; text-decoration-thickness: 2px; }
#paper .clerk .r-stamp {
  margin-left: 12px; padding: 1px 6px; font-size: 12px; font-weight: bold; letter-spacing: 0.08em;
  color: rgba(150,30,26,0.9); border: 2px solid rgba(150,30,26,0.8); transform: rotate(-6deg);
}

/* UNDER THE CARD TABLE: pale scratches in dark varnished wood. The scratches
 * are the table's own decal, laid on the wood: the same picture, not a copy. */
#paper .patient.wall.under {
  padding: 26px 30px 22px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.18) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #3b2616, #2a1a0e);
  box-shadow: 0 18px 60px rgba(0,0,0,0.85), inset 0 0 90px rgba(0,0,0,0.6);
}
#paper .patient.wall.under img.decal { display: block; width: 100%; height: auto; }

/* THE RUBBING: the sheet off the pad on the cart, crayon and all */
#paper .clerk.rubbing { width: 250px; padding: 12px; background: #e6e0c8; transform: rotate(1.4deg); }
#paper .clerk.rubbing img.rub { display: block; width: 100%; height: auto; }

/* 1106's NOTE: a scrap of lined paper, folded small, in soft pencil */
#paper .patient.note {
  width: 400px; padding: 34px 40px 30px; cursor: pointer;
  background:
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(80,110,170,0.28) 33px 34px),
    #e6e0cc;
  box-shadow: 0 18px 60px rgba(0,0,0,0.85), inset 0 0 50px rgba(120,96,56,0.28);
  transform: rotate(-1.4deg);
}
#paper .patient.note .pencil { font-size: 24px; color: #3e3e3e; }
#paper .patient.note .pencil.sign { margin-top: 14px; text-align: right; font-size: 20px; }
/* the schedule's last line is the clerk's too: typed, not a red warning */
#paper .clerk.schedule .k-foot { color: #1c2233; font-style: italic; font-weight: normal; font-size: 14px; white-space: nowrap; }

/* --- readable paper in the bar: a folded corner (Admissions) ------------ */
#inv .slot.readable::after {
  content: ''; position: absolute; right: 3px; bottom: 3px;
  width: 0; height: 0; pointer-events: none;
  border-left: 9px solid transparent;
  border-bottom: 9px solid #c9b784;
  opacity: 0.55; transition: opacity 0.16s ease;
}
#inv .slot.readable:hover::after { opacity: 1; }

/* YOUR BAND: a strip of white plastic, printed in black, with its holes */
#paper .clerk.bandsheet { width: 560px; padding: 22px; background: transparent; box-shadow: none; }
#paper .clerk.bandsheet::after { background: none; }
#paper .bandsheet .b-strip {
  background: #eeeee6; border-top: 6px solid #d4d6d0; border-bottom: 6px solid #d4d6d0;
  border-radius: 6px; padding: 16px 22px 14px; color: #1a1a1a;
  box-shadow: 0 18px 60px rgba(0,0,0,0.85); transform: rotate(-1deg); position: relative;
}
#paper .bandsheet .b-top { font-size: 13px; font-weight: bold; letter-spacing: 0.08em; }
#paper .bandsheet .b-no { font-size: 26px; font-weight: bold; margin: 6px 0; letter-spacing: 0.04em; }
#paper .bandsheet .b-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: bold; padding-right: 110px; }
#paper .bandsheet .b-holes { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
#paper .bandsheet .b-holes i { width: 9px; height: 9px; border-radius: 50%; background: #888; display: block; }

/* Copied from Admissions (commit 87359d9), which SD signed off. */
/* ------------------------------------------------------------------ *
 * THE MENU IS THE CLERK'S FORM, and the end card is your band.
 *
 * SD (2026-09-25): the two screens "could be a bit more creative". So they
 * are made of the game: the menu is an admission form on a clipboard, made
 * out for you, with a rubber stamp for BEGIN; the end card is the wristband
 * the printer ran out, with your time printed on it. The sponsors' logos sit
 * under both (WorldEscapeGames.com sponsors this game).
 * ------------------------------------------------------------------ */

#intro, #victory { flex-direction: column; }

.clipboard {
  position: relative; width: 396px; margin-top: 6px; padding: 30px 15px 15px;
  background:
    repeating-linear-gradient(94deg, rgba(0,0,0,0.07) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, #6a4828, #3e2914 70%, #321f0f);
  border-radius: 10px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,220,170,0.18), inset 0 -2px 0 rgba(0,0,0,0.4);
  transform: rotate(-1.4deg);
}
.clipboard .clip {
  position: absolute; left: 50%; top: -12px; width: 128px; height: 36px; margin-left: -64px; z-index: 2;
  background: linear-gradient(#b9bcc0, #7e8187 45%, #55585d);
  border-radius: 7px 7px 4px 4px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.5);
}
.clipboard .clip::before {
  content: ''; position: absolute; left: 50%; top: 7px; width: 34px; height: 10px; margin-left: -17px;
  border-radius: 5px; background: #2b2c2f; box-shadow: inset 0 2px 3px #000;
}
.clipboard .clip::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px;
  border-radius: 2px; background: rgba(0,0,0,0.3);
}
.form-sheet {
  position: relative; padding: 20px 26px 14px; text-align: left;
  color: #262c44; font-family: "Courier New", Courier, monospace;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(140,104,50,0.16), transparent 45%),
    radial-gradient(ellipse at 10% 90%, rgba(140,104,50,0.2), transparent 50%),
    linear-gradient(#ece4cc, #ddd3b7);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 0 40px rgba(110,86,50,0.25);
}
.fs-hospital { text-align: center; font-weight: bold; font-size: 11px; letter-spacing: 0.14em; }
.fs-series {
  margin-top: 12px; text-align: center; font-family: Georgia, serif; font-size: 11px;
  letter-spacing: 0.34em; text-indent: 0.34em; text-transform: uppercase; color: #6d5a38;
}
#intro .fs-title {
  margin: 2px 0 4px; text-align: center; font-family: Georgia, serif; font-weight: normal;
  font-size: 34px; letter-spacing: 0.17em; text-indent: 0.17em; color: #1d1a14;
}
.fs-rule { height: 2px; margin: 4px 0 12px; background: #262c44; opacity: 0.7; }
.fs-row { display: flex; align-items: baseline; gap: 10px; margin: 7px 0; font-size: 12px; font-weight: bold; }
.fs-k { flex: none; width: 62px; letter-spacing: 0.06em; }
.fs-v { flex: 1; min-height: 19px; border-bottom: 1px solid rgba(38,44,68,0.55); }
.fs-v.typed { padding-left: 4px; font-size: 13px; letter-spacing: 0.04em; }
.fs-v.hand {
  padding-left: 4px; font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 15px; font-weight: normal; line-height: 1.1; color: #2d3170; transform: rotate(-1deg);
}
.fs-remarks { margin: 14px 0 2px; }
.fs-remarks p { margin: 0; text-align: center; font-size: 13px; line-height: 1.6; color: #262c44; }

/* BEGIN IS A RUBBER STAMP: red ink, a little crooked, a little worn */
.stamp-btn {
  display: block; margin: 12px auto 4px; padding: 6px 24px 5px; cursor: pointer;
  font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 24px;
  letter-spacing: 0.3em; text-indent: 0.3em; color: #a4271e;
  background:
    radial-gradient(circle at 18% 30%, rgba(236,228,204,0.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at 72% 64%, rgba(236,228,204,0.8) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 46% 80%, rgba(236,228,204,0.7) 0 1px, transparent 1.6px),
    transparent;
  border: 3px solid #a4271e; border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(164,39,30,0.22);
  opacity: 0.86; transform: rotate(-4deg);
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
}
.stamp-btn:hover { opacity: 1; transform: rotate(-4deg) scale(1.05); background-color: rgba(164,39,30,0.07); }
.stamp-btn:active { transform: rotate(-4deg) scale(0.95); }
.form-sheet button.quiet { margin: 6px auto 0; font-family: "Courier New", monospace; color: #6d5a38; }
.form-sheet button.quiet:hover { color: #a4271e; border-bottom-color: #a4271e; }
.fs-foot {
  display: block; margin-top: 10px; text-align: center; font-size: 8.5px;
  letter-spacing: 0.04em; text-transform: uppercase; color: #6a604c; white-space: nowrap;
}

/* THE SPONSORS, under the menu and the end card */
.sponsors { display: flex; align-items: center; justify-content: center; gap: 36px; margin-top: 18px; }
.sponsors a { display: block; line-height: 0; transition: transform 0.15s ease, filter 0.15s ease; }
.sponsors a:hover { transform: translateY(-2px); filter: brightness(1.15); }
.sponsors .logo-mm { width: 196px; height: auto; }
.sponsors .logo-weg { width: 118px; height: auto; }

/* THE END CARD: your band, out of the printer */
.end { width: 600px; text-align: center; }
#victory .end-title {
  font-family: Georgia, serif; font-weight: normal; font-size: 34px;
  letter-spacing: 0.26em; text-indent: 0.26em; color: var(--brass-lit);
  text-shadow: 0 0 30px rgba(201,162,39,0.25);
}
.end-sub {
  margin: 6px 0 24px; font-size: 12px; letter-spacing: 0.28em; text-indent: 0.28em;
  text-transform: uppercase; color: #8b8065;
}
.band-strip {
  display: flex; align-items: center; width: 540px; height: 108px; margin: 0 auto;
  border-radius: 20px 54px 54px 20px;
  background: linear-gradient(#fbfaf4, #e7e5da 55%, #cbc8bb);
  box-shadow: 0 12px 34px rgba(0,0,0,0.65), inset 0 -3px 6px rgba(0,0,0,0.14), inset 0 2px 3px rgba(255,255,255,0.9);
  transform: rotate(-2deg);
}
.bs-snap {
  flex: none; width: 34px; height: 34px; margin: 0 16px 0 20px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffffff, #dcdad0 60%, #aeab9e);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.25), 0 1px 1px rgba(255,255,255,0.8);
}
.bs-print {
  flex: 1; padding: 6px 14px; text-align: left; color: #161616;
  font-family: "Courier New", Courier, monospace; font-weight: bold;
  border-left: 1px dashed rgba(0,0,0,0.25); border-right: 1px dashed rgba(0,0,0,0.25);
}
.bs-hospital { font-size: 11px; letter-spacing: 0.1em; }
.bs-line { display: flex; gap: 22px; margin: 3px 0 1px; font-size: 14px; letter-spacing: 0.04em; }
.bs-time { font-size: 32px; letter-spacing: 0.08em; line-height: 1.1; }
.bs-time .bs-k { font-size: 12px; letter-spacing: 0.22em; vertical-align: 6px; }
.bs-holes { flex: none; display: flex; gap: 9px; margin: 0 26px 0 16px; }
.bs-holes i { width: 9px; height: 9px; border-radius: 50%; background: #1b1814; box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255,255,255,0.7); }
#victory .win-best { margin-top: 22px; }
#victory .tbc { margin: 14px 0 0; font-size: 15px; }
#victory .sponsors { margin-top: 26px; }

/* THE SPLASHES: SD's, then the sponsor's, three seconds each, over everything */
#splash { position: absolute; inset: 0; z-index: 30; background: #000; transition: opacity 0.5s ease, visibility 0.5s ease; }
#splash.done { opacity: 0; visibility: hidden; }
#splash > * { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 0.45s ease; pointer-events: none; }
#splash > .on { opacity: 1; }
#splash > a.on { pointer-events: auto; cursor: pointer; }
#splash img { display: block; width: 100%; height: 100%; }

/* THE DAYROOM is a word longer than ADMISSIONS: the same title a size down,
   so it stays on one line on the form, the way game 1's does */
#intro .fs-title { font-size: 29px; letter-spacing: 0.14em; text-indent: 0.14em; white-space: nowrap; }

/* and this game starts with things in the bar (game 1's flashlight, pass
   and band), so the bar would show through under the form and the band:
   out of the way while either is up */
#frame:has(#intro.show) #inv, #frame:has(#victory.show) #inv { opacity: 0; pointer-events: none; }

/* NOT YET: the menu's BEGIN until the game under it is built (SD, 2026-09-28,
 * on M-M: "I click it and it did nothing. Then a few moments later it
 * worked"). Dim, breathing, not pressable, a bar in its own ink filling under
 * it; main.js bootStep() / bootReady(). */
#begin-btn.is-loading { pointer-events: none; animation: bootwait 1.5s ease-in-out infinite; }
@keyframes bootwait { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.22; } }
#begin-btn.just-ready { animation: bootready 0.6s ease-out; }
@keyframes bootready { from { filter: brightness(1.8); } to { filter: none; } }
#begin-btn .boot-bar {
  position: absolute; left: 50%; bottom: -12px; width: 110px; height: 3px; margin-left: -55px;
  background: color-mix(in srgb, currentColor 22%, transparent); border-radius: 2px; overflow: hidden;
  pointer-events: none; transition: opacity 0.5s ease;
}
#begin-btn .boot-bar i { display: block; height: 100%; width: 0; background: currentColor; transition: width 0.3s ease; }
#begin-btn .boot-bar.done { opacity: 0; }
