/* Coffee Clicker. Direção: "saca de café" (juta, carimbo, costura tracejada, etiqueta de armazém), derivada do assunto e não de um modelo.
   Cor de destaque única: a cereja do café (--accent); o ouro (--accent-2) é só do grão dourado e das conquistas. Divisões rígidas e sombra
   SÓLIDA, sem desfoque. Tema CLARO por padrão e escuro só pelo botão (o <head> da página põe data-theme antes da pintura).
   Animações param com data-motion="reduced" (botão Animações ou prefers-reduced-motion). Fontes embutidas (public/vendor/coffee-clicker). */

@font-face { font-family: 'Big Shoulders Display'; src: url('/vendor/coffee-clicker/big-shoulders-display.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/vendor/coffee-clicker/hanken-grotesk.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
	--display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
	--text: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--accent: #ab2128; --accent-2: #e8a317;
	--paper: #efe3cf; --paper-2: #e4d3b8; --card: #fbf4e6; --ink: #2a1810; --soft: #5e4a3b; --line: rgba(42, 24, 16, 0.24);
	--on-accent: #fff6e6; --ok: #2f6b4a; --solid: #2a1810; --wash: rgba(42, 24, 16, 0.07);
	--crema: #c98a4b; --coffee: #3b2314; --steam: #fffaf0; --stamp: #ab2128;
	--bar-h: 56px; --tabs-h: 62px;
	color-scheme: light;
}
:root[data-theme='dark'] {
	--accent: #e8625c; --accent-2: #f0b429;
	--paper: #1c130e; --paper-2: #281a13; --card: #32221a; --ink: #f5e9d4; --soft: #cdb99c; --line: rgba(245, 233, 212, 0.26);
	--on-accent: #1c130e; --ok: #7fcf9d; --solid: #0d0806; --wash: rgba(245, 233, 212, 0.07);
	--crema: #c98a4b; --coffee: #5a3a22; --steam: #fff6e6; --stamp: #e8625c;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--text); overflow: hidden; -webkit-tap-highlight-color: transparent; text-size-adjust: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
h2, h3, p { margin: 0; }
kbd { font: 700 0.85em var(--text); padding: 0.05em 0.45em; border: 2px solid var(--ink); border-radius: 6px; background: var(--card); }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; margin: 0; background: var(--paper); font-weight: 700; text-align: center; z-index: 200; }

/* ───────── aplicativo: ocupa a janela, sem rolar a página ───────── */
.app { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); opacity: 1; transition: opacity 0.35s; }
body[data-boot='loading'] .app { opacity: 0; }

.bar { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'brand tools' 'ticker ticker'; align-items: center; gap: 2px 10px; padding: max(6px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 4px max(14px, env(safe-area-inset-left)); background: var(--paper); border-bottom: 2px solid var(--ink); position: relative; z-index: 6; }
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #f5e9d4; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--solid); }
.brand__mark .i { width: 24px; height: 24px; stroke: none; }
.brand__name { font: 800 28px/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.brand__name b { color: var(--accent); font-weight: 800; margin-left: 0.18em; }
.ticker { grid-area: ticker; display: flex; align-items: baseline; gap: 10px; min-width: 0; margin: 0; font-size: 13px; color: var(--soft); line-height: 1.5; padding-bottom: 2px; }
.ticker__tag { flex: none; font: 800 12px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 3px 6px 2px; border-radius: 4px; }
.ticker__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity 0.4s; }
.ticker__text[data-swap='out'] { opacity: 0; }
.tools { grid-area: tools; display: flex; align-items: center; gap: 6px; }
.tool { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: 2px 2px 0 var(--solid); transition: transform 0.08s, box-shadow 0.08s; }
.tool[aria-pressed='false']:not(#themeToggle) { background: var(--paper-2); color: var(--soft); }
.tool:active { transform: translate(2px, 2px); box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--accent-2); color: #2a1810; font-weight: 800; font-size: 14px; box-shadow: 2px 2px 0 var(--solid); }
.pill[hidden] { display: none; }

/* ───────── jogo: palco (xícara) e painel (loja) ───────── */
.game { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); min-height: 0; }

.stage { --stage-h: clamp(250px, 40dvh, 360px); position: relative; height: var(--stage-h); overflow: hidden; background-color: var(--paper-2); background-image: repeating-linear-gradient(0deg, var(--wash) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, var(--wash) 0 1px, transparent 1px 4px); border-bottom: 2px solid var(--ink); isolation: isolate; user-select: none; -webkit-user-select: none; }
.stage::after { content: ''; position: absolute; inset: 8px; border: 2px dashed var(--line); border-radius: 14px; pointer-events: none; z-index: 5; }
.stage__stamp { position: absolute; z-index: 0; left: 50%; top: 52%; width: min(86%, calc(var(--stage-h) * 1.15)); transform: translate(-50%, -50%) rotate(-9deg); color: var(--stamp); opacity: 0.16; pointer-events: none; }
.stage__rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.stage__wave { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: calc(12% + var(--milk, 0) * 36%); transition: height 1.4s ease; overflow: hidden; pointer-events: none; }
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.wave--back { fill: var(--crema); opacity: 0.4; animation: drift 22s linear infinite; }
.wave--front { fill: var(--coffee); opacity: 0.28; animation: drift 15s linear infinite reverse; }
@keyframes drift { to { transform: translateX(-50%); } }

.count { position: absolute; z-index: 3; left: 18px; top: 14px; right: 18px; pointer-events: none; }
.count__label { font: 800 12px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--soft); }
.count__num { font: 800 clamp(46px, 13vw, 84px) / 0.92 var(--display); letter-spacing: -0.005em; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }
.count__unit { font: 800 clamp(16px, 4vw, 22px) / 1.1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.count__rate { margin-top: 4px; font-size: 14px; color: var(--soft); }
.count__rate b { color: var(--ink); font-variant-numeric: tabular-nums; }

.cup { position: absolute; z-index: 2; left: 54%; bottom: 9%; transform: translateX(-50%); width: min(76%, calc(var(--stage-h) * 0.72 * 320 / 280)); aspect-ratio: 320 / 280; padding: 0; border: 0; background: none; touch-action: none; border-radius: 28px; -webkit-user-select: none; user-select: none; }
.cup:focus-visible { outline: 4px solid var(--accent); outline-offset: 4px; }
.cup__svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 94%; pointer-events: none; }
:root[data-motion='full'] .stage .cup__svg { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.012, 0.994); } }
.cup__art { display: none; }
.cup[data-art='puro'] .cup__art[data-art='puro'], .cup[data-art='coracao'] .cup__art[data-art='coracao'], .cup[data-art='rosetta'] .cup__art[data-art='rosetta'], .cup[data-art='tulipa'] .cup__art[data-art='tulipa'], .cup[data-art='cisne'] .cup__art[data-art='cisne'] { display: inline; }
.cup__ripples ellipse { fill: none; stroke: #fff6e6; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: ripple 0.95s ease-out forwards; }
@keyframes ripple { from { transform: scale(0.25); opacity: 0.85; } to { transform: scale(1.18); opacity: 0; } }
.steam { fill: none; stroke: var(--steam); stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(70, 35, 12, 0.5)); stroke-dasharray: 38 100; stroke-dashoffset: 38; opacity: 0; }
:root[data-motion='full'] .stage .steam { animation: steam 4.6s ease-in-out infinite; }
:root[data-motion='full'] .stage .steam--2 { animation-delay: -1.6s; }
:root[data-motion='full'] .stage .steam--3 { animation-delay: -3.1s; }
:root[data-motion='full'] .stage[data-heat='2'] .steam, :root[data-motion='full'] .stage[data-heat='3'] .steam { animation-duration: 3.6s; }
:root[data-motion='full'] .stage[data-heat='3'] .steam { stroke-width: 7; }
@keyframes steam { 0% { stroke-dashoffset: 38; opacity: 0; } 22% { stroke-dashoffset: 0; opacity: 0.9; } 80% { stroke-dashoffset: -62; opacity: 0.6; } 100% { stroke-dashoffset: -100; opacity: 0; } }
:root[data-motion='reduced'] .stage .steam { stroke-dasharray: none; stroke-dashoffset: 0; opacity: 0.5; }
.stage[data-buff~='prod'] .cup::before, .stage[data-buff~='click'] .cup::before { content: ''; position: absolute; inset: -8% -4% 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(232, 163, 23, 0.55), rgba(232, 163, 23, 0) 72%); z-index: -1; }
:root[data-motion='full'] .stage[data-buff~='prod'] .cup::before, :root[data-motion='full'] .stage[data-buff~='click'] .cup::before { animation: glow 1.4s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: 0.55; transform: scale(0.96); } to { opacity: 1; transform: scale(1.04); } }
.stage__hint { position: absolute; z-index: 3; left: 0; right: 0; bottom: 10px; text-align: center; margin: 0; font: 800 13px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); pointer-events: none; }
:root[data-motion='full'] .stage .stage__hint { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-4px); } }
.stage__hint[hidden] { display: none; }

.buffs { position: absolute; z-index: 4; right: 14px; top: 14px; display: grid; gap: 6px; justify-items: end; pointer-events: none; }
.buff { position: relative; overflow: hidden; display: grid; gap: 2px; min-width: 150px; padding: 6px 10px 8px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); box-shadow: 2px 2px 0 var(--solid); font-size: 12px; line-height: 1.25; }
.buff b { font: 800 15px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.buff i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent-2); width: var(--left, 100%); }

/* ───────── painel ───────── */
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.panel__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.tabs { order: 2; flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--ink); background: var(--paper); padding-bottom: env(safe-area-inset-bottom); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tabs-h); padding: 6px 2px; border: 0; border-right: 2px solid var(--line); background: transparent; font: 800 12px/1.1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
.tab:last-child { border-right: 0; }
.tab[aria-selected='true'] { background: var(--ink); color: var(--paper); }
.tab:focus-visible { outline-offset: -4px; }
.tab__dot { position: absolute; top: 8px; right: calc(50% - 22px); width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); border: 2px solid var(--ink); }
.tab__dot[hidden] { display: none; }
.tabpanel[hidden] { display: none; }

.lead { padding: 14px 16px 6px; color: var(--soft); font-size: 15px; }
.sect { margin: 0; padding: 20px 16px 8px; font: 800 20px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.hint { padding: 0 16px 10px; color: var(--soft); font-size: 14px; }
.hint .i { vertical-align: -3px; }

.qty { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 2px dashed var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.qty__label { font: 800 13px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); margin-right: 4px; }
.qty__btn { min-width: 52px; height: 44px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font: 800 17px/1 var(--display); letter-spacing: 0.04em; }
.qty__btn[aria-pressed='true'] { background: var(--ink); color: var(--paper); box-shadow: 2px 2px 0 var(--accent); }

/* linhas de máquina, melhoria e perk: o botão da linha inteira é a ação de comprar */
.rows { display: block; }
.row { display: block; border-bottom: 2px dashed var(--line); position: relative; }
.row[data-state='hidden'] { display: none; }
.row__buy { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 76px; padding: 10px 14px; border: 0; background: transparent; text-align: left; transition: background 0.15s; }
.row__icon { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid var(--ink); border-radius: 14px; background: #f5e9d4; box-shadow: 3px 3px 0 var(--solid); transition: transform 0.12s; }
.row__icon svg { width: 42px; height: 42px; }
.row__main { display: grid; gap: 1px; min-width: 0; }
.row__name { font: 800 21px/1.05 var(--display); letter-spacing: 0.03em; text-transform: uppercase; overflow-wrap: anywhere; }
.row__cost { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row__cost svg { width: 16px; height: 16px; flex: none; }
.row__tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 800 12px/1.5 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.row__each, .row__desc { font-size: 13px; color: var(--soft); line-height: 1.35; }
.row__count { min-width: 2ch; text-align: right; font: 800 40px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); opacity: 0.9; }
.row[data-state='ready'] .row__buy { background: color-mix(in srgb, var(--accent-2) 18%, transparent); }
.row[data-state='ready'] .row__tag { background: var(--ok); color: #fff6e6; }
:root[data-theme='dark'] .row[data-state='ready'] .row__tag { color: #0d0806; }
.row[data-state='poor'] .row__tag { background: transparent; border: 2px solid var(--line); color: var(--soft); padding: 0 8px; }
.row[data-state='poor'] .row__name { color: var(--soft); }
.row[data-state='locked'] .row__icon svg { filter: brightness(0) opacity(0.35); }
.row[data-state='locked'] .row__name { letter-spacing: 0.3em; color: var(--soft); }
.row__buy:focus-visible { outline-offset: -4px; }
.row__buy[aria-disabled='true'] { cursor: default; }
@media (hover: hover) { .row__buy:hover { background: var(--wash); } .row[data-state='ready'] .row__buy:hover { background: color-mix(in srgb, var(--accent-2) 30%, transparent); } .row__buy:hover .row__icon { transform: translateY(-2px) rotate(-3deg); } }
.row__buy:active .row__icon { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--solid); }
.row__scene { display: flex; align-items: flex-end; height: 26px; padding: 0 14px 6px 82px; overflow: hidden; pointer-events: none; }
.row__scene:empty { display: none; }
.mini { width: 24px; height: 24px; flex: none; margin-right: -6px; }
.mini--new { animation: mini-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes mini-pop { from { transform: translateY(-14px) scale(0.2); opacity: 0; } }
.row__more { margin-left: 10px; align-self: center; font: 800 13px/1 var(--display); color: var(--soft); letter-spacing: 0.08em; }
.row--flash { animation: row-flash 0.55s ease-out; }
@keyframes row-flash { from { background: color-mix(in srgb, var(--accent-2) 55%, transparent); } }
.row--shake .row__buy { animation: shake 0.32s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.row__count--pop { animation: count-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes count-pop { 40% { transform: scale(1.35); } }
.rows--up .row__icon { border-radius: 50%; }
.rows--up .row__buy { min-height: 84px; }
.rows--perks .row[data-state='owned'] .row__tag { background: var(--ink); color: var(--paper); }

.empty { display: grid; justify-items: center; gap: 8px; padding: 36px 24px; text-align: center; }
.empty__art { width: 76px; height: 76px; opacity: 0.8; }
.empty__title { font: 800 24px/1.1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.empty__text { color: var(--soft); max-width: 32ch; }
.empty[hidden] { display: none; }

/* conquistas */
.latte { display: grid; gap: 10px; padding: 16px; border-bottom: 2px dashed var(--line); }
.latte__title { font: 800 26px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.latte__sub { color: var(--soft); font-size: 14px; margin-top: 4px; }
.meter { height: 16px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper-2); }
.meter i { display: block; height: 100%; width: 0; background: var(--accent-2); transition: width 0.9s ease; }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px 10px; padding: 16px; }
.stamp { display: grid; justify-items: center; gap: 4px; text-align: center; }
.stamp__seal { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 3px dashed var(--line); color: var(--soft); }
.stamp__seal .i { width: 30px; height: 30px; }
.stamp[data-got='true'] .stamp__seal { border: 3px solid var(--accent); background: var(--accent); color: var(--on-accent); transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--solid); }
.stamp__name { font: 800 16px/1.1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.stamp__how { font-size: 12px; line-height: 1.3; color: var(--soft); }
.stamp[data-got='false'] .stamp__name { color: var(--soft); }

/* Nova safra */
.safra { display: grid; gap: 10px; padding: 18px 16px 6px; justify-items: start; }
.safra__kicker { font: 800 13px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.safra__title { font: 800 34px/0.98 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.safra__text { color: var(--soft); max-width: 48ch; }
.safra__text b { color: var(--ink); }
.safra__facts { display: grid; gap: 0; width: 100%; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--paper); }
.safra__facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 2px dashed var(--line); }
.safra__facts div:last-child { border-bottom: 0; }
.safra__facts dt { color: var(--soft); font-size: 14px; }
.safra__facts dd { font: 800 22px/1 var(--display); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.safra__need { color: var(--soft); font-size: 14px; min-height: 1.5em; }

/* menu */
.stats { padding: 0 16px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 2px dashed var(--line); }
.stats dt { color: var(--soft); }
.stats dd { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.opts { padding: 0 0 4px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 16px; border-bottom: 2px dashed var(--line); }
.opt__name { font-weight: 700; }
.opt--range { display: grid; grid-template-columns: auto minmax(0, 1fr) 3.4ch; }
.opt--range input { width: 100%; accent-color: var(--accent); min-height: 32px; }
.opt--range output { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.opt--seg { flex-direction: column; align-items: flex-start; padding-bottom: 12px; }
.switch { position: relative; flex: none; width: 56px; height: 32px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); padding: 0; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; inset: -8px -6px; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1); }
.switch[aria-checked='true'] { background: var(--accent); }
.switch[aria-checked='true'] i { transform: translateX(24px); background: var(--on-accent); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__btn { min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 700; }
.seg__btn[aria-pressed='true'] { background: var(--ink); color: var(--paper); box-shadow: 2px 2px 0 var(--accent); }
.saves { display: grid; gap: 10px; padding: 0 16px 6px; justify-items: start; }
.field { font-weight: 700; margin-top: 4px; }
.input { width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: vertical; }
.field__error { color: var(--accent); font-weight: 700; }
.field__error[hidden] { display: none; }
.foot { padding: 24px 16px 20px; margin-top: 18px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--soft); display: grid; gap: 10px; }
.foot__note { font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); font: 800 17px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; box-shadow: 3px 3px 0 var(--solid); transition: transform 0.08s, box-shadow 0.08s; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--quiet { box-shadow: none; background: transparent; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--solid); }
.btn[aria-disabled='true'] { background: var(--paper-2); color: var(--soft); box-shadow: none; border-style: dashed; cursor: default; }
@media (hover: hover) { .btn:hover:not([aria-disabled='true']), .tool:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--solid); } .tab:hover:not([aria-selected='true']) { background: var(--wash); } .qty__btn:hover, .seg__btn:hover { background: var(--paper-2); } }

/* ───────── camadas sobre o jogo ───────── */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }
.floats { position: fixed; inset: 0; z-index: 41; pointer-events: none; overflow: hidden; }
.float { position: absolute; font: 800 26px/1 var(--display); letter-spacing: 0.03em; color: var(--ink); text-shadow: 0 2px 0 var(--paper), 0 0 6px var(--paper); animation: float-up 1.05s ease-out forwards; white-space: nowrap; }
.float--gold { color: var(--accent); font-size: 32px; }
@keyframes float-up { from { transform: translate(-50%, 0) scale(0.7); opacity: 0; } 15% { transform: translate(-50%, -12px) scale(1.12); opacity: 1; } to { transform: translate(-50%, -78px) scale(1); opacity: 0; } }
.sky { position: fixed; inset: 0; z-index: 42; pointer-events: none; }
.gold { position: absolute; width: 88px; height: 88px; padding: 0; border: 0; background: none; pointer-events: auto; touch-action: manipulation; animation: gold-in 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.gold::before { content: ''; position: absolute; inset: -30%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(240, 180, 41, 0.5) 0 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(closest-side, transparent 28%, #000 40%, transparent 72%); mask: radial-gradient(closest-side, transparent 28%, #000 40%, transparent 72%); z-index: -1; }
:root[data-motion='full'] .gold::before { animation: spin 7s linear infinite; }
:root[data-motion='full'] .gold__svg { animation: bob 2.2s ease-in-out infinite alternate; }
.gold__svg { width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(240, 180, 41, 0.85)); }
.gold:focus-visible { outline: 4px solid var(--accent); outline-offset: 6px; border-radius: 50%; }
.gold[data-leaving='true'] { animation: gold-out 0.45s ease-in forwards; }
.gold[data-last='true'] { opacity: 0.85; }
:root[data-motion='full'] .gold[data-last='true'] { animation: gold-blink 0.5s steps(2) infinite; }
@keyframes gold-in { from { transform: scale(0) rotate(-120deg); opacity: 0; } }
@keyframes gold-out { to { transform: scale(0.2) translateY(-20px); opacity: 0; } }
@keyframes gold-blink { 50% { opacity: 0.35; } }
@keyframes bob { to { transform: translateY(-8px) rotate(6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

.seals { position: fixed; z-index: 60; left: 0; right: 0; top: max(10px, env(safe-area-inset-top)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.seal { display: flex; align-items: center; gap: 10px; max-width: min(92vw, 380px); padding: 8px 16px 8px 8px; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 4px 4px 0 var(--solid); animation: seal-in 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both, seal-out 0.4s ease-in 4.2s forwards; }
.seal__mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); transform: rotate(-8deg); border: 3px solid var(--ink); }
.seal__mark .i { width: 22px; height: 22px; }
.seal__kicker { font: 800 12px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.seal__name { font: 800 20px/1.05 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.seal__how { font-size: 13px; color: var(--soft); }
@keyframes seal-in { from { transform: translateY(-40px) scale(0.8) rotate(-4deg); opacity: 0; } }
@keyframes seal-out { to { transform: translateY(-30px); opacity: 0; } }

.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: min(92vw, 460px); padding: 12px 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 4px 4px 0 var(--accent); pointer-events: none; animation: toast-in 0.3s ease-out; }
.toast[hidden] { display: none; }
.toast__action { pointer-events: auto; min-height: 44px; padding: 0 12px; border: 2px solid var(--paper); border-radius: 8px; background: transparent; color: var(--paper); font-weight: 800; }
@keyframes toast-in { from { transform: translate(-50%, 16px); opacity: 0; } }

.sheet { width: min(92vw, 420px); padding: 0; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 6px 6px 0 var(--solid); }
.sheet::backdrop { background: rgba(20, 12, 8, 0.6); }
.sheet__form { display: grid; gap: 14px; padding: 20px; }
.h2 { font: 800 30px/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; }
.sheet__text { color: var(--soft); }
.sheet__text b { color: var(--ink); }
.sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet__actions .btn:first-child { order: 0; }

/* ───────── telas largas e janelas deitadas: palco à esquerda, painel à direita ───────── */
@media (min-width: 880px), (min-width: 620px) and (orientation: landscape) {
	.bar { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'brand ticker tools'; gap: 16px; padding-bottom: 6px; }
	.ticker { padding: 0; font-size: 14px; }
	.game { grid-template-columns: minmax(340px, 5fr) minmax(0, 6fr); grid-template-rows: minmax(0, 1fr); }
	.stage { --stage-h: min(78dvh, 640px); height: auto; border-bottom: 0; border-right: 2px solid var(--ink); }
	.cup { width: min(86%, 520px, calc((100dvh - var(--bar-h)) * 0.56 * 320 / 280)); bottom: 6%; }
	.count { left: 28px; top: 22px; }
	.count__num { font-size: clamp(56px, 7vw, 108px); }
	.tabs { order: 0; border-top: 0; border-bottom: 2px solid var(--ink); padding-bottom: 0; }
	.tab { min-height: 56px; }
	.toast { bottom: 24px; left: calc(100vw - (100vw - max(340px, 45.45vw)) / 2); }
	.seals { right: auto; width: max(340px, 45.45vw); }
	.cup { left: 50%; bottom: 6%; }
}
@media (min-width: 1100px) { .tab { flex-direction: row; gap: 8px; min-height: 52px; font-size: 14px; } .tab__dot { top: 10px; right: 10px; } }
@media (max-width: 379px) { .brand__name { display: flex; flex-direction: column; font-size: 21px; line-height: 0.88; } .brand__name b { margin-left: 0; } .brand__mark { width: 34px; height: 34px; } .tools { gap: 4px; } .tab span { font-size: 10px; letter-spacing: 0.04em; } }
@media (max-height: 640px) and (max-width: 619px) { .stage { --stage-h: clamp(210px, 36dvh, 300px); } .count__num { font-size: clamp(40px, 11vw, 60px); } }

/* ───────── movimento reduzido (botão Animações ou preferência do sistema) ───────── */
:root[data-motion='reduced'] *, :root[data-motion='reduced'] *::before, :root[data-motion='reduced'] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-motion='reduced'] .fx { display: none; }
