/* =========================================================
   MONSTER GYM — Design system
   Paleta: CORES.svg · Monstros: Profile Pictures.svg · Logo: LOGO.svg
   ========================================================= */
@import url('fonts/fonts.css');

:root {
  /* Cores da marca (CORES.svg) */
  --c-blue: #22A6FA;
  --c-orange: #F99A0F;
  --c-purple: #A251B0;
  --c-lime: #BFD025;
  --c-teal: #66BDC6;
  --c-magenta: #CB2C85;
  --c-green: #0EC099;
  --c-pink: #E57DB6;
  --c-red: #F2601B;
  --c-plum: #59103A;

  /* Papéis */
  --brand: var(--c-lime);
  --brand-strong: #A9B71F;
  --brand-deep: #687013;
  --brand-ink: #3D4600;
  --success: var(--c-green);
  --danger: #E5484D;
  --warning: var(--c-orange);
  --info: var(--c-blue);
  --rest: var(--c-teal);
  --food: var(--c-orange);
  --body: var(--c-purple);

  /* Superfícies — tema claro */
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-2: #F0EDE5;
  --surface-3: #E7E3D9;
  --ink: #221726;
  --ink-2: #4B3F4E;
  --muted: #8A7F8C;
  --line: #ECE7DF;
  --lip: rgba(34, 23, 38, .10);
  --shadow: 0 1px 2px rgba(34, 23, 38, .05), 0 8px 24px rgba(34, 23, 38, .06);
  --shadow-lg: 0 16px 40px rgba(34, 23, 38, .16);
  --on-color: #FFFFFF;
  --scrim: rgba(20, 12, 22, .42);
  --tabbar-bg: rgba(255, 255, 255, .9);

  --radius: 24px;
  --radius-sm: 16px;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --fs: 1;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(70px + var(--safe-bottom));

  /* Compatibilidade com o código anterior */
  --accent: var(--brand);
  --accent-strong: var(--brand-strong);
  --accent-ink: var(--brand-ink);
  --accent-soft: #F1F6D2;
  --soft: var(--surface-2);
  --card: var(--surface);
  --dark: #221726;
  --danger-soft: #FDECEC;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #151017;
  --surface: #211A24;
  --surface-2: #2B232F;
  --surface-3: #372D3B;
  --ink: #F6F0F4;
  --ink-2: #D7CCD6;
  --muted: #A396A6;
  --line: #322937;
  --lip: rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .6);
  --tabbar-bg: rgba(33, 26, 36, .92);
  --brand-ink: #D8E85A;
  --accent-soft: #343A14;
  --dark: #0E0A10;
  --danger-soft: #3A1E22;
  color-scheme: dark;
}
:root[data-fontsize="large"] { --fs: 1.12; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { font-size: calc(16px * var(--fs)); }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  -webkit-user-select: none; user-select: none; font-weight: 500;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; border-radius: 10px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }
#view { padding: calc(var(--safe-top) + 14px) 18px calc(var(--tabbar-h) + 30px); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Tipografia ---------- */
h1 { font-size: 1.85rem; letter-spacing: -.5px; margin: 4px 0 2px; font-weight: 800; line-height: 1.1; }
h2 { font-size: 1.2rem; letter-spacing: -.3px; margin: 0; font-weight: 800; }
h3 { font-size: 1rem; margin: 0; font-weight: 700; }
.sub { color: var(--muted); font-size: .94rem; margin: 0; line-height: 1.4; }
.small { font-size: .82rem; color: var(--muted); }
.tiny { font-size: .72rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--danger); }
.down { color: var(--success); }
.brand-title { font-family: var(--font-display); font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }
.brand-sub { font-weight: 300; letter-spacing: .32em; text-transform: uppercase; font-size: .72rem; }
.eyebrow { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

/* ---------- Layout ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-height: 48px; }
.topbar .title { min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; gap: 10px; }
.link { color: var(--brand-ink); font-weight: 700; font-size: .88rem; }
:root[data-theme="dark"] .link { color: var(--c-lime); }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3f { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* ---------- Cards (base mais escura, como os monstros) ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow), inset 0 -4px 0 var(--lip);
}
.card + .card { margin-top: 12px; }
.card.flat { box-shadow: none; border: 1.5px solid var(--line); }
.card.tap { transition: transform .15s; cursor: pointer; }
.card.tap:active { transform: scale(.985); }
.card.color { color: var(--on-color); background: var(--cc, var(--c-blue)); box-shadow: 0 10px 28px color-mix(in srgb, var(--cc, var(--c-blue)) 35%, transparent), inset 0 -6px 0 rgba(0,0,0,.14); }
.card.color .small, .card.color .tiny, .card.color .sub, .card.color .eyebrow { color: rgba(255,255,255,.82); }
.card.dark { background: var(--dark); color: #fff; box-shadow: var(--shadow-lg), inset 0 -4px 0 rgba(0,0,0,.4); }
.card.dark .small, .card.dark .tiny { color: #A99DAB; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px; border-radius: 18px; font-weight: 800; font-size: 1rem; letter-spacing: .2px;
  transition: transform .08s, box-shadow .08s, filter .15s; position: relative;
}
.btn:active { transform: translateY(3px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: #1E2300; box-shadow: 0 4px 0 var(--brand-deep); }
.btn.primary:active { box-shadow: 0 1px 0 var(--brand-deep); }
.btn.dark { background: var(--ink); color: var(--bg); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.btn.dark:active { box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.btn.soft { background: var(--surface-2); color: var(--ink); box-shadow: 0 3px 0 var(--surface-3); }
.btn.soft:active { box-shadow: 0 1px 0 var(--surface-3); }
.btn.danger { background: var(--danger-soft); color: var(--danger); box-shadow: 0 3px 0 color-mix(in srgb, var(--danger) 25%, transparent); }
.btn.color { background: var(--cc); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--cc) 60%, #000); }
.btn.color:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--cc) 60%, #000); }
.btn.white { background: #fff; color: #221726; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.btn.outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: .85rem; border-radius: 14px; }
.btn.sm.primary, .btn.sm.soft { box-shadow: 0 3px 0 var(--brand-deep); }
.btn.sm.soft { box-shadow: 0 3px 0 var(--surface-3); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.btn.pulse { animation: btn-pulse 1.4s ease-in-out infinite; }
@keyframes btn-pulse { 50% { transform: scale(1.03); } }

.icon-btn {
  width: 46px; height: 46px; border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow), inset 0 -3px 0 var(--lip);
  display: grid; place-items: center; flex-shrink: 0; transition: transform .08s;
}
.icon-btn:active { transform: translateY(2px); }
.icon-btn svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.accent { background: var(--brand); box-shadow: 0 3px 0 var(--brand-deep); }
.icon-btn.accent svg { stroke: #1E2300; }
.icon-btn.ghost { background: var(--surface-2); box-shadow: none; }
.icon-btn.sm { width: 38px; height: 38px; border-radius: 13px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn.clear { background: rgba(255,255,255,.2); box-shadow: none; }
.icon-btn.clear svg { stroke: #fff; }

.play { width: 44px; height: 44px; border-radius: 15px; background: var(--brand); display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 3px 0 var(--brand-deep); transition: transform .08s; }
.play:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--brand-deep); }
.play svg { width: 18px; height: 18px; fill: #1E2300; margin-left: 2px; }
.play.dark { background: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.play.dark svg { fill: var(--brand); }
.play.white { background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.play.white svg { fill: #221726; }

/* ---------- Chips / segment / tags ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; min-height: 38px; padding: 0 16px; border-radius: 13px; background: var(--surface); color: var(--ink-2); font-size: .85rem; font-weight: 700; box-shadow: var(--shadow), inset 0 -3px 0 var(--lip); white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); }
.seg { display: flex; background: var(--surface-2); border-radius: 16px; padding: 4px; gap: 2px; }
.seg button { flex: 1; min-height: 38px; border-radius: 12px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--surface-3), 0 1px 4px rgba(0,0,0,.06); }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 10px; border-radius: 9px; background: var(--accent-soft); color: var(--brand-ink); font-size: .72rem; font-weight: 800; }
.tag.gray { background: var(--surface-2); color: var(--ink-2); }
.tag.dark, .tag.glass { background: rgba(255,255,255,.22); color: #fff; }
.tag.fire { background: color-mix(in srgb, var(--c-orange) 18%, transparent); color: #B86A00; }
:root[data-theme="dark"] .tag.fire { color: var(--c-orange); }
.tag svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Listas ---------- */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow), inset 0 -4px 0 var(--lip); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; min-height: 60px; }
.item + .item { border-top: 1px solid var(--line); }
.item:active { background: var(--surface-2); }
.item .t { font-weight: 700; font-size: .95rem; }
.item .s { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.item .s.down, .stat .foot.down { color: var(--success); }
.item .s.up, .stat .foot.up { color: var(--danger); }
.thumb { width: 48px; height: 48px; border-radius: 15px; flex-shrink: 0; display: grid; place-items: center; background: var(--g, var(--cc, var(--c-blue))); color: #fff; font-weight: 800; font-size: 1.05rem; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.thumb.light { background: var(--accent-soft); color: var(--brand-ink); box-shadow: none; }
.chev { width: 18px; height: 18px; stroke: var(--muted); opacity: .6; fill: none; stroke-width: 2.4; stroke-linecap: round; flex-shrink: 0; }

/* ---------- Estados vazios ---------- */
.empty { text-align: center; padding: 28px 18px; }
.empty .mon { margin: 0 auto 8px; }
.empty p { color: var(--muted); margin: 8px 0 18px; font-size: .92rem; line-height: 1.5; }
.em { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 24px; background: var(--accent-soft); display: grid; place-items: center; }
.em svg { width: 36px; height: 36px; stroke: var(--brand-ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .em svg { stroke: var(--c-lime); }
.em-inline { color: #B86A00; display: inline-flex; }
.em-inline svg, .pr-badge svg, .hint > svg, .toast svg, .timer-pill svg, .ex-num svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Stats ---------- */
.mini-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow), inset 0 -3px 0 var(--lip); }
.stat .label { font-size: .76rem; color: var(--muted); font-weight: 700; }
.stat .value { font-size: 1.32rem; font-weight: 800; margin-top: 4px; letter-spacing: -.3px; }
.stat .value small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stat .foot { font-size: .74rem; margin-top: 3px; font-weight: 700; }
.stat.span2 { grid-column: span 2; }
.progress-bar { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--pc, var(--brand)); border-radius: 99px; transition: width .5s; }
.card.dark .progress-bar, .card.color .progress-bar { background: rgba(255,255,255,.22); }
.card.color .progress-bar > div { background: #fff; }

/* ---------- Gráficos ---------- */
.chart { position: relative; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10.5px; font-family: var(--font); font-weight: 600; }
.chart .tip { pointer-events: none; transition: opacity .15s; }
.chart-empty { height: 150px; display: grid; place-items: center; color: var(--muted); font-size: .88rem; text-align: center; padding: 0 20px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; max-width: 24px; border-radius: 8px; background: var(--surface-2); min-height: 6px; }
.bars .b i.on { background: var(--bc, var(--brand)); }
.bars .b span { font-size: .68rem; color: var(--muted); font-weight: 700; }
.ring { position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }

/* ---------- Calendário / semana ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week .d { font-size: .7rem; color: var(--muted); font-weight: 700; }
.week .n { width: 38px; height: 38px; margin: 8px auto 0; border-radius: 13px; display: grid; place-items: center; font-size: .86rem; font-weight: 700; background: var(--surface-2); }
.week .n.today { box-shadow: inset 0 0 0 2.5px var(--ink); }
.week .n.done { background: var(--brand); color: #1E2300; box-shadow: inset 0 -3px 0 var(--brand-deep); }
.week .n.future { background: transparent; color: var(--muted); opacity: .6; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .h { font-size: .7rem; color: var(--muted); font-weight: 700; padding-bottom: 6px; }
.cal .c { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: .84rem; font-weight: 600; }
.cal .c.done { background: var(--brand); color: #1E2300; font-weight: 800; }
.cal .c.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal .c.out { color: var(--muted); opacity: .5; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px;
  height: var(--tabbar-h); padding: 6px 8px var(--safe-bottom);
  background: var(--tabbar-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .66rem; font-weight: 700; min-height: 54px; }
.tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.tab.active { color: var(--ink); }
.tab.active svg { stroke: var(--tc, var(--ink)); transform: translateY(-1px) scale(1.06); }
.tab .tab-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--tc, var(--brand)); opacity: 0; }
.tab.active .tab-dot { opacity: 1; }
.tab-center { position: relative; }
.tab-center .tab-mon { width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg), inset 0 -4px 0 var(--lip); display: grid; place-items: center; transition: transform .15s; }
.tab-center:active .tab-mon { transform: translateY(2px) scale(.97); }
.tab-center .tab-mon .mon { width: 46px; height: 50px; }
.tab-center .tab-time { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); background: var(--rest); color: #fff; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Overlay (tela cheia) ---------- */
.overlay { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; max-width: 560px; margin: 0 auto; animation: slideup .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slideup { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ov-head { position: sticky; top: 0; z-index: 5; padding: calc(var(--safe-top) + 10px) 18px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: flex; align-items: center; gap: 12px; }
.ov-body { padding: 4px 18px calc(var(--safe-bottom) + 120px); }
.ov-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 560px; margin: 0 auto; padding: 12px 18px calc(var(--safe-bottom) + 14px); background: linear-gradient(to top, var(--bg) 70%, transparent); }

/* ---------- Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: var(--scrim); animation: fade2 .2s; }
@keyframes fade2 { from { opacity: 0; } }
.sheet { position: fixed; z-index: 91; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 30px 30px 0 0; padding: 10px 20px calc(var(--safe-bottom) + 20px); max-height: 92vh; overflow-y: auto; animation: sheetup .3s cubic-bezier(.2,.9,.2,1); }
@keyframes sheetup { from { transform: translateY(100%); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--surface-3); margin: 0 auto 14px; }
.sheet h2 { margin-bottom: 4px; }
.sheet .sub { margin-bottom: 18px; }
.sheet-close { position: absolute; right: 14px; top: 12px; }

/* ---------- Toast / flash ---------- */
.toast { position: fixed; z-index: 120; left: 50%; top: calc(var(--safe-top) + 12px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 18px; font-size: .88rem; font-weight: 700; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; white-space: normal; width: max-content; max-width: calc(100vw - 32px); line-height: 1.35; animation: toastin .3s; }
.toast svg { width: 17px; height: 17px; color: var(--brand); }
.toast .mon { width: 30px; height: 32px; flex-shrink: 0; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -10px); } }
.flash { position: fixed; inset: 0; z-index: 110; pointer-events: none; background: var(--rest); animation: flash 1s ease 3; }
@keyframes flash { 0%, 100% { opacity: 0; } 50% { opacity: .45; } }

/* ---------- Formulários ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input { width: 100%; min-height: 52px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-2); padding: 0 14px; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.input:focus { border-color: var(--brand-strong); background: var(--surface); }
.input::placeholder { color: var(--muted); font-weight: 500; }
textarea.input { min-height: 84px; padding: 12px 14px; resize: none; }
select.input { background-image: none; }
.mini-field > span { font-size: .68rem; color: var(--muted); font-weight: 800; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.mini-field .input { min-height: 46px; font-size: 16px; text-align: center; padding: 0 6px; }
.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; transition: .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + i { background: var(--success); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--c-blue); outline-offset: 2px; }
.setting { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 60px; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting h3 { font-size: .92rem; }
.setting .small { margin-top: 2px; }
.kv { display: flex; justify-content: space-between; padding: 10px 0; font-size: .92rem; gap: 10px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 700; text-align: right; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { text-align: left; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow), inset 0 -4px 0 var(--lip); border: 2.5px solid transparent; min-height: 96px; display: flex; flex-direction: column; gap: 6px; transition: transform .1s; }
.choice:active { transform: scale(.98); }
.choice.on { border-color: var(--cc, var(--brand-strong)); background: color-mix(in srgb, var(--cc, var(--brand)) 10%, var(--surface)); }
.choice .ci { width: 38px; height: 38px; border-radius: 13px; background: var(--cc, var(--brand)); display: grid; place-items: center; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.choice .ci svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.choice b { font-size: .9rem; overflow-wrap: anywhere; hyphens: auto; }
.choice span { font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* ---------- Toque/feedback ---------- */
.pop { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 0% { transform: scale(.8); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* Ícones de linha (viewBox 24×24) nunca ficam gigantes: tamanho padrão proporcional ao texto */
:where(div, span, p, b, label, summary, li, h2, h3, em, a) > svg[viewBox="0 0 24 24"] { width: 1.15em; height: 1.15em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.paused-banner svg { width: 16px; height: 16px; }
