/* Arcade surfaces only. Navigation comes from the shared CSS stack. */
.arcade-page {
  font-family: Inter, system-ui, sans-serif;
  color: #fff;
}

.arcade-page [hidden] {
  display: none !important;
}

.arcade-shell {
  width: min(1120px, calc(100% - 36px));
  margin: auto;
  padding: 126px 0 70px;
}

.arcade-shell a {
  color: inherit;
  text-decoration: none;
}

.arcade-shell button {
  font: inherit;
  cursor: pointer;
}

.arcade-shell button:disabled {
  cursor: default;
  opacity: .58;
}

.arcade-shell :focus-visible,
.skip-link:focus-visible {
  outline: 3px solid #ffe1a0;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 3000;
  background: #ffe1a0;
  color: #171320;
  padding: 12px;
}

.skip-link:focus {
  top: 12px;
}

.arcade-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #ffffff24;
  font-size: .86rem;
}

.arcade-wordmark {
  font-weight: 800;
  letter-spacing: .06em;
  margin-right: auto;
}

.arcade-wordmark span {
  color: #a5a2b4;
  font-weight: 400;
}

.arcade-wallet {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.coin-symbol {
  color: #ffd684;
  font-size: 1.5rem;
}

.quiet-button,
.game-button,
.game-filters button,
.game-controls button,
.answer {
  border: 1px solid #ffffff30;
  background: #ffffff0d;
  color: white;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 16px;
}

.quiet-button:hover,
.game-button:hover,
.game-controls button:hover,
.answer:hover {
  background: #ffffff1c;
}

.arcade-hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 45px 0 34px;
}

.feed-eyebrow {
  color: #ffb7a5;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .77rem;
  font-weight: 800;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.065em;
  margin: 18px 0 22px;
}

.hero-copy h1 span {
  background: linear-gradient(95deg, #ffb7a5, #bfa8ff);
  color: transparent;
  background-clip: text;
}

.hero-copy>p:not(.feed-eyebrow) {
  max-width: 510px;
  color: #c8c5d1;
  font-size: 1rem;
  line-height: 1.8;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background: #ffb7a5;
  color: #211523 !important;
  font-weight: 800;
  padding: 14px 22px;
  border: 0;
  border-radius: 13px;
  min-height: 48px;
  transition: transform .15s, background .15s;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #ffcfbd;
}

.hero-copy .primary-button {
  margin-top: 26px;
}

.hero-photo {
  position: relative;
  transform: rotate(2deg);
}

.hero-photo>img {
  width: 100%;
  aspect-ratio: 1.24;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid #ffffff30;
}

.photo-stamp {
  position: absolute;
  bottom: 20px;
  left: -15px;
  background: #211b2eea;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffff30;
  border-radius: 14px;
  padding: 12px 18px;
  color: #c7bad9;
  letter-spacing: .06em;
  font-size: .72rem;
  line-height: 1.8;
  transform: rotate(-4deg);
}

.photo-stamp strong {
  color: white;
  font-size: 1rem;
  letter-spacing: 0;
}

.arcade-progress {
  display: flex;
  gap: 40px;
  align-items: center;
  background: linear-gradient(130deg, #ffffff0d, #ffffff03);
  border: 1px solid #ffffff1c;
  border-radius: 20px;
  padding: 22px 28px;
  margin-bottom: 48px;
}

.arcade-progress div {
  display: flex;
  gap: 5px;
  flex-direction: column;
}

.arcade-progress strong {
  font-size: 1.4rem;
}

.arcade-progress span,
.arcade-progress p {
  font-size: .84rem;
  color: #c0bbce;
  line-height: 1.6;
}

.arcade-progress p {
  margin-left: auto;
}

.section-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 2rem;
  margin: 8px 0 0;
  letter-spacing: -.04em;
}

.section-heading>a {
  font-size: .9rem;
  color: #cfbef8;
}

.game-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.game-filters button {
  font-size: .8rem;
  padding: 8px 12px;
}

.game-filters button[aria-pressed=true] {
  background: #d0baff;
  color: #21172b;
  border-color: #d0baff;
}

.arcade-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.arcade-card {
  min-width: 0;
  border: 1px solid #ffffff24;
  border-radius: 21px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff0c, #ffffff04);
  transition: transform .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}

.arcade-card:hover {
  transform: translateY(-5px);
  border-color: #c5a2ff8c;
}

.card-art {
  height: 150px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 50%, var(--tint, #9974d6) -150%, #171220 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-art img {
  height: 112px;
  width: 112px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px #0005);
  transition: transform .2s;
}

.arcade-card:hover .card-art img {
  transform: rotate(-7deg) scale(1.08);
}

.card-art.photo-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
}

.card-number {
  position: absolute;
  top: 12px;
  left: 12px;
  border: 1px solid #ffffff33;
  background: #100b1d91;
  border-radius: 8px;
  font-size: .73rem;
  padding: 4px 7px;
}

.card-art .card-symbol {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 2.1rem;
  filter: drop-shadow(0 3px 5px #000);
}

.card-content {
  padding: 17px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content .difficulty {
  color: #cbb4f1;
  font-size: .73rem;
  font-weight: 600;
}

.card-content h3 {
  font-size: 1.05rem;
  letter-spacing: -.02em;
  margin: 8px 0;
}

.card-content p {
  color: #bcb7c9;
  font-size: .85rem;
  line-height: 1.6;
  margin: 0 0 17px;
  flex: 1;
}

.card-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ffffff14;
  padding-top: 12px;
  font-size: .76rem;
  color: #bdb5ca;
}

.card-bottom a {
  color: #ffbea8;
  font-weight: 800;
  padding: 9px 0 9px 12px;
}

.arcade-card.finale {
  border-color: #e7b26b6b;
}

.arcade-card.finale .difficulty {
  color: #ffd489;
}

.badge-section {
  margin-top: 55px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ffffff17;
  border-radius: 15px;
  padding: 16px;
  background: #ffffff05;
}

.badge>span {
  font-size: 1.5rem;
  filter: grayscale(1);
  opacity: .5;
}

.badge.unlocked {
  border-color: #d6ad7155;
  background: #e2b96808;
}

.badge.unlocked>span {
  opacity: 1;
  filter: none;
}

.badge strong {
  display: block;
  font-size: .84rem;
  margin-bottom: 5px;
}

.badge p {
  color: #aaa4ba;
  font-size: .75rem;
  line-height: 1.5;
  margin: 0;
}

.save-note {
  color: #9e97ac;
  font-size: .8rem;
  line-height: 1.8;
  max-width: 760px;
  margin: 22px 0 0;
}

.player-heading {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  font-size: .88rem;
  color: #c6b6df;
}

.player-heading a {
  padding: 8px 0;
}

#game-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -.055em;
  margin: 16px 0 12px;
}

#game-description {
  color: #c0b8ce;
  line-height: 1.6;
  margin-bottom: 24px;
}

.game-shell {
  position: relative;
  border: 1px solid #ffffff26;
  background: linear-gradient(145deg, #1c1422eb, #10101eea);
  border-radius: 24px;
  overflow: hidden;
}

.game-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid #ffffff17;
  min-height: 76px;
}

#game-hud {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

#game-hud>div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#game-hud small {
  font-size: .72rem;
  color: #b4a8c5;
}

#game-hud strong {
  font-size: 1.13rem;
}

.session-controls {
  display: flex;
  gap: 7px;
}

.game-status {
  color: #d8cce6;
  padding: 12px 24px 0;
  font-size: .9rem;
  min-height: 34px;
  line-height: 1.6;
}

.game-stage {
  padding: 24px;
  min-height: 430px;
}

.game-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  touch-action: none;
  background: #10101a;
}

.game-stage button {
  touch-action: manipulation;
}

.instruction-screen {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: 36px;
  max-width: 780px;
  margin: 20px auto 40px;
}

.instruction-screen>img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
}

.instruction-screen h2 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.instruction-screen p,
.instruction-screen li {
  line-height: 1.8;
  color: #c7bed3;
  font-size: 1rem;
}

.instruction-screen ul {
  padding-left: 22px;
  margin: 16px 0 24px;
}

.instruction-screen .best-note {
  font-size: .84rem;
  color: #e9c2a3;
}

.game-board {
  max-width: 780px;
  margin: 0 auto;
}

.game-note {
  line-height: 1.6;
  color: #c5b8d2;
  margin: 12px 0;
  font-size: .9rem;
}

.game-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.game-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-controls input[type=range] {
  max-width: 160px;
}

.game-button {
  font-weight: 700;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer {
  text-align: left;
}

.correct {
  background: #386a5355 !important;
  border-color: #92e6b7 !important;
}

.incorrect {
  background: #74314266 !important;
  border-color: #ff9ea7 !important;
}

.photo-card {
  width: 100%;
  max-height: 310px;
  object-fit: contain;
  border-radius: 16px;
}

.control-note {
  color: #a39aac;
  font-size: .83rem;
  line-height: 1.7;
  margin-top: 16px;
}

.result-screen {
  text-align: center;
  padding: 30px 10px;
  max-width: 760px;
  margin: auto;
  animation: arcade-pop .35s ease both;
}

.result-screen .result-icon {
  font-size: 3.5rem;
}

.result-screen h2 {
  font-size: 2rem;
  margin: 15px 0;
}

.result-screen>p {
  color: #c3b6ce;
  line-height: 1.8;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 42px;
  margin: 25px 0;
}

.result-stats strong {
  font-size: 2rem;
  display: block;
}

.result-stats span {
  font-size: .83rem;
  color: #bcaecd;
}

.result-screen .new-best {
  color: #ffd28c;
  font-weight: 800;
}

.pause-cover {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #11101bf2;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.pause-cover h2 {
  font-size: 2rem;
}

.pause-cover p {
  color: #c6b2dd;
}

.storage-warning {
  padding: 15px;
  background: #684b2422;
  border: 1px solid #ffd48955;
  border-radius: 14px;
  color: #ffe2b2;
  line-height: 1.6;
}

#arcade-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 140px);
  background: #282037;
  border: 1px solid #d7b4ff66;
  padding: 16px 24px;
  border-radius: 16px;
  z-index: 2500;
  box-shadow: 0 10px 40px #0008;
  max-width: calc(100% - 32px);
  transition: transform .3s;
  color: #ffe0a3;
}

#arcade-toast.show {
  transform: translate(-50%, 0);
}

/* Game boards share functional geometry; dog identities always use project assets. */
.maze-board {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  width: min(100%, 495px);
  margin: auto;
  border: 6px solid #342744;
  border-radius: 14px;
  overflow: hidden;
}

.maze-cell {
  aspect-ratio: 1;
  background: #171325;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: clamp(.8rem, 2vw, 1.4rem);
}

.maze-cell.wall {
  background: #514160;
  box-shadow: inset 0 0 0 1px #67526c;
}

.maze-cell img {
  width: 95%;
  height: 95%;
  object-fit: contain;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  justify-content: center;
  gap: 6px;
  margin: 18px auto 0;
}

.dpad button {
  height: 48px;
  padding: 5px;
}

.dpad button:first-child {
  grid-column: 2;
}

.dpad button:nth-child(2) {
  grid-column: 1;
}

.sniff-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  max-width: 460px;
  margin: 18px auto;
}

.sniff-tile {
  aspect-ratio: 1;
  background: #36504350;
  border: 1px solid #6e927266;
  border-radius: 12px;
  color: white;
  font-size: 1.7rem;
  position: relative;
}

.sniff-tile small {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: .68rem;
  color: #c4d2c5;
}

.sniff-tile.dug {
  background: #54453066;
}

.house-photo {
  position: relative;
  max-width: 660px;
  margin: auto;
}

.house-photo>img {
  width: 100%;
  aspect-ratio: 1.7;
  object-fit: cover;
  border-radius: 18px;
  opacity: .55;
}

.house-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.house-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  border: 2px dashed #79658d;
  border-radius: 16px;
  background: #352b4344;
  color: #e0caef;
  padding: 15px;
}

.house-slot img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.house-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.house-item img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.house-item.selected {
  outline: 3px solid #ffd28c;
}

.paint-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
}

.paint-toolbar button {
  min-width: 44px;
  min-height: 44px;
}

.swatch {
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--paint);
}

.swatch[aria-pressed=true] {
  border-color: white;
  box-shadow: 0 0 0 2px #312b44;
}

.race-track {
  position: relative;
  background: #201f34;
  border: 1px solid #675673;
  border-radius: 16px;
  height: 110px;
  margin: 18px 0;
  overflow: hidden;
}

.race-track::after {
  content: 'FINISH';
  position: absolute;
  right: 9px;
  top: 12px;
  font-size: .65rem;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
  color: #b3a4c7;
}

.race-dog {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 80px;
  height: 80px;
  object-fit: contain;
  transition: transform .1s linear;
}

.rhythm-bar {
  height: 48px;
  background: #271d39;
  border-radius: 12px;
  position: relative;
  margin: 25px 0;
  overflow: hidden;
}

.rhythm-zone {
  position: absolute;
  left: 40%;
  width: 20%;
  height: 100%;
  background: #badf9b77;
  border-inline: 2px solid #cafbb0;
}

.rhythm-cursor {
  position: absolute;
  height: 100%;
  width: 5px;
  background: #ffe2b1;
}

.finale-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 520px;
  margin: 20px auto;
}

.finale-targets button {
  font-size: 2rem;
  min-height: 90px;
}

.finale-targets button.lit {
  background: #ddbbff;
  color: #261632;
  box-shadow: 0 0 30px #b692ff55;
}

.finale-photo {
  display: block;
  max-width: 320px;
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  margin: 15px auto;
}

.meter {
  height: 12px;
  background: #ffffff10;
  border-radius: 8px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffb7a5, #bba0ff);
}

@keyframes arcade-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media(max-width:1000px) {
  .arcade-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media(max-width:700px) {
  .arcade-shell {
    padding-top: 112px;
    width: calc(100% - 28px);
  }

  .arcade-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .arcade-wordmark {
    width: 100%;
  }

  .arcade-wallet {
    margin-right: auto;
  }

  .arcade-hero {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .hero-photo {
    display: none;
  }

  .arcade-progress {
    gap: 20px;
    justify-content: space-between;
    padding: 19px 16px;
  }

  .arcade-progress p {
    display: none;
  }

  .arcade-progress strong {
    font-size: 1.15rem;
  }

  .arcade-progress span {
    font-size: .7rem;
  }

  .arcade-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-art {
    height: 120px;
  }

  .card-art img {
    width: 92px;
    height: 92px;
  }

  .card-content {
    padding: 13px;
  }

  .card-content h3 {
    font-size: 1rem;
  }

  .card-content p {
    font-size: .8rem;
  }

  .card-bottom {
    font-size: .69rem;
  }

  .badge {
    padding: 12px;
    gap: 9px;
  }

  .badge>span {
    font-size: 1.2rem;
  }

  .badge strong {
    font-size: .78rem;
  }

  .badge p {
    font-size: .72rem;
  }

  .game-stage {
    padding: 14px;
    min-height: 350px;
  }

  .game-topbar {
    padding: 12px;
    align-items: start;
    flex-wrap: wrap;
  }

  #game-hud {
    gap: 18px;
  }

  .game-status {
    padding: 12px 14px 0;
  }

  .instruction-screen {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 10px auto;
  }

  .instruction-screen>img {
    height: 120px;
  }

  .instruction-screen h2 {
    font-size: 1.5rem;
  }

  .instruction-screen ul {
    margin: 12px 0 20px;
  }

  .result-stats {
    gap: 24px;
  }

  .house-slot {
    min-height: 115px;
    font-size: .78rem;
    padding: 8px;
  }

  .house-slot img {
    width: 55px;
    height: 55px;
  }

  .house-slots {
    gap: 6px;
  }

  .game-controls {
    gap: 7px;
  }

  .game-controls label {
    font-size: .8rem;
  }

  .game-controls input[type=range] {
    max-width: 100px;
  }
}

@media(max-width:360px) {

  .arcade-cards,
  .badge-grid {
    grid-template-columns: 1fr;
  }

  .card-art {
    height: 150px;
  }

  .hero-copy h1 {
    font-size: 2.4rem;
  }
}

@media(prefers-reduced-motion:reduce) {

  .arcade-page *,
  .arcade-page *::before,
  .arcade-page *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.drawing-result {
  display: block;
  max-width: 100%;
  width: 600px;
  margin: 25px auto 16px;
  border-radius: 16px;
}
