:root {
  font-family: -apple-system, "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  color: #193731; background: #f6f8f6;
  --forest: #123e35; --evergreen: #1e6450; --muted: #5c6f68;
  --border: #e4eae6; --danger: #9b2c2c; --demo: #7a4b00; --demo-bg: #fdf0d2;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { min-height: 100vh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.demo { background: var(--demo-bg); color: var(--demo); font-size: 13px; text-align: center;
        padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top)); }
header { background: var(--forest); color: #fff; padding: 12px 16px; }
header h1 { font-size: 18px; margin: 0; font-weight: 600; }
main { max-width: 480px; margin: 12px auto; padding: 0 12px; }
section { background: #fff; border: 1px solid var(--border); border-radius: 14px;
          padding: 16px; margin-bottom: 12px; }
h2 { font-size: 17px; margin: 0 0 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input, select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
                font: inherit; font-size: 16px; background: #fff; color: inherit; }
button { font: inherit; }
button.primary { margin-top: 14px; width: 100%; min-height: 48px; padding: 12px; border: 0;
                 border-radius: 10px; background: var(--evergreen); color: #fff; font-weight: 600; }
button.secondary { background: #6c7f78; margin-top: 8px; }
button.danger { background: var(--danger); }
button.link { background: none; border: 0; color: #1d6a54; text-decoration: underline;
              font-size: 14px; padding: 10px 0 0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.big { font-size: 24px; font-weight: 600; }
.note { font-size: 14px; color: var(--muted); }
.msg { padding: 10px 12px; border-radius: 8px; margin-top: 12px; font-size: 14px; }
.msg.err { background: #fbe9e9; color: var(--danger); }
.msg.warn { background: var(--demo-bg); color: var(--demo); }
.hidden { display: none !important; }
.bal { background: #eef5f1; border-radius: 10px; padding: 10px 12px; }
.bal-head { font-size: 14px; }
.bal ul { list-style: none; margin: 6px 0; padding: 0; }
.bal li { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.bal small { color: var(--muted); font-size: 12px; }
.steps { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.steps li { padding: 6px 0; color: var(--muted); }
.steps li.done { color: #193731; }
.steps li.done::before { content: "✓ "; color: var(--evergreen); }
.stamp { margin: 0 0 12px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em;
         color: var(--demo); background: var(--demo-bg); border-radius: 8px; padding: 6px; }
.rc-brand { text-align: center; font-size: 26px; font-weight: 700; color: var(--forest); }
.rc-title { display: flex; align-items: center; justify-content: center; gap: 10px;
            margin: 18px 0; font-size: 19px; font-weight: 700; color: var(--forest); }
.rc-check { width: 30px; height: 30px; border-radius: 50%; background: #1e9a55; color: #fff;
            display: grid; place-items: center; font-size: 18px; }
.rc-amount { background: #eef5f0; border-radius: 12px; text-align: center; padding: 16px; }
.rc-amount small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.rc-amount strong { display: block; font-size: 30px; color: var(--forest); margin-top: 4px; }
.rc-fields { list-style: none; padding: 0; margin: 14px 0 0; }
.rc-fields li { border-bottom: 1px solid var(--border); padding: 10px 2px; }
.rc-fields small { display: block; color: var(--muted); font-size: 12px; }
.rc-fields span { font-weight: 600; overflow-wrap: anywhere; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
           border-bottom: 1px solid var(--border); padding: 12px 0; }
.hist li > div { min-width: 0; }
.hist span { overflow-wrap: anywhere; }
.hist small { display: block; color: var(--muted); font-size: 12px; }
.hist strong { white-space: nowrap; }
.empty { color: var(--muted); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff;
          border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; min-height: 56px; border: 0; background: none; color: var(--muted);
                 font-size: 14px; }
.tabbar button[aria-selected="true"] { color: var(--evergreen); font-weight: 600; }
