:root {
  color-scheme: light;
  --paper:#f5f6f2; --white:#fff; --ink:#17251f; --muted:#52635a;
  --line:#e2e8df; --forest:#173b30; --green:#d8edc4; --mint:#edf5e7;
  --red:#9b342e;
  font-family: -apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;
  font-size:16px; line-height:1.55; color:var(--ink); background:var(--paper);
}
*,*::before,*::after {box-sizing:border-box}
body {margin:0; min-width:0}
h1,h2,h3,p,dd {margin:0}
a {color:inherit; text-decoration:none}
button,input,select {font:inherit; color:inherit}
button {cursor:pointer}
button:disabled {opacity:.55; cursor:wait}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {outline:3px solid #557d44; outline-offset:3px}
.top {background:rgba(250,251,247,.97); border-bottom:1px solid var(--line)}
.top-inner {max-width:1160px;margin:auto;padding:12px 28px;min-height:76px;display:flex;gap:20px;align-items:center;justify-content:space-between}
.brand {display:inline-flex;align-items:center;gap:10px;font-size:1.04rem;font-weight:800;line-height:1.2;white-space:nowrap}
.brand small {display:block;font-size:.67rem;letter-spacing:.15em;color:var(--muted);margin-top:4px}
.logo {background:var(--forest);color:#e1f7a6;width:42px;height:42px;display:grid;place-items:center;border-radius:13px;font-size:1.5rem}
nav {display:flex;align-items:center;gap:4px;background:#eef0e9;border-radius:12px;padding:4px}
nav button {display:flex;align-items:center;justify-content:center;gap:8px;background:transparent;border:0;padding:0 15px;min-height:44px;border-radius:9px;color:#46564c;font-size:.875rem;font-weight:750;white-space:nowrap}
nav button span {font-size:1.15rem;line-height:1}
nav button[aria-current] {background:#fff;color:var(--forest);box-shadow:0 1px 3px #20392817}
.btn {min-height:44px;border-radius:10px;border:1px solid transparent;padding:8px 15px;font-size:.875rem;font-weight:750;background:var(--white)}
.btn.new {background:var(--forest);color:#fff;white-space:nowrap}
.btn.primary {background:var(--forest);color:#fff}
.btn.quiet {border-color:var(--line);background:var(--white);white-space:nowrap}
.btn.soft {background:var(--mint);color:#234531;border-color:#dcead6}
.btn.wide {width:100%}
@media (hover:hover) {
 .btn:hover,.cost-row:hover,.check-row:hover {filter:brightness(.96)}
 .cost-row:hover,.check-row:hover {background:#f7f9f4}
}
main {max-width:1160px;margin:auto;padding:32px 28px 16px}
.page-heading {display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:22px}
.eyebrow {display:flex;align-items:center;gap:9px;font-weight:740;margin-bottom:3px;overflow-wrap:anywhere}
h1 {font-size:clamp(2rem,4vw,3.3rem);line-height:1.1;letter-spacing:-.047em;overflow-wrap:anywhere}
.heading-suffix {font-size:.58em;letter-spacing:-.03em;margin-left:.15em}
.travel-dates {color:var(--muted);font-size:.875rem;margin-top:10px;display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.travel-dates span {border-left:1px solid #bbc6bc;padding-left:9px}
.trip-controls {display:flex;gap:8px}
.trip-controls select {max-width:230px}
input,select {display:block;width:100%;min-width:0;min-height:46px;border:1px solid #cfd9ce;border-radius:9px;padding:9px 11px;background:white;font-size:1rem}
input[type=date] {appearance:none;-webkit-appearance:none;min-inline-size:0}
select {appearance:none;padding-right:34px;background:#fff linear-gradient(45deg,transparent 50%,#506057 50%) calc(100% - 17px) 53%/5px 5px no-repeat;background-image:linear-gradient(45deg,transparent 50%,#506057 50%),linear-gradient(135deg,#506057 50%,transparent 50%);background-position:calc(100% - 17px) 53%,calc(100% - 12px) 53%;background-size:5px 5px;background-repeat:no-repeat}
.summary,.columns {display:grid;grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);gap:16px}
.summary {margin-bottom:18px}
.hero {isolation:isolate;position:relative;overflow:hidden;display:flex;align-items:end;background:linear-gradient(110deg,#15372b 8%,#204c3d 100%);color:white;border-radius:20px;padding:26px 28px;min-height:216px}
.hero-content {width:100%;z-index:1}
.hero-label {color:#edf6e9;font-size:1rem;font-weight:700}
.hero-amount {font-size:clamp(2.6rem,6vw,4.85rem);font-weight:780;letter-spacing:-.065em;line-height:1.05;margin:5px 0 16px;color:#ecfbd3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.hero-deco {position:absolute;top:-20px;right:-23px;width:245px;height:210px;display:grid;place-items:center;opacity:.55;pointer-events:none}
.hero-deco i {position:absolute;inset:0;border-radius:50%;border:1px solid #8db891;transform:rotate(-28deg) scaleY(.54)}
.hero-deco i:nth-child(2) {transform:rotate(16deg) scaleY(.75)}
.hero-deco i:nth-child(3) {transform:rotate(62deg) scaleY(.66)}
.hero-deco b {color:#d6ee9a;font-size:2.6rem;font-weight:400}
.hero-foot {display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.875rem;color:#e0eddf}
.hero-foot strong {margin-left:4px;color:#fff}
.ratio {font-weight:700}
.meter {margin-top:10px;background:#ffffff35;border-radius:20px;height:6px;overflow:hidden}
.meter i {display:block;height:100%;background:#cee99d;border-radius:inherit}
.summary-side {display:grid;gap:10px;grid-template-rows:1fr auto}
.highlight {border-radius:18px;background:var(--green);padding:17px 19px;display:flex;flex-direction:column;justify-content:center;gap:2px}
.highlight.negative {background:#fbe8e0;color:var(--red)}
.highlight span {font-size:.875rem;font-weight:750}
.highlight strong {font-size:clamp(1.6rem,3vw,2.65rem);letter-spacing:-.055em;line-height:1.12;overflow-wrap:anywhere}
.highlight small {font-size:.78rem;color:#385245}
.highlight.negative small {color:var(--red)}
.quick {border:1px solid var(--line);background:white;border-radius:14px;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.875rem;flex-wrap:wrap}
.quick strong {font-size:1.15rem;letter-spacing:-.025em}
.panel {min-width:0;background:#fff;border:1px solid var(--line);border-radius:17px;padding:19px 20px}
.stack {display:grid;gap:14px;align-content:start}
.section-head {display:flex;align-items:center;justify-content:space-between;gap:9px}
h2 {font-size:1.14rem;letter-spacing:-.025em;overflow-wrap:anywhere}
h3 {font-size:.875rem;color:#3d5447}
.caption {font-size:.875rem}
.muted {color:var(--muted)}
.cost-group {margin-top:16px}
.cost-group h3 {background:#f1f4ee;padding:6px 10px;border-radius:7px}
.cost-row {display:grid;grid-template-columns:minmax(0,1fr) auto auto 15px;gap:9px;align-items:center;min-height:49px;text-align:left;width:100%;background:#fff;border:0;border-bottom:1px solid #edf0eb;padding:6px 5px;font-size:.9rem}
.cost-row strong,.history-money strong {text-align:right;font-variant-numeric:tabular-nums}
.pencil {color:var(--muted);text-align:right}
.badge {justify-self:end;flex-shrink:0;display:inline-block;font-size:.75rem;font-weight:730;line-height:1.4;padding:3px 7px;border-radius:6px;background:#f0f1ee;color:#425248;white-space:nowrap}
.badge.auto {background:#e7f4e3;color:#2b5535}
.badge.confirmed {background:#e9eefb;color:#294d85}
.local-amount,.rate-value {font-size:2rem;letter-spacing:-.04em;font-weight:760;margin-top:7px;overflow-wrap:anywhere}
.estimate p {margin-bottom:8px}
.estimate .btn {margin-top:7px}
.range {font-size:.875rem;display:flex;gap:6px 10px;align-items:baseline;flex-wrap:wrap}
.check-row {background:#fff;border:0;border-bottom:1px solid #edf0eb;display:flex;justify-content:space-between;align-items:center;min-height:44px;width:100%;padding:4px 0;text-align:left;font-size:.9rem}
.check-row:last-child {border:0}
.check-mark {display:grid;place-items:center;width:27px;height:27px;border-radius:8px;border:1px solid var(--line);color:#284a34;font-weight:720}
.check-mark.checked {background:var(--mint)}
.ledger {margin:12px 0}
.ledger div {display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line);font-size:.9rem}
.ledger dd {font-weight:740;text-align:right;overflow-wrap:anywhere}
.history {list-style:none;margin:12px 0 0;padding:0}
.history li {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto) 44px;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.history small {display:block;font-size:.82rem;color:var(--muted)}
.history-money {text-align:right;max-width:155px}
.empty {padding:23px 0}
.panel.empty {padding:24px}
.empty .btn {margin-top:12px}
.compare-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.compare-total {background:var(--mint);border-radius:10px;padding:10px 12px;margin-top:13px}
.compare-total span {display:block;font-size:.875rem}
.compare-total strong {font-size:1.85rem;letter-spacing:-.04em;overflow-wrap:anywhere}
.red,.danger {color:var(--red)!important}
footer {display:flex;justify-content:space-between;align-items:center;gap:6px;color:var(--muted);margin-top:14px;font-size:.82rem;flex-wrap:wrap}
footer div {display:flex;gap:8px}
.text-btn,.icon-btn {border:0;background:transparent;min-height:44px;color:#2c503a;font-weight:710;font-size:.875rem;padding:0 8px}
.icon-btn {min-width:44px;font-size:1.4rem;border-radius:9px}
.icon-btn:hover {background:#f0f5ed}
dialog {width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 46px);border:1px solid var(--line);border-radius:18px;color:var(--ink);padding:20px;overflow:auto;box-shadow:0 20px 72px #192a2250}
dialog::backdrop {background:#172a22a0}
.fields {margin-top:12px;display:grid;gap:14px}
.fields label {display:grid;gap:5px;min-width:0;font-size:.875rem;font-weight:700}
.fields input:disabled {color:var(--muted);background:#edf1eb}
.field-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dialog-actions {display:flex;align-items:center;justify-content:end;gap:8px;margin-top:16px}
.dialog-actions .text-btn {margin-right:auto;text-align:left}
.form-error:not(:empty) {color:var(--red);margin-top:10px;font-size:.875rem}
.conversion {font-weight:750;color:#2b5535}
.toast {position:fixed;z-index:5;bottom:20px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 28px);background:var(--forest);color:#fff;padding:9px 15px;border-radius:10px;font-size:.875rem;pointer-events:none;opacity:0;transition:opacity .16s}
.toast.visible {opacity:1}
.storage-warning {background:#fff0e4;border-radius:10px;padding:10px;margin-bottom:14px;color:var(--red)}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}
@media (max-width:760px) {
 .top-inner {min-height:60px;padding:8px 16px}
 nav {position:fixed;z-index:3;inset:auto 0 0;gap:3px;background:#fbfcf9;border-top:1px solid #dce4db;border-radius:0;justify-content:space-evenly;padding:5px 12px calc(5px + env(safe-area-inset-bottom))}
 nav button {width:33.33%;min-height:48px;flex-direction:column;gap:3px;padding:3px;font-size:.77rem}
 nav button[aria-current] {background:var(--mint);box-shadow:none}
 main {padding:19px 14px calc(80px + env(safe-area-inset-bottom))}
 .page-heading {flex-direction:column;align-items:stretch;gap:12px;margin-bottom:12px}
 .trip-controls select {max-width:none}
 .trip-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
 .trip-controls select,.trip-controls button {min-height:44px}
 .summary,.columns {grid-template-columns:1fr;gap:10px}
 .summary {margin-bottom:12px}
 .summary-side {grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto;gap:8px}
 .highlight {padding:10px 11px;border-radius:12px}
 .quick {display:flex;align-items:flex-start;flex-direction:column;justify-content:center;padding:10px 11px;border-radius:12px;gap:1px}
 .quick span,.highlight span {font-size:.82rem}
 .highlight small {font-size:.73rem}
 .hero {min-height:158px;padding:15px 17px;border-radius:16px}
 .hero-amount {font-size:clamp(2rem,10vw,4rem);margin-bottom:10px}
 .hero-deco {transform:scale(.84);right:-51px;top:-46px}
 .stack {gap:10px}
 .panel {padding:14px 13px;border-radius:13px}
 .columns>.stack .estimate {scroll-margin-bottom:70px}
 .columns:has(.estimate) {display:flex;flex-direction:column}
 .columns:has(.estimate)>.stack {display:contents}
 .estimate {order:-1}
 .compare-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .compare-card {padding:12px}
 .compare-card .ledger div {display:grid;gap:0}
 .compare-card .ledger dd {text-align:left}
 .toast {bottom:calc(65px + env(safe-area-inset-bottom))}
}
@media (max-width:365px) {
 .top-inner {padding-inline:12px;gap:8px}
 .btn.new {padding-inline:8px}
 .cost-row {gap:5px}
 .badge {padding-inline:5px}
 .field-pair {grid-template-columns:1fr}
 .hero-foot {gap:4px 9px}
}
@media (prefers-reduced-motion:reduce) {.toast {transition:none}}
