/* Calm Money — Neat Wren Studio
   Tokens, layout, components. Mobile-first; left rail from 900px. */

:root {
  --clay: #CB6B47;
  --clay-deep: #B55C3B;
  --clay-soft: #F3D9CD;
  --charcoal: #3D3B3A;
  --blush: #F5E3D8;
  --cream: #FFFBF7;

  --bg: var(--blush);
  --card: var(--cream);
  --card-2: #FBF1EA;
  --text: var(--charcoal);
  --muted: #7A716C;
  --line: #EBD6C9;
  --accent: var(--clay);
  --accent-text: #FFFBF7;
  --ok: #5E8A6A;
  --ok-soft: #DDEBE0;
  --note: #8A6E3C;
  --note-soft: #F6EBD2;
  --shadow: 0 1px 2px rgba(61, 59, 58, 0.06), 0 6px 20px rgba(61, 59, 58, 0.06);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --gap: 16px;
  --tabbar-h: 64px;
}

:root[data-theme="dark"] {
  --bg: #26242A;
  --card: #312F35;
  --card-2: #3A3840;
  --text: #F5E3D8;
  --muted: #B3A79F;
  --line: #44414A;
  --accent: #CB6B47;
  --accent-text: #FFFBF7;
  --clay-soft: #4A3A35;
  --ok: #8FBF9C;
  --ok-soft: #2F3E34;
  --note: #E0C27E;
  --note-soft: #3F3A2C;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 10px; }
a { color: var(--accent); }
small, .small { font-size: 15px; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 50;
}
.skip:focus { left: 8px; }

/* ---------- Layout ---------- */
.shell { display: block; }
.rail { display: none; }
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
}
.view { display: grid; gap: var(--gap); }
.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 0 8px; }
.foot:empty { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: stretch;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; color: var(--muted); font-size: 12px; padding: 6px 4px; min-width: 0;
}
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] { color: var(--accent); }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
  .rail {
    display: flex; flex-direction: column; gap: 8px;
    position: sticky; top: 0; height: 100vh;
    padding: 24px 16px; border-right: 1px solid var(--line); background: var(--card);
  }
  .rail-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
  .rail-title { font-family: var(--serif); font-size: 20px; font-weight: 600; }
  .rail .tabs { display: flex; flex-direction: column; gap: 4px; }
  .rail .tab { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 16px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); }
  .rail .tab[aria-selected="true"] { background: var(--clay-soft); color: var(--accent); }
  .rail .tab:hover { background: var(--card-2); }
  .rail-foot { margin-top: auto; }
  .rail-link { background: none; border: 0; color: var(--muted); padding: 10px 12px; border-radius: var(--radius-sm); text-align: left; width: 100%; }
  .rail-link:hover, .rail-link[aria-current="page"] { background: var(--card-2); color: var(--text); }
  .main { max-width: 860px; padding: 32px 40px 48px; }
  .tabbar { display: none; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
}

/* ---------- Cards and basic components ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card.soft { background: var(--card-2); box-shadow: none; }
.card.accent { background: var(--accent); color: var(--accent-text); }
.card.accent .muted { color: rgba(255, 251, 247, 0.8); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { flex: 1; }
.card > :last-child { margin-bottom: 0; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 600; font-size: 16px;
  background: var(--accent); color: var(--accent-text); min-height: 44px;
}
.btn:hover { background: var(--clay-deep); }
.btn.secondary { background: var(--clay-soft); color: var(--text); }
.btn.secondary:hover { background: var(--line); }
.btn.ghost { background: transparent; color: var(--accent); padding: 8px 12px; }
.btn.ghost:hover { background: var(--clay-soft); }
.btn.quiet { background: transparent; color: var(--muted); padding: 8px 12px; font-weight: 500; }
.btn.quiet:hover { color: var(--text); background: var(--card-2); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; min-height: 36px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.btn-row.between { justify-content: space-between; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 16px; min-height: 40px;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip.big { font-size: 20px; font-family: var(--serif); padding: 10px 18px; min-height: 48px; }

.seg { display: inline-flex; background: var(--card-2); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button {
  border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; color: var(--muted); font-weight: 500; min-height: 36px;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; }

.list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line);
}
.list > .row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 15px; }
.row .amt { font-family: var(--serif); font-size: 19px; white-space: nowrap; }
.row .amt.in { color: var(--ok); }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--card-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.row.done .title, .row.done .amt { opacity: 0.55; text-decoration: line-through; }
.row .acts { display: flex; gap: 4px; align-items: center; flex: none; }
@media (max-width: 599px) {
  .row.wrap { flex-wrap: wrap; }
  .row.wrap .acts { flex-basis: 100%; justify-content: flex-end; }
}
.icon-btn {
  background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 8px; min-width: 40px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.check {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0;
}
.check svg { width: 16px; height: 16px; stroke: var(--accent-text); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.check[aria-checked="true"] svg { opacity: 1; }

.badge {
  display: inline-block; font-size: 13px; padding: 2px 9px; border-radius: 999px; background: var(--clay-soft); color: var(--text); font-weight: 500; vertical-align: middle;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.note { background: var(--note-soft); color: var(--note); }

.note-line { background: var(--note-soft); color: var(--note); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; }
.ok-line { background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field .lbl { font-weight: 600; font-size: 15px; }
.field .help { color: var(--muted); font-size: 14px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius-sm);
  padding: 11px 12px; font-size: 17px; min-height: 46px;
}
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--clay-soft); }
textarea.input { min-height: 90px; resize: vertical; }
.input-money { display: flex; align-items: center; gap: 8px; }
.input-money .sym { font-family: var(--serif); font-size: 22px; color: var(--muted); }
.input.big { font-size: 28px; font-family: var(--serif); min-height: 56px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.toggle .t { flex: 1; }
.toggle .t small { display: block; color: var(--muted); }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row .input { flex: 1; }

/* ---------- Home ---------- */
.hero { padding: 24px 20px; }
.hero .label { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.hero .big {
  font-family: var(--serif); font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 8px; word-break: break-word;
}
.hero .big .pence { font-size: 28px; opacity: 0.6; }
.hero .big.low { color: var(--note); }
.hero .sub { color: var(--muted); font-size: 15px; }
.hero details { margin-top: 14px; }
.hero summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.hero summary::-webkit-details-marker { display: none; }
.hero summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform .15s; }
.hero details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.breakdown { margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--line); }
.breakdown li.head { border-top: 0; color: var(--muted); font-weight: 600; padding-top: 10px; }
.breakdown li.total { font-weight: 700; border-top: 2px solid var(--line); }
.breakdown li .ind { padding-left: 14px; color: var(--muted); }

.step-card { display: flex; align-items: center; gap: 14px; }
.step-card .grow { flex: 1; min-width: 0; }
.step-card .kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.step-card .what { font-family: var(--serif); font-size: 20px; margin-top: 2px; }

.quick .chips { margin-bottom: 10px; }
.quick .amount-chips { flex-wrap: nowrap; }
.quick .amount-chips .chip { flex: 1 1 0; min-width: 0; text-align: center; padding: 10px 4px; font-size: 19px; }
.quickbox { display: flex; gap: 8px; margin-top: 10px; }
.quickbox .input { flex: 1; }

.banner { background: var(--note-soft); color: var(--note); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.banner .grow { flex: 1; }
.banner strong { display: block; }

.away ol { padding-left: 20px; margin: 8px 0 12px; }
.away li { margin-bottom: 6px; }

.run svg { width: 100%; height: auto; display: block; }
.run-days { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 15px; }
.run-days .d { display: flex; gap: 10px; align-items: baseline; }
.run-days .d .date { width: 76px; color: var(--muted); flex: none; }
.run-days .d .ev { flex: 1; }
.run-days .d .amt { font-family: var(--serif); }

/* ---------- Month ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h2 { font-size: 20px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.cal .day {
  aspect-ratio: 1 / 1; border: 0; background: transparent; border-radius: 10px; padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; font-size: 15px; color: var(--text); min-width: 0;
}
.cal .day.other { opacity: 0.35; }
.cal .day.today { font-weight: 700; color: var(--accent); }
.cal .day[aria-pressed="true"] { background: var(--clay-soft); }
.cal .day .n { line-height: 1; }
.cal .dots { display: flex; gap: 3px; height: 6px; }
.cal .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal .dot.in { background: var(--ok); }
.cal .dot.sp { background: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.legend .dot.in { background: var(--ok); }
.legend .dot.sp { background: var(--muted); }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.summary .stat { background: var(--card-2); border-radius: var(--radius-sm); padding: 12px; }
.summary .stat .k { font-size: 13px; color: var(--muted); }
.summary .stat .v { font-family: var(--serif); font-size: 21px; overflow-wrap: anywhere; }

/* ---------- Progress ---------- */
.bar { height: 10px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar > span.ok { background: var(--ok); }
.bar > span.note { background: var(--note); }

/* ---------- Settings ---------- */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.setting:first-of-type { border-top: 0; }
.setting .t { flex: 1; min-width: 160px; }
.setting .t small { display: block; color: var(--muted); }
.setting select.input { width: auto; min-width: 160px; }
.setting .input[type="text"] { max-width: 240px; }

/* ---------- Dialog ---------- */
.dlg {
  border: 0; border-radius: var(--radius) var(--radius) 0 0; padding: 0; background: var(--card); color: var(--text);
  width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; box-shadow: var(--shadow);
}
.dlg::backdrop { background: rgba(38, 36, 42, 0.45); }
.dlg-inner { padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); overflow: auto; max-height: 92vh; }
.dlg-inner h2 { margin-bottom: 14px; }
.dlg .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.dlg .actions .danger { margin-right: auto; color: var(--muted); }
@media (min-width: 640px) {
  .dlg { border-radius: var(--radius); max-width: 520px; margin: auto; }
}

/* wizard */
.wiz-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.wiz-steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--card-2); }
.wiz-steps span.on { background: var(--accent); }
.wiz-bill { display: grid; grid-template-columns: 1.6fr 1fr 0.8fr; gap: 8px; margin-bottom: 8px; }
.wiz-bill .input { min-height: 42px; padding: 8px 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--charcoal); color: var(--cream); padding: 10px 16px; border-radius: 999px; font-size: 15px;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 40; max-width: 90vw; text-align: center;
}
:root[data-theme="dark"] .toast { background: var(--cream); color: var(--charcoal); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

.empty { color: var(--muted); padding: 10px 0; }
.notes-list .row { align-items: flex-start; }
.notes-list .text { white-space: pre-wrap; }
.menu-list .row { cursor: pointer; }
.menu-list .row:hover { color: var(--accent); }
.menu-list .arrow { color: var(--muted); }

.install-steps { padding-left: 20px; margin: 8px 0; }
.install-steps li { margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- v1.1: help button, demo line, tour ---------- */
.help-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--muted);
  font-family: var(--serif); font-size: 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none;
}
.help-btn:hover { color: var(--accent); border-color: var(--accent); }
.demo-line { font-size: 14px; color: var(--muted); margin-top: -8px; }
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-highlight {
  position: fixed; border-radius: var(--radius); box-shadow: 0 0 0 9999px rgba(38, 36, 42, 0.55), 0 0 0 3px var(--accent);
  pointer-events: none; transition: top .2s, left .2s, width .2s, height .2s;
}
.tour-card {
  position: fixed; left: 16px; right: 16px; max-width: 420px; margin: 0 auto; background: var(--card); color: var(--text);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: top .2s;
}
.tour-card h2 { margin-bottom: 6px; }
.tour-card p { color: var(--muted); }
.tour-count { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 4px; }

/* ---------- Insights ---------- */
.period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.period select.input { flex: 1; min-width: 150px; width: auto; }
.period .range { color: var(--muted); font-size: 15px; width: 100%; }
.period .custom { display: flex; gap: 8px; width: 100%; }
.period .custom .input { min-height: 42px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.barrow { display: block; width: 100%; background: none; border: 0; padding: 0; text-align: left; color: inherit; border-radius: 8px; }
.barrow .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 15px; }
.barrow .top .name { font-weight: 600; }
.barrow .top .meta { color: var(--muted); white-space: nowrap; }
.barrow .top .delta { font-size: 13px; margin-left: 6px; }
.barrow .delta.up { color: var(--note); }
.barrow .delta.down { color: var(--ok); }
.barrow .track { height: 14px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.barrow .track span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.barrow[aria-expanded="true"] .track span { background: var(--clay-deep); }
.bar-detail { margin: 6px 0 4px 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
.bar-detail .row { padding: 8px 0 8px 10px; }
.thin { height: 6px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.thin span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.thin span.note { background: var(--note); }
.inout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.inout .stat { background: var(--card-2); border-radius: var(--radius-sm); padding: 12px; }
.inout .stat .k { font-size: 13px; color: var(--muted); }
.inout .stat .v { font-family: var(--serif); font-size: 22px; overflow-wrap: anywhere; }
.inout .stat.kept { grid-column: 1 / -1; }
.trend svg { width: 100%; height: auto; display: block; }
@media (min-width: 900px) { .inout { grid-template-columns: repeat(4, minmax(0, 1fr)); } .inout .stat.kept { grid-column: auto; } }

/* ---------- Import preview ---------- */
.preview-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: center; margin: 8px 0; }
.map-grid .lbl { font-size: 15px; }
.sample-rows { font-size: 13px; color: var(--muted); background: var(--card-2); border-radius: var(--radius-sm); padding: 8px 10px; overflow: auto; white-space: nowrap; margin: 8px 0; }

/* ---------- Demo build: locked screens, unlock card, full-version row ---------- */
.locked { position: relative; min-height: 420px; }
.locked-under {
  filter: blur(7px); opacity: 0.75; pointer-events: none; user-select: none;
  display: grid; gap: var(--gap); max-height: 78vh; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.lock-card {
  background: var(--card); color: var(--text); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.locked > .lock-card { position: absolute; left: 0; right: 0; top: 56px; margin: 0 auto; max-width: 400px; border: 1.5px solid var(--line); }
.lock-card h2 { font-size: 20px; }
.lock-card p { margin: 0; color: var(--muted); }
.lock-card .btn { text-decoration: none; margin-top: 6px; }
.lock-card .carry { font-size: 14px; }
.lock-card.in-modal { box-shadow: none; padding: 4px 0 0; }
.unlock-modal .actions { margin-top: 12px; }
.locked-btn { white-space: nowrap; }
.full-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  background: var(--card); border: 1.5px dashed var(--line); color: var(--muted); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; text-align: left;
}
.full-row:hover { color: var(--accent); border-color: var(--accent); }
.full-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
