/* Shared interface. Game-specific drawing and animation remain in style.css. */
:root {
    color-scheme: dark;
    --primary-color: #8b5cf6;
    --secondary-color: #a78bfa;
    --accent-color: #b5a0ff;
    --bg-color: #0b1020;
    --surface: #151c2e;
    --surface-hover: #1b2439;
    --card-bg: var(--surface);
    --text-color: #f3f4f6;
    --text-secondary: #a8b3c7;
    --line: #293249;
    --border-radius: 16px;
    --shadow: 0 4px 16px #00000018;
    --shadow-lg: 0 16px 48px #00000040;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    user-select: auto;
    line-height: 1.6;
}
body::before { display: none; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: #8b5cf622; }
button { cursor: pointer; }
a { color: var(--accent-color); text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, .tool-card:focus-visible, .btn:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 4px;
}
#app { max-width: 1120px; padding: 0 32px; transition: none; }
.page { min-height: calc(100svh - 88px); padding-bottom: max(40px, env(safe-area-inset-bottom)); animation: fadeIn .2s ease; }
.site-nav { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--text-color); text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.8px; white-space: nowrap; }
.brand-mark { color: #b5a0ff; width: 32px; height: 32px; }
.brand-clover { color: #b5a0ff; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-button, .language-btn, .language-toggle {
    position: static; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px;
    background: transparent; color: var(--text-secondary); font-size: 14px; font-weight: 500;
    text-decoration: none; backdrop-filter: none; box-shadow: none; transition: background .18s, color .18s;
}
.nav-button svg { width: 18px; height: 18px; fill: var(--bg-color); stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.language-btn { border-color: var(--line); color: var(--text-color); min-width: 46px; margin-left: 8px; }
.nav-button:hover, .language-btn:hover { background: var(--surface); color: var(--text-color); box-shadow: none; transform: none; }
.home-hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 24px; padding: 52px 0 48px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .5px; color: var(--text-secondary); }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #b5a0ff; flex-shrink: 0; }
.hero-copy h1 { margin: 18px 0; font-size: clamp(36px, 4.6vw, 52px); font-weight: 750; line-height: 1.25; letter-spacing: -1.8px; }
.hero-accent { display: inline-block; max-width: 100%; text-wrap: balance; color: #b5a0ff; }
.hero-description { max-width: 405px; color: var(--text-secondary); font-size: 15px; line-height: 1.8; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 22px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: 0; box-shadow: none; transition: background .18s, border-color .18s, transform .18s; }
.btn::before, .tool-card::before, .template-item::before, .footer-btn::before { display: none; }
.btn-primary { background: #7c4fe0; color: #fff; box-shadow: 0 4px 12px #7c4fe018; }
.btn-primary:hover { background: #8960e8; box-shadow: none; transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text-color); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-hover); border-color: #495372; box-shadow: none; }
.btn:active { transform: translateY(1px); }
.hero-cta { margin-top: 24px; min-width: 168px; justify-content: space-between; }
.hero-cta, .browse-tools { text-decoration: none; }
.browse-tools { margin: 12px 0 0 8px; }
.tool-card { text-decoration: none; }
.tool-guide { margin-top: 40px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--text-secondary); font-size: 14px; }
.tool-guide h2 { color: var(--text-color); font-size: 22px; margin-bottom: 16px; }
.tool-guide h3 { color: var(--text-color); font-size: 16px; margin: 22px 0 8px; }
.tool-guide ol { padding-left: 24px; }.tool-guide li { margin: 8px 0; }
.related-tools { display: flex; flex-wrap: wrap; gap: 8px 24px; }.related-tools a { padding: 10px 0; }
.tool-load-status { min-height: 280px; padding: 40px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.tool-load-status h2 { font-size: 22px; }.tool-load-status p { max-width: 580px; margin: 16px 0 24px; color: var(--text-secondary); }
.tool-load-status .btn, .share-import .btn { margin: 4px 8px 4px 0; }
.tool-unavailable > :not(.page-header):not(.tool-intro):not(.tool-load-status):not(.tool-guide) { display: none !important; }
.share-config, .share-import { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.share-config summary { cursor: pointer; padding: 4px 0; min-height: 36px; }.share-config p, .share-import p { font-size: 13px; margin: 12px 0; color: var(--text-secondary); }
.share-config textarea { display: block; width: 100%; min-height: 90px; margin-top: 12px; background: var(--bg-color); color: var(--text-color); }
.share-import { margin-bottom: 24px; }.share-import h2 { font-size: 20px; }.share-import ul { padding-left: 24px; max-height: 200px; overflow-y: auto; overflow-wrap: anywhere; margin: 16px 0; }
.result-save { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--accent-color); font-size: 13px; }
#tools { scroll-margin-top: 24px; }
noscript { display: block; padding: 16px; color: var(--text-secondary); }
@media (max-width: 420px) { .browse-tools { margin-left: 0; }.tool-load-status { padding: 24px 18px; } }
.quick-templates { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 16px; font-size: 12px; color: var(--text-secondary); }
.quick-templates button { padding: 5px 0; min-height: 36px; font-size: 12px; border: 0; border-bottom: 1px solid #44405e; background: transparent; color: #d6cafa; }
.quick-templates button:hover { color: #fff; border-color: #c4b5fd; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 344px; overflow: hidden; }
.orbit { position: absolute; width: 310px; height: 310px; border: 1px solid #232b42; border-radius: 50%; }
.orbit-two { width: 390px; height: 390px; border-style: dashed; opacity: .65; }
.preview-wheel { position: relative; width: 260px; aspect-ratio: 1; border-radius: 50%; border: 9px solid #23283d; outline: 1px solid #3d405c; background: conic-gradient(from -30deg, #ac8fe7 0deg 60deg, #f0cf9e 60deg 120deg, #7cacaa 120deg 180deg, #91a3d8 180deg 240deg, #d29eb1 240deg 300deg, #dad2ed 300deg 360deg); box-shadow: 0 18px 45px #00000035; transform: rotate(12deg); }
.preview-pin { position: absolute; left: calc(50% - 12px); top: -18px; z-index: 2; width: 24px; height: 30px; background: #f3f4f6; clip-path: polygon(0 0,100% 0,50% 100%); transform: rotate(-12deg); }
.preview-hub { position: absolute; inset: calc(50% - 25px); display: grid; place-items: center; background: #f3efff; border: 5px solid #ffffff40; border-radius: 50%; color: #60488f; font-size: 22px; }
.wheel-symbol { position: absolute; font-size: 28px; transform: translate(-50%,-50%) rotate(-12deg); }
.symbol-one { left: 50%; top: 18%; }.symbol-two { left: 78%; top: 34%; }.symbol-three { left: 78%; top: 66%; }.symbol-four { left: 50%; top: 82%; }.symbol-five { left: 22%; top: 66%; }.symbol-six { left: 22%; top: 34%; }
.art-spark { position: absolute; z-index: 1; font-size: 26px; color: #b5a0ff; }.spark-one { top: 32px; right: 46px; }.spark-two { bottom: 66px; left: 30px; color: #efcd9d; font-size: 32px; }
.art-caption { position: absolute; bottom: 9px; color: var(--text-secondary); background: var(--bg-color); padding: 4px 14px; font-size: 12px; letter-spacing: 1px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { font-size: 23px; font-weight: 650; margin-top: 4px; letter-spacing: -.5px; }
.section-note { color: var(--text-secondary); font-size: 12px; padding-bottom: 3px; }
.tools-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 0; perspective: none; }
.tool-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-width: 0; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text-color); box-shadow: none; backdrop-filter: none; animation: none; transition: transform .18s, border-color .18s, background .18s; }
.tool-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 15px; background: #25293f; border: 1px solid #33374d; border-radius: 12px; font-size: 28px; animation: none; filter: none; }
.tool-card:nth-child(3n+2) .tool-icon { background: #263337; border-color: #324448; }
.tool-card:nth-child(3n+3) .tool-icon { background: #36302b; border-color: #473d32; }
.tool-card:hover { background: var(--surface-hover); border-color: #615181; box-shadow: none; transform: translateY(-3px); }
.tool-card:hover .tool-icon { animation: none; transform: none; }
.tool-card:active { transform: translateY(0); }
.tool-card-title { font-size: 16px; font-weight: 650; line-height: 1.5; }
.tool-card-desc { font-size: 12px; line-height: 1.65; color: var(--text-secondary); margin-top: 5px; }
.tool-arrow { position: absolute; top: 20px; right: 20px; color: #78849c; font-size: 18px; transition: color .18s; }
.tool-card:hover .tool-arrow { color: #c4b5fd; }
.help-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.help-strip h2 { font-size: 16px; font-weight: 600; }.help-strip p { font-size: 13px; color: var(--text-secondary); margin-top: 5px; }
.help-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }.help-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.site-footer { color: var(--text-secondary); font-size: 12px; padding-bottom: 12px; }
.footer-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; }.footer-brand { color: #d0d6e3; font-size: 16px; font-weight: 650; }.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }.footer-links a { color: var(--text-secondary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }.footer-links a:hover { color: #fff; }
/* Tool shell and configuration */
.page-header { display: flex; flex-wrap: wrap; gap: 12px; padding: 22px 0 12px; background: transparent; border: 0; box-shadow: none; }
.page-header :is(h1,h2) { flex: 1; text-align: left; font-family: var(--font-body); font-size: 24px; font-weight: 650; color: var(--text-color); background: none; -webkit-text-fill-color: currentColor; }
.back-btn, .config-btn { min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.back-btn:hover, .config-btn:hover { transform: none; background: var(--surface-hover); border-color: #495372; box-shadow: none; }
.tool-intro, #bottle-page .tool-intro { margin: 0 0 24px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 14px; }
.wheel-workspace { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 24px; align-items: start; }
.wheel-stage { display: flex; align-items: center; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.stage-label { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 12px; }
.mobile-template-shortcuts { display: none; }
.wheel-stage .canvas-wrapper { width: min(100%, 350px); max-width: 350px; margin: 28px auto 22px; }
.wheel-pointer { border-left-width: 12px; border-right-width: 12px; border-top: 24px solid #f1eaff; top: -12px; filter: drop-shadow(0 2px 2px #00000040); animation: none; }
.wheel-stage #spin-btn { width: 100%; max-width: 350px; }
.stage-hint { color: var(--text-secondary); font-size: 12px; margin-top: 12px; text-align: center; }
.wheel-config { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.template-selector, .option-editor { padding: 20px; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: none; }
.config-heading { display: flex; align-items: center; gap: 10px; }.config-heading h3 { font-size: 15px; font-weight: 600; }.step-number { font-size: 11px; color: #c4b5fd; background: #8b5cf61a; padding: 3px 7px; border-radius: 6px; }.option-count { margin-left: auto; color: var(--text-secondary); font-size: 12px; }
.config-description { color: var(--text-secondary); font-size: 12px; line-height: 1.7; margin-top: 12px; }
.template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.template-item { min-width: 0; min-height: 44px; padding: 9px 10px; font-size: 12px; font-weight: 500; color: var(--text-secondary); border: 1px solid var(--line); border-radius: 8px; background: #101727; transition: background .18s, border-color .18s; }
.template-item:hover { transform: none; background: #27223e; border-color: #69558d; box-shadow: none; color: #f3efff; }
.template-item[aria-pressed="true"] { background: #8b5cf61c; border-color: #9573d0; color: #e2d5ff; }
.options-list { padding: 0; margin: 16px 0; max-height: 270px; border: 0; border-radius: 0; box-shadow: none; background: transparent; scrollbar-width: thin; }
.option-item { gap: 8px; padding: 0; margin-bottom: 8px; border: 0; background: none; border-radius: 0; }
.option-item:hover { transform: none; background: none; }
.option-item input[type="text"], .option-item input[type="number"] { min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #0f1626; font-size: 14px; box-shadow: none; min-height: 44px; }
.option-item input[type="number"] { width: 56px; padding: 7px 4px; }
.option-item input:focus { box-shadow: none; border-color: #a78bfa; }
.option-item button { flex-shrink: 0; padding: 8px; min-width: 44px; color: #f6a7b6; background: #f43f5e12; font-size: 12px; }
#add-option-btn { width: 100%; min-height: 44px; font-size: 13px; background: transparent; border-style: dashed; }
.import-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }.import-details summary { color: var(--text-secondary); font-size: 12px; cursor: pointer; padding: 10px 0; min-height: 44px; }.import-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 6px 0; }.import-actions .btn { font-size: 12px; padding: 10px 14px; }.import-actions a { font-size: 12px; }
/* Shared controls and game surfaces. Do not override the game object transforms. */
.random-config, .card-config, .bomb-config, .bottle-config, .dice-preset-panel, .players-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; backdrop-filter: none; }
.dice-preset-panel { margin: 0 0 20px; }.dice-preset-title { color: var(--text-color); }.dice-preset-btn { background: #28243e; color: #e0d4ff; min-width: 44px; min-height: 44px; }.dice-preset-btn:hover { background: #3d3158; box-shadow: none; }
.dice-container { height: 360px; margin: 0; border: 1px solid var(--line); border-radius: 16px; }.dice-controls, .coin-controls { padding: 24px 0; }
.dice-count button { min-width: 44px; min-height: 44px; }
.coin-3d-container { height: 320px; }.coin-skin-btn { min-height: 44px; }
.random-config { margin: 0 0 24px; }.random-container { padding: 0; }
.input-group input, .input-group select, .config-row input, .config-row select, .player-input { border-color: var(--line); background: #0f1626; color: var(--text-color); min-width: 0; font-size: 16px; border-radius: 10px; min-height: 44px; }
.random-result { overflow-wrap: anywhere; }.hint { color: var(--text-secondary); font-size: 13px; }
.config-group { min-width: 0; flex-wrap: wrap; }
.config-group input[type="number"], .config-group select { min-width: 0; max-width: 100%; background: #0f1626; border: 1px solid var(--line); box-shadow: none; font-size: 16px; }
.config-group input[type="number"]:focus { box-shadow: none; border-color: #a78bfa; }
.random-number { background: #302746; color: #e2d5ff; box-shadow: none; border: 1px solid #534267; font-size: 24px; font-weight: 600; }
.random-number::before { display: none; }
.bottle-container { width: min(320px, calc(86.2% - 55px)); max-width: 320px; height: auto; aspect-ratio: 1; background: none; border: 1px dashed #4a425e; }
#bottle-page .bottle-container { margin-top: 56px; margin-bottom: 52px; }
.bottle-controls { margin-top: 0; padding: 20px 0; }.bottle-players { padding: 20px 0; }
.player-marker { width: 48px; height: 48px; background: #302746; color: #e2d5ff; border: 1px solid #75628f; font-size: 12px; font-weight: 500; text-shadow: none; box-shadow: none; animation: none; overflow: hidden; padding: 4px; overflow-wrap: anywhere; line-height: 1.3; text-align: center; }
.player-marker.selected { background: #665032; color: #fff1ca; border-color: #d0af6f; box-shadow: 0 0 0 4px #d0af6f18; animation: none; }
.player-name { min-width: 0; background: #0f1626; border: 1px solid var(--line); font-size: 16px; }.player-name:focus { box-shadow: none; border-color: #a78bfa; }
.card-front { background: linear-gradient(145deg,#3b2f58,#24213c); border: 1px solid #6c588d; text-shadow: none; color: #d6c4ff; box-shadow: var(--shadow); }
.card-front::before { animation: none; }.card-back { background: var(--surface); border: 1px solid #75628f; color: #e2d5ff; text-shadow: none; box-shadow: var(--shadow); }
.card-count { flex-wrap: wrap; }.card-count input { font-size: 16px; min-height: 44px; border-radius: 8px; background: #0f1626; border-color: var(--line); }
#coin-skin { min-height: 44px; background-color: var(--surface); border: 1px solid var(--line); font-size: 14px; }#coin-skin:focus { box-shadow: none; outline: 2px solid #c4b5fd; outline-offset: 3px; }
/* Dialogs and drawers */
.modal { background: #050914bb; backdrop-filter: blur(5px); padding: 16px; }
.modal-content { background: var(--surface); border: 1px solid #3c405b; border-radius: 20px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); animation: fadeIn .2s ease; }
.modal-header { padding: 16px 20px; }.modal-header h3 { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.modal-header .modal-close { width: 44px; min-height: 44px; border-radius: 8px; font-size: 24px; }
.modal-header .modal-close:hover, .panel-close:hover { background: var(--surface-hover); }
.result-display { color: #d6c4ff; background: none; -webkit-text-fill-color: currentColor; font-size: clamp(28px,5vw,44px); line-height: 1.4; min-height: 100px; font-weight: 650; animation: none; filter: none; text-shadow: none; overflow-wrap: anywhere; }
.modal-footer { padding: 16px 20px; }.modal-footer .modal-close { font-size: 15px; line-height: 1.4; }
.panel { max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); transition: transform .22s ease; visibility: hidden; padding-bottom: env(safe-area-inset-bottom); }
.panel.active { visibility: visible; }.panel-header h3 { background: none; color: var(--text-color); -webkit-text-fill-color: currentColor; font-size: 17px; }.panel-header { padding: 10px 20px; }
.panel-overlay { background: #050914b3; backdrop-filter: blur(4px); }
.history-type { color: #c4b5fd; }.history-index { background: #8b5cf61a; color: #c4b5fd; }.toggle-switch input:checked + .toggle-slider { background: #7c4fe0; }.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid #c4b5fd; outline-offset: 4px; }
/* Higher specificity intentionally overrides consent styles injected by its script. */
body .cookie-consent-banner { left: 20px; right: 20px; bottom: 16px; width: auto; max-width: 720px; margin: 0 auto; padding: 18px 22px; border: 1px solid #41465e; border-radius: 16px; background: #192135; box-shadow: var(--shadow-lg); backdrop-filter: none; }
body .cookie-consent-content { gap: 14px; flex-wrap: wrap; }
body .cookie-consent-banner:not(.show) { visibility: hidden; }
body .cookie-consent-banner.show { bottom: max(16px, env(safe-area-inset-bottom)); }
body .cookie-consent-text { gap: 10px; min-width: 0; flex-basis: 100%; }body .cookie-consent-text p { color: #c6cede; font-size: 13px; line-height: 1.7; }body .cookie-icon { font-size: 23px; }
body .cookie-consent-buttons { gap: 8px; flex-wrap: wrap; margin-left: auto; }
body .cookie-btn { min-height: 44px; font-size: 12px; font-weight: 500; border-radius: 8px; padding: 10px 14px; white-space: normal; }
body .cookie-btn-accept { background: #7c4fe0; }body .cookie-btn-accept:hover { background: #8960e8; transform: none; box-shadow: none; }
body .cookie-btn-reject, body .cookie-btn-settings, body .cookie-btn-secondary { background: #252f45; color: var(--text-color); border: 1px solid #46516a; }
body .cookie-settings-content { background: var(--surface); color: var(--text-color); border: 1px solid var(--line); border-radius: 16px; }
body:has(.modal.active), body:has(.panel.active) { overflow: hidden; }
@media (min-width: 1400px) { .wheel-stage .canvas-wrapper { max-width: 370px; width: min(100%,370px); } }
@media (min-width: 701px) {
    .panel { top: 50%; bottom: auto; transform: translate(-50%, -45%); border: 1px solid var(--line); border-radius: 20px; opacity: 0; transition: transform .22s ease, opacity .22s ease; }
    .panel.active { transform: translate(-50%, -50%); opacity: 1; }.panel-handle { display: none; }
}
@media (max-width: 900px) {
    #app { padding: 0 24px; }
    .home-hero { gap: 10px; }.hero-art { min-height: 310px; }.preview-wheel { width: 224px; }.orbit { width: 265px; height: 265px; }.orbit-two { width: 330px; height: 330px; }
    .tools-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }.tool-card { padding: 16px; }.tool-card-title { font-size: 14px; }.tool-arrow { right: 16px; }
    .help-strip { align-items: flex-start; flex-direction: column; gap: 12px; }
    .wheel-workspace { gap: 16px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }.wheel-stage { padding: 18px; }.template-selector, .option-editor { padding: 16px; }
}
@media (max-width: 700px) {
    #app { padding: 0 20px; }.site-nav { min-height: 72px; }.brand { font-size: 20px; }.brand-mark { width: 28px; height: 28px; }.nav-label { display: none; }.nav-button { padding: 8px 10px; }.language-btn { margin-left: 2px; }
    .home-hero { padding: 32px 0; grid-template-columns: 1fr; gap: 0; }.hero-copy h1 { font-size: 38px; letter-spacing: -1px; }.hero-description { max-width: 450px; font-size: 14px; }.hero-art { display: none; }
    .hero-cta { margin-top: 20px; }.quick-templates { margin-top: 10px; }
    .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }.section-heading h2 { font-size: 21px; text-wrap: balance; }.section-heading .eyebrow { font-size: 11px; }.section-note { max-width: none; text-align: left; font-size: 11px; padding-top: 0; }
    .tools-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.tool-card { padding: 18px 16px; }.tool-card-title { font-size: 15px; }.tool-card-desc { font-size: 12px; }.tool-icon { width: 40px; height: 40px; font-size: 25px; margin-bottom: 12px; }
    .help-strip { margin: 24px 0; padding: 24px 0; }.help-links { gap: 8px 20px; }.footer-top { flex-wrap: wrap; gap: 4px; }.site-footer p { line-height: 1.8; }
    .page-header { padding-top: 20px; }.page-header :is(h1,h2) { font-size: 20px; }.tool-intro { font-size: 13px; margin-bottom: 20px; }
    .wheel-workspace { grid-template-columns: minmax(0,1fr); }.wheel-stage { padding: 20px; }.wheel-stage .canvas-wrapper { max-width: 290px; width: 100%; margin: 22px auto; }.stage-hint { font-size: 11px; }.wheel-stage #spin-btn { max-width: none; }
    .wheel-config { gap: 16px; }.template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.option-item input[type="text"], .option-item input[type="number"] { font-size: 16px; }
    .mobile-template-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
    .mobile-template-shortcuts button { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12px; background: #101727; color: #d6cafa; }
    .dice-container { height: 300px; }.dice-controls, .coin-controls { padding: 20px 0; }.coin-3d-container { height: 280px; }
    .page-header .dice-count { margin-left: auto; }.page-header:has(.dice-count) h2 { flex-basis: calc(100% - 100px); }
    .modal-content { max-height: 85svh; }.panel { max-height: 80svh; }.modal-footer { gap: 8px; }.modal-footer .btn { padding: 12px; }
    body .cookie-consent-banner { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 16px; }body .cookie-consent-buttons { width: 100%; margin: 0; }body .cookie-btn { flex: 1; padding: 10px 8px; }body .cookie-consent-text { flex-direction: row; text-align: left; }body .cookie-icon { display: none; }
}
@media (max-width: 360px) {
    #app { padding: 0 16px; }.brand { gap: 6px; font-size: 18px; }.brand-mark { width: 24px; height: 24px; }.nav-actions { gap: 0; }.nav-button { padding: 8px; }.language-btn { padding: 8px; min-width: 40px; }
    .hero-copy h1 { font-size: 34px; }.tool-card { padding: 16px 12px; }.tool-card-title { font-size: 14px; }.tool-card-desc { font-size: 11px; }.tool-arrow { right: 12px; }
    .wheel-stage { padding: 16px; }.template-selector, .option-editor { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
