:root {
  color-scheme: dark;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #091b1d;
  color: #eef8dc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, #1c4d43 0, #091b1d 58%);
}

.game-shell {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  text-align: center;
}

header { margin-bottom: 1rem; }

.eyebrow {
  margin: 0 0 .35rem;
  color: #f6bf4f;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(1.6rem, 5vw, 2.5rem); }
.lede { max-width: 42rem; margin: .85rem auto 0; color: #c8e8c1; line-height: 1.5; }

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem 1rem;
  margin: 1.2rem auto;
  color: #d9f2cb;
  font-size: .8rem;
}

.music-toggle {
  margin: -.45rem auto 1.1rem;
  padding: .42rem .72rem;
  border-color: #78bdad;
  background: #123832;
  color: #d9fff2;
  font-size: .72rem;
}
.music-toggle:disabled { cursor: not-allowed; opacity: .72; }
.music-credit { margin: -1rem auto 1.1rem; color: #9ecbc0; font-size: .68rem; letter-spacing: .035em; }

kbd {
  display: inline-block;
  min-width: 1.6rem;
  padding: .1rem .3rem;
  border: 1px solid #9dc99b;
  border-bottom-width: 3px;
  border-radius: .25rem;
  background: #17362e;
  color: #fff4c8;
  font: inherit;
}

.table-card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: .7rem;
  border: 2px solid #82bd75;
  border-radius: .85rem;
  background: #102925;
  box-shadow: 0 0 0 4px #173d32, 0 1.4rem 3rem #0008;
}

.quest-hud {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: .45rem .8rem;
  margin-bottom: .7rem;
  padding: .55rem .65rem;
  border: 1px solid #78bdad;
  border-radius: .35rem;
  background: #0a2525;
  color: #d9fff2;
  text-align: left;
  font-size: clamp(.7rem, 2.4vw, .88rem);
}

.quest-kicker { color: #f6bf4f; font-size: .72em; font-weight: 900; letter-spacing: .12em; }
#quest-objective { color: #fff2ae; overflow-wrap: anywhere; }
#quest-phase { color: #c6d4ff; }
#quest-score { color: #bff6d3; white-space: nowrap; }
#quest-boost { color: #d8baff; white-space: nowrap; }

.table-stage {
  display: flex;
  align-items: center;
  gap: .65rem;
}

canvas {
  display: block;
  width: min(100%, 650px);
  flex: 1 1 auto;
  height: auto;
  border: 2px solid #f1cd68;
  border-radius: .35rem;
  background: #0d332c;
  cursor: crosshair;
  image-rendering: pixelated;
  touch-action: none;
}

.sloane-sidecar {
  flex: 0 0 104px;
  display: grid;
  gap: .3rem;
  justify-items: center;
  padding: .45rem .25rem;
  border: 2px solid #caff9e;
  border-radius: .35rem;
  background: #081d22;
  color: #f2ffd5;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.sloane-sidecar strong { font: inherit; }
.sloane-bio { display: none; margin: 0; color: #d9fff2; font-size: .56rem; font-weight: 700; line-height: 1.32; letter-spacing: .01em; text-align: center; overflow-wrap: anywhere; }
body[data-scene="world"] .sloane-sidecar {
  flex-basis: 150px;
  align-self: flex-start;
  margin-top: 1rem;
  padding: .55rem .45rem;
}
body[data-scene="world"] .sloane-bio { display: block; }
body[data-scene="intro"] #restart { display: none; }

.sloane-sprite {
  display: block;
  width: 78px;
  height: 96px;
  background: url('assets/generated/black-cat-sprite-sheet-v2.png') 0 0 / 200% 200% no-repeat;
  image-rendering: pixelated;
}

canvas:focus-visible, button:focus-visible {
  outline: 3px solid #fff3a3;
  outline-offset: 3px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem .2rem .2rem;
  color: #fff1b5;
  font-size: clamp(.7rem, 2.5vw, .9rem);
}

#message { color: #aee7e0; text-align: right; }
#flipper-status { color: #c5ebe4; }
#objective-status { color: #d8baff; }
#boss-status { color: #ffc978; }
#current-status { color: #82d9ec; }
#journey-status { color: #b8ef93; }
#lucky-status { color: #ffe37b; }
#mystic-status { color: #e7c5ff; }

button {
  margin-top: .55rem;
  padding: .6rem 1rem;
  border: 2px solid #f6bf4f;
  border-radius: .35rem;
  background: #255747;
  color: #fff9d4;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

button:hover { background: #337461; }
.focus-note { margin: .8rem 0 0; color: #9fc8ad; font-size: .76rem; }

@media (max-width: 560px) {
  .table-stage { flex-direction: column; }
  canvas { width: 100%; }
  .sloane-sidecar, body[data-scene="world"] .sloane-sidecar { width: 100%; flex-basis: auto; margin-top: 0; grid-template-columns: 78px auto; align-items: center; justify-content: center; }
  body[data-scene="world"] .sloane-bio { grid-column: 1 / -1; max-width: 32rem; }
  .quest-hud { grid-template-columns: auto 1fr; }
  #quest-phase, #quest-score { grid-column: span 1; }
}
