:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface2: #f2f5f8;
  --text: #202735;
  --muted: #8792a2;
  --accent: #e47f5f;
  --accent2: #7d72c7;
  --line: #e5e9ef;
  --success: #4f9b78;
  --warning: #d99348;
  --danger: #d46666;
  --shadow: 0 8px 24px rgba(36,49,67,.07);
}
html, body { background: var(--bg); color: var(--text); }
.phone { background: var(--surface); color: var(--text); }
.brand { color: var(--text); }
.avatar { border-color: #cfd6df; color: #536071; background: #fff; }
.hero h1, .section-head h2, .game-head h1, .game-intro h1, .simple-page h1, .profile-head h1, .modal-card h2, .empty h2, .legal-page h2 { color: var(--text); }
.hero-copy, .game-head p, .game-intro p, .recommend p, .category-card small, .page-copy, .simple-page label, .safety, .form-foot, .result small { color: #536071; }
.primary-btn { background: var(--accent); color: #fff; box-shadow: 0 6px 14px rgba(228,127,95,.2); }
.primary-btn:hover { background: #c96345; }
.game-card, .category-card, .result, .plan-card, .order-pay-card { background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
.game-card-top b, .result-label, .membership-teaser a, .form-foot a, .muted-link, .admin-link span { color: #c96345; }
.game-card-top i { color: var(--accent2); }
.game-card strong, .free-row strong, .category-card strong, .menu-list a, .plan-card > strong { color: var(--text); }
.free-symbol { background: #fff0e9; color: #c96345; }
.category-card label { color: #c96345; border-color: #f0c6b7; background: #fff0e9; }
.category-card label.vip { color: #7d72c7; border-color: #d8d4f4; background: #f0effc; }
.recommend { background: #fff8f3; border-color: #f1ddd4; box-shadow: var(--shadow); }
.pill { color: #c96345; background: #fff0e9; }
.arrow { color: var(--accent); }
.bottom-nav { background: rgba(255,255,255,.96); border-top-color: var(--line); box-shadow: 0 -5px 18px rgba(38,51,67,.05); }
.bottom-nav a { color: #9aa3af; }
.bottom-nav a.active { color: #c96345; }
.game-stage { background: #f2f5f8; border-color: var(--line); box-shadow: var(--shadow); }
.stage-ring { border-color: #f0c5b5; box-shadow: 0 0 0 11px #fff, 0 0 0 12px #f4d8ce; background: radial-gradient(circle,#fffaf7,#fff 70%); }
.stage-ring strong { color: var(--text); }
.result { background: #fff; }
.result p, .result-card p { color: var(--text); }
.profile-avatar { border-color: #d7dce4; color: #536071; background: #f2f5f8; }
.outline-btn { border-color: #efb4a2; color: #c96345; background: #fff; }
.menu-list, .menu-list a { border-color: var(--line); }
.menu-list a { color: var(--text); }
.menu-list span { color: var(--accent); }
.game-toolbar .back, .back, .icon-btn, .close-modal, .close-result { color: #536071; }
.pointer { color: #c96345; text-shadow: 0 2px 4px rgba(67,45,35,.15); }
.wheel { background: conic-gradient(#e9a28c 0 45deg,#b6b0dc 45deg 90deg,#f1c783 90deg 135deg,#9fcfc3 135deg 180deg,#e6a7bd 180deg 225deg,#a9c6de 225deg 270deg,#efbd91 270deg 315deg,#c2b5d9 315deg 360deg); border-color: #fff; box-shadow: 0 0 0 1px #d8dee7, 0 10px 30px rgba(42,57,75,.14); }
.wheel-core { background: #fff; border-color: #efb8a5; box-shadow: 0 4px 14px rgba(42,57,75,.12); }
.wheel-core span { color: var(--accent); }
.playing-card { filter: drop-shadow(0 12px 16px rgba(42,57,75,.10)); }
.card-front { background: linear-gradient(150deg,#fff8f4,#f6f1fb); border-color: #e7b09e; }
.card-front span { color: #c96345; }
.card-front strong { color: var(--text); }
.card-back { background: #f0effc; color: #7d72c7; border-color: #d8d4f4; }
.result-overlay, .modal { background: rgba(35,45,58,.28); }
.result-card, .modal-card { background: #fff; border-color: var(--line); box-shadow: 0 20px 50px rgba(35,45,58,.18); }
.result-action { color: #c96345; }
.result-actions { border-color: var(--line); }
.ghost-btn { background: #fff; border-color: #d8dee7; color: #536071; }
.ghost-btn:hover { background: #f2f5f8; }
.modal-card label, .settings-list label { border-color: var(--line); color: var(--text); }
.intensity button { background: #f2f5f8; border-color: var(--line); color: #536071; }
.intensity button.selected { background: #fff0e9; color: #c96345; border-color: #efb4a2; }
.loading span { border-color: #e4e9ef; border-top-color: var(--accent); }
.empty-icon { color: #b5beca; }
.membership-teaser { border-color: #ead8b7; background: #fffaf1; }
.membership-teaser strong { color: var(--text); }
.simple-page input { background: #fff; border-color: #d8dee7; color: var(--text); }
.simple-page select { background: #fff; border: 1px solid #d8dee7; border-radius: 10px; padding: 14px; color: var(--text); outline: 0; }
.simple-page select:focus { border-color: #eca68e; box-shadow: 0 0 0 3px #fff0e9; }
.auth-page .auth-link { color: #2878d4; font-weight: 600; }
.auth-page .math-captcha { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; color: #536071; font-size: 12px; }
.auth-page .math-captcha span { grid-column: 1 / -1; }
.auth-page .math-captcha input { width: 100%; }
.auth-page .code-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; align-items: end; }
.auth-page .code-row label { min-width: 0; }
.auth-page .code-btn { height: 46px; border: 1px solid #c8d8ed; border-radius: 10px; background: #eef5fd; color: #2878d4; font-size: 12px; cursor: pointer; white-space: nowrap; }
.auth-page .code-btn:disabled { color: #8d9bab; background: #f2f4f7; border-color: #e0e4ea; cursor: not-allowed; }
.simple-page input:focus { border-color: #eca68e; box-shadow: 0 0 0 3px #fff0e9; }
.vip-card { border-color: #ead8b7; background: linear-gradient(135deg,#fffaf1,#fff4ec); box-shadow: var(--shadow); }
.vip-star { color: #d99b42; }
.vip-card > strong { color: var(--text); }
.price b, .order-pay-card strong { color: #c96345; }
.benefits, .plan-card ul { color: #536071; }
.benefits li:before, .plan-card li:before { color: var(--success); }
.plan-card.recommended { border-color: #efb4a2; background: #fff8f3; }
.vip-active { background: #eaf7f0; color: #4f9b78; border-color: #bfe1ce; }
.flash-note { color: #a96523; background: #fff4e4; border-color: #f0d4a7; }
.dev-only > span { color: #d99348; }
.payment-qr-panel { margin: 22px auto 0; padding: 22px 18px; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.payment-qr-panel h2 { margin: 0; color: var(--ink); font-size: 19px; }
.payment-qr-image { display: block; width: 230px; height: 230px; max-width: 70cqw; object-fit: contain; }
.payment-qr-panel p { margin: 0; color: var(--muted); }
.payment-qr-panel small { color: var(--muted); }
.payment-result-icon { color: #4f9b78; }
/* Product polish: shared visual rhythm and desktop composition. */
:root { --accent-deep:#c96345; --ink-strong:#1f2b3d; --ink-soft:#5c6b7d; --focus-ring:0 0 0 3px rgba(228,127,95,.18); }
body { font-size:15px; }
.phone { border-inline:1px solid #edf0f4; }
.topbar { border-bottom:1px solid #f0f2f5; }
.brand { letter-spacing:-.4px; }
.hero { padding-top:42px; }
.hero h1,.game-head h1,.game-intro h1,.simple-page h1 { letter-spacing:-.8px; }
.hero-copy,.game-head p,.game-intro p,.page-copy { color:var(--ink-soft); }
.section-head { margin-bottom:16px; }
.game-card,.category-card,.wheel-card,.recommend,.membership-teaser,.plan-card,.order-pay-card { transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.game-card:hover,.category-card:hover,.wheel-card:hover,.recommend:hover,.plan-card:hover { transform:translateY(-2px); border-color:#efb4a2; box-shadow:0 12px 28px rgba(44,62,80,.12); }
.game-card:focus-visible,.category-card:focus-visible,.wheel-card:focus-visible,.primary-btn:focus-visible,.outline-btn:focus-visible,.back:focus-visible,.menu-list a:focus-visible,.bottom-nav a:focus-visible { outline:none; box-shadow:var(--focus-ring); }
.game-card,.category-card { background:linear-gradient(145deg,#fff,#fbfcfd); }
.game-card-top b,.category-card label { font-weight:700; }
.wheel-card-copy small { color:var(--ink-soft); }
.wheel-center-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.wheel-center-list .wheel-card { min-height:86px; }
.center-tabs { gap:30px; }
.center-tabs a { font-weight:600; }
.more-wheels { background:linear-gradient(120deg,#fffaf7,#fff); }
.primary-btn { min-height:46px; border-radius:12px; font-weight:750; }
.outline-btn,.ghost-btn { transition:background .18s ease,border-color .18s ease,transform .18s ease; }
.outline-btn:hover,.ghost-btn:hover { border-color:#e49a83; background:#fff8f3; transform:translateY(-1px); }
.menu-list a { min-height:62px; }
.menu-list a:hover { background:#fffaf7; }
.game-toolbar .back { transition:background .18s ease,border-color .18s ease; }
.game-toolbar .back:hover { background:#fff8f3; border-color:#efb4a2; }
.game-stage { border-radius:24px; }
.wheel-intro .live-result { color:var(--ink-strong); }
.wheel-intro .live-result:not(.has-result) { color:#8b97a6; font-size:clamp(16px,4cqw,20px); font-weight:600; }
.result-card,.modal-card,.access-card { border-radius:20px; }
.loading { min-height:260px; }
.message-card { border-radius:18px; box-shadow:0 8px 24px rgba(37,48,74,.06); }
.message-card>footer button:hover { color:var(--accent-deep); }
@media (min-width: 100000px) {
  body { padding:28px 0; }
  .phone { max-width:1180px; min-height:calc(100vh - 56px); padding-inline:56px; border-radius:28px; box-shadow:0 18px 60px rgba(36,49,67,.12); }
  .topbar { height:82px; }
  .hero { max-width:760px; padding:68px 0 56px; }
  .hero h1 { font-size:64px; }
  .hero-copy { max-width:520px; font-size:17px; }
  .category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
  .game-scroller { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:visible; gap:16px; }
  .game-card { min-width:0; min-height:180px; }
  .wheel-center-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .wheel-wrap { width:min(58cqw,560px); }
  .bottom-nav { max-width:1180px; border-radius:0 0 28px 28px; padding-inline:140px; }
  .game-intro { max-width:700px; margin-inline:auto; }
  .game-stage { max-width:760px; margin-inline:auto; }
  .simple-page,.center-page,.messages-page { max-width:860px; margin-inline:auto; }
  .messages-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container front (max-width: 600px) { .wheel-center-list { grid-template-columns:1fr; } }

/* Desktop browser: preserve the phone-sized composition, let the page itself scroll,
   and keep the bottom navigation attached to the browser viewport. */
@media (min-width: 100000px) {
  html, body { min-height:100%; }
  body { display:block; width:100%; height:auto; min-height:100vh; padding:16px 0 92px; overflow-x:hidden; overflow-y:auto; }
  #app { width:min(600px, calc(100cqw - 32px)); max-width:600px; height:auto; min-height:0; max-height:none; aspect-ratio:auto; margin:0 auto; }
  .phone { width:100%; max-width:none; height:auto; min-height:100vh; max-height:none; margin:0; overflow:visible; border-radius:26px; box-shadow:0 12px 50px rgba(36,49,67,.12); }
  .bottom-nav { position:fixed; left:50%; bottom:0; transform:translateX(-50%); width:min(600px, calc(100cqw - 32px)); max-width:600px; border-radius:0 0 26px 26px; }
}
@media (prefers-reduced-motion:reduce) { .game-card,.category-card,.wheel-card,.recommend,.plan-card,.outline-btn,.ghost-btn,.game-toolbar .back { transition:none; } }
@media (min-width: 100000px) { .phone { box-shadow: 0 12px 50px rgba(36,49,67,.12); } }

/* Focused wheel layout: the wheel is the page's visual center on phones. */
.game-shell.wheel-page, .game-shell { background: #fff; }
.game-toolbar { padding-top: max(18px, env(safe-area-inset-top)); min-height: 50px; }
.game-toolbar .back { font-size: 25px; line-height: 1; margin: 0; padding: 6px 10px 6px 0; }
.game-toolbar .icon-btn { font-size: 21px; letter-spacing: 3px; line-height: 1; padding: 6px 0 6px 10px; }
.wheel-intro { padding: 10px 0 10px; text-align: center; }
.wheel-intro .pill { margin-bottom: 8px; }
.wheel-intro h1 { font-size: clamp(28px, 8cqw, 36px); margin: 4px 0 8px; }
.play-title { position: relative; }
.play-title-icon { position: absolute; z-index: 2; left: 50%; top: 0; transform: translate(-50%, -60%); display: grid; place-items: center; width: 52px; height: 52px; font-size: 44px; line-height: 1; pointer-events: none; }
.live-result { min-height: 34px; color: var(--accent); font-size: clamp(22px, 6cqw, 30px); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.wheel-intro p { margin: 8px auto 0; max-width: 300px; }
.wheel-intro .session-count { display: block; margin-top: 6px; }
.wheel-stage { background: #fff; border: 0; box-shadow: none; padding: 8px 0 0; overflow: visible; }
.wheel-wrap { height: auto; aspect-ratio: 1; width: min(90cqw, 390px); margin: 2px auto 0; display: grid; place-items: center; position: relative; }
.wheel { position: relative; width: 100%; height: 100%; max-width: none; border: 9px solid #fff; box-shadow: 0 0 0 1px #d8dee7, 0 14px 28px rgba(42,57,75,.14); overflow: visible; }
.wheel-label { position: absolute; z-index: 1; left: 50%; top: 50%; width: 76px; text-align: center; color: #273142; font-size: clamp(10px, 2.8cqw, 13px); line-height: 1.25; font-weight: 700; white-space: normal; overflow-wrap: anywhere; pointer-events: none; transform: translate(-50%,-50%) rotate(var(--angle)) translateY(clamp(-124px, -27cqw, -76px)) rotate(var(--counter-angle)); }
.pointer { top: -8px; color: #c96345; font-size: 25px; text-shadow: none; }
.wheel-core { width: clamp(78px, 22cqw, 100px); height: clamp(78px, 22cqw, 100px); position: relative; z-index: 2; }
.wheel-core button { width: 100%; height: 100%; border: 0; border-radius: 50%; background: #e47f5f; color: #fff; font-size: clamp(22px, 6cqw, 30px); font-weight: 800; cursor: pointer; box-shadow: 0 5px 14px rgba(228,127,95,.3); }
.wheel-core button:disabled { opacity: .6; cursor: wait; }
.stage-hint { margin: 12px 0 8px; }
.round-info { margin-top: 12px; }
.reset-wheel { display: block; margin: 18px auto 0; min-width: 100px; padding: 9px 18px; border: 1px solid #d8dee7; border-radius: 999px; background: #fff; color: #536071; font-size: 12px; cursor: pointer; }
.reset-wheel:hover { border-color: #efb4a2; color: #c96345; background: #fff8f3; }
.game-shell .safety { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
@container front (max-width: 430px) { .wheel-wrap { width: min(90cqw, 390px); } .wheel-label { width: 66px; } }
@container front (max-width: 370px) { .wheel-label { width: 58px; font-size: 10px; } .wheel-core { width: 76px; height: 76px; } }

/* Single home and wheel-center structure */
.my-wheels, .center-page { padding: 4px 0 calc(88px + env(safe-area-inset-bottom)); }
.my-wheel-list, .wheel-center-list { display: grid; gap: 12px; }
.wheel-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.wheel-card-main { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.wheel-cover { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: 22px; }
.wheel-cover.c0 { background: #e49a83; }.wheel-cover.c1 { background: #9b92cf; }.wheel-cover.c2 { background: #e5b86e; }.wheel-cover.c3 { background: #80bdae; }.wheel-cover.c4 { background: #d990af; }.wheel-cover.c5 { background: #8db2d0; }
.wheel-card-copy { min-width: 0; display: grid; gap: 4px; }.wheel-card-copy strong { font-size: 15px; color: var(--text); }.wheel-card-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.wheel-meta { display: flex; gap: 5px; flex-wrap: wrap; }.wheel-meta span { border-radius: 999px; padding: 2px 6px; color: #c96345; background: #fff0e9; font-size: 10px; }.wheel-meta span:nth-child(2) { color: #7d72c7; background: #f0effc; }
.add-wheel { flex: none; border: 1px solid #efb4a2; border-radius: 999px; padding: 7px 10px; background: #fff8f3; color: #c96345; font-size: 11px; white-space: nowrap; }.add-wheel.added,.add-wheel:disabled { border-color: #bfe1ce; background: #eaf7f0; color: #4f9b78; cursor: default; }
.more-wheels { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 15px; border: 1px dashed #efb4a2; border-radius: 14px; color: var(--text); text-decoration: none; background: #fffaf7; }.more-wheels span { display: grid; gap: 4px; }.more-wheels strong { font-size: 14px; }.more-wheels small { color: var(--muted); font-size: 11px; }.more-wheels b { color: var(--accent); font-size: 20px; }
.center-page .page-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }.center-page .page-title h1 { margin: 0; font-size: 27px; }.center-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 15px; }.center-tabs a { position: relative; padding: 10px 2px; color: var(--muted); text-decoration: none; font-size: 14px; }.center-tabs a.active { color: var(--accent); font-weight: 700; }.center-tabs a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }


/* Home tagline single-line fix */
.hero-copy { max-width: none; white-space: nowrap; font-size: clamp(14px, 4.25cqw, 17px); letter-spacing: -0.25px; }


/* Icon and control polish v1 */
.avatar { width: 44px; height: 44px; border: 1px solid #c8d2df; border-radius: 14px; color: #294766; background: #f7f9fc; box-shadow: 0 3px 10px rgba(44,62,80,.08); }
.avatar svg { width: 23px; height: 23px; display: block; }
.bottom-nav { padding: 4px 24px calc(4px + env(safe-area-inset-bottom)); }
.bottom-nav a { min-width: 64px; min-height: 57px; gap: 3px; font-size: 15px; font-weight: 650; }
.bottom-nav b.nav-icon { width: 32px; height: 32px; display: grid; place-items: center; font-size: 0; }
.bottom-nav b.nav-icon svg { width: 25px; height: 25px; display: block; }
.game-toolbar .back { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; padding: 8px 13px 8px 7px; border: 1px solid #d9e0e8; border-radius: 13px; background: #f7f9fc; color: #294766; font-size: 15px; font-weight: 700; }
.game-toolbar .back svg { width: 22px; height: 22px; display: block; }
.game-toolbar .icon-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid #d9e0e8; border-radius: 13px; background: #f7f9fc; color: #294766; font-size: 0; box-shadow: 0 3px 10px rgba(44,62,80,.06); }
.game-toolbar .icon-btn svg { width: 22px; height: 22px; display: block; }
.game-toolbar .icon-btn.settings-more { font-size: 25px; letter-spacing: 4px; line-height: 1; padding-left: 4px; }
.wheel-card { padding: 14px; gap: 12px; border-color: #d4dde8; box-shadow: 0 8px 20px rgba(44,62,80,.08); }
.wheel-cover { width: 54px; height: 54px; border-radius: 14px; font-size: 24px; }
.wheel-card-copy strong { font-size: 16px; font-weight: 600; }
.wheel-card-copy small { font-size: 12px; color: #566579; }
.add-wheel { min-height: 42px; padding: 8px 14px; border-color: #e49a83; background: #fff7f2; color: #ad4f35; font-size: 13px; font-weight: 700; }
.add-wheel.added { border-color: #9ed1b6; background: #eaf7f0; color: #317b59; cursor: pointer; }
.add-wheel.remove-wheel { border-color: #d4dde8; background: #fff; color: #566579; }
.add-wheel:disabled { border-color: #e1e5eb; background: #f6f7f9; color: #8792a2; cursor: not-allowed; }
.add-wheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wheel-save-error { position: fixed; z-index: 2000; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%); width: max-content; max-width: calc(100cqw - 40px); padding: 12px 16px; border-radius: 12px; background: #333; color: #fff; font-size: 14px; line-height: 1.6; box-shadow: 0 4px 16px #0002; }
.profile-avatar { width: 88px; height: 88px; border-radius: 24px; background: #f3f7fb; border-color: #cbd6e2; color: #294766; box-shadow: 0 8px 20px rgba(44,62,80,.08); }
.profile-avatar svg { width: 42px; height: 42px; display: block; }
.menu-list a { min-height: 72px; gap: 13px; font-weight: 650; }
.menu-list .menu-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: #fff3ed; color: #b65338; }
.menu-list .menu-icon svg { width: 21px; height: 21px; display: block; }
.menu-list i { font-size: 27px; font-weight: 650; color: #536071; }
.membership-teaser { border-color: #e7cdb5; background: #fff8ef; box-shadow: 0 8px 20px rgba(127,91,46,.07); }
.membership-teaser a { font-weight: 700; color: #ad4f35; white-space: nowrap; }
.outline-btn { min-height: 46px; padding: 12px 24px; font-weight: 700; }
.bottom-nav a.active { color: #ad4f35; }
.bottom-nav a:not(.active) { color: #566579; }


/* Reference-matched fixed-shell wheel: only the colored face and its labels rotate. */
.wheel-intro { padding: clamp(90px, 15vh, 140px) 0 0; text-align: center; }
.wheel-title-card { position: relative; display: table; box-sizing: border-box; min-width: 168px; max-width: 100%; margin: 0 auto; padding: 25px 24px 14px; border-radius: 24px; background: #eeedf4; }
.wheel-title-card h1 { max-width: min(78cqw, 420px); margin: 0; overflow: hidden; color: #0758d8; font-size: clamp(28px, 7.4cqw, 40px); font-weight: 600; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.wheel-title-icon { position: absolute; z-index: 4; top: -31px; left: 50%; display: grid; width: 54px; height: 54px; place-items: center; transform: translateX(-50%); font-size: 46px; line-height: 1; }
.wheel-intro .live-result { display: -webkit-box; height: 62px; min-height: 62px; max-width: 94%; margin: 21px auto 0; padding: 0 7px; overflow: hidden; color: #111; font-size: clamp(27px, 7cqw, 36px); font-weight: 700; line-height: 1.22; text-align: center; text-overflow: ellipsis; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wheel-intro .live-result.has-result { font-size: clamp(15px, 4.3cqw, 21px); font-weight: 600; }
.wheel-stage { padding: clamp(42px, 7.5vh, 72px) 0 0; }
.wheel-wrap { display: grid; width: min(90cqw, 430px, calc(100cqw - 40px)); height: auto; aspect-ratio: 1; margin: 0 auto; place-items: center; position: relative; }
.wheel-frame { position: relative; width: 100%; height: 100%; aspect-ratio: 1; overflow: visible; border: 0; border-radius: 50%; background: #f0eff5; box-shadow: 0 10px 28px rgba(42,57,75,.17), 0 0 0 1px rgba(214,216,226,.9); }
.wheel-rotor { position: absolute; inset: 9px; overflow: hidden; border-radius: 50%; transform: rotate(0deg); transform-origin: 50% 50%; will-change: transform; }
.wheel-rotor::after { position: absolute; z-index: 2; inset: 0; border-radius: 50%; background: var(--wheel-dim, transparent); content: ''; pointer-events: none; transition: none !important; }
.wheel-label { position: absolute; z-index: 1; top: calc(50% + var(--label-y)); left: calc(50% + var(--label-x)); display: block; width: var(--label-length); height: var(--label-size); overflow: hidden; transform: rotate(var(--label-angle)); transform-origin: 0 50%; color: #fff; font-size: var(--label-size); font-weight: 600; line-height: 1; text-align: left; text-shadow: 0 1px 2px rgba(20,25,35,.4); white-space: nowrap; pointer-events: none; }
.wheel-pointer { position: absolute; z-index: 4; top: 25%; left: 50%; width: 14%; height: 15%; transform: translateX(-50%); background: #fff; clip-path: polygon(50% 0, 0 100%, 100% 100%); filter: drop-shadow(0 1px 1px rgba(80,85,100,.08)); pointer-events: none; }
.wheel-core { position: absolute; z-index: 5; top: 50%; left: 50%; display: grid; width: 24%; aspect-ratio: 1; padding: 0; place-items: center; transform: translate(-50%,-50%); border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(42,57,75,.12); cursor: pointer; }
.wheel-spin-ring { display: block; width: 60%; aspect-ratio: 1; border: clamp(5px, 1.7cqw, 8px) solid #d2d2d2; border-radius: 50%; }
.wheel-core:disabled { opacity: 1; cursor: wait; }
.reset-wheel { margin-top: 18px; }
@container front (max-width: 370px) { .wheel-title-card { min-width: 150px; padding-right: 18px; padding-left: 18px; } .wheel-stage { padding-top: clamp(34px, 6vh, 52px); } .wheel-label { font-weight: 500; } }

/* Shared detail-page controls: wheels and dice use the same three-button rail. */
.wheel-action-bar { width: min(90cqw, 430px, calc(100cqw - 40px)); margin: 18px auto 0; padding: 0 18px; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.wheel-settings-trigger, .wheel-edit-trigger { width: 54px; height: 54px; display: grid; place-items: center; padding: 0; border: 1px solid #e0e3e7; border-radius: 50%; background: #fff; color: #c96345; box-shadow: 0 3px 12px rgba(42,57,75,.08); cursor: pointer; }
.wheel-settings-trigger { justify-self: start; }
.wheel-edit-trigger { justify-self: end; }
.wheel-settings-trigger svg, .wheel-edit-trigger svg { width: 29px; height: 29px; display: block; }
.wheel-settings-trigger svg circle { fill: currentColor; stroke: none; }
.wheel-edit-trigger svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wheel-action-bar .reset-wheel { min-width: 150px; margin: 0; padding: 12px 22px; border-color: #e0e3e7; color: #c96345; font-size: 16px; font-weight: 650; box-shadow: 0 3px 12px rgba(42,57,75,.05); }
.game-toolbar { position: relative; z-index: 20; }
.light-tool-switcher-menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(210px, calc(100cqw - 48px)); overflow: hidden; border: 1px solid #e0e3e7; border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: 0 15px 32px rgba(42,57,75,.16); }
.light-tool-switcher-menu[hidden] { display: none; }
.light-tool-switcher-item { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 13px; border-bottom: 1px solid #edf0f3; color: #17181b; font-size: 15px; text-decoration: none; }
.light-tool-switcher-item:last-child { border-bottom: 0; }
.light-tool-switcher-item:hover, .light-tool-switcher-item:focus-visible { background: #f6f8fb; outline: 0; }
.light-tool-switcher-item b { display: grid; min-width: 28px; min-height: 24px; place-items: center; border-radius: 8px; background: #111; color: #fff; font-size: 14px; font-weight: 750; }
.light-tool-switcher-item:first-child b { width: 22px; min-width: 22px; height: 22px; border-radius: 50%; font-size: 14px; }
.light-tool-switcher-item:last-child b { background: transparent; color: #111; font-size: 21px; }
.light-tool-menu-open .light-tool-switcher-trigger { border-color: #b9c8dc; background: #eef3f9; }
.wheel-settings-trigger:hover, .wheel-edit-trigger:hover, .wheel-action-bar .reset-wheel:hover { border-color: #efb4a2; color: #ad4f35; background: #fff8f3; }
.wheel-pointer { top: 32.5%; width: 7%; height: 7.5%; }

/* Restore the confirmed detail-page hierarchy: compact title, readable result,
   and real bottom sheets for settings and editing. */
.wheel-intro { padding: clamp(48px, 8vh, 76px) 0 0; }
.wheel-title-card { min-width: 132px; padding: 14px 20px 10px; border-radius: 18px; }
.wheel-title-card h1 { max-width: min(74cqw, 360px); font-size: clamp(22px, 5.5cqw, 30px); line-height: 1.2; }
.wheel-title-icon { top: -25px; width: 44px; height: 44px; font-size: 37px; }
.wheel-intro .live-result { display: block; height: 78px; min-height: 78px; max-width: min(90cqw, 500px); margin: 17px auto 0; padding: 0 12px; color: #171717; font-size: clamp(29px, 7cqw, 40px); font-weight: 700; line-height: 1.28; text-align: center; white-space: normal; overflow: hidden; overflow-wrap: anywhere; }
.wheel-intro .live-result.has-result { height: 78px; min-height: 78px; font-size: clamp(24px, 6.2cqw, 34px); font-weight: 650; line-height: 1.12; }
.wheel-intro .live-result.short-result { font-size: clamp(29px, 7cqw, 40px); }
.wheel-stage { padding-top: clamp(36px, 6vh, 60px); }
.wheel-stage { transform: translateY(26px); }

.wheel-sheet-overlay, .wheel-editor-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.wheel-sheet-overlay[hidden] { display: none; }
.wheel-sheet-backdrop, .wheel-editor-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; background: rgba(26,31,40,.34); opacity: 0; cursor: default; transition: opacity .22s ease; }
.wheel-sheet-overlay.open .wheel-sheet-backdrop, .wheel-editor-overlay.open .wheel-editor-backdrop { opacity: 1; }
.wheel-settings-sheet, .wheel-editor-sheet { position: relative; z-index: 1; width: min(600px,100%); max-height: min(82vh,680px); box-sizing: border-box; padding: 14px 20px calc(22px + env(safe-area-inset-bottom)); border: 1px solid #e1e4e8; border-bottom: 0; border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -12px 36px rgba(35,45,58,.16); transform: translateY(105%); transition: transform .24s ease; }
.wheel-settings-sheet { overflow: hidden auto; }
.wheel-editor-sheet { display: flex; flex-direction: column; height: min(82vh,680px); max-height: min(82vh,680px); overflow: hidden; }
.wheel-sheet-overlay.open .wheel-settings-sheet, .wheel-editor-overlay.open .wheel-editor-sheet { transform: translateY(0); }
.wheel-sheet-heading { padding: 0 0 12px; text-align: center; }
.wheel-sheet-handle, .wheel-editor-handle { width: 100%; height: 18px; display: grid; place-items: start center; }
.wheel-sheet-handle span, .wheel-editor-handle span { display: block; width: 42px; height: 4px; border-radius: 4px; background: #d2d6dc; }
.wheel-sheet-heading h2 { margin: 4px 0 0; color: #202735; font-size: 19px; }
.wheel-sheet-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 2px 0 16px; }
.wheel-sheet-shortcuts button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; border: 1px solid #e2e6eb; border-radius: 12px; background: #fafbfc; color: #536071; font: inherit; }
.wheel-shortcut-icon { display: grid; place-items: center; width: 22px; height: 22px; color: #c96345; }
.wheel-shortcut-icon svg { width: 20px; height: 20px; }
.wheel-settings-list { display: grid; gap: 10px; }
.wheel-setting-group { padding: 12px 0; border-top: 1px solid #edf0f3; }
.wheel-setting-row { display: flex; align-items: center; gap: 10px; }
.wheel-setting-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #c96345; }
.wheel-setting-icon svg { width: 21px; height: 21px; }
.wheel-setting-label { flex: 1; color: #273142; font-size: 14px; font-weight: 650; }
.wheel-setting-description { margin: 5px 0 0 38px; color: #8993a0; font-size: 11px; line-height: 1.45; }
.wheel-switch { position: relative; width: 42px; height: 24px; padding: 0; border: 0; border-radius: 99px; background: #d8dde4; }
.wheel-switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(35,45,58,.2); content: ''; transition: transform .18s ease; }
.wheel-switch[aria-checked="true"] { background: #e47f5f; }
.wheel-switch[aria-checked="true"]::after { transform: translateX(18px); }
.wheel-editor-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 12px; }
.wheel-editor-head button { border: 0; background: transparent; color: #536071; font: inherit; }
.wheel-editor-head .save { color: #c96345; font-weight: 700; }
.wheel-editor-sheet > :not(.wheel-editor-list-scroll) { flex: 0 0 auto; }
.wheel-editor-list-scroll { flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.wheel-editor-list { display: grid; gap: 9px; }
.wheel-editor-row { display: flex; align-items: center; gap: 8px; }
.wheel-editor-index { flex: 0 0 28px; color: #8993a0; font-size: 12px; text-align: center; }
.wheel-editor-input { flex: 1; min-width: 0; padding: 10px 11px; border: 1px solid #e0e4e9; border-radius: 9px; outline: none; color: #273142; background: #fff; font: inherit; }
.wheel-editor-input:focus { border-color: #efb4a2; box-shadow: 0 0 0 3px rgba(228,127,95,.12); }
.wheel-editor-delete { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #fff2ee; color: #c96345; font-size: 19px; }
.wheel-editor-add, .wheel-editor-restore { width: 100%; min-height: 42px; border: 1px dashed #e0a28f; border-radius: 10px; background: #fffaf7; color: #b65338; font: inherit; }
.wheel-editor-restore { border-style: solid; border-color: #e2e6eb; background: #fff; color: #536071; }
.wheel-editor-error { margin: 0 0 10px; color: #c25555; font-size: 12px; }

/* Card games share the wheel detail-page shell; only the center component differs. */
.card-stage { transform: translateY(26px); }
.card-stage .card-wrap { width: min(72cqw, 270px); height: clamp(300px, 76cqw, 350px); margin: 0 auto; display: grid; place-items: center; perspective: 900px; }
.card-stage .playing-card { width: min(58cqw, 210px); height: min(76cqw, 292px); max-height: 310px; }
.card-round-result { font-size: clamp(21px, 5.2cqw, 29px) !important; font-weight: 600 !important; white-space: nowrap !important; }
.card-stage .wheel-action-bar { margin-top: 18px; }
.wheel-editor-head { position: relative; }
.wheel-editor-title { position: absolute; left: 50%; margin: 0; transform: translateX(-50%); color: #202735; font-size: 17px; font-weight: 700; white-space: nowrap; }
.card-result-overlay .result-card { width: min(82cqw, 330px); padding: 24px 18px 18px; transform: translateY(25%); }
.card-result-overlay .result-actions { margin-top: 14px; padding-top: 0; border-top: 0; }
.card-result-overlay .result-actions .primary-btn { min-width: 140px; justify-content: center; }
@container front (max-width: 370px) { .card-stage .card-wrap { height: 300px; } .card-stage .playing-card { width: 168px; height: 226px; } }
@container front (max-width: 430px) { .wheel-settings-sheet, .wheel-editor-sheet { padding-right: 16px; padding-left: 16px; } }

/* Static 12-sided dice: faceted dodecahedron floating above a fixed bar dice tray. */
.dice-stage { width: min(90cqw, 430px, calc(100cqw - 40px)); height: clamp(350px, 88cqw, 410px); margin: 0 auto; position: relative; display: flex; flex-direction: column; align-items: center; }
.dice-assembly { position: relative; width: 100%; height: 318px; flex: none; display: flex; justify-content: center; align-items: flex-start; }
.dice-scene { position: absolute; z-index: 2; top: 0; left: 50%; width: min(61%, 250px); height: 224px; transform: translateX(-50%); pointer-events: none; }
.dice-canvas { display: block; width: 100%; height: 100%; overflow: visible; }
.dice-scene { pointer-events: auto; cursor: pointer; }
.dice-pedestal { position: absolute; z-index: 1; left: 50%; bottom: 0; width: 88%; height: 82px; transform: translateX(-50%); box-sizing: border-box; border: 7px solid #292929; border-radius: 50%; background: radial-gradient(ellipse at 50% 24%,#3b3b3b 0%,#252525 58%,#151515 100%); box-shadow: inset 0 7px 7px rgba(255,255,255,.1), inset 0 -9px 14px rgba(0,0,0,.8), 0 15px 24px rgba(28,26,24,.28); }
.dice-pedestal::before { position: absolute; inset: -7px; border: 2px solid #555; border-radius: inherit; content: ''; pointer-events: none; }
.dice-pedestal-inner { position: absolute; inset: 12% 7% 16%; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; background: radial-gradient(ellipse at 50% 30%,#292929,#151515 72%); box-shadow: inset 0 3px 10px #080808; }
.dice-pedestal-inner::after { position: absolute; inset: 15% 18%; border-radius: 50%; background: radial-gradient(ellipse,rgba(0,0,0,.52),transparent 68%); content: ''; }
.dice-hint { position: absolute; bottom: 0; margin: 0; color: #929292; font-size: 14px; text-align: center; }
.dice-loading-stage { opacity: .98; }
.dice-loading-scene { display: grid; place-items: center; }
.dice-loading-face { width: 118px; height: 118px; display: grid; place-items: center; box-sizing: border-box; border: 2px solid #b7b3ab; border-radius: 24px; color: #6e6a64; background: linear-gradient(145deg,#fffefa,#e8e4db); box-shadow: 8px 10px 0 rgba(76,70,62,.12), inset 0 2px 5px rgba(255,255,255,.9); font-size: 30px; font-weight: 800; letter-spacing: 0; animation: dice-loading-pulse 1.35s ease-in-out infinite; }
@keyframes dice-loading-pulse { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.game-stage.wheel-stage:has(.dice-stage) { padding-top: clamp(42px,7.5vh,72px); }
.card-loading { cursor: progress; opacity: .82; }
.card-loading .card-front strong { color: #8f8b84; }
.card-loading .card-front small { color: #a19c94; }
.dice-editor-note { margin: 8px 0 12px; color: #7d8795; font-size: 12px; }
.wheel-editor-row:has([data-dice-input]) { display: flex; align-items: center; }
.wheel-editor-row:has([data-dice-input]) .wheel-editor-input { flex: 1; min-width: 0; }
@container front (max-width: 370px) { .dice-stage { height: 350px; } .dice-assembly { height: 304px; } .dice-scene { width: 64%; height: 214px; } .dice-pedestal { height: 76px; } }

/* Card draw animation and result readability. */
.card-stage .playing-card .card-front strong,.card-stage .playing-card .card-back{padding:0 15px;text-align:center;line-height:1.28;overflow-wrap:anywhere;word-break:break-word}.card-stage .playing-card .card-front strong{font-size:clamp(15px,4.3cqw,24px)}.card-stage .playing-card.card-draw-shuffling{transition:transform .14s cubic-bezier(.2,.7,.2,1);pointer-events:none}

/* Local per-game history sheet and profile history summary. */
.game-history-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.game-history-overlay { opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.game-history-overlay.open { opacity: 1; pointer-events: auto; }
.game-history-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: rgba(26,31,40,.34); cursor: default; }
.game-history-sheet { position: relative; z-index: 1; width: min(600px,100%); height: 90vh; max-height: 90vh; overflow: hidden auto; box-sizing: border-box; padding: 58px 20px calc(22px + env(safe-area-inset-bottom)); border: 1px solid #e1e4e8; border-bottom: 0; border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -12px 36px rgba(35,45,58,.16); transform: translateY(105%); transition: transform .24s ease; }
.game-history-overlay.open .game-history-sheet { transform: translateY(0); }
.game-history-close { position: absolute; top: 12px; right: 16px; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #536071; font-size: 28px; line-height: 1; cursor: pointer; }
.game-history-list { display: grid; gap: 0; }
.history-record { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 13px 2px; border-bottom: 1px solid #edf0f3; color: #273142; text-decoration: none; }
.history-record-copy { display: grid; flex: 1; min-width: 0; gap: 5px; }
.history-record-game { font-size: 13px; color: #273142; }
.history-record-result { overflow-wrap: anywhere; color: #273142; font-size: 14px; line-height: 1.45; }
.history-record-time { color: #8993a0; font-size: 11px; }
.history-record-arrow { color: #9aa3af; font-size: 21px; font-weight: 400; }
.game-history-empty { padding: 80px 10px; color: #8993a0; font-size: 13px; text-align: center; }
.history-page h1 { margin-bottom: 22px; }
.history-summary-list { border-top: 1px solid var(--line); }
.history-summary-list .history-record { min-height: 82px; }
@container front (max-width: 430px) { .game-history-sheet { padding-right: 16px; padding-left: 16px; } }


/* Desktop app viewport: keep the mobile layout bounded and centered. */
@media (min-width: 100000px) {
  html, body { min-height: 100%; }
  body {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    padding: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #app {
    width: min(600px, calc(100cqw - 32px), calc((100dvh - 32px) * .6666667));
    aspect-ratio: 2 / 3;
    height: auto;
    max-height: calc(100dvh - 32px);
  }
  .phone {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    container-type: size;
    border-radius: 26px;
    box-shadow: 0 12px 50px rgba(36,49,67,.12);
  }
  .bottom-nav {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
  }
  .result-overlay, .modal { position: absolute; }
  .wheel-intro { padding-top: clamp(44px, 8cqh, 76px); }
  .wheel-stage { padding-top: clamp(34px, 6cqh, 60px); }
  .wheel-wrap, .wheel-action-bar, .dice-stage { width: min(90%, 430px); }
  .card-stage .card-wrap { height: clamp(300px, 42cqh, 350px); }
  .dice-stage { height: clamp(350px, 52cqh, 410px); }
  .game-stage.wheel-stage:has(.dice-stage) { padding-top: clamp(34px, 6cqh, 60px); }
  .wheel-settings-sheet { max-height: min(82cqh, 680px); }
  .wheel-editor-sheet { height: min(82cqh, 680px); max-height: min(82cqh, 680px); }
}


/* Route scroll and personal-center subpage header fixes. */
.profile-subpage .subpage-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 -20px;
  padding: max(10px, env(safe-area-inset-top)) 20px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.profile-subpage .subpage-topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.profile-subpage .subpage-back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  min-height: 40px;
  color: #536071;
  font-size: 14px;
  font-weight: 650;
}
.profile-subpage .subpage-back svg { width: 20px; height: 20px; display: block; }
.profile-subpage .subpage-topbar-spacer { min-width: 44px; }
.profile-subpage .simple-page { padding-top: 16px; }
.profile-subpage .simple-page > .back { display: none; }
.profile-subpage:not(.profile-subpage-order-detail) .simple-page > .eyebrow,
.profile-subpage:not(.profile-subpage-order-detail) .simple-page > h1 { display: none; }
@container front (max-width: 600px) {
  .profile-subpage .subpage-topbar { margin-left: -20px; margin-right: -20px; }
}

/* Readability tuning for the main app surfaces. */
.hero { padding: 32px 0 44px; }
.hero-copy {
  max-width: 100%;
  white-space: normal;
  font-size: clamp(15px, 4.5cqw, 18px);
  line-height: 1.55;
  letter-spacing: 0;
}
.my-wheels .section-head h2 { font-size: clamp(22px, 5.8cqw, 30px); }
.my-wheels .section-head .muted { font-size: 13px; }
.wheel-card { padding: 15px; gap: 13px; }
.wheel-cover { width: 58px; height: 58px; border-radius: 15px; font-size: 25px; }
.wheel-card-copy { gap: 5px; }
.wheel-card-copy strong { font-size: 17px; line-height: 1.25; }
.wheel-card-copy small { font-size: 13px; line-height: 1.4; }
.wheel-meta span { padding: 3px 7px; font-size: 11px; }
.add-wheel { min-height: 44px; padding: 9px 15px; font-size: 14px; }
.more-wheels { margin-top: 16px; padding: 16px; }
.more-wheels strong { font-size: 15px; }
.more-wheels small { font-size: 12px; }

.center-page .page-title h1 { font-size: clamp(29px, 6.2cqw, 32px); }
.center-tabs { gap: 24px; margin-bottom: 17px; }
.center-tabs a { padding: 11px 2px; font-size: 15px; }
.center-page .wheel-center-list { grid-template-columns:minmax(0,1fr); gap: 14px; }
.center-page .center-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.center-page .center-tabs a { position:relative; display:grid; min-width:0; min-height:44px; place-items:center; padding:0 4px; color:#8792a2; font-size:15px; font-weight:650; line-height:1.25; text-align:center; }
.center-page .center-tabs a.active { color:#c96345; }
.center-page .center-tabs a.active::after { left:18%; right:18%; bottom:-1px; height:3px; border-radius:3px; background:#df7959; }

.profile-head { padding: 32px 0 36px; }
.profile-head h1 { font-size: 26px; line-height: 1.2; }
.profile-head p { font-size: 13px; margin-bottom: 22px; }
.membership-teaser { padding: 18px; margin-bottom: 28px; }
.membership-teaser span, .membership-teaser small { font-size: 12px; }
.membership-teaser strong { font-size: 20px; }
.membership-teaser a { font-size: 13px; }
.menu-list a { min-height: 76px; gap: 14px; font-size: 15.5px; }
.menu-list .menu-icon { width: 40px; height: 40px; flex-basis: 40px; }
.menu-list .menu-icon svg { width: 22px; height: 22px; }
.menu-list i { font-size: 28px; }

.profile-subpage .subpage-topbar { min-height: 64px; }
.profile-subpage .subpage-topbar h1 { font-size: 18px; }
.profile-subpage .subpage-back { font-size: 15px; }

@container front (max-width: 370px) {
  .hero-copy { font-size: 15px; }
  .wheel-card { padding: 13px; gap: 10px; }
  .wheel-cover { width: 54px; height: 54px; font-size: 23px; }
  .wheel-card-copy strong { font-size: 16px; }
  .wheel-card-copy small { font-size: 12px; }
  .add-wheel { padding-right: 12px; padding-left: 12px; font-size: 13px; }
  .menu-list a { min-height: 72px; font-size: 15px; }
}
/* Route shells stay visible while data or optional play modules arrive. */
.home-list-placeholder,.profile-menu-placeholder{background:linear-gradient(90deg,#f4f5f7 25%,#fafafa 37%,#f4f5f7 63%);background-size:400% 100%;animation:route-skeleton 1.4s ease infinite;border-radius:14px}.home-list-placeholder{display:grid;gap:10px;padding:6px 0}.home-list-placeholder span{height:66px;border-radius:14px;background:#f3f4f6}.profile-menu-placeholder{height:58px;margin-bottom:10px}.route-blank-loading{min-height:calc(100dvh - 150px);background:#fff}.route-initial-blank{width:100%;height:100%;min-height:100dvh;background:#fff}.game-route-blank-loading{min-height:calc(100dvh - 120px)}.profile-loading{min-height:190px}@keyframes route-skeleton{0%{background-position:100% 0}100%{background-position:-100% 0}}
:root{--announcement-overlay:rgba(24,19,28,.62)}
.announcement-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:var(--announcement-overlay)}
.announcement-backdrop{position:absolute;inset:0;border:0;background:transparent;cursor:pointer}
.announcement-card{position:relative;width:min(520px,100%);max-height:min(78vh,680px);display:flex;flex-direction:column;overflow:hidden;border-radius:22px;background:#fffaf7;box-shadow:0 24px 80px #17141955;color:#30252b;animation:announcement-in .2s ease-out}
.announcement-card header{padding:22px 24px 14px;border-bottom:1px solid #f0e1da}.announcement-card h2{margin:0;font-size:21px}.announcement-content{padding:20px 24px;overflow:auto;font-size:15px;line-height:1.75}.announcement-content p{margin:0 0 12px}.announcement-content img{max-width:100%;height:auto;border-radius:10px}.announcement-content a{color:#c96345}.announcement-confirm{align-self:center;justify-content:center;min-width:0;width:auto;margin:0 0 22px}
@keyframes announcement-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
.install-home-entry{width:100%;min-height:64px;display:flex;align-items:center;gap:12px;margin:-16px 0 26px;padding:11px 13px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);text-align:left;cursor:pointer}
.install-home-icon{width:38px;height:38px;display:grid;place-items:center;flex:none;border-radius:11px;background:#3a2b30;color:#f0a181}.install-home-icon svg{width:21px;height:21px}
.install-home-copy{min-width:0;display:grid;gap:3px;flex:1}.install-home-copy strong{font-size:13px}.install-home-copy small{color:var(--muted);font-size:11px}.install-home-arrow{color:var(--muted);font-size:22px;font-weight:300}
.install-tutorial-modal{position:fixed;inset:0;z-index:1010;display:grid;place-items:center;padding:20px;background:var(--announcement-overlay,rgba(24,19,28,.62))}.install-tutorial-backdrop{position:absolute;inset:0;border:0;background:transparent;cursor:pointer}
.install-tutorial-card{position:relative;width:min(520px,100%);max-height:min(78vh,680px);display:flex;flex-direction:column;overflow:hidden;border:1px solid #f0e1da;border-radius:18px;background:#fffaf7;box-shadow:0 24px 80px #17141955;color:#30252b;animation:announcement-in .2s ease-out}.install-tutorial-card header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 14px;border-bottom:1px solid #f0e1da}.install-tutorial-card h2{margin:0;font-size:19px}.install-tutorial-close{width:34px;height:34px;flex:none;border:0;border-radius:50%;background:#f3e9e4;color:#51434a;font-size:23px;line-height:1;cursor:pointer}
.install-tutorial-content{padding:18px 22px;overflow:auto;font-size:14px;line-height:1.7}.install-tutorial-content p{margin:0 0 12px}.install-tutorial-content h3{margin:17px 0 8px;font-size:14px}.install-tutorial-content ol,.install-tutorial-content ul{padding-left:22px;margin:8px 0 14px}.install-tutorial-content img{max-width:100%;height:auto;border-radius:8px}.install-tutorial-card footer{display:flex;justify-content:flex-end;gap:9px;padding:0 20px 18px}.install-tutorial-done{min-height:42px;padding:0 16px;border:1px solid #e7d8d1;border-radius:9px;background:#fff;color:#51434a;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}.install-tutorial-install{min-width:0;min-height:42px;padding:0 16px;border-radius:9px;font-size:13px}.install-tutorial-install[hidden]{display:none}
.install-tutorial-hide{min-height:42px;margin-right:auto;padding:0 4px;border:0;background:transparent;color:#8b756d;font-family:inherit;font-size:13px;cursor:pointer}.install-tutorial-page{padding-bottom:34px}.install-tutorial-page>.install-tutorial-content{margin-top:12px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.install-tutorial-page-actions{display:flex;justify-content:flex-end;margin-top:18px}.install-tutorial-page-actions [hidden]{display:none}


.phone:has(.auth-page) .bottom-nav,.phone:has(#reset-form) .bottom-nav{display:none}
.phone:has(.auth-page) .topbar{display:none}
.phone:has(.auth-page) .auth-page>.back{display:none}.phone:has(.auth-page) .auth-page>.auth-home-back{display:inline-block}
.auth-page .page-copy{margin-bottom:18px}.auth-page form{gap:13px}.auth-page .legal{margin-top:28px}
.auth-mode-field{font-size:0!important;display:block!important;margin-bottom:8px}.auth-mode-field select.auth-mode-select-hidden{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.auth-mode-tabs{display:flex;align-items:stretch;justify-content:center;width:100%;border-bottom:1px solid #edf0f3}.auth-mode-tabs button{position:relative;flex:1;border:0;background:transparent;padding:14px 6px 12px;color:#8b96a6;font-size:22px;font-weight:650;line-height:1.2;cursor:pointer}.auth-mode-tabs button.active{color:#2367e8}.auth-mode-tabs button.active::after{content:"";position:absolute;left:18%;right:18%;bottom:-1px;height:3px;border-radius:3px;background:#2367e8}.auth-mode-tabs>span{width:1px;height:24px;align-self:center;background:#d7dce3}.access-modal{padding:16px}.access-modal .access-card{width:min(430px,calc(100cqw - 32px));max-height:none;padding:28px 24px 22px;border-radius:24px;background:#fffaf7;box-sizing:border-box}.access-card-icon{width:46px;height:46px;display:grid;place-items:center;margin:0 auto 12px;border-radius:15px;background:#fff0e9;color:#c96345;font-size:25px;font-weight:800}.access-card h2{margin:0;text-align:center;font-size:clamp(24px,7cqw,32px);line-height:1.25;overflow-wrap:anywhere}.access-card p{margin:12px 0 0;color:#68758b;line-height:1.7;font-size:15px;text-align:center;overflow-wrap:anywhere}.access-actions{display:flex;gap:12px;justify-content:stretch;margin-top:24px}.access-actions button{flex:1;width:0;min-width:0;padding:13px 10px;justify-content:center;white-space:nowrap}.access-actions .primary-btn{display:flex}.light-tool-history-overlay .game-history-sheet{height:min(72vh,560px);padding-top:58px}.light-tool-history-title{margin:0;color:#273142;font-size:21px}.light-tool-history-note{margin:6px 0 16px;color:#8993a0;font-size:12px}.light-tool-history-overlay .light-tool-history-list{border-top:1px solid #edf0f3}.locked-game{display:grid;justify-items:center;gap:18px;padding:32px 20px}.locked-game-art{font-size:112px;color:#785cbd}.locked-game .primary-btn,.locked-game .outline-btn{width:auto;padding:13px 30px}.locked-game p{color:#728097}
.auth-page h1{font-size:30px}.auth-page .auth-home-back{font-size:22px!important;font-weight:700;padding:10px 0!important;margin-bottom:18px!important}.auth-page form{gap:11px}.auth-page label.check{display:flex;align-items:center;gap:7px;font-size:12px;line-height:1.35}.auth-page label.check input{width:15px;height:15px;flex:none;margin:0;accent-color:#2878d4}.auth-page label.check+label.check{margin-top:-5px}.auth-page .math-captcha{grid-template-columns:minmax(0,180px) minmax(0,1fr);gap:10px;align-items:center}.auth-page .math-captcha input{min-width:0}.auth-captcha-image{display:block;width:180px;height:54px;border:1px solid #d8dee7;border-radius:10px;background:#f4f7fb;cursor:pointer;transition:opacity .15s ease}.auth-captcha-image.is-refreshing{opacity:.55}
.auth-page .captcha-wrap{width:100%;max-width:420px}.auth-page .captcha-title{display:block;margin:2px 0 7px;color:#536071;font-size:13px;line-height:1.35}.auth-page .math-captcha{max-width:420px;grid-template-columns:minmax(0,180px) minmax(120px,1fr);justify-content:start}.auth-page .auth-captcha-image{width:100%;max-width:180px}.auth-page .math-captcha input{max-width:220px}
.auth-register-page,.auth-forgot-page{padding-top:clamp(54px,10vh,84px)}.auth-register-page h1,.auth-forgot-page h1{margin-bottom:24px!important}.auth-register-page label.check span{line-height:1.5}

.settings-legal-links{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:clamp(96px,18vh,180px);padding:16px 0 24px;font-size:13px}.settings-legal-links a{color:#2878d4;text-decoration:none}.settings-legal-links a:hover,.settings-legal-links a:focus-visible{text-decoration:underline}.settings-legal-links span{color:#aab3bf}

/* auth layout polish */
.auth-page{padding-top:max(18px,env(safe-area-inset-top))}
.auth-page .auth-home-back{font-size:16.5px!important;margin-bottom:22px!important}
.auth-mode-field{display:flex!important;align-items:center;justify-content:flex-start;width:100%;margin-bottom:6px!important;font-size:0!important}
.auth-mode-field .auth-mode-tabs{display:inline-flex;align-items:center;width:auto;border:1px solid #e3e8ef;border-radius:10px;padding:2px;gap:1px;background:#f6f8fb;overflow:hidden}
.auth-mode-tabs button{position:static;flex:none;border:0;border-radius:8px;background:transparent;padding:7px 12px;color:#8b96a6;font-size:18.7px;font-weight:600;line-height:1.2;cursor:pointer}
.auth-mode-tabs button.active{color:#2367e8;background:#fff;box-shadow:0 1px 3px rgba(31,58,96,.12)}
.auth-mode-tabs button.active::after,.auth-mode-tabs>span{display:none}
.auth-page label.check input{width:11px!important;height:11px!important;flex:none;margin:0;accent-color:#2878d4}

.auth-page{min-height:calc(100dvh - 90px);display:flex;flex-direction:column}
.auth-page .password-label{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px;row-gap:8px}
.auth-page .password-label-title{min-width:0}
.auth-page .password-label input{grid-column:1 / -1}
.auth-page .forgot-inline{justify-self:end;color:#2878d4;font-size:12px;text-decoration:none}
.auth-page .forgot-inline:hover,.auth-page .forgot-inline:focus-visible{text-decoration:underline}
.auth-page .auth-legal-link{padding:0;border:0;background:transparent;color:#2878d4;font:inherit;cursor:pointer}
.auth-page .auth-legal-link:hover,.auth-page .auth-legal-link:focus-visible{text-decoration:underline}
.auth-page .legal{margin-top:auto;padding:28px 0 5px}
.auth-legal-modal{position:fixed;inset:0;z-index:1020;display:grid;place-items:center;padding:20px;background:rgba(24,19,28,.62)}
.auth-legal-backdrop{position:absolute;inset:0;border:0;background:transparent;cursor:pointer}
.auth-legal-card{position:relative;width:min(520px,100%);max-height:min(78vh,680px);display:flex;flex-direction:column;overflow:hidden;border-radius:18px;background:#fffaf7;box-shadow:0 24px 80px #17141955;color:#30252b}
.auth-legal-card header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 22px 14px;border-bottom:1px solid #f0e1da}
.auth-legal-card h2{margin:0;font-size:20px;color:#30252b}
.auth-legal-close{width:34px;height:34px;border:0;border-radius:50%;background:#f3e9e4;color:#51434a;font-size:23px;line-height:1;cursor:pointer}
.auth-legal-content{padding:20px 22px;overflow:auto;font-size:14px;line-height:1.8}.auth-legal-content p{margin:0 0 12px}.auth-legal-card footer{display:flex;justify-content:center;padding:0 22px 18px}.auth-legal-confirm{min-height:40px;padding:0 22px;border:1px solid #e7d8d1;border-radius:9px;background:#fff;color:#51434a;font:inherit;font-size:13px;font-weight:600;cursor:pointer}

/* Public community messages */
.message-home-entry{display:grid;grid-template-rows:auto auto auto;gap:10px;min-height:142px;margin:12px 0 28px;padding:16px;border:1px solid #f0d9cf;border-radius:18px;background:linear-gradient(145deg,#fffaf7 0%,#fff 74%);color:#263247;box-shadow:0 8px 24px rgba(37,48,74,.055);text-decoration:none;transition:transform .18s ease,box-shadow .18s ease}
.message-home-entry:active{transform:scale(.99);box-shadow:0 4px 14px rgba(37,48,74,.06)}.message-home-head{display:flex;align-items:center;gap:10px}.message-home-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;background:#fff0e9;color:#d56f50;font-size:21px}.message-home-label{color:#c8755a;font-size:12px;font-weight:650}.message-home-head>b{margin-left:auto;color:#c8755a;font-size:22px;font-weight:400}.message-home-entry>strong{align-self:end;color:#263247;font-size:18px;line-height:1.2}.message-home-entry>small{color:#8290a4;font-size:13px;line-height:1.45}
.message-home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 28px}.message-home-grid .message-home-entry{box-sizing:border-box;width:auto;min-width:0;margin:0}.message-home-entry-placeholder{border-color:#e2e7ef;background:linear-gradient(145deg,#f8fafc 0%,#fff 74%)}.message-home-entry-placeholder .message-home-icon,.message-home-entry-placeholder .message-home-label,.message-home-entry-placeholder .message-home-head>b{color:#728097}.message-home-entry-placeholder .message-home-icon{background:#f0f3f7}
.messages-page{padding:12px 0 22px}.messages-page>.back{display:inline-flex;align-items:center;gap:7px;margin:0 0 22px;color:#546276;font-size:15px}.messages-heading{margin-bottom:22px}.messages-heading .eyebrow{margin-bottom:8px}.messages-heading h1{margin:0 0 8px;font-size:32px;line-height:1.2;color:#25304a}.messages-heading>p:last-child{margin:0;color:#718097;font-size:14px;line-height:1.6}
.message-compose{margin:0 0 24px;padding:16px;border:1px solid #e0e6ee;border-radius:16px;background:#fff}.message-compose>label{display:block;margin:0 0 9px;color:#33415a;font-size:14px;font-weight:650}.message-compose textarea{display:block;width:100%;min-height:112px;resize:vertical;padding:12px;border:1px solid #d9e0e9;border-radius:11px;background:#fff;color:#263247;font:inherit;font-size:15px;line-height:1.65;outline:0}.message-compose textarea:focus{border-color:#e58a6c;box-shadow:0 0 0 3px #fff0e9}.message-compose textarea::placeholder{color:#a2acb9}.message-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}.message-compose-footer small{color:#929eae;font-size:12px}.message-compose-footer .primary-btn{min-width:104px;justify-content:center;padding:10px 16px;border-radius:10px}.message-compose-footer .primary-btn:disabled{opacity:.65}.message-login-note{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#68758b;font-size:14px}.message-login-note a{padding:9px 14px;border-radius:9px;background:#fff0e9;color:#c96345;font-size:13px;font-weight:650}
.messages-list-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}.messages-list-head h2{margin:0;color:#25304a;font-size:18px}.messages-list-head>span{color:#8b96a6;font-size:12px}.messages-list{display:grid;gap:12px}.message-card{min-width:0;padding:16px;border:1px solid #e2e7ef;border-radius:15px;background:#fff;box-shadow:0 5px 18px rgba(37,48,74,.035)}.message-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.message-card>header>div{display:grid;gap:4px;min-width:0}.message-card>header strong{overflow:hidden;color:#2d3950;font-size:14px;text-overflow:ellipsis;white-space:nowrap}.message-card time{color:#9aa4b2;font-size:11px}.message-delete{flex:none;padding:5px 9px;border:1px solid #ead8d3;border-radius:7px;background:#fff;color:#b95f4a;font:inherit;font-size:12px;cursor:pointer}.message-body{margin:13px 0 0;color:#354158;font-size:15px;line-height:1.75;overflow-wrap:anywhere;white-space:pre-wrap}.message-body.is-collapsed{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden}.message-expand{margin:6px 0 0;padding:0;border:0;background:transparent;color:#3175d5;font:inherit;font-size:13px;cursor:pointer}.message-card>footer{display:flex;align-items:center;gap:18px;margin-top:14px;padding-top:11px;border-top:1px solid #f0f2f5}.message-card>footer button{display:inline-flex;align-items:center;gap:5px;padding:2px 0;border:0;background:transparent;color:#7b8798;font:inherit;font-size:12px;cursor:pointer}.message-card>footer button:disabled{opacity:.55;cursor:wait}.message-card>footer .message-like.is-liked{color:#d86b63}.messages-page .empty{margin-top:18px}
.message-load-more{display:block;width:100%;margin:16px 0;padding:12px;border:1px solid #dce3ed;border-radius:11px;background:#fff;color:#546276;font:inherit;font-size:13px;cursor:pointer}.message-load-more:disabled{opacity:.6;cursor:wait}
.messages-page{padding-top:8px}.messages-page>.back{gap:6px;margin-bottom:20px}.messages-back-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.messages-heading{margin-bottom:24px}.messages-heading h1{margin:0;font-size:30px}
.message-compose-trigger{position:fixed;right:max(18px,calc((100cqw - 560px)/2));bottom:calc(92px + env(safe-area-inset-bottom));z-index:30;display:grid;place-items:center;width:58px;height:58px;padding:0;border:0;border-radius:50%;background:#df7959;color:#fff;box-shadow:0 8px 22px rgba(201,99,69,.32);cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}.message-compose-trigger:active{transform:scale(.94);box-shadow:0 4px 12px rgba(201,99,69,.26)}.message-compose-trigger svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.message-compose-modal{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:18px;background:rgba(31,37,49,.52)}.message-compose-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent}.message-compose-card{position:relative;width:min(100%,480px);max-height:calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;padding:20px;border:1px solid #eadbd5;border-radius:22px;background:#fff;box-shadow:0 22px 60px rgba(25,33,48,.2)}.message-compose-card>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.message-compose-card>header h2{margin:0;color:#263247;font-size:20px}.message-compose-close{display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:#f4f5f7;color:#657186;font-size:25px;line-height:1;cursor:pointer}.message-compose-card .message-compose{margin:0;padding:0;border:0;background:transparent}.message-compose-card .message-compose>label{margin-bottom:8px}.message-compose-card .message-compose textarea{min-height:150px;max-height:42dvh;resize:vertical;box-sizing:border-box}.message-compose-card .message-compose-footer{margin-top:14px}.message-compose-card .message-compose-footer .primary-btn{min-width:112px;padding:11px 22px;background:#df7959;color:#fff}.message-compose-card .message-compose-footer .primary-btn:disabled{opacity:.6;cursor:wait}
@container front (max-width: 600px){.message-compose-trigger{right:18px;bottom:calc(94px + env(safe-area-inset-bottom))}.message-compose-card{padding:18px;border-radius:20px}}
.phone:has(.messages-page)>.topbar{display:none}.messages-page{padding-top:max(18px,env(safe-area-inset-top))}.messages-page>.back{min-height:44px;display:inline-flex;align-items:center;gap:4px;margin:0 0 36px;padding:8px 13px 8px 7px;border:1px solid #d9e0e8;border-radius:13px;background:#f7f9fc;color:#294766;font-size:15px;font-weight:700;line-height:1}.messages-heading{margin:0 0 24px}.messages-heading h1{margin:0;font-size:30px;line-height:1.2}.message-toast{position:fixed;top:20vh;left:50%;z-index:1200;max-width:calc(100cqw - 40px);padding:12px 20px;border:1px solid rgba(255,255,255,.16);border-radius:13px;background:rgba(38,48,67,.92);color:#fff;font-size:14px;line-height:1.4;box-shadow:0 10px 28px rgba(25,33,48,.2);opacity:0;transform:translate(-50%,-8px);pointer-events:none;transition:opacity .2s ease,transform .2s ease}.message-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.message-body{font-size:17px;line-height:1.8;overflow-wrap:anywhere;word-break:break-word}.message-card>footer{justify-content:space-between;gap:12px}.message-card>footer .message-copy{color:#7b8798}.message-actions{display:flex;align-items:center;gap:22px}.message-card>footer button.message-like,.message-card>footer button.message-reply-trigger,.message-card>footer button.message-share{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:32px;min-height:32px;padding:3px;border:0;background:transparent;color:#7b8798;cursor:pointer}.message-card>footer button.message-like svg,.message-card>footer button.message-reply-trigger svg,.message-card>footer button.message-share svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.message-card>footer button.message-like.is-liked svg{fill:#d86b63;stroke:#d86b63}.message-card>footer button.message-like.is-liked{color:#d86b63}.message-card>footer button.message-like span,.message-card>footer button.message-reply-trigger span{font-size:12px}.message-card>footer button.message-share{min-width:32px}.message-card>footer button.message-share svg{width:18px;height:18px}.message-replies{margin-top:12px;padding:13px 0 0;border-top:1px solid #edf0f3}.message-reply-list{display:grid;gap:12px}.message-reply{padding:10px 12px;border-radius:10px;background:#f7f8fa}.message-reply header{display:flex;align-items:center;gap:9px}.message-reply header strong{color:#40506a;font-size:12px}.message-reply time{color:#9aa4b2;font-size:10px}.message-reply p{margin:7px 0 0;color:#46536a;font-size:14px;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap}.message-replies-empty,.message-replies-loading,.message-replies-error{margin:0 0 10px;color:#929eae;font-size:12px;line-height:1.6}.message-replies-error button{margin-left:6px;border:0;background:transparent;color:#3175d5;font:inherit}.message-reply-form{display:flex;align-items:flex-end;gap:9px;margin-top:12px}.message-reply-form textarea{flex:1;min-width:0;min-height:42px;max-height:120px;padding:9px 11px;border:1px solid #d9e0e9;border-radius:10px;background:#fff;color:#344158;font:inherit;font-size:14px;line-height:1.5;resize:vertical;outline:0}.message-reply-form textarea:focus{border-color:#e58a6c;box-shadow:0 0 0 2px #fff0e9}.message-reply-form button,.message-reply-login{flex:none;padding:9px 13px;border:0;border-radius:9px;background:#fff0e9;color:#c96345;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.message-reply-form button:disabled{opacity:.6}.message-reply-login{display:inline-block;margin-top:11px}

/* Message board polish: warmer card hierarchy, accessible touch targets and clear states. */
.message-card{padding:17px 16px 12px;border-color:#e8e8ed;border-radius:18px;box-shadow:0 7px 20px rgba(45,53,73,.045);transition:border-color .18s ease,box-shadow .18s ease}
.message-card>header{justify-content:flex-start;min-width:0}
.message-avatar{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid #f2d9cf;border-radius:50%;background:linear-gradient(145deg,#fff2eb,#f9ded2);color:#bd6248;font-size:16px;font-weight:700}
.message-author{display:grid;gap:3px;min-width:0}
.message-card>header .message-author strong{max-width:calc(100cqw - 150px);color:#27344b;font-size:14px;font-weight:700;letter-spacing:.01em}
.message-card>header .message-author time{font-size:11px;line-height:1.35}
.message-card>header .message-delete{margin-left:auto;min-height:36px;padding:5px 10px}
.message-body{margin-top:14px;color:#303b50;font-size:17px;line-height:1.72;overflow-wrap:anywhere;word-break:break-word}
.message-expand{min-height:36px;margin-top:3px;padding:5px 2px;font-weight:600}
.message-card>footer{min-height:45px;gap:12px;margin-top:10px;padding-top:8px}
.message-card>footer button{min-height:44px}
.message-card>footer .message-copy{min-width:44px;justify-content:flex-start;padding:0 5px;color:#788396}
.message-actions{gap:4px}
.message-card>footer button.message-like,.message-card>footer button.message-reply-trigger,.message-card>footer button.message-share{min-width:44px;min-height:44px;padding:8px;border-radius:13px;transition:background .16s ease,color .16s ease,transform .16s ease}
.message-card>footer button.message-like:active,.message-card>footer button.message-reply-trigger:active,.message-card>footer button.message-share:active{transform:scale(.95);background:#f6f4f2}
.message-card>footer button.message-like.is-liked{background:#fff1ee}
.message-card>footer button.message-like span,.message-card>footer button.message-reply-trigger span{font-variant-numeric:tabular-nums}
.message-replies{margin:10px -2px 1px;padding:13px 0 0 13px;border-top:0;border-left:2px solid #f2d4c8}
.message-reply-list{gap:8px}
.message-reply{padding:11px 12px;border:1px solid #f0ece8;border-radius:12px;background:#fffaf7}
.message-reply-form textarea{min-height:44px}
.message-reply-form button,.message-reply-login{min-height:42px;display:inline-flex;align-items:center;justify-content:center}
.message-form-error{margin:10px 0 0;color:#b64d43;font-size:13px;line-height:1.5}
.message-replies-error[role="alert"]{padding:8px 10px;border-radius:9px;background:#fff5f3;color:#a64e43}
.message-load-more{min-height:46px;transition:background .16s ease,border-color .16s ease}
.message-load-more:hover{border-color:#e7b8a7;background:#fffaf7}
.message-compose-trigger{transition:transform .2s ease,opacity .2s ease,box-shadow .16s ease;touch-action:manipulation}
.message-compose-trigger.is-scroll-hidden{opacity:0;transform:translate3d(0,12px,0) scale(.88);pointer-events:none}
.messages-empty{padding:32px 20px;border:1px dashed #e5d8d1;border-radius:18px;background:linear-gradient(145deg,#fffaf7,#fff)}
.message-inbox-page .message-login-link{display:flex;align-items:center;justify-content:center;width:120px;min-height:46px;margin:18px auto 0;padding:10px 18px;box-sizing:border-box;text-align:center;text-decoration:none}
.messages-empty-icon{display:grid;place-items:center;width:48px;height:48px;margin:0 auto 12px;border-radius:16px;background:#fff0e9;color:#c96d4f;font-size:23px}
.message-toast{top:calc(20vh + env(safe-area-inset-top));width:max-content;text-align:center}
.message-compose-card{padding-bottom:max(20px,env(safe-area-inset-bottom))}
@container front (max-width: 600px){
  .message-card{padding:15px 14px 10px;border-radius:17px}
  .message-actions{gap:2px}
  .message-card>footer button.message-like,.message-card>footer button.message-reply-trigger,.message-card>footer button.message-share{min-width:42px;min-height:44px;padding:7px}
  .message-card>header .message-author strong{max-width:calc(100cqw - 132px)}
  .message-compose-modal{align-items:end;padding:12px 12px max(12px,env(safe-area-inset-bottom))}
  .message-compose-card{width:100%;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:17px;border-radius:22px 22px 18px 18px}
  .message-compose-card .message-compose textarea{min-height:112px;max-height:30dvh}
}
@container front (max-width: 360px){.message-card>footer{gap:6px}.message-card>footer button.message-copy{min-width:40px}.message-card>footer button.message-like,.message-card>footer button.message-reply-trigger,.message-card>footer button.message-share{min-width:40px;padding:6px}.message-body{font-size:16px}}

@media(prefers-reduced-motion:reduce){.message-card,.message-card>footer button,.message-compose-trigger,.message-toast{transition:none}}

/* Rich messages retain the existing outer card and separate text, media and actions. */
.message-card[role="link"]{cursor:pointer}
.message-title{margin:13px 0 -5px;color:#27344b;font-size:19px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.message-image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:13px}
.message-image-grid.count-1{grid-template-columns:minmax(0,min(100%,360px))}
.message-image-preview{position:relative;display:block;min-width:0;overflow:hidden;padding:0;border:0;border-radius:10px;background:#f2f4f7;aspect-ratio:1;cursor:pointer}
.message-image-grid.count-1 .message-image-preview{aspect-ratio:4/3}
.message-image-preview img{display:block;width:100%;height:100%;object-fit:cover;filter:blur(5px);transform:scale(1.04);transition:filter .2s ease,transform .2s ease}
.message-image-preview[data-image-state="full"] img{filter:none;transform:none}
.message-image-preview>span{position:absolute;inset:auto 0 0;display:block;padding:24px 8px 8px;background:linear-gradient(transparent,rgba(25,31,42,.52));color:#fff;font-size:12px;text-align:center}
.message-image-preview[data-image-state="full"]>span{opacity:0;transition:opacity .18s ease}
.message-image-preview[data-image-state="full"]:hover>span{opacity:1}
.message-card.is-detail .message-title{font-size:22px}
.message-card.is-detail .message-body{margin-top:12px}
.message-card.is-detail .message-image-grid{gap:9px;margin-top:18px}
.message-card.is-detail .message-image-grid.count-1{grid-template-columns:minmax(0,min(100%,520px))}
.message-card.is-detail .message-image-preview{border-radius:12px}
.message-card.is-detail>footer{border-top:1px solid #edf0f3}
.message-compose-title-input{display:block;width:100%;height:44px;margin:0 0 15px;padding:10px 12px;border:1px solid #d9e0e9;border-radius:10px;background:#fff;color:#263247;font:inherit;font-size:15px;outline:0;box-sizing:border-box}
.message-compose-title-input:focus{border-color:#e58a6c;box-shadow:0 0 0 3px #fff0e9}
.message-compose-title-input::placeholder{color:#a2acb9}
.message-compose-card .message-compose>label[for="message-title-input"]{margin-top:0}
.message-image-upload{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.message-image-add{min-height:38px;padding:0 13px;border:1px solid #f0d5c9;border-radius:9px;background:#fff8f4;color:#bd6248;font:inherit;font-size:13px;font-weight:650;cursor:pointer}
.message-image-add:disabled{opacity:.6;cursor:wait}
.message-image-upload>small{color:#929eae;font-size:12px}
.message-image-upload-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;width:100%;margin-top:3px}
.message-upload-thumb{position:relative;overflow:hidden;border-radius:9px;aspect-ratio:1;background:#f2f4f7}
.message-upload-thumb img{width:100%;height:100%;object-fit:cover;filter:blur(3px)}
.message-upload-thumb button{position:absolute;top:4px;right:4px;width:25px;height:25px;border:0;border-radius:50%;background:rgba(30,36,47,.72);color:#fff;font-size:19px;line-height:1;cursor:pointer}
.message-image-viewer{position:fixed;inset:0;z-index:1300;display:grid;place-items:center;padding:18px;background:rgba(13,16,22,.94)}
.message-image-viewer-backdrop{position:absolute;inset:0;border:0;background:transparent}
.message-image-viewer>img{position:relative;z-index:1;max-width:100%;max-height:calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));object-fit:contain}
.message-image-viewer-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:14px;z-index:2;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:28px;line-height:1;cursor:pointer}
@container front (max-width: 420px){.message-image-upload-list{grid-template-columns:repeat(3,minmax(0,1fr))}.message-card.is-detail .message-title{font-size:20px}}

/* Final cascade: desktop keeps the same phone-sized composition as mobile. */
@media (min-width: 100000px) {
  body { padding:16px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
  #app { width:min(600px,calc(100cqw - 32px),calc((100dvh - 32px) * .6666667)); max-width:600px; height:auto; min-height:0; max-height:calc(100dvh - 32px); aspect-ratio:2 / 3; margin:0 auto; }
  .phone { width:100%; max-width:none; height:100%; min-height:0; max-height:none; padding-inline:20px; border-radius:26px; box-shadow:0 12px 50px rgba(36,49,67,.12); overflow-x:hidden; overflow-y:auto; }
  .topbar { height:72px; }
  .hero { max-width:none; padding:30px 0 42px; }
  .hero h1 { font-size:47px; }
  .hero-copy { max-width:260px; font-size:inherit; }
  .category-grid { grid-template-columns:repeat(2,1fr); gap:10px; }
  .game-scroller { display:flex; overflow-x:auto; gap:10px; }
  .game-card { min-width:170px; min-height:155px; }
  .wheel-center-list { grid-template-columns:1fr; }
  .wheel-wrap { width:min(90%,430px); }
  .bottom-nav { position:absolute; left:0; bottom:0; transform:none; width:100%; max-width:none; border-radius:0 0 26px 26px; padding-inline:24px; }
  .game-intro,.game-stage { max-width:none; margin-inline:0; }
  .simple-page,.center-page,.messages-page { max-width:none; margin-inline:0; }
  .messages-list { grid-template-columns:1fr; }
}
@container front (max-width: 600px) { .wheel-center-list { grid-template-columns:1fr; } }

/* Homepage and wheel-center header refinements. */
.phone:has(.hero)>.topbar .brand { font-size:25.3px; }
.phone:has(.center-page)>.topbar { display:none; }


/* Tighten homepage tagline spacing after removing the eyebrow. */
.phone:has(.hero) .hero { padding:20px 0 24px; }
.phone:has(.hero) .hero-copy { margin:0; }


/* Home tagline sits below the brand; divider follows the tagline. */
.phone:has(.hero)>.topbar { border-bottom:0; }
.phone:has(.hero)>.hero { border-bottom:1px solid #f0f2f5; }
.install-home-label { margin:0 0 8px; color:#c96345; font-size:13px; font-weight:650; }
.install-home-label + .install-home-entry { margin-top:0; }


/* Fine tune home title/tagline spacing and install prompt hierarchy. */
.phone:has(.hero) .hero { padding-top:13px; }
.install-home-label { margin:8px 0 0; padding:8px 0; font-size:32.5px; line-height:1.25; }
.install-home-label + .install-home-entry { margin-top:0; }

/* Keep the shortcut hint compact on the home page. */
.install-home-label { font-size:16.25px; }

/* Reduce the gap between the brand and the homepage tagline by half. */
.phone:has(.hero) .hero { padding-top:6.5px; }

/* Treat the homepage tagline as a subtitle directly under the brand. */
.phone:has(.hero)>.topbar { height:64px; }
.phone:has(.hero) .hero { padding-top:0; }

/* Tighten the subtitle relationship once more. */
.phone:has(.hero)>.topbar { height:64px; }
.phone:has(.hero) .hero-copy { position:relative; top:-6px; }

/* Nudge only the home site title down slightly; keep the subtitle unchanged. */
.phone:has(.hero)>.topbar .brand { position:relative; top:2px; }

.interaction-tabs { display:grid; grid-template-columns:1fr 1fr; margin:0 0 18px; border-bottom:1px solid #e5e9ef; }
.phone:has(.messages-page) .messages-page>.back { display:none; }
.interaction-tabs button { position:relative; min-height:44px; border:0; background:transparent; color:#8792a2; font:inherit; font-size:15px; font-weight:650; cursor:pointer; }
.interaction-tabs button.active { color:#c96345; }
.interaction-tabs button.active::after { content:""; position:absolute; left:18%; right:18%; bottom:-1px; height:3px; border-radius:3px; background:#df7959; }
.interaction-coming-soon { min-height:240px; display:grid; align-content:center; justify-items:center; padding:24px; color:#8792a2; text-align:center; }
.interaction-coming-soon[hidden],.message-compose-trigger[hidden] { display:none!important; }
.messages-page [hidden] { display:none!important; }
.interaction-coming-soon>span { color:#df7959; font-size:30px; }
.interaction-coming-soon h2 { margin:12px 0 6px; color:#25304a; font-size:19px; }
.interaction-coming-soon p { margin:0; font-size:13px; }

/* Group the home install prompt so its heading and card dismiss together. */
.phone:has(.hero) .hero { padding-bottom:12px; }
.install-home-group { margin:24px 0 26px; }
.phone:has(.hero) .hero + .my-wheels { margin-top:20px; }
.install-home-label { margin:0 0 8px; padding:0; color:#c96345; font-size:17px; font-weight:700; line-height:1.35; }
.install-home-row { display:flex; align-items:center; gap:8px; }
.install-home-entry { flex:1; min-width:0; min-height:72px; margin:0; padding:13px 15px; }
.install-home-icon { width:42px; height:42px; }
.install-home-icon svg { width:23px; height:23px; }
.install-home-copy strong { font-size:14px; }
.install-home-copy small { font-size:12px; }

/* Align the three non-home menu headers with the homepage title scale. */
.phone:has(.center-page) .center-page { padding-top:18px; }
.center-page .page-title > div { display:grid; justify-items:start; gap:7px; }
.center-page .page-title h1,
.messages-page .messages-heading h1,
.profile-head h1 { margin:0; font-size:25.3px; line-height:1.2; letter-spacing:-.4px; }
.center-page .page-title .eyebrow,
.profile-head p { color:#536071; font-size:clamp(15px,4.5cqw,18px); line-height:1.55; letter-spacing:0; }
.center-page .page-title .eyebrow { margin:0; }
.profile-head h1 { margin:0 0 8px; }
.profile-head p { margin:0 0 22px; }
.phone:has(.profile-head)>.topbar { height:64px; }
.phone:has(.profile-head)>.topbar .brand { position:relative; top:2px; font-size:26px; line-height:1.2; font-weight:700; letter-spacing:-.4px; }

/* Use the interaction heading typography consistently across all four main menus. */
.phone:has(.hero)>.topbar .brand,
.center-page .page-title h1,
.messages-page .messages-heading h1,
.profile-head h1 {
  color:#25304a;
  font-family:inherit;
  font-size:30px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:0;
}

/* Compact every shared gameplay card across home and the game center. */
.wheel-card { min-height:0; padding:10px 12px; gap:11px; }
.center-page .wheel-center-list .wheel-card { min-height:0; }
.wheel-cover { width:50px; height:50px; border-radius:13px; font-size:23px; }
.add-wheel { min-height:40px; padding:7px 13px; }

/* Interaction landing: keep the shared heading and present each destination as a separate entry. */
.interaction-home-cards { display:grid; gap:12px; margin-top:0; }
.interaction-entry-card { display:flex; align-items:center; gap:13px; min-width:0; min-height:82px; padding:13px 15px; border:1px solid #e2e7ef; border-radius:16px; background:#fff; color:#263247; text-decoration:none; box-shadow:0 5px 16px rgba(37,48,74,.035); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.interaction-entry-card:active { transform:scale(.99); border-color:#f0c4b4; box-shadow:0 3px 10px rgba(37,48,74,.045); }
.interaction-entry-icon { display:grid; place-items:center; flex:none; width:46px; height:46px; border-radius:14px; background:#fff0e9; color:#c96345; font-size:22px; }
.interaction-entry-copy { display:grid; gap:5px; min-width:0; }
.interaction-entry-copy strong { color:#29354b; font-size:16px; font-weight:700; line-height:1.25; }
.interaction-entry-copy small { overflow:hidden; color:#8792a2; font-size:12px; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.interaction-entry-arrow { margin-left:auto; color:#9aa5b3; font-size:27px; font-weight:400; line-height:1; }
.interaction-entry-coming .interaction-entry-icon { background:#f2f5f9; color:#7c899d; }
.interaction-coming-page .interaction-coming-soon { min-height:280px; }
.interaction-page-header { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; min-height:44px; margin:0 0 20px; }
.interaction-page-header h1 { margin:0; color:#25304a; font-size:22px; font-weight:700; line-height:1.25; text-align:center; white-space:nowrap; }
.interaction-page-back { display:inline-flex; align-items:center; justify-self:start; gap:2px; min-height:40px; padding:0; color:#536071; font-size:15px; font-weight:600; text-decoration:none; }
.interaction-page-back svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.message-board-header .interaction-page-back { min-width:42px; min-height:42px; }
.message-board-header .interaction-page-back svg { width:29px; height:29px; stroke-width:2.25; }
.message-board-header .interaction-profile-button { width:42px; height:42px; border:0; background:transparent; color:#536071; cursor:pointer; }
.message-board-header .interaction-profile-button svg { width:25px; height:25px; stroke-width:2; }
.message-board-nav { position:fixed; left:50%; bottom:0; transform:translateX(-50%); z-index:30; display:grid; grid-template-columns:1fr 1fr 1fr; align-items:center; width:min(600px,100cqw); min-height:68px; margin:0; padding:7px 22px calc(7px + env(safe-area-inset-bottom)); border-top:1px solid #e8ebf0; background:rgba(255,255,255,.97); box-shadow:0 -5px 18px rgba(38,51,67,.05); backdrop-filter:blur(12px); }
.message-board-nav a,.message-board-nav button { display:flex; align-items:center; justify-content:center; justify-self:center; gap:4px; min-width:64px; min-height:48px; padding:3px 10px; border:0; background:transparent; color:#667489; font:inherit; text-decoration:none; cursor:pointer; }
.message-board-nav a { flex-direction:column; font-size:12px; font-weight:600; }
.message-board-nav a.active { color:#ad4f35; }
.message-board-nav svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.message-board-nav button { width:48px; height:48px; min-width:48px; min-height:48px; border-radius:50%; background:#df7959; color:#fff; box-shadow:0 4px 12px rgba(201,99,69,.24); }
.message-board-nav button svg { width:25px; height:25px; stroke-width:2; }
.message-board-page,.message-detail-page { padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
.phone:has(.message-board-page),.phone:has(.message-detail-page) { padding-bottom:0; }
@media (min-width: 100000px) { .message-board-page { position:static; } .message-board-nav { position:absolute; left:0; bottom:0; transform:none; width:100%; max-width:none; border-radius:0 0 26px 26px; } }
/* Message board cards use a lighter editorial surface while keeping detail-page styling intact. */
.message-board-page .interaction-page-header { position:relative; margin:0 -20px 17px; padding:0 20px 14px; transform:translateY(-4px); border-bottom:1px solid #edf0f4; }
.message-board-page .messages-list-head { display:none; }
.message-board-page .messages-list { gap:8px; }
.message-board-page .message-card { padding:12px 8px 7px; border:0; border-radius:0; background:transparent; box-shadow:none; }
.message-board-page .message-title { margin:8px 0 -4px; }
.message-board-page .message-body { margin:8px 0 0; }
.message-board-page .message-expand { margin-top:3px; }
.message-board-page .message-image-grid { margin-top:10px; }
.message-board-page .message-card>footer { min-height:38px; margin-top:5px; padding-top:0; border-top:0; }
.message-board-page .message-card>footer button { min-height:38px; }
.message-board-page .message-card>footer button.message-like,
.message-board-page .message-card>footer button.message-reply-trigger,
.message-board-page .message-card>footer button.message-share { min-height:38px; }
.message-board-page .message-replies { margin-top:6px; padding-top:8px; }
.message-board-page .messages-empty { margin-top:10px; }
.interaction-page-side-space { display:block; }
.interaction-profile-button { display:grid; place-items:center; justify-self:end; width:36px; height:36px; padding:0; border:1px solid #e2e7ef; border-radius:50%; background:#fff; color:#78869a; }
.interaction-profile-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.interaction-page-header + .interaction-home-cards { margin-top:0; }
.interaction-home-page .messages-heading { margin-bottom:18px !important; }
.interaction-home-cards { gap:18px; }
.interaction-home-page .interaction-entry-card { box-sizing:border-box; width:calc(100% + var(--card-width-bleed, clamp(8px,3cqw,14px)) * 2); margin-inline:calc(-1 * var(--card-width-bleed, clamp(8px,3cqw,14px))); }

/* Tighten the profile summary, membership card, and menu rows. */
.phone:has(.profile-head) .profile-head { padding:20px 0 20px; }
.phone:has(.profile-head) .profile-avatar { margin-bottom:10px; }
.phone:has(.profile-head) .profile-head h1 { margin-bottom:4px; }
.phone:has(.profile-head) .profile-head p { margin-bottom:16px; }
.phone:has(.profile-head) .membership-teaser { padding:14px; margin-bottom:20px; }




/* Reduce the visual scale of the profile summary without changing its layout. */
.phone:has(.profile-head) .profile-avatar { width:68px; height:68px; font-size:34px; }
.phone:has(.profile-head) .profile-head h1 { font-size:26px; }
.phone:has(.profile-head) .profile-head p { font-size:14px; line-height:1.45; }
.phone:has(.profile-head) .profile-head .outline-btn { min-height:40px; padding:9px 18px; font-size:14px; }
.phone:has(.profile-head) .membership-teaser { padding:12px; }
.phone:has(.profile-head) .membership-teaser span { font-size:11px; }
.phone:has(.profile-head) .membership-teaser strong { font-size:18px; margin:4px 0; }
.phone:has(.profile-head) .membership-teaser small { font-size:11px; }
.phone:has(.profile-head) .membership-teaser a { font-size:12px; }
.phone:has(.profile-head) .menu-list a { min-height:64px; font-weight:500; }



/* Keep the settings menu free of an extra top boundary. */
.phone:has(.settings-page) .menu-list { border-top:0 !important; }

/* Keep the three main section headers compact and give each subtitle a clear divider. */
.phone:has(.hero)>.topbar .brand,
.center-page .page-title h1,
.messages-page .messages-heading h1 {
  font-size:26px;
  line-height:1.2;
}
.phone:has(.hero) .hero-copy,
.center-page .page-title .eyebrow,
.messages-page .messages-subtitle {
  color:var(--ink-soft);
  font-size:14px;
  line-height:1.5;
}
.center-page .page-title,
.messages-page .messages-heading {
  padding-bottom:12px;
  border-bottom:1px solid #f0f2f5;
}
.messages-page .messages-subtitle { margin:6px 0 0; }

.settings-page { padding-bottom:calc(34px + env(safe-area-inset-bottom)); }
.settings-page h1 { margin-bottom:24px; }
.settings-group { display:grid; gap:10px; margin:0 0 22px; }
.settings-group h2 { margin:0; color:#7c8797; font-size:13px; font-weight:650; }
.settings-row { width:100%; min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0; padding:0 14px; border:1px solid #e5e9ef; border-radius:13px; background:#fff; color:#27344b; font:inherit; font-size:14px; text-decoration:none; text-align:left; }







.settings-row small { min-width:0; overflow:hidden; color:#8a96a6; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }

/* Stage 4 responsive foundation: use the dynamic viewport on mobile browsers,
   keep content above the fixed controls, and avoid browser text-size jumps. */
html { min-height:100%; -webkit-text-size-adjust:100%; }
body { min-height:100dvh; overscroll-behavior-x:none; }
@container front (max-width: 600px) {
  #app,.phone { min-height:100dvh; }
  .phone { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
  .phone:has(.auth-page),.phone:has(.message-detail-page),.phone:has(.message-long-compose-page) { padding-bottom:0; }
  .message-board-page .message-feed { min-height:calc(100dvh - 55px); padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
  .message-detail-page { min-height:100dvh; padding-bottom:calc(80px + env(safe-area-inset-bottom)) !important; }
  .message-detail-composer { width:100%; max-width:600px; }
  .message-comment-input-wrap textarea { font-size:16px; }
}


/* Keep auth text sizes while making the field frames more compact. */
.auth-page input,
.auth-page select {
  min-height:48px;
  padding:12px 16px;
}
.auth-page .code-btn { height:48px; }
.auth-page label.check {
  gap:2px;
  align-items:center;
  line-height:1.35;
  letter-spacing:0;
  word-spacing:0;
}
.auth-page label.check span {
  display:inline;
  line-height:1.35;
}
.auth-page .auth-legal-link {
  display:inline;
  margin:0 2px;
  padding:0;
  line-height:inherit;
  vertical-align:baseline;
}

/* Final divider tuning: retain the existing gray hairline and extend it to 3x. */
.phone:has(.hero)>.hero::after,
.center-page .page-title::after,
.messages-page .messages-heading::after {
  width:168px;
  height:1px;
  border-radius:0;
  background:#f0f2f5;
}
/* Increase only the readable content inside the login, register and reset forms. */
.auth-page h1 { font-size:32px; }
.auth-page form > label,
.auth-page .captcha-title { font-size:15px; }
.auth-page input,
.auth-page select {
  min-height:48px;
  padding:12px 14px;
  font-size:16px;
}
.auth-page input::placeholder { font-size:16px; }
.phone:has(#reset-form) #reset-form input { font-size:16px; }
.auth-page .forgot-inline,
.auth-page .code-btn { font-size:14px; }
.auth-page .code-btn { height:48px; }
.auth-page .primary-btn { min-height:48px; font-size:17px; }
.auth-page .form-foot { font-size:14px; }
.auth-page .legal { font-size:12px; }
.auth-page .auth-home-back { font-size:18px !important; }
.phone:has(.auth-page) .auth-page>.auth-home-back { display:inline-flex; align-items:center; gap:8px; -webkit-tap-highlight-color:transparent; }
.auth-page .auth-home-back .auth-back-arrow { font-size:26px; line-height:1; }
.auth-page label.check { font-size:14px; }
.auth-page label.check input {
  width:16px !important;
  height:16px !important;
  transform:scale(.75);
  transform-origin:left center;
}
.auth-register-page .auth-captcha-image { width:190px; max-width:190px; height:58px; }
.auth-register-page .math-captcha { grid-template-columns:minmax(0,190px) minmax(120px,1fr); }
.auth-register-page .math-captcha input { font-size:16px; }

/* Keep login tabs intact, lift the back control slightly, and prevent mobile zoom jumps. */
.phone:has(.auth-login-page) .auth-login-page>.auth-home-back {
  position:relative;
  top:-5px;
  gap:4px;
}
@media (hover:none) and (pointer:coarse) {
  input:not([type="checkbox"]):not([type="radio"]),
  textarea,
  select { font-size:16px !important; }
  button,
  a,
  [role="button"],
  input[type="button"],
  input[type="submit"] { touch-action:manipulation; }
}

/* Use a short subtitle accent instead of full-width section dividers. */
.phone:has(.hero)>.hero,
.center-page .page-title,
.messages-page .messages-heading {
  display:block;
  position:relative;
  border-bottom:0;
  padding-bottom:18px;
}
.phone:has(.hero)>.hero::after,
.center-page .page-title::after,
.messages-page .messages-heading::after {
  content:"" !important;
  display:block !important;
  width:56px;
  height:2px;
  margin-top:12px;
  border-radius:999px;
  background:#e7a28b;
}
.center-page .center-tabs,
.interaction-tabs {
  border-bottom:0;
}
.settings-action { cursor:pointer; }
.settings-row:hover { background:#fffaf7; }
.settings-edit-panel { display:grid; gap:12px; margin:8px 0; padding:14px; border:1px solid #e5e9ef; border-radius:12px; background:#fffaf7; }
.settings-edit-panel input { min-height:42px; padding:8px 12px; font-size:15px; }
.settings-edit-panel[hidden] { display:none; }
.settings-edit-panel .primary-btn { width:100%; justify-content:center; min-height:42px; padding:10px 14px; }
.settings-edit-panel .form-status { min-height:18px; margin:0; color:#b45e43; font-size:12px; }
.settings-edit-panel .form-status.success { color:#478768; }
.settings-logout-wrap { display:flex; justify-content:center; padding:20px 0 10px; }
.settings-logout-btn { min-height:40px; padding:8px 22px; border:1px solid #e0b7aa; border-radius:10px; background:#fff7f3; color:#b45e43; font:inherit; font-size:13px; cursor:pointer; }
.settings-logout-btn:hover { background:#fff0e9; }
.info-list { display:grid; gap:10px; margin-top:18px; }
.info-item { display:grid; grid-template-columns:56px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:56px; padding:0 14px; border:1px solid #e5e9ef; border-radius:12px; background:#fff; }
.info-item span { color:#7c8797; font-size:13px; }
.info-item strong { color:#27344b; font-size:15px; overflow-wrap:anywhere; }
.info-item .outline-btn { padding:7px 12px; font-size:12px; color:#b45e43; border-color:#e0b7aa; background:#fffaf7; cursor:pointer; }
.info-note { margin:4px 0 0; color:#8a96a6; font-size:12px; line-height:1.6; }
.rich-info-content { margin-top:18px; color:#536071; font-size:14px; line-height:1.8; }
.rich-info-content h2,.rich-info-content h3 { color:#27344b; margin:20px 0 8px; }
.feedback-page form { margin-top:18px; }
.feedback-page textarea { width:100%; resize:vertical; min-height:140px; padding:12px 14px; border:1px solid #d8dee7; border-radius:10px; background:#fff; color:#27344b; font:inherit; outline:0; }
.feedback-page textarea:focus { border-color:#eca68e; box-shadow:0 0 0 3px #fff0e9; }
.feedback-page .form-status { min-height:20px; margin:0; color:#b45e43; font-size:12px; line-height:1.6; }
.feedback-page .form-status.success { color:#478768; }

/* Let primary cards use more of the available phone width without moving page text. */
:root { --card-width-bleed:clamp(8px,3cqw,14px); }
.phone:has(.hero) .my-wheel-list .wheel-card,
.phone:has(.hero) .more-wheels,
.phone:has(.hero) .install-home-entry,
.phone:has(.hero) .recommend,
.phone:has(.hero) .game-scroller .game-card,
.phone:has(.center-page) .wheel-center-list .wheel-card,
.phone:has(.messages-page) .messages-list .message-card,
.phone:has(.messages-page) .message-replies {
  width:calc(100% + var(--card-width-bleed) * 2);
  margin-inline:calc(-1 * var(--card-width-bleed));
}
.result-overlay,.modal,.access-modal,.announcement-modal,.install-tutorial-modal,.auth-legal-modal,.message-compose-modal {
  padding:clamp(6px,1.8cqw,12px);
}
.result-card { width:min(100%,480px); }
.card-result-overlay .result-card { width:min(100%,400px); }
.modal-card { width:min(100%,640px); }
.message-compose-card { width:min(100%,560px); }
.access-modal .access-card { width:min(500px,calc(100cqw - 16px)); }

/* Final subtitle divider override: keep the current gray hairline at the requested length. */
.phone:has(.hero)>.hero::after,
.center-page .page-title::after,
.messages-page .messages-heading::after {
  content:"";
  display:block;
  width:168px;
  height:1px;
  margin-top:12px;
  border-radius:0;
  background:#f0f2f5;
}

/* Keep the profile page free of the top divider while preserving internal row separators. */
.phone:has(.profile-head)>.topbar,
.phone:has(.profile-head) .menu-list {
  border-top:0 !important;
  border-bottom:0 !important;
}

/* Remove the extra divider and its added spacing from the four main section headers. */
.phone:has(.hero)>.hero,
.center-page .page-title,
.messages-page .messages-heading,
.phone:has(.profile-head)>.topbar {
  border-bottom:0 !important;
}
.phone:has(.hero)>.hero { padding-bottom:12px; }
.center-page .page-title,
.messages-page .messages-heading { padding-bottom:0; }
.phone:has(.hero)>.hero::after,
.center-page .page-title::after,
.messages-page .messages-heading::after {
  content:none !important;
  display:none !important;
}
.phone:has(.install-home-group) .install-home-group { position:relative; }
.phone:has(.install-home-group) .install-home-group::before {
  content:"";
  position:absolute;
  top:-18px;
  left:0;
  right:0;
  width:auto;
  height:1px;
  background:#f0f2f5;
  transform:none;
  pointer-events:none;
}

/* Match the wheel center and interaction headers to the homepage rhythm. */
.center-page,
.messages-page {
  padding-top:18px;
}
.center-page .page-title,
.messages-page .messages-heading {
  display:block;
  position:relative;
  margin:0 0 16px;
  padding:0 0 18px;
  border-bottom:1px solid #f0f2f5 !important;
}
.center-page .page-title h1,
.messages-page .messages-heading h1 {
  margin:0;
  color:#25304a;
  font-size:26px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:0;
}
.center-page .page-title .eyebrow,
.messages-page .messages-subtitle {
  margin:7px 0 0;
  color:var(--ink-soft);
  font-size:14px;
  line-height:1.5;
  font-weight:400;
}
.center-page .page-title::after,
.messages-page .messages-heading::after {
  content:none !important;
  display:none !important;
}

/* Final homepage rhythm lock: these values mirror the active home brand/tagline rules. */
.center-page,
.messages-page {
  padding-top:18px !important;
}
.center-page .page-title,
.messages-page .messages-heading {
  display:block !important;
  margin:0 0 11px !important;
  padding:0 0 18px !important;
  border-bottom:1px solid #f0f2f5 !important;
}
.center-page .page-title > div {
  display:block !important;
}
.center-page .page-title h1,
.messages-page .messages-heading h1 {
  margin:0 !important;
  color:#25304a !important;
  font-size:26px !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
}
.center-page .page-title .eyebrow,
.messages-page .messages-subtitle {
  margin:7px 0 0 !important;
  color:var(--ink-soft) !important;
  font-size:14px !important;
  line-height:1.5 !important;
  font-weight:400 !important;
  letter-spacing:0 !important;
}

/* Keep the homepage divider when the install prompt is dismissed. */
.phone:has(.hero)>.hero { position:relative; }
.phone:has(.hero)>.hero::after {
  content:"" !important;
  display:block !important;
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  width:auto;
  height:1px;
  margin:0;
  border-radius:0;
  background:#f0f2f5;
  transform:none;
  pointer-events:none;
}
.phone:has(.install-home-group) .install-home-group::before {
  content:none !important;
  display:none !important;
}

/* Membership plans are browsed as a horizontal, snap-aligned strip. */
.profile-subpage .subpage-topbar-membership .membership-redeem-link{justify-self:end;display:inline-flex;align-items:center;min-height:40px;padding-inline:6px;color:var(--accent-strong);font-size:16.5px;font-weight:700;line-height:1;text-decoration:none}
.profile-subpage .subpage-topbar-membership .membership-redeem-link:focus-visible{outline:2px solid var(--accent-strong);outline-offset:4px;border-radius:2px}
.membership-page .page-copy{margin-bottom:22px}
.membership-status-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 8px;padding:16px 18px;border:1px solid #111;border-radius:16px;background:#f4fbf6;color:var(--ink-soft)}
.membership-status-card>div{display:grid;gap:4px;min-width:0}
.membership-status-card span{font-size:12px;color:#579274}
.membership-status-card strong{color:var(--text);font-size:20px;line-height:1.2}
.membership-status-card small{color:var(--muted);font-size:12px;line-height:1.35}
.membership-status-card .membership-status-expiry{text-align:right;flex:none}
.membership-status-card .membership-status-expiry strong{color:#4f9b78;font-size:16px}
.membership-status-card.is-free{border-color:var(--line);background:#f8fafc}
.membership-status-card.is-free span{color:var(--muted)}
.membership-status-card.is-free strong{font-size:18px}
.membership-status-card.is-free small{color:var(--muted)}
.plan-current-label{display:inline-flex;align-self:flex-start;margin-bottom:5px;padding:4px 8px;border-radius:999px;background:#eaf7f0;color:#398463;font-size:11px;font-weight:700}
.membership-page .plan-card .buy-plan.is-current-plan{background:#4f9b78}
.membership-page .plan-card .buy-plan.is-current-plan:hover{background:#398463}
.membership-page .plan-grid{display:flex;gap:14px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;touch-action:pan-x;scroll-padding-inline:1px;padding:8px var(--card-width-bleed,clamp(8px,3cqw,14px)) 16px;margin:14px calc(-1 * var(--card-width-bleed,clamp(8px,3cqw,14px))) 0;background:var(--surface)}
.membership-page .plan-grid::-webkit-scrollbar{display:none}
.membership-page .plan-card{box-sizing:border-box;display:flex;flex-direction:column;flex:0 0 min(70.4%,328px);min-width:0;scroll-snap-align:start;scroll-snap-stop:always}
.membership-page .plan-card .buy-plan{margin-top:auto}
@container front (max-width: 380px){.membership-page .plan-card{flex-basis:72%}}

/* Final override: interaction landing divider-to-card gap matches its card gap. */
.phone:has(.interaction-home-page) .interaction-home-page .messages-heading { margin-bottom:18px !important; }
.phone:has(.interaction-home-page) .interaction-home-cards { gap:18px !important; }

/* Membership checkout and order states. */
.membership-confirm-page,.payment-flow-page,.payment-result-page{display:flex;justify-content:center;align-items:flex-start;text-align:center;padding-top:18px}
.membership-confirm-card,.payment-flow-card,.payment-result-card{width:min(100%,430px);margin:0 auto;padding:24px 20px 22px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:var(--shadow)}
.membership-confirm-card h2,.payment-flow-card h2,.payment-result-card h2{margin:0;color:var(--text);font-size:25px;line-height:1.25}
.membership-confirm-description{margin:10px 0 0;color:var(--ink-soft);font-size:14px;line-height:1.6}
.membership-confirm-price{margin:22px 0 16px;color:#c96345;font-size:42px;font-weight:800;line-height:1}
.membership-confirm-price small{margin-left:5px;color:var(--muted);font-size:12px;font-weight:500}
.membership-confirm-benefits{display:grid;gap:8px;margin:0;padding:16px 18px;text-align:left;list-style:none;border-radius:14px;background:#fff8f3;color:#536071;font-size:13px;line-height:1.55}
.membership-confirm-benefits li:before{content:'✓';margin-right:8px;color:var(--success);font-weight:700}
.membership-confirm-method{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 14px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;color:var(--ink-soft);font-size:13px;text-align:left}
.membership-confirm-method strong{color:var(--text);font-weight:700}
.membership-confirm-submit{width:100%;justify-content:center}
.membership-confirm-note{margin:10px 0 0;color:var(--muted);font-size:11px}
.payment-flow-price{display:block;margin:18px 0 14px;color:#c96345;font-size:42px;line-height:1}
.payment-flow-meta{display:grid;gap:8px;padding:14px;border-radius:13px;background:#f7f8fa;color:var(--ink-soft);font-size:13px;text-align:left}
.payment-flow-meta span:first-child{color:var(--text);font-weight:700}
.payment-flow-meta b{color:#c96345;font-variant-numeric:tabular-nums}
.payment-action-panel{display:grid;gap:10px;justify-items:center;margin-top:18px;color:var(--ink-soft);font-size:13px}
.payment-action-panel>p{margin:0}
.payment-action-panel .primary-btn,.payment-action-panel .ghost-btn{width:100%;justify-content:center}
.payment-qr-panel{width:100%;box-sizing:border-box;margin:18px auto 0;padding:20px 16px;max-width:360px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow)}
.payment-qr-panel h2{margin:0;color:var(--text);font-size:19px}
.payment-qr-panel p,.payment-qr-panel small{margin:0;color:var(--muted);font-size:12px}
.payment-qr-image{display:block;width:230px;height:230px;max-width:70cqw;object-fit:contain}
.order-history-list{display:grid;gap:12px;margin-top:20px}
.order-history-card{display:grid;gap:11px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow);color:var(--text);text-align:left;text-decoration:none}
.order-history-head,.order-history-main,.order-history-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
.order-history-head>div{display:grid;gap:5px;min-width:0}.order-history-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.order-history-head small{overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.order-status-badge{flex:none;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:700}.order-status-badge.is-paid{background:#eaf7f0;color:#398463}.order-status-badge.is-pending{background:#fff4e4;color:#a96523}.order-status-badge.is-closed{background:#f2f4f7;color:#7d8795}
.order-history-main{padding-top:10px;border-top:1px solid #f0f2f5}.order-history-main b{color:#c96345;font-size:22px}.order-history-main span,.order-history-foot{color:var(--muted);font-size:11px}.order-history-foot{justify-content:flex-start;flex-wrap:wrap}
.payment-result-card{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center}.payment-result-icon{display:grid;place-items:center;width:76px;height:76px;margin:0 auto 16px;border-radius:50%;font-size:56px;line-height:1}.payment-result-icon.is-success{background:#eaf7f0;color:#4f9b78}.payment-result-icon.is-failed{background:#fff1f0;color:#d46666}.payment-result-card .eyebrow{margin:0 0 10px}.payment-result-card .page-copy{margin:12px 0 18px}.payment-result-summary{display:grid;gap:7px;width:100%;padding:14px;border-radius:13px;background:#f7f8fa;color:var(--ink-soft);font-size:13px}.payment-result-summary b{color:#c96345;font-size:22px}.payment-result-summary small{font-size:11px}.payment-result-card .result-actions{width:100%;margin-top:20px;padding-top:18px;border-top:1px solid var(--line);justify-content:center;gap:10px}.payment-result-card .result-actions a{min-width:132px;box-sizing:border-box}
.payment-cancel-button{display:flex;width:min(100%,360px);margin:12px auto 0;justify-content:center}
.order-detail-actions{display:flex;align-items:stretch;gap:10px;margin-top:18px}
.order-detail-actions a,.order-detail-actions button{flex:1;justify-content:center;box-sizing:border-box;min-width:0}
.order-detail-actions .ghost-btn{cursor:pointer}

/* Give the message feed a soft gray canvas so each white post reads as its own card. */
.message-board-page { padding-top:max(12px,env(safe-area-inset-top)) !important; padding-bottom:0 !important; background:#fff; }
.message-board-page .interaction-page-header { position:sticky; top:0; z-index:25; margin:0 -20px 0; padding:0 20px 10px; transform:none; border-bottom:1px solid #edf0f4; background:#fff; }
.message-board-page .interaction-page-header h1 { color:#354052; font-size:20px; font-weight:650; }
.message-board-page .message-feed { box-sizing:border-box; min-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - 55px); margin-inline:-20px; padding:0 20px calc(92px + env(safe-area-inset-bottom)); background:#f6f7f9; }
.message-board-page .message-refresh-indicator { display:flex; align-items:center; justify-content:center; gap:8px; height:0; overflow:hidden; color:#8792a2; font-size:12px; opacity:0; transition:height .18s ease,opacity .18s ease; }
.message-board-page .message-refresh-indicator.is-pulling,
.message-board-page .message-refresh-indicator.is-refreshing { opacity:1; }
.message-board-page .message-refresh-spinner { width:15px; height:15px; flex:none; border:1.5px solid #d7dfe8; border-top-color:#df7959; border-radius:50%; transform:rotate(0); }
.message-board-page .message-refresh-indicator.is-pulling .message-refresh-spinner { transform:rotate(180deg); transition:transform .18s ease; }
.message-board-page .message-refresh-indicator.is-refreshing .message-refresh-spinner { animation:message-refresh-spin .75s linear infinite; }
.message-board-page .messages-list { margin-top:0; }
.message-board-page .message-card { border-radius:14px; background:#fff; box-shadow:0 1px 4px rgba(37,48,74,.045); }
.message-board-page .message-card.is-new-post { animation:message-post-appear .24s ease both; }
@media (min-width: 100000px) { .message-board-page .message-feed { min-height:0; } }
@keyframes message-refresh-spin { to { transform:rotate(360deg); } }
@keyframes message-post-appear { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .message-board-page .message-refresh-indicator,.message-board-page .message-refresh-spinner,.message-board-page .message-card.is-new-post { animation:none; transition:none; } }

/* Align message actions as four matching, icon-led controls. */
.message-card>footer .message-action-leading,
.message-card>footer .message-actions { display:flex; align-items:center; gap:4px; }
.message-card>footer .message-action-leading { margin-right:auto; }
.message-card>footer button.message-copy,
.message-card>footer button.message-share,
.message-card>footer button.message-like,
.message-card>footer button.message-reply-trigger { display:inline-flex; flex:none; align-items:center; justify-content:center; gap:5px; min-width:42px; min-height:42px; padding:6px; border-radius:12px; color:#748196; }
.message-card>footer button.message-copy svg,
.message-card>footer button.message-share svg,
.message-card>footer button.message-like svg,
.message-card>footer button.message-reply-trigger svg { display:block; flex:none; width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.message-card>footer button.message-like span,
.message-card>footer button.message-reply-trigger span { color:#8390a2; font-size:12px; font-variant-numeric:tabular-nums; }
.message-card>footer button.message-copy:hover,
.message-card>footer button.message-share:hover,
.message-card>footer button.message-like:hover,
.message-card>footer button.message-reply-trigger:hover { background:#f3f5f8; color:#526176; }
.message-board-page .message-card>footer button.message-copy,
.message-board-page .message-card>footer button.message-share,
.message-board-page .message-card>footer button.message-like,
.message-board-page .message-card>footer button.message-reply-trigger { min-height:42px; }

.message-card>footer button.message-like.is-liked { color:#d86b63; background:#fff1ee; }
.message-card>footer button.message-like.is-liked svg { fill:#d86b63; stroke:#d86b63; }
.message-card>footer button.message-like.is-animating svg { animation:message-heart-pop .48s cubic-bezier(.2,.8,.3,1.35); }
.message-card>footer button:focus-visible { outline:2px solid #e6a28b; outline-offset:2px; }
@keyframes message-heart-pop { 0% { transform:scale(.72); } 55% { transform:scale(1.28); } 100% { transform:scale(1); } }
@media (prefers-reduced-motion:reduce) { .message-card>footer button.message-like.is-animating svg { animation:none; } }

/* Keep back controls close to the left edge with compact arrow-label spacing. */
.phone a.back,
.phone .subpage-back,
.phone .interaction-page-back { margin-left:-4px !important; }
.phone a.back { word-spacing:-6px; }
.phone .game-toolbar a.back { gap:0 !important; padding-left:4px !important; }
.phone .subpage-back,
.phone .interaction-page-back,
.phone .messages-page > .back { gap:0 !important; }
.phone .messages-page > .back { padding-left:4px !important; }

/* Message detail refresh: the board preference applies to every message surface. */
.message-detail-page { --message-font-size:17px; --keyboard-offset:0px; width:min(100%,680px); min-height:100dvh; margin-inline:auto; box-sizing:border-box; padding:0 0 calc(80px + env(safe-area-inset-bottom)) !important; background:#fff; color:#293342; overflow-anchor:none; }
.message-detail-header { position:sticky; top:0; z-index:35; display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:58px; margin:0 -20px; padding:4px 20px; border-bottom:1px solid #e9edf1; background:#fff; }
.message-detail-header-leading { display:flex; align-items:center; flex:1 1 auto; gap:0; min-width:0; }
.message-detail-header .interaction-page-back { display:flex; align-items:center; justify-content:flex-start; flex:0 0 34px; width:34px; min-height:42px; color:#536071; }
.message-detail-header .interaction-page-back svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.message-detail-header .interaction-page-back { margin-left:0 !important; }
.message-detail-author { display:flex; align-items:center; flex:1 1 auto; gap:7px; min-width:0; }
.message-detail-author .message-avatar { width:36px; height:36px; }
.message-detail-author strong { flex:1 1 auto; min-width:0; overflow:hidden; color:#313b49; font-size:14px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.message-detail-header-actions { display:flex; align-items:center; flex:0 0 auto; gap:4px; margin-left:auto; }
.message-detail-header-actions>button,.message-detail-options-wrap>[data-detail-options] { display:grid; place-items:center; width:38px; height:40px; padding:0; border:0; border-radius:9px; background:transparent; color:#596575; font:700 24px/1 system-ui,sans-serif; cursor:pointer; }
.message-detail-header-actions>button svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.message-detail-options-wrap { position:relative; }
.message-detail-options { position:absolute; top:calc(100% + 7px); right:0; z-index:45; display:grid; width:174px; padding:6px; border:1px solid #e9edf2; border-radius:9px; background:#fff; box-shadow:0 8px 26px rgba(31,42,56,.15); }
.message-detail-options[hidden],.message-emoji-picker[hidden],.message-comment-send[hidden] { display:none; }
.message-detail-options button { display:flex; justify-content:space-between; gap:12px; min-height:42px; padding:0 10px; border:0; border-radius:6px; background:transparent; color:#374354; font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.message-detail-options button:hover { background:#f3f5f7; }
.message-detail-options button span { color:#d27353; }
.message-detail-post { margin-inline:-20px; padding:0 20px 32px; background:#fff; }
.message-detail-content { padding:22px 8px 20px; background:#fff; }
.message-detail-content .message-title { margin:0 0 12px; color:#293342; font-size:21px; font-weight:700; line-height:1.45; }
.message-detail-content .message-body { margin:0; color:#394454; font-size:var(--message-font-size); line-height:1.82; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-detail-content .message-image-grid { margin-top:15px; }
.message-post-meta { display:flex; align-items:center; gap:12px; margin-top:10px; color:#929ba8; font-size:12px; line-height:1.2; }
.message-post-divider { height:1px; margin:0 -20px; background:#f0f2f5; border:0; }
.message-comments { padding:18px 8px 16px; margin-inline:0; background:#fff; }
.message-comments>h2 { display:flex; align-items:baseline; gap:7px; margin:0 0 12px; color:#313b49; font-size:15px; font-weight:700; }
.message-comments>h2 span { color:#929ba8; font-size:12px; font-weight:500; }
.message-comment-list { display:grid; gap:5px; }
.message-comments-loading,.message-comments-empty { margin:0; padding:8px 0 14px; color:#929ba8; font-size:13px; line-height:1.6; }
.message-comments-more { display:block; min-height:40px; margin:8px auto 12px; padding:0 18px; border:1px solid #e5e9ef; border-radius:20px; background:#fff; color:#758194; font:inherit; font-size:13px; cursor:pointer; }
.message-comments-more:disabled { opacity:.65; cursor:wait; }
.message-comments-empty button { border:0; background:transparent; color:#c66346; font:inherit; }
.message-comment { position:relative; padding:8px 0 6px; border-bottom:0; }
.message-comment header { display:flex; flex-wrap:nowrap; align-items:center; gap:8px; min-height:32px; }
.message-comment-avatar { display:grid; flex:none; place-items:center; width:30px; height:30px; overflow:hidden; border-radius:50%; background:#f4e9e4; color:#b96549; font-size:13px; font-weight:650; }
.message-comment-heading { display:flex; min-width:0; flex-wrap:wrap; align-items:baseline; gap:7px; }
.message-comment header strong { color:#344052; font-size:13px; font-weight:650; }
.message-comment-replying { color:#9aa3af; font-size:11px; }
.message-comment-replying b { color:#687487; font-weight:550; }
.message-comment>p { margin:1px 0 0; color:#3f4958; font-size:14px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-detail-page .message-comment>p { font-size:calc(var(--message-font-size) - 3px); }
.message-comment>footer { display:flex; align-items:center; justify-content:space-between; min-height:28px; }
.message-comment>footer time { color:#a0a8b3; font-size:10px; }
.message-comment>footer button { display:inline-flex; align-items:center; gap:4px; min-width:40px; min-height:28px; justify-content:flex-end; padding:3px 2px; border:0; background:transparent; color:#8993a2; font:inherit; font-size:11px; cursor:pointer; }
.message-comment>footer button svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.message-comment>footer button.is-liked { color:#d86b63; }
.message-comment>footer button.is-liked svg { fill:#d86b63; stroke:#d86b63; }
.message-comment-children { margin:8px 0 0 24px; padding:0; }
.message-comment.is-nested { padding-top:7px; padding-bottom:5px; }
.message-detail-composer { position:fixed; left:50%; bottom:var(--keyboard-offset); z-index:40; display:flex; align-items:center; gap:9px; width:min(600px,100cqw); box-sizing:border-box; min-height:64px; margin:0; padding:8px 16px calc(8px + env(safe-area-inset-bottom)); transform:translateX(-50%); border:1px solid #e8ebf0; border-radius:16px 16px 0 0; background:#fff; box-shadow:none; backdrop-filter:none; transition:none; overflow-anchor:none; }
.message-comment-input-wrap { display:flex; align-items:center; flex:1; min-width:0; min-height:42px; padding:0 9px; border:1px solid #e2e7ef; border-radius:11px; background:#fff; color:#8490a0; }
.message-comment-input-wrap>span { flex:none; font-size:17px; }
.message-comment-input-wrap textarea { flex:1; min-width:0; max-height:96px; min-height:24px; padding:8px 7px; border:0; outline:0; background:transparent; color:#303a48; font:inherit; font-size:13px; line-height:1.45; resize:none; }
.message-comment-input-wrap textarea::placeholder { color:#929ba8; }
.message-comment-input-wrap button { flex:none; width:32px; height:34px; border:0; background:transparent; color:#727f90; font:20px/1 system-ui,sans-serif; cursor:pointer; }
.message-detail-actions { display:flex; align-items:center; gap:3px; }
.message-detail-actions>button { display:inline-flex; align-items:center; justify-content:center; gap:3px; min-width:44px; min-height:42px; padding:0 4px; border:0; border-radius:8px; background:transparent; color:#596779; font:inherit; font-size:12px; cursor:pointer; }
.message-detail-actions>button svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.message-detail-actions>button.is-liked { color:#d86b63; }
.message-detail-actions>button.is-liked svg { fill:#d86b63; stroke:#d86b63; }
.message-detail-actions>button.is-favorited { color:#d29840; }
.message-detail-actions>button.is-favorited svg { fill:#f0c879; stroke:#cb9640; }
.message-comment-send { flex:none; min-height:38px; padding:0 12px; border:0; border-radius:8px; background:#d87353; color:white; font:600 13px/1 system-ui,sans-serif; cursor:pointer; }
.message-comment-send:disabled { opacity:.55; }
.message-emoji-picker { position:absolute; right:8px; bottom:calc(100% + 8px); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; width:min(208px,calc(100vw - 24px)); box-sizing:border-box; padding:8px; border:1px solid #e8ebef; border-radius:9px; background:white; box-shadow:0 6px 22px rgba(31,42,56,.13); }
.message-emoji-picker button { width:40px; height:40px; border:0; border-radius:6px; background:transparent; font-size:23px; cursor:pointer; }
.message-emoji-picker button:hover { background:#f3f5f7; }
.message-comment-actions-backdrop { position:fixed; inset:0; z-index:1100; display:flex; align-items:flex-end; justify-content:center; background:rgba(20,27,36,.28); }
.message-comment-actions-backdrop>[data-comment-menu-close] { position:absolute; inset:0; border:0; background:transparent; }
.message-comment-actions-backdrop>section { position:relative; display:grid; width:min(600px,100%); padding:8px 14px calc(14px + env(safe-area-inset-bottom)); border-radius:12px 12px 0 0; background:#fff; box-shadow:0 -8px 28px rgba(31,42,56,.12); }
.message-comment-actions-backdrop>section p { margin:8px 0; color:#9099a5; font-size:12px; text-align:center; }
.message-comment-actions-backdrop>section button { min-height:46px; border:0; border-top:1px solid #f0f2f4; background:transparent; color:#354052; font:inherit; font-size:14px; text-align:left; }
.message-detail-page[data-message-theme="dark"] { background:#11151b; color:#e5e8ed; }
.message-detail-page[data-message-theme="dark"] .message-detail-post { background:#171a20; color:#e5e8ed; }
.message-detail-page[data-message-theme="dark"] .message-detail-header,.message-detail-page[data-message-theme="dark"] .message-detail-composer { border-color:#303640; background:rgba(27,31,38,.97); }
.message-detail-page[data-message-theme="dark"] .message-detail-author strong,.message-detail-page[data-message-theme="dark"] .message-detail-content .message-title,.message-detail-page[data-message-theme="dark"] .message-comments>h2,.message-detail-page[data-message-theme="dark"] .message-comment header strong { color:#e5e8ed; }
.message-detail-page[data-message-theme="dark"] .message-detail-content .message-body,.message-detail-page[data-message-theme="dark"] .message-comment>p { color:#cbd1da; }
.message-detail-page[data-message-theme="dark"] .message-detail-options,.message-detail-page[data-message-theme="dark"] .message-emoji-picker { border-color:#39414d; background:#262b33; }
.message-detail-page[data-message-theme="dark"] .message-detail-options button,.message-detail-page[data-message-theme="dark"] .message-emoji-picker button { color:#e0e4ea; }
.message-detail-page[data-message-theme="dark"] .message-post-divider { border-color:#252a32; background:#20242b; }
.message-detail-page[data-message-theme="dark"] .message-comment { border-color:#303640; }
.message-detail-page[data-message-theme="dark"] .message-comment-input-wrap { border-color:#39414d; background:#232831; color:#c2cad5; }
.message-detail-page[data-message-theme="dark"] .message-comment-input-wrap textarea { color:#e5e8ed; }
.message-board-page[data-message-theme="dark"],.message-board-page[data-message-theme="dark"] .message-feed { background:#171a20; color:#e5e8ed; }
.message-board-page[data-message-theme="dark"] .interaction-page-header,.message-board-page[data-message-theme="dark"] .message-board-nav { border-color:#303640; background:#1d222a; }
.message-board-page[data-message-theme="dark"] .interaction-page-header h1,.message-board-page[data-message-theme="dark"] .interaction-page-back,.message-board-page[data-message-theme="dark"] .interaction-profile-button { color:#e0e4ea; }
.message-board-page[data-message-theme="dark"] .message-card { background:#222730; box-shadow:0 1px 4px rgba(0,0,0,.16); }
.message-board-page[data-message-theme="dark"] .message-card .message-title,.message-board-page[data-message-theme="dark"] .message-card .message-body,.message-board-page[data-message-theme="dark"] .message-card .message-author strong { color:#dce1e8; }
.message-board-page[data-message-theme="dark"] .message-card .message-author time,.message-board-page[data-message-theme="dark"] .message-card>footer button,.message-board-page[data-message-theme="dark"] .message-card>footer button span,.message-board-page[data-message-theme="dark"] .messages-empty,.message-board-page[data-message-theme="dark"] .messages-empty p { color:#aeb7c3; }
.message-board-page[data-message-theme="dark"] .message-card>footer { border-color:#303640; }
.message-board-page[data-message-theme="dark"] .message-board-nav a,.message-board-page[data-message-theme="dark"] .message-board-nav button { color:#c5ccd5; }
@media (min-width: 100000px) { .message-detail-composer { width:min(600px,calc(100cqw - 32px)); } }
@container front (max-width: 380px) { .message-detail-composer { gap:4px; padding-inline:12px; } .message-detail-actions { gap:0; } .message-detail-actions>button { min-width:37px; } .message-detail-actions>button svg { width:19px; height:19px; } .message-comment-children { margin-left:18px; } }

/* Five-section navigation for the message board */
.message-board-nav{grid-template-columns:repeat(5,minmax(0,1fr));padding-left:8px;padding-right:8px;}
.message-board-nav a,.message-board-nav button{position:relative;min-width:0;width:100%;padding:3px 2px;gap:3px;}
.message-board-nav a{font-size:11px;}
.message-board-nav button{width:46px;height:46px;min-width:46px;justify-self:center;}
.message-nav-dot,.message-category-dot{position:absolute;top:4px;right:calc(50% - 20px);width:8px;height:8px;border:1.5px solid #fff;border-radius:50%;background:#ef4d4f;}
.message-board-nav button::after{content:none;}
.message-mini-page{min-height:100%;padding-bottom:94px;}
.message-mine-account{display:flex;min-height:190px;flex-direction:column;align-items:center;justify-content:center;gap:10px;margin:16px 14px 0;padding:22px 15px;border:1px solid #edf0f3;border-radius:20px;background:#fff;box-shadow:0 5px 16px rgba(65,49,40,.04);text-align:center;}
.message-mine-account-avatar{display:grid;flex:none;width:66px;height:66px;place-items:center;border:1px solid #f1c9bb;border-radius:50%;background:#fff0eb;color:#b65437;font-size:28px;font-weight:700;}
.message-mine-account-copy{display:grid;min-width:0;gap:5px;justify-items:center;}
.message-mine-account-copy strong{max-width:100%;overflow:hidden;color:#394353;font-size:18px;text-overflow:ellipsis;white-space:nowrap;}
.message-mine-account-copy small{max-width:100%;overflow:hidden;color:#929ba7;font-size:13px;text-overflow:ellipsis;white-space:nowrap;}
.message-mine-account.is-guest{background:#fbfcfd;}
.message-mine-account.is-guest .message-mine-account-login{margin-top:2px;}
.message-mine-account-login{flex:none;padding:7px 13px;border:1px solid #e5b8a7;border-radius:10px;color:#b45c3d;font-size:13px;text-decoration:none;}
.message-mine-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:22px 16px;}
.message-mine-card{display:flex;min-height:132px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:15px 13px;border:1px solid #f0e7e2;border-radius:18px;background:linear-gradient(145deg,#fff,#fff8f4);color:#394353;text-align:center;text-decoration:none;box-shadow:0 6px 18px rgba(65,49,40,.05);}
.message-mine-card .message-mine-icon{display:grid;width:38px;height:38px;place-items:center;border-radius:12px;background:#fce9df;color:#b45c3d;font-size:24px;}
.message-mine-card strong{font-size:15px;white-space:nowrap;}
.message-mine-card small{color:#9aa3af;font-size:11px;}
.message-inbox-categories{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:16px;border-bottom:1px solid #edf0f3;}
.message-inbox-categories a{position:relative;display:grid;min-height:42px;place-items:center;border-radius:14px;background:#f6f7f9;color:#647184;text-decoration:none;font-size:14px;font-weight:650;}
.message-inbox-categories a.active{background:#fff0e9;color:#aa5035;}
.message-inbox-categories .message-category-dot{top:7px;right:calc(50% - 27px);}
.message-notification-list{padding:4px 14px;}
.message-notification-card{display:flex;align-items:flex-start;gap:12px;padding:16px 4px;border-bottom:1px solid #f0f1f3;color:#3d4858;text-decoration:none;}
.message-notification-avatar{display:grid;flex:0 0 38px;height:38px;place-items:center;border-radius:50%;background:#f9e6dd;color:#ad5538;font-weight:700;}
.message-notification-copy{display:grid;flex:1;min-width:0;gap:5px;}
.message-notification-copy strong{font-size:14px;}
.message-notification-copy small{overflow:hidden;color:#8b95a2;text-overflow:ellipsis;white-space:nowrap;}
.message-notification-copy time{color:#a3abb5;font-size:11px;}
.message-notification-card .message-category-dot{position:static;flex:0 0 8px;margin:5px 5px 0 0;}
.message-bucket-empty{display:flex;min-height:55vh;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;}
.message-bucket-empty>span{display:grid;width:72px;height:72px;place-items:center;border-radius:24px;background:#fff2eb;color:#d17a5d;font-size:36px;}
.message-bucket-empty h2{margin:18px 0 6px;font-size:19px;}
.message-bucket-empty p{max-width:260px;color:#929ba7;font-size:14px;line-height:1.7;}
@container front (max-width: 370px){.message-mine-account{min-height:176px;margin-inline:10px;padding:18px 12px}.message-mine-account-avatar{width:60px;height:60px}.message-mine-account-copy strong{font-size:17px}.message-mine-grid{gap:7px;padding-inline:10px}.message-mine-card{min-height:124px;padding:12px 10px;}.message-mine-card strong{font-size:14px;}}

/* Enlarge the detail page while preserving the top-right more/share glyph sizes. */
.message-detail-header { min-height:64px; }
.message-detail-header .interaction-page-back { flex-basis:38px; width:38px; min-height:48px; }
.message-detail-header .interaction-page-back svg { width:28px; height:28px; }
.message-detail-author { gap:8px; }
.message-detail-author .message-avatar { width:42px; height:42px; }
.message-detail-author strong { font-size:16px; }
.message-detail-content { padding:24px 10px 22px; }
.message-detail-content .message-title { margin-bottom:14px; font-size:24px; }
.message-detail-content .message-body { font-size:calc(var(--message-font-size) * 1.1); }
.message-detail-content .message-image-grid { margin-top:17px; }
.message-post-meta { gap:14px; margin-top:12px; font-size:13px; }
.message-detail-options { width:190px; padding:8px; }
.message-detail-options button { min-height:46px; padding-inline:12px; font-size:14px; }
.message-comments { padding:20px 10px 18px; }
.message-comments>h2 { gap:8px; margin-bottom:14px; font-size:17px; }
.message-comments>h2 span { font-size:13px; }
.message-comment-list { gap:1px; }
.message-comments-loading,.message-comments-empty { padding:9px 0 16px; font-size:14px; }
.message-comment { padding:8px 0 6px; }
.message-comment header { gap:8px; min-height:22px; }
.message-comment header strong { font-size:14px; }
.message-comment-replying { font-size:12px; }
.message-comment>p { margin:1px 0 0; font-size:calc(var(--message-font-size) - 2px); }
.message-detail-page .message-comment>p { font-size:calc(var(--message-font-size) - 1px); }
.message-comment>footer { min-height:32px; }
.message-comment>footer time { font-size:11px; }
.message-comment>footer button { gap:5px; min-width:44px; min-height:32px; font-size:12px; }
.message-comment>footer button svg { width:18px; height:18px; }
.message-comment.is-nested { padding-top:7px; padding-bottom:5px; }
.message-detail-composer { gap:clamp(5px,2cqw,9px); min-height:72px; padding:10px clamp(12px,4cqw,18px) calc(10px + env(safe-area-inset-bottom)); }
.message-comment-input-wrap { min-height:48px; padding-inline:11px; }
.message-comment-input-wrap>span { font-size:19px; }
.message-comment-input-wrap textarea { padding:9px 8px; font-size:15px; }
.message-comment-input-wrap button { width:36px; height:38px; font-size:22px; }
.message-detail-actions { gap:4px; }
.message-detail-actions>button { gap:4px; min-width:clamp(44px,13cqw,50px); min-height:48px; font-size:13px; }
.message-detail-actions>button svg { width:24px; height:24px; }
.message-comment-send { min-height:42px; padding-inline:14px; font-size:14px; }
.message-comment-actions-backdrop>section { padding:10px 16px calc(16px + env(safe-area-inset-bottom)); }
.message-comment-actions-backdrop>section p { margin:9px 0; font-size:13px; }
.message-comment-actions-backdrop>section button { min-height:52px; font-size:15px; }

.message-comment-input-wrap { gap:2px; }
.message-comment-input-wrap [data-comment-emoji] { order:1; flex:none; width:32px; height:34px; margin-left:2px; font-size:21px; }
.message-comment-send { order:2; display:grid; place-items:center; width:32px; min-width:32px; height:32px; min-height:32px; padding:0; border-radius:50%; background:#d87353; color:#fff; }
.message-comment-send svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.message-comment-send:disabled { background:#f4d8ce; color:#fff; opacity:1; }
.message-detail-actions { gap:5px; }
.message-detail-actions>button { gap:5px; min-width:clamp(48px,14cqw,53px); font-size:14px; }
.message-detail-actions>button svg { width:26px; height:26px; }
@container front (max-width: 380px) {
  .message-detail-actions { gap:2px; }
  .message-detail-actions>button { min-width:44px; }
  .message-detail-actions>button svg { width:24px; height:24px; }
  .message-comment-input-wrap [data-comment-emoji] { width:29px; }
  .message-comment-send { width:30px; min-width:30px; height:30px; min-height:30px; }
}

/* Post type chooser and the dedicated long-form editor. */
.message-compose-chooser .message-compose-card { width:min(100%,390px); }
.message-compose-choice-list { display:grid; gap:8px; }
.message-compose-choice-list button { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:52px; padding:10px 14px; border:1px solid #e5e9ef; border-radius:12px; background:#fff; color:#27344b; font:inherit; text-align:left; cursor:pointer; }
.message-compose-choice-list button strong { font-size:15px; }
.message-compose-choice-list button span { color:#8a96a6; font-size:12px; }
.message-compose-choice-list button:hover { border-color:#e8a18a; background:#fffaf7; }
.message-compose-card-long { max-height:82vh; }
.message-long-compose-page { min-height:100dvh; padding:0 0 24px; background:#fff; }
.message-long-compose-header { position:sticky; top:0; z-index:3; display:grid; grid-template-columns:42px minmax(0,1fr) 52px; align-items:center; min-height:58px; padding:0 7px; border-bottom:1px solid #edf0f3; background:rgba(255,255,255,.97); backdrop-filter:blur(12px); }
.message-long-compose-header h1 { margin:0; color:#27344b; font-size:18px; text-align:center; }
.message-long-compose-header>* { transform:translateY(-8px); }
.message-long-back,.message-long-submit { border:0; background:transparent; color:#27344b; font:inherit; cursor:pointer; }
.message-long-back { display:grid; width:44px; height:44px; place-items:center; }
.message-long-back svg { width:29px; height:29px; fill:none; stroke:currentColor; stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round; }
.message-long-submit { min-width:58px; min-height:42px; padding:0 4px; color:#c36448; font-size:17px; font-weight:700; }
.message-long-compose-form { display:grid; gap:12px; padding:18px 8px 30px; }
.message-long-compose-form>input { width:100%; box-sizing:border-box; padding:10px 0; border:0; border-bottom:1px solid #edf0f3; outline:0; color:#27344b; font:inherit; font-size:20px; font-weight:700; }
.message-long-editor { height:58dvh; min-height:0; max-height:58dvh; box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:4px 0; outline:0; color:#303a48; font-size:17px; line-height:1.85; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-long-editor:empty::before { content:attr(data-placeholder); color:#a2acb9; pointer-events:none; }
.message-editor-image { position:relative; display:block; margin:14px 0; }
.message-editor-image img { display:block; width:100%; max-height:360px; border-radius:10px; object-fit:contain; background:#f6f7f9; }
.message-editor-image button { position:absolute; top:8px; right:8px; display:grid; width:28px; height:28px; place-items:center; border:0; border-radius:50%; background:rgba(39,52,75,.76); color:#fff; font-size:20px; line-height:1; cursor:pointer; }
.message-long-toolbar { display:flex; align-items:center; min-height:48px; border-top:1px solid #edf0f3; }
.message-long-toolbar button { display:inline-flex; align-items:center; gap:7px; padding:8px 0; border:0; background:transparent; color:#647184; font:inherit; font-size:15px; cursor:pointer; }
.message-long-toolbar svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.message-inline-image { display:block; width:100%; margin:14px 0; border:0; background:transparent; cursor:pointer; }
.message-inline-image img { display:block; width:100%; max-height:420px; border-radius:10px; object-fit:contain; background:#f6f7f9; }
.message-inline-image span { display:none; }
.message-long-compose-page .topbar { display:none; }

/* Reduce horizontal gutters on the post detail page, including its header and comment content. */
.message-detail-header { padding-inline:12px; }
.message-detail-post { padding-inline:12px; }
.message-detail-content { padding-inline:6px; }
.message-comments { padding-inline:6px; }

/* Detail header controls share a common icon box; tighten author spacing slightly. */
.message-detail-header .interaction-page-back { flex-basis:34px; width:34px; }
.message-detail-author .message-avatar { width:40px; height:40px; }
.message-detail-header-actions [data-detail-options] svg { fill:currentColor; stroke:none; }

/* The send affordance points upward; keep the tap target while reducing its visible circle. */
.message-comment-send { position:relative; background:transparent; }
.message-comment-send::before { position:absolute; inset:50% auto auto 50%; z-index:0; width:26px; height:26px; border-radius:50%; background:#d87353; content:""; transform:translate(-50%,-50%); }
.message-comment-send svg { position:relative; z-index:1; width:15px; height:15px; }
.message-comment-send:disabled { background:transparent; }
.message-comment-send:disabled::before { background:#f4d8ce; }

/* Bring the emoji and send controls closer to the right edge of the comment field. */
.message-detail-composer .message-comment-input-wrap { padding-right:5px; }

/* Reduce only the space below the date/IP row before the comments divider. */
.message-detail-content { padding-bottom:10px; }

/* Feed card: emphasize “expand” and bring its single action row closer. */
.message-board-page .message-card .message-expand { min-height:30px; margin-top:1px; padding-top:3px; padding-bottom:3px; font-size:15px; line-height:1.35; }
.message-board-page .message-card>footer { margin-top:0; }

/* Compact comment rhythm: preserve the footer's horizontal layout while
   pulling the date/like row closer to the comment copy. */
.message-comment-list { gap:0; }
.message-comment { padding-top:4px; padding-bottom:3px; border-bottom:0; }
.message-comment>p { margin:0; }
.message-comment>footer { margin-top:-6px; }
.message-comment.is-nested { padding-top:4px; padding-bottom:3px; }

/* Comment navigation and collapsed reply groups. */
.message-detail-header { scroll-margin-top:0; }
.message-comments { scroll-margin-top:70px; }
.message-comments>h2 [data-comment-count] { color:inherit; font-size:inherit; font-weight:inherit; }
.message-comment-avatar { width:36px; height:36px; font-size:15px; }
.message-comment header { min-height:38px; }
.message-comment>p[role="button"] { cursor:pointer; }
.message-comment { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; touch-action:pan-y; }
.message-comment-meta { display:inline-flex; align-items:center; gap:12px; }
.message-comment-meta button { min-width:auto !important; min-height:26px !important; padding:2px 0 !important; color:#7e8998 !important; }
.message-comment-child-list { display:grid; gap:0; }
.message-comment-extra[hidden] { display:none !important; }
.message-comment-expand { min-height:30px; padding:2px 0; border:0; background:transparent; color:#547fb8; font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.message-detail-composer.is-keyboard-open { min-height:0; padding:8px 12px; border:0; border-radius:0; background:transparent; box-shadow:none; backdrop-filter:none; }
.message-detail-composer.is-keyboard-open .message-detail-actions { display:none; }
.message-detail-composer.is-keyboard-open .message-comment-input-wrap { min-height:48px; border-color:#dfe5ec; border-radius:12px; background:#fff; box-shadow:0 2px 10px rgba(29,40,54,.08); }
.message-detail-page[data-message-theme="dark"] .message-detail-composer.is-keyboard-open { background:transparent; }
.message-detail-page[data-message-theme="dark"] .message-detail-composer.is-keyboard-open .message-comment-input-wrap { border-color:#39414d; background:#232831; }

.profile-avatar.avatar-tone-0,.message-avatar.avatar-tone-0,.message-comment-avatar.avatar-tone-0,.message-notification-avatar.avatar-tone-0 { background:#fff0eb!important; color:#b65437!important; border-color:#f1c9bb!important; }
.profile-avatar.avatar-tone-1,.message-avatar.avatar-tone-1,.message-comment-avatar.avatar-tone-1,.message-notification-avatar.avatar-tone-1 { background:#e9f5ef!important; color:#34785c!important; border-color:#c6e4d4!important; }
.profile-avatar.avatar-tone-2,.message-avatar.avatar-tone-2,.message-comment-avatar.avatar-tone-2,.message-notification-avatar.avatar-tone-2 { background:#edf2fb!important; color:#496a9c!important; border-color:#cedcf0!important; }
.profile-avatar.avatar-tone-3,.message-avatar.avatar-tone-3,.message-comment-avatar.avatar-tone-3,.message-notification-avatar.avatar-tone-3 { background:#f5edfa!important; color:#79539a!important; border-color:#e2d1f0!important; }
.profile-avatar.avatar-tone-4,.message-avatar.avatar-tone-4,.message-comment-avatar.avatar-tone-4,.message-notification-avatar.avatar-tone-4 { background:#fbf3df!important; color:#8b6a22!important; border-color:#eee0b5!important; }
.profile-avatar.avatar-tone-5,.message-avatar.avatar-tone-5,.message-comment-avatar.avatar-tone-5,.message-notification-avatar.avatar-tone-5 { background:#e7f4f5!important; color:#36777c!important; border-color:#c4e2e4!important; }
.profile-avatar.avatar-tone-6,.message-avatar.avatar-tone-6,.message-comment-avatar.avatar-tone-6,.message-notification-avatar.avatar-tone-6 { background:#faeaf0!important; color:#a64e70!important; border-color:#efcad8!important; }
.profile-avatar.avatar-tone-7,.message-avatar.avatar-tone-7,.message-comment-avatar.avatar-tone-7,.message-notification-avatar.avatar-tone-7 { background:#eff1e6!important; color:#687340!important; border-color:#d8dec1!important; }

.message-comment-empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; min-height:196px; padding:20px 12px 24px; color:#9a9d9f; text-align:center; }
.message-comment-empty-state svg { display:block; width:78px; height:78px; margin:0 0 4px; overflow:visible; }
.message-comment-empty-state svg path { stroke-linecap:round; stroke-linejoin:round; }
.message-comment-empty-state svg .message-empty-card { fill:#fff8f4; stroke:#efc9b8; stroke-width:1.8; }
.message-comment-empty-state svg .message-empty-fold { fill:none; stroke:#efc9b8; stroke-width:1.8; }
.message-comment-empty-state svg .message-empty-lines { fill:none; stroke:#e4b09d; stroke-width:2; }
.message-comment-empty-state svg .message-empty-plane { fill:#f4c4b1; stroke:#c86d50; stroke-width:1.8; }
.message-comment-empty-state svg .message-empty-plane-line { fill:none; stroke:#c86d50; stroke-width:1.6; }
.message-comment-empty-state svg .message-empty-spark { fill:none; stroke:#d78a70; stroke-width:1.6; }
.message-comment-empty-state p { margin:0 0 16px; color:#9a9d9f; font-size:15px; line-height:1.4; }
.message-comment-empty-state button { min-width:96px; min-height:42px; padding:0 20px; border:1px solid #e0e2e4; border-radius:22px; background:#fff; color:#4d5154; font:inherit; font-size:15px; font-weight:600; cursor:pointer; }
.message-comment-empty-state button:active { background:#f7f8f9; }
.message-member-gate { display:flex; flex-direction:column; align-items:center; gap:8px; margin:20px 0 4px; padding:22px 16px; border:1px solid #ecd7cd; border-radius:16px; background:#fff9f5; text-align:center; }
.message-member-gate strong { color:#27364b; font-size:17px; }
.message-member-gate p { margin:0; color:#8996a7; font-size:14px; }
.message-member-gate .primary-btn { min-height:40px; padding:0 20px; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state svg .message-empty-card { fill:#302b2a; stroke:#92604f; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state svg .message-empty-fold { stroke:#92604f; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state svg .message-empty-lines { stroke:#b47c6a; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state svg .message-empty-plane { fill:#9b604f; stroke:#e0a18c; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state svg .message-empty-plane-line,.message-detail-page[data-message-theme="dark"] .message-comment-empty-state svg .message-empty-spark { stroke:#e0a18c; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state p { color:#a3a9b1; }
.message-detail-page[data-message-theme="dark"] .message-comment-empty-state button { border-color:#424852; background:#252a31; color:#e1e4e8; }

/* User-created member wheels stay local to the signed-in browser. */
.custom-wheel-section { margin:20px 0 24px; }
.home-custom-wheel-card { display:flex; align-items:center; gap:10px; width:100%; min-height:68px; margin:8px 0 6px; padding:11px 14px; box-sizing:border-box; border:1px solid #f0c9b9; border-radius:14px; background:#fff8f4; color:#28374c; text-align:left; cursor:pointer; box-shadow:0 8px 18px rgba(181,92,62,.08); }
.home-custom-wheel-card:active { background:#fff1ea; }
.home-custom-wheel-icon { display:grid; place-items:center; flex:0 0 38px; width:38px; height:38px; border-radius:11px; background:#fde5d9; color:#c56748; font-size:25px; line-height:1; }
.home-custom-wheel-card > span:nth-child(2) { display:grid; gap:4px; min-width:0; flex:1; }
.home-custom-wheel-card strong { font-size:16px; font-weight:700; }
.home-custom-wheel-card small { color:#8b99a9; font-size:12px; }
.home-custom-wheel-card > b { color:#c56748; font-size:22px; font-weight:400; }
.custom-wheel-create { flex:0 0 auto; min-height:40px; padding:0 14px; font-size:14px; }
.custom-wheel-card .add-wheel { color:#a9563c; }
.custom-wheel-modal { position:fixed; inset:0; z-index:120; display:grid; place-items:end center; }
.custom-wheel-backdrop { position:absolute; inset:0; border:0; background:rgba(24,30,38,.42); }
.custom-wheel-sheet { position:relative; width:min(100%,560px); max-height:min(86vh,720px); overflow:auto; padding:22px 20px calc(22px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; background:#fff; box-shadow:0 -12px 36px rgba(20,30,40,.18); }
.custom-wheel-sheet header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.custom-wheel-sheet h2 { margin:0; color:#1e2c42; font-size:20px; }
.custom-wheel-close { width:36px; height:36px; border:0; border-radius:50%; background:#f4f5f6; color:#667589; font-size:24px; cursor:pointer; }
.custom-wheel-sheet form { display:grid; gap:14px; margin-top:16px; }
.custom-wheel-sheet label { display:grid; gap:7px; color:#34445b; font-size:14px; }
.custom-wheel-sheet input,.custom-wheel-sheet textarea { width:100%; box-sizing:border-box; border:1px solid #d9e1ea; border-radius:12px; padding:11px 12px; background:#fff; color:#1d2b40; font:inherit; resize:vertical; }
.custom-wheel-sheet input:focus,.custom-wheel-sheet textarea:focus { outline:2px solid rgba(210,105,76,.2); border-color:#d87859; }
.custom-wheel-sheet .form-status { min-height:20px; margin:0; color:#b65437; font-size:13px; }
@container front (max-width: 600px) { .page-title { align-items:flex-start; gap:12px; } .custom-wheel-create { font-size:13px; padding:0 10px; } .custom-wheel-sheet { padding-left:16px; padding-right:16px; } }

/* Let the detail header stick to the viewport when the document itself scrolls.
   The legacy phone shell otherwise becomes a non-scrolling sticky ancestor. */
.phone:has(.message-detail-page) { overflow:visible; }
@media (min-width: 100000px) {
  .phone:has(.message-detail-page) { overflow-x:hidden; overflow-y:auto; }
}

/* Keep the long-form editor toolbar visible while its page scrolls. */
.phone:has(.message-long-compose-page) { overflow:visible; }
.message-long-compose-header { position:sticky; top:0; z-index:35; }
.message-long-compose-header .message-long-back { margin-left:-8px; }
@media (min-width: 100000px) {
  .phone:has(.message-long-compose-page) { overflow-x:hidden; overflow-y:auto; }
}

/* Keep the friends-message board title fixed while the post feed scrolls. */
.phone:has(.message-board-page) { overflow:visible; }
.message-board-page { position:static; }
.message-board-page > .interaction-page-header {
  position:sticky;
  top:0;
  z-index:60;
  transform:none;
  background:#fff;
  isolation:isolate;
}
@media (min-width: 100000px) { .phone:has(.message-board-page) { overflow-x:hidden; overflow-y:auto; } }



/* Keep the app and message-board navigation anchored to the client viewport while .phone scrolls. */
@media (min-width: 100000px) {
  .bottom-nav, .message-board-nav {
    position:fixed;
    left:50%;
    bottom:16px;
    transform:translateX(-50%);
    width:min(600px, calc(100cqw - 32px), calc((100dvh - 32px) * .6666667));
    max-width:600px;
  }
}
.order-archive-tabs { display:flex; gap:8px; margin:0 0 16px; }
.order-archive-tabs button { flex:1; min-height:40px; border:1px solid var(--line); border-radius:12px; background:#fff; color:#667489; font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
.order-archive-tabs button.active { border-color:#df7959; background:#fff4ef; color:#ad4f35; }
.message-member-badge { display:inline-flex; align-items:center; min-height:24px; margin-left:auto; padding:0 9px; border:1px solid #d8e7ff; border-radius:999px; background:#f0f6ff; color:#2d6dcc; font-size:12px; font-weight:700; white-space:nowrap; }
.message-member-summary { margin:8px 0 0; color:#6f7f93; font-size:13px; line-height:1.5; }
.message-member-gate { border-color:#cfe0fb; background:#f4f8ff; }
.message-member-gate strong { color:#245da9; }
.membership-tier-badge { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:20px; margin-left:6px; padding:0 6px; border:1px solid #e6b858; border-radius:6px; background:#fff7df; color:#91640f; font-size:11px; font-weight:750; line-height:1; vertical-align:2px; white-space:nowrap; }
.membership-tier-badge.is-vplus { border-color:#5f9f82; background:#eaf6ef; color:#287450; }
