:root {
    --run-bg: #f5f1ea;
    --run-surface: #fffcf7;
    --run-surface-2: #ebe4d9;
    --run-text: #26231f;
    --run-muted: #756e65;
    --run-line: #48403a;
    --run-line-soft: rgba(72, 64, 58, 0.18);
    --run-accent: #e05a3f;
    --run-accent-soft: rgba(224, 90, 63, 0.11);
    --run-green: #287a58;
    --run-yellow: #f2c94c;
    --run-shadow: 0 22px 64px rgba(72, 61, 50, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(180deg, rgba(224, 90, 63, 0.07), transparent 420px),
        linear-gradient(90deg, transparent calc(100% - 1px), rgba(72, 61, 50, 0.045) 1px) 0 0 / 72px 100%,
        var(--run-bg);
    color: var(--run-text);
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 14px;
    transform: translateY(-160%);
    border: 1px solid var(--run-line);
    background: var(--run-surface);
    font-size: 13px;
}

.skip-link:focus {
    transform: translateY(0);
}

.run-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 56px;
    padding: 0 clamp(16px, 3vw, 42px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--run-line-soft);
    background: rgba(255, 252, 247, 0.94);
    backdrop-filter: blur(16px);
}

.run-brand,
.header-actions {
    display: flex;
    align-items: center;
}

.run-brand {
    gap: 10px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.run-brand-dot {
    width: 8px;
    height: 8px;
    background: var(--run-accent);
    box-shadow: 0 0 0 4px var(--run-accent-soft);
}

.header-actions {
    gap: 8px;
}

.quiet-button,
.text-button {
    border: 0;
    background: transparent;
    color: inherit;
}

.quiet-button {
    min-height: 34px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--run-line);
    font-size: 11px;
    font-weight: 800;
}

.quiet-button:hover,
.quiet-button:focus-visible {
    border-color: var(--run-accent);
    background: var(--run-accent);
    color: #fff;
}

.account-button {
    min-width: 58px;
    justify-content: center;
}

main {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 42px) 64px;
}

.run-hero {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    align-items: stretch;
    border-right: 1px solid var(--run-line);
    border-left: 1px solid var(--run-line);
    background: var(--run-surface);
}

.hero-copy {
    padding: clamp(38px, 6vw, 76px);
    border-right: 1px solid var(--run-line);
}

.eyebrow,
.section-index,
.analysis-label {
    margin: 0;
    color: var(--run-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.hero-copy h1 {
    margin: 16px 0 0;
    font-size: clamp(78px, 13vw, 148px);
    font-weight: 950;
    line-height: 0.78;
    letter-spacing: -0.095em;
}

.hero-lead {
    max-width: 550px;
    margin: 30px 0 0;
    color: var(--run-muted);
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 650;
    line-height: 1.6;
    word-break: keep-all;
}

.hero-tags {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hero-tags span {
    padding: 6px 8px;
    border: 1px solid var(--run-line);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-progress {
    min-height: 320px;
    padding: clamp(30px, 4vw, 52px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(72, 64, 58, 0.025) 10px, rgba(72, 64, 58, 0.025) 20px),
        var(--run-surface-2);
}

.progress-orbit {
    width: min(230px, 70%);
    aspect-ratio: 1;
    margin-left: auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--run-line);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 22px var(--run-accent-soft),
        inset 0 0 0 23px var(--run-line);
}

.progress-orbit span {
    font-size: clamp(34px, 6vw, 54px);
    font-weight: 950;
    letter-spacing: -0.07em;
}

.hero-progress p {
    margin: 0 0 8px;
    color: var(--run-muted);
    font-size: 12px;
    font-weight: 800;
}

.hero-progress strong {
    display: block;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.hero-progress small {
    display: block;
    margin-top: 10px;
    color: var(--run-muted);
    line-height: 1.5;
}

.notice-strip {
    min-height: 46px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--run-line);
    background: var(--run-text);
    color: var(--run-surface);
}

.notice-strip p {
    margin: 0;
    font-size: 10px;
    line-height: 1.5;
}

.live-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--run-accent);
    box-shadow: 0 0 0 5px rgba(224, 90, 63, 0.2);
}

.run-layout {
    display: grid;
    grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
}

.setup-column,
.dashboard-column {
    min-width: 0;
}

.setup-column {
    position: sticky;
    top: 56px;
    border-left: 1px solid var(--run-line);
}

.dashboard-column {
    border-right: 1px solid var(--run-line);
    border-left: 1px solid var(--run-line);
}

.panel {
    padding: clamp(22px, 3vw, 34px);
    border-bottom: 1px solid var(--run-line);
    background: rgba(255, 252, 247, 0.93);
}

.section-heading {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.section-heading h2 {
    margin: 7px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.055em;
}

.analysis-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-chip {
    padding: 5px 7px;
    border: 1px solid var(--run-line);
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.accent-chip {
    border-color: var(--run-accent);
    background: var(--run-accent);
    color: #fff;
}

form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--run-muted);
    font-size: 10px;
    font-weight: 850;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 0 11px;
    border: 1px solid var(--run-line-soft);
    border-radius: 0;
    outline: 0;
    background: var(--run-surface);
    color: var(--run-text);
    font-size: 13px;
}

input:focus,
select:focus {
    border-color: var(--run-accent);
    box-shadow: 0 0 0 2px var(--run-accent-soft);
}

.field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.goal-time-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.goal-time-field legend {
    margin: 0 0 7px;
    padding: 0;
    color: var(--run-muted);
    font-size: 10px;
    font-weight: 850;
}

.goal-time-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.goal-time-inputs label {
    gap: 5px;
    text-align: center;
}

.goal-time-inputs label span {
    font-size: 9px;
}

.goal-time-inputs input {
    min-width: 0;
    padding: 0 4px;
    text-align: center;
}

.primary-button,
.secondary-button,
.source-button {
    min-height: 46px;
    border: 1px solid var(--run-line);
    border-radius: 0;
    font-weight: 900;
}

.primary-button {
    background: var(--run-accent);
    color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
    background: var(--run-text);
}

.secondary-button {
    width: 100%;
    margin-top: 12px;
    background: transparent;
    color: var(--run-text);
}

.secondary-button:hover,
.secondary-button:focus-visible {
    border-color: var(--run-accent);
    color: var(--run-accent);
}

.form-status {
    min-height: 18px;
    margin: -5px 0 0;
    color: var(--run-muted);
    font-size: 10px;
    line-height: 1.5;
}

.source-card {
    min-height: 70px;
    margin-top: -1px;
    padding: 12px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--run-line);
}

.source-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    font-size: 22px;
    font-weight: 950;
}

.garmin-card .source-logo {
    background: #111;
    color: #52b8e9;
}

.source-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.source-copy strong {
    font-size: 12px;
}

.source-copy span {
    overflow: hidden;
    color: var(--run-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-button {
    min-height: 34px;
    padding: 0 10px;
    background: var(--run-surface);
    color: var(--run-text);
    font-size: 9px;
}

.source-button:hover,
.source-button:focus-visible {
    background: var(--run-text);
    color: var(--run-surface);
}

.source-button[data-connected="true"] {
    border-color: var(--run-green);
    color: var(--run-green);
}

.source-note {
    margin: 12px 0 0;
    color: var(--run-muted);
    font-size: 9px;
    line-height: 1.6;
}

.text-button {
    padding: 0;
    color: var(--run-muted);
    font-size: 10px;
    font-weight: 850;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-button:hover,
.text-button:focus-visible {
    color: var(--run-accent);
}

.readiness-grid {
    display: grid;
    grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
    border: 1px solid var(--run-line);
}

.readiness-score,
.metric-card {
    min-height: 144px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.readiness-score {
    background: var(--run-accent);
    color: #fff;
}

.metric-card {
    border-left: 1px solid var(--run-line);
}

.readiness-score > span,
.metric-card > span {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.readiness-score strong {
    font-size: clamp(48px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -0.08em;
}

.readiness-score strong small {
    font-size: 13px;
    letter-spacing: 0;
}

.readiness-score p,
.metric-card small {
    margin: 0;
    font-size: 9px;
    line-height: 1.45;
}

.metric-card strong {
    font-size: clamp(23px, 3vw, 32px);
    letter-spacing: -0.045em;
}

.metric-card small {
    color: var(--run-muted);
}

.load-chart {
    margin-top: 18px;
    padding: 18px;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: end;
    gap: 18px;
    border: 1px solid var(--run-line-soft);
}

.status-breakdown {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--run-line);
    border-left: 1px solid var(--run-line);
}

.status-detail-card {
    min-height: 122px;
    padding: 16px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    border-right: 1px solid var(--run-line);
    border-bottom: 1px solid var(--run-line);
}

.status-detail-card > span,
.plan-overview span {
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.status-detail-card strong {
    font-size: 18px;
    letter-spacing: -0.035em;
}

.status-detail-card small {
    color: var(--run-muted);
    font-size: 8px;
    line-height: 1.55;
    word-break: keep-all;
}

.chart-copy {
    display: grid;
    gap: 5px;
}

.chart-copy strong {
    font-size: 12px;
}

.chart-copy span {
    color: var(--run-muted);
    font-size: 9px;
}

.volume-bars {
    height: 110px;
    display: grid;
    grid-template-columns: repeat(4, minmax(34px, 1fr));
    align-items: end;
    gap: 10px;
}

.volume-bar {
    position: relative;
    min-height: 8px;
    border: 1px solid var(--run-line);
    border-bottom: 4px solid var(--run-accent);
    background: var(--run-accent-soft);
}

.volume-bar span {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 800;
}

.volume-bar small {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--run-muted);
    font-size: 7px;
    white-space: nowrap;
}

.analysis-tabs {
    margin-bottom: 16px;
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(128px, 1fr));
    border: 1px solid var(--run-line);
}

.analysis-tab {
    min-height: 40px;
    padding: 10px 16px;
    border: 0;
    border-right: 1px solid var(--run-line);
    background: transparent;
    color: var(--run-muted);
    font: inherit;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.analysis-tab:last-child {
    border-right: 0;
}

.analysis-tab.is-active {
    background: var(--run-text);
    color: var(--run-surface);
}

.analysis-tab:focus-visible {
    outline: 2px solid var(--run-accent);
    outline-offset: 2px;
}

.analysis-pane[hidden] {
    display: none;
}

.analysis-copy {
    margin-top: 0;
    padding: 24px;
    border-left: 4px solid var(--run-accent);
    background: var(--run-accent-soft);
}

.analysis-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-label-row .analysis-label {
    margin: 0;
}

.analysis-verification {
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--run-accent) 50%, transparent);
    background: var(--run-surface);
    color: var(--run-text);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.analysis-verification.is-adjusted::after {
    content: " · 조정";
    color: var(--run-accent);
}

.analysis-verification.is-single {
    border-color: var(--run-line);
    color: var(--run-muted);
}

.analysis-copy h3 {
    margin: 10px 0;
    font-size: clamp(20px, 3vw, 28px);
    letter-spacing: -0.04em;
}

.analysis-copy > p:not(.analysis-label) {
    margin: 0;
    color: var(--run-muted);
    font-size: 12px;
    line-height: 1.75;
    word-break: keep-all;
}

.analysis-copy ul {
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
}

.analysis-copy li {
    position: relative;
    padding-left: 16px;
    font-size: 10px;
    line-height: 1.55;
}

.analysis-copy li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--run-accent);
}

.analysis-evidence {
    margin-top: 18px;
    border: 1px solid var(--run-line);
}

.latest-run-analysis {
    border: 1px solid var(--run-line);
}

.latest-run-head {
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--run-line);
    background: var(--run-accent-soft);
}

.latest-run-head h3 {
    margin: 9px 0 8px;
    font-size: clamp(20px, 3vw, 28px);
    letter-spacing: -0.04em;
}

.latest-run-head p:not(.analysis-label) {
    max-width: 720px;
    margin: 0;
    color: var(--run-muted);
    font-size: 11px;
    line-height: 1.7;
}

.latest-run-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--run-line);
}

.latest-run-metrics article {
    min-height: 88px;
    padding: 15px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    border-right: 1px solid var(--run-line);
}

.latest-run-metrics article:last-child {
    border-right: 0;
}

.latest-run-metrics span,
.latest-run-assessment span,
.latest-run-focus span {
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.latest-run-metrics strong {
    font-size: 18px;
    letter-spacing: -0.04em;
}

.latest-run-metrics small {
    color: var(--run-muted);
    font-size: 8px;
}

.latest-run-assessment {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--run-line);
}

.latest-run-assessment article {
    min-height: 132px;
    padding: 18px;
    border-right: 1px solid var(--run-line);
}

.latest-run-assessment article:last-child {
    border-right: 0;
}

.latest-run-assessment p {
    margin: 12px 0 0;
    font-size: 10px;
    line-height: 1.7;
}

.latest-run-findings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--run-line);
}

.latest-run-findings article {
    padding: 18px;
    border-right: 1px solid var(--run-line);
}

.latest-run-findings article:last-child {
    border-right: 0;
}

.latest-run-findings strong {
    font-size: 10px;
}

.latest-run-findings ul {
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
}

.latest-run-findings li {
    position: relative;
    padding-left: 15px;
    font-size: 9px;
    line-height: 1.6;
}

.latest-run-findings li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--run-accent);
}

.latest-run-findings .is-caution li::before {
    background: var(--run-text);
}

.latest-run-focus {
    padding: 17px 18px;
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    gap: 16px;
    background: var(--run-text);
    color: var(--run-surface);
}

.latest-run-focus span {
    color: var(--run-accent);
}

.latest-run-focus strong {
    font-size: 10px;
    line-height: 1.6;
}

.evidence-title {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--run-line);
    background: var(--run-text);
    color: var(--run-surface);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.evidence-row {
    min-height: 74px;
    padding: 13px 16px;
    display: grid;
    grid-template-columns: 96px minmax(140px, 0.7fr) minmax(220px, 1.3fr);
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--run-line-soft);
}

.evidence-row:last-child {
    border-bottom: 0;
}

.evidence-row span {
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.evidence-row strong {
    font-size: 11px;
    line-height: 1.5;
}

.evidence-row small {
    color: var(--run-muted);
    font-size: 9px;
    line-height: 1.55;
}

@media (max-width: 520px) {
    .analysis-tabs {
        width: 100%;
    }

    .analysis-label-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .analysis-verification {
        white-space: normal;
    }

    .latest-run-head {
        padding: 18px;
        flex-direction: column;
    }

    .latest-run-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .latest-run-metrics article:nth-child(2) {
        border-right: 0;
    }

    .latest-run-metrics article:nth-child(-n + 2) {
        border-bottom: 1px solid var(--run-line);
    }

    .latest-run-assessment,
    .latest-run-findings {
        grid-template-columns: 1fr;
    }

    .latest-run-assessment article,
    .latest-run-findings article {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--run-line);
    }

    .latest-run-assessment article:last-child,
    .latest-run-findings article:last-child {
        border-bottom: 0;
    }

    .latest-run-focus {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.plan-overview {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: 0.8fr 0.8fr 1.4fr;
    border-top: 1px solid var(--run-line);
    border-left: 1px solid var(--run-line);
}

.plan-overview article {
    min-height: 94px;
    padding: 15px;
    display: grid;
    align-content: space-between;
    gap: 8px;
    border-right: 1px solid var(--run-line);
    border-bottom: 1px solid var(--run-line);
}

.plan-overview strong {
    font-size: 18px;
    letter-spacing: -0.035em;
}

.plan-overview small {
    color: var(--run-muted);
    font-size: 8px;
    line-height: 1.5;
}

.training-plan {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--run-line);
}

.plan-day {
    min-width: 0;
    min-height: 220px;
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 12px;
    border-right: 1px solid var(--run-line);
    border-bottom: 1px solid var(--run-line);
}

.plan-day:nth-child(2n) {
    border-right: 0;
}

.plan-day:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
}

.plan-day.is-key {
    background: var(--run-accent);
    color: #fff;
}

.plan-day.is-rest {
    background: var(--run-surface-2);
    color: var(--run-muted);
}

.plan-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plan-day time,
.plan-type {
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.plan-type {
    padding: 4px 6px;
    border: 1px solid currentColor;
}

.plan-day strong {
    font-size: 16px;
    line-height: 1.4;
    word-break: keep-all;
}

.plan-target {
    margin: -4px 0 0;
    font-size: 11px;
    font-weight: 850;
}

.plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plan-meta span {
    padding: 5px 7px;
    border: 1px solid currentColor;
    font-size: 8px;
    font-weight: 850;
}

.plan-note {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid currentColor;
    opacity: 0.78;
    font-size: 9px;
    line-height: 1.45;
    word-break: keep-all;
}

.empty-state {
    grid-column: 1 / -1;
    margin: 0;
    padding: 36px 18px;
    color: var(--run-muted);
    font-size: 11px;
    text-align: center;
}

.period-selector {
    display: flex;
    border: 1px solid var(--run-line);
}

.period-button {
    min-width: 48px;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid var(--run-line);
    background: var(--run-surface);
    color: var(--run-muted);
    font-size: 9px;
    font-weight: 900;
}

.period-button:last-child {
    border-right: 0;
}

.period-button.is-active,
.period-button:hover,
.period-button:focus-visible {
    background: var(--run-text);
    color: var(--run-surface);
}

.trend-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--run-line);
    border-left: 1px solid var(--run-line);
}

.trend-summary article {
    min-height: 116px;
    padding: 16px;
    display: grid;
    align-content: space-between;
    gap: 9px;
    border-right: 1px solid var(--run-line);
    border-bottom: 1px solid var(--run-line);
}

.trend-summary span,
.next-training span {
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.trend-summary strong {
    font-size: 25px;
    letter-spacing: -0.045em;
}

.trend-summary small {
    color: var(--run-muted);
    font-size: 8px;
    line-height: 1.45;
}

.trend-chart-grid,
.distribution-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.trend-chart-card,
.distribution-grid > article {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--run-line);
}

.trend-bars {
    height: 145px;
    margin-top: 18px;
    padding-top: 18px;
    display: flex;
    align-items: flex-end;
    gap: clamp(4px, 1vw, 10px);
    border-bottom: 1px solid var(--run-line);
}

.trend-bar-wrap {
    position: relative;
    min-width: 0;
    height: 122px;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
}

.trend-bar {
    width: min(26px, 72%);
    min-height: 4px;
    border: 1px solid var(--run-line);
    border-bottom: 3px solid var(--run-accent);
    background: var(--run-accent-soft);
}

.vdot-bars .trend-bar {
    border-bottom-color: var(--run-green);
    background: color-mix(in srgb, var(--run-green) 18%, transparent);
}

.trend-value {
    margin-bottom: 5px;
    color: var(--run-muted);
    font-size: 7px;
    font-weight: 850;
}

.trend-bar-wrap small {
    position: absolute;
    top: 126px;
    left: 50%;
    width: 44px;
    transform: translateX(-50%);
    color: var(--run-muted);
    font-size: 6px;
    text-align: center;
    white-space: nowrap;
}

.distribution-list {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.distribution-row {
    display: grid;
    gap: 6px;
}

.distribution-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 9px;
}

.distribution-row span {
    color: var(--run-muted);
}

.distribution-track {
    height: 7px;
    overflow: hidden;
    border: 1px solid var(--run-line);
}

.distribution-track i {
    height: 100%;
    display: block;
    background: var(--run-accent);
}

#heartZoneDistribution .distribution-row:nth-child(1) i {
    background: var(--run-green);
}

#heartZoneDistribution .distribution-row:nth-child(2) i {
    background: #7abf8d;
}

#heartZoneDistribution .distribution-row:nth-child(3) i {
    background: var(--run-yellow);
}

#heartZoneDistribution .distribution-row:nth-child(4) i {
    background: #f39b54;
}

#heartZoneDistribution .distribution-row:nth-child(5) i {
    background: var(--run-accent);
}

.chatgpt-button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--run-text);
    background: var(--run-text);
    color: var(--run-surface);
    font-size: 9px;
    font-weight: 900;
}

.chatgpt-button:hover,
.chatgpt-button:focus-visible {
    border-color: var(--run-accent);
    background: var(--run-accent);
    color: #fff;
}

.chatgpt-review-note {
    margin-top: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 6px 18px;
    border: 1px solid var(--run-line);
}

.chatgpt-review-note strong {
    grid-row: 1 / span 2;
    font-size: 10px;
}

.chatgpt-review-note p,
.chatgpt-review-note span {
    margin: 0;
    color: var(--run-muted);
    font-size: 9px;
    line-height: 1.55;
}

.chatgpt-review-note span {
    color: var(--run-text);
    font-weight: 800;
}

.next-training {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(300px, 1.15fr);
    border: 1px solid var(--run-line);
}

.next-training article {
    min-height: 224px;
    padding: 22px;
}

.next-training-main {
    display: grid;
    align-content: center;
    gap: 12px;
    border-right: 1px solid var(--run-line);
    background: var(--run-accent);
    color: #fff;
}

.next-training-main span {
    color: rgba(255, 255, 255, 0.75);
}

.next-training-main h3 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.055em;
    word-break: keep-all;
}

.next-training-main p {
    margin: 0;
    font-size: 10px;
    line-height: 1.6;
}

.next-training-why {
    display: grid;
    align-content: center;
    gap: 12px;
}

.next-training-why ol {
    margin: 0;
    padding-left: 19px;
    display: grid;
    gap: 9px;
}

.next-training-why li {
    padding-left: 4px;
    font-size: 10px;
    line-height: 1.55;
}

.next-training-why small {
    padding-top: 10px;
    border-top: 1px solid var(--run-line-soft);
    color: var(--run-muted);
    font-size: 8px;
    line-height: 1.55;
}

.calendar-toolbar {
    min-height: 48px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--run-line);
}

.calendar-toolbar > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-toolbar strong {
    min-width: 92px;
    font-size: 13px;
    text-align: center;
}

.calendar-nav {
    width: 34px;
    height: 34px;
    border: 1px solid var(--run-line);
    background: var(--run-surface);
    color: var(--run-text);
}

.calendar-nav:hover,
.calendar-nav:focus-visible {
    border-color: var(--run-accent);
    color: var(--run-accent);
}

.calendar-weekdays,
.training-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    border-left: 1px solid var(--run-line);
}

.calendar-weekdays span {
    padding: 8px 4px;
    border-right: 1px solid var(--run-line);
    color: var(--run-muted);
    font-size: 8px;
    font-weight: 900;
    text-align: center;
}

.training-calendar {
    border-top: 1px solid var(--run-line);
    border-left: 1px solid var(--run-line);
}

.calendar-day {
    min-width: 0;
    min-height: 108px;
    padding: 7px;
    overflow: hidden;
    border-right: 1px solid var(--run-line);
    border-bottom: 1px solid var(--run-line);
    background: var(--run-surface);
}

.calendar-day.is-outside {
    opacity: 0.38;
    background: var(--run-surface-2);
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 2px var(--run-accent);
}

.calendar-day time {
    font-size: 8px;
    font-weight: 900;
}

.calendar-events {
    margin-top: 7px;
    display: grid;
    gap: 4px;
}

.calendar-event {
    padding: 4px 5px;
    overflow: hidden;
    border-left: 3px solid var(--run-line);
    background: var(--run-surface-2);
    font-size: 7px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event.actual {
    border-left-color: var(--run-green);
}

.calendar-event.planned {
    border-left-color: var(--run-text);
}

.calendar-event.key {
    border-left-color: var(--run-accent);
    background: var(--run-accent-soft);
}

.calendar-event.rest {
    border-left-color: var(--run-muted);
    color: var(--run-muted);
}

.calendar-more {
    color: var(--run-muted);
    font-size: 7px;
}

.calendar-legend {
    padding: 12px 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--run-muted);
    font-size: 8px;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: var(--run-line);
}

.legend-dot.actual {
    background: var(--run-green);
}

.legend-dot.planned {
    background: var(--run-text);
}

.legend-dot.key {
    background: var(--run-accent);
}

.legend-dot.rest {
    background: var(--run-muted);
}

.plan-detail-title {
    margin: 4px 0 12px;
    font-size: 12px;
}

.activity-type {
    display: inline-flex;
    padding: 4px 6px;
    border: 1px solid var(--run-line);
    font-size: 7px;
    font-weight: 900;
}

.activity-type.type-interval,
.activity-type.type-tempo {
    border-color: var(--run-accent);
    color: var(--run-accent);
}

.activity-type.type-long {
    border-color: var(--run-yellow);
}

.activity-type.type-zone2 {
    border-color: var(--run-green);
    color: var(--run-green);
}

.activity-type.type-recovery {
    color: var(--run-muted);
}

.activity-table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--run-line-soft);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--run-muted);
    font-size: 8px;
    letter-spacing: 0.06em;
}

td:nth-child(n+4),
th:nth-child(n+4) {
    text-align: right;
}

.activity-name {
    max-width: 210px;
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
}

.empty-cell {
    padding: 32px;
    color: var(--run-muted);
    text-align: center !important;
}

.privacy-panel {
    padding: 22px clamp(22px, 3vw, 34px);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--run-line);
    background: var(--run-text);
    color: var(--run-surface);
}

.privacy-panel strong {
    font-size: 11px;
}

.privacy-panel p {
    margin: 0;
    color: rgba(255, 252, 247, 0.68);
    font-size: 9px;
    line-height: 1.55;
}

.danger-button {
    color: #ff9b88;
}

.run-footer {
    min-height: 64px;
    padding: 0 clamp(16px, 3vw, 42px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--run-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.run-footer a {
    text-underline-offset: 3px;
}

.oauth-callback {
    min-height: 100vh;
    padding: 18px;
    display: grid;
    place-items: center;
}

.oauth-card {
    width: min(520px, 100%);
    padding: clamp(30px, 6vw, 54px);
    border: 1px solid var(--run-line);
    background: var(--run-surface);
    box-shadow: var(--run-shadow);
}

.oauth-card h1 {
    margin: 12px 0;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.oauth-card > p:not(.section-index) {
    margin: 0;
    color: var(--run-muted);
    font-size: 12px;
    line-height: 1.7;
}

.callback-link {
    margin-top: 24px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    padding: 18px;
    display: grid;
    place-items: center;
    background: rgba(38, 35, 31, 0.72);
    backdrop-filter: blur(8px);
}

.login-screen[hidden] {
    display: none;
}

.login-card {
    position: relative;
    width: min(420px, 100%);
    padding: 34px;
    border: 1px solid var(--run-line);
    background: var(--run-surface);
    box-shadow: var(--run-shadow);
    text-align: center;
}

.login-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--run-text);
    font-size: 22px;
}

.login-mark {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border: 1px solid #2c2300;
    border-radius: 50%;
    background: #fee500;
}

.login-card h1 {
    margin: 0;
    color: var(--run-text);
    font-size: 24px;
}

.login-card p {
    color: var(--run-muted);
    font-size: 14px;
    line-height: 1.65;
}

#kakaoLoginBtn {
    width: 100%;
    min-height: 46px;
    border: 1px solid #2c2300;
    background: #fee500;
    color: #2c2300;
    font-weight: 900;
}

.auth-status {
    min-height: 18px;
    color: var(--run-text);
    font-size: 13px;
}

.garmin-dialog {
    width: min(520px, calc(100% - 28px));
    max-height: calc(100dvh - 28px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--run-line);
    border-radius: 0;
    background: var(--run-surface);
    color: var(--run-text);
    box-shadow: 0 32px 90px rgba(22, 18, 14, 0.32);
}

.garmin-dialog::backdrop {
    background: rgba(20, 17, 14, 0.65);
    backdrop-filter: blur(5px);
}

.garmin-dialog-head {
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--run-line);
}

.garmin-dialog-head h2 {
    margin: 8px 0 0;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.dialog-close {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 1px solid var(--run-line);
    background: transparent;
    color: var(--run-text);
    font-size: 24px;
    line-height: 1;
}

.dialog-close:hover,
.dialog-close:focus-visible {
    border-color: var(--run-accent);
    background: var(--run-accent);
    color: #fff;
}

.garmin-auth-form {
    padding: 24px 24px 0;
}

.dialog-copy {
    margin: 0 0 4px;
    color: var(--run-muted);
    font-size: 12px;
    line-height: 1.65;
    word-break: keep-all;
}

.consent-check {
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 9px;
    font-weight: 700;
    line-height: 1.55;
}

.consent-check input {
    width: 18px;
    min-height: 18px;
    margin: 1px 0 0;
    accent-color: var(--run-accent);
}

.garmin-auth-form .secondary-button {
    margin-top: -6px;
}

.dialog-status {
    min-height: 20px;
    margin: 16px 24px 0;
    color: var(--run-muted);
    font-size: 11px;
    line-height: 1.55;
}

.dialog-status.is-error {
    color: var(--run-accent);
}

.dialog-footnote {
    margin: 14px 0 0;
    padding: 16px 24px 22px;
    border-top: 1px solid var(--run-line-soft);
    color: var(--run-muted);
    font-size: 9px;
    line-height: 1.6;
}

body:has(.garmin-dialog[open]) {
    overflow: hidden;
}

.oauth-consent-page {
    min-height: calc(100dvh - 60px);
    padding: 40px 18px;
    display: grid;
    place-items: center;
}

.oauth-consent-card {
    width: min(680px, 100%);
    padding: clamp(26px, 5vw, 48px);
    border: 1px solid var(--run-line);
    background: var(--run-surface);
    box-shadow: var(--run-shadow);
}

.oauth-consent-card h1 {
    margin: 10px 0 14px;
    font-size: clamp(30px, 6vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    word-break: keep-all;
}

.oauth-consent-lead {
    margin: 0;
    color: var(--run-muted);
    font-size: 12px;
    line-height: 1.75;
    word-break: keep-all;
}

.oauth-scope-list {
    margin-top: 24px;
    border: 1px solid var(--run-line);
}

.oauth-scope-list article {
    padding: 16px;
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    border-bottom: 1px solid var(--run-line);
}

.oauth-scope-list article:last-child {
    border-bottom: 0;
}

.oauth-scope-list article > span {
    width: fit-content;
    height: fit-content;
    padding: 4px 6px;
    border: 1px solid var(--run-accent);
    color: var(--run-accent);
    font-size: 8px;
    font-weight: 900;
}

.oauth-scope-list strong {
    font-size: 11px;
}

.oauth-scope-list p,
.oauth-data-boundary p {
    margin: 5px 0 0;
    color: var(--run-muted);
    font-size: 9px;
    line-height: 1.6;
}

.oauth-data-boundary {
    margin-top: 18px;
    padding: 16px;
    border-left: 4px solid var(--run-green);
    background: var(--run-surface-2);
}

.oauth-data-boundary strong {
    font-size: 10px;
}

.oauth-consent-actions {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 10px;
}

.oauth-consent-actions .secondary-button {
    margin-top: 0;
}

html[data-theme="dark"] {
    --run-bg: #171512;
    --run-surface: #211e19;
    --run-surface-2: #2c2721;
    --run-text: #f6eee4;
    --run-muted: #c9bdb0;
    --run-line: #89796a;
    --run-line-soft: rgba(246, 238, 228, 0.17);
    --run-accent: #ff7650;
    --run-accent-soft: rgba(255, 118, 80, 0.16);
    --run-green: #74cda0;
    --run-yellow: #f2c94c;
    --run-shadow: 0 22px 64px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] body {
    background:
        linear-gradient(180deg, rgba(240, 104, 77, 0.08), transparent 420px),
        linear-gradient(90deg, transparent calc(100% - 1px), rgba(246, 238, 228, 0.035) 1px) 0 0 / 72px 100%,
        var(--run-bg);
}

html[data-theme="dark"] .run-header,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .run-hero,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .garmin-dialog {
    background-color: rgba(33, 30, 25, 0.95);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] .source-button {
    background: #211e19;
}

html[data-theme="dark"] .hero-progress,
html[data-theme="dark"] .plan-day.is-rest {
    background-color: #2c2924;
}

@media (max-width: 1040px) {
    .run-layout {
        grid-template-columns: 1fr;
    }

    .setup-column {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-right: 1px solid var(--run-line);
    }

    .setup-column .panel {
        border-right: 1px solid var(--run-line);
    }

    .readiness-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-breakdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-card:nth-child(3) {
        border-left: 0;
        border-top: 1px solid var(--run-line);
    }

    .metric-card:nth-child(4) {
        border-top: 1px solid var(--run-line);
    }
}

@media (max-width: 760px) {
    main {
        padding: 0 14px 42px;
    }

    .run-header {
        min-height: 54px;
        padding: 0 14px;
    }

    .run-hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 38px 24px 42px;
        border-right: 0;
        border-bottom: 1px solid var(--run-line);
    }

    .hero-copy h1 {
        font-size: clamp(78px, 27vw, 118px);
    }

    .hero-progress {
        min-height: 260px;
        padding: 24px;
        display: grid;
        grid-template-columns: 150px 1fr;
        align-items: center;
        gap: 24px;
    }

    .progress-orbit {
        width: 140px;
        margin: 0;
    }

    .setup-column {
        display: block;
    }

    .setup-column .panel {
        border-right: 0;
    }

    .readiness-grid {
        grid-template-columns: 1fr 1fr;
    }

    .readiness-score,
    .metric-card {
        min-height: 128px;
    }

    .load-chart {
        grid-template-columns: 1fr;
    }

    .privacy-panel {
        grid-template-columns: 1fr;
    }

    .trend-chart-grid,
    .distribution-grid,
    .next-training {
        grid-template-columns: 1fr;
    }

    .next-training-main {
        border-right: 0;
        border-bottom: 1px solid var(--run-line);
    }

    .chatgpt-review-note {
        grid-template-columns: 1fr;
    }

    .chatgpt-review-note strong {
        grid-row: auto;
    }

    .evidence-row {
        grid-template-columns: 90px 1fr;
    }

    .evidence-row small {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .quiet-button #themeLabel {
        display: none;
    }

    .field-pair {
        grid-template-columns: 1fr;
    }

    .hero-progress {
        grid-template-columns: 108px 1fr;
        gap: 18px;
    }

    .progress-orbit {
        width: 108px;
        box-shadow:
            inset 0 0 0 12px var(--run-accent-soft),
            inset 0 0 0 13px var(--run-line);
    }

    .progress-orbit span {
        font-size: 29px;
    }

    .hero-progress strong {
        font-size: 34px;
    }

    .readiness-grid {
        grid-template-columns: 1fr;
    }

    .status-breakdown,
    .trend-summary,
    .plan-overview,
    .training-plan {
        grid-template-columns: 1fr;
    }

    .period-selector {
        width: 100%;
    }

    .period-button {
        flex: 1 1 0;
    }

    .trend-chart-card,
    .distribution-grid > article {
        padding: 14px;
    }

    .trend-bar-wrap small {
        font-size: 5px;
    }

    .chatgpt-button {
        width: 100%;
    }

    .analysis-heading-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .next-training article {
        min-height: 0;
        padding: 20px;
    }

    .calendar-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 0;
    }

    .calendar-weekdays span {
        padding: 6px 2px;
        font-size: 7px;
    }

    .calendar-day {
        min-height: 76px;
        padding: 4px;
    }

    .calendar-event {
        padding: 3px;
        border-left-width: 2px;
        font-size: 6px;
    }

    .calendar-legend {
        gap: 6px 10px;
    }

    .oauth-consent-actions {
        grid-template-columns: 1fr;
    }

    .plan-day,
    .plan-day:nth-child(2n),
    .plan-day:last-child {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid var(--run-line);
    }

    .plan-day:last-child {
        border-bottom: 0;
    }

    .evidence-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .evidence-row small {
        grid-column: auto;
    }

    .metric-card {
        border-top: 1px solid var(--run-line);
        border-left: 0;
    }

    .readiness-score,
    .metric-card {
        min-height: 114px;
    }

    .source-card {
        grid-template-columns: 38px 1fr auto;
        gap: 9px;
    }

    .source-logo {
        width: 38px;
        height: 38px;
    }

    .panel {
        padding: 22px 18px;
    }

    .run-footer {
        flex-wrap: wrap;
        justify-content: center;
        padding: 20px 14px;
    }

    .garmin-dialog-head,
    .garmin-auth-form {
        padding-right: 18px;
        padding-left: 18px;
    }

    .dialog-status {
        margin-right: 18px;
        margin-left: 18px;
    }

    .dialog-footnote {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
