:root {
  --bg: #fff6ea;
  --ink: #3d2b1f;
  --soft: #8a7564;
  --card: #ffffff;
  --line: #f0e2cf;
  --accent: #ff8a5c;
  --c: #ffc58f;
  --r: 28px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: Nunito, system-ui, sans-serif; font-weight: 700; font-size: 22px; min-height: 100vh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.press { transition: transform .12s; }
.press:active { transform: scale(.94); }

.screen { max-width: 1100px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 20px 60px; }
.hero { text-align: center; margin: 12px 0 26px; }
.hero h1 { font-size: 46px; font-weight: 900; margin: 0; letter-spacing: -.5px; }
.hero p { margin: 4px 0 0; color: var(--soft); font-size: 22px; }
.playgame { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 8px; max-width: 420px;
  padding: 18px 28px; border-radius: 999px; background: #ffd54d; color: #4a2c0f; font-size: 34px; font-weight: 900;
  text-decoration: none; box-shadow: 0 6px 0 #e0a92a, 0 12px 24px rgba(0, 0, 0, .12); }
.playgame span { font-size: 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 18px; background: var(--card);
  border-radius: var(--r); box-shadow: 0 6px 0 var(--c), 0 10px 24px rgba(80, 50, 20, .08); text-decoration: none; color: inherit; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.tile span { font-size: 26px; font-weight: 900; text-align: center; }
.tile small { color: var(--soft); font-size: 18px; }

.top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.round { width: 72px; height: 72px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  box-shadow: 0 4px 0 var(--line); flex: none; text-decoration: none; color: var(--ink); }
.round svg { width: 36px; height: 36px; }
.top .world { color: var(--soft); font-size: 20px; }
.top h1 { margin: 0; font-size: 40px; font-weight: 900; line-height: 1.1; }

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r); background: var(--card);
  scrollbar-width: none; box-shadow: 0 6px 0 var(--c); }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; padding: 16px; }
.gallery img { width: 100%; height: min(58vh, 620px); object-fit: contain; }
.tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 6px; }
.tab { min-height: 64px; padding: 0 24px; border-radius: 32px; background: var(--card); box-shadow: 0 4px 0 var(--line); font-size: 22px; }
.tab.on { background: var(--c); box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }

.block { background: var(--card); border-radius: var(--r); padding: 20px 22px; margin-top: 20px; box-shadow: 0 4px 0 var(--line); }
.block h2 { margin: 0 0 12px; font-size: 22px; color: var(--soft); font-weight: 800; display: flex; align-items: center; gap: 10px; }
.big { font-size: 40px; font-weight: 900; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.note { color: var(--soft); font-size: 18px; margin-top: 6px; }
.quote { font-size: 24px; line-height: 1.35; background: var(--bg); border-radius: 20px; padding: 14px 18px; }
.btn { min-height: 64px; padding: 0 26px; border-radius: 32px; background: var(--c); font-size: 22px; font-weight: 800;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.btn.ghost { background: var(--bg); box-shadow: 0 4px 0 var(--line); }
.field { min-height: 72px; font-size: 32px; font-weight: 800; padding: 0 20px; border-radius: 20px; border: 4px solid var(--c);
  background: #fff; flex: 1 1 260px; min-width: 0; }
.speak { width: 52px; height: 52px; border-radius: 50%; background: var(--bg); display: inline-grid; place-items: center; flex: none; }
.speak svg { width: 28px; height: 28px; }

.trait { margin-top: 18px; }
.trait h3 { margin: 0 0 10px; font-size: 24px; font-weight: 900; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { min-height: 64px; padding: 10px 22px; border-radius: 22px; background: var(--bg); box-shadow: 0 4px 0 var(--line);
  font-size: 22px; text-align: left; }
.chip.on { background: var(--c); box-shadow: 0 4px 0 rgba(0, 0, 0, .14); }
.chip.on::before { content: '✓ '; }
.own { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.own .field { font-size: 24px; min-height: 64px; }

.pager { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }
.pager a { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 0 24px; border-radius: 36px; background: var(--card);
  box-shadow: 0 4px 0 var(--line); text-decoration: none; color: var(--ink); font-size: 22px; }

.lock { text-align: center; margin-top: 30vh; font-size: 28px; padding: 0 24px; }
#toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); background: var(--ink);
  color: #fff; padding: 16px 28px; border-radius: 30px; font-size: 22px; transition: transform .25s; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }

.sect { font-size: 30px; font-weight: 900; margin: 30px 4px 14px; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.part { background: var(--card); border-radius: var(--r); padding: 16px; text-align: center; box-shadow: 0 6px 0 var(--line); }
.part img { width: 100%; height: 150px; object-fit: contain; }
.part .emoji { font-size: 96px; line-height: 150px; height: 150px; }
.ptitle { font-size: 24px; font-weight: 900; margin: 6px 0 10px; line-height: 1.15; }
.badge { display: inline-block; padding: 10px 22px; border-radius: 30px; font-size: 24px; font-weight: 900; }
.part.ready .badge { background: #c9f2c7; }
.part.doing .badge { background: #ffe39a; }
.part.later .badge { background: #ece6df; color: var(--soft); }
.feed { display: flex; flex-direction: column; gap: 14px; }
.item { display: flex; gap: 16px; align-items: center; background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: 0 4px 0 var(--line); }
.item img, .item video { width: 150px; height: 150px; object-fit: contain; border-radius: 18px; background: var(--bg); flex: none; }
.item audio { width: 260px; flex: none; }
.itext { font-size: 22px; line-height: 1.3; }
.when { color: var(--soft); font-size: 18px; }
@media (max-width: 600px) { .item { flex-direction: column; align-items: stretch; } .item img, .item video { width: 100%; height: 220px; } .item audio { width: 100%; } }

.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.variant { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 10px 14px; border-radius: 24px;
  background: var(--bg); box-shadow: 0 4px 0 var(--line); border: 4px solid transparent; }
.variant img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 16px; background: #fff; }
.variant span { font-size: 22px; font-weight: 900; }
.variant.on { border-color: var(--c); background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .14); }
