/* ============================================================
   家計ダッシュボード — ライトテーマ（Claudeのオートホワイト基調）
   ページ背景 #faf9f5・白カード・墨色テキスト。
   タイポ体系（セリフ大型数字／サンスUI／モノラベル）と
   クロマティックタイルは Origin Financial 版から継承。
   ダークは prefers-color-scheme でニュートラルの梯子だけを反転（タイル色は不変）。
   ============================================================ */

:root {
  /* 暖色ニュートラル（Claude背景系） */
  --void: #ffffff;        /* 入力背景・反転テキスト */
  --abyss: #f3f1e9;       /* 一段沈んだ面（コードブロック等） */
  --obsidian: #faf9f5;    /* ページキャンバス＝Claudeのオートホワイト */
  --graphite: #ffffff;    /* カード面 */
  --graphite-2: #e9e5da;  /* 枠線・バー軌道 */
  --steel: #d6d1c3;       /* 強めの枠線・ホバー */
  --fog: #8a8578;         /* 弱いテキスト・ラベル */
  --ash: #57534a;         /* 本文 */
  --silver: #3a3830;      /* テーブル・リスト本文（濃いめ） */
  --cloud: #262521;       /* 見出し */
  --pure: #1f1e1a;        /* 最強調・主ボタン（墨） */

  /* クロマティック（タイル・チャート用は変更なし） */
  --iris: #847dff;
  --cyan: #00b3dd;
  --pale-iris: #d1c9ff;
  --deep-iris: #4b49aa;
  --orchid: #dd90d8;
  --peri: #90b8f0;
  --orchid-text: #a54c93; /* 白背景で読める警告色 */
  --link: #3a6ea8;

  --serif: "Playfair Display", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", -apple-system, sans-serif;
  --mono: "Roboto Mono", "SF Mono", Menlo, monospace;

  /* 面に乗る文字・状態色（ライト／ダークで対にする） */
  --on-pure: #ffffff;      /* --pure の面に乗る文字 */
  --on-solid: #ffffff;     /* 濃い状態色バッジに乗る文字（両モード共通） */
  --accent-fg: #4b49aa;    /* 文字として使う藍。面の --deep-iris とは別に持つ */
  --surface-blur: rgba(250, 249, 245, 0.88);
  --hairline: rgba(233, 229, 218, 0.5);
  --row-line: rgba(130, 122, 105, 0.16);
  --row-hover: rgba(130, 122, 105, 0.07);
  --scrim: rgba(38, 37, 33, 0.45);
  --mark: #262521;         /* バー上の予算マーカー */
  --warn: #c0392b;         /* 予算超過（文字） */
  --pace: #b8860b;         /* ペース警告（文字） */
  --gain: #1e9e6e;         /* 収入・減少（文字） */
  --warn-solid: #c0392b;   /* バッジ・バーの面（両モード共通） */
  --pace-solid: #b8860b;
  --chart-grid: #e7e3d8;   /* チャートのグリッド線 */

  /* 角丸スケール：3(バー) / 6(小コントロール) / 8(コントロール) / 16(カード) / 30(タイル) / ピル */
  --r-bar: 3px;
  --r-ctl-sm: 6px;
  --r-ctl: 8px;
  --r-card: 16px;
  --r-tile: 30px;
  --r-pill: 999px;
}

/* ---------- ダークテーマ ---------- */
/* ニュートラルの梯子だけを反転させる。タイル・チャートのクロマティック色と
   雲背景の上に乗る文字（--on-media 相当）はライトと同じ値のまま。 */
@media (prefers-color-scheme: dark) {
  :root {
    --void: #26241f;
    --abyss: #131211;
    --obsidian: #171613;   /* ページキャンバス（純黒にはしない） */
    --graphite: #1f1e1a;   /* カード面 */
    --graphite-2: #33302a;
    --steel: #46423a;
    --fog: #948e80;
    --ash: #cbc5b7;
    --silver: #ded8ca;
    --cloud: #efeadd;
    --pure: #f2ecdf;
    --on-pure: #1f1e1a;

    --accent-fg: #a9a4ff;
    --orchid-text: #e394cd;
    --link: #8fb6e6;

    --surface-blur: rgba(23, 22, 19, 0.88);
    --hairline: rgba(255, 255, 255, 0.10);
    --row-line: rgba(255, 255, 255, 0.09);
    --row-hover: rgba(255, 255, 255, 0.05);
    --scrim: rgba(0, 0, 0, 0.62);
    --mark: #cbc5b7;
    --warn: #ef8172;
    --pace: #dda743;
    --gain: #4ec99a;
    --chart-grid: #33302a;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  background: var(--obsidian);   /* ページ本体は白（ライトテーマ） */
  color: var(--ash);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--deep-iris); color: #ffffff; }

h1, h2, h3 { font-weight: 500; color: var(--cloud); }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- モノラベル ---------- */
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fog);
}

/* ---------- ヘッダー ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-blur);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wordmark .name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--cloud);
  letter-spacing: 0.04em;
}

nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  min-width: 0;              /* これがないとflexアイテムが内容幅より縮まず、ページごと横に伸びる */
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }

nav button {
  background: none;
  border: none;
  flex-shrink: 0;
  border-radius: var(--r-ctl);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--fog);
  transition: color .15s, background .15s;
  white-space: nowrap;
}

nav button:hover { color: var(--cloud); background: var(--abyss); }
nav button.active { color: var(--on-pure); background: var(--pure); }

#save-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fog);
  white-space: nowrap;
}
#save-status.err { color: var(--orchid-text); }

/* ---------- レイアウト ---------- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 120px;
}

.view { display: none; }
.view.active { display: block; }

.section { margin-bottom: 56px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

/* ---------- ヒーロー（家計＝資産合計のところだけ空） ---------- */
.hero {
  position: relative;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: #0b1016;   /* 空(clouds2)のフォールバック。オンライン時はcanvasが覆う */
  padding: 40px 40px 44px;
  margin-bottom: 40px;
  isolation: isolate;
  min-height: 340px;
  display: flex;
  align-items: flex-end;   /* 文字は下寄せ、上空に雲のスペースを空ける */
}

#hero-bg { position: absolute; inset: 0; z-index: 0; }
#hero-bg canvas { display: block; }

/* 下端だけ軽く沈めて文字を読みやすく（空の色味は保つ） */
#hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0) 55%, rgba(6, 8, 12, 0.35) 100%);
}

.hero-content { position: relative; z-index: 1; }

.hero .amount {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 12px 0 16px;
  text-shadow: 0 1px 26px rgba(0, 0, 0, 0.5);
}

.hero .amount .yen { font-size: 0.5em; color: rgba(255, 255, 255, 0.65); margin-right: 0.08em; }

.hero .mono-label { color: rgba(255, 255, 255, 0.72); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }

.hero .sub { color: rgba(255, 255, 255, 0.85); font-size: 14px; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55); }
.hero .sub b { color: #ffffff; font-weight: 500; }

@media (max-width: 900px) {
  .hero { padding: 28px 22px 34px; min-height: 300px; }
}

/* ---------- クロマティックタイル ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tile {
  border-radius: var(--r-tile);
  padding: 28px 28px 24px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile .mono-label { color: inherit; opacity: 0.65; }

.tile .value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.05;
  margin-top: 14px;
}

.tile .note { font-size: 12.5px; opacity: 0.78; margin-top: 6px; }

.tile.iris { background: var(--iris); color: #0c0930; }
.tile.pale { background: var(--pale-iris); color: #1c1743; }
.tile.deep { background: var(--deep-iris); color: #f5f5f7; }
.tile.orchid { background: var(--orchid); color: #3a1136; }
.tile.peri { background: var(--peri); color: #0e2145; }

/* ---------- カード ---------- */
.card {
  background: var(--graphite);
  border: 1px solid var(--graphite-2);
  border-radius: var(--r-card);
  padding: 28px 32px;
}

.card + .card { margin-top: 16px; }

.card h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin-bottom: 4px;
}

.card .card-label { margin-bottom: 14px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: stretch;
}
/* グリッド項目は既定で内容幅より縮まない（min-width:auto）。0にして列幅に従わせる */
.grid-2 > * { min-width: 0; }

/* 書式サンプルなど長い行を持つブロックは、自分の中でスクロールさせる */
.fmt-doc { overflow-x: auto; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .header-inner { padding: 0 16px; gap: 12px; }
  main { padding: 32px 16px 96px; }
  .card { padding: 20px; }
}

@media (max-width: 600px) {
  .wordmark .mono-label { display: none; }   /* ナビに横幅を渡す */
  /* 保存状態は残す。保存失敗はモバイルでこそ見えないと困る */
  #save-status { flex-shrink: 0; }
}

/* ---------- チャート ---------- */
.chart-wrap { margin-top: 12px; }
.chart-wrap svg { width: 100%; height: auto; display: block; }

.axis-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--fog);
  letter-spacing: 0.08em;
}

/* カテゴリバー */
.cat-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

.cat-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }

.cat-row .bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--abyss);
  border-radius: var(--r-bar);
  overflow: hidden;
}

.cat-row .bar-fill { height: 100%; border-radius: var(--r-bar); }

.cat-row .cat-name { font-size: 13px; color: var(--silver); display: flex; align-items: center; gap: 8px; }
.cat-row .cat-amount { font-family: var(--mono); font-size: 12.5px; color: var(--ash); }

.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* グループ化されたカテゴリ内訳 */
.grp-block { margin-bottom: 18px; }
.grp-block:last-child { margin-bottom: 0; }
.grp-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 10px; }
.grp-name { font-size: 13.5px; font-weight: 600; color: var(--cloud); display: flex; align-items: center; gap: 8px; }
.grp-sum { font-family: var(--mono); font-size: 12.5px; color: var(--ash); }
.grp-head .bar-track { grid-column: 1 / -1; background: var(--abyss); border-radius: var(--r-bar); overflow: hidden; }
.grp-cats { padding-left: 16px; display: flex; flex-direction: column; gap: 9px; border-left: 2px solid var(--graphite-2); margin-left: 3px; }
.grp-cats .cat-name { font-size: 12.5px; }

/* 予算 */
.bud-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--mark); opacity: 0.7; }
.grp-budget { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--fog); margin-top: 5px; letter-spacing: 0.04em; }
.grp-budget.over { color: var(--warn); }
.grp-budget.pace { color: var(--pace); }
.over-badge { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--on-solid); background: var(--warn-solid); border-radius: var(--r-pill); padding: 2px 7px; vertical-align: middle; }
.pace-badge { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--on-solid); background: var(--pace-solid); border-radius: var(--r-pill); padding: 2px 7px; vertical-align: middle; }
.pace-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--pace-solid); opacity: 0.55; }
.budget-editor { display: flex; flex-direction: column; gap: 10px; }
.budget-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.budget-row .b-name { font-size: 13.5px; color: var(--silver); display: flex; align-items: center; gap: 8px; }
.budget-row input { width: 130px; text-align: right; }

/* ---------- テーブル ---------- */
table { width: 100%; border-collapse: collapse; }

/* 幅の広い表はページではなくカードの中でスクロールさせる */
.card:has(> table) { overflow-x: auto; }

th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--graphite-2);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--row-line);
  font-size: 13.5px;
  color: var(--silver);
  vertical-align: middle;
}

td.num, th.num { text-align: right; font-family: var(--mono); font-size: 13px; }
td.num.minus { color: var(--gain); }

tr:hover td { background: var(--row-hover); }

.store-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.src-chip {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--fog);
  border: 1px solid var(--graphite-2);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}

/* ---------- コントロール ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }

.btn {
  background: var(--pure);
  color: var(--on-pure);
  border: none;
  border-radius: var(--r-ctl);
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  transition: opacity .15s;
}
.btn:hover { opacity: 0.85; }

.btn-ghost {
  background: none;
  color: var(--silver);
  border: 1px solid var(--steel);
  border-radius: var(--r-ctl);
  padding: 8px 16px;
  font-size: 13px;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--fog); color: var(--cloud); }

.btn-danger { border-color: rgba(165, 76, 147, .45); color: var(--orchid-text); }
.btn-danger:hover { border-color: var(--orchid-text); color: var(--orchid-text); }

.btn-x {
  background: none; border: none; color: var(--fog);
  font-size: 15px; padding: 2px 6px; border-radius: var(--r-ctl-sm);
}
.btn-x:hover { color: var(--orchid-text); background: var(--abyss); }

input[type="text"], input[type="number"], input[type="date"], select, textarea {
  background: var(--void);
  border: 1px solid var(--steel);
  border-radius: var(--r-ctl);
  color: var(--cloud);
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--fog); }

select.cat-select {
  padding: 4px 8px;
  font-size: 12.5px;
  background: transparent;
  border-color: transparent;
  color: var(--silver);
  max-width: 150px;
}
select.cat-select:hover { border-color: var(--steel); background: var(--void); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  background: none;
  border: 1px solid var(--steel);
  border-radius: var(--r-pill);
  color: var(--ash);
  font-size: 12.5px;
  padding: 5px 14px;
  transition: all .15s;
}
.chip:hover { border-color: var(--fog); color: var(--cloud); }
.chip.active { background: var(--pure); border-color: var(--pure); color: var(--on-pure); }

.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav .m-label {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--cloud);
  min-width: 130px;
  text-align: center;
}
.month-nav button {
  background: none; border: 1px solid var(--steel); color: var(--ash);
  width: 32px; height: 32px; border-radius: var(--r-ctl); font-size: 15px;
}
.month-nav button:hover { border-color: var(--fog); color: var(--cloud); }
.month-nav button:disabled { opacity: .3; cursor: default; }

/* ---------- 口座 ---------- */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.account-card {
  background: var(--graphite);
  border: 1px solid var(--graphite-2);
  border-radius: var(--r-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-card .acct-head { display: flex; justify-content: space-between; align-items: flex-start; }
.account-card .acct-name { color: var(--cloud); font-size: 15px; font-weight: 500; }

.account-card .balance {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--cloud);
  line-height: 1.1;
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 6px;
  margin-left: -6px;
  transition: background .15s;
}
.account-card .balance:hover { background: var(--abyss); }

.account-card .acct-meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--fog); }

.type-chip {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  border-radius: var(--r-pill); padding: 3px 10px;
}
.type-chip.bank { background: rgba(132, 125, 255, .14); color: var(--accent-fg); }
.type-chip.cash { background: rgba(144, 184, 240, .18); color: #2d5c94; }

.account-card.add {
  border-style: dashed;
  background: none;
  align-items: center;
  justify-content: center;
  color: var(--fog);
  min-height: 130px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.account-card.add:hover { color: var(--ash); border-color: var(--fog); }

/* ---------- フォーム ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fog); }

/* ---------- 取込 ---------- */
.dropzone {
  border: 1.5px dashed var(--steel);
  border-radius: var(--r-card);
  padding: 36px 24px;
  text-align: center;
  color: var(--fog);
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--iris); background: rgba(132, 125, 255, 0.06); color: var(--ash); }
.dropzone .dz-title { color: var(--silver); font-size: 15px; margin-bottom: 6px; }

.fmt-doc {
  background: var(--abyss);
  border: 1px solid var(--graphite-2);
  border-radius: var(--r-ctl);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--ash);
  overflow-x: auto;
  white-space: pre;
}

/* ---------- アドバイザー ---------- */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }

.insight {
  background: var(--graphite);
  border: 1px solid var(--graphite-2);
  border-radius: var(--r-card);
  padding: 26px 28px;
}

.insight .i-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.insight .i-dot { width: 10px; height: 10px; border-radius: 50%; }
.insight h3 { font-family: var(--serif); font-size: 19px; }

.insight .i-big {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--cloud);
  line-height: 1.1;
  margin-bottom: 10px;
}

.insight ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.insight li { font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; }
.insight li .l-name { color: var(--silver); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.insight li .l-val { font-family: var(--mono); font-size: 12.5px; color: var(--ash); flex-shrink: 0; }

.insight .i-advice {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--graphite-2);
  font-size: 13px;
  color: var(--ash);
  line-height: 1.7;
}
.insight .i-advice::before { content: "→ "; color: var(--cyan); }

.advisor-lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.25;
  color: var(--cloud);
  max-width: 800px;
  margin-bottom: 36px;
}
.advisor-lede .hl { color: var(--accent-fg); }

/* ---------- モーダル ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: var(--scrim);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--graphite);
  border: 1px solid var(--graphite-2);
  border-radius: var(--r-card);
  padding: 30px 32px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 20px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ---------- トースト ---------- */
#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--pure); color: var(--on-pure);
  border-radius: var(--r-ctl);
  padding: 11px 22px;
  font-size: 13.5px; font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ---------- その他 ---------- */
.empty-note { color: var(--fog); font-size: 13.5px; padding: 20px 0; text-align: center; }

.warn-banner {
  background: rgba(165, 76, 147, 0.07);
  border: 1px solid rgba(165, 76, 147, 0.3);
  border-radius: var(--r-ctl);
  color: var(--orchid-text);
  font-size: 13px;
  padding: 10px 16px;
  margin-bottom: 24px;
  display: none;
}
.warn-banner.show { display: block; }

.wb-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.wb-form input {
  width: 160px;
  background: var(--void);
  border: 1px solid var(--steel);
  border-radius: var(--r-ctl);
  color: var(--cloud);
  padding: 7px 10px;
}
.wb-form .btn { padding: 7px 16px; font-size: 13px; }
.wb-form.done { display: none; }

.tx-footer {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: var(--fog);
  padding: 14px 12px 0;
  letter-spacing: 0.08em;
}
.tx-footer b { color: var(--cloud); font-weight: 500; }

.divider { border: none; border-top: 1px solid var(--graphite-2); margin: 24px 0; }

.small-note { font-size: 12px; color: var(--fog); line-height: 1.7; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
