:root {
  --bg: #f6f5f1;
  --bg-2: #efede7;
  --ink: #14100e;
  --ink-2: #4a4540;
  --ink-3: #8a8378;
  --line: rgba(20, 16, 14, 0.08);
  --line-2: rgba(20, 16, 14, 0.16);
  --card: #ffffff;
  --a1: #ff6a3d;
  --a2: #ff2e63;
  --a3: #7b3fe4;
  --ok: #0e8a5f;
  --warn: #d3591c;
  --hot: #c81d4a;
  --grad: linear-gradient(140deg, var(--a1) 0%, var(--a2) 55%, var(--a3) 100%);
}
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Geist", ui-sans-serif, system-ui, sans-serif; font-feature-settings: "ss01","cv11"; -webkit-font-smoothing: antialiased; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.serif { font-family: "Instrument Serif", serif; font-style: italic; }

.app-shell { min-height: 100vh; max-width: 460px; margin: 0 auto; padding: 12px 12px 100px; position: relative; }
@media (max-width: 460px) { .app-shell { padding: 10px 10px 100px; } }

.loading { padding: 40px 12px; text-align: center; color: var(--ink-3); font-family: "Geist Mono", monospace; font-size: 12px; }
.error { padding: 20px; margin: 40px 8px; background: #fee; border-radius: 16px; color: #900; font-size: 13px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 18px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand .glyph { width: 22px; height: 22px; border-radius: 7px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(255,46,99,0.55); }
.brand .glyph svg { width: 12px; height: 12px; stroke: white; fill: none; stroke-width: 2.4; }
.top-date { font-family: "Geist Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; }

.fuel-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--bg-2); border-radius: 999px; margin: 0 4px 16px; }
.fuel-seg button { border: 0; background: transparent; padding: 10px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 500; font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: baseline; transition: background 0.2s; }
.fuel-seg button[aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(20,16,14,0.06), 0 4px 12px -6px rgba(20,16,14,0.12); }
.fuel-seg button .p { font-family: "Geist Mono", monospace; font-size: 12px; font-weight: 500; opacity: 0.75; }

.card { background: var(--card); border-radius: 24px; padding: 20px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(20,16,14,0.04), 0 8px 24px -12px rgba(20,16,14,0.08); }
.card.tight { padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }

.hero { position: relative; background: var(--grad); color: white; border-radius: 28px; padding: 24px 22px 22px; overflow: hidden; margin: 0 0 12px; box-shadow: 0 20px 40px -20px rgba(255,46,99,0.45), 0 6px 14px -8px rgba(123,63,228,0.35); }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 320px; height: 320px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 60%); pointer-events: none; }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; font-family: "Geist Mono", monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 10px; background: rgba(255,255,255,0.16); backdrop-filter: blur(8px); border-radius: 999px; }
.hero h1 { margin: 14px 0 0; font-size: 40px; line-height: 0.98; letter-spacing: -0.035em; font-weight: 700; }
.hero h1 .em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; }
.hero-sub { margin: 12px 0 18px; font-size: 13.5px; line-height: 1.4; opacity: 0.9; max-width: 30ch; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 16px; background: white; color: var(--ink); font-weight: 600; font-size: 13px; border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 6px 14px -6px rgba(0,0,0,0.25); }
.hero-cta:hover { transform: translateY(-1px); }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.stat { background: var(--card); border-radius: 20px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(20,16,14,0.04), 0 8px 24px -12px rgba(20,16,14,0.08); position: relative; }
.stat-k { font-size: 11px; color: var(--ink-3); letter-spacing: 0.01em; margin-bottom: 6px; }
.stat-v { font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.stat-v .u { font-size: 14px; color: var(--ink-3); font-weight: 500; margin-left: 3px; }
.stat-meta { display: flex; align-items: center; gap: 6px; font-family: "Geist Mono", monospace; font-size: 10.5px; margin-top: 8px; color: var(--ink-3); }
.score-orbit { position: absolute; top: 14px; right: 14px; width: 52px; height: 52px; }
.score-orbit svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-orbit .val { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }

.save-banner { background: var(--ink); color: white; border-radius: 22px; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; margin: 0 0 14px; overflow: hidden; position: relative; }
.save-banner::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 240px; height: 240px; background: radial-gradient(circle, rgba(255,106,61,0.35), transparent 60%); }
.save-banner .k { position: relative; font-family: "Geist Mono", monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; display: block; }
.save-banner .amt { position: relative; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.save-banner .basis { position: relative; font-size: 11.5px; margin-top: 6px; opacity: 0.65; }
.save-banner button { position: relative; background: rgba(255,255,255,0.14); color: white; border: 0; border-radius: 999px; padding: 8px 12px 8px 14px; font: inherit; font-weight: 500; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(8px); }
.save-banner button:hover { background: rgba(255,255,255,0.22); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 4px 10px; }
.section-title h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.section-title .more { color: var(--ink-3); font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.section-title .more:hover { color: var(--ink); }

.week { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 8px; scrollbar-width: none; }
.week::-webkit-scrollbar { display: none; }
.week button { flex: 0 0 62px; background: var(--card); border: 0; border-radius: 18px; padding: 12px 10px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(20,16,14,0.04), 0 4px 12px -8px rgba(20,16,14,0.08); font: inherit; }
.week button:hover { transform: translateY(-2px); }
.week .dow { font-family: "Geist Mono", monospace; font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.week .price { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.week .dot { width: 26px; height: 6px; border-radius: 999px; background: var(--dot); }
.week .delta { font-family: "Geist Mono", monospace; font-size: 10px; }

.heat-card { padding: 18px 18px 14px; background: linear-gradient(180deg, var(--card), #fbfaf5); border-radius: 24px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(20,16,14,0.04), 0 8px 24px -12px rgba(20,16,14,0.08); }
.heat-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 12px; }
.heat-grid button { border: 0; background: transparent; cursor: pointer; padding: 0; aspect-ratio: 1 / 2.4; border-radius: 10px; position: relative; overflow: hidden; }
.heat-grid button::before { content: ""; position: absolute; inset: 0; background: var(--dot); opacity: var(--op); border-radius: 10px; }
.heat-grid button::after { content: attr(data-label); position: absolute; left: 6px; bottom: 6px; font-family: "Geist Mono", monospace; font-size: 9px; color: white; font-weight: 500; }
.heat-grid button[aria-current="true"] { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px white; }
.heat-legend { display: flex; align-items: center; gap: 10px; font-family: "Geist Mono", monospace; font-size: 10px; color: var(--ink-3); margin-top: 14px; }
.heat-legend .bar { flex: 1; height: 6px; border-radius: 999px; }

.day-list { display: flex; flex-direction: column; }
.day-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); background: transparent; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.day-row:last-child { border-bottom: 0; }
.day-row:hover { background: var(--bg-2); border-radius: 12px; }
.day-row .swatch { width: 26px; height: 26px; border-radius: 8px; background: var(--dot); opacity: var(--op); }
.day-row .lab { font-size: 14px; font-weight: 500; }
.day-row .sub { font-family: "Geist Mono", monospace; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.day-row .price { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; text-align: right; }
.day-row .delta { font-family: "Geist Mono", monospace; font-size: 10.5px; text-align: right; margin-top: 2px; }

.up { color: var(--hot); }
.dn { color: var(--ok); }

.inputs-list { list-style: none; margin: 0; padding: 0; }
.inputs-list li { display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.inputs-list li:last-child { border-bottom: 0; }
.inputs-list .k { font-family: "Geist Mono", monospace; font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; text-transform: uppercase; }
.inputs-list .d { font-family: "Geist Mono", monospace; font-size: 11.5px; }

nav.tabs { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 436px; background: rgba(255,255,255,0.72); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); border-radius: 999px; padding: 6px; display: grid; grid-template-columns: 1fr 1fr 1fr; z-index: 10; box-shadow: 0 10px 30px -12px rgba(20,16,14,0.18); }
.tab-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; background: transparent; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.tab-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-btn[aria-current="page"] { background: var(--ink); color: white; box-shadow: 0 6px 14px -6px rgba(0,0,0,0.35); }

.sheet { position: fixed; inset: 0; background: rgba(20,16,14,0.4); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheet-inner { width: 100%; max-width: 460px; background: var(--card); border-radius: 28px 28px 0 0; padding: 18px 20px 24px; box-shadow: 0 -20px 40px -20px rgba(20,16,14,0.25); }
.sheet-grip { width: 40px; height: 4px; background: var(--line-2); border-radius: 999px; margin: 0 auto 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.sheet-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.sheet-close { width: 34px; height: 34px; border-radius: 999px; background: var(--bg-2); border: 0; cursor: pointer; display: grid; place-items: center; }
.sheet-close svg { width: 14px; height: 14px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; }

.conf-bar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.conf-bar > span { display: block; height: 100%; background: var(--grad); }

.fc-hero { padding: 22px 4px 8px; }
.fc-hero .k { font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.fc-hero h1 { margin: 10px 0 0; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.fc-hero h1 .em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fc-hero p { color: var(--ink-3); font-size: 13px; margin: 12px 0 0; max-width: 34ch; }

.method-step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.method-step .n { font-family: "Instrument Serif", serif; font-style: italic; font-size: 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.method-step h5 { margin: 0 0 4px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.method-step p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.accuracy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.accuracy .cell { background: var(--bg-2); border-radius: 18px; padding: 14px 16px; }
.accuracy .v { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.accuracy .k { font-family: "Geist Mono", monospace; font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }
