/* Moments: small things that happen once when something happens, then settle. Nothing here loops, and
   with reduced motion each one shows its end state at once. (A new card's drop is in corkboard.css, the
   greenlight in produce.css.) */

/* Script to Corkboard and back: the scene becomes its card while the rest cross-fades
   (toolbar_controller.js names the two ends). The bar stays put. */
.toolbar { view-transition-name: toolbar; }
::view-transition-group(carried) { animation-duration: 420ms; animation-timing-function: cubic-bezier(0.3, 0.9, 0.3, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Sending it out: a rubber stamp thumps onto the sheet once and stays. */
.title-page:has(> .stamp), .guest:has(> .stamp), .tracker__entry:has(> :is(.stamp, .postmark)) { position: relative; }
.stamp {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  padding: 0.2em 0.55em;
  border: 3px double currentColor;
  border-radius: var(--radius-chip);
  color: color-mix(in srgb, var(--primary-on-paper) 85%, transparent);
  font: 800 var(--text-sm)/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  rotate: -7deg;
  pointer-events: none;
  animation: stamp-down 380ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.stamp--on-row { top: 0.15rem; right: 6.5rem; font-size: var(--text-xs); }
@keyframes stamp-down {
  from { scale: 2.4; opacity: 0; }
  55% { scale: 0.94; opacity: 1; }
}

/* FADE OUT: the lamp warms for a breath and a line goes in the margin (fade_out_controller.js). */
.the-end__glow {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 10%, rgb(255 200 110 / 0.28), transparent 70%);
  animation: lamp-warms 2.6s ease-in-out both;
}
@keyframes lamp-warms { from, to { opacity: 0; } 40% { opacity: 1; } }

.margin-note {
  position: absolute;
  left: calc(100% + 1.2rem);
  width: 11rem;
  margin: 0;
  color: var(--brass);
  font: 1.15rem/1.3 var(--font-hand);
  rotate: -3deg;
  pointer-events: none;
  animation: the-end-written 900ms 600ms ease-out both;
}
/* No room in the margin: under the line instead. */
@container (max-width: 64rem) {
  .margin-note { left: auto; right: 1rem; width: auto; max-width: 11rem; margin-top: 2.2rem; padding: 0.1rem 0.5rem; border-radius: 3px;
    background: var(--typed-paper, #fffdf6); color: var(--sheet-muted); box-shadow: 0 1px 4px rgb(0 0 0 / 0.22); }
}
@keyframes the-end-written { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .margin-note { animation: none; } }

/* Page one: a pencil tick in the margin where the first page fills (page_one_controller.js). */
.page-one { display: flex; align-items: center; gap: 0.3rem; margin-top: -0.7rem; animation-delay: 300ms; }
.page-one svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; animation: tick-drawn 450ms ease-out both; }
@keyframes tick-drawn { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .page-one svg { animation: none; } }

/* The contest tracker's gold seal beside an entry still going, pressed on when news is marked. */
.seal {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  aspect-ratio: 1;
  margin-right: 0.45rem;
  border-radius: 50%;
  vertical-align: middle;
  background: radial-gradient(circle at 35% 30%, #fbe7a1, #d6a73c 55%, #9a6d18);
  box-shadow: 0 0 0 2px #c9962f, 0 0 0 3.5px #f3d98b, 0 2px 4px rgb(0 0 0 / 0.3);
  color: #5a3d06;
  font: 800 0.62rem/1 var(--font-ui);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgb(255 240 200 / 0.6);
}
.seal--winner { font-size: 0.95rem; }
.seal--new { animation: seal-pressed 620ms cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes seal-pressed {
  from { scale: 2.2; rotate: -40deg; opacity: 0; }
  60% { scale: 0.92; rotate: 4deg; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .seal--new { animation: none; } }

/* Issuing pages: the new colored pages drop onto the bound script on the top sheet and slip in under
   its cover, then its edges show their color. */
.stack__fresh {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: var(--revision-color, #cfe3ff);
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.35);
  animation: pages-in 900ms cubic-bezier(0.3, 0.8, 0.3, 1) both;
}
.stack__fresh:nth-child(2) { animation-delay: 140ms; }
.stack__fresh:nth-child(3) { animation-delay: 280ms; }
@keyframes pages-in {
  from { translate: 45% 6%; rotate: 5deg; opacity: 0; }
  25% { opacity: 1; }
  70% { translate: 3% 0.5%; rotate: 0.5deg; opacity: 1; }
  to { translate: 0 0; rotate: 0deg; opacity: 0; }
}
.stack--issued .stack__edge { animation: edges-glow 1.4s 700ms ease-out both; }
@keyframes edges-glow { 30% { filter: brightness(1.25) saturate(1.6); } }
@media (prefers-reduced-motion: reduce) { .stack__fresh { display: none; } .stack--issued .stack__edge { animation: none; } }

/* Every scene on the stripboard: the end-of-day bars come down like slates, one day after another. */
.stripboard--all-on .end-of-day { transform-origin: 0 50%; animation: slate-clap 460ms calc(var(--day, 0) * 110ms) cubic-bezier(0.5, 0, 0.6, 1.6) both; }
@keyframes slate-clap {
  from { rotate: -1.6deg; translate: 0 -0.5rem; opacity: 0.6; }
  70% { rotate: 0.15deg; opacity: 1; }
  to { rotate: 0deg; translate: 0 0; }
}
.stripboard-page__all-on { margin: 0; padding: 0.6rem 0.9rem; border-left: 4px solid var(--go); background: var(--producer-raise); color: var(--chrome); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .stripboard--all-on .end-of-day { animation: none; } }

/* On set after the last day: "That's a wrap.", written once across the phone. */
.wrap { margin: 0.1rem 0 0; color: var(--go, var(--chrome)); font: 2.4rem/1.1 var(--font-hand); rotate: -2deg; animation: the-end-written 1.1s 200ms ease-out both; }
.on-set-today__last { color: var(--go, inherit); }
@media (prefers-reduced-motion: reduce) { .wrap { animation: none; } }

/* Margin milestones at page 10, halfway, page 90 and page 120 (page_one_controller.js): pencilled, no tick. */
.milestone { margin-top: -0.7rem; animation-delay: 300ms; }

/* An act break (act_break_controller.js): the structure marker's name, pencilled level with the scene it leads into,
   the first time the writing gets there, underlined. */
.act-break { animation-delay: 300ms; text-decoration: underline 1.5px; text-underline-offset: 0.25em; }

/* It's late: one offer of night paper, after midnight (its_late_controller.js). */
.its-late { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; pointer-events: auto; }
.its-late form { display: inline; }
.its-late__night {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.its-late__night:hover, .its-late__night:focus-visible { color: var(--ink); }

/* A new page (page_one_controller.js): as a page fills while writing, a strip of paper over its break is wiped
   away left to right, so the dashed line draws itself across, then the page number is written in. */
.page-drawn {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  margin-top: -1px;
  background: var(--page);
  pointer-events: none;
  animation: break-drawn 700ms ease-in-out both;
}
.page-drawn::after {
  content: "";
  position: absolute;
  top: 0.5em;
  right: 5.5em;
  width: 3.5em;
  height: 1.3em;
  background: var(--page);
  animation: break-drawn 350ms 650ms ease-out both;
}
@keyframes break-drawn { to { clip-path: inset(0 0 0 100%); } }
@media (prefers-reduced-motion: reduce) { .page-drawn { display: none; } }

/* The bar's page count turns over like an odometer as a new page starts (script_position_controller.js). */
.odometer { display: inline-block; height: 1lh; overflow: hidden; vertical-align: bottom; }
.odometer__roll { display: flex; flex-direction: column; animation: odometer-turns 520ms 150ms cubic-bezier(0.3, 1.4, 0.5, 1) both; }
@keyframes odometer-turns { to { translate: 0 -50%; } }
@media (prefers-reduced-motion: reduce) { .odometer__roll { animation: none; translate: 0 -50%; } }

/* A brand-new script (fade_in_controller.js): the first sheet rolls up into view (animated there), then FADE IN:
   types itself, a letter at a time. */
.fade-in-typed { animation: types-in 640ms steps(8, end) both; }
@keyframes types-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 calc(100% - 8ch) 0 0); } }

/* A draft's date stamp: saving a draft stamps its row with its name and the day. */
.stamp--dated { top: 0.1rem; right: 0.4rem; text-align: center; }
/* After an earlier draft with a page count, a second line says how this one compares: "6 pages lighter". */
.stamp__line { display: block; margin-top: 0.1em; padding-top: 0.1em; border-top: 1px solid currentColor; font-size: 0.85em; letter-spacing: 0.16em; }

/* Posted: "It went in" presses a postmark with the date on the entry, wavy cancel lines and all. */
.postmark {
  position: absolute; top: 0.3rem; right: 7rem; display: flex; align-items: center; color: color-mix(in srgb, #2f3f74 80%, transparent);
  rotate: -12deg; pointer-events: none; mix-blend-mode: multiply; animation: stamp-down 380ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.postmark__ring {
  display: grid; place-content: center; width: 4.4rem; height: 4.4rem; border: 2px solid currentColor; border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--sheet, #fbf7ec), inset 0 0 0 4px currentColor;
  font: 800 0.8rem/1.05 var(--font-ui); text-align: center; text-transform: uppercase; letter-spacing: 0.06em;
}
.postmark__ring b { font-size: 0.55rem; letter-spacing: 0.14em; }
.postmark__ring small { font-size: 0.55rem; font-weight: 700; }
.postmark::after {
  content: ""; width: 4.5rem; height: 1.6rem; margin-left: -0.3rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 26' fill='none' stroke='%232f3f74' stroke-width='1.8'%3E%3Cpath d='M0 4q4.5-3 9 0t9 0 9 0 9 0 9 0 9 0 9 0 9 0M0 13q4.5-3 9 0t9 0 9 0 9 0 9 0 9 0 9 0 9 0M0 22q4.5-3 9 0t9 0 9 0 9 0 9 0 9 0 9 0 9 0'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 40rem) { .postmark { right: 0.5rem; top: 0.2rem; scale: 0.8; } }

/* Not this time: marking a contest out gets a kind line in pencil on its row. */
.tracker__kind { margin-top: 0.35rem; color: var(--brass); font: 1.15rem/1.3 var(--font-hand); rotate: -1.5deg; transform-origin: left; animation: the-end-written 900ms 250ms ease-out both; }

/* After FADE OUT, a script with no draft yet is offered its first, under the margin note. */
.the-end__note:has(.the-end__draft-form) { pointer-events: auto; }
.the-end__draft-form { display: block; margin-top: 0.2rem; }
.the-end__draft { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.the-end__draft:hover, .the-end__draft:focus-visible { color: var(--ink); }

/* A laurel on the desk: a script that placed in a contest wears one beside its tag, with how far it got. */
.pad__laurel { display: flex; align-items: center; gap: 0.3em; padding-top: 0.3rem; color: #8a6510; font: 700 0.62rem/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.pad__laurel + .pad__meta { margin-top: 0; }
.laurel { width: 1.05em; height: 1.35em; fill: currentColor; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; }
.laurel path { fill: none; }

@media (prefers-reduced-motion: reduce) { .postmark, .tracker__kind { animation: none; } }

/* Transitions act their name, once per line (transitions_controller.js, which plays them); FADE TO BLACK.'s dark. */
.acts-fade { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; }

/* A script's birthday, pencilled on its pad once that day (birthday_controller.js). */
.pad__birthday:not([hidden]) { display: block; padding-top: 0.3rem; color: #a3341f; font: 1rem/1.15 var(--font-hand); rotate: -1.5deg; animation: the-end-written 1.2s ease-out 0.3s both; }
.pad__birthday:not([hidden]) + .pad__meta { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .pad__birthday { animation: none; } }

/* Yesterday's tally (note_to_self): a torn-off scrap from a notepad, in the writer's hand, on the blotter. */
.note-to-self {
  margin: 0;
  padding: 0.45rem 0.9rem 0.5rem;
  max-width: min(26rem, 100%);
  background: linear-gradient(#fbf6e6, #f3ecd6);
  color: #23407a;
  font: 1.05rem/1.25 var(--font-hand);
  rotate: -1.2deg;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 96% 96%, 91% 100%, 85% 95%, 78% 100%, 70% 96%, 62% 100%, 54% 95%, 46% 100%, 38% 96%, 30% 100%, 22% 95%, 14% 100%, 7% 96%, 0 100%);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.35);
}

/* The coffee ring (screenplays/_coffee_ring): low on the blotter, half on the tooling, as a mug would have stood. */
.coffee-ring {
  position: absolute;
  right: clamp(0.5rem, 4vw, 3rem);
  bottom: -1.5rem;
  width: clamp(7rem, 14vw, 10rem);
  height: auto;
  rotate: 18deg;
  pointer-events: none;
}

/* Two weeks: a second ring beside the first. A month: the mug itself, still standing on the first ring. */
.coffee-ring--two { width: clamp(10rem, 20vw, 14.5rem); rotate: 8deg; }
.coffee-ring--mug { bottom: -2.2rem; }

/* Under the scripts, as if a script were put down after the mug. */
body:has(.coffee-ring) .pads { position: relative; z-index: 1; }

/* The desk calendar (screenplays/_calendar): this month, lying top left in the first row of scripts and a typed
   script's size (an 8.5×11 sheet in the same slot, tilted the same way), a pencil X through each day written and
   today ringed. Still. */
.desk-calendar-spot { width: 100%; max-width: 16rem; justify-self: center; container-type: inline-size; transform: perspective(1200px) rotateX(12deg) rotate(-1.4deg); transform-origin: 50% 100%; }
.desk-calendar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  height: calc(100cqi * 11 / 8.5);
  margin: 0;
  padding: 0 5cqi 5cqi;
  border-radius: 2px 2px 3px 3px;
  color: #2a2620;
  box-shadow: 0 1px 0 #e7e0cf, 0 2px 0 #fffdf6, 0 3px 0 #e2dac6, 0 4px 0 #fbf7ec, 0 5px 0 #ddd4bf, 0 12px 24px rgb(0 0 0 / 0.4);
  /* Coil binding along the top. */
  background-image:
    radial-gradient(circle at 50% 0.4rem, #3a3530 0.2rem, transparent 0.22rem),
    linear-gradient(#fffdf6, #f6f0e0);
  background-size: 0.9rem 0.8rem, 100% 100%;
  background-repeat: repeat-x, no-repeat;
}
.desk-calendar__month {
  margin: 0 -5cqi 3cqi;
  padding: 1.15rem 0 4cqi;
  background: linear-gradient(to bottom, transparent 0.8rem, #b3372b 0.8rem);
  color: #fff;
  font: 800 max(0.72rem, 6.5cqi)/1.2 var(--font-ui);
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}
.desk-calendar__month small { font-size: inherit; font-weight: 600; opacity: 0.8; }
.desk-calendar__days { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; font: max(0.72rem, 6.5cqi)/1 Georgia, "Times New Roman", serif; font-variant-numeric: lining-nums; text-align: center; }
.desk-calendar__days th { height: 1.5em; color: #8b8070; font: 700 max(0.55rem, 4cqi)/1 var(--font-ui); vertical-align: top; }
.desk-calendar__day { position: relative; border-top: 1px solid #ebe3d0; }
.desk-calendar__day--ahead { color: #a59a85; }
/* The ring and the X stay round and square however tall the days grow. */
.desk-calendar__day--today::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.9em;
  aspect-ratio: 1;
  border: 1.5px solid rgb(179 55 43 / 0.75);
  border-radius: 50% 45% 55% 48%;
  translate: -50% -50%;
  rotate: -8deg;
}
.desk-calendar__x { position: absolute; top: 50%; left: 50%; width: 1.6em; height: 1.6em; overflow: visible; translate: -50% -50%; }
.desk-calendar__motto { display: block; width: 100%; height: auto; margin-top: 2.5cqi; padding-top: 2.5cqi; border-top: 1px solid #ebe3d0; overflow: visible; }
.desk-calendar__motto text { fill: #b3372b; font: italic 700 19px Georgia, "Times New Roman", serif; }
.desk-calendar__x path { fill: none; stroke: #45454c; stroke-opacity: 0.78; stroke-width: 1.7; stroke-linecap: round; }

/* Tomorrow's note on the desk (screenplays/_tomorrow_on_pad): the note left last time, tucked into the script the
   day after and sticking up out of the top, so the desk says what you meant to do. Pulled up a little on hover. */
.pad-tomorrow {
  position: absolute;
  top: -2.55rem;
  left: 1.4rem;
  width: 10.5rem;
  height: 4.5rem;
  padding: 0.55rem 0.6rem 0;
  box-sizing: border-box;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.05) 0 0.35rem, transparent 0.35rem),
    #fff59d;
  color: #2b2a24;
  font: 0.92rem/1.08 var(--font-hand);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.18), 1px 3px 6px rgb(0 0 0 / 0.3);
  rotate: -3deg;
  transition: translate 180ms ease-out;
}
.pad-tomorrow:hover, .pad-tomorrow:focus-visible { translate: 0 -0.6rem; }
.pad-tomorrow__label { font-weight: 700; }
@media (max-width: 40rem) {
  .pads:has(> :first-child .pad-tomorrow, > :nth-child(2) .pad-tomorrow) { margin-top: 2.6rem; }
  .pad-tomorrow { top: -2rem; left: 0.7rem; width: calc(100% - 1.6rem); height: 4rem; padding: 0.45rem 0.4rem 0; font-size: 0.78rem; }
}

/* A dog-ear on the cover: a script with a page folded inside shows its cover's top corner folded too, the title
   page white underneath. Always on. */
.pad__dog-ear {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 1.7rem;
  height: 1.7rem;
  background:
    linear-gradient(to bottom left, transparent 50%, color-mix(in oklab, var(--cover, var(--typed-paper)) 78%, #3a2e1c) 50%, color-mix(in oklab, var(--cover, var(--typed-paper)) 92%, #3a2e1c) 75%),
    linear-gradient(to bottom left, #f3eee0 50%, transparent 50%);
  filter: drop-shadow(-1.5px 2px 1.5px rgb(0 0 0 / 0.35));
  pointer-events: none;
  transition: translate 150ms ease-out;
}
.pad:not([class*="pad--cover-"]) .pad__dog-ear { background:
    linear-gradient(to bottom left, transparent 50%, #ddd5c2 50%, #eee8d8 75%),
    linear-gradient(to bottom left, #c9c0aa 50%, transparent 50%); }
.pad__sheet:hover ~ .pad__dog-ear { translate: 0 -4px; }

/* Days left: a contest's deadline two weeks out, as a leaf torn off a desk calendar (`days_left_leaf`). Still. */
.leaf {
  display: inline-grid;
  justify-items: center;
  width: 3.4rem;
  padding-bottom: 0.3rem;
  border-radius: 3px 3px 2px 2px;
  background: #fffdf6;
  color: #2a2620;
  box-shadow: 0 1px 0 #e7e0cf, 0 2px 0 #fffdf6, 0 3px 0 #e2dac6, 0 4px 6px rgb(0 0 0 / 0.22);
  line-height: 1;
  rotate: 2deg;
  /* The torn top, where the leaf before it came off. */
  clip-path: polygon(0 3px, 8% 0, 17% 3px, 26% 0, 35% 3px, 44% 0, 53% 3px, 62% 0, 71% 3px, 80% 0, 89% 3px, 100% 0, 100% 100%, 0 100%);
}
.leaf__month { justify-self: stretch; padding: 0.3rem 0 0.2rem; background: #b3372b; color: #fff; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.leaf__days { margin-top: 0.2rem; font: 700 1.55rem/1 Georgia, "Times New Roman", serif; font-variant-numeric: lining-nums; }
.leaf__days--today { margin-block: 0.45rem 0.15rem; color: #b3372b; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.leaf__left { margin-top: 0.1rem; color: #6f675a; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.entering__step:has(> .leaf) { padding-right: 4.6rem; }
.entering__step > .leaf { position: absolute; top: 1.1rem; right: 0.2rem; }

/* The wall: every placement, framed and hung on the wood above the desk, the furthest first. Always shown. */
.wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem 1.6rem;
  max-width: 64rem;
  margin: 0.4rem auto 1.4rem;
  padding: 1rem 1rem 0;
  list-style: none;
}
.wall__hook { position: relative; }
.wall__frame {
  position: relative;
  display: block;
  padding: 0.4rem;
  border-radius: 2px;
  background: linear-gradient(135deg, #5a3a20, #2e1d10 60%, #4a2f19);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 6px 14px rgb(0 0 0 / 0.5);
  rotate: -1.2deg;
  transform-origin: 50% -0.85rem;
}
.wall__hook:nth-child(even) .wall__frame { rotate: 1deg; }
.wall__hook:nth-child(3n) .wall__frame { rotate: -0.4deg; }
.wall__frame--winner { background: linear-gradient(135deg, #e3c06a, #a77d2c 55%, #d8b25a); }
.wall__mat {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  width: 8.5rem;
  padding: 0.65rem 0.6rem 0.6rem;
  background: #f7f1e1;
  box-shadow: inset 0 0 0 0.35rem #ece3cc, inset 0 0 0 calc(0.35rem + 1px) #d9cdb0;
  color: #3a3226;
  text-align: center;
}
.wall__mat .laurel { width: 1.3rem; height: 1.7rem; fill: #b08a3a; stroke: #b08a3a; stroke-width: 0.9; }
.wall__round { font: 700 0.62rem/1.2 Georgia, "Times New Roman", serif; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6420; }
.wall__contest { font-size: 0.72rem; font-weight: 600; line-height: 1.2; }
.wall__script { font: 0.62rem/1.25 "Courier Prime", "Courier New", monospace; }
.wall__year { color: #8b8070; font-size: 0.58rem; }

/* Each frame on its nail, the wire up to it. One just recorded goes up: the nail's tapped in, then the frame hangs
   on it with a swing that settles. Once. */
.wall__frame::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 22%;
  right: 22%;
  height: 0.85rem;
  background:
    linear-gradient(to top right, transparent calc(50% - 0.6px), rgb(40 32 24 / 0.7) 50%, transparent calc(50% + 0.6px)) left / 50% 100% no-repeat,
    linear-gradient(to top left, transparent calc(50% - 0.6px), rgb(40 32 24 / 0.7) 50%, transparent calc(50% + 0.6px)) right / 50% 100% no-repeat;
}
.wall__nail {
  position: absolute;
  z-index: 1;
  top: -1.05rem;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: -0.21rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8d2c6, #7b7468 55%, #3e3a33);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
}
.wall__hook--going-up .wall__nail { animation: nail-tapped 0.5s 0.25s ease-out both; }
.wall__hook--going-up .wall__frame { animation: frame-hung 1.5s 0.75s cubic-bezier(0.3, 0.7, 0.4, 1) both; }
@keyframes nail-tapped { from { scale: 2.2; opacity: 0; } 40% { scale: 1.25; opacity: 1; } 60% { scale: 0.85; } }
@keyframes frame-hung {
  from { opacity: 0; translate: 0 -1.4rem; transform: rotate(0); }
  18% { opacity: 1; translate: 0 0.15rem; transform: rotate(5deg); }
  40% { translate: 0 0; transform: rotate(-3.2deg); }
  60% { transform: rotate(1.8deg); }
  80% { transform: rotate(-0.7deg); }
  to { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .wall__hook--going-up :is(.wall__nail, .wall__frame) { animation: none; } }
@media (max-width: 40rem) {
  .wall { gap: 0.8rem; margin-bottom: 1rem; }
  .wall__mat { width: 7.6rem; padding: 0.5rem 0.4rem; }
  .wall__round { letter-spacing: 0.06em; }
}

/* Welcome back: after a week away, a margin note at the scene left off in (welcome_back_controller.js). */
.welcome-back { width: 12rem; }
