/* 「10年後、いくら？」 土台の見た目。ミントのグラデーション、影つきの白いカード、下に固定するメニュー */
:root {
  --bg: #f1f7f4; --paper: #ffffff; --green: #1f4a3d; --green-2: #2f7f69; --mint: #8fc9b4; --mint-2: #5fb39a; --mint-bg: #e8f4ef;
  --ink: #1d2a26; --dim: #6d7c76; --line: #e3ebe7; --warm: #e0702a; --warm-bg: #fdf0e6;
  --shadow: 0 10px 28px rgba(31, 74, 61, 0.08), 0 1px 3px rgba(31, 74, 61, 0.05);
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 500; line-height: 1.7; -webkit-font-smoothing: antialiased; }
button { -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px calc(112px + env(safe-area-inset-bottom)); }

/* いちばん上の帯 */
.hero { position: relative; overflow: hidden; margin: 0 -16px; padding: 34px 24px 66px; color: #fff; border-radius: 0 0 34px 34px;
  background: linear-gradient(155deg, #256e5a 0%, #3f9a80 42%, #7cc4ac 78%, #b4e0d1 100%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 260px; height: 260px; right: -90px; top: -110px; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 70%); }
.hero::after { width: 190px; height: 190px; left: -70px; bottom: -110px; background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 70%); }
.eyebrow { position: relative; display: inline-block; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 3px 12px; }
h1 { position: relative; margin: 14px 0 8px; font-size: 36px; font-weight: 900; line-height: 1.2; letter-spacing: 0.03em; }
.lead { position: relative; margin: 0; font-size: 14px; font-weight: 500; opacity: 0.95; }
.panel { margin-top: -44px; position: relative; }
.panel[hidden] { display: none; }

/* カード */
.card { background: var(--paper); border-radius: 24px; padding: 22px 18px; margin-top: 14px; box-shadow: var(--shadow); }
.card[hidden] { display: none; }
h2 { margin: 0 0 12px; font-size: 17px; font-weight: 900; color: var(--green); display: flex; align-items: center; gap: 9px; letter-spacing: 0.02em; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; font-weight: 900; flex: none; }
.hint { margin: -6px 0 12px; font-size: 13px; color: var(--dim); }
.note { margin: 10px 0 0; font-size: 12px; color: var(--dim); }
.note:empty { display: none; }
.sub { margin: 20px 0 4px; font-size: 13px; font-weight: 700; color: var(--dim); }
.empty { margin: 0; font-size: 14px; color: var(--dim); text-align: center; padding: 14px 0; }

/* 丸いボタン（カテゴリ・為替など） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scrollx { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px 12px; padding: 2px 18px 4px; scrollbar-width: none; }
.chips.scrollx::-webkit-scrollbar { display: none; }
.chip { font: inherit; font-size: 14px; font-weight: 700; color: var(--green); background: var(--mint-bg); border: 2px solid transparent; border-radius: 999px; padding: 7px 15px; cursor: pointer; line-height: 1.3; white-space: nowrap; flex: none; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip small { display: block; font-size: 10px; font-weight: 700; opacity: 0.75; }
.chip.on { background: var(--green); color: #fff; }
.chip:focus-visible, .tile:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }

/* 入力 */
.custom { display: grid; gap: 10px; margin-top: 14px; }
.custom[hidden] { display: none; }
.custom label, .field { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--dim); }
.field { margin-top: 10px; }
.custom input, .field input, select { font: inherit; font-size: 17px; font-weight: 700; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #f8fbfa; color: var(--ink); width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 14px; font-weight: 700; color: var(--green); }
.toggle input { width: 20px; height: 20px; accent-color: var(--green); }
#compareArea[hidden] { display: none; }
.slider { width: 100%; accent-color: var(--green-2); height: 34px; }

/* 下に固定するメニュー */
.tabs { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(528px, calc(100% - 24px));
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 6px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 12px 32px rgba(31, 74, 61, 0.18), 0 0 0 1px rgba(31, 74, 61, 0.05); }
.tab { position: relative; font: inherit; font-size: 11px; font-weight: 700; color: var(--dim); background: transparent; border: 0; border-radius: 18px; padding: 8px 4px 7px; cursor: pointer; line-height: 1.3; display: grid; justify-items: center; gap: 2px; transition: background 0.15s, color 0.15s; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { background: var(--mint-bg); color: var(--green); }
.tab small { position: absolute; top: 4px; left: calc(50% + 8px); font-size: 9px; font-weight: 900; color: #fff; background: var(--warm); border-radius: 999px; padding: 0 6px; line-height: 1.6; }

/* 下の注意書き */
.notice { margin-top: 26px; padding: 0 4px; font-size: 12px; color: var(--dim); }
.notice h2 { font-size: 12px; font-weight: 700; color: var(--dim); margin: 16px 0 4px; }
.notice ul, .notes { margin: 0; padding-left: 18px; }
.notes { margin-top: 12px; font-size: 12px; color: var(--dim); }
footer { text-align: center; font-size: 11px; color: var(--dim); margin-top: 26px; }

@media (min-width: 600px) { h1 { font-size: 42px; } .hero { border-radius: 0 0 40px 40px; padding-top: 56px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
