/* Tipografías alojadas en la propia web (sin servicios externos) */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =============================================================
   1. Tokens — paleta cálida (crema, durazno, terracota, mostaza, verde cálido)
   ============================================================= */
:root {
  --bg: #FFF6EA;
  --surface: #FFFDF9;
  --surface-2: #FCEEDD;
  --peach: #FBD9C2;
  --peach-2: #FDE8D8;
  --ink: #3B2A20;
  --ink-2: #6B5444;
  --ink-3: #9A8473;
  --line: #EEDCC8;
  --accent: #C8553D;
  --accent-2: #F28C38;
  --mustard: #E3A82B;
  --green: #5E8B43;
  --green-soft: #E7F0DA;
  --bad: #A8402B;
  --bad-soft: #FBE1D6;
  --warn-soft: #FCEFCF;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(59,42,32,.05), 0 14px 40px -20px rgba(120,60,30,.30);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 16px;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.015em; }
::selection { background: var(--peach); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: #fff; z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.45rem, 5.4vw, 2.6rem); }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 3.6vw, 1.9rem); margin-bottom: .9rem; }
h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .4rem; }

/* 3. Header / hero */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.08rem; }
.brand small { font-family: var(--sans); font-weight: 600; font-size: .72rem; color: var(--ink-3); }
.brand-mark { width: 30px; height: 30px; }
.header-nav { display: flex; gap: 1rem; font-size: .9rem; font-weight: 700; }
.header-nav a { text-decoration: none; color: var(--ink-2); }
.header-nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .header-nav a:not(:last-child) { display: none; } }

.hero { padding-top: 1rem; padding-bottom: .7rem; text-align: center; }
.hero-sub { color: var(--ink-2); margin: .45rem auto 0; max-width: 40rem; font-size: .98rem; }
@media (min-width: 760px) { .hero { padding-top: 2rem; padding-bottom: 1.2rem; } .hero-sub { font-size: 1.08rem; } }

/* 4. Tool card */
.tool-wrap { max-width: 860px; }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
@media (min-width: 760px) { .tool-card { padding: 1.6rem 1.8rem; } }
.noscript-note { background: var(--warn-soft); padding: .8rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.dots { list-style: none; padding: 0; display: flex; gap: .4rem; }
.dots li { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: width .25s var(--ease-out), background-color .2s; }
.dots li.is-done { background: var(--mustard); }
.dots li.is-on { width: 28px; border-radius: 99px; background: var(--accent); }
.tool-card[data-state="result"] .dots { visibility: hidden; }
.currency select { appearance: none; border: 1px solid var(--line); background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B5444' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .6rem center / 10px; border-radius: 99px; padding: .35rem 1.8rem .35rem .8rem; font-size: .85rem; font-weight: 700; min-height: 36px; }

.q { border: 0; padding: 0; min-width: 0; animation: qIn .3s var(--ease-out); }
@keyframes qIn { from { opacity: 0; transform: translateX(14px); } }
.q legend { font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 4.6vw, 1.55rem); line-height: 1.15; margin-bottom: .8rem; padding: 0; }
.q legend small { font-family: var(--sans); font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.q-num { display: block; font-family: var(--sans); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.field-label { display: block; font-size: .86rem; font-weight: 700; color: var(--ink-2); margin: .7rem 0 .35rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips-2 .chip, .chips-goal .chip { flex: 1 1 calc(50% - .45rem); }
.chip { position: relative; flex: 1 1 auto; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: .5rem .8rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: .92rem; line-height: 1.2; transition: background-color .15s, border-color .15s; }
.chip input:checked + span { background: var(--peach-2); border-color: var(--accent); color: #8a3420; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: block; }
.money { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); padding-left: .8rem; transition: border-color .15s; }
.money:focus-within { border-color: var(--accent); }
.money b { font-weight: 800; color: var(--ink-3); font-size: .92rem; white-space: nowrap; }
.money input { border: 0; background: transparent; width: 100%; min-width: 0; padding: .7rem .7rem .7rem .45rem; font-size: 1.1rem; font-weight: 700; outline: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.hint { font-size: .84rem; color: var(--ink-3); margin-top: .5rem; }
.q-error { color: var(--bad); font-weight: 700; font-size: .9rem; margin-top: .6rem; }
.q-nav { display: flex; gap: .6rem; margin-top: 1.1rem; }
.q-nav .btn-primary { flex: 1; }

.btn-primary, .btn-ghost, .btn-wa { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 50px; padding: .6rem 1.2rem; border-radius: 99px; font-weight: 800; font-size: 1rem; text-decoration: none; transition: transform .15s, background-color .15s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(200,85,61,.8); }
.btn-primary:hover { background: #B4472F; }
.btn-primary:active, .btn-wa:active { transform: scale(.98); }
.btn-primary[disabled] { opacity: .65; cursor: wait; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--peach-2); }
.btn-wa { background: #5E8B43; color: #fff; }
.btn-wa:hover { background: #4E7737; }
.btn-link { color: var(--accent); font-weight: 700; font-size: .9rem; padding: .4rem 0; text-decoration: underline; text-underline-offset: 3px; }
.btn-link.danger { color: var(--bad); }

.debts-box { margin-top: .8rem; }
.debt-row { background: var(--surface-2); border-radius: 14px; padding: .7rem; margin-bottom: .6rem; position: relative; }
.debt-row .field-label { margin-top: .4rem; }
.debt-row .rm { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; color: var(--ink-3); }
.debt-row input.plain, .debt-row select { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: .55rem .7rem; background: var(--surface); font-weight: 600; }
.rate { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
.rate select { width: auto; }

/* 5. Result */
.r-head { text-align: center; }
.r-kicker { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.r-title { margin: .15rem 0 .3rem; font-size: clamp(1.4rem, 5vw, 2rem); }
.r-why { color: var(--ink-2); font-size: .95rem; max-width: 36rem; margin: 0 auto; }
.r-income { font-size: .85rem; color: var(--ink-3); margin-top: .3rem; }
.method-tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .2rem; margin: 1rem -.2rem .5rem; scrollbar-width: none; }
.method-tabs::-webkit-scrollbar { display: none; }
.mtab { flex: 1 0 auto; min-height: 42px; padding: .4rem .85rem; border-radius: 99px; background: var(--surface-2); font-weight: 800; font-size: .9rem; white-space: nowrap; }
.mtab.is-active { background: var(--ink); color: #FFF6EA; }
.mtab.is-rec::after { content: " ⭐"; }
.m-desc { font-size: .9rem; color: var(--ink-2); text-align: center; margin-bottom: .8rem; }
.buckets { display: grid; gap: .5rem; }
@media (min-width: 640px) { .buckets { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.bucket { border-radius: 16px; padding: .7rem .85rem; background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
@media (min-width: 640px) { .bucket { display: block; } }
.bucket .b-name { font-weight: 800; font-size: .92rem; }
.bucket .b-pct { display: inline-block; font-size: .75rem; font-weight: 800; padding: .1rem .45rem; border-radius: 99px; background: rgba(255,255,255,.7); margin-left: .3rem; }
.bucket .b-amt { font-family: var(--display); font-size: 1.35rem; font-weight: 800; white-space: nowrap; }
.bucket:nth-child(1) { background: #FBE0D3; }
.bucket:nth-child(2) { background: #FCEBC9; }
.bucket:nth-child(3) { background: #E5EED6; }
.warn { margin-top: .7rem; background: var(--warn-soft); color: #7A4A0C; border-radius: 12px; padding: .65rem .8rem; font-size: .88rem; font-weight: 600; }

.plan-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 760px) { .plan-grid { grid-template-columns: 300px 1fr; align-items: start; } }
.chart-box { position: relative; max-width: 280px; margin: 0 auto; width: 100%; }
.chart-box canvas { width: 100%; height: auto; aspect-ratio: 1; }
.chart-box figcaption { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; font-size: .78rem; color: var(--ink-3); font-weight: 700; }
.chart-box figcaption b { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--ink); }
.cats-hint { font-size: .82rem; color: var(--ink-3); margin-bottom: .3rem; }
.cats { list-style: none; padding: 0; display: grid; gap: .3rem; }
.cat { display: grid; grid-template-columns: 6px 1.7rem 1fr auto; align-items: center; gap: .5rem; padding: .3rem .5rem .3rem 0; border-radius: 12px; }
.cat:nth-child(odd) { background: #FFF8F0; }
.cat .sw { width: 6px; height: 34px; border-radius: 4px; }
.cat .em { font-size: 1.25rem; text-align: center; }
.cat .nm { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.cat .nm small { display: block; font-weight: 600; color: var(--ink-3); font-size: .74rem; }
.cat .amt { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); padding-left: .45rem; width: 7.4rem; }
.cat .amt b { font-size: .76rem; color: var(--ink-3); }
.cat .amt input { width: 100%; border: 0; background: transparent; padding: .4rem .45rem .4rem .3rem; font-weight: 800; text-align: right; outline: none; font-size: .95rem; }
.cat .amt:focus-within { border-color: var(--accent); }
.cat.is-edited .amt { border-color: var(--mustard); background: #FFF7E0; }
.envelopes .cat { background: #FFF1E2; border: 1px dashed #E8C9A8; padding-left: .5rem; grid-template-columns: 1.7rem 1fr auto; }
.envelopes .cat .sw { display: none; }
.cats-total { display: flex; justify-content: space-between; gap: .5rem; margin-top: .5rem; padding: .55rem .7rem; border-radius: 12px; background: var(--green-soft); font-weight: 800; font-size: .92rem; flex-wrap: wrap; }
.cats-total.over { background: var(--bad-soft); color: var(--bad); }

.actions { display: grid; gap: .6rem; margin: 1.2rem 0 .4rem; }
@media (min-width: 640px) { .actions { grid-template-columns: 1.4fr 1fr; } }
.btn-big { min-height: 56px; font-size: 1.05rem; }
.excel-status { margin: .4rem 0 .8rem; font-size: .85rem; color: var(--ink-2); }
.excel-status.err p { color: var(--bad); font-weight: 700; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: .35rem; }
.bar span { display: block; height: 100%; width: 40%; background: var(--accent-2); border-radius: 99px; animation: barMove 1.1s ease-in-out infinite; }
@keyframes barMove { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.cards-2 { display: grid; gap: .8rem; margin-top: 1rem; }
@media (min-width: 760px) { .cards-2 { grid-template-columns: 1fr 1fr; } }
.mini-card, .debt-plan { border-radius: 18px; padding: 1rem; background: #FFF3E4; border: 1px solid var(--line); }
#ef-card { background: #F1F4E6; }
.mini-card .field-label { margin-top: .5rem; }
.big-num { font-family: var(--display); font-weight: 800; font-size: 1.5rem; margin-top: .6rem; color: var(--accent); line-height: 1.15; }
#ef-card .big-num { color: var(--green); margin-top: .2rem; }
.ef-months { font-weight: 700; margin-top: .6rem; font-size: .93rem; }
.debt-plan { margin-top: 1rem; background: #FBEDE6; }
.debt-compare { display: grid; gap: .7rem; margin-top: .7rem; }
@media (min-width: 640px) { .debt-compare { grid-template-columns: 1fr 1fr; } }
.dc { background: var(--surface); border-radius: 14px; padding: .8rem; }
.dc h4 { font-size: .95rem; margin-bottom: .3rem; }
.dc h4 small { font-weight: 600; color: var(--ink-3); }
.dc ol { padding-left: 1.2rem; font-size: .9rem; }
.dc-res { margin-top: .5rem; font-weight: 800; font-size: .92rem; }
.debt-verdict { margin-top: .7rem; font-weight: 700; }
.fine { font-size: .76rem; color: var(--ink-3); margin-top: .5rem; }
.r-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* 6. Gastos hormiga */
.hormiga-card { margin-top: 1rem; }
.hc-title { font-size: clamp(1.15rem, 4.2vw, 1.5rem); margin-bottom: .2rem; }
.h-list { list-style: none; padding: 0; display: grid; gap: .4rem; margin-top: .8rem; }
.h-item { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; align-items: center; padding: .55rem .65rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.h-item.is-on { background: #FFF3E4; border-color: #F3C39E; }
.h-item .h-check { width: 22px; height: 22px; accent-color: var(--accent); }
.h-item .h-name { font-weight: 700; font-size: .92rem; cursor: pointer; }
.h-item .h-ctrl { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .84rem; color: var(--ink-2); }
.h-item .h-ctrl input, .h-item .h-ctrl select { border: 1.5px solid var(--line); border-radius: 10px; padding: .3rem .4rem; background: var(--surface); font-weight: 700; width: 4.6rem; }
.h-item .h-ctrl select { width: auto; }
.h-item .h-sum { margin-left: auto; font-weight: 800; color: var(--accent); }
.h-item:not(.is-on) .h-ctrl { opacity: .55; }
.h-total { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .8rem; }
.h-total div { border-radius: 16px; padding: .7rem .9rem; background: #FBE0D3; }
.h-total div:last-child { background: #FCEBC9; }
.h-total span { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.h-total b { font-family: var(--display); font-size: 1.5rem; }
.h-achieve { margin-top: .7rem; border-radius: 16px; padding: .8rem .9rem; background: var(--green-soft); font-size: .92rem; }
.h-achieve h3 { font-size: .98rem; }
.h-achieve ul { padding-left: 1.1rem; }

.privacy { margin-top: 1rem; text-align: center; font-size: .9rem; background: var(--green-soft); border-radius: 14px; padding: .7rem .9rem; }
.limits { margin-top: .5rem; text-align: center; font-size: .78rem; color: var(--ink-3); }

/* 7. Content */
.section { padding-block: 2rem; }
.steps { list-style: none; padding: 0; display: grid; gap: .8rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.step-ico { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.steps p, .method p, .idea p { color: var(--ink-2); font-size: .93rem; }
.methods { display: grid; gap: .8rem; }
@media (min-width: 760px) { .methods { grid-template-columns: repeat(2, 1fr); } }
.method { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; border-top: 5px solid var(--accent-2); }
.method:nth-child(2) { border-top-color: var(--mustard); }
.method:nth-child(3) { border-top-color: var(--accent); }
.method:nth-child(4) { border-top-color: var(--green); }
.method:nth-child(5) { border-top-color: #D4A373; }
.method p + p { margin-top: .3rem; }
.seo-text { max-width: 780px; }
.seo-text h3 { margin-top: 1.2rem; }
.seo-text p { color: var(--ink-2); }
.ideas { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.idea-ico { font-size: 1.6rem; display: block; margin-bottom: .3rem; }
.faq { display: grid; gap: .5rem; max-width: 780px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .2rem 1rem; }
.faq summary { cursor: pointer; font-weight: 800; padding: .7rem 0; list-style-position: outside; }
.faq details p { padding-bottom: .8rem; color: var(--ink-2); }
.more-tools { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool-link { display: grid; grid-template-columns: auto 1fr; gap: 0 .7rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.tool-link span { grid-row: span 2; font-size: 1.8rem; }
.tool-link small { color: var(--ink-3); }

/* 8. Ads (placeholders vacíos) */
.ad-slot { display: grid; place-items: center; border: 1.5px dashed #D9BFA4; border-radius: 12px; background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(120,60,30,.03) 10px 20px); color: #B39A84; }
.ad-slot > span { font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
.ad-leaderboard { min-height: 100px; margin: 1rem 0; }
.ad-incontent { min-height: 250px; margin: 1rem 0; }
.ad-popup { min-height: 250px; width: 100%; margin: .8rem 0; }
.ad-corner { min-height: 90px; }
.ad-dialog { border: 0; border-radius: 20px; padding: 1.1rem; width: min(380px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(59,42,32,.5); text-align: center; position: fixed; inset: 0; margin: auto; height: fit-content; background: var(--surface); color: var(--ink); }
.ad-dialog::backdrop { background: rgba(59,42,32,.5); }
.ad-dialog-title { font-weight: 800; padding-right: 1.5rem; }
.ad-dialog .btn-ghost { width: 100%; }
.ad-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; background: var(--surface-2); z-index: 2; }
.ad-close:hover { background: var(--line); }
.ad-toast { position: fixed; right: 12px; bottom: 12px; z-index: 60; width: min(300px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .6rem; box-shadow: var(--shadow); animation: toastIn .4s var(--ease-out); }
.ad-toast .ad-close { top: -10px; right: -8px; width: 30px; height: 30px; font-size: 1.1rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); background: var(--surface); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }

/* 9. Footer + legal */
.site-footer { border-top: 1px solid var(--line); padding: 1.4rem 0 5rem; margin-top: 1rem; font-size: .88rem; color: var(--ink-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.footer-inner nav { display: flex; gap: 1rem; }
.legal { max-width: 780px; padding-block: 2rem; }
.legal h1 { margin-bottom: .6rem; }
.legal h2 { font-size: 1.2rem; margin: 1.5rem 0 .4rem; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: .5rem; }
.legal ul { padding-left: 1.2rem; }

/* 10. Modo pareja */
.chips-mode { margin-bottom: .2rem; }
.chips-mode .chip { flex: 1 1 calc(50% - .45rem); }
.person { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .2rem .6rem .7rem; border-radius: 14px; background: var(--surface-2); margin-top: .5rem; }
.person input.plain, input.plain { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: .7rem .8rem; background: var(--surface); font-weight: 700; }
.check { display: flex; gap: .5rem; align-items: center; font-size: .88rem; font-weight: 600; margin-top: .7rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.couple { margin-top: 1rem; border-radius: 18px; padding: 1rem; background: #FFF0E6; border: 1px solid var(--line); }
.split-tabs { display: flex; gap: .35rem; margin: .5rem 0; }
.stab { flex: 1; min-height: 40px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 800; font-size: .88rem; padding: .3rem .5rem; }
.stab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stab.is-rec::after { content: " ⭐"; }
.split-desc { font-size: .88rem; color: var(--ink-2); }
.persons { display: grid; gap: .6rem; margin-top: .7rem; }
@media (min-width: 640px) { .persons { grid-template-columns: 1fr 1fr; } }
.pcard { background: var(--surface); border-radius: 14px; padding: .8rem; }
.pcard h4 { font-size: 1rem; display: flex; justify-content: space-between; gap: .4rem; }
.pcard h4 small { color: var(--ink-3); font-weight: 700; }
.pbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: .5rem 0; background: var(--surface-2); }
.pbar i { display: block; height: 100%; }
.prow { display: flex; justify-content: space-between; font-size: .9rem; padding: .15rem 0; }
.prow b { white-space: nowrap; }
.prow.me b { color: var(--green); font-size: 1.05rem; }
.legend-mini { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .78rem; color: var(--ink-2); margin-top: .5rem; }
.legend-mini i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.couple-tips { margin-top: .7rem; background: var(--surface); border-radius: 14px; padding: .3rem .8rem; }
.couple-tips summary { cursor: pointer; font-weight: 800; padding: .4rem 0; }
.couple-tips ul { padding: 0 0 .5rem 1.1rem; font-size: .9rem; color: var(--ink-2); }
.couple-tips li + li { margin-top: .3rem; }
