:root {
  --bg: #eef7ff;
  --surface: #ffffff;
  --text: #1e1b4b;
  --muted: #4b5578;
  --primary: #ff6b35;
  --accent: #ffd23f;
  --mint: #2ec4b6;
  --line: #1e1b4b;
  --soft-line: #c7d2fe;
  --radius: 18px;
  --shadow-sm: 0 4px 0 #c7d2fe;
  --shadow-lg: 0 6px 0 #1e1b4b;
  --font-head: "Baloo 2", "Hiragino Maru Gothic ProN", "PingFang SC", "PingFang TC", "Apple SD Gothic Neo", "Microsoft JhengHei", "Malgun Gothic", ui-rounded, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Hiragino Sans", "PingFang SC", "PingFang TC", "Apple SD Gothic Neo", "Microsoft JhengHei", "Malgun Gothic", ui-rounded, system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(#c7dff7 1.6px, transparent 1.6px);
  background-size: 18px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.18;
  margin: 0;
  color: var(--text);
}
h1 { font-size: 46px; }
h2 { font-size: 32px; }
h3 { font-size: 22px; }
p { margin: 0 0 16px; max-width: 70ch; }
a { color: #d9480f; font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; z-index: 50;
  background: var(--surface); padding: 8px 14px; border-radius: 12px; border: 2.5px solid var(--line); box-shadow: var(--shadow-lg);
}

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 780px; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.header-right {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); flex: 0 0 auto;
}
.brand-mascot { display: block; flex: 0 0 auto; transition: transform .15s ease; }
.brand:hover .brand-mascot { transform: rotate(-6deg) scale(1.06); }
.brand-name { font-family: var(--font-head); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
.site-nav a {
  color: var(--text); text-decoration: none;
  padding: 6px 13px; border-radius: 999px; border: 2px solid transparent;
  transition: background-color .14s ease, border-color .14s ease;
}
.site-nav a:hover { background: #fff9db; border-color: var(--line); }
.site-nav a[aria-current="page"] { background: var(--accent); border-color: var(--line); box-shadow: 0 2px 0 var(--line); }

.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: #fffdf7; color: var(--text);
  border: 2px solid var(--line); box-shadow: 0 2px 0 var(--line);
  font-size: 13px; font-weight: 800; white-space: nowrap;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: #fff9db; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 196px; padding: 8px;
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 16px;
  box-shadow: 0 6px 0 var(--line);
  display: grid; gap: 4px;
}
.lang-menu a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700;
}
.lang-menu a:hover { background: #fff9db; }
.lang-menu a[aria-current="page"] { background: var(--accent); border: 1.5px solid var(--line); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 16px;
  font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 2.5px solid var(--line); box-shadow: 0 4px 0 var(--line);
  transition: transform .08s ease, box-shadow .08s ease, background-color .14s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn-primary { background: var(--primary); color: var(--text); }
.btn-primary:hover { background: #ff8252; color: var(--text); }
.btn-outline { background: var(--surface); color: var(--text); }
.btn-outline:hover { background: #fff9db; color: var(--text); }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--accent); color: var(--text); border: 2px solid var(--line);
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 14px; box-shadow: 0 2px 0 var(--line);
}

.hero-band { padding: 48px 0; }
.home-hero-compact { padding: 24px 0 36px; }
.home-head-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.home-head-bar h1 { font-size: 38px; margin-bottom: 6px; }
.home-head-bar .hero-lead { margin: 0; font-size: 17px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 36px; align-items: center; }
.hero-lead { font-size: 18px; color: var(--muted); margin: 14px 0 24px; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.workshop-box { margin-top: 20px; background: #fffdf7; border: 2px dashed var(--soft-line); border-radius: 16px; padding: 14px 18px; }
.workshop-box summary { cursor: pointer; font-weight: 800; font-size: 14px; color: var(--muted); }
.workshop-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.workshop-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--soft-line); }
.workshop-list strong { color: var(--text); }
.workshop-tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #eef7ff; color: var(--muted); border: 1.5px solid var(--soft-line); }

.cabinet-card {
  position: relative;
  background: var(--surface); border: 3px solid var(--line); border-radius: 22px;
  padding: 26px 24px 24px; box-shadow: 0 6px 0 var(--line);
}
.tape-strip {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 92px; height: 22px; border-radius: 6px;
  background: rgba(255, 210, 63, 0.85); border: 2px solid var(--line);
}
.cabinet-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.cabinet-code { color: #0f766e; background: #ccfbf1; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--line); }
.cabinet-time { color: var(--muted); align-self: center; }
.cabinet-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cabinet-console { flex: 0 0 auto; }
.cabinet-title { font-size: 28px; margin-bottom: 8px; }
.cabinet-desc { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.strata-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 18px; }
.strata-mini span {
  padding: 7px 4px; border-radius: 10px; text-align: center;
  font-size: 12px; font-weight: 800; border: 2px solid var(--line);
}

.shelf-band { padding: 48px 0; border-top: 3px solid var(--line); background: #fffdf7; }
.section-head { margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 6px 0 0; }
.shelf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.shelf-card {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 20px;
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 5px 0 var(--soft-line);
}
.shelf-card.is-live { background: #ffffff; box-shadow: 0 5px 0 var(--line); }
.shelf-card.is-soon:nth-child(2) { background: #fff9db; }
.shelf-card.is-soon:nth-child(3) { background: #e0f2fe; }
.shelf-card.is-soon:nth-child(4) { background: #f0fdf4; }
.shelf-card h3 a { color: var(--text); text-decoration: none; }
.shelf-card h3 a:hover { color: var(--primary); }
.shelf-card p { margin: 0; font-size: 15px; color: var(--muted); }
.shelf-meta, .shelf-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.shelf-code { font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.shelf-status { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #ffffff; border: 2px solid var(--line); color: var(--text); }
.shelf-status.is-open { background: var(--mint); color: var(--text); }
.shelf-foot { margin-top: auto; padding-top: 8px; color: var(--muted); font-weight: 700; }
.shelf-link { font-weight: 800; text-decoration: none; color: #d9480f; }
.shelf-soon-note { font-size: 12px; color: var(--muted); }

.principles-band { padding: 48px 0; border-top: 3px solid var(--line); }
.principles-band h2 { margin-bottom: 24px; }
.principles-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.principles-list li {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 20px;
  padding: 22px; box-shadow: 0 5px 0 var(--soft-line);
}
.p-num { display: inline-block; font-size: 13px; font-weight: 800; color: var(--text); background: var(--accent); border: 2px solid var(--line); padding: 2px 10px; border-radius: 999px; margin-bottom: 10px; }
.principles-list h3 { margin-bottom: 8px; }
.principles-list p { margin: 0; font-size: 15px; color: var(--muted); }

.play-hero { padding: 24px 0 16px; }
.page-head { padding: 36px 0 8px; }
.page-lead { color: var(--muted); font-size: 18px; margin-top: 10px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.play-sub { color: var(--muted); margin: 8px 0 20px; font-size: 17px; }

.game-stage-wrap { margin-top: 12px; }
.game-stage-wrap.is-expanded {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  overflow-y: auto; padding: 16px;
}

.stage-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px; padding: 14px 16px;
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px;
  box-shadow: 0 4px 0 var(--soft-line);
}
.stage-bar-left, .stage-bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bar-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px;
  border-radius: 12px; border: 2px solid var(--line); background: #fffdf7; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 0 var(--line); transition: transform .08s ease, box-shadow .08s ease;
}
.bar-btn:hover { background: #fff9db; }
.bar-btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--line); }
.bar-btn[data-gf-liked] { background: var(--accent); color: var(--text); }
.bar-count { font-weight: 800; }
.share-msg { font-size: 13px; color: #0f766e; font-weight: 700; }

.editorial-band { padding: 48px 0; }
.prose {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 22px;
  padding: 28px 28px 16px; box-shadow: 0 5px 0 var(--soft-line);
}
.prose h2 { margin: 28px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 22px 0 8px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; max-width: 70ch; }
.prose li { margin-bottom: 6px; }

.faq-block { margin-top: 40px; }
.faq-block h2 { margin-bottom: 18px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px;
  padding: 16px 20px; box-shadow: 0 4px 0 var(--soft-line);
}
.faq-item summary { font-weight: 800; cursor: pointer; font-size: 17px; }
.faq-item p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }

.comments-block { margin-top: 44px; }
.comments-head h2 { margin-bottom: 6px; }
.comments-head p { color: var(--muted); margin-bottom: 18px; }
.comment-form {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 20px;
  padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 0 var(--soft-line);
}
.comment-fields { display: grid; gap: 10px; }
.comment-fields input, .comment-fields textarea {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line);
  font: inherit; font-size: 15px; background: #fffdf7; color: var(--text);
}
.comment-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.comment-msg { font-size: 14px; font-weight: 700; color: #0f766e; }
.comment-reply-bar { font-size: 13px; font-weight: 800; color: #d9480f; margin-bottom: 6px; }
.reply-cancel { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; padding: 0; margin-bottom: 10px; text-decoration: underline; }
.comments-list { display: grid; gap: 12px; }
.comments-list[data-gf-empty]::before {
  content: "No comments yet—share what age the engine guessed for you!";
  display: block; padding: 18px; border-radius: 18px;
  background: var(--surface); border: 2.5px dashed var(--soft-line); color: var(--muted); font-size: 15px; font-weight: 600;
}
:lang(ja) .comments-list[data-gf-empty]::before { content: "まだコメントはありません。何歳と当てられたかぜひ教えてください！"; }
:lang(es) .comments-list[data-gf-empty]::before { content: "Aún no hay comentarios. ¡Cuéntanos qué edad adivinó el juego!"; }
:lang(zh-CN) .comments-list[data-gf-empty]::before { content: "还没有评论，快来晒晒系统把你猜成几岁了吧！"; }
:lang(zh-TW) .comments-list[data-gf-empty]::before { content: "還沒有留言，快來分享系統猜你幾歲、準不準！"; }
:lang(zh-HK) .comments-list[data-gf-empty]::before { content: "仲未有留言，快啲講下系統估你幾多歲準唔準！"; }
:lang(ko) .comments-list[data-gf-empty]::before { content: "아직 댓글이 없습니다. 몇 살로 나왔는지 첫 후기를 남겨보세요!"; }

.comment-card, .reply-card {
  background: var(--surface); border: 2.5px solid var(--line); border-radius: 18px; padding: 16px 18px;
}
.comment-card[data-gf-owner], .reply-card[data-gf-owner] { background: #fff9db; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.comment-meta time, .reply-to { color: var(--muted); font-size: 13px; }
.owner-tag { padding: 2px 10px; border-radius: 999px; background: var(--mint); color: var(--text); border: 1.5px solid var(--line); font-size: 12px; font-weight: 800; }
.comment-body { margin: 0 0 8px; font-size: 15px; }
.reply-btn { background: none; border: 0; color: #d9480f; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; padding: 0; }
.comment-replies { display: grid; gap: 10px; margin-top: 12px; padding-left: 16px; border-left: 3px solid var(--soft-line); }

.more-band {
  margin-top: 40px; padding: 22px; border-radius: 20px;
  background: #fff9db; border: 2.5px solid var(--line); box-shadow: 0 4px 0 var(--line);
}
.more-band h2 { font-size: 24px; margin-bottom: 6px; }
.more-band p { margin: 0; color: var(--text); }

.site-footer { border-top: 3px solid var(--line); background: var(--surface); padding: 36px 0; }
.footer-inner { display: grid; gap: 14px; }
.footer-brand p { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; font-weight: 700; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--primary); }
.footer-langs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; border-top: 1.5px dashed var(--soft-line); }
.footer-langs a {
  padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--text); text-decoration: none; background: #fffdf7; border: 1.5px solid var(--soft-line);
}
.footer-langs a:hover { background: #fff9db; border-color: var(--line); }
.footer-langs a[aria-current="page"] { background: var(--accent); border-color: var(--line); }
.footer-copy { font-size: 13px; color: var(--muted); margin: 0; }

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .header-inner { padding-block: 10px; gap: 10px; flex-wrap: wrap; }
  .header-right { width: 100%; justify-content: space-between; }
  .hero-band, .shelf-band, .principles-band, .editorial-band { padding: 32px 0; }
  .hero-grid, .shelf-grid, .principles-list { grid-template-columns: 1fr; }
  .site-nav { gap: 6px; font-size: 13px; }
  .site-nav a { padding: 5px 10px; }
  .prose { padding: 20px 16px 8px; }
  .hero-actions .btn, .stage-bar-left, .stage-bar-right { width: 100%; }
  .bar-btn { flex: 1 1 auto; justify-content: center; }
}