:root {
    color-scheme: light;
    --page-bg: #f4f5f7;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-border: #e2e5e9;
    --text: #15171b;
    --muted: #70757e;
    --green: #159b6a;
    --green-soft: #e5f6ef;
    --red: #e86a61;
    --red-soft: #fff0ee;
    --shadow: 0 14px 34px rgba(25, 31, 40, 0.07);
    --chart-line: #aeb5bd;
    --chart-grid: #e6e8eb;
    --chart-grid-strong: #dadddf;
    --chart-ticks: #737982;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { padding: clamp(18px, 3vw, 42px); background: var(--page-bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.app-shell { width: min(100%, 880px); margin: 0 auto; display: grid; gap: 18px; }
.hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 4px 4px 14px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.65rem, 6vw, 4.8rem); letter-spacing: -0.075em; line-height: .92; }
h2 { font-size: 1.25rem; letter-spacing: -.035em; }
.subcopy { margin-top: 12px; color: var(--muted); font-size: 1rem; }
.status-chip, .badge { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid var(--panel-border); border-radius: 999px; color: var(--muted); background: #fff; font-size: .88rem; white-space: nowrap; }
.status-chip[data-kind="ok"] { color: var(--green); background: var(--green-soft); border-color: transparent; }
.status-chip[data-kind="error"] { color: #bd3d36; background: var(--red-soft); border-color: transparent; }
.panel { border: 1px solid var(--panel-border); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); }
.label { color: var(--muted); font-size: .77rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.recommendation { padding: clamp(22px, 4vw, 38px); }
.recommendation-topline, .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.recommendation-title { margin-top: 18px; font-size: clamp(1.75rem, 4.5vw, 3.4rem); line-height: 1; letter-spacing: -.055em; }
.recommendation-details { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin-top: 20px; }
.recommendation-price { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 9px; }
.recommendation-value { font-size: clamp(3.8rem, 12vw, 6.5rem); font-weight: 750; letter-spacing: -.085em; line-height: .8; color: var(--green); }
.price-unit { color: var(--muted); font-size: 1.05rem; font-weight: 600; padding-bottom: 6px; }
.recommendation-caption { grid-column: 1 / -1; margin-top: 12px; color: var(--muted); font-size: .94rem; }
.duration-control { display: grid; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 650; }
.duration-control select { min-width: 154px; appearance: none; border: 1px solid #d7dbe0; border-radius: 999px; padding: 12px 38px 12px 16px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2315171b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--text); font: inherit; }
.tomorrow-hint { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--panel-border); color: var(--green); font-size: 1rem; font-weight: 650; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-height: 146px; padding: 20px; display: grid; grid-template-rows: 32px 1fr auto; align-items: start; overflow: hidden; }
.stat-symbol { display: grid; place-items: center; width: 30px; height: 30px; margin: 0; border-radius: 50%; color: #69727c; background: #f0f2f4; font-size: 1.1rem; font-weight: 750; line-height: 1; }
.accent-symbol { color: var(--green); background: var(--green-soft); }
.stat-value { align-self: end; margin: 0; font-size: clamp(1.85rem, 5vw, 2.7rem); font-weight: 750; letter-spacing: -.07em; line-height: .9; }
.accent-value { color: var(--green); }
.stat-unit, .small-hint { margin: 9px 0 0; color: var(--muted); font-size: .88rem; }
.chart-panel, .tomorrow-panel, .error-panel { padding: 24px; }
.chart-wrap { position: relative; height: 360px; margin-top: 20px; }
.tomorrow-chart-wrap { position: relative; height: 160px; margin-top: 18px; }
.error-panel p:last-child { margin-top: 7px; color: #bd3d36; }

@media (max-width: 620px) {
    body { padding: 16px; }
    .hero, .recommendation-details, .section-head { flex-direction: column; }
    .hero { gap: 14px; }
    .recommendation-details { align-items: flex-start; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 150px; padding: 15px 12px; grid-template-rows: 30px 1fr auto; }
    .stat-value { font-size: 1.7rem; }
    .stat-unit { margin-top: 8px; }
    .chart-panel, .tomorrow-panel { padding: 18px; }
    .chart-wrap { height: 290px; }
}
