:root {
    --background: #fafaf9;
    --background-muted: #f5f5f4;
    --text: #1c1917;
    --text-secondary: #78716c;
    --card: #ffffff;
    --border: #e7e5e4;
    --teal: #14b8a6;
    --blue: #3b82f6;
    --green: #22c55e;
    --ai-soft: #fff9f0;
    --ai-strong: #a16207;
    --shadow: 0 24px 64px rgba(28, 25, 23, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Rounded", system-ui, sans-serif;
}

button {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.screen {
    width: min(100%, 560px);
    display: grid;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #d4a76a 0%, #c9b88a 30%, #a8c5d4 70%, #8bb8ce 100%);
    box-shadow: 0 10px 24px rgba(28, 25, 23, 0.1);
}

.brand__icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.brand__name {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 3.2rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    font-weight: 700;
    font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Rounded", system-ui, sans-serif;
}

.hero__live {
    margin: 8px 0 0;
    color: var(--teal);
    font-size: 13px;
    font-weight: 600;
}

.points-badge {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ai-soft);
    color: var(--ai-strong);
    font-size: 13px;
    font-weight: 600;
}

.summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(90deg, rgba(255, 249, 240, 0.7), #ffffff);
}

.summary__item {
    display: grid;
    gap: 4px;
}

.summary__value {
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Rounded", system-ui, sans-serif;
}

.summary__label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.summary__divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.studio {
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 32px;
    background: linear-gradient(135deg, #ffffff, rgba(255, 249, 240, 0.35));
    box-shadow: var(--shadow);
}

.stage {
    position: relative;
    height: 340px;
    display: grid;
    place-items: center;
}

.stage__glow,
.stage__ring,
.stage__core {
    position: absolute;
    border-radius: 50%;
}

.stage__glow {
    width: 210px;
    height: 210px;
    border: 26px solid rgba(161, 98, 7, 0.1);
    filter: blur(10px);
    opacity: 0;
    transform: scale(0.94);
}

.stage__ring {
    width: 220px;
    height: 220px;
    border: 1px solid var(--border);
}

.stage__core {
    width: 168px;
    height: 168px;
    background: radial-gradient(circle, #ffffff 0%, #ffffff 58%, rgba(255, 249, 240, 0.55) 100%);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.04);
}

.stage__center {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
}

.stage__time {
    font-size: 36px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Rounded", system-ui, sans-serif;
}

.stage__status {
    color: var(--text-secondary);
    font-size: 12px;
}

.stage[data-state="running"] .stage__glow {
    opacity: 1;
    animation: breatheGlow 7.4s ease-in-out infinite;
}

.stage[data-state="running"] .stage__ring {
    border-color: rgba(20, 184, 166, 0.24);
    animation: breatheRing 7.4s ease-in-out infinite;
}

.stage[data-state="running"] .stage__core {
    background: radial-gradient(circle, #ffffff 0%, #ffffff 58%, #fff9f0 100%);
    animation: breatheCore 7.4s ease-in-out infinite;
    box-shadow: 0 6px 18px rgba(161, 98, 7, 0.08);
}

.progress-card {
    display: grid;
    gap: 12px;
}

.progress-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-card__label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.progress-card__value {
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--background-muted);
}

.progress-bar__fill {
    width: 2%;
    min-width: 10px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ai-strong), var(--teal));
}

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

.metric {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--background-muted);
}

.metric__value {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Rounded", system-ui, sans-serif;
}

.metric__label {
    color: var(--text-secondary);
    font-size: 12px;
}

.session-button {
    min-height: 56px;
    padding: 0 18px;
    border: 0;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--teal);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: "SF Pro Rounded", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Rounded", system-ui, sans-serif;
    cursor: pointer;
}

.session-button[data-state="running"] {
    background: var(--text);
}

.session-button__icon {
    font-size: 14px;
}

.footer {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding-bottom: 4px;
}

@keyframes breatheGlow {
    0%,
    100% {
        transform: scale(0.94);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes breatheRing {
    0%,
    100% {
        transform: scale(0.98);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.72;
    }
}

@keyframes breatheCore {
    0%,
    100% {
        transform: scale(0.98);
    }
    50% {
        transform: scale(1.03);
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 16px;
    }

    .studio {
        padding: 22px;
    }

    .summary {
        gap: 12px;
        padding: 14px 16px;
    }

    .summary__value {
        font-size: 20px;
    }

    .stage {
        height: 300px;
    }

    .stage__glow {
        width: 184px;
        height: 184px;
    }

    .stage__ring {
        width: 194px;
        height: 194px;
    }

    .stage__core {
        width: 148px;
        height: 148px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
