/* 올비전 스터디(/study). 색은 base.css·dashboard.css 테마 토큰만 쓴다(다크 기본 · 라이트). */

.study-page {
    --st-accent: var(--signal);
    --st-good: var(--clear);
    --st-radius: 18px;
    --st-tabbar-height: 64px;
}

.study-main {
    padding-block: clamp(20px, 4vw, 40px) clamp(48px, 7vw, 88px);
}

/* ---------- 공용 ---------- */

.ico {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.st-avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #9ccbff, #2a6ff0);
    color: #ffffff;
    font: 600 13px var(--f-body);
}
.st-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.st-avatar.xs {
    width: 26px;
    height: 26px;
    font-size: 12px;
}
.st-avatar.sm {
    width: 34px;
    height: 34px;
}
.st-avatar.md {
    width: 42px;
    height: 42px;
}
.st-avatar.lg {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.st-card {
    position: relative;
    padding: clamp(18px, 3vw, 28px);
    border-radius: var(--st-radius);
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
}
.st-card + .st-card,
.st-card + .st-note,
.st-me > * + *,
.st-settings > * + * {
    margin-top: 16px;
}
.st-card h2,
.st-rank-head h2 {
    font-size: 19px;
    letter-spacing: -0.03em;
}
.st-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.st-card-head h2 {
    font-size: clamp(22px, 3vw, 28px);
}
.st-eyebrow {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--haze);
}
.st-title .st-eyebrow {
    margin-bottom: 4px;
}
.st-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--haze);
}
.st-note {
    margin-top: 18px;
    font-size: 13.5px;
    color: var(--star-soft);
}
.st-lede {
    color: var(--star-soft);
    max-width: 60ch;
}
.st-warn {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--caution) 45%, transparent);
    background: color-mix(in srgb, var(--caution) 10%, transparent);
    color: var(--star);
    font-size: 14px;
}
.st-hint {
    font-size: 13px;
    color: var(--haze);
}
.st-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--star-soft);
    font: inherit;
    font-size: 12px;
    white-space: nowrap;
}
button.st-chip {
    cursor: pointer;
}
.st-chip.live {
    border-color: color-mix(in srgb, var(--st-good) 45%, transparent);
    color: var(--st-good);
}

.st-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.st-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.st-badge.on {
    color: var(--st-good);
    border-color: color-mix(in srgb, var(--st-good) 40%, transparent);
    background: color-mix(in srgb, var(--st-good) 8%, transparent);
}
.st-badge.on::before {
    animation: st-pulse 1.8s ease-out infinite;
}
.st-badge.off {
    color: var(--caution);
}
@keyframes st-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 70%, transparent);
    }
    100% {
        box-shadow: 0 0 0 8px transparent;
    }
}

.st-live-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--st-good);
    color: var(--st-good);
    animation: st-pulse 1.8s ease-out infinite;
}

/* ---------- 머리 ---------- */

.st-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.st-hello {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.st-today {
    display: block;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.st-streak {
    margin-top: 2px;
    font-size: 13.5px;
    color: var(--star-soft);
}

.st-switch {
    position: relative;
    min-width: min(320px, 100%);
}
.st-switch > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 8px 8px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    cursor: pointer;
    list-style: none;
    transition: border-color 0.2s;
}
.st-switch > summary::-webkit-details-marker {
    display: none;
}
.st-switch > summary::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 1.6px solid var(--haze);
    border-bottom: 1.6px solid var(--haze);
    transform: rotate(45deg) translateY(-2px);
}
.st-switch[open] > summary,
.st-switch > summary:hover {
    border-color: var(--st-accent);
}
.st-switch-name {
    display: grid;
    min-width: 0;
    line-height: 1.3;
}
.st-switch-name small {
    font-size: 11.5px;
    color: var(--haze);
}
.st-switch-name span {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-switch-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    width: min(380px, calc(100vw - 32px));
    max-height: min(420px, 60vh);
    overflow-y: auto;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.st-switch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--star);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.st-switch-item:hover,
.st-switch-item[aria-current='true'] {
    background: var(--hover);
}
.st-switch-item[aria-current='true'] .st-switch-label {
    font-weight: 600;
}
.st-switch-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-switch-head,
.st-switch-empty {
    padding: 10px 8px 4px;
    font-size: 12px;
    color: var(--haze);
}

/* ---------- 탭 ---------- */

.st-tabs {
    display: flex;
    gap: 4px;
    margin: 26px 0 18px;
    padding: 4px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    width: fit-content;
}
.st-tabs button {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--haze);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition:
        color 0.15s,
        background 0.15s;
}
.st-tabs button:hover {
    color: var(--star);
}
.st-tabs button[aria-selected='true'] {
    background: var(--ink);
    color: var(--star);
    box-shadow:
        0 0 0 1px var(--line-strong),
        0 8px 20px -14px rgba(0, 0, 0, 0.6);
}
.st-tabs button[aria-selected='true'] .ico {
    stroke: var(--st-accent);
}
.st-panel:focus {
    outline: none;
}

/* ---------- 스터디룸 ---------- */

.st-live-body {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 44px);
}

.st-ring {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    margin-inline: auto;
}
.st-ring-svg {
    width: 100%;
    height: 100%;
}
.st-ring-track,
.st-ring-bar {
    fill: none;
    stroke-width: 12;
}
.st-ring-track {
    stroke: var(--line-strong);
}
.st-ring-bar {
    stroke: var(--st-accent);
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px color-mix(in srgb, var(--st-accent) 55%, transparent));
    transition: stroke-dashoffset 1s linear;
}
/* 타이머 없이 공부할 때: 원둘레(2π·92)를 8칸으로 나눈 점선이 천천히 돈다. */
.st-ring-bar.open {
    stroke-dasharray: 56.26 16;
    animation: st-orbit 14s linear infinite;
}
@keyframes st-orbit {
    to {
        stroke-dashoffset: -578.05;
    }
}
.st-ring-center {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 2px;
    text-align: center;
}
.st-ring-time {
    font-family: var(--f-mono);
    font-size: clamp(36px, 7vw, 50px);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}
/* 숫자가 아닌 글(곧 끝나요)은 고리 안에 들어가게 본문 글꼴로 작게 쓴다. */
.st-ring-time.is-text {
    font-family: var(--f-body);
    font-size: clamp(20px, 3.4vw, 26px);
    font-weight: 700;
    letter-spacing: -0.03em;
}
.st-ring-center span {
    font-size: 13px;
    color: var(--star-soft);
}
.st-ring-center small {
    margin-top: 4px;
    font-size: 12px;
    color: var(--haze);
}

.st-live-info {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.st-now {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.st-now-emoji {
    font-size: 30px;
    line-height: 1;
}
.st-now small,
.st-people small {
    display: block;
    font-size: 12px;
    color: var(--haze);
}
.st-now strong {
    font-size: 17px;
}
.st-now .st-eq {
    margin-left: auto;
}
.st-music {
    display: grid;
    gap: 10px;
}
.st-music-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
.st-music-volume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--star-soft);
}
.st-music-volume input {
    width: 140px;
    accent-color: var(--st-accent);
}
.st-music-note {
    margin: 0;
}

/* ---------- 스터디룸: 집중 타이머, 이벤트, 지금 공부 중, 서버 관리 ---------- */

.st-room {
    display: grid;
    gap: 16px;
}
.st-room > .st-card + .st-card {
    margin-top: 0;
}
.st-focus > .st-hint {
    margin-top: 18px;
}
.st-today-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    font-size: 14px;
    color: var(--star-soft);
}
.st-chip.good {
    border-color: color-mix(in srgb, var(--st-good) 45%, transparent);
    background: color-mix(in srgb, var(--st-good) 10%, transparent);
    color: var(--st-good);
}
.st-event {
    border-color: color-mix(in srgb, var(--st-accent) 32%, var(--line));
}
.st-event .st-eyebrow {
    display: flex;
    align-items: center;
    gap: 4px;
}
.st-event-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.st-event-facts dd {
    overflow: visible;
    font-size: 14px;
    white-space: normal;
}
.st-event > .st-hint {
    margin-top: 14px;
}
.st-event-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.st-studying {
    padding-block: 14px;
}
.st-event-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--st-accent);
    box-shadow: 0 0 0 2px var(--ink);
}
.st-event-admin .st-event-acts {
    margin-top: 0;
}
.st-event-admin > .st-hint {
    margin-top: 12px;
}
.st-event-admin .st-control {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.st-event-admin .st-control > .st-hint {
    margin-top: 8px;
}
.st-form {
    display: grid;
    gap: 14px;
}
.st-form h3 {
    margin: 0;
    font-size: 15px;
}
.st-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}
.st-form-row .st-field {
    flex: 1 1 220px;
}
.st-form-row .st-hint {
    margin: 0;
}
.st-check input:disabled + span {
    opacity: 0.55;
}
.st-field select,
.st-rank-event {
    min-width: 0;
    max-width: 100%;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--star);
    font: inherit;
}
.st-field select {
    height: 44px;
    font-size: 15px;
}
.st-field select:focus,
.st-rank-event:focus {
    outline: none;
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-accent) 18%, transparent);
}
.st-field .st-hint {
    font-size: 12.5px;
    font-weight: 400;
}
.st-past-events {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-past-events li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.st-past-events li > span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.st-past-events strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-past-acts {
    display: flex;
    flex: none;
    gap: 6px;
}
.st-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.st-control-head h3 {
    margin: 0;
}
.st-past-events small {
    font-size: 12px;
    color: var(--haze);
}
.st-rank-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.st-rank-event {
    height: 42px;
    width: min(100%, 320px);
    font-size: 13.5px;
}

@media (max-width: 720px) {
    .st-event-facts {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-rank-filters,
    .st-rank-event {
        width: 100%;
    }
    .st-rank-filters .seg {
        flex-wrap: wrap;
    }
    .st-past-events li {
        flex-wrap: wrap;
    }
}
.st-time-reset {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
}
.st-time-reset summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--star-soft);
}
.st-time-reset > .st-hint {
    margin: 10px 0 0;
}
.st-time-reset-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.st-time-reset-admin {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.st-time-reset-admin h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--star-soft);
}
.st-time-reset-member {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 220px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--star);
    font: inherit;
    font-size: 13px;
}
.st-whats-new {
    margin-top: 0;
    align-items: flex-start;
}
.st-whats-new-body {
    display: grid;
    gap: 8px;
    min-width: 0;
    flex: 1 1 320px;
}
.st-whats-new-body ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    color: var(--star-soft);
}
.st-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 22px;
}
.st-eq i {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    background: var(--st-accent);
    transform-origin: bottom;
    animation: st-eq 1.2s ease-in-out infinite;
}
.st-eq i:nth-child(2) {
    animation-delay: -0.4s;
}
.st-eq i:nth-child(3) {
    animation-delay: -0.8s;
}
.st-eq i:nth-child(4) {
    animation-delay: -0.2s;
}
@keyframes st-eq {
    0%,
    100% {
        transform: scaleY(0.25);
    }
    50% {
        transform: scaleY(1);
    }
}

.st-people {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.st-people small {
    flex-basis: 100%;
}
.st-faces {
    display: flex;
    margin: 0;
    padding: 0 0 0 6px;
    list-style: none;
}
.st-faces li {
    position: relative;
    margin-left: -6px;
}
.st-faces .st-avatar {
    box-shadow: 0 0 0 2px var(--ink);
}
/* 이벤트 타이머: 내 이벤트 기록은 크게, 지금 쌓이는지는 색으로 보여 준다. */
.st-event-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 32px;
}
.st-event-stat {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.st-event-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--haze);
}
.st-event-stat-value {
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--star);
}
.st-event-stat-value.is-small {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 700;
}
.st-accrual {
    font-size: 14px;
    font-weight: 700;
}
.st-accrual.is-on {
    color: var(--st-good);
}
.st-accrual.is-off {
    color: var(--verdict);
}
.st-event-facts .st-fact-strong {
    font-size: 20px;
    font-weight: 800;
    color: var(--star);
}
/* 이벤트 음성 채널 밖에서는 참여하기 전에 먼저 들어가라고 알린다. */
.st-event-join-note {
    display: grid;
    gap: 6px;
}
/* 이벤트 타이머의 참여자: 음성 채널 밖에 있거나 쉬는 사람은 흐리게 보여 준다. */
.st-faces li.is-away .st-avatar {
    opacity: 0.45;
    filter: grayscale(0.7);
}
.st-more {
    font-size: 13px;
    color: var(--star-soft);
}

.st-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.st-facts div {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.st-facts dt {
    font-size: 12px;
    color: var(--haze);
}
.st-facts dd {
    margin: 2px 0 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-checkin {
    margin-top: 22px;
}
.st-checkin-next {
    margin-top: 18px;
}

.st-control h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--star-soft);
}
.st-stations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.st-station {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    color: var(--star);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s,
        transform 0.15s;
}
.st-station:hover:not(:disabled) {
    border-color: var(--st-accent);
    transform: translateY(-1px);
}
.st-station-emoji {
    grid-row: span 2;
    font-size: 24px;
}
.st-station strong {
    font-size: 14.5px;
}
.st-station small {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    color: var(--haze);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.st-station[aria-pressed='true'] {
    border-color: var(--st-accent);
    background: color-mix(in srgb, var(--st-accent) 10%, var(--ink));
    box-shadow: 0 0 0 1px var(--st-accent) inset;
}
.st-station:disabled {
    cursor: default;
}
.st-station:disabled:not([aria-pressed='true']) {
    opacity: 0.55;
}

.st-timer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
.st-chips {
    justify-content: flex-start;
}
.st-chips button {
    height: 34px;
    padding: 0 13px;
    font-size: 13px;
}
.st-chips button:hover:not(:disabled) {
    border-color: var(--st-accent);
    color: var(--star);
}
.st-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.st-custom input {
    width: 88px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    color: var(--star);
    font: inherit;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.st-unit {
    font-size: 14px;
    color: var(--haze);
}
.st-custom input:focus {
    outline: none;
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-accent) 18%, transparent);
}
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.st-start-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

/* ---------- 순위표 ---------- */

.st-rank-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.st-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.st-podium li {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 22px 12px 18px;
    border-radius: var(--st-radius);
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
    text-align: center;
    min-width: 0;
}
.st-podium li strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-podium li > span:last-child {
    font-size: 13px;
    color: var(--star-soft);
    font-variant-numeric: tabular-nums;
}
.st-podium-1 {
    order: 2;
    padding-top: 30px;
    border-color: color-mix(in srgb, #f5c542 45%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, #f5c542 12%, var(--ink)), var(--ink));
}
.st-podium-2 {
    order: 1;
}
.st-podium-3 {
    order: 3;
}
.st-podium li.me,
.st-rank-list li.me {
    box-shadow:
        0 0 0 1.5px var(--st-accent) inset,
        var(--shadow-card);
}
.st-medal {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--raise);
    font-size: 13px;
    font-weight: 700;
}
.st-podium-1 .st-medal {
    background: #f5c542;
    color: #3a2a00;
}
.st-podium-2 .st-medal {
    background: #c7d0dd;
    color: #1f2937;
}
.st-podium-3 .st-medal {
    background: #d9955b;
    color: #3b1d06;
}
.st-podium-1 .st-avatar {
    width: 68px;
    height: 68px;
    box-shadow: 0 0 0 3px #f5c542;
}
.st-rank-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-rank-list li {
    display: grid;
    grid-template-columns: 34px auto minmax(0, 1fr) minmax(80px, 30%) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--ink);
}
.st-rank-no {
    font-weight: 700;
    color: var(--star-soft);
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.st-rank-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-rank-time {
    font-size: 13.5px;
    color: var(--star-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.st-meter {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--raise);
}
.st-meter i {
    display: block;
    width: calc(var(--w, 0) * 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--st-accent) 55%, transparent),
        var(--st-accent)
    );
}
.st-rank-me {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--st-accent) 45%, transparent);
    background: color-mix(in srgb, var(--st-accent) 12%, var(--ink));
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 600;
}
.st-rank-me .st-chip {
    margin-left: auto;
}

/* ---------- 내 기록 ---------- */

.st-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.st-stat {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
}
.st-stat span {
    font-size: 12.5px;
    color: var(--haze);
}
.st-stat strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(18px, 2.4vw, 24px);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.st-me-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    gap: 16px;
}
.st-me-grid .st-card + .st-card {
    margin-top: 0;
}
.st-bars {
    width: 100%;
    height: auto;
    margin-top: 14px;
}
.st-bars rect {
    transition: fill 0.2s;
}
.st-bars rect.on {
    fill: color-mix(in srgb, var(--st-accent) 70%, transparent);
}
.st-bars rect.today {
    fill: var(--st-good);
}
.st-bars rect.off {
    fill: var(--line-strong);
}
.st-bars text {
    fill: var(--haze);
    font-size: 11px;
    font-family: var(--f-body);
}
.st-streak-card {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    text-align: center;
}
.st-flame {
    font-size: 34px;
    line-height: 1;
}
.st-streak-card strong {
    font-size: 30px;
    letter-spacing: -0.04em;
}
.st-streak-card small {
    margin-top: 8px;
    font-size: 12px;
    color: var(--haze);
}
.st-heat-wrap {
    max-width: 520px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.st-heat-months,
.st-heat {
    display: grid;
    grid-template-columns: repeat(var(--weeks, 17), minmax(12px, 1fr));
    gap: 4px;
}
.st-heat-months span {
    font-size: 11px;
    color: var(--haze);
    white-space: nowrap;
}
.st-heat {
    margin-top: 6px;
}
.st-heat-col {
    display: grid;
    gap: 4px;
}
.st-heat i {
    display: block;
    aspect-ratio: 1;
    border-radius: 4px;
}
.st-legend i {
    display: block;
}
.st-heat i.future {
    background: transparent;
}
.lv0 {
    background: var(--raise);
}
.lv1 {
    background: color-mix(in srgb, var(--st-good) 28%, var(--raise));
}
.lv2 {
    background: color-mix(in srgb, var(--st-good) 50%, var(--raise));
}
.lv3 {
    background: color-mix(in srgb, var(--st-good) 75%, var(--raise));
}
.lv4 {
    background: var(--st-good);
}
.st-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 520px;
    gap: 4px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--haze);
}
.st-legend i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ---------- 설정 ---------- */

.st-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.st-setting p {
    margin-top: 6px;
    font-size: 14px;
    color: var(--star-soft);
    max-width: 62ch;
}
.st-setting .switch {
    flex: none;
}
.st-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--star-soft);
}
.st-settings-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- 로그인 전 ---------- */

.st-landing {
    --st-landing-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 40px 90px -40px rgba(16, 42, 94, 0.42);
    --st-landing-float-bg: rgba(255, 255, 255, 0.84);
    display: grid;
    gap: clamp(88px, 11vw, 140px);
}
:root[data-theme='dark'] .st-landing {
    --st-landing-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 50px 120px -40px rgba(0, 0, 0, 0.9);
    --st-landing-float-bg: rgba(20, 25, 38, 0.8);
}

/* 처음 열 때 글과 그림이 차례로 떠오른다(순서는 .d0~.d3). */
.st-landing-copy > *,
.st-landing-art {
    animation: st-landing-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--d, 0) * 90ms) both;
}
@keyframes st-landing-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

/* 첫 화면 */
.st-landing-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(32px, 4vw, 56px);
    padding-top: clamp(8px, 2.5vw, 32px);
}
/* 뒤쪽 점 격자. 그림 쪽이 가장 진하고 바깥으로 흐려진다.
 * 옆으로 넘치면 휴대폰에서 페이지가 화면보다 넓어지므로 좌우는 본문 폭 안에 둔다. */
.st-landing-hero::before {
    content: '';
    position: absolute;
    inset: -96px 0 -48px;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 55% 65% at 72% 48%, #000 15%, transparent 72%);
    mask-image: radial-gradient(ellipse 55% 65% at 72% 48%, #000 15%, transparent 72%);
    pointer-events: none;
}
.st-landing-copy .kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 13px 6px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--ghost-bg);
}
/* 남은 시간 고리를 닮은 작은 표시 */
.st-landing-copy .kicker::before {
    content: '';
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: conic-gradient(var(--st-accent) 0 68%, var(--line-strong) 0);
    -webkit-mask: radial-gradient(
        farthest-side,
        transparent calc(100% - 3px),
        #000 calc(100% - 2.5px)
    );
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.st-landing-title {
    margin-top: 22px;
    font-size: clamp(42px, 5.6vw, 74px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}
.st-landing-title span {
    display: block;
}
/* 일본어는 띄어쓰기 없이 길어 조사 앞에서 줄이 갈리지 않게 조금 작게 쓴다. */
:root:lang(ja) .st-landing-title {
    font-size: clamp(36px, 4.4vw, 62px);
}
.st-landing-em {
    color: var(--st-accent);
}
.st-landing-copy .st-lede {
    margin-top: 24px;
    max-width: 30em;
    font-size: clamp(15.5px, 1.4vw, 17.5px);
    line-height: 1.75;
    text-wrap: pretty;
}
.st-landing-copy .st-banner {
    margin-top: 20px;
}
.st-landing-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 34px;
}
.st-landing-acts .btn {
    height: 50px;
    padding-inline: 18px 20px;
    border-radius: 12px;
    font-weight: 600;
}
.st-discord {
    width: 20px;
    height: 20px;
    flex: none;
    fill: currentColor;
}
.st-landing-tour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--star-soft);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition:
        color 0.2s,
        background 0.2s;
}
.st-landing-tour:hover {
    color: var(--star);
    background: var(--hover);
}
.st-landing-tour .ico {
    width: 20px;
    height: 20px;
}

/* 첫 화면 그림: 스터디룸 창 + 떠 있는 카드 둘(공부 확인, 이번 주 순위) */
/* 아래 순위 카드가 창의 아래 여백만 덮도록 아래쪽을 비워 둔다. */
.st-landing-art {
    position: relative;
    padding: 44px 16px 132px 32px;
}
/* 창 뒤에서 가장자리로 번지는 빛 */
.st-landing-art::before {
    content: '';
    position: absolute;
    inset: 0 0 16% 0;
    z-index: -1;
    background: radial-gradient(
        closest-side,
        color-mix(in srgb, var(--st-accent) 30%, transparent),
        transparent
    );
    filter: blur(32px);
}
.st-landing-window {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: var(--ink);
    box-shadow: var(--st-landing-shadow);
}
.st-landing-window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 12px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}
.st-landing-server {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 14px;
    white-space: nowrap;
}
.st-landing-server .gicon {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: none;
}
.st-landing-server > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: var(--haze);
}
.st-landing-server > span:last-child::before {
    content: '/';
    margin-right: 9px;
    color: var(--line-strong);
}
.st-landing-window-bar .st-chip {
    flex: none;
}
.st-landing-window-body {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    padding: 26px 26px 28px;
}
.st-landing-window .st-ring {
    max-width: 196px;
}
.st-landing-window .st-ring-time {
    font-size: 38px;
}
.st-landing-side {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.st-landing-stat span,
.st-landing-people > span:first-child {
    font-size: 12.5px;
    color: var(--haze);
}
.st-landing-count {
    display: block;
    margin-top: 2px;
    font-family: var(--f-mono);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.st-landing-track {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--st-accent) 35%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--st-accent) 8%, transparent);
    color: var(--st-accent);
}
.st-landing-track small,
.st-landing-track strong {
    display: block;
    overflow: hidden;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-landing-track small {
    font-size: 12px;
    color: var(--haze);
}
.st-landing-track strong {
    font-size: 15px;
    color: var(--star);
}
.st-landing-track .st-eq {
    height: 18px;
}
.st-landing-people {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.st-landing-faces {
    display: flex;
    align-items: center;
    padding-left: 8px;
}
.st-landing-faces .st-avatar {
    margin-left: -8px;
    box-shadow: 0 0 0 2px var(--ink);
}
.st-landing-faces b {
    margin-left: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--star-soft);
}
/* 그림 속 사람은 프로필 사진 대신 색으로 칠한다(나는 기본 파랑). */
.st-avatar.tone-1 {
    background: linear-gradient(135deg, #ffd29a, #ee8a3c);
}
.st-avatar.tone-2 {
    background: linear-gradient(135deg, #a8efc9, #23a46f);
}
.st-avatar.tone-3 {
    background: linear-gradient(135deg, #f7bfdc, #d4508b);
}
.st-avatar.tone-4 {
    background: linear-gradient(135deg, #cfc6ff, #7a68ee);
}

.st-landing-float {
    position: absolute;
    z-index: 1;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--st-landing-float-bg);
    box-shadow: var(--st-landing-shadow);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    animation: st-landing-bob 8s ease-in-out infinite;
}
@keyframes st-landing-bob {
    50% {
        transform: translateY(-7px);
    }
}
.st-landing-float.is-check {
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 12px;
    animation-delay: -4s;
}
.st-landing-hand {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--caution) 18%, transparent);
    font-size: 18px;
}
.st-landing-check strong,
.st-landing-check small {
    display: block;
    line-height: 1.35;
}
.st-landing-check strong {
    font-size: 13.5px;
}
.st-landing-check small {
    font-size: 12px;
    color: var(--haze);
}
.st-landing-pill {
    padding: 7px 12px;
    border-radius: 9px;
    background: var(--caution);
    color: #1b1203;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.st-landing-float.is-rank {
    bottom: 0;
    left: 0;
    width: 248px;
    padding: 12px 12px 8px;
}
.st-landing-float-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 8px;
    font-size: 13px;
    color: var(--star-soft);
}
.st-landing-float-head .ico {
    width: 16px;
    height: 16px;
    color: var(--caution);
}
.st-landing-ranks {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-landing-ranks li {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 14px auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 13px;
}
/* 줄 뒤에 1등 대비 공부 시간만큼 옅은 막대를 깐다(--w). */
.st-landing-ranks li::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -1;
    width: calc(var(--w, 0) * 100%);
    border-radius: inherit;
    background: color-mix(in srgb, var(--star) 6%, transparent);
}
.st-landing-ranks li.is-me {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--st-accent) 45%, transparent) inset;
}
.st-landing-ranks li.is-me::before {
    background: color-mix(in srgb, var(--st-accent) 16%, transparent);
}
.st-landing-ranks b {
    font-family: var(--f-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--haze);
    text-align: center;
}
.st-landing-ranks .st-avatar.xs {
    width: 22px;
    height: 22px;
    font-size: 11px;
}
.st-landing-ranks .nm {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-landing-ranks .tm {
    font-size: 12.5px;
    color: var(--star-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* 기능 다섯 가지 */
.st-landing-feats > h2 {
    font-size: clamp(30px, 3.8vw, 46px);
    letter-spacing: -0.05em;
}
.st-landing-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin: clamp(24px, 3vw, 36px) 0 0;
    padding: 0;
    list-style: none;
}
.st-landing-feat {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    padding: 10px 10px 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--ink);
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s;
}
.st-landing-feat:hover {
    border-color: var(--line-strong);
}
.st-landing-feat.is-focus {
    grid-column: span 4;
}
.st-landing-feat-art {
    position: relative;
    display: grid;
    place-items: center;
    height: 212px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        radial-gradient(
            120% 90% at 50% 0%,
            color-mix(in srgb, var(--st-accent) 7%, transparent),
            transparent 70%
        ),
        var(--panel);
}
.st-landing-feat h3 {
    padding-inline: 14px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.025em;
}
.st-landing-feat p {
    margin-top: 6px;
    padding-inline: 14px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--star-soft);
    text-wrap: pretty;
}

.st-landing-focus {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: 520px;
}
.st-landing-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.st-landing-chips span {
    padding: 5px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 13px;
    color: var(--star-soft);
    white-space: nowrap;
}
.st-landing-chips .on {
    border-color: var(--st-accent);
    background: color-mix(in srgb, var(--st-accent) 14%, transparent);
    color: var(--star);
    box-shadow: 0 0 0 1px var(--st-accent) inset;
}
.st-landing-stations {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.st-landing-station {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--ink);
    font-size: 14px;
    font-weight: 600;
    color: var(--star-soft);
    white-space: nowrap;
}
.st-landing-station .ico {
    color: var(--haze);
}
.st-landing-station.on {
    border-color: color-mix(in srgb, var(--st-accent) 60%, transparent);
    color: var(--star);
    box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--st-accent) 70%, transparent);
}
.st-landing-station.on .ico {
    color: var(--st-accent);
}
.st-landing-station .st-eq {
    height: 14px;
    margin-left: auto;
}
.st-landing-station .st-eq i {
    width: 3px;
}
.st-landing-start {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px 0 14px;
    border-radius: 11px;
    background: var(--st-accent);
    color: var(--btn-fg);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--st-accent) 80%, transparent);
}
.st-landing-start .ico path {
    fill: currentColor;
}

.st-landing-rank {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}
.st-landing-seg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--ink);
    font-size: 12px;
    text-align: center;
    color: var(--haze);
}
.st-landing-seg span {
    padding: 3px 0;
    border-radius: 7px;
    white-space: nowrap;
}
.st-landing-seg .on {
    background: var(--raise);
    color: var(--star);
    font-weight: 600;
}
.st-landing-rank .st-landing-ranks li {
    padding-block: 4px;
}

.st-landing-event {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 300px;
}
.st-landing-event-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.st-landing-event-head .ico {
    color: var(--st-good);
}
.st-landing-event-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-landing-event-head .st-badge {
    margin-left: auto;
    height: 24px;
    font-size: 11.5px;
}
.st-landing-checks {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}
/* 확인 사이를 잇는 선. 지금 확인까지는 초록으로 칠한다. */
.st-landing-checks::before,
.st-landing-checks::after {
    content: '';
    position: absolute;
    top: 17px;
    left: 12.5%;
    height: 2px;
    border-radius: 2px;
}
.st-landing-checks::before {
    right: 12.5%;
    background: var(--line-strong);
}
.st-landing-checks::after {
    width: 50%;
    background: var(--st-good);
}
.st-landing-checks li {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 8px;
    font-family: var(--f-mono);
    font-size: 11.5px;
    color: var(--haze);
}
.st-landing-checks i {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    background: var(--panel);
    font-size: 16px;
    font-style: normal;
}
.st-landing-checks .is-done i {
    border-color: var(--st-good);
    background: color-mix(in srgb, var(--st-good) 18%, var(--panel));
    color: var(--st-good);
}
.st-landing-checks .is-done .ico {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}
.st-landing-checks .is-now i {
    border-color: var(--caution);
    background: color-mix(in srgb, var(--caution) 16%, var(--panel));
    color: var(--caution);
    animation: st-pulse 1.8s ease-out infinite;
}
.st-landing-checks .is-now span {
    color: var(--star);
}

.st-landing-record {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: 290px;
}
/* 칸이 작아 달 이름이 서로 겹치므로 그림에서는 뺀다. */
.st-landing-record .st-heat-months {
    display: none;
}
.st-landing-record .st-heat {
    margin-top: 0;
}
.st-landing-streak {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.st-landing-streak strong {
    font-size: 26px;
    line-height: 1;
    letter-spacing: -0.04em;
}
.st-landing-streak span {
    font-size: 13px;
    color: var(--haze);
}
.st-landing-record .st-heat-wrap {
    overflow: hidden;
}
.st-landing-record .st-heat,
.st-landing-record .st-heat-months,
.st-landing-record .st-heat-col {
    gap: 3px;
}
.st-landing-record .st-heat i {
    border-radius: 3px;
}

.st-landing-vault {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}
.st-landing-cipher {
    position: absolute;
    inset: -10px;
    margin: 0;
    font-family: var(--f-mono);
    font-size: 12.5px;
    line-height: 1.75;
    letter-spacing: 0.06em;
    color: color-mix(in srgb, var(--star) 24%, transparent);
    word-break: break-all;
    -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 30%, transparent 85%);
    mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 30%, transparent 85%);
}
.st-landing-lock {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid color-mix(in srgb, var(--st-good) 50%, transparent);
    border-radius: 20px;
    background: color-mix(in srgb, var(--st-good) 14%, var(--ink));
    color: var(--st-good);
    box-shadow:
        0 0 0 8px color-mix(in srgb, var(--st-good) 8%, transparent),
        0 20px 40px -16px color-mix(in srgb, var(--st-good) 60%, transparent);
}
.st-landing-lock .ico {
    width: 28px;
    height: 28px;
    stroke-width: 1.7;
}

/* 맨 아래 */
.st-landing-end {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: clamp(44px, 6vw, 76px) clamp(20px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--ink);
    box-shadow: var(--shadow-card);
    text-align: center;
}
.st-landing-end::before {
    content: '';
    position: absolute;
    left: 15%;
    right: 15%;
    bottom: -70%;
    height: 120%;
    z-index: -1;
    background: radial-gradient(
        closest-side,
        color-mix(in srgb, var(--st-accent) 30%, transparent),
        transparent
    );
    filter: blur(24px);
}
.st-landing-end h2 {
    font-size: clamp(28px, 3.6vw, 42px);
    letter-spacing: -0.05em;
}
.st-landing-end p {
    max-width: 34em;
    color: var(--star-soft);
}
/* 두 문장을 한 줄씩 둔다(좁은 화면에서는 문장 안에서 고르게 다시 줄을 바꾼다). */
.st-landing-end p span {
    display: block;
    text-wrap: balance;
}
.st-landing-end .st-landing-acts {
    justify-content: center;
    margin-top: 14px;
}

@media (max-width: 1080px) {
    .st-landing-hero {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-landing-art {
        justify-self: center;
        width: 100%;
        max-width: 660px;
    }
    .st-landing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .st-landing-feat {
        grid-column: span 1;
    }
    .st-landing-feat.is-focus {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .st-landing-art {
        padding: 12px 0 0;
    }
    .st-landing-window-body {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 20px;
        padding: 22px 18px 24px;
    }
    .st-landing-window .st-ring {
        max-width: 168px;
    }
    .st-landing-window .st-ring-time {
        font-size: 34px;
    }
    .st-landing-side {
        width: 100%;
    }
    .st-landing-float.is-check {
        display: none;
    }
    .st-landing-float.is-rank {
        position: relative;
        bottom: auto;
        left: auto;
        width: auto;
        margin: -18px 14px 0;
    }
    .st-landing-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-landing-feat-art {
        padding: 14px;
    }
    .st-landing-chips {
        gap: 4px;
    }
    .st-landing-chips span {
        padding: 4px 9px;
        font-size: 12px;
    }
    .st-landing-stations {
        gap: 6px;
    }
    .st-landing-station {
        justify-content: center;
        gap: 6px;
        padding: 11px 8px;
        font-size: 13.5px;
    }
    .st-landing-station .st-eq {
        display: none;
    }
    .st-landing-end .st-landing-acts {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 320px;
    }
    .st-landing-end .st-landing-acts .btn {
        justify-content: center;
    }
}

/* 기능 카드와 맨 아래는 화면에 들어올 때 떠오른다(스크롤 연동을 지원하는 브라우저만, 나머지는 바로 보인다). */
@supports (animation-timeline: view()) {
    .st-landing-feat,
    .st-landing-end {
        animation: st-landing-rise linear both;
        animation-timeline: view();
        animation-range: entry 5% entry 75%;
    }
}

/* ---------- 휴대폰 ---------- */

@media (max-width: 860px) {
    .st-live-body {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-ring {
        max-width: 240px;
    }
    .st-me-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .study-main {
        padding-bottom: calc(var(--st-tabbar-height) + 40px + env(safe-area-inset-bottom, 0px));
    }
    .study-foot {
        padding-bottom: calc(var(--st-tabbar-height) + 20px + env(safe-area-inset-bottom, 0px));
    }
    .st-tabs {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        width: auto;
        margin: 0;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        border-radius: 0;
        border: 0;
        border-top: 1px solid var(--line);
        background: var(--bar-bg);
        backdrop-filter: blur(16px) saturate(170%);
    }
    .st-tabs button {
        flex: 1;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        height: 52px;
        padding: 0;
        font-size: 11.5px;
    }
    .st-tabs button[aria-selected='true'] {
        box-shadow: none;
        background: var(--hover);
    }
    .st-tabs .ico {
        width: 20px;
        height: 20px;
    }
    .st-switch {
        width: 100%;
    }
    .st-panel {
        margin-top: 18px;
    }
    .study-page .crumbs {
        display: none;
    }
    .st-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .st-podium {
        gap: 8px;
    }
    .st-podium li {
        padding: 16px 6px 14px;
    }
    .st-podium .st-avatar.lg {
        width: 44px;
        height: 44px;
    }
    .st-podium-1 .st-avatar.lg {
        width: 54px;
        height: 54px;
    }
    .st-rank-list li {
        grid-template-columns: 28px auto minmax(0, 1fr) auto;
        gap: 10px;
    }
    .st-rank-list .st-meter {
        grid-column: 3 / -1;
        grid-row: 2;
    }
    .st-rank-me {
        bottom: calc(var(--st-tabbar-height) + 12px + env(safe-area-inset-bottom, 0px));
    }
    .st-facts {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-setting {
        align-items: flex-start;
    }
}

/* ---------- 노트 금고 ---------- */

.c-sky {
    --note: #5b8def;
}
.c-mint {
    --note: #2fae7e;
}
.c-sun {
    --note: #e3a02f;
}
.c-rose {
    --note: #e0647c;
}
.c-violet {
    --note: #8f6ef0;
}

.st-vault {
    display: grid;
    gap: 14px;
    max-width: 520px;
    margin-inline: auto;
}
.st-vault h2 {
    font-size: clamp(21px, 2.6vw, 25px);
    letter-spacing: -0.03em;
}
.st-vault .st-list {
    margin-top: 0;
}
.st-vault-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--st-accent) 14%, transparent);
    color: var(--st-accent);
}
.st-vault-icon .ico {
    width: 24px;
    height: 24px;
}
.st-field {
    display: grid;
    gap: 6px;
}
.st-field span {
    font-size: 13px;
    font-weight: 600;
    color: var(--star-soft);
}
.st-field input {
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--star);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.st-field input:focus {
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-accent) 18%, transparent);
}
.st-strength-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -6px;
}
.st-strength {
    display: grid;
    grid-template-columns: repeat(4, 28px);
    gap: 4px;
}
.st-strength i {
    height: 4px;
    border-radius: 999px;
    background: var(--raise);
    transition: background 0.2s;
}
.st-strength[data-score='1'] i:nth-child(-n + 1) {
    background: var(--verdict);
}
.st-strength[data-score='2'] i:nth-child(-n + 2) {
    background: var(--caution);
}
.st-strength[data-score='3'] i:nth-child(-n + 3),
.st-strength[data-score='4'] i {
    background: var(--st-good);
}
.st-strength-text {
    font-size: 12px;
    color: var(--haze);
}
.st-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--star-soft);
    cursor: pointer;
}
.st-check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: none;
    accent-color: var(--st-accent);
}
.st-vault > .st-warn {
    margin-top: 0;
}
.st-vault .btn-lead {
    justify-self: start;
}
.st-vault-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.st-link {
    font-size: 13.5px;
    color: var(--st-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.st-working {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--haze);
}

.st-notes-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
}
.st-notes-head h2 {
    font-size: clamp(22px, 3vw, 28px);
    letter-spacing: -0.03em;
}
.st-notes-acts {
    display: flex;
    gap: 8px;
}
.st-notes-acts .btn {
    gap: 6px;
}
.st-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--st-accent) 35%, transparent);
    background: color-mix(in srgb, var(--st-accent) 8%, var(--ink));
    font-size: 14px;
    color: var(--star-soft);
}

.st-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 0.8fr)) minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 12px;
    margin-top: 18px;
}
.st-insight {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
}
.st-insight > span {
    overflow: hidden;
    font-size: 12.5px;
    color: var(--haze);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-insight strong {
    font-size: clamp(18px, 2.2vw, 22px);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.st-insight .st-meter {
    margin-top: 8px;
}
.st-spark {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
}
.st-spark i {
    flex: 1;
    min-height: 3px;
    height: calc(var(--h, 0) * 100%);
    border-radius: 2px;
    background: var(--raise);
}
.st-spark i.on {
    background: color-mix(in srgb, var(--st-good) 80%, transparent);
}
.st-tags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.st-tag {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--star-soft);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.st-tag:hover {
    color: var(--star);
}
.st-tag[aria-pressed='true'] {
    border-color: var(--st-accent);
    background: color-mix(in srgb, var(--st-accent) 16%, transparent);
    color: var(--star);
}

.st-notes-body {
    display: grid;
    grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin-top: 16px;
}
.st-notes-side {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 10px;
}
.st-search {
    flex: none;
}
.st-note-list {
    display: grid;
    gap: 8px;
    max-height: min(68vh, 720px);
    margin: 0;
    padding: 2px;
    overflow-y: auto;
    list-style: none;
}
.st-note-card {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--note);
    background: color-mix(in srgb, var(--note) 6%, var(--ink));
    color: var(--star);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.15s,
        transform 0.15s;
}
.st-note-card:hover {
    border-color: color-mix(in srgb, var(--note) 45%, var(--line));
    transform: translateY(-1px);
}
.st-note-card[aria-current='true'] {
    border-color: var(--note);
    box-shadow: 0 0 0 1px var(--note);
}
.st-note-card strong {
    overflow: hidden;
    font-size: 14.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-note-snippet {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    color: var(--star-soft);
    white-space: pre-line;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.st-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 11.5px;
    color: var(--haze);
}
.st-note-tag {
    color: var(--note);
}
.st-note-empty {
    display: grid;
    gap: 4px;
    padding: 28px 16px;
    border-radius: 12px;
    border: 1px dashed var(--line-strong);
    text-align: center;
    font-size: 13px;
    color: var(--haze);
}
.st-note-empty strong {
    color: var(--star);
    font-size: 14px;
}

.st-editor {
    display: grid;
    gap: 10px;
    padding: clamp(16px, 2.6vw, 24px);
    border-radius: var(--st-radius);
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow:
        inset 0 3px 0 var(--note, var(--st-accent)),
        var(--shadow-card);
}
.st-editor-empty {
    place-items: center;
    align-content: center;
    min-height: 320px;
    border-style: dashed;
    box-shadow: none;
    text-align: center;
    color: var(--haze);
    font-size: 13.5px;
}
.st-editor-empty strong {
    color: var(--star);
    font-size: 15px;
}
.st-editor-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.st-icon-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: none;
    color: var(--star);
    cursor: pointer;
}
.st-editor-back {
    display: none;
}
.st-colors {
    display: flex;
    gap: 8px;
}
.st-color {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--ink);
    background: var(--note);
    box-shadow: 0 0 0 1px var(--line-strong);
    cursor: pointer;
}
.st-color[aria-checked='true'] {
    box-shadow: 0 0 0 2px var(--note);
}
.st-color:disabled {
    cursor: default;
    opacity: 0.5;
}
.st-save {
    margin-left: auto;
    overflow: hidden;
    font-size: 12.5px;
    color: var(--haze);
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-save.error {
    color: var(--verdict);
    white-space: normal;
}
.st-conflict {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.st-conflict span {
    flex: 1 1 220px;
}
#st-editor-alert:empty {
    display: none;
}
#st-editor-alert .st-warn {
    margin-top: 0;
}
.st-note-title {
    width: 100%;
    padding: 4px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    color: var(--star);
    font: inherit;
    font-size: clamp(19px, 2.4vw, 23px);
    font-weight: 700;
    letter-spacing: -0.02em;
    outline: none;
}
.st-note-title::placeholder,
.st-note-body::placeholder {
    color: var(--haze);
}
.st-note-body {
    width: 100%;
    min-height: 380px;
    padding: 0 2px;
    border: 0;
    resize: vertical;
    background: none;
    background-image: linear-gradient(transparent calc(1.8em - 1px), var(--line) 1.8em);
    background-size: 100% 1.8em;
    background-attachment: local;
    color: var(--star);
    font: inherit;
    font-size: 15.5px;
    line-height: 1.8;
    outline: none;
}
.st-note-body.is-typing {
    caret-color: transparent;
    cursor: progress;
}
.st-note-body:disabled,
.st-note-title:disabled {
    opacity: 0.6;
}
.st-editor-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.st-counter {
    font-size: 12px;
    color: var(--haze);
    font-variant-numeric: tabular-nums;
}
.st-editor-acts {
    display: flex;
    gap: 8px;
}
.st-danger-text {
    color: var(--verdict);
}

.st-vault-change {
    display: grid;
    gap: 12px;
    max-width: 420px;
    margin-top: 16px;
}
.st-vault-change .btn {
    justify-self: start;
}
.st-vault-change .st-warn {
    margin-top: 0;
}
.st-reset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.st-reset p {
    flex: 1 1 280px;
    font-size: 13.5px;
    color: var(--star-soft);
}
.st-gap {
    margin-top: 14px;
}
.st-vault-settings .loading {
    justify-content: flex-start;
    padding: 24px 0;
}

@media (max-width: 1040px) {
    .st-insights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .st-activity {
        grid-column: span 2;
    }
}

@media (max-width: 860px) {
    .st-notes-body {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-notes-side {
        position: static;
    }
    .st-note-list {
        max-height: none;
        overflow: visible;
    }
    .st-notes:not(.is-editing) .st-editor-slot,
    .st-notes.is-editing .st-notes-side,
    .st-notes.is-editing #st-notes-insights {
        display: none;
    }
    .st-editor-back {
        display: grid;
    }
    .st-note-body {
        min-height: 52vh;
    }
}

@media (max-width: 720px) {
    .st-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row dense;
        gap: 8px;
    }
    .st-insight {
        padding: 12px 14px;
    }
    .st-notes-acts {
        width: 100%;
    }
    .st-notes-acts .btn {
        flex: 1;
        justify-content: center;
    }
    .st-colors {
        gap: 6px;
    }
}

/* ---------- 스터디 그룹 ---------- */

.st-groups > * + *,
.st-group-section > * + * {
    margin-top: 16px;
}
.st-group-gate .st-vault {
    margin-top: 4px;
}
.st-group-form {
    display: grid;
    gap: 14px;
}
.st-group-form h3,
.st-group-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    letter-spacing: -0.02em;
}
.st-group-form > .st-warn {
    margin-top: 0;
}
.st-group-form > .btn {
    justify-self: start;
}
.st-group-form .st-list {
    margin-top: 0;
}
.st-form-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.st-choice {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}
.st-choice legend {
    margin-bottom: 6px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--star-soft);
}
.st-choice label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    font-size: 14px;
    cursor: pointer;
}
.st-choice label:has(input:checked) {
    border-color: var(--st-accent);
    background: color-mix(in srgb, var(--st-accent) 10%, var(--panel));
}
.st-choice input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--st-accent);
}

.st-bar {
    display: block;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--raise);
}
.st-bar i {
    display: block;
    width: calc(var(--fill, 0) * 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--st-accent), var(--st-good));
    transition: width 0.4s ease;
}
.st-bar.is-high i {
    background: var(--caution);
}
.st-group-quota {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.st-quota-item {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
}
.st-quota-item span {
    font-size: 12.5px;
    color: var(--haze);
}
.st-quota-item strong {
    font-size: clamp(16px, 2vw, 19px);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.st-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-group-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 14px;
    width: 100%;
    height: 100%;
    padding: 16px;
    border-radius: var(--st-radius);
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
    color: var(--star);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.15s,
        transform 0.15s;
}
.st-group-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}
.st-group-card.is-keyless {
    border-style: dashed;
}
.st-group-badge {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        hsl(var(--hue, 220) 70% 62%),
        hsl(calc(var(--hue, 220) + 40) 70% 46%)
    );
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
}
.st-group-badge.lg {
    width: 52px;
    height: 52px;
    font-size: 21px;
}
.st-group-card-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.st-group-card-body strong {
    overflow: hidden;
    font-size: 15.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-group-card-meta {
    font-size: 12.5px;
    color: var(--haze);
}
.st-group-card-tags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.st-chip.warn {
    border-color: color-mix(in srgb, var(--caution) 50%, transparent);
    color: var(--caution);
}
.st-role-owner,
.st-role-manager {
    border-color: color-mix(in srgb, var(--st-accent) 45%, transparent);
    color: var(--st-accent);
}

.st-group-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.st-group-title {
    min-width: 0;
}
.st-group-title h2 {
    overflow: hidden;
    font-size: clamp(21px, 3vw, 27px);
    letter-spacing: -0.03em;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-seg {
    display: flex;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin-top: 18px;
    padding: 4px;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
}
.st-seg button {
    flex: none;
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--haze);
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
}
.st-seg button:hover {
    color: var(--star);
}
.st-seg button[aria-selected='true'] {
    background: var(--ink);
    color: var(--star);
    box-shadow: 0 0 0 1px var(--line-strong);
}
.st-group-section {
    margin-top: 16px;
}

.st-upload {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: var(--st-radius);
    border: 1.5px dashed var(--line-strong);
    background: color-mix(in srgb, var(--st-accent) 4%, var(--ink));
    transition:
        border-color 0.15s,
        background 0.15s;
}
.st-upload.is-over {
    border-color: var(--st-accent);
    background: color-mix(in srgb, var(--st-accent) 12%, var(--ink));
}
.st-caption {
    max-width: 520px;
}
.st-upload-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.st-upload-acts .btn {
    gap: 6px;
}
.st-upload-note {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--panel);
}
@media (hover: hover) and (pointer: fine) {
    .st-camera {
        display: none;
    }
}
@media (hover: none), (pointer: coarse) {
    .st-drop-hint {
        display: none;
    }
}
.st-uploads {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-uploads:empty {
    display: none;
}
.st-upload-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--ink);
    font-size: 13.5px;
}
.st-upload-item .spin {
    width: 14px;
    height: 14px;
}
.st-upload-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--haze);
}
.st-upload-item.is-done .st-upload-dot {
    background: var(--st-good);
}
.st-upload-item.is-error {
    border-color: color-mix(in srgb, var(--verdict) 40%, transparent);
}
.st-upload-item.is-error .st-upload-dot {
    background: var(--verdict);
}
.st-upload-name {
    flex: 1 1 140px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.st-upload-status {
    color: var(--haze);
}
.st-upload-item.is-error .st-upload-status {
    flex-basis: 100%;
    color: var(--verdict);
}
.st-upload-item .st-upload-acts {
    gap: 6px;
}
.st-group-storage {
    display: grid;
    gap: 6px;
    max-width: 520px;
    font-size: 13px;
    color: var(--haze);
}
.st-photo-empty:empty {
    display: none;
}

.st-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-photo-grid:empty {
    display: none;
}
.st-photo-cell.is-new {
    animation: st-photo-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes st-photo-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
}
.st-photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: linear-gradient(110deg, var(--panel) 30%, var(--raise) 50%, var(--panel) 70%);
    background-size: 220% 100%;
    animation: st-shimmer 1.4s linear infinite;
    cursor: zoom-in;
}
.st-photo-cell.is-ready .st-photo,
.st-photo-cell.is-broken .st-photo {
    animation: none;
}
.st-photo-cell.is-broken .st-photo {
    background: var(--panel);
}
.st-photo-cell.is-broken .st-photo::after {
    content: '!';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--caution);
    font-size: 20px;
    font-weight: 700;
}
@keyframes st-shimmer {
    to {
        background-position: -120% 0;
    }
}
.st-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}
.st-photo-cell.is-ready img {
    opacity: 1;
}
.st-photo:hover img {
    transform: scale(1.04);
}
.st-photo:focus-visible {
    outline: 2px solid var(--st-accent);
    outline-offset: 2px;
}

.st-member-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-member {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
}
.st-member:last-child {
    border-bottom: 0;
}
.st-member-body {
    display: grid;
    flex: 1 1 160px;
    gap: 2px;
    min-width: 0;
}
.st-member-body strong {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    font-size: 14.5px;
    white-space: nowrap;
}
.st-member-meta {
    font-size: 12px;
    color: var(--haze);
}
.st-select {
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--star);
    font: inherit;
    font-size: 13.5px;
}
.st-select:focus {
    outline: none;
    border-color: var(--st-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-accent) 18%, transparent);
}

.st-link-card {
    display: grid;
    gap: 14px;
}
.st-link-card .st-setting h3 {
    font-size: 17px;
}
.st-linkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.st-link-input {
    flex: 1 1 260px;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    color: var(--star-soft);
    font: inherit;
    font-size: 13px;
    font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
.st-linkbox .btn {
    gap: 6px;
}
.st-link-card .st-warn,
.st-danger-zone .st-reset {
    margin-top: 0;
}
.st-danger-zone .st-reset {
    padding-top: 0;
    border-top: 0;
}

/* ---------- 사진 크게 보기 ---------- */

dialog.st-lightbox {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(3, 5, 10, 0.96);
    color: #f4f6fb;
    box-shadow: none;
}
dialog.st-lightbox[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    animation: st-lb-in 0.2s ease;
}
dialog.st-lightbox::backdrop {
    background: rgba(3, 5, 10, 0.7);
}
@keyframes st-lb-in {
    from {
        opacity: 0;
    }
}
.st-lb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
}
.st-lb-count {
    font-size: 13px;
    color: rgba(244, 246, 251, 0.7);
    font-variant-numeric: tabular-nums;
}
.st-lb-acts {
    display: flex;
    gap: 8px;
}
.st-lightbox .st-icon-btn {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #f4f6fb;
}
.st-lightbox .st-icon-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}
.st-lightbox .st-icon-btn[hidden] {
    display: none;
}
.st-lb-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 0 14px;
    touch-action: pan-y pinch-zoom;
}
.st-lb-figure {
    position: relative;
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 0;
    margin: 0;
}
.st-lb-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    object-fit: contain;
}
.st-lb-img:not([src]) {
    display: none;
}
.st-lb-status {
    font-size: 14px;
    color: rgba(244, 246, 251, 0.75);
}
.st-lb-text {
    display: grid;
    gap: 4px;
    padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    text-align: center;
}
.st-lb-caption {
    font-size: 15px;
    font-weight: 600;
}
.st-lb-caption:empty {
    display: none;
}
.st-lb-info {
    font-size: 12.5px;
    color: rgba(244, 246, 251, 0.65);
}

/* ---------- 공유 링크 페이지 ---------- */

.st-share-main {
    max-width: 1040px;
}
.st-share > * + * {
    margin-top: 16px;
}
.st-share-title {
    font-size: clamp(22px, 3.4vw, 30px);
    letter-spacing: -0.03em;
}
.st-share-unlock {
    margin-top: clamp(8px, 4vw, 40px);
}
.st-share-join .btn {
    gap: 6px;
}
.study-share-page .crumbs a {
    color: inherit;
}

@media (max-width: 720px) {
    .st-group-quota {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .st-quota-item.wide {
        grid-column: 1 / -1;
    }
    .st-group-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }
    .st-photo {
        border-radius: 8px;
    }
    .st-seg {
        width: 100%;
    }
    .st-seg button {
        flex: 1 0 auto;
    }
    .st-lb-stage {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 6px;
    }
    .st-lb-stage > .st-icon-btn {
        display: none;
    }
    .st-tabs button {
        font-size: 10.5px;
    }
    .st-tabs button span {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .st-share-main {
        padding-bottom: clamp(48px, 7vw, 88px);
    }
    .st-share-foot {
        padding-bottom: 20px;
    }
}

/* ---------- 알림(맨 위)·경고 띠 ---------- */

.st-banner-warn {
    border-color: color-mix(in srgb, var(--caution) 45%, transparent);
    background: color-mix(in srgb, var(--caution) 10%, var(--ink));
    color: var(--star);
}
.st-banner-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.st-banner-text .ico {
    color: var(--caution);
}
.st-alerts:empty {
    display: none;
}
/* 맨 위에 붙는 경고(이벤트 시간이 쌓이지 않을 때). 헤더(60px) 아래에 붙어 스크롤해도 보인다. */
.st-pinned {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 72px);
    z-index: 30;
    margin-bottom: 18px;
}
.st-pinned:empty {
    display: none;
}
.st-banner-danger {
    margin-top: 0;
    padding: 16px 18px;
    border: 2px solid var(--verdict);
    background: color-mix(in srgb, var(--verdict) 14%, var(--ink));
    color: var(--star);
    font-size: 15px;
    box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--verdict) 85%, transparent);
}
/* 열려 있는 공부 확인(노란 알림): 아직 쌓이고 있지만 마감까지 눌러야 한다. */
.st-banner-caution {
    margin-top: 0;
    padding: 16px 18px;
    border: 2px solid var(--caution);
    background: color-mix(in srgb, var(--caution) 14%, var(--ink));
    color: var(--star);
    font-size: 15px;
    box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--caution) 85%, transparent);
}
.st-alert-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.st-alert-title {
    font-size: clamp(17px, 2.4vw, 20px);
    font-weight: 800;
    color: var(--verdict);
}
.st-banner-caution .st-alert-title {
    color: var(--caution);
}
.st-alerts {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.st-top-acts {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.st-top-acts .st-switch {
    min-width: min(320px, 70vw);
}
.st-tour-open .ico {
    width: 16px;
    height: 16px;
}

/* 그룹 열쇠 바꾸기 */
.st-rotate {
    border-color: color-mix(in srgb, var(--caution) 40%, var(--line));
}
.st-rotate h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.st-rotate-link {
    display: grid;
    gap: 12px;
}
.st-rotate-link[hidden] {
    display: none;
}

/* ---------- 사용법(튜토리얼) ----------
 * 스터디 페이지 대화상자와 가이드 본문이 같이 쓴다. 장면은 실제 화면 부품(.st-ring, .st-eq, .st-station,
 * .st-bars, .st-heat, .st-photo-cell)과 그 애니메이션을 그대로 쓰고, 여기서는 틀·배치·등장 연출만 정한다. */

.st-tour {
    --st-accent: var(--signal);
    --st-good: var(--clear);
    --st-radius: 18px;
    container: st-tour / inline-size;
    display: grid;
    gap: 18px;
    color: var(--star);
}
.dark-ui .st-tour {
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -34px rgba(0, 0, 0, 0.8);
}
.st-tour-head {
    display: flex;
    align-items: center;
    gap: 10px 16px;
}
.st-tour-kicker {
    flex: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--st-accent);
}
.st-tour-steps {
    display: flex;
    flex: 1;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.st-tour-steps li {
    flex: 1;
    min-width: 0;
}
.st-tour-dot {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--haze);
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}
.st-tour-dot::before {
    content: '';
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background 0.3s;
}
.st-tour-dot:hover {
    color: var(--star-soft);
}
.st-tour-dot[aria-current='step'] {
    color: var(--star);
    font-weight: 600;
}
.st-tour-dot[aria-current='step']::before,
.st-tour-dot.is-done::before {
    background: var(--st-accent);
}
.st-tour-dot span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-tour-close .ico {
    width: 16px;
    height: 16px;
}
.st-tour-body {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: center;
    gap: clamp(18px, 3vw, 32px);
}
.st-tour-stage {
    display: grid;
    align-content: center;
    min-height: 372px;
    padding: 16px;
    overflow: hidden;
    border-radius: var(--st-radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(
            120% 90% at 0% 0%,
            color-mix(in srgb, var(--st-accent) 12%, transparent),
            transparent 62%
        ),
        var(--panel);
}
.st-tour-copy {
    display: grid;
    align-content: center;
    gap: 10px;
}
.st-tour-count {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--st-accent);
    font-variant-numeric: tabular-nums;
}
.st-tour-title {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 26px);
    line-height: 1.3;
    letter-spacing: -0.03em;
}
.st-tour-text {
    display: grid;
    gap: 8px;
}
.st-tour-text p {
    margin: 0;
    font-size: 14.5px;
    color: var(--star-soft);
}
.st-tour-text .st-warn {
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--star);
}
.st-tour-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.st-tour-once {
    margin: 0;
    max-width: 52ch;
    font-size: 12.5px;
    color: var(--haze);
}
.st-tour-acts {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.st-tour-acts [hidden] {
    display: none;
}

dialog.st-tour-dlg {
    width: min(920px, calc(100% - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 0;
    overflow-y: auto;
    border-radius: 22px;
}
dialog.st-tour-dlg[open] {
    animation: st-lb-in 0.25s ease-out;
}
dialog.st-tour-dlg::backdrop {
    background: rgba(4, 8, 20, 0.62);
    backdrop-filter: blur(6px);
}
.st-tour-dlg .st-tour {
    --st-tour-pad: clamp(18px, 3vw, 28px);
    padding: var(--st-tour-pad);
}
/* 화면이 낮아 대화상자가 스크롤돼도 이전·다음 단추는 늘 보이게 아래에 붙인다. */
.st-tour-dlg .st-tour-foot {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin: 0 calc(-1 * var(--st-tour-pad)) calc(-1 * var(--st-tour-pad));
    padding: 14px var(--st-tour-pad) var(--st-tour-pad);
    background: var(--ink);
}

/* 가이드 본문 */
.st-tour-host {
    margin-top: 24px;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: 0 30px 80px -42px rgba(2, 4, 12, 0.7);
}
.st-tour-host:empty {
    display: none;
}

/* 장면 공통 */
.st-tour-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--ink);
    box-shadow: var(--shadow-card);
    animation: st-photo-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.st-tour-card > .st-eyebrow {
    margin: 0;
}
.st-tour-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
/* 스터디룸의 타이머 칩(.chips.st-chips)과 같은 모양 */
.st-tour-chips button {
    height: 34px;
    padding: 0 13px;
    border-radius: 7px;
    border: 1px solid var(--line-strong);
    background: var(--ink);
    color: var(--haze);
    font: inherit;
    font-size: 13px;
    transition: all 0.15s;
}
.st-tour-chips button[aria-pressed='true'] {
    border-color: color-mix(in srgb, var(--st-accent) 45%, transparent);
    background: color-mix(in srgb, var(--st-accent) 8%, transparent);
    color: var(--st-accent);
}
.st-tour-chips button[aria-pressed='true']::before {
    content: '✓ ';
    font-size: 11px;
}
.st-tour-go {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.st-tour .btn {
    transition:
        transform 0.15s,
        background 0.2s,
        box-shadow 0.2s;
}
.st-tour-stage .btn.is-pressed {
    transform: scale(0.95);
}
.st-tour-toast {
    margin: 0;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--star);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 0.3s,
        transform 0.3s;
}
.st-tour-toast.show {
    opacity: 1;
    transform: none;
}

/* 스터디 중 */
.st-tour-live-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.st-tour-live-body {
    display: grid;
    grid-template-columns: minmax(0, 156px) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    transition:
        opacity 0.5s,
        filter 0.5s;
}
.st-tour .st-ring {
    max-width: 156px;
}
.st-tour .st-ring-time {
    font-size: 30px;
}
.st-tour .st-ring-time.is-text {
    font-size: 19px;
}
.st-tour .st-live-info {
    gap: 12px;
}
.st-tour .st-now {
    gap: 10px;
    padding: 10px 12px;
}
.st-tour .st-now-emoji {
    font-size: 24px;
}
.st-tour .st-now strong {
    font-size: 15px;
}
.st-tour-pop {
    animation: st-photo-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.st-ring.is-ringing .st-ring-bar {
    animation: st-tour-alarm 0.6s ease-in-out 3;
}
@keyframes st-tour-alarm {
    50% {
        stroke: var(--caution);
        stroke-width: 16;
    }
}
.st-tour-status {
    min-height: 1.6em;
    margin: 0;
    font-size: 13px;
    color: var(--star-soft);
    opacity: 0;
    transition: opacity 0.3s;
}
.st-tour-status.show {
    opacity: 1;
}
.st-tour-live.is-ended .st-tour-live-body {
    opacity: 0.4;
    filter: saturate(0.3);
}
.st-tour-live.is-ended .st-eq i {
    animation-play-state: paused;
}
.st-tour-live.is-ended .st-badge.on {
    color: var(--haze);
    border-color: var(--line-strong);
    background: none;
}
.st-tour-live.is-ended .st-badge.on::before {
    animation: none;
}

/* 이벤트 */
.st-tour-event .st-banner {
    margin-top: 0;
    padding: 10px 12px;
    font-size: 13px;
}
.st-tour-event .st-tour-live-head {
    flex-wrap: wrap;
}
.st-tour .st-today-line {
    font-size: 13px;
}

/* 기록·순위 */
.st-tour-records .st-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.st-tour-records .st-stat {
    padding: 10px 12px;
    box-shadow: none;
}
.st-tour-records .st-stat strong {
    margin-top: 2px;
    font-size: 18px;
}
.st-tour .st-bars {
    max-height: 96px;
    margin-top: 0;
}
.st-tour .st-bars rect {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: st-tour-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes st-tour-grow {
    from {
        transform: scaleY(0);
    }
}
.st-tour .st-heat-wrap {
    max-width: none;
    overflow: hidden;
}
.st-tour .st-heat-col i {
    animation: st-tour-cell 0.35s ease-out backwards;
    animation-delay: calc(var(--i, 0) * 45ms + 450ms);
}
@keyframes st-tour-cell {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
}
.st-tour .st-rank-me {
    position: static;
    margin-top: 0;
}

/* 노트·그룹 */
.st-tour-note {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--note);
    background: var(--ink);
}
.st-tour-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--st-good);
}
.st-tour-lock .ico {
    width: 14px;
    height: 14px;
}
.st-tour-note-title {
    margin: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.st-tour .st-note-body {
    height: calc(1.8em * 3 + 4px);
    min-height: 0;
    overflow: hidden;
    resize: none;
    font-size: 14px;
}
.st-tour-photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.st-tour-photos .st-photo {
    cursor: default;
}
.st-tour-shot {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.st-photo-cell.is-ready .st-tour-shot {
    opacity: 1;
}
.st-tour-shot.s1 {
    background:
        repeating-linear-gradient(180deg, transparent 0 13px, rgba(40, 70, 130, 0.2) 13px 14px),
        linear-gradient(160deg, #fdf8ec, #efe2c6);
}
.st-tour-shot.s2 {
    background:
        radial-gradient(circle at 70% 30%, #ffe08a 0 16%, transparent 17%),
        linear-gradient(200deg, #8ec5ff, #4f7cf0 70%, #3b5bc2);
}
.st-tour-shot.s3 {
    background:
        repeating-linear-gradient(90deg, transparent 0 15px, rgba(20, 90, 60, 0.14) 15px 16px),
        repeating-linear-gradient(0deg, transparent 0 15px, rgba(20, 90, 60, 0.14) 15px 16px),
        linear-gradient(135deg, #effaf3, #c3ead3);
}

/* 사용법은 화면 너비가 아니라 자기 너비를 본다(가이드 본문 칸은 대화상자보다 좁다). */
@container st-tour (max-width: 700px) {
    .st-tour-head {
        flex-wrap: wrap;
    }
    .st-tour-steps {
        order: 3;
        flex-basis: 100%;
    }
    .st-tour-close {
        margin-left: auto;
    }
    .st-tour-dot {
        font-size: 11px;
    }
    .st-tour-body {
        grid-template-columns: minmax(0, 1fr);
    }
    /* 좁으면 설명을 먼저 읽고 그 아래에서 움직이는 화면을 본다. */
    .st-tour-copy {
        order: -1;
    }
    .st-tour-stage {
        min-height: 0;
        padding: 12px;
    }
    .st-tour-live-body {
        grid-template-columns: minmax(0, 118px) minmax(0, 1fr);
        gap: 12px;
    }
    .st-tour .st-ring-time {
        font-size: 24px;
    }
    .st-tour-once {
        order: 2;
    }
}
@container st-tour (max-width: 440px) {
    .st-tour-dot span {
        display: none;
    }
    .st-tour .st-stations {
        grid-template-columns: minmax(0, 1fr);
    }
    .st-tour .st-station small,
    .st-tour .st-now small,
    .st-tour .st-ring-center small {
        display: none;
    }
    .st-tour-live-body {
        grid-template-columns: minmax(0, 108px) minmax(0, 1fr);
    }
}
@media (max-width: 760px) {
    .st-top-acts {
        width: 100%;
    }
    .st-top-acts .st-switch {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}
