:root {
  --bg: #fff7e6;
  --bg2: #ffe6b0;
  --card: #ffffff;
  --text: #2d2118;
  --muted: #6f5f50;
  --primary: #ff9f1c;
  --primary-dark: #d97706;
  --secondary: #0f766e;
  --accent: #ec4899;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 8px 24px rgba(45, 33, 24, 0.09);
  --tap-size: 48px;
  --font-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top left, #ffe4aa 0, var(--bg) 35%, #fffaf0 100%); color: var(--text); font-family: var(--font-body); }
button, textarea, input { font: inherit; }
.app-shell { min-height: 100vh; max-width: 980px; margin: 0 auto; padding: 14px 14px 92px; }
.card { background: rgba(255,255,255,0.95); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 18px; border: 1px solid rgba(45,33,24,0.08); }
.header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 14px; }
.game-title-button { border: 0; background: transparent; display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.05rem; color: var(--text); cursor: pointer; padding: 6px 0; }
.paheli-brand-mark { width: 38px; height: 38px; border-radius: 14px; display: grid; place-items: center; background: #fff0cf; }
.pill-row { display:flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display:inline-flex; align-items:center; gap:4px; min-height: 30px; border-radius: 999px; padding: 5px 10px; background:#fff0cf; font-weight:800; font-size:.84rem; color:#3b2b1f; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 7vw, 3.4rem); line-height: 1.03; letter-spacing: -0.04em; margin-bottom: 10px; }
h2 { font-size: 1.18rem; margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.48; }
.eyebrow { font-weight: 900; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin-bottom: 8px; }
.button { min-height: var(--tap-size); border: none; border-radius: 999px; padding: 12px 18px; font-weight: 900; cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
.button:active, .shop-card:active, .round-card:active { transform: scale(.98); }
.button-primary { background: var(--primary); color: #271404; }
.button-secondary { background: #fff0cf; color: var(--text); }
.button-ghost { background: transparent; color: var(--muted); }
.button-danger { background: #fee2e2; color: #991b1b; }
.button-stack { display: grid; gap: 10px; margin-top: 16px; }
.action-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 12px; }
.gate-screen { display:grid; align-items:center; min-height: calc(100vh - 120px); }
.hero-card { text-align:center; padding: 28px 18px; overflow: hidden; position: relative; }
.hero-card::before { content:""; position:absolute; inset:-70px -40px auto auto; width:190px; height:190px; background:#fff0cf; border-radius:50%; z-index:0; }
.hero-card > * { position:relative; z-index:1; }
.logo-mark { font-size: 4rem; margin-bottom: 8px; }
.quick-actions { display:grid; grid-template-columns:1fr; gap:10px; margin-top:12px; }
.home-summary { margin-bottom: 16px; }
.stat-row, .stat-grid { display:grid; gap: 8px; }
.stat-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat-row span, .stat-grid > div { background:#fff7e6; border-radius:18px; padding:10px; font-weight:900; text-align:center; color:var(--text); }
.stat-grid { grid-template-columns: repeat(3, minmax(0,1fr)); margin: 14px 0; }
.stat-grid span { display:block; color: var(--muted); font-size:.78rem; margin-top:3px; }
.shop-grid { display:grid; grid-template-columns:1fr; gap: 12px; }
.shop-card, .round-card { text-align:left; width:100%; cursor:pointer; color:inherit; }
.shop-card h2, .round-card h2 { margin-bottom:3px; }
.shop-card p, .round-card p { margin-bottom:8px; }
.shop-icon { width: 48px; height: 48px; border-radius: 18px; display:grid; place-items:center; background:#fff0cf; font-size:1.7rem; margin-bottom:10px; }
.shop-icon.large { width:74px; height:74px; font-size:2.5rem; margin:0 auto 12px; }
.shopkeeper { color: var(--text); font-weight:800; }
.progress-text { font-weight:900; color:var(--secondary); margin-bottom:0; }
.shop-detail { text-align:center; }
.difficulty-row { display:grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 10px; }
.puzzle-card .question { font-size: clamp(1.28rem, 5.4vw, 2.05rem); line-height: 1.22; color: var(--text); font-weight: 850; margin: 18px 0; white-space: pre-wrap; }
.answer-label { display:block; font-weight:900; margin-bottom:8px; }
.answer-input { width:100%; min-height: 104px; border: 2px solid #f3d7a4; border-radius: 20px; padding: 14px; background:#fffaf0; resize: none; color:var(--text); outline: none; }
.answer-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,159,28,.16); }
.hint-area { display:grid; gap:8px; }
.hint-card { background:#eefaf7; border:1px solid #cdeee7; border-radius:18px; padding:12px; margin-bottom:10px; }
.hint-card p { margin-bottom:0; }
.reward-text { font-weight:900; color:var(--primary-dark); margin:10px 0 0; }
.result-card.correct { border-color: rgba(22,163,74,.25); }
.result-card.wrong { border-color: rgba(220,38,38,.18); }
.reaction { color: var(--text); font-weight:800; font-size:1.08rem; }
.answer-block { background:#fff7e6; border-radius:18px; padding:12px; margin:12px 0; }
.answer-block p { margin:0; }
.coins-earned { font-weight:900; color:var(--success); }
.round-grid { display:grid; gap:12px; }
.round-meta { display:flex; gap:8px; flex-wrap:wrap; }
.round-meta span { background:#fff7e6; border-radius:999px; padding:5px 9px; font-weight:800; font-size:.82rem; }
.title-list { display:flex; flex-wrap:wrap; gap:8px; margin: 10px 0 16px; }
.title-badge { border-radius:999px; padding:8px 12px; background:#fff0cf; font-weight:900; display:inline-flex; }
.shop-progress { margin: 12px 0; }
.progress-label { display:flex; justify-content:space-between; gap:10px; font-weight:900; margin-bottom:6px; }
.progress-bar { height: 12px; background:#f5e6c8; border-radius:999px; overflow:hidden; }
.progress-bar div { height:100%; background:linear-gradient(90deg,var(--primary),#f97316); border-radius:999px; }
.bottom-nav { position: fixed; left: max(12px, calc((100% - 980px) / 2)); bottom: 12px; transform: none; width: min(980px, calc(100% - 140px)); background: #ffffff; border-radius: 999px; box-shadow: var(--shadow-soft); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; z-index: 20; border: 1px solid rgba(45,33,24,0.08); }
.nav-item { border: none; background: transparent; min-height: 44px; border-radius: 999px; font-weight: 900; color: var(--muted); cursor:pointer; }
.nav-item.active { background: #fff0cf; color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #2d2118; color: white; padding: 12px 16px; border-radius: 999px; box-shadow: var(--shadow-soft); z-index: 50; max-width: calc(100% - 32px); text-align:center; font-weight:800; }
.reveal-box { background:#fff7e6; padding: 12px; border-radius: 18px; margin-top: 12px; }
.footer-note { font-size:.85rem; color: var(--muted); text-align:center; margin: 20px 0 0; }
@media (min-width: 680px) { .shop-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .round-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .quick-actions { grid-template-columns:1fr 1fr; } .button-stack { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 900px) { .shop-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 380px) { .stat-row { grid-template-columns:1fr; } .bottom-nav { border-radius: 24px; } .nav-item { font-size:.82rem; } }
@media (max-width: 720px) { .app-shell { padding-bottom: 160px; } .bottom-nav { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); width: auto; transform: none; } }

.next-action { margin-top: 14px; padding: 12px; border-radius: 20px; background: #fff0cf; display: grid; gap: 10px; align-items: center; }
.next-action p { margin: 4px 0 0; }
.goal-list { display: grid; gap: 10px; margin: 10px 0 16px; }
.goal-card { background:#fff7e6; border:1px solid rgba(45,33,24,.07); border-radius:18px; padding:12px; }
.goal-card p { margin: 0 0 8px; }
.mini-history { background:#fff7e6; border-radius:16px; padding:10px 12px; display:flex; justify-content:space-between; gap:10px; margin:8px 0; }
.mini-history span { color: var(--muted); font-weight:800; }
@media (min-width: 680px) { .next-action { grid-template-columns: 1fr auto; } }

.easy-mix-pill { background: #dcfce7; color: #14532d; }
.mode-card { margin: 14px 0 18px; padding: 14px; border-radius: 20px; background: #eefaf7; border: 1px solid #cdeee7; display: grid; gap: 12px; align-items: center; }
.mode-card p { margin: 4px 0 0; }
@media (min-width: 680px) { .mode-card { grid-template-columns: 1fr auto; } }



/* Shared company chrome uses site.css; this warm game surface keeps its own identity. */
.save-status-wrap { width: min(980px, 100%); min-height: 36px; margin: 0 auto 10px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.save-status { max-width: 100%; min-height: 36px; margin: 0; padding: 7px 12px; display: flex; justify-content: center; align-items: center; border: 1px solid rgba(45,33,24,.10); border-radius: 14px; background: rgba(255,255,255,.78); color: #594a3d; font-size: .82rem; text-align: center; }
.save-status-recovered, .save-status-recovery-failed, .save-status-future-save, .save-status-privacy-cleanup-failed, .save-status-migration-failed, .save-status-unavailable, .save-status-write-failed, .save-status-reset-failed { border-color: #f1c77f; background: #fff5df; color: #603b09; }
.save-retry { min-height: 36px; padding: 4px 10px; border: 1px solid #9a6700; border-radius: 10px; background: #fff; color: #603b09; font-weight: 750; cursor: pointer; }
.save-retry:focus-visible, .button:focus-visible, .nav-item:focus-visible, .shop-card:focus-visible, .round-card:focus-visible, .game-title-button:focus-visible, a:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.reset-dialog { width: min(460px, calc(100% - 32px)); padding: 24px; border: 1px solid #dce4ef; border-radius: 22px; background: #fff; color: #111827; box-shadow: 0 24px 70px rgba(15,23,42,.25); }
.reset-dialog::backdrop { background: rgba(17,24,39,.48); }
.reset-dialog h2 { font-size: 1.35rem; }
.reset-dialog p { color: #536070; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.load-error { margin-top: 14px; }
@media (max-width: 560px) { .save-status-wrap { margin-bottom: 8px; } .save-status { font-size: .78rem; } .dialog-actions { display: grid; grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

.content-review-note { max-width: 1080px; margin: 16px auto 0; padding: 12px 16px; border: 1px solid #d7e3ef; border-left: 4px solid #2563eb; border-radius: 14px; background: #f7f9fc; color: #344054; font-size: 13px; line-height: 1.55; }
.content-review-note strong { color: #111827; }
@media (max-width: 1120px) { .content-review-note { margin-inline: 16px; } }
