@font-face {
  font-family: RescueRounded;
  src: url("assets/nunito-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --rounded: RescueRounded, "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  --ink: #514339;
  --muted: #796c60;
  --paper: #fff9ee;
  --cream: #fffcf5;
  --yellow: #f5c999;
  --apricot: #f5c999;
  --line: #a58b7266;
  --blue: #a5bec8;
  --red: #a54e43;
  --shadow: 0 5px 16px #5b463518;
  font-family: var(--rounded);
  font-synthesis: none;
  color-scheme: light;
  color: var(--ink);
  background: #354750;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; place-items: center; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #3d798e; outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }

.arcade {
  width: min(100%, 500px);
  height: min(100svh, 940px);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--blue);
  box-shadow: 0 16px 70px #172c3440;
}
.masthead {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: calc(7px + env(safe-area-inset-top)) 17px 7px;
  background: #fff;
  border-bottom: 1px solid #ae947841;
}
.masthead > a { display: flex; align-items: center; flex: none; text-decoration: none; }
.masthead > a > img { display: block; width: 88px; height: 67px; object-fit: contain; }
.edition { font: 800 13px/1.4 var(--rounded); letter-spacing: .1px; }
.edition > span { font-size: 10px; font-weight: 600; letter-spacing: .15px; color: var(--muted); }
.sound {
  min-width: 44px;
  min-height: 44px;
  max-width: 55px;
  padding: 7px 4px;
  border: 0;
  border-radius: 14px;
  background: #f9f4ec;
  font: 700 10px/1.35 var(--rounded);
  text-align: center;
}
.sound:hover { background: #f3eadf; }
.playfield { position: relative; flex: 1; min-height: 0; isolation: isolate; }
#scene { width: 100%; height: 100%; display: block; touch-action: none; }

.hud {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  padding: 9px 13px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff9eef2;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.counter, .clock { display: flex; flex-direction: column; }
.counter > span, .clock > span { font: 700 10px/1.4 var(--rounded); letter-spacing: .55px; }
.counter > strong { font: 800 42px/.98 var(--rounded); letter-spacing: -1.4px; }
.clock { text-align: center; }
.clock > strong { font: 800 41px/1 var(--rounded); letter-spacing: -1.4px; font-variant-numeric: tabular-nums; }
.pause {
  font: 700 20px/1 var(--rounded);
  border: 1px solid var(--line);
  background: #fffdf7;
  width: 44px;
  height: 44px;
  pointer-events: auto;
  border-radius: 50%;
}
.time-track { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: #ae8d6f24; }
#time-fill { height: 100%; background: #a98160; transform-origin: left; border-radius: 0 5px 5px 0; }
.weather {
  position: absolute;
  top: 103px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 8px;
  font: 700 10px/1.4 var(--rounded);
  letter-spacing: .25px;
  color: #fffdf4;
  text-shadow: 0 1px 4px #243941;
  pointer-events: none;
}
.weather #storm-level { font-size: 10px; }
.weather #combo { flex-basis: 100%; text-align: right; min-height: 14px; color: #ffe0b7; }
.arcade[data-gust="true"] .weather #wind {
  color: #704631;
  background: #ffedcd;
  text-shadow: none;
  border: 1px solid #ae805153;
  border-radius: 8px;
  padding: 2px 7px;
  margin: -3px -8px;
}
.feedback {
  position: absolute;
  top: 48%;
  left: 9%;
  right: 9%;
  color: var(--ink);
  background: #fff9eef0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 11px 13px;
  text-align: center;
  font: 800 clamp(17px, 5vw, 23px)/1.2 var(--rounded);
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease;
}
.feedback.visible { opacity: 1; }
/* Keep the cockatoo's raised crest and stolen loaf clear of its caption. */
.feedback[data-placement="low"] { top: 63%; }

.intro { position: absolute; inset: 0; pointer-events: none; text-align: center; padding: 25px 20px 0; }
.eyebrow { font: 700 11px/1.4 var(--rounded); letter-spacing: .35px; margin: 0 0 12px; }
.intro > .eyebrow { color: #fff8ea; font-size: 12px; font-weight: 600; text-shadow: 0 1px 4px #24313c; }
h1 {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font: 900 clamp(62px, 18vw, 84px)/.91 var(--rounded);
  letter-spacing: -2.8px;
  text-align: center;
  color: var(--cream);
  text-shadow: 0 3px 14px #27384455;
}
h1 span { color: #ffd7aa; }
h1 i { font-style: normal; }
.intro-copy { font: 600 16px/1.42 var(--rounded); margin: 17px 0 0; color: #fffaf1; text-shadow: 0 1px 5px #24343f; }
.arcade[data-phase="ready"] .intro { background: linear-gradient(#2b58681c, transparent 45%); }
.cinema { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(transparent 57%, #142c3540 87%, #142c3570); }
.cinema-controls { position: absolute; inset: 12px 14px auto; display: flex; justify-content: space-between; align-items: center; }
.cinema-controls button { pointer-events: auto; min-height: 44px; padding: 9px 15px; border: 1px solid #f8f3e760; border-radius: 18px; background: #fff9eeed; color: #514339; box-shadow: var(--shadow); font: 800 12px var(--rounded); }
.cinema-controls #cinema-pause { width: 44px; padding: 9px; border-radius: 50%; font-size: 18px; }
.cinema-copy { position: absolute; bottom: 35px; left: 25px; right: 25px; text-align: center; color: #fffaf0; text-shadow: 0 2px 8px #142c3590; }
.cinema-copy .eyebrow { font-size: 11px; letter-spacing: .5px; margin-bottom: 9px; color: #ffe0b4; }
.cinema-copy h2 { font: 800 27px/1.14 var(--rounded); letter-spacing: -.4px; max-width: 370px; margin: auto; }
.cinema-progress { position: absolute; bottom: 12px; left: 28px; right: 28px; height: 3px; border-radius: 3px; overflow: hidden; background: #fff9ee3b; }
.cinema-progress span { display: block; height: 100%; background: #ffddb3; transform: scaleX(0); transform-origin: left; }
.opening-countdown { position: absolute; inset: 40% 0 auto; text-align: center; color: #fffaf0; text-shadow: 0 3px 15px #142c3580; }
.opening-countdown span { display: block; font: 800 20px var(--rounded); }
.opening-countdown strong { display: block; font: 900 100px/1.1 var(--rounded); color: #ffdab0; }
.arcade[data-phase="countdown"] .cinema-copy { bottom: 26%; padding: 15px; border-radius: 19px; background: #fff9eeed; color: #514339; text-shadow: none; }
.arcade[data-phase="countdown"] .cinema-copy h2 { font-size: 19px; }
.arcade[data-phase="countdown"] .cinema-copy .eyebrow { color: #98704d; }
.arcade[data-phase="countdown"] .cinema-progress { display: none; }
.opening-worry { position: absolute; width: 235px; max-width: calc(100% - 36px); transform: translate(-50%, -100%); padding: 15px 18px; border: 2px solid #a47c59; border-radius: 25px; background: #fff9ee; color: #63472f; box-shadow: 0 8px 22px #182d3440; text-align: center; font: 800 20px/1.25 var(--rounded); animation: worry-arrives .18s ease-out; }
.opening-worry::after { content: ""; position: absolute; left: 24%; bottom: -10px; width: 16px; height: 16px; background: #fff9ee; border-right: 2px solid #a47c59; border-bottom: 2px solid #a47c59; transform: skewX(-18deg) rotate(45deg); border-radius: 0 0 4px 0; }
@keyframes worry-arrives { from { opacity: 0; margin-top: 7px; } to { opacity: 1; margin-top: 0; } }
.helper-message, .mascot-message {
  position: absolute;
  z-index: 3;
  width: max-content;
  max-width: 170px;
  transform: translate(-50%, -50%);
  padding: 9px 13px;
  border: 1.5px solid #a68d748f;
  border-radius: 18px;
  background: var(--paper);
  color: #64513e;
  box-shadow: 0 4px 12px #24353f1c;
  font: 700 13px/1.25 var(--rounded);
  text-align: center;
  pointer-events: none;
}
.helper-message::after, .mascot-message::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  background: var(--paper);
}
.helper-message::after {
  top: -7px;
  left: calc(50% - 6px);
  border-left: 1.5px solid #a68d748f;
  border-top: 1.5px solid #a68d748f;
  border-radius: 3px 0 0 0;
  transform: rotate(45deg);
}
.mascot-message::after {
  bottom: -7px;
  left: 15px;
  border-right: 1.5px solid #a68d748f;
  border-bottom: 1.5px solid #a68d748f;
  border-radius: 0 0 3px 0;
  transform: rotate(45deg);
}
.speech {
  position: absolute;
  top: 53%;
  right: 7%;
  max-width: 145px;
  padding: 12px 17px;
  background: var(--paper);
  border: 1px solid #a58b7277;
  border-radius: 23px 23px 23px 8px;
  font: 700 15px/1.25 var(--rounded);
  color: #64513e;
  box-shadow: 0 5px 16px #24353f1f;
}
.speech::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border-right: 1px solid #a58b7277;
  border-bottom: 1px solid #a58b7277;
  border-radius: 0 0 4px 0;
  transform: skewY(-23deg) rotate(36deg);
}
.start-actions { position: absolute; bottom: 20px; left: 24px; right: 24px; pointer-events: auto; }
.primary {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 14px;
  border: 1px solid #b18a6577;
  border-radius: 19px;
  background: var(--apricot);
  color: #4d392c;
  box-shadow: 0 4px 0 #b08a6640, 0 6px 20px #263c4329;
  font: 800 18px/1.25 var(--rounded);
  letter-spacing: 0;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.primary:hover { background: #ffdab0; }
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #b08a6640, 0 3px 10px #263c4320; }
.start-actions > p { margin: 12px 0 0; font: 700 10px/1.4 var(--rounded); letter-spacing: .35px; color: #fffaf0; text-shadow: 0 1px 4px #24343f; }
.footnote {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex: none;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid #ae947841;
  color: var(--muted);
  font: 600 10px/1.3 var(--rounded);
  letter-spacing: .05px;
  text-align: center;
}
.keyboard { display: none; }
.footnote { align-items: center; }
.credits-link { padding: 7px 0; margin: -7px 0; border: 0; background: none; font: inherit; text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.card-dialog a:not(.primary) { color: #79533b; }
.throw-help {
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 11px;
  padding: 8px 7px;
  background: #fff9eef0;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: center;
  font: 700 10px/1.3 var(--rounded);
  letter-spacing: .2px;
  pointer-events: none;
}
.launch-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px dashed #6d6456;
  border-radius: 50%;
  background: #fff8e556;
  pointer-events: none;
}
.launch-ring > span { font: 800 10px var(--rounded); }

.pause-panel, .results, .error {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 28px 27px 22px;
  background: var(--paper);
  text-align: center;
}
.pause-panel { background: #fff9eef2; gap: 24px; }
h2 { font: 800 34px/1.05 var(--rounded); letter-spacing: -.8px; margin: 0; }
.pause-panel h2, .error h2 { font-size: 34px; }
.results { justify-content: flex-start; overflow: auto; background: linear-gradient(#fffaf1, #fcf2e4); }
.results > .eyebrow { margin-bottom: 11px; color: var(--muted); }
.result-total { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 19px 0 8px; }
.result-total > strong { font: 800 91px/.88 var(--rounded); letter-spacing: -3px; color: #8f6444; font-variant-numeric: tabular-nums; }
.result-total > span { font: 800 16px/1.2 var(--rounded); text-align: left; letter-spacing: .2px; }
.result-quip { font: 600 16px/1.4 var(--rounded); margin: 11px 0 17px; min-height: 44px; }
.result-play-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 9px; margin: 0 0 18px; flex: none; }
.result-play-actions > button { min-height: 54px; padding: 12px 8px; font: 800 14px/1.25 var(--rounded); border-radius: 17px; }
.story-return { border: 1.5px solid #b18a6580; background: #fffcf5; color: #715239; box-shadow: 0 3px 0 #b08a6625; }
.story-return:hover { background: #f8e7ce; }
.results > * { flex-shrink: 0; }
.receipt { padding: 13px 14px; margin-bottom: 17px; border: 1px solid #b59d803c; border-radius: 17px; background: #fffdf68f; font: 600 12px/1.7 var(--rounded); }
.receipt > div { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
.receipt strong { font-weight: 800; }
.result-secondary { display: flex; gap: 10px; margin: 14px 0; }
.secondary { flex: 1; min-height: 46px; padding: 11px 8px; border: 1px solid var(--line); border-radius: 15px; background: #fffcf5; font: 800 11px/1.3 var(--rounded); }
.secondary:hover { background: #f6e9d8; }
.instagram { margin-top: auto; padding: 10px 0; color: #80583e; font: 800 13px/1.35 var(--rounded); text-decoration: none; }
.instagram > span { display: block; font-weight: 600; margin-top: 4px; font-size: 15px; }
.share-status { font-size: 12px; line-height: 1.4; margin: 8px 0 0; min-height: 0; }
.share-status:empty { display: none; }
.error { z-index: 20; }
.error p { font-size: 16px; line-height: 1.5; }
.error h2 { margin-bottom: 16px; }
.arcade[data-phase="settling"] .launch-ring, .arcade[data-phase="settling"] .throw-help { display: none; }
.arcade[data-phase="playing"] .intro { display: none; }
.arcade[data-critical="true"] .clock { color: var(--red); }
.arcade[data-critical="true"] #time-fill { background: var(--red); }

.card-dialog { width: min(92vw, 420px); max-height: 94svh; overflow: auto; padding: 17px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 23px; box-shadow: 0 15px 60px #172c3466; }
.card-dialog::backdrop { background: #293c49bc; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-heading h2 { font: 800 18px/1.2 var(--rounded); letter-spacing: -.3px; }
.card-heading button { width: 44px; height: 44px; flex: none; background: #f7eddf; border: 1px solid var(--line); border-radius: 50%; font-size: 26px; }
.card-dialog img { display: block; width: 100%; max-height: 59svh; object-fit: contain; margin: 0 auto 16px; border-radius: 12px; touch-action: auto; }
.card-dialog .primary { color: var(--ink); text-align: center; text-decoration: none; font-size: 15px; }
.card-dialog > p { font-size: 12px; line-height: 1.5; margin: 16px 0 0; }

@media (min-width: 700px) {
  body { padding: 20px; }
  .arcade { height: min(94svh, 900px); border: 1px solid #c8b29b66; border-radius: 24px; }
  .keyboard { display: inline; }
}
@media (max-height: 720px) {
  .cinema-copy h2 { font-size: 23px; }
  .cinema-copy { bottom: 32px; }
  .opening-countdown strong { font-size: 78px; }
  .arcade { min-height: 560px; }
  .masthead { padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .masthead > a > img { width: 76px; height: 58px; }
  .intro { padding-top: 16px; }
  .intro > .eyebrow { font-size: 11px; margin-bottom: 9px; }
  .intro h1 { font-size: 58px; letter-spacing: -2px; }
  .intro-copy { font-size: 14px; line-height: 1.35; margin-top: 13px; }
  .speech { top: 50%; right: 6%; font-size: 13px; padding: 10px 14px; border-radius: 19px 19px 19px 7px; }
  .start-actions { bottom: 14px; left: 22px; right: 22px; }
  .start-actions > p { margin-top: 10px; font-size: 9px; }
  .primary { min-height: 50px; padding: 12px; font-size: 16px; border-radius: 17px; }
  .footnote { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); font-size: 9px; }
  .results { padding: 19px 22px 16px; }
  .results > .eyebrow { margin-bottom: 8px; }
  .results h2 { font-size: 29px; }
  .result-total { margin-top: 13px; }
  .result-total > strong { font-size: 75px; }
  .result-total > span { font-size: 14px; }
  .result-quip { margin: 8px 0 12px; font-size: 14px; min-height: 36px; }
  .receipt { margin-bottom: 12px; padding: 9px 12px; font-size: 11px; }
  .result-secondary { margin: 11px 0; }
  .instagram { font-size: 12px; padding: 6px 0; }
  .instagram > span { font-size: 14px; }
}
@media (max-width: 374px) {
  .masthead { padding-left: 13px; padding-right: 13px; gap: 8px; }
  .edition { font-size: 12px; }
  .edition > span { font-size: 9px; }
  .weather { font-size: 9px; }
  .weather #storm-level { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
