:root {
  --ink: #241f1b;
  --muted: #73685d;
  --paper: #fffaf0;
  --line: rgba(45, 36, 28, .13);
  --coral: #f26f55;
  --teal: #19a7a8;
  --gold: #f5b83f;
  --leaf: #69ad6a;
  --blue: #6c9bd2;
  --shadow: 0 16px 38px rgba(42, 29, 17, .18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}

body {
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .7), transparent 180px),
    linear-gradient(160deg, #f6dfc8 0%, #f8ead7 45%, #d9eadc 100%);
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.phone {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(100vw, 430px);
  height: 100dvh;
  min-height: 620px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.topbar {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0 6px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pill-button {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  background: rgba(255, 250, 240, .92);
  box-shadow: var(--shadow);
}

.pill-button span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 23px;
}

.pill-button strong {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 24px;
  line-height: 1;
}

.score {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  min-height: 58px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score strong {
  margin-top: -4px;
  color: var(--coral);
  font-size: 27px;
  line-height: 1;
}

.mine-button {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--teal), var(--coral));
  box-shadow: var(--shadow);
}

.mine-button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.reader-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 8px;
}

.reader-head p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.page-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  background: #222;
  color: #fff;
  font-weight: 800;
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 0 10px 10px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.board.scene-layout {
  display: block;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(153, 216, 233, .9) 0 42%, rgba(255, 234, 194, .95) 42% 100%);
}

.board.turn-next .scene-picture {
  animation: turnNext .34s cubic-bezier(.2, .78, .28, 1) both;
}

.board.turn-prev .scene-picture {
  animation: turnPrev .34s cubic-bezier(.2, .78, .28, 1) both;
}

.board.turn-next::after,
.board.turn-prev::after {
  content: "";
  position: absolute;
  z-index: 8;
  top: 6px;
  bottom: 10px;
  width: 42%;
  pointer-events: none;
  opacity: 0;
  animation: pageGlow .34s ease both;
}

.board.turn-next::after {
  right: 8px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.76));
}

.board.turn-prev::after {
  left: 8px;
  background: linear-gradient(270deg, transparent, rgba(255,255,255,.76));
}

.page-chip.page-pop {
  animation: chipPop .28s ease both;
}

.scene-picture {
  position: absolute;
  inset: 0 10px 10px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--scene-bg, #f8dec9);
  border: 2px solid rgba(255, 255, 255, .85);
}

.scene-picture::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .9), transparent 76px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, .28), transparent 92px),
    linear-gradient(180deg, var(--sky, #aee0ee) 0 44%, var(--ground, #a9d5b6) 44% 100%);
}

.scene-picture::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 7%;
  height: 26%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.72), rgba(255,255,255,.44));
  box-shadow: 0 8px 0 rgba(45, 35, 25, .08), inset 0 -10px 24px rgba(80, 96, 62, .08);
}

.scene-cloud,
.scene-surface,
.scene-decor {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.scene-cloud {
  width: 74px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}

.scene-cloud.cloud-a {
  left: 8%;
  top: 9%;
}

.scene-cloud.cloud-b {
  right: 11%;
  top: 15%;
  transform: scale(.72);
}

.scene-cloud::before,
.scene-cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.scene-cloud::before {
  left: 12px;
  top: -13px;
  width: 32px;
  height: 32px;
}

.scene-cloud::after {
  right: 10px;
  top: -18px;
  width: 40px;
  height: 40px;
}

.scene-surface.surface-a {
  left: 9%;
  top: 9%;
  width: 34%;
  height: 14%;
  border: 3px solid rgba(50, 38, 28, .16);
  border-radius: 12px;
  background: rgba(255, 250, 240, .76);
}

.scene-surface.surface-b {
  right: 7%;
  top: 12%;
  width: 25%;
  height: 20%;
  border-radius: 10px 10px 3px 3px;
  background: rgba(246, 127, 85, .7);
}

.scene-surface.surface-b::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: -22px;
  height: 44px;
  background: rgba(134, 91, 62, .78);
  transform: rotate(45deg);
}

.scene-decor {
  left: var(--dx);
  top: var(--dy);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  font-size: 28px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 5px 0 rgba(42, 31, 22, .1));
}

.scene-decor.decor-2,
.scene-decor.decor-4 {
  width: 52px;
  height: 52px;
  font-size: 31px;
}

.family-picture::before {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.72), transparent 78px),
    linear-gradient(180deg, #f4d7bb 0 43%, #f2c58e 43% 100%);
}

.family-picture::after {
  left: 13%;
  right: 13%;
  bottom: 8%;
  height: 28%;
  background: radial-gradient(circle at 50% 40%, rgba(255,252,240,.9), rgba(255,248,226,.6));
}

.family-picture .scene-cloud,
.family-picture .scene-surface {
  display: none;
}

.family-roof,
.family-house-front,
.family-gate,
.family-couplet,
.family-lantern,
.family-table,
.family-dish,
.family-firecracker {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.family-house-front {
  left: 8%;
  right: 8%;
  top: 17%;
  height: 31%;
  border: 3px solid rgba(82, 59, 42, .14);
  border-radius: 10px 10px 6px 6px;
  background:
    linear-gradient(90deg, rgba(155, 101, 63, .16) 0 9%, transparent 9% 91%, rgba(155, 101, 63, .16) 91%),
    repeating-linear-gradient(0deg, rgba(120, 84, 56, .12) 0 2px, transparent 2px 17px),
    #f8e6c9;
  box-shadow: inset 0 -9px 0 rgba(151, 91, 55, .12);
}

.family-roof {
  left: 4%;
  right: 4%;
  top: 12%;
  height: 12%;
  border-radius: 16px 16px 4px 4px;
  background:
    repeating-linear-gradient(90deg, rgba(78,70,65,.18) 0 8px, transparent 8px 18px),
    linear-gradient(#80756f, #665d58);
  box-shadow: 0 8px 0 rgba(66, 49, 36, .12);
}

.family-roof::before,
.family-roof::after {
  content: "";
  position: absolute;
  top: 24%;
  width: 18%;
  height: 82%;
  border-radius: 50%;
  background: inherit;
}

.family-roof::before {
  left: -6%;
  transform: rotate(-12deg);
}

.family-roof::after {
  right: -6%;
  transform: rotate(12deg);
}

.family-gate {
  left: 39%;
  top: 22%;
  width: 22%;
  height: 27%;
  border-radius: 80px 80px 3px 3px;
  background: linear-gradient(90deg, #b85d48, #d47758);
  box-shadow: inset 0 0 0 3px rgba(126, 66, 48, .18);
}

.family-couplet {
  top: 24%;
  display: grid;
  place-items: center;
  width: 9%;
  height: 22%;
  border-radius: 4px;
  background: #d84f3f;
  color: #ffe6a2;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(70, 38, 26, .1);
}

.couplet-left {
  left: 28%;
}

.couplet-right {
  right: 28%;
}

.family-lantern {
  top: 18%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffb65b, #e8513e 68%);
  color: #ffe7a5;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 0 rgba(85, 48, 32, .12);
}

.family-lantern::before {
  content: "";
  position: absolute;
  top: -10px;
  width: 2px;
  height: 12px;
  background: rgba(85, 48, 32, .4);
}

.lantern-left {
  left: 12%;
}

.lantern-right {
  right: 12%;
}

.family-table {
  left: 18%;
  right: 18%;
  bottom: 9%;
  height: 24%;
  border: 3px solid rgba(103, 73, 48, .11);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff8e5, #f6dfbf);
  box-shadow: 0 10px 0 rgba(92, 70, 42, .16);
}

.family-dish {
  display: grid;
  place-items: center;
  width: 48px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.74);
  font-size: 24px;
}

.dish-fish {
  left: 30%;
  bottom: 19%;
}

.dish-chicken {
  left: 56%;
  bottom: 21%;
}

.dish-tea {
  right: 25%;
  bottom: 16%;
}

.family-firecracker {
  bottom: 17%;
  width: 34px;
  height: 62px;
  background:
    radial-gradient(circle at 70% 12%, #ffd15a 0 3px, transparent 4px),
    repeating-linear-gradient(180deg, #d74d3f 0 9px, #f6be50 9px 12px);
  transform: rotate(-18deg);
  opacity: .8;
}

.firecracker-left {
  left: 7%;
}

.firecracker-right {
  right: 7%;
  transform: rotate(18deg);
}

.family-picture .scene-decor {
  background: rgba(255,255,255,.58);
}

.bg-number,
.bg-color,
.bg-shape,
.bg-farm,
.bg-orchard,
.bg-zoo,
.bg-road,
.bg-body,
.bg-sport,
.bg-job,
.bg-food,
.bg-home,
.bg-toy,
.bg-music,
.bg-clothes,
.bg-accessory,
.bg-verb,
.bg-adj,
.bg-hospital,
.bg-nature,
.bg-festival,
.bg-kitchen,
.bg-bath,
.bg-kindergarten,
.bg-market,
.bg-park,
.bg-street {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.number-line {
  left: 10%;
  right: 10%;
  top: 21%;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(55,44,35,.32) 0 6px, transparent 6px 18px);
}

.number-cubes {
  right: 9%;
  top: 11%;
  width: 84px;
  height: 70px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #70b9ff 0 48%, transparent 48%),
    linear-gradient(225deg, #ffcf6a 0 48%, transparent 48%),
    #fff7df;
  box-shadow: 0 8px 0 rgba(48,37,26,.1);
}

.abacus {
  left: 10%;
  bottom: 16%;
  width: 106px;
  height: 58px;
  border: 5px solid rgba(126,78,44,.45);
  border-radius: 10px;
  background: repeating-linear-gradient(0deg, transparent 0 15px, rgba(126,78,44,.38) 15px 18px);
}

.rainbow {
  left: 13%;
  top: 9%;
  width: 160px;
  height: 82px;
  border-radius: 160px 160px 0 0;
  background: radial-gradient(ellipse at bottom, transparent 0 34%, #fff 35% 42%, #70c2ff 43% 50%, #72d572 51% 58%, #ffd75c 59% 66%, #ff7b78 67% 74%, transparent 75%);
}

.paint-palette {
  right: 12%;
  bottom: 12%;
  width: 86px;
  height: 64px;
  border-radius: 45% 55% 48% 52%;
  background:
    radial-gradient(circle at 34% 35%, #ff5b66 0 7px, transparent 8px),
    radial-gradient(circle at 57% 28%, #ffd44d 0 7px, transparent 8px),
    radial-gradient(circle at 66% 54%, #48bc7f 0 7px, transparent 8px),
    #fff5db;
}

.color-splash {
  width: 58px;
  height: 44px;
  border-radius: 50%;
  opacity: .7;
}

.splash-a { left: 11%; bottom: 21%; background: #ff7aa8; }
.splash-b { right: 13%; top: 25%; background: #6fc8ff; }

.shape-board {
  left: 10%;
  right: 10%;
  top: 12%;
  height: 34%;
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 3px rgba(70,60,50,.1);
}

.shape-circle { left: 14%; bottom: 19%; width: 54px; height: 54px; border-radius: 50%; background: rgba(255,112,112,.75); }
.shape-triangle { right: 15%; bottom: 20%; width: 0; height: 0; border-left: 35px solid transparent; border-right: 35px solid transparent; border-bottom: 62px solid rgba(82,160,255,.72); }
.shape-square { left: 44%; bottom: 16%; width: 62px; height: 62px; border-radius: 10px; background: rgba(255,210,72,.78); transform: rotate(12deg); }

.soil-bed {
  height: 70px;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, rgba(118,73,42,.18) 0 11px, transparent 11px 22px), #9b7248;
}

.bed-a { left: 6%; right: 48%; bottom: 14%; }
.bed-b { left: 44%; right: 8%; bottom: 17%; }
.bg-farm.fence { left: 4%; right: 4%; top: 34%; height: 30px; background: repeating-linear-gradient(90deg, #e8c99e 0 10px, transparent 10px 20px), linear-gradient(#d3a56f, #d3a56f); background-size: auto, 100% 6px; background-position: 0, 0 12px; background-repeat: repeat, no-repeat; }
.bg-farm.basket { right: 10%; top: 13%; width: 74px; height: 52px; border-radius: 8px 8px 20px 20px; background: repeating-linear-gradient(90deg, #b57937 0 8px, #c88b47 8px 16px); }

.bg-orchard.tree,
.bg-zoo.tree,
.bg-park.tree {
  width: 94px;
  height: 126px;
}

.tree-left,
.bg-zoo.tree,
.tree-a { left: 7%; top: 16%; }
.tree-right,
.tree-b { right: 5%; top: 17%; }
.bg-orchard.tree::before,
.bg-zoo.tree::before,
.bg-park.tree::before {
  content: "";
  position: absolute;
  left: 38px;
  top: 52px;
  width: 18px;
  height: 76px;
  border-radius: 10px;
  background: #8b623f;
}

.bg-orchard.tree::after,
.bg-zoo.tree::after,
.bg-park.tree::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 86px;
  height: 76px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 38%, #ff7a5e 0 7px, transparent 8px),
    radial-gradient(circle at 63% 49%, #ffd15a 0 7px, transparent 8px),
    #63b96b;
}

.fruit-stand {
  left: 33%;
  right: 28%;
  bottom: 14%;
  height: 80px;
  border-radius: 10px;
  background: linear-gradient(#ffdc8a 0 42%, #c68148 42%);
  box-shadow: 0 8px 0 rgba(62,43,25,.1);
}

.bg-zoo.pond {
  left: 16%;
  right: 18%;
  bottom: 9%;
  height: 98px;
  border-radius: 50%;
  background: rgba(113,190,220,.55);
}

.bg-zoo.fence {
  left: 7%;
  right: 7%;
  top: 41%;
  height: 40px;
  background: repeating-linear-gradient(90deg, rgba(124,91,59,.55) 0 8px, transparent 8px 20px);
}

.bg-zoo.cave {
  right: 8%;
  top: 18%;
  width: 90px;
  height: 72px;
  border-radius: 50% 50% 8px 8px;
  background: #b18c72;
}

.road-main,
.bg-street.road {
  left: 0;
  right: 0;
  bottom: 4%;
  height: 34%;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,.8) 28px 50px, transparent 50px 78px),
    #bcb5ab;
}

.crosswalk {
  left: 29%;
  bottom: 17%;
  width: 44%;
  height: 48px;
  background: repeating-linear-gradient(90deg, white 0 12px, transparent 12px 24px);
  transform: perspective(120px) rotateX(28deg);
}

.traffic-light,
.bg-street.light {
  right: 9%;
  top: 16%;
  width: 22px;
  height: 78px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 20%, #ef5350 0 6px, transparent 7px),
    radial-gradient(circle at 50% 50%, #fdd34d 0 6px, transparent 7px),
    radial-gradient(circle at 50% 80%, #49b86d 0 6px, transparent 7px),
    #32312e;
}

.skyline {
  left: 7%;
  right: 18%;
  top: 17%;
  height: 76px;
  background: repeating-linear-gradient(90deg, rgba(110,120,138,.32) 0 28px, transparent 28px 42px);
}

.bg-body.mirror,
.bg-clothes.mirror,
.bg-bath.mirror {
  right: 9%;
  top: 12%;
  width: 88px;
  height: 110px;
  border: 6px solid rgba(255,255,255,.7);
  border-radius: 45px;
  background: rgba(164,214,230,.56);
}

.bg-body.bath-mat {
  left: 17%;
  right: 17%;
  bottom: 12%;
  height: 82px;
  border-radius: 50%;
  background: rgba(255,255,255,.48);
}

.bg-body.shelf {
  left: 10%;
  top: 18%;
  width: 116px;
  height: 18px;
  border-radius: 8px;
  background: #c88b58;
}

.field-lines {
  left: 3%;
  right: 3%;
  bottom: 5%;
  height: 49%;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.66);
  background: radial-gradient(circle, transparent 0 22%, rgba(255,255,255,.5) 23% 24%, transparent 25%);
}

.goal {
  right: 8%;
  top: 18%;
  width: 100px;
  height: 70px;
  border: 5px solid rgba(255,255,255,.82);
  border-bottom: 0;
  background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(255,255,255,.35) 10px 12px);
}

.track {
  left: 6%;
  right: 6%;
  bottom: 11%;
  height: 42px;
  border-radius: 50%;
  border: 10px solid rgba(223,98,68,.35);
}

.office {
  left: 9%;
  right: 9%;
  top: 12%;
  height: 36%;
  border-radius: 12px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.45) 0 24px, transparent 24px 38px), #aac7d4;
}

.desk {
  left: 16%;
  right: 16%;
  bottom: 14%;
  height: 86px;
  border-radius: 14px;
  background: #c88b58;
}

.badge {
  right: 14%;
  top: 18%;
  width: 54px;
  height: 68px;
  border-radius: 12px;
  background: #fff8dd;
}

.bg-food.table {
  left: 10%;
  right: 10%;
  bottom: 9%;
  height: 34%;
  border-radius: 50%;
  background: #fff6e6;
  box-shadow: 0 10px 0 rgba(82,54,28,.13);
}

.steam {
  left: 40%;
  top: 14%;
  width: 60px;
  height: 76px;
  background: repeating-radial-gradient(ellipse at center, rgba(255,255,255,.75) 0 6px, transparent 7px 18px);
}

.chopsticks {
  right: 14%;
  bottom: 22%;
  width: 78px;
  height: 8px;
  border-radius: 6px;
  background: #8b4e35;
  box-shadow: 0 12px 0 #8b4e35;
  transform: rotate(-24deg);
}

.bg-home.sofa {
  left: 14%;
  right: 14%;
  bottom: 16%;
  height: 92px;
  border-radius: 28px 28px 12px 12px;
  background: #e38c76;
}

.bg-home.window {
  right: 10%;
  top: 12%;
  width: 86px;
  height: 78px;
  border: 5px solid rgba(255,255,255,.75);
  background: #b6e5f2;
}

.bg-home.lamp {
  left: 12%;
  top: 17%;
  width: 50px;
  height: 92px;
  background: linear-gradient(#ffd66e 0 36%, transparent 36%);
}

.bg-home.rug {
  left: 24%;
  right: 24%;
  bottom: 9%;
  height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
}

.toy-shelf,
.wardrobe,
.bg-market.shelves {
  left: 8%;
  right: 8%;
  top: 13%;
  height: 31%;
  border-radius: 12px;
  background: repeating-linear-gradient(0deg, rgba(120,75,42,.18) 0 4px, transparent 4px 38px), #f2c17b;
}

.play-mat {
  left: 16%;
  right: 16%;
  bottom: 11%;
  height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}

.blocks {
  right: 11%;
  bottom: 17%;
  width: 78px;
  height: 58px;
  background:
    linear-gradient(90deg, #4aa3ff 0 32%, transparent 32%),
    linear-gradient(90deg, transparent 34%, #ffcf5c 34% 66%, transparent 66%),
    linear-gradient(90deg, transparent 68%, #ff7f84 68%);
}

.stage {
  left: 9%;
  right: 9%;
  bottom: 9%;
  height: 30%;
  border-radius: 50% 50% 8px 8px;
  background: #d08c6b;
}

.staff {
  left: 10%;
  right: 10%;
  top: 17%;
  height: 80px;
  background: repeating-linear-gradient(0deg, transparent 0 14px, rgba(61,48,36,.35) 14px 16px);
}

.speaker {
  bottom: 18%;
  width: 42px;
  height: 66px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 68%, #3a3a3a 0 11px, transparent 12px), #555;
}

.speaker-left { left: 8%; }
.speaker-right { right: 8%; }

.hanger-line {
  left: 15%;
  right: 15%;
  top: 18%;
  height: 4px;
  background: rgba(88,61,40,.4);
}

.vanity {
  left: 14%;
  right: 14%;
  bottom: 12%;
  height: 92px;
  border-radius: 18px;
  background: #f2c7d9;
}

.jewelry-box {
  left: 14%;
  top: 18%;
  width: 76px;
  height: 56px;
  border-radius: 10px;
  background: #e986a8;
}

.sparkle-line {
  right: 10%;
  top: 16%;
  width: 88px;
  height: 88px;
  background: radial-gradient(circle at 30% 30%, #fff 0 4px, transparent 5px), radial-gradient(circle at 70% 48%, #fff 0 5px, transparent 6px), radial-gradient(circle at 42% 76%, #fff 0 3px, transparent 4px);
}

.bg-verb.path {
  left: 13%;
  right: 13%;
  bottom: 10%;
  height: 38%;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
}

.arrows {
  right: 12%;
  top: 17%;
  width: 96px;
  height: 44px;
  background: repeating-linear-gradient(90deg, #43a9aa 0 22px, transparent 22px 34px);
  clip-path: polygon(0 30%, 70% 30%, 70% 0, 100% 50%, 70% 100%, 70% 70%, 0 70%);
}

.footprints {
  left: 13%;
  bottom: 18%;
  width: 90px;
  height: 80px;
  background: radial-gradient(ellipse at 30% 25%, rgba(66,48,32,.3) 0 9px, transparent 10px), radial-gradient(ellipse at 65% 55%, rgba(66,48,32,.3) 0 9px, transparent 10px);
}

.scale {
  left: 16%;
  bottom: 16%;
  width: 110px;
  height: 58px;
  border-radius: 40px;
  background: #fff;
}

.ruler {
  right: 10%;
  top: 17%;
  width: 108px;
  height: 24px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, #e0a84e 0 8px, #ffd166 8px 16px);
  transform: rotate(-14deg);
}

.compare-blocks {
  left: 42%;
  bottom: 17%;
  width: 86px;
  height: 86px;
  background: linear-gradient(90deg, #75bdf8 0 34%, transparent 34%), linear-gradient(90deg, transparent 38%, #f57575 38% 70%, transparent 70%), linear-gradient(90deg, transparent 73%, #7bc783 73%);
}

.wall-cross {
  left: 42%;
  top: 12%;
  width: 58px;
  height: 58px;
  background: linear-gradient(90deg, transparent 0 34%, #ef6060 34% 66%, transparent 66%), linear-gradient(0deg, transparent 0 34%, #ef6060 34% 66%, transparent 66%), rgba(255,255,255,.7);
  border-radius: 8px;
}

.bg-hospital.bed {
  left: 12%;
  right: 10%;
  bottom: 18%;
  height: 78px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 -22px 0 #9fcde8;
}

.curtain {
  right: 8%;
  top: 10%;
  width: 78px;
  height: 45%;
  background: repeating-linear-gradient(90deg, rgba(147,205,220,.5) 0 9px, rgba(255,255,255,.35) 9px 18px);
}

.monitor {
  left: 11%;
  top: 18%;
  width: 76px;
  height: 52px;
  border-radius: 8px;
  background: #334;
}

.mountain {
  bottom: 32%;
  width: 0;
  height: 0;
  border-left: 92px solid transparent;
  border-right: 92px solid transparent;
  border-bottom: 130px solid rgba(112,139,111,.72);
}

.mountain-a { left: -10%; }
.mountain-b { right: -8%; border-bottom-color: rgba(85,121,96,.7); }
.river {
  left: 16%;
  right: 16%;
  bottom: 8%;
  height: 34%;
  border-radius: 50%;
  background: rgba(102,188,220,.55);
}

.sun {
  right: 13%;
  top: 12%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffd25e;
}

.bg-festival.arch {
  left: 8%;
  right: 8%;
  top: 14%;
  height: 32%;
  border-radius: 90px 90px 8px 8px;
  border: 14px solid #d64c3d;
  border-bottom: 0;
}

.lantern-row {
  left: 12%;
  right: 12%;
  top: 20%;
  height: 46px;
  background: repeating-radial-gradient(circle at 12px 20px, #e84f3e 0 12px, transparent 13px 44px);
}

.firework {
  width: 80px;
  height: 80px;
  background: repeating-radial-gradient(circle, #ffd76a 0 3px, transparent 4px 14px);
}

.firework-a { left: 9%; top: 10%; }
.firework-b { right: 9%; top: 12%; }

.cabinet {
  left: 8%;
  right: 8%;
  top: 12%;
  height: 26%;
  background: repeating-linear-gradient(90deg, rgba(116,68,36,.25) 0 44px, transparent 44px 48px), #d7995d;
  border-radius: 10px;
}

.stove {
  left: 12%;
  bottom: 15%;
  width: 118px;
  height: 82px;
  border-radius: 12px;
  background: radial-gradient(circle at 32% 42%, #333 0 13px, transparent 14px), radial-gradient(circle at 68% 42%, #333 0 13px, transparent 14px), #f7f1e7;
}

.sink {
  right: 12%;
  bottom: 16%;
  width: 108px;
  height: 70px;
  border-radius: 16px;
  background: #d7edf2;
}

.tile-wall,
.bg-bath.tile-wall {
  left: 0;
  right: 0;
  top: 0;
  height: 43%;
  background: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15)), repeating-linear-gradient(0deg, transparent 0 27px, rgba(255,255,255,.55) 27px 29px), repeating-linear-gradient(90deg, transparent 0 33px, rgba(255,255,255,.45) 33px 35px);
}

.bg-bath.tub {
  left: 14%;
  right: 14%;
  bottom: 15%;
  height: 92px;
  border-radius: 20px 20px 50px 50px;
  background: #fff;
  box-shadow: inset 0 -18px 0 #b7e4f1;
}

.bubbles {
  right: 16%;
  top: 23%;
  width: 90px;
  height: 70px;
  background: radial-gradient(circle at 28% 42%, rgba(255,255,255,.75) 0 14px, transparent 15px), radial-gradient(circle at 58% 30%, rgba(255,255,255,.75) 0 10px, transparent 11px), radial-gradient(circle at 72% 60%, rgba(255,255,255,.75) 0 12px, transparent 13px);
}

.chalkboard {
  left: 13%;
  right: 13%;
  top: 13%;
  height: 25%;
  border: 7px solid #c58b55;
  border-radius: 10px;
  background: #4d7658;
}

.cubbies {
  left: 8%;
  right: 8%;
  bottom: 12%;
  height: 82px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.24) 0 34px, transparent 34px 38px), #f2b86f;
  border-radius: 12px;
}

.play-rug {
  left: 24%;
  right: 24%;
  bottom: 23%;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
}

.bunting {
  left: 10%;
  right: 10%;
  top: 10%;
  height: 36px;
  background: repeating-linear-gradient(135deg, #ff7d7d 0 13px, #ffd15d 13px 26px, #70c8ff 26px 39px);
  clip-path: polygon(0 0, 100% 0, 94% 100%, 88% 0, 82% 100%, 76% 0, 70% 100%, 64% 0, 58% 100%, 52% 0, 46% 100%, 40% 0, 34% 100%, 28% 0, 22% 100%, 16% 0, 10% 100%, 4% 0);
}

.bg-market.shelf-a { top: 11%; height: 25%; }
.bg-market.shelf-b { top: 39%; height: 20%; }
.checkout {
  right: 8%;
  bottom: 13%;
  width: 104px;
  height: 78px;
  border-radius: 12px;
  background: #78bfd2;
}

.bg-market.sign {
  left: 13%;
  top: 8%;
  width: 120px;
  height: 38px;
  border-radius: 999px;
  background: #ffcf64;
}

.bg-park.bench {
  left: 35%;
  bottom: 20%;
  width: 112px;
  height: 46px;
  background: repeating-linear-gradient(0deg, #b77743 0 8px, transparent 8px 14px);
}

.bg-park.path {
  left: 22%;
  right: 22%;
  bottom: 7%;
  height: 42%;
  border-radius: 50%;
  background: rgba(238,216,179,.72);
}

.shop {
  top: 18%;
  width: 112px;
  height: 110px;
  border-radius: 8px;
  background: linear-gradient(#ffcf70 0 22%, #f7e2b9 22%);
}

.shop::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  height: 18px;
  background: repeating-linear-gradient(90deg, #e75f53 0 14px, #fff 14px 28px);
}

.shop-a { left: 7%; }
.shop-b { right: 7%; }

.scene-item {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  width: 96px;
  min-height: 96px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.scene-object {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 60px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .28);
}

.scene-object span {
  font-size: 50px;
  line-height: 1;
  filter: drop-shadow(0 7px 0 rgba(40, 30, 20, .12));
}

.scene-word {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 41px;
  margin-top: -2px;
  border: 2px solid rgba(40, 30, 20, .12);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(41, 31, 21, .12);
}

.scene-word strong,
.scene-word em {
  overflow: hidden;
  padding: 0 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.scene-word strong {
  align-self: end;
  font-size: 17px;
}

.scene-word em {
  align-self: start;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.word-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.9), transparent 72px),
    var(--card-color, #f5dfc5);
}

.object-button {
  display: grid;
  place-items: center;
  min-height: 0;
  background: transparent;
}

.object-button span {
  filter: drop-shadow(0 7px 0 rgba(40, 30, 20, .12));
  font-size: clamp(44px, 18vw, 78px);
  line-height: 1;
}

.word-button {
  display: grid;
  gap: 2px;
  width: calc(100% - 14px);
  min-height: 46px;
  margin: 0 7px 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(41, 31, 21, .11);
}

.word-button strong,
.word-button em {
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.word-button strong {
  align-self: end;
  font-size: 19px;
}

.word-button em {
  align-self: start;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.word-card:active,
.scene-option:active,
.page-option:active {
  transform: scale(.97);
}

.bubble {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 48%;
  width: min(335px, calc(100% - 26px));
  transform: translate(-50%, -50%);
  border: 4px solid var(--ink);
  border-radius: 36px;
  padding: 18px 20px;
  background: #fff;
  text-align: center;
  box-shadow: 0 14px 0 rgba(0,0,0,.1);
  animation: pop .2s ease both;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -20px;
  width: 30px;
  height: 30px;
  border-right: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  background: #fff;
  transform: rotate(45deg);
}

.bubble span {
  display: inline-block;
  margin-bottom: 6px;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.bubble strong {
  display: block;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.16;
}

.bubble em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.shade {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(30, 24, 19, .28);
}

.sheet {
  position: fixed;
  z-index: 11;
  left: 50%;
  bottom: 0;
  width: min(100vw, 430px);
  max-height: 78dvh;
  transform: translateX(-50%);
  border-radius: 24px 24px 0 0;
  padding: 8px 12px max(14px, env(safe-area-inset-bottom));
  background: #fffaf0;
  box-shadow: 0 -18px 42px rgba(32, 23, 17, .24);
  animation: rise .18s ease both;
}

.sheet.compact {
  max-height: 42dvh;
}

.sheet-grip {
  width: 44px;
  height: 5px;
  margin: 2px auto 8px;
  border-radius: 999px;
  background: rgba(36, 31, 27, .22);
}

.sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sheet h2 {
  margin: 0;
  font-size: 20px;
}

.close-sheet {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.scene-grid,
.page-grid {
  display: grid;
  gap: 8px;
  max-height: calc(78dvh - 76px);
  overflow: auto;
  padding-bottom: 6px;
  overscroll-behavior: contain;
}

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

.scene-option,
.page-option {
  min-width: 0;
  min-height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid transparent;
  box-shadow: 0 5px 16px rgba(50, 35, 18, .08);
  font-weight: 900;
}

.scene-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  text-align: left;
}

.scene-option span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef7f4;
}

.scene-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-option[aria-current="true"],
.page-option[aria-current="true"] {
  border-color: var(--coral);
  background: #fff1e9;
}

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

.spark {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  color: var(--gold);
  font-size: 22px;
  animation: floatUp .7s ease-out forwards;
}

@keyframes pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.82); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes rise {
  from { transform: translate(-50%, 18px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes floatUp {
  to { opacity: 0; transform: translateY(-42px) scale(1.7) rotate(18deg); }
}

@keyframes turnNext {
  from {
    opacity: .25;
    transform: translateX(36px) rotateY(-10deg) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
  }
}

@keyframes turnPrev {
  from {
    opacity: .25;
    transform: translateX(-36px) rotateY(10deg) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
  }
}

@keyframes pageGlow {
  35% { opacity: 1; }
  to { opacity: 0; }
}

@keyframes chipPop {
  50% { transform: scale(1.08); }
}

@media (max-height: 700px) {
  .phone {
    gap: 8px;
    min-height: 560px;
  }

  .pill-button,
  .score {
    min-height: 52px;
  }

  .board {
    grid-auto-rows: minmax(102px, 1fr);
  }

  .mine-button {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .object-button span {
    font-size: clamp(38px, 15vw, 64px);
  }
}
