:root {
  color-scheme: light;
  --cream: #f7eeda;
  --cream-light: #faf3df;
  --paper: #f1e6d0;
  --paper-sunk: #e8dcc2;
  --oak: #2a1f17;
  --ink: #3b2e22;
  --copper: #9c4e20;
  --spirit: #b46a2a;
  --gold: #d39a3d;
  --moss: #4f6247;
  --stone: #7f7262;
  --rule: #d3c3a2;
  font-family: "Instrument Sans", system-ui, sans-serif;
  color: var(--oak);
  background: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(156, 78, 32, 0.025) 1px, transparent 1px),
    var(--cream);
  background-size: 100% 40px;
  animation: arcade-page-in 300ms cubic-bezier(.2,.72,.2,1) both;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.arcade-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) clamp(14px, 4vw, 40px) max(20px, env(safe-area-inset-bottom));
}

.arcade-header,
.header-status,
.arcade-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arcade-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.stillbound-wordmark {
  color: var(--oak);
  font: 400 26px/1 "Newsreader", Georgia, serif;
  letter-spacing: -1px;
  text-decoration: none;
}

.stillbound-wordmark span,
h1 em,
h2 em {
  color: var(--copper);
  font-weight: 400;
  font-style: italic;
}

.header-status { gap: 18px; }

.works-open,
.eyebrow,
.room-plate,
.room-verb,
.room-best,
.arcade-footer {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.works-open {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--moss);
}

.works-open i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(79, 98, 71, 0.12);
}

.stillbound-monogram {
  display: block;
  width: 33px;
  height: 33px;
  text-decoration: none;
}

.stillbound-monogram svg { display: block; width: 100%; height: 100%; overflow: visible; }
.stillbound-monogram text { fill: var(--copper); font-family: "Newsreader", Georgia, serif; font-size: 84px; letter-spacing: -3px; }
.stillbound-monogram tspan { fill: var(--gold); font-style: italic; }

.eyebrow { color: var(--copper); }
h1, h2 { margin: 0; font-family: "Newsreader", Georgia, serif; font-weight: 400; }

/* Intro: one row, title left, line right. Kept short so the rooms sit above the fold. */
.arcade-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 3vw, 28px) 0 18px;
}

h1 {
  margin-top: 5px;
  font-size: clamp(40px, 5.5vw, 56px);
  line-height: 0.9;
  letter-spacing: clamp(-2.5px, -0.3vw, -1.5px);
}

.arcade-intro > p {
  max-width: 470px;
  margin: 0 0 4px;
  color: var(--stone);
  font: italic 16px/1.3 "Newsreader", Georgia, serif;
  text-align: right;
}

/* Rooms: a list of rows, picture left, words right. */
.room-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.room {
  --card-accent: var(--copper);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent) 35%, var(--rule));
  border-radius: 10px;
  color: var(--oak);
  background: rgba(241, 230, 208, 0.72);
  box-shadow: 0 8px 20px rgba(42, 31, 23, 0.07);
  text-decoration: none;
  transition: transform 200ms cubic-bezier(.2,.75,.25,1), box-shadow 200ms ease, border-color 200ms ease;
}

.room:hover,
.room:focus-visible {
  border-color: var(--card-accent);
  box-shadow: 0 14px 28px rgba(42, 31, 23, 0.12);
  transform: translateY(-2px);
}

.room:focus-visible,
.stillbound-wordmark:focus-visible,
.stillbound-monogram:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.room--cask { --card-accent: var(--gold); }
.room--copper { --card-accent: var(--copper); }
.room--stavefall { --card-accent: #b87333; }
.room--seamus { --card-accent: #d4a030; }
.room--barrels { --card-accent: #b87333; }

.room__art {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  background: var(--paper-sunk);
}

.room__art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.room:hover .room__art img { transform: scale(1.03); }
.room--cask .room__art img { object-position: 50% 40%; }
.room--copper .room__art img { object-position: 50% 45%; }
.room--seamus .room__art,
.room--barrels .room__art,
.room--stavefall .room__art { image-rendering: pixelated; background: #0f0d0b; }

/* Drawn scenes are titled inside; the title sits beside the thumbnail now, so hide the duplicate. */
.room__art strong { display: none; }

.room-plate {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 4px 7px;
  border: 1px solid rgba(255, 244, 220, 0.2);
  border-radius: 3px;
  color: #f4e8cf;
  background: rgba(20, 14, 10, 0.72);
  font-size: 7px;
  backdrop-filter: blur(3px);
}

.room__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 18px 12px;
}

.room-verb { color: var(--copper); }
.room h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1; letter-spacing: -0.8px; }

.room__desc {
  margin: 2px 0 0;
  color: var(--stone);
  font-size: 13.5px;
  line-height: 1.4;
}

.room__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.play-game {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--card-accent);
  font-size: 12px;
  font-weight: 600;
}

.play-game b { font-size: 15px; transition: transform 200ms ease; }
.room:hover .play-game b { transform: translateX(3px); }

.room-best { color: var(--stone); }
.room-best b { color: var(--oak); }
.room-best[hidden] { display: none; }

.arcade-footer { gap: 12px; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--stone); }
.arcade-footer a { color: var(--copper); text-decoration: none; }

@media (max-width: 650px) {
  .arcade-shell { padding-top: max(12px, env(safe-area-inset-top)); }
  .stillbound-wordmark { font-size: 22px; }
  .works-open { display: none; }
  .arcade-intro { flex-direction: column; align-items: start; gap: 8px; padding: 14px 0 12px; }
  h1 { font-size: 36px; }
  .arcade-intro > p { max-width: none; font-size: 14px; text-align: left; }
  .room-verb { display: none; }
  .room-list { gap: 8px; }
  .room { grid-template-columns: 112px minmax(0, 1fr); border-radius: 8px; }
  .room__art { aspect-ratio: auto; min-height: 112px; }
  .room-plate { display: none; }
  .room__body { padding: 10px 12px 9px; gap: 2px; }
  .room h2 { font-size: 21px; }
  .room__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12px;
  }
  .room__foot { padding-top: 6px; }
  .play-game { font-size: 11px; }
  .room-best { display: none; }
  .arcade-footer { flex-direction: column; align-items: start; gap: 6px; }
}

@media (max-width: 370px) {
  .room { grid-template-columns: 96px minmax(0, 1fr); }
  .room__art { min-height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .room, .room__art img, .play-game b { animation: none; transition: none; }
}

@keyframes arcade-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Drawn scenes for the rooms with no painted card art. Percentage-based, so they fill any thumbnail. */
.barrels-card-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(184, 115, 51, .16) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(184, 115, 51, .12) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(135deg, #25211c, #12100e 68%);
}

.barrels-card-scene::before,
.barrels-card-scene::after {
  position: absolute;
  z-index: 1;
  content: "";
}

.barrels-card-scene::before {
  inset: 0;
  background: linear-gradient(90deg, transparent 0 45%, rgba(216, 170, 87, .12) 45% 46%, transparent 46% 100%);
}

.barrels-card-scene::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 15%;
  border-top: 3px solid #5c3922;
  background: #20160f;
}

.barrels-card-scene > span { position: absolute; z-index: 2; display: block; }

.barrels-card-scene__pipe {
  border: 4px solid #a96731;
  box-shadow: inset 0 0 0 1px #e0a95c, 0 3px 0 rgba(0,0,0,.3);
}

.barrels-card-scene__pipe--top {
  top: 13%;
  left: 0;
  width: 81%;
  height: 12%;
  border-right: 0;
}

.barrels-card-scene__pipe--side {
  top: 13%;
  right: 14%;
  width: 11%;
  height: 61%;
  border-bottom: 0;
}

.barrels-card-scene__platform {
  height: 7%;
  border: 2px solid #70421f;
  background: repeating-linear-gradient(90deg, #8f5529 0 14px, #d49650 14px 18px, #8f5529 18px 28px);
  box-shadow: 0 5px 0 #21160e;
}

.barrels-card-scene__platform--one { top: 39%; left: 9%; width: 48%; }
.barrels-card-scene__platform--two { top: 67%; right: 7%; width: 39%; }

.barrels-card-scene__ladder {
  top: 40%;
  left: 47%;
  width: 7%;
  height: 35%;
  border-right: 3px solid #d69b51;
  border-left: 3px solid #d69b51;
  background: repeating-linear-gradient(0deg, transparent 0 8px, #d69b51 8px 11px, transparent 11px 17px);
}

.barrels-card-scene__barrel {
  width: 15%;
  aspect-ratio: 1;
  border: 3px solid #4e2b14;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #78401d 0 7px, #cf823d 7px 11px, #78401d 11px 17px);
  box-shadow: inset 0 0 0 3px rgba(36,19,8,.5), 0 4px 0 rgba(0,0,0,.35);
}

.barrels-card-scene__barrel--one { top: 28%; right: 12%; }
.barrels-card-scene__barrel--two { top: 58%; left: 16%; transform: scale(.72); }

.barrels-card-scene__seamus {
  bottom: 17%;
  left: 38%;
  width: 5%;
  height: 19%;
  border: 2px solid #3a2213;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(#e5c4a0 0 25%, #d37d37 25% 58%, #263c58 58% 100%);
  box-shadow: 8px 0 0 -3px #d37d37, -6px 14px 0 -3px #263c58, 6px 14px 0 -3px #263c58;
}

.barrels-card-scene strong {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 15px;
  color: #efd189;
  font: 700 clamp(12px, 1.9vw, 20px)/.84 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: -1px;
  text-align: right;
  text-shadow: 2px 2px 0 #26160b;
}

.seamus-card-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #100905 0 12%, #214d2a 12% 28%, #1671ad 28% 60%, #313638 60% 100%);
}

.seamus-card-scene::before,
.seamus-card-scene::after {
  position: absolute;
  z-index: 1;
  right: 0;
  left: 0;
  content: "";
}

.seamus-card-scene::before {
  top: 13%;
  height: 15%;
  background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(236, 205, 96, .48) 13px 17px, transparent 17px 34px);
  opacity: .48;
}

.seamus-card-scene::after {
  bottom: 7%;
  height: 2px;
  background: repeating-linear-gradient(90deg, transparent 0 21px, #dfb63c 21px 34px, transparent 34px 49px);
  opacity: .95;
}

.seamus-card-scene > span { position: absolute; z-index: 2; display: block; }

.seamus-card-scene__homes {
  top: 3%;
  left: 8%;
  width: 84%;
  height: 13%;
  border: 3px solid #7d431c;
  background: repeating-linear-gradient(90deg, #201006 0 13%, #d4a030 13% 19%, #201006 19% 31%);
  box-shadow: inset 0 -4px 0 #4f2710;
}

.seamus-card-scene__water {
  top: 31%;
  left: 0;
  width: 100%;
  height: 29%;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.13) 0 2px, transparent 2px 11px);
}

.seamus-card-scene__cask {
  top: 39%;
  width: 19%;
  height: 11%;
  border: 2px solid #593418;
  border-radius: 12px;
  background: repeating-linear-gradient(90deg, #75401d 0 7px, #bc7135 7px 12px, #75401d 12px 16px);
  box-shadow: 0 4px 0 rgba(0,0,0,.22);
}

.seamus-card-scene__cask--one { left: 10%; }
.seamus-card-scene__cask--two { right: 9%; top: 50%; transform: scale(.83); }

.seamus-card-scene__road {
  bottom: 8%;
  left: 0;
  width: 100%;
  height: 25%;
  border-top: 2px solid #5e6868;
  border-bottom: 2px solid #202424;
  background: #343b3b;
}

.seamus-card-scene__lorry {
  bottom: 16%;
  width: 25%;
  height: 11%;
  border: 2px solid #172221;
  border-radius: 2px;
  background: linear-gradient(90deg, #c2772c 0 65%, #e2d8c0 65% 100%);
  box-shadow: inset 0 -5px 0 #1e2424;
}

.seamus-card-scene__lorry::before,
.seamus-card-scene__lorry::after {
  position: absolute;
  bottom: -6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0c0c0b;
  content: "";
}

.seamus-card-scene__lorry::before { left: 12%; }
.seamus-card-scene__lorry::after { right: 12%; }
.seamus-card-scene__lorry--one { left: 9%; }
.seamus-card-scene__lorry--two { right: 8%; bottom: 26%; transform: scale(.72); transform-origin: right bottom; }

.seamus-card-scene strong {
  position: absolute;
  z-index: 3;
  right: 11px;
  bottom: 10px;
  color: #f4ca52;
  font: 700 clamp(13px, 2vw, 20px)/.85 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: -1px;
  text-align: right;
  text-shadow: 2px 2px 0 #25140a;
}

.stavefall-card-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(184, 115, 51, .16) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(rgba(184, 115, 51, .1) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(160deg, #2a1f16, #12100e 70%);
}

.stavefall-card-scene strong {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  color: rgba(255, 242, 174, .92);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.05;
  text-align: right;
  text-shadow: 2px 2px 0 rgba(10, 8, 6, .85);
}

/* A course of stacked staves, striped so individual boards read at card size */
.stavefall-card-scene__course {
  position: absolute;
  left: 8%;
  width: 62%;
  height: 26px;
  border: 2px solid rgba(12, 9, 6, .85);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255, 226, 176, .16) 0 1px,
      rgba(24, 14, 7, .55) 1px 3px,
      transparent 3px 26px),
    linear-gradient(180deg, #b07c42 0%, #8d5f2e 55%, #5c3a1a 100%);
  box-shadow: inset 0 2px 0 rgba(255, 226, 176, .26), inset 0 -3px 0 rgba(20, 12, 6, .6);
}

.stavefall-card-scene__course--one   { bottom: 10px; }
.stavefall-card-scene__course--two   { bottom: 38px; width: 54%; }
.stavefall-card-scene__course--three { bottom: 66px; width: 44%; }

/* The course being carted away: warm amber, the game's clear response */
.stavefall-card-scene__clear {
  position: absolute;
  left: 8%;
  bottom: 94px;
  width: 62%;
  height: 26px;
  border: 2px solid rgba(255, 226, 176, .95);
  background: linear-gradient(180deg, #ffd694 0%, #ffb347 60%, #e08a2a 100%);
  box-shadow: 0 0 26px rgba(255, 196, 104, .7), inset 0 2px 0 rgba(255, 248, 224, .8);
}

/* A four-cell piece still on its way down */
.stavefall-card-scene__falling {
  position: absolute;
  right: 20%;
  top: 16px;
  width: 56px;
  height: 28px;
  border: 2px solid rgba(12, 9, 6, .85);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255, 240, 210, .2) 0 1px,
      rgba(24, 14, 7, .5) 1px 3px,
      transparent 3px 28px),
    linear-gradient(180deg, #d3ac74, #9a7345);
  box-shadow: inset 0 2px 0 rgba(255, 240, 210, .4), 0 6px 14px rgba(0, 0, 0, .5);
}

