:root {
  --bg: #eef6f5;
  --ink: #02112a;
  --muted: #5c6e72;
  --line: #d5e4e3;
  --card: #ffffff;
  --sidebar: #3b6f6e;
  --sidebar-ink: #f4fbfa;
  --gold: #edb202;
  --teal: #4c8d8c;
  --teal-deep: #3b6f6e;
  --red: #9f2d22;
  --green: #2f6f6e;
  --amber: #8a6800;
  --shadow: 0 16px 40px rgba(2, 17, 42, 0.06);
  --radius: 18px;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  background:
    radial-gradient(1000px 420px at 0% -10%, #fff 0%, transparent 55%),
    radial-gradient(800px 380px at 100% 0%, #d7ecea 0%, transparent 46%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: #f6e3a2; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); display: grid; justify-items: start; gap: 0; padding: 28px 24px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card .logo { margin-bottom: 12px; }
.auth-card h1 { font-size: 40px; }
.auth-card .lead { margin: 6px 0 16px; }
.auth-card .seg { margin-bottom: 16px; }
.auth-card .btn.primary { width: 100%; margin-top: 4px; }
.setup-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.setup-card { width: min(860px, 100%); display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.setup-card h1 { font-size: 36px; margin-top: 12px; }
.setup-card h2 { margin: 4px 0 16px; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; }
.timeline li { position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li.is-done:not(:last-child)::before { background: var(--teal); }
.timeline li button { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; text-align: left; padding: 0 0 18px; color: var(--muted); position: relative; z-index: 1; }
.timeline .mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: white; font-size: 13px; }
.timeline .is-done { color: var(--ink); }
.timeline .is-done .mark { background: var(--teal); border-color: var(--teal); color: white; }
.timeline .is-current { color: var(--ink); font-weight: 600; }
.timeline .is-current .mark { background: var(--gold); border-color: var(--gold); color: #02112a; }
.timeline button:disabled { cursor: default; }
.setup-card .modal-actions { margin-top: 8px; }
@media (max-width: 720px) {
  .setup-card { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
}

.auth-page .lang-switch { margin-top: 16px; background: #e4eeed; }
.auth-page .lang-switch button { color: #02112a; }
.auth-page .lang-switch button[aria-pressed="true"] { background: var(--gold); color: #02112a; }
.side-logout, .side-install {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: transparent;
  color: rgba(244, 251, 250, 0.88);
  text-align: left;
  text-decoration: none;
}
.side-logout svg, .side-install svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-logout:hover, .side-install:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.shell.is-collapsed .side-logout, .shell.is-collapsed .side-install { justify-content: center; padding: 10px; }

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: transparent;
  display: block;
  flex: none;
}
.logo-lockup {
  width: min(240px, 100%);
  height: auto;
  display: block;
}
.auth-card .logo-lockup { width: min(280px, 100%); margin: 0 auto 4px; }
.boot .logo-lockup { width: min(220px, 72vw); }

.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; min-height: 100dvh; transition: grid-template-columns .18s ease; }
.shell.is-collapsed { grid-template-columns: 84px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, #3b6f6e 0%, #3a7a79 58%, #2f6463 100%);
  color: var(--sidebar-ink);
}
.brand { display: flex; gap: 8px; align-items: center; padding: 0 4px; }
.brand-plate { display: flex; align-items: center; min-width: 0; flex: 1; background: #fff; border-radius: 14px; padding: 4px 8px; }
.brand-lockup { height: 40px; width: 100%; object-fit: contain; object-position: left center; display: block; }
.brand-plate .brand-mark { display: none; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(244, 251, 250, 0.88);
  text-decoration: none;
}
.nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.nav a.active { background: rgba(237, 178, 2, 0.22); color: #fff4cc; }
.collapse-btn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff4cc;
}
.collapse-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.collapse-btn:hover { background: rgba(255, 255, 255, 0.06); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.lang-switch { display: flex; gap: 4px; width: fit-content; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.lang-switch button { border: 0; border-radius: 999px; padding: 6px 10px; background: transparent; color: rgba(244, 251, 250, 0.88); font-size: 12px; letter-spacing: 0.04em; }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: #02112a; }
.side-note { padding: 12px; color: rgba(244, 251, 250, 0.72); font-size: 12.5px; line-height: 1.4; }
.shell.is-collapsed .sidebar { align-items: center; padding-left: 10px; padding-right: 10px; }
.shell.is-collapsed .brand { flex-direction: column; gap: 8px; width: 100%; padding: 0; }
.shell.is-collapsed .brand-plate { flex: none; padding: 4px; }
.shell.is-collapsed .collapse-btn { margin-left: 0; }
.shell.is-collapsed .brand-lockup { display: none; }
.shell.is-collapsed .brand-plate .brand-mark { display: block; }
.shell.is-collapsed .brand-word,
.shell.is-collapsed .brand-text,
.shell.is-collapsed .nav-label,
.shell.is-collapsed .side-note { display: none; }
.shell.is-collapsed .nav,
.shell.is-collapsed .side-foot { width: 100%; }
.shell.is-collapsed .nav a { justify-content: center; padding: 10px; }
.shell.is-collapsed .side-foot { justify-items: center; }
.shell.is-collapsed .lang-switch { flex-direction: column; }

.main { padding: 28px 36px 72px; }
.page { max-width: 1120px; }
.page-head, .row-actions, .filters, .card-head, .split-head, .tx, .day-h, .recur-top, .stat, .kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-head { align-items: flex-end; margin-bottom: 22px; }
.page-head h1 { font-size: 42px; line-height: 1.15; }
.eyebrow { margin: 0 0 6px; color: var(--amber); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lead { max-width: 560px; margin-top: 8px; color: var(--muted); }
.row-actions, .filters { justify-content: flex-start; flex-wrap: wrap; }
.filters { margin-bottom: 16px; }

.banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f0d36a;
  border-radius: 16px;
  background: #fff8e0;
}
.banner p { color: #02112a; }
.banner .row-actions { flex: none; }

.home-confirm { margin: 0 0 14px; }
.home-overdraft { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border-left: 4px solid var(--red); background: #fdf4f2; }
.home-overdraft strong { color: var(--red); }
.home-overdraft p { margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat, .card, .leak, .article, .recur, .empty {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat { display: block; padding: 16px 16px 14px; }
.stat span, .muted, .hint, .tx small, .recur p, .article p, .leak p { color: var(--muted); }
.stat strong { display: block; margin: 8px 0 2px; font-family: var(--serif); font-size: 30px; font-weight: 560; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat em { font-style: normal; font-size: 13px; }
.stat.good strong, .pos { color: var(--green); }
.stat.bad strong, .neg { color: var(--red); }
.margin-line b.pos { color: var(--teal); }
.margin-line b.neg { color: var(--red); }

.split { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 14px; margin-top: 14px; }
.stack { display: grid; gap: 14px; }
.card { padding: 18px; }
.card-head { align-items: baseline; margin-bottom: 14px; }
.card h2, .modal h2, .article h3, .leak h3 { font-size: 26px; }
.card h3 { font-size: 20px; }

.btn, .icon-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--ink);
}
.btn.small { padding: 6px 11px; font-size: 14px; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #02112a; }
.btn.primary:hover { background: #d9a002; border-color: #d9a002; }
.btn.ghost { background: transparent; }
.btn.danger { background: #fff5f3; border-color: #efc7c2; color: var(--red); }
.btn:hover { border-color: #b7d0ce; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.icon-btn { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: #e4eeed; }
.seg button, .chip {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
}
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: white; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: white; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span, .filters label span { font-size: 13px; color: var(--muted); }
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 14px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d7e4e3;
  border: 1px solid #c3d5d4;
  position: relative;
  flex: none;
  transition: background .16s ease, border-color .16s ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(2, 17, 42, 0.22);
  transition: transform .16s ease;
}
.switch input:checked + .switch-ui {
  background: var(--teal);
  border-color: var(--teal-deep);
}
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.switch-text {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 15px;
}
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #c9dddb;
  background: white;
}
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.password-toggle:hover { color: var(--ink); background: #eef6f5; }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
textarea { min-height: 72px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.budget-input { max-width: 140px; text-align: right; font-variant-numeric: tabular-nums; }
.moneda { font-variant-numeric: tabular-nums; }

.track { height: 8px; border-radius: 99px; background: #e4eeed; overflow: hidden; }
.fill { height: 100%; border-radius: inherit; background: var(--teal); }
.fill.warm { background: var(--gold); }
.fill.over { background: var(--red); }
.bar-row, .cat-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(80px, 1.4fr) auto; gap: 10px; align-items: center; margin: 8px 0; }
.cat-row strong, .bar-row strong { font-weight: 560; }
.right, .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rule { margin-top: 8px; }
.rule .label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 4px; }

.tx-list { display: grid; gap: 16px; }
.day-h { margin: 8px 2px; }
.day-h h3 { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.tx, .recur, .leak, .article { padding: 14px 16px; }
.tx { box-shadow: none; border-radius: 14px; margin-top: 8px; }
.tx-main, .recur-id { display: flex; gap: 10px; align-items: center; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 99px; flex: none; }
.tx-main div, .recur-id div { min-width: 0; }
.tx strong, .recur strong { display: block; }
.tx .actions { display: flex; gap: 6px; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 2px 8px; font-size: 12px; background: #e8f3f2; color: #3b6f6e; }
.badge.alta { background: #fde8e4; color: var(--red); }
.badge.media { background: #fff4cc; color: var(--amber); }
.badge.baja { background: #e4f2f1; color: var(--teal-deep); }
.badge.ok { background: #e4f2f1; color: var(--green); }

.recur-table { margin-bottom: 14px; }
.recur-table h2 { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.sheet { width: 100%; border-collapse: collapse; min-width: 760px; }
.sheet th, .sheet td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: 500; }
.sheet thead th { font-size: 13px; color: var(--muted); }
.sheet tfoot th, .sheet tfoot td { border-bottom: 0; font-weight: 650; }
.sheet .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet tr.is-paused { opacity: 0.62; }
.sheet .notice-controls { min-width: 220px; margin: 0; }
.sheet .notice-controls select, .sheet .notice-controls input { width: 8.5rem; }
.sheet .row-actions { flex-wrap: nowrap; }
.recur-grid, .advice-grid, .week-grid, .cols { display: grid; gap: 12px; }
.recur-grid { grid-template-columns: 1fr 1fr; }
.recur.paused { opacity: 0.62; }
.recur p { margin-top: 4px; font-size: 14px; }
.recur .row-actions { margin-top: 12px; }

.score-wrap { display: grid; grid-template-columns: 148px 1fr; gap: 18px; align-items: center; }
.score { width: 148px; height: 148px; position: relative; }
.score svg { width: 148px; height: 148px; }
.score-num { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.score-num strong { font-family: var(--serif); font-size: 42px; line-height: 1; }
.score-num span { color: var(--muted); font-size: 13px; }
.score.ok { color: var(--teal); }
.score.warn { color: var(--amber); }
.score.bad { color: var(--red); }
.leak + .leak, .article + .article { margin-top: 10px; }
.leak h3, .article h3 { font-size: 22px; margin-bottom: 4px; }
.leak .badge, .article .badge { margin-bottom: 6px; }
.notes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.notes li { padding-left: 14px; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 99px; background: var(--teal); }

.donut-wrap { display: grid; grid-template-columns: 168px 1fr; gap: 12px; align-items: center; }
.legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.legend li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.swatch { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; }

.cols { grid-template-columns: repeat(6, 1fr); align-items: end; min-height: 180px; }
.col { display: grid; align-items: end; justify-items: center; gap: 6px; height: 180px; }
.col-track { width: 100%; max-width: 54px; height: 150px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.col i { display: block; width: 14px; border-radius: 7px 7px 3px 3px; }
.col i.inc { background: var(--teal); }
.col i.exp { background: var(--gold); }
.col span { font-size: 12px; color: var(--muted); }

.week-grid { grid-template-columns: repeat(7, 1fr); }
.daycell { padding: 10px; border-radius: 14px; background: #f7fbfb; border: 1px solid var(--line); min-height: 92px; }
.daycell.today { border-color: var(--teal); background: #eef7f6; }
.daycell strong { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.daycell b { display: block; margin-top: 10px; font-size: 15px; }

.advice-grid { grid-template-columns: 1fr 1fr; }
.plan { margin: 0; padding-left: 18px; }
.plan li { margin: 6px 0; }
.note { padding: 12px 14px; border-radius: 14px; background: #f4f8f4; color: #3d5558; margin-bottom: 12px; }

.empty { padding: 28px; text-align: center; }
.empty h2 { font-size: 32px; margin-bottom: 6px; }
.kvs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.kv { display: block; padding: 12px; border-radius: 14px; background: #f7fbfb; }
.kv b { display: block; margin-top: 4px; font-size: 20px; font-family: var(--serif); font-weight: 560; }

.modal-back { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(2, 17, 42, 0.46); }
.modal { width: min(560px, 100%); max-height: min(92vh, 760px); overflow: auto; padding: 20px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 6px; }
.modal .lead { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--sidebar);
  color: white;
  box-shadow: var(--shadow);
}
.toast.err { background: var(--red); }
.toast.hide { opacity: 0; pointer-events: none; }
body.modal-open { overflow: hidden; }

@media (max-width: 980px) {
  .stats, .recur-grid, .advice-grid, .kvs { grid-template-columns: 1fr 1fr; }
  .split, .score-wrap, .donut-wrap, .form-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 34px; }
}
@media (max-width: 800px) {
  .shell, .shell.is-collapsed { display: block; transition: none; }
  .brand-text { display: none; }
  .nav { flex: 1 1 0; min-width: 0; }
  .side-foot { margin-top: 0; flex: none; }
  .shell.is-collapsed .brand { flex-direction: row; width: 100%; justify-content: space-between; }
  .shell.is-collapsed .nav,
  .shell.is-collapsed .side-foot { display: none; }
  .shell.is-collapsed .lang-switch { flex-direction: row; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
  }
  .side-note, .brand em { display: none; }
  .nav { flex-direction: row; overflow: auto; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .main { padding: 16px 14px 56px; }
  .stats, .week-grid, .cols, .advice-grid, .recur-grid, .kvs { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: repeat(6, minmax(42px, 1fr)); overflow: auto; }
  .banner, .page-head, .tx, .bar-row, .cat-row { align-items: stretch; flex-direction: column; }
  .bar-row, .cat-row { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

.info-uso { position: relative; display: inline-flex; align-items: center; gap: 6px; }
h1 .info-uso, h2 .info-uso { margin-left: 8px; vertical-align: middle; }
.nav .info-uso { margin-left: 8px; }
.info-uso > .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.nav .info-uso > .info-icon { border-color: rgba(255, 244, 204, 0.85); color: #fff4cc; }
.info-tooltip {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  max-width: min(280px, 70vw);
  background: #02112a;
  color: #f4fbfa;
  text-align: left;
  border-radius: 10px;
  padding: 8px 10px;
  position: absolute;
  z-index: 80;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(2, 17, 42, 0.28);
  pointer-events: none;
}
.info-tooltip.info-tooltip-floating {
  position: fixed;
  visibility: visible;
  opacity: 1;
  margin: 0;
}
.info-tooltip ul { margin: 0; padding-left: 16px; }
.info-tooltip li + li { margin-top: 4px; }

body.is-app {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
.install-bar {
  position: fixed;
  z-index: 30;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.install-bar div { flex: 1; min-width: 140px; }
#app:has(.install-bar) .main,
#app:has(.install-bar) .auth-page,
#app:has(.install-bar) .setup-page { padding-bottom: 128px; }
.install-bar img { width: 48px; height: 48px; border-radius: 12px; }
.install-bar p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.install-bar .btn { white-space: nowrap; }
.install-page { min-height: 100vh; min-height: 100dvh; padding: 28px 16px 48px; }
.install-wrap { width: min(1040px, 100%); margin: 0 auto; }
.install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.install-card .hint { overflow-wrap: anywhere; }
.install-card ol { margin: 12px 0; padding-left: 18px; }
.install-card li + li { margin-top: 6px; }
.install-card.is-current { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(237, 178, 2, 0.28); }
.install-kicker { margin: 0 0 6px; color: #9a7400; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.install-page .lang-switch { margin-top: 18px; }
@media (max-width: 800px) {
  .install-grid { grid-template-columns: 1fr; }
}

.notice-card { border-left: 4px solid var(--gold); }
.notice-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.notice-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.notice-item p { margin: 2px 0 0; }
.notice-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
.notice-controls .field { min-width: 140px; margin: 0; flex: 1; }
