/* Rancho · tokens e temas descritos em DESIGN.md */
:root, [data-tema="feira"] {
  --bg: #FFF8EC; --surface: #FFFFFF; --fg: #2A2118; --muted: #6E6252; --line: #EADFCB;
  --go: #2E9C41; --go-deep: #1F7A30; --go-tint: #DDF3DF; --on-go: #FFFFFF;
  --gold: #F2B705; --gold-deep: #C98F00; --gold-tint: #FFF0C2; --on-gold: #2A2118; --gold-fg: #7A5600;
  --red: #E04A2F; --red-deep: #B23A24; --red-tint: #FBE1DA;
  --lock: #F3ECDF; --lock-deep: #CFC4B0;
  --sky: #CFEFFF; --sun: #F2B705; --hill1: #8FD18B; --hill2: #B8E3A6; --path: #FFF8EC; --path-dash: #C99A6E;
  --wood: #C99A6E; --wood-deep: #9A6A45; --cab: #EBD5B0; --cab-in: #FFF3DC;
  --fridge: #DCE9EE; --fridge-in: #FFFFFF; --fridge-line: #B7CBD4;
}
[data-tema="noite"] {
  --bg: #1B1712; --surface: #28221B; --fg: #F4EBDD; --muted: #BBAD97; --line: #3B3228;
  --go: #4CC261; --go-deep: #2E9C41; --go-tint: #1F3A25; --on-go: #0E1A10;
  --gold: #F2B705; --gold-deep: #C98F00; --gold-tint: #3A3012; --gold-fg: #F2D77A;
  --red: #F0624A; --red-deep: #B23A24; --red-tint: #3F211B;
  --lock: #2E271E; --lock-deep: #4A3F31;
  --sky: #1E2A44; --sun: #F4E6B0; --hill1: #2F5B3A; --hill2: #25472F; --path: #E8D9B4; --path-dash: #E8D9B4;
  --wood: #6B4A33; --wood-deep: #4A3322; --cab: #3A2F23; --cab-in: #2A2218;
  --fridge: #2B3640; --fridge-in: #1E262D; --fridge-line: #44525E;
}
[data-tema="ceu"] {
  --bg: #EEF6FF; --surface: #FFFFFF; --fg: #14233A; --muted: #51627C; --line: #D3E3F6;
  --go: #2F7BE0; --go-deep: #1D5BB0; --go-tint: #DCE9FB; --on-go: #FFFFFF;
  --sky: #BFE1FF; --hill1: #7CC48A; --hill2: #A8D8A4; --path: #FFFFFF; --path-dash: #8AA9D0;
  --cab: #DCE6F5; --cab-in: #F6FAFF;
}
[data-tema="morango"] {
  --bg: #FFF1F3; --surface: #FFFFFF; --fg: #3A1820; --muted: #7A5560; --line: #F5D0DA;
  --go: #D6336C; --go-deep: #A61E4D; --go-tint: #FFDEE8; --on-go: #FFFFFF;
  --sky: #FFE3EA; --hill1: #9AD7A0; --hill2: #C2E6B6; --path: #FFF1F3; --path-dash: #D98AA3;
  --cab: #F6D4DE; --cab-in: #FFF7F9;
}
[data-tema="mare"] {
  --bg: #ECFAF8; --surface: #FFFFFF; --fg: #0F2B2E; --muted: #476466; --line: #CBE8E6;
  --go: #0B7F8A; --go-deep: #075B63; --go-tint: #D2F1F3; --on-go: #FFFFFF;
  --sky: #BDEBF2; --hill1: #86D1B0; --hill2: #B2E3C9; --path: #ECFAF8; --path-dash: #6BB3B8;
  --cab: #CDE8E6; --cab-in: #F4FCFB;
}
[data-tema="contraste"] {
  --bg: #000000; --surface: #000000; --fg: #FFFFFF; --muted: #E6E6E6; --line: #FFFFFF;
  --go: #FFD400; --go-deep: #B39500; --go-tint: #1A1700; --on-go: #000000;
  --gold: #FFD400; --gold-deep: #B39500; --gold-tint: #1A1700; --on-gold: #000000; --gold-fg: #FFD400;
  --red: #FF6B6B; --red-deep: #FF6B6B; --red-tint: #2A0000;
  --lock: #1A1A1A; --lock-deep: #808080;
  --sky: #000000; --sun: #FFD400; --hill1: #0A3A0A; --hill2: #052505; --path: #FFFFFF; --path-dash: #FFFFFF;
  --wood: #FFFFFF; --wood-deep: #FFFFFF; --cab: #1A1A1A; --cab-in: #000000;
  --fridge: #1A1A1A; --fridge-in: #000000; --fridge-line: #FFFFFF;
}

:root {
  --f-display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --f-text: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem;
  --r-field: 10px; --r-btn: 16px; --r-card: 22px; --r-pill: 9999px;
  --nav-h: 4.5rem;
}
html { -webkit-text-size-adjust: 100%; }
html[data-tam="g"] { font-size: 112.5%; }
html[data-tam="xg"] { font-size: 125%; }
html[data-fonte="legivel"] { --f-display: Verdana, "Segoe UI", system-ui, sans-serif; --f-text: Verdana, "Segoe UI", system-ui, sans-serif; }
html[data-fonte="legivel"] body { letter-spacing: .02em; line-height: 1.7; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-text); font-weight: 600; font-size: 1rem; line-height: 1.5; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; border-radius: 8px; }
[data-tema="contraste"] :focus-visible { outline-color: #FFD400; outline-width: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { padding: var(--s7) var(--s4); text-align: center; color: var(--muted); font-family: var(--f-display); font-size: 1.25rem; }
.muted { color: var(--muted); }
.num { font-family: var(--f-display); font-variant-numeric: tabular-nums; }
.xs { font-size: .8125rem; }
svg.i { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--lock); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.stack { display: grid; gap: var(--s3); }
.hr { height: 2px; background: var(--line); border: 0; margin: var(--s4) 0; }
[data-tema="contraste"] .card, [data-tema="contraste"] .btn--ghost, [data-tema="contraste"] .input { border-color: #fff; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.main { max-width: 36rem; margin: 0 auto; padding: 0 var(--s4) calc(var(--nav-h) + var(--s7)); }
.main--wide { max-width: 74rem; }
.nav { position: fixed; inset: auto 0 0 0; z-index: 20; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; justify-content: space-around; align-items: center; background: var(--surface); border-top: 2px solid var(--line); }
.nav__brand, .nav__desk { display: none; }
.nav__item { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; background: none; padding: 6px 8px; border-radius: 14px; color: var(--muted); font-family: var(--f-display); font-weight: 600; font-size: .75rem; min-width: 3.6rem; position: relative; }
.nav__item[aria-current="page"] { color: var(--go-deep); background: var(--go-tint); border-color: var(--go); }
[data-tema="noite"] .nav__item[aria-current="page"] { color: var(--go); }
.nav__item .dot { position: absolute; top: 4px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); align-items: start; }
  .main, .main--wide { margin: 0 auto; padding: 0 var(--s6) var(--s8); width: 100%; max-width: 74rem; }
  .main:not(.main--wide) { max-width: 46rem; }
  .nav { position: sticky; top: 0; inset: auto; height: 100dvh; padding: var(--s5) var(--s3); flex-direction: column; justify-content: flex-start; align-items: stretch; gap: var(--s2); border-top: 0; border-right: 2px solid var(--line); background: var(--bg); }
  .nav__brand { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3) var(--s5); }
  .nav__brand svg { width: 2.6rem; height: 2.6rem; }
  .nav__desk { display: block; flex: 1; }
  .nav__item { flex-direction: row; gap: var(--s3); font-size: 1rem; padding: 12px 14px; letter-spacing: .02em; text-transform: uppercase; }
  .nav__item .dot { right: 10px; top: 10px; }
  .mobile-only { display: none !important; }
}
@media (max-width: 959px) { .desk-only { display: none !important; } }
.wordmark { font-family: var(--f-display); font-weight: 700; font-size: 1.95rem; color: var(--go); letter-spacing: -.01em; }
[data-tema="contraste"] .wordmark { color: var(--go); }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; background: var(--bg); border-bottom: 2px solid var(--line); margin-bottom: var(--s4); }
.topbar h1 { font-size: 1.25rem; }
.topbar__r { display: flex; align-items: center; gap: var(--s2); }
.stats { display: flex; gap: var(--s3); align-items: center; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; }
.stat--fire { color: #D9630B; } .stat--coin { color: var(--gold-deep); } .stat--xp { color: var(--go-deep); }
[data-tema="noite"] .stat--xp { color: var(--go); }
[data-tema="contraste"] .stat { color: #fff; }
.stat--fire.is-off { color: var(--lock-deep); }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); padding: 0; }
.iconbtn:hover { color: var(--fg); }
.iconbtn .badge { position: absolute; top: -6px; right: -6px; min-width: 1.35rem; height: 1.35rem; border-radius: 9999px; background: var(--red); color: #fff; font-family: var(--f-display); font-size: .75rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }
.avatar-btn { padding: 0; overflow: hidden; background: var(--go-tint); }
.avatar-btn svg { width: 2.4rem; height: 2.4rem; margin-top: 4px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 3rem; padding: 10px 18px; border: 0; border-radius: var(--r-btn); background: var(--go); color: var(--on-go); box-shadow: 0 4px 0 var(--go-deep); font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; transition: transform 80ms, box-shadow 80ms; text-decoration: none; text-align: center; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--go-deep); }
.btn--block { width: 100%; }
.btn--ghost { background: var(--surface); color: var(--fg); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn--ghost:active { box-shadow: 0 0 0 var(--line); }
.btn--gold { background: var(--gold); color: var(--on-gold); box-shadow: 0 4px 0 var(--gold-deep); }
.btn--gold:active { box-shadow: 0 0 0 var(--gold-deep); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-deep); }
.btn--sm { min-height: 2.5rem; padding: 6px 14px; font-size: .95rem; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { background: none; border: 0; padding: 4px; color: var(--go-deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
[data-tema="noite"] .link { color: var(--go); }
[data-tema="contraste"] .link { color: #FFD400; }

/* ---------- cards / pills ---------- */
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-card); padding: var(--s4); }
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: var(--s4); }
.card h2 { font-size: 1.2rem; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.kick { font-family: var(--f-display); font-weight: 600; font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-pill); padding: 2px 10px; font-size: .8125rem; font-weight: 800; background: var(--lock); color: var(--muted); }
.pill svg.i { width: .95rem; height: .95rem; }
.pill--go { background: var(--go-tint); color: var(--go-deep); }
[data-tema="noite"] .pill--go { color: var(--go); }
.pill--gold { background: var(--gold-tint); color: var(--gold-fg); }
.pill--red { background: var(--red-tint); color: var(--red-deep); }
[data-tema="noite"] .pill--red { color: var(--red); }
[data-tema="contraste"] .pill { border: 1px solid #fff; color: #fff; background: #000; }
.bar { position: relative; height: 1.1rem; border-radius: var(--r-pill); background: var(--lock); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-pill); background: var(--go); transition: width 400ms; }
.bar--gold > i { background: var(--gold); } .bar--red > i { background: var(--red); }
.bar--sm { height: .75rem; }
.empty { text-align: center; padding: var(--s5) var(--s4); color: var(--muted); }
.empty b { display: block; color: var(--fg); font-family: var(--f-display); font-size: 1.2rem; margin-bottom: 4px; }
.pagehead { margin: var(--s2) 0 var(--s4); }
.pagehead h2 { font-size: 1.95rem; }
.pagehead p { color: var(--muted); }

/* ---------- mascote ---------- */
.capi { display: flex; align-items: flex-end; gap: var(--s3); }
.capi svg { width: 5rem; height: 5rem; flex: none; }
.bubble { position: relative; flex: 1; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: var(--s3) var(--s4); font-weight: 700; margin-bottom: 14px; }
.bubble::before { content: ""; position: absolute; left: -10px; bottom: 16px; width: 16px; height: 16px; background: var(--surface); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.bubble .iconbtn { width: 2rem; height: 2rem; margin-left: 6px; vertical-align: middle; }

/* ---------- fazenda ---------- */
.farm { position: relative; aspect-ratio: 400 / 300; border-radius: var(--r-card); overflow: hidden; border: 2px solid var(--line); background: var(--sky); }
.farm__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.farm__node { position: absolute; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--lock); color: var(--lock-deep); box-shadow: 0 5px 0 var(--lock-deep); padding: 0; transition: transform 80ms, box-shadow 80ms; min-width: 2.75rem; }
.farm__node svg.i { width: 50%; height: 50%; stroke-width: 2.6; }
.farm__node:active { transform: translate(-50%, calc(-50% + 4px)); box-shadow: 0 1px 0 var(--lock-deep); }
.farm__node--done { background: var(--gold); color: var(--on-gold); box-shadow: 0 5px 0 var(--gold-deep); }
.farm__node--now { background: var(--go); color: var(--on-go); box-shadow: 0 5px 0 var(--go-deep); z-index: 2; }
.farm__node--now::after { content: ""; position: absolute; inset: -9%; border-radius: 50%; border: 4px solid var(--go-tint); animation: pulse 2.4s ease-in-out infinite; pointer-events: none; }
.farm__pet { position: absolute; width: 17%; transform: translate(-95%, -92%); z-index: 3; pointer-events: none; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0,0,0,.15)); }
.farm__tag { position: absolute; transform: translate(-50%, -190%); background: var(--surface); border: 2px solid var(--line); color: var(--go-deep); font-family: var(--f-display); font-weight: 700; font-size: .75rem; padding: 2px 10px; border-radius: 10px; white-space: nowrap; z-index: 4; pointer-events: none; }
[data-tema="noite"] .farm__tag { color: var(--go); }
.now { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.now h2 { font-size: 1.2rem; }
.now p { color: var(--muted); }
.shake { animation: shake 360ms; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .4; } }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -4px; } }
@keyframes shake { 20%, 60% { transform: translate(calc(-50% - 6px), -50%); } 40%, 80% { transform: translate(calc(-50% + 6px), -50%); } }
.trilha-grid { display: grid; gap: var(--s4); }
@media (min-width: 960px) { .trilha-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.unit { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); background: var(--go); color: var(--on-go); border-radius: var(--r-card); padding: var(--s4) var(--s5); box-shadow: 0 4px 0 var(--go-deep); margin-bottom: var(--s4); }
.unit h2 { font-size: 1.5rem; } .unit .kick { color: inherit; opacity: .85; }
.unit__meta { text-align: right; font-family: var(--f-display); font-weight: 600; } .unit__meta b { display: block; font-size: 1.5rem; }
.quests { display: grid; gap: var(--s3); }
.quest { display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--s3); align-items: center; }
.quest__ico { width: 2.25rem; height: 2.25rem; border-radius: 10px; display: grid; place-items: center; background: var(--gold-tint); color: var(--gold-deep); }
.quest.is-done .quest__ico { background: var(--go-tint); color: var(--go-deep); }
.quest b { display: block; }

/* ---------- despensa ---------- */
.addbar { display: grid; grid-template-columns: minmax(8rem, 2fr) 4.5rem 4.5rem minmax(7rem, 1.2fr) minmax(8rem, 1.4fr) auto; gap: var(--s2); align-items: end; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-card); padding: var(--s3); }
.addbar .field label { display: block; }
.addbar__btns { display: flex; gap: var(--s2); }
@media (max-width: 959px) { .addbar { grid-template-columns: 1fr 1fr 1fr; } .addbar .field:first-child { grid-column: 1 / -1; } .addbar__btns { grid-column: 1 / -1; } .addbar__btns .btn { flex: 1; } }
.field { display: grid; gap: 4px; }
.field label { font-weight: 800; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.input, select.input { width: 100%; min-height: 2.75rem; border: 2px solid var(--line); border-radius: var(--r-field); background: var(--surface); padding: 8px 10px; font-weight: 700; }
.input:focus { border-color: var(--go); outline: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.tabs2 { display: flex; gap: var(--s2); margin: var(--s4) 0; overflow-x: auto; padding-bottom: 2px; }
.tabs2 button { flex: 1 1 auto; white-space: nowrap; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 8px 10px; font-size: .9rem; font-family: var(--f-display); font-weight: 600; color: var(--muted); }
.tabs2 button[aria-pressed="true"] { border-color: var(--go); background: var(--go-tint); color: var(--go-deep); }
[data-tema="noite"] .tabs2 button[aria-pressed="true"] { color: var(--go); }
[data-tema="contraste"] .tabs2 button[aria-pressed="true"] { background: #FFD400; color: #000; }
.dgrid { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 960px) { .dgrid { grid-template-columns: minmax(0, 1fr) 21rem; } .tabs2.mobile-only { display: none; } }
.moveis { display: grid; gap: var(--s4); }
@media (min-width: 1180px) { .moveis { grid-template-columns: 1fr 1fr; align-items: start; } }
.sumario { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s4) 0 var(--s2); }
.sumario .pill { font-size: .875rem; padding: 4px 12px; }

.movel { background: var(--cab); border: 4px solid var(--wood); border-radius: 20px; padding: var(--s3); box-shadow: 0 6px 0 var(--wood-deep); }
.movel__titulo { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s2) var(--s2); font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.movel--geladeira { background: var(--fridge); border-color: var(--fridge-line); box-shadow: 0 6px 0 var(--fridge-line); }
.comp { border: 3px solid var(--fridge-line); border-radius: 12px; background: var(--fridge-in); padding: var(--s2); }
.comp + .comp { margin-top: var(--s3); }
.comp__nome { font-family: var(--f-display); font-weight: 600; font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 var(--s2) 4px; display: flex; justify-content: space-between; }
.comp--frio { background: color-mix(in srgb, var(--fridge-in) 80%, #9FD3F0); }
.prat { background: var(--cab-in); border-radius: 10px; padding: var(--s2) var(--s2) 0; margin-top: var(--s2); border-bottom: 8px solid var(--wood); position: relative; min-height: 5rem; }
.comp .prat { border-bottom-color: var(--fridge-line); }
.prat.is-over { outline: 3px dashed var(--go); }
.prat__nome { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.prat__itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.7rem, 1fr)); gap: var(--s2); padding: 4px 0 6px; align-items: end; }
.prat__vazio { color: var(--muted); font-size: .8125rem; padding: var(--s3) var(--s2); }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; padding: 2px 0 4px; border-radius: 12px; font-size: .75rem; line-height: 1.15; text-align: center; transition: transform 100ms; }
.slot:hover { transform: translateY(-3px); }
.slot:active { transform: scale(.95); }
.slot .art { width: 3.4rem; height: 3.4rem; position: relative; display: block; }
.art svg, .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.art--foto img { background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.slot__nome { font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__valor { color: var(--muted); font-weight: 700; font-size: .6875rem; }
.slot__qtd { position: absolute; top: -2px; right: 2px; background: var(--go); color: var(--on-go); font-family: var(--f-display); font-weight: 700; font-size: .6875rem; padding: 0 6px; border-radius: 9999px; border: 2px solid var(--cab-in); min-width: 1.4rem; text-align: center; }
.slot--pouco .slot__qtd { background: var(--gold); color: var(--on-gold); }
.slot--pouco .art { filter: saturate(.7); }
.slot--acabou .art { opacity: .5; filter: grayscale(1); }
.slot--acabou .slot__qtd { background: var(--red); color: #fff; }
.slot--acabou .slot__nome { color: var(--red-deep); text-decoration: line-through; }
[data-tema="noite"] .slot--acabou .slot__nome { color: var(--red); }
.slot[draggable="true"] { cursor: grab; }
.slot.is-drag { opacity: .4; }
.slot .nlista { position: absolute; top: -2px; left: 2px; width: 1rem; height: 1rem; border-radius: 50%; background: var(--gold); display: grid; place-items: center; }
.slot .nlista svg { width: .65rem; height: .65rem; stroke-width: 3.2; color: var(--on-gold); }

/* ---------- lista compacta ---------- */
.lc { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
@media (min-width: 960px) { .lc { position: sticky; top: 5rem; max-height: calc(100dvh - 7rem); display: flex; flex-direction: column; } .lc__body { overflow: auto; } }
.lc__head { padding: var(--s3) var(--s4); border-bottom: 2px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.lc__head h2 { font-size: 1.15rem; }
.lc__grp { padding: 6px var(--s4); background: var(--lock); font-family: var(--f-display); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
.lc__row { display: grid; grid-template-columns: 2rem 1fr auto auto; gap: 6px; align-items: center; padding: 6px var(--s3); border-top: 1px solid var(--line); }
.lc__row:first-of-type { border-top: 0; }
.lc__nome { background: none; border: 0; text-align: left; padding: 2px 0; font-weight: 800; line-height: 1.2; min-width: 0; }
.lc__nome small { display: block; font-size: .6875rem; color: var(--muted); font-weight: 700; }
.mini { width: 2rem; height: 2rem; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; padding: 0; color: var(--muted); }
.mini svg.i { width: 1rem; height: 1rem; }
.mini[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-deep); color: var(--on-gold); }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 1.75rem; height: 1.9rem; border: 0; background: var(--surface); font-family: var(--f-display); font-weight: 700; color: var(--go-deep); padding: 0; }
[data-tema="noite"] .qty button { color: var(--go); }
.qty span { min-width: 3.4rem; text-align: center; font-weight: 800; font-size: .75rem; padding: 0 2px; }
.lc__foot { padding: var(--s3) var(--s4); border-top: 2px solid var(--line); display: grid; gap: var(--s2); background: var(--surface); }
.lc__foot .sums { display: flex; justify-content: space-between; font-weight: 800; }

/* ---------- sheet / popover ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 14, 8, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(34rem, 100%); background: var(--bg); border-radius: var(--r-card) var(--r-card) 0 0; padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); max-height: 90dvh; overflow: auto; animation: up 220ms ease-out; border: 2px solid var(--line); }
.sheet h2 { font-size: 1.6rem; margin-bottom: var(--s2); }
.sheet__top { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.sheet__top .art { width: 4.2rem; height: 4.2rem; flex: none; position: relative; }
.sheet .actions { display: grid; gap: var(--s3); margin-top: var(--s4); }
@media (min-width: 960px) { .backdrop { align-items: center; } .sheet { border-radius: var(--r-card); } }
.pop { position: fixed; z-index: 45; top: 4.2rem; right: var(--s4); width: min(26rem, calc(100% - 2rem)); max-height: calc(100dvh - 6rem); overflow: auto; background: var(--bg); border: 2px solid var(--line); border-radius: var(--r-card); padding: var(--s3); box-shadow: 0 8px 0 rgba(0,0,0,.12); animation: up 200ms ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 12px; font-weight: 800; font-size: .8125rem; color: var(--muted); }
.seg button + button { border-left: 2px solid var(--line); }
.seg button[aria-pressed="true"][data-v="tem"] { background: var(--go-tint); color: var(--go-deep); }
.seg button[aria-pressed="true"][data-v="acabando"] { background: var(--gold-tint); color: var(--gold-fg); }
.seg button[aria-pressed="true"][data-v="acabou"] { background: var(--red-tint); color: var(--red-deep); }
.seg--full { display: flex; } .seg--full button { flex: 1; }
.bigqty { display: flex; align-items: center; justify-content: center; gap: var(--s4); }
.bigqty button { width: 3.2rem; height: 3.2rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; color: var(--go-deep); padding: 0; }
.bigqty output { font-family: var(--f-display); font-weight: 700; font-size: 1.8rem; min-width: 6rem; text-align: center; }

/* ---------- notificações ---------- */
.nt { display: grid; grid-template-columns: 2.25rem 1fr auto; gap: var(--s3); align-items: start; padding: var(--s3); border: 2px solid var(--line); border-radius: var(--r-btn); background: var(--surface); }
.nt + .nt { margin-top: var(--s2); }
.nt.is-lida { opacity: .6; }
.nt__ico { width: 2.25rem; height: 2.25rem; border-radius: 10px; display: grid; place-items: center; background: var(--lock); color: var(--muted); }
.nt--red .nt__ico { background: var(--red-tint); color: var(--red-deep); }
.nt--gold .nt__ico { background: var(--gold-tint); color: var(--gold-deep); }
.nt--go .nt__ico { background: var(--go-tint); color: var(--go-deep); }
.nt b { display: block; line-height: 1.2; }
.nt__btns { display: flex; flex-direction: column; gap: 4px; }
.ntgrp { margin: var(--s4) 0 var(--s2); }

/* ---------- comer ---------- */
.per { margin-top: var(--s5); }
.per__head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.per__ico { width: 2.75rem; height: 2.75rem; border-radius: 14px; display: grid; place-items: center; background: var(--gold-tint); color: var(--gold-deep); }
.per__head h2 { font-size: 1.5rem; } .per__head p { color: var(--muted); font-size: .875rem; }
.rgrid { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-card); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.rc.is-falta { border-style: dashed; }
.rc h3 { font-size: 1.1rem; }
.rc__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.dif--rapido { background: var(--go-tint); color: var(--go-deep); } .dif--da { background: var(--gold-tint); color: var(--gold-fg); } .dif--tempo { background: var(--red-tint); color: var(--red-deep); }
[data-tema="noite"] .dif--rapido { color: var(--go); } [data-tema="noite"] .dif--tempo { color: var(--red); }
.rc ul { margin: 0; padding-left: 1.1rem; font-size: .875rem; }
.rc details summary { cursor: pointer; font-weight: 800; color: var(--go-deep); padding: 4px 0; }
[data-tema="noite"] .rc details summary { color: var(--go); }
.rc ol { margin: 4px 0 0; padding-left: 1.2rem; font-size: .875rem; }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 6px 14px; font-weight: 800; font-size: .8125rem; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--fg); color: var(--fg); }
.chip--add { color: var(--go-deep); border-style: dashed; }

/* ---------- compras ---------- */
.section { scroll-margin-top: 9rem; }
.row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 2px solid var(--line); }
.row:first-child { border-top: 0; }
.rows { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.row__main { flex: 1; min-width: 0; } .row__name { font-weight: 800; line-height: 1.25; } .row__sub { font-size: .8125rem; color: var(--muted); font-weight: 700; }
.toggle { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; font-weight: 800; }
.toggle input { width: 1.4rem; height: 1.4rem; accent-color: var(--go); flex: none; }
.toggle small { display: block; font-weight: 700; color: var(--muted); }
.budget { display: grid; gap: var(--s2); }
.budget__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.budget__row .num { font-size: 1.5rem; font-weight: 700; }
.sug { display: grid; grid-template-columns: 3rem 1fr auto; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-top: 2px solid var(--line); }
.sug:first-of-type { border-top: 0; }
.sug .art { width: 3rem; height: 3rem; position: relative; }
.cart { border: 2px solid var(--line); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.cart + .cart { margin-top: var(--s3); }
.cart.is-picked { border-color: var(--go); box-shadow: 0 4px 0 var(--go-deep); }
.cart__head { padding: var(--s4); display: grid; gap: var(--s2); }
.cart__title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.cart__title h3 { font-size: 1.2rem; }
.cart__total { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cart details { border-top: 2px solid var(--line); }
.cart summary { padding: var(--s3) var(--s4); font-weight: 800; color: var(--go-deep); cursor: pointer; }
[data-tema="noite"] .cart summary { color: var(--go); }
.cart table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.cart td { padding: 6px var(--s4); border-top: 1px solid var(--line); vertical-align: top; }
.cart td:last-child { text-align: right; white-space: nowrap; font-weight: 800; }
.cart__foot { padding: var(--s3) var(--s4) var(--s4); display: grid; gap: var(--s2); }
.sums { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s3); font-size: .8125rem; font-weight: 700; color: var(--muted); }
.sums b { color: var(--fg); text-align: right; }
.codebox { font-family: ui-monospace, Consolas, monospace; font-size: .8125rem; background: var(--bg); border: 2px dashed var(--line); border-radius: var(--r-field); padding: var(--s3); word-break: break-all; max-height: 11rem; overflow: auto; white-space: pre-wrap; }
.qr { display: grid; place-items: center; padding: var(--s4); background: #fff; border-radius: var(--r-field); border: 2px solid var(--line); }
.qr img, .qr canvas { width: 13.75rem; height: 13.75rem; }
.steps { display: grid; gap: var(--s4); counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 2rem 1fr; gap: var(--s3); align-items: start; }
.steps li::before { counter-increment: s; content: counter(s); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--go-tint); color: var(--go-deep); font-family: var(--f-display); font-weight: 700; }
[data-tema="noite"] .steps li::before { color: var(--go); }
.hist { display: grid; gap: var(--s3); }
.hist__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }

/* ---------- preços ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s3); }
.kpi { border: 2px solid var(--line); border-radius: var(--r-btn); padding: var(--s3); background: var(--surface); }
.kpi b { display: block; font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; }
.kpi span { font-size: .8125rem; color: var(--muted); font-weight: 800; }
.hbar { display: grid; grid-template-columns: minmax(6rem, 1.2fr) 3fr auto; gap: var(--s3); align-items: center; padding: 6px 0; }
.hbar .bar { height: .9rem; }
.hbar__nome { font-weight: 800; line-height: 1.2; font-size: .875rem; } .hbar__nome small { display: block; font-size: .75rem; color: var(--muted); font-weight: 700; }
.delta { font-family: var(--f-display); font-weight: 700; font-size: .875rem; }
.delta--up { color: var(--red-deep); } .delta--down { color: var(--go-deep); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--f-display); font-size: 11px; fill: var(--muted); }
.chart .lbl { fill: var(--fg); font-weight: 600; }
.chart .gridl { stroke: var(--line); stroke-width: 1; }
.pgrid { display: grid; gap: var(--s4); }
@media (min-width: 960px) { .pgrid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------- perfil ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center; }
.hero__pet { width: 7.5rem; height: 7.5rem; background: var(--go-tint); border-radius: 50%; border: 3px solid var(--go); display: grid; place-items: end center; overflow: hidden; }
.hero__pet svg { width: 100%; height: 100%; margin-top: 8px; }
.pgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: var(--s2); }
.opt { border: 2px solid var(--line); border-radius: 14px; background: var(--surface); padding: 4px 4px 6px; display: grid; justify-items: center; font-size: .75rem; font-weight: 800; }
.opt svg { width: 3.6rem; height: 3.6rem; }
.opt[aria-pressed="true"] { border-color: var(--go); background: var(--go-tint); }
.swatches { display: flex; gap: var(--s3); flex-wrap: wrap; }
.sw { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 3px solid var(--line); padding: 0; }
.sw[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--fg); }
.tema { border: 2px solid var(--line); border-radius: 14px; background: var(--surface); padding: 8px; display: grid; gap: 6px; font-weight: 800; font-size: .8125rem; text-align: left; }
.tema i { display: flex; height: 1.4rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.tema i b { flex: 1; }
.tema[aria-pressed="true"] { border-color: var(--go); background: var(--go-tint); }
.temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: var(--s2); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.tile { border: 2px solid var(--line); border-radius: var(--r-btn); padding: var(--s3); background: var(--surface); }
.tile b { display: block; font-family: var(--f-display); font-size: 1.5rem; line-height: 1.1; } .tile span { font-size: .8125rem; color: var(--muted); font-weight: 800; }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--s3); }
.medal { border: 2px solid var(--line); border-radius: var(--r-btn); padding: var(--s3); background: var(--surface); display: grid; gap: 6px; justify-items: start; }
.medal__ico { width: 2.75rem; height: 2.75rem; border-radius: 12px; display: grid; place-items: center; background: var(--lock); color: var(--lock-deep); }
.medal.is-on .medal__ico { background: var(--gold); color: var(--on-gold); box-shadow: 0 3px 0 var(--gold-deep); }
.medal b { line-height: 1.2; } .medal span { font-size: .8125rem; color: var(--muted); font-weight: 700; line-height: 1.3; }
.level { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: center; }
.level__badge { width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--gold); color: var(--on-gold); box-shadow: 0 5px 0 var(--gold-deep); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 1.95rem; }
.pcols { display: grid; gap: var(--s4); }
@media (min-width: 960px) { .pcols { grid-template-columns: 1fr 1fr; align-items: start; } .pcols > .card { margin-top: 0; } }

/* ---------- toasts / xp / confetti ---------- */
.toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 80; display: grid; gap: var(--s2); width: min(26rem, calc(100% - 2rem)); pointer-events: none; }
.toast { background: var(--fg); color: var(--bg); border-radius: var(--r-btn); padding: 10px 16px; font-weight: 800; animation: up 200ms ease-out; }
.toast--go { background: var(--go-deep); color: #fff; }
.xpfloat { position: fixed; z-index: 90; font-family: var(--f-display); font-weight: 700; font-size: 1.95rem; color: var(--gold-deep); pointer-events: none; animation: rise 900ms ease-out forwards; -webkit-text-stroke: 1px #fff; }
@keyframes rise { from { transform: translate(-50%, 0) scale(.8); opacity: 0; } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.1); } to { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 85; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall 1.2s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
.offline { margin: var(--s4) 0; padding: var(--s4); border-radius: var(--r-card); background: var(--red-tint); color: var(--red-deep); font-weight: 800; }

/* ---------- login ---------- */
.authwrap { min-height: 100dvh; display: grid; place-items: center; padding: var(--s4); }
.auth { width: min(26rem, 100%); padding: var(--s5); }
.auth__pet svg { width: 6rem; height: 6rem; display: block; margin: 0 auto; }

/* ---------- acessibilidade ---------- */
html[data-mov="reduz"] *, html[data-mov="reduz"] *::before, html[data-mov="reduz"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { html:not([data-mov="livre"]) *, html:not([data-mov="livre"]) *::before, html:not([data-mov="livre"]) *::after { animation: none !important; transition: none !important; } }
html[data-alvos="grandes"] .btn, html[data-alvos="grandes"] .mini, html[data-alvos="grandes"] .chip, html[data-alvos="grandes"] .qty button { min-height: 3.2rem; min-width: 3.2rem; }
@media (max-width: 420px) {
  .lc__row { grid-template-columns: 2rem 1fr auto; } .lc__row .mini:last-child { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; } .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hbar { grid-template-columns: 1fr 2fr auto; }
}
