:root {
    color-scheme: light;
    --page-bg: #fcfcff;
    --page-bg-soft: #f5f6fa;
    --page-bg-deep: #f1f2f8;
    --sheet: #ffffff;
    --sheet-muted: #f7f7f7;
    --sheet-purple: #f8f2ff;
    --ink: #000000;
    --ink-2: #4a4454;
    --ink-3: #8e8e93;
    --line-soft: #e7e7e9;
    --line-strong: #efeefd;
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.12);
    --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.18);
    --shadow-deep: 0 20px 40px rgba(85, 38, 136, 0.1);
    --purple: #8c55f2;
    --purple-soft: #f5f0ff;
    --purple-ink: #8c7e9f;
    --mint: #f3fafa;
    --mint-line: rgba(152, 210, 199, 0.4);
    --rose: #fff4f4;
    --rose-line: rgba(250, 161, 161, 0.4);
    --nav-black: #000000;
    --nav-active: #2b2b2b;
    --safe-bottom: max(18px, env(safe-area-inset-bottom, 18px));
    --font-ui: "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", system-ui, sans-serif;
    --font-serif: "Playfair Display", Georgia, serif;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page-bg: #111216;
    --page-bg-soft: #16181e;
    --page-bg-deep: #1b1e26;
    --sheet: #1a1d24;
    --sheet-muted: #232731;
    --sheet-purple: #2a2234;
    --ink: #f7f8fb;
    --ink-2: #d4d7dd;
    --ink-3: #959ca8;
    --line-soft: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.28);
    --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-deep: 0 20px 40px rgba(0, 0, 0, 0.3);
    --purple-soft: #312544;
    --purple-ink: #d7c5ef;
    --mint: rgba(146, 209, 197, 0.1);
    --rose: rgba(250, 161, 161, 0.1);
    --nav-black: #000000;
    --nav-active: #2b2b2b;
}

* {
    box-sizing: border-box;
}

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

html {
    background: linear-gradient(180deg, #eef1f7 0%, #e8edf6 100%);
}

html[data-theme="dark"] {
    background: linear-gradient(180deg, #0d0f13 0%, #090b10 100%);
}

body {
    margin: 0;
    background: transparent;
    color: var(--ink);
    font: 15px/1.5 var(--font-ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

button,
input,
textarea {
    font: inherit;
}

button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

img {
    display: block;
    max-width: 100%;
}

.shell {
    width: min(390px, 100vw);
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    background: var(--page-bg);
    overflow: hidden;
}

.shell--fluid {
    width: 100%;
    max-width: none;
    box-shadow: none !important;
}

@media (min-width: 430px) {
    .shell {
        box-shadow: 0 30px 80px rgba(18, 22, 29, 0.12);
    }
}

.page,
.screen {
    min-height: 100vh;
    position: relative;
}

.screen {
    padding: 16px 16px calc(var(--safe-bottom) + 12px);
}

.screen--center {
    display: grid;
    place-items: center;
}

.screen-panel {
    background: var(--sheet);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid var(--line-soft);
}

.screen-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 0;
}

.topbar-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.topbar-actions {
    flex-shrink: 0;
}

.eyebrow,
.context-chip,
.tab-pill,
.study-overview-card__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 28px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}

.eyebrow {
    background: var(--sheet-purple);
    color: var(--purple-ink);
    font-weight: 700;
}

.page-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.page-subtitle,
.card-copy,
.hint,
.row-copy {
    margin: 0;
    color: var(--ink-3);
}

.context-row,
.tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.context-chip {
    background: var(--sheet-muted);
    color: var(--ink-3);
    font-weight: 590;
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button {
    min-height: 48px;
    border-radius: 999px;
    transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.icon-button:active,
.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.deck-footer-button:active,
.practice-action-card__button:active,
.promo-card__button:active,
.apply-preview-card__button:active,
.concept-actions__pill:active,
.concept-actions__circle:active,
.learn-upload-pill:active,
.learn-plus:active,
.learn-quick-action:active,
.folder-hero:active,
.folder-list__item:active,
.folders-fab:active,
.concept-flip-bar:active {
    transform: scale(0.98);
}

.icon-button {
    width: 48px;
    height: 48px;
    background: var(--sheet-muted);
    color: var(--ink);
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.deck-footer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-weight: 590;
}

.primary-button,
.deck-footer-button {
    background: #000;
    color: #fff;
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.secondary-button {
    background: var(--sheet-muted);
    color: var(--ink);
}

.ghost-button {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line-soft);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.card,
.hero-panel {
    background: var(--sheet);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: 20px;
    border: 1px solid var(--line-soft);
}

.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-panel h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hero-panel p {
    margin: 0;
    color: var(--ink-3);
}

.option-list,
.screen-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-row,
.survey-option,
.list-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--sheet-muted);
    border-radius: 20px;
}

.option-row.is-active,
.survey-option.is-active {
    background: var(--sheet);
    box-shadow: inset 0 0 0 1px var(--line-soft);
}

.option-row-main,
.survey-option-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    min-width: 0;
}

.row-title {
    margin: 0;
    color: var(--ink);
    font-weight: 590;
}

.textarea,
.input {
    width: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    padding: 16px;
    background: var(--sheet);
    color: var(--ink);
    outline: none;
}

.textarea {
    min-height: 140px;
    resize: vertical;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--sheet-muted);
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: #000;
}

.footer-bar {
    margin-top: 16px;
}

.launcher-grid {
    display: grid;
    gap: 12px;
}

.screen-link {
    width: 100%;
    text-align: left;
}

.loading-state,
.error-state {
    min-height: 240px;
    display: grid;
    place-items: center;
    text-align: center;
}

.screen--loading {
    display: flex;
    min-height: 100vh;
}

.loading-layout {
    width: 100%;
    padding: 20px clamp(20px, 5.128vw, 40px) 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.loading-layout__label {
    margin: 0;
    color: transparent;
    height: 0;
}

.loading-card {
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.loading-card--hero {
    height: 100px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(242, 248, 255, 1) 0%, rgba(234, 243, 255, 1) 100%);
}

.loading-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.loading-row--folder {
    height: 83px;
    padding: 18px 18px 0 17px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.loading-row__side {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton--title {
    height: 30px;
    border-radius: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 100%);
}

.skeleton--line {
    height: 14px;
}

.skeleton--button {
    width: 60px;
    height: 20px;
    margin-top: 2px;
    border-radius: 999px;
}

.skeleton--pill {
    width: 56px;
    height: 18px;
}

.skeleton--dots {
    width: 6px;
    height: 26px;
    border-radius: 999px;
}

.skeleton--meta {
    margin-top: 4px;
}

.skeleton {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.06) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

html[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 100%);
    background-size: 200% 100%;
}

.hidden {
    display: none !important;
}

.ios-status {
    height: 54px;
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
}

.ios-status--light {
    color: #fff;
}

.ios-status--dark {
    color: var(--ink);
}

.ios-status__icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ios-status__signal,
.ios-status__wifi,
.ios-status__battery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ios-status__signal {
    width: 16px;
    height: 10px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: skewX(-18deg);
    opacity: 0.9;
}

.ios-status__wifi {
    width: 14px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-radius: 999px 999px 0 0;
    opacity: 0.9;
}

.ios-status__battery {
    width: 24px;
    height: 12px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    position: relative;
}

.ios-status__battery::after {
    content: "";
    position: absolute;
    top: 3px;
    right: -3px;
    width: 2px;
    height: 4px;
    border-radius: 2px;
    background: currentColor;
}

.ios-status__battery span {
    width: 17px;
    height: 7px;
    border-radius: 2px;
    background: currentColor;
}

.ios-back-button {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ios-back-button--dark {
    background: var(--page-bg-soft);
    color: var(--ink);
}

.ios-back-button--light {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    backdrop-filter: blur(12px);
}

.ios-back-button__glyph {
    font-size: 28px;
    line-height: 1;
    margin-left: -2px;
}

.home-indicator {
    display: flex;
    justify-content: center;
    padding: 8px 0 calc(var(--safe-bottom) - 2px);
}

.home-indicator span {
    width: 134px;
    height: 5px;
    border-radius: 999px;
}

.home-indicator--light span {
    background: rgba(255, 255, 255, 0.92);
}

.home-indicator--dark span {
    background: rgba(0, 0, 0, 0.92);
}

.bottom-nav {
    background: var(--nav-black);
    padding: 18px 20px 10px;
}

.bottom-nav__active {
    display: none;
}

.bottom-nav__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bottom-nav__item {
    min-height: 70px;
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.76);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 590;
}

.bottom-nav__item.is-active {
    background: var(--nav-active);
    color: #fff;
}

.bottom-nav__label {
    line-height: 1;
}

.bottom-nav__icon {
    position: relative;
    width: 22px;
    height: 18px;
    display: inline-block;
}

.bottom-nav__icon--scan::before,
.bottom-nav__icon--learn::before,
.bottom-nav__icon--folders::before,
.bottom-nav__icon--folders::after {
    content: "";
    position: absolute;
    border-color: currentColor;
}

.bottom-nav__icon--scan::before {
    inset: 0;
    border: 1.8px solid currentColor;
    border-radius: 7px;
}

.bottom-nav__icon--learn::before {
    left: 1px;
    right: 1px;
    top: 2px;
    bottom: 2px;
    border-top: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
}

.bottom-nav__icon--folders::before {
    left: 0;
    right: 0;
    top: 5px;
    bottom: 0;
    border: 1.8px solid currentColor;
    border-radius: 5px;
}

.bottom-nav__icon--folders::after {
    left: 1px;
    top: 1px;
    width: 9px;
    height: 5px;
    border: 1.8px solid currentColor;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}

.page--learn {
    background: #000;
    color: #fff;
}

.learn-stage {
    position: relative;
    min-height: max(844px, 100svh);
    overflow: hidden;
    background: #0f1015;
}

.learn-stage::before,
.learn-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.learn-stage::before {
    background: url("../figma/learn-bg.png") center top / cover no-repeat;
    transform: scale(1.03);
    filter: blur(3.55px);
}

.learn-stage::after {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 76%, rgba(0, 0, 0, 0.45) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0) 30%);
}

.learn-stage>* {
    position: relative;
    z-index: 1;
}

.learn-upload-row {
    position: absolute;
    top: max(20px, calc(env(safe-area-inset-top, 0px) + 20px));
    right: 24px;
}

.learn-upload-pill {
    min-height: 35px;
    padding: 0 16px 0 10px;
    border-radius: 32.5px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 590;
}

.learn-upload-pill__icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.learn-upload-pill__label {
    white-space: nowrap;
}

.learn-upload-pill__arrow {
    position: relative;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
}

.learn-upload-pill__arrow::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 1.5px solid #fff;
    border-right: 1.5px solid #fff;
    transform: rotate(45deg);
}

.learn-plus {
    position: absolute;
    top: 276px;
    left: 50%;
    width: 62px;
    height: 61.5px;
    margin-left: -31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.learn-plus img {
    width: 100%;
    height: auto;
}

.learn-tagline {
    position: absolute;
    top: 350px;
    left: 50%;
    width: 285px;
    margin: 0;
    transform: translateX(-50%);
    text-align: center;
    font-size: 18px;
    line-height: 1.194;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.98);
}

.learn-quick-actions {
    position: absolute;
    top: 493px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
}

.learn-quick-action {
    position: relative;
    width: 64px;
    height: 48px;
    border-radius: 6.91px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(18px);
    border: 0.6px solid rgba(255, 255, 255, 0.3);
    background: rgba(218, 218, 218, 0.86);
}

.learn-quick-action--study,
.learn-quick-action--apply {
    width: 69.38px;
    height: 55.44px;
}

.learn-quick-action::before,
.learn-quick-action::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.82;
    filter: blur(20px);
}

.learn-quick-action--study::before {
    width: 46.96px;
    height: 46.98px;
    left: 39.5px;
    top: 15px;
    background: #3f85ff;
}

.learn-quick-action--study::after {
    width: 122.63px;
    height: 122.63px;
    left: -75.5px;
    top: -7.5px;
    background: #a188fe;
}

.learn-quick-action--practice::before {
    width: 55.4px;
    height: 54.2px;
    left: 36px;
    top: 22px;
    background: #adfff8;
}

.learn-quick-action--practice::after {
    width: 53.98px;
    height: 51.76px;
    left: -30px;
    top: -30px;
    background: #ffdc9b;
}

.learn-quick-action--apply::before {
    width: 56.48px;
    height: 55.84px;
    left: 35px;
    top: 28.5px;
    background: #dacaff;
}

.learn-quick-action--apply::after {
    width: 54.77px;
    height: 53.59px;
    left: -24px;
    top: -31.25px;
    background: #f8d7ff;
}

.learn-quick-action__label {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.193;
    background: linear-gradient(135deg, #6fb7ff 0%, #a270ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.learn-quick-action--study .learn-quick-action__label {
    margin-top: 15px;
}

.learn-quick-action--practice .learn-quick-action__label {
    margin-top: 15px;
    font-size: 14px;
    background: linear-gradient(135deg, #21af9d 0%, #af911c 78%);
    -webkit-background-clip: text;
    background-clip: text;
}

.learn-quick-action--apply .learn-quick-action__label {
    margin-top: 15px;
    background: linear-gradient(135deg, #7e7ae7 0%, #d4abdf 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.learn-subjects {
    position: absolute;
    top: 558px;
    left: 24px;
    right: 24px;
    display: flex;
    gap: 27px;
    overflow-x: auto;
    padding: 0 0 8px;
    scrollbar-width: none;
}

.learn-subjects::-webkit-scrollbar,
.deck-tabs::-webkit-scrollbar {
    display: none;
}

.learn-subject {
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 590;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.learn-subject.is-active {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.learn-bottom-actions {
    position: absolute;
    top: 608px;
    left: 50%;
    width: 240px;
    height: 60px;
    transform: translateX(-50%);
}

.learn-bottom-actions__art {
    width: 100%;
    height: 100%;
}

.learn-bottom-actions__hit {
    position: absolute;
    top: 0;
    background: transparent;
}

.learn-bottom-actions__hit--left,
.learn-bottom-actions__hit--right {
    width: 40px;
    height: 40px;
    top: 10px;
}

.learn-bottom-actions__hit--left {
    left: 0;
}

.learn-bottom-actions__hit--center {
    top: 0;
    left: 90px;
    width: 60px;
    height: 60px;
    border-radius: 999px;
}

.learn-bottom-actions__hit--right {
    right: 0;
}

.bottom-nav--learn {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
}

.folders-bottom {
    margin-top: 0;
}

.page--deck,
.page--concept,
.page--folders {
    background: var(--page-bg);
    color: var(--ink);
}

.deck-header,
.concept-header,
.folders-header {
    background: var(--sheet);
}

.deck-header {
    padding-bottom: 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.deck-header__toolbar,
.concept-header__toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px 0;
}

.deck-header__title,
.concept-header__title {
    flex: 1;
    margin: 0;
    margin-right: 44px;
    text-align: center;
    font-size: 18px;
    font-weight: 510;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.deck-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 24px 20px 0;
}

.deck-tab {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--sheet-muted);
    color: #aeaeb2;
    font-size: 12px;
    font-weight: 510;
    white-space: nowrap;
}

.deck-tab.is-active {
    background: var(--sheet-purple);
    color: var(--purple-ink);
    font-weight: 590;
}

.deck-content {
    padding: 18px 20px 24px;
}

.deck-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.deck-stack--apply {
    gap: 18px;
}

.study-overview-card,
.practice-overview-card,
.promo-card,
.practice-action-card,
.interactive-practice-card,
.interactive-feedback,
.apply-save-card {
    background: var(--sheet);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.study-overview-card {
    padding: 20px;
}

.study-overview-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.study-overview-card__title,
.practice-overview-card__title,
.interactive-practice-card__title,
.apply-scene__title,
.interactive-feedback__title,
.apply-save-card__title {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.study-overview-card__pill.is-mint {
    background: var(--mint);
    color: var(--ink-2);
}

.study-overview-card__pill.is-rose {
    background: var(--rose);
    color: var(--ink-2);
}

.study-overview-card__divider {
    margin: 16px 0;
    border-top: 2px dashed var(--line-soft);
}

.study-overview-card__copy {
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
}

.practice-overview-card {
    padding: 24px;
}

.practice-overview-card.is-plain {
    background: var(--sheet);
}

.practice-overview-card.is-success {
    background: linear-gradient(180deg, rgba(243, 250, 250, 0.3), rgba(243, 250, 250, 0.3)), var(--sheet);
    box-shadow: 0 2px 12px rgba(0, 87, 17, 0.2);
    border: 1px solid var(--mint-line);
}

.practice-overview-card.is-danger {
    background: linear-gradient(180deg, rgba(255, 250, 250, 0.3), rgba(255, 250, 250, 0.3)), var(--sheet);
    box-shadow: 0 2px 12px rgba(88, 0, 0, 0.2);
    border: 1px solid var(--rose-line);
}

.promo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.promo-card__art {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 70% 24%, #8c55f2 0, #8c55f2 18%, transparent 19%),
        radial-gradient(circle at 40% 42%, #e770ff 0, #e770ff 16%, transparent 17%),
        radial-gradient(circle at 68% 68%, #ffc31e 0, #ffc31e 10%, transparent 11%),
        linear-gradient(135deg, #f3f3ff 0%, #fff8dc 100%);
    box-shadow: inset 0 0 0 1px rgba(140, 85, 242, 0.18);
    flex-shrink: 0;
}

.promo-card__copy {
    flex: 1;
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.4;
}

.promo-card__button,
.folders-fab {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 24px;
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.practice-action-card {
    padding: 20px;
}

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

.practice-action-card__label {
    font-size: 14px;
    font-weight: 590;
    color: var(--ink-2);
}

.practice-action-card__button {
    min-width: 108px;
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 590;
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.practice-action-card__divider {
    border-top: 2px dashed var(--line-soft);
    margin: 16px 0;
}

.deck-footer-button {
    width: calc(100% - 30px);
    margin: 4px auto 0;
}

.apply-preview-card {
    min-height: 258px;
    padding: 16px;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.apply-preview-card::before,
.apply-preview-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.92;
}

.apply-preview-card--violet {
    background: linear-gradient(135deg, #d7d8e0 0%, #b5b5b5 100%);
}

.apply-preview-card--violet::before {
    width: 180px;
    height: 180px;
    top: -40px;
    left: -40px;
    background: rgba(140, 85, 242, 0.26);
}

.apply-preview-card--violet::after {
    width: 210px;
    height: 210px;
    right: -80px;
    bottom: -70px;
    background: rgba(255, 255, 255, 0.32);
}

.apply-preview-card--slate {
    background: linear-gradient(135deg, #d7d9df 0%, #bfbfbf 100%);
}

.apply-preview-card--slate::before {
    width: 220px;
    height: 220px;
    top: -80px;
    right: -50px;
    background: rgba(0, 0, 0, 0.08);
}

.apply-preview-card--slate::after {
    width: 170px;
    height: 170px;
    left: -40px;
    bottom: -60px;
    background: rgba(255, 255, 255, 0.28);
}

.apply-preview-card__status {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: #8c55f2;
    color: #eee2ff;
    font-size: 12px;
    font-weight: 510;
}

.apply-preview-card__content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 16px;
}

.apply-preview-card__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.apply-preview-card__copy {
    margin: 8px 0 0;
    color: rgba(0, 0, 0, 0.64);
    font-size: 12px;
}

.apply-preview-card__button {
    align-self: flex-end;
    min-width: 120px;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: 590;
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.page--folders {
    position: relative;
    min-height: 100vh;
    background: #fff;
}

html[data-theme="dark"] .page--folders {
    background: #111216;
}

.folders-header {
    padding-bottom: 0;
    background: transparent;
}

.folders-header__title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.folders-content {
    padding: 20px clamp(20px, 5.128vw, 40px) 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.folder-hero {
    position: relative;
    width: 100%;
    height: 100px;
    padding: 0;
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    text-align: left;
}

.folder-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("../figma/folder-top-bg.jpg") bottom right no-repeat;
    background-size: cover;
}

.folder-hero__copy {
    position: absolute;
    top: 11px;
    left: 16px;
    z-index: 2;
    width: 144px;
}

.folder-hero__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.folder-hero__subtitle {
    margin: 2px 0 0;
    color: #8e8e93;
    font-size: 12px;
    line-height: 1.2;
}

.folder-hero__arrow {
    width: 60px;
    height: 20px;
    margin-top: 18px;
    object-fit: contain;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
}

.folder-list__item {
    position: relative;
    width: 100%;
    height: 83px;
    border-radius: 24px;
    overflow: hidden;
    text-align: left;
}

.folder-list__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.folder-list__body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 23px 17px 0;
}

.folder-list__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.folder-list__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 510;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.folder-list__meta {
    margin-top: 4px;
    color: #8e8e93;
    font-size: 12px;
    line-height: 1.2;
}

.folder-list__side {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.folder-list__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 510;
    line-height: 1.2;
    white-space: nowrap;
}

.folder-list__status--gold {
    background: #fff7d6;
    color: #b88300;
}

.folder-list__status--green {
    background: #effcf4;
    color: #2fae63;
}

.folder-list__status--purple {
    background: #f3edff;
    color: #7140d8;
}

.folder-list__status--blue {
    background: #eef9ff;
    color: #2289c9;
}

.folder-list__more {
    width: 6px;
    height: 26px;
}

.folder-list__error {
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 18px;
    text-align: center;
}

.folder-list__error-copy {
    margin: 0;
    color: var(--ink-2);
}

.folder-list__retry {
    margin-top: 12px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: #000;
    color: #fff;
}

.folders-fab {
    position: fixed;
    right: 20px;
    bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 24px));
    z-index: 20;
}

.folders-fab span {
    line-height: 1;
    transform: translateY(-1px);
}

.folders-bottom {
    margin-top: auto;
    background: #000;
    box-shadow: 0 -2px 9px rgba(229, 229, 229, 0.5);
}

.folder-nav {
    height: 110px;
    padding: 18px 33px 24px;
    background: #000;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.folder-nav__item {
    width: 48px;
    height: 52px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.68);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.folder-nav__item.is-active {
    background: #2b2b2b;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.folder-nav__icon {
    position: relative;
    width: 26px;
    height: 26px;
}

.folder-nav__icon--scan::before,
.folder-nav__icon--learn::before,
.folder-nav__icon--learn::after,
.folder-nav__icon--folders::before,
.folder-nav__icon--folders::after {
    content: "";
    position: absolute;
}

.folder-nav__icon--scan::before {
    inset: 3px;
    border: 2px solid currentColor;
    border-radius: 7px;
}

.folder-nav__icon--learn::before,
.folder-nav__icon--learn::after {
    left: 3px;
    right: 3px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.folder-nav__icon--learn::before {
    top: 8px;
}

.folder-nav__icon--learn::after {
    top: 16px;
}

.folder-nav__icon--folders::before {
    left: 1px;
    right: 1px;
    top: 9px;
    bottom: 3px;
    border: 2px solid currentColor;
    border-radius: 6px;
}

.folder-nav__icon--folders::after {
    left: 4px;
    top: 4px;
    width: 11px;
    height: 7px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
}

html[data-theme="dark"] .folder-list__bg {
    filter: brightness(0.78) saturate(0.92);
}

html[data-theme="dark"] .folder-hero__title,
html[data-theme="dark"] .folder-list__title {
    color: #fff;
}

html[data-theme="dark"] .folder-hero__subtitle,
html[data-theme="dark"] .folder-list__meta {
    color: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .folders-bottom {
    box-shadow: 0 -2px 9px rgba(0, 0, 0, 0.36);
}

.concept-header {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.11);
}

.concept-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 38px 0;
}

.concept-progress__track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: #e5e5ea;
    overflow: hidden;
}

.concept-progress__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #8c55f2;
}

.concept-progress__count {
    font-size: 16px;
    color: var(--ink-2);
}

.concept-card-shell {
    width: 315px;
    margin: 16px auto 0;
    min-height: 540px;
    padding: 18px;
    border-radius: 16px;
    background: #4a4454;
    box-shadow: var(--shadow-deep);
}

.concept-card-shell.is-back {
    background: linear-gradient(180deg, #3f384a 0%, #302b39 100%);
}

.concept-card {
    min-height: 504px;
    border-radius: 16px;
    padding: 28px 24px;
    background:
        radial-gradient(circle at 24% 24%, rgba(226, 221, 255, 0.9), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(228, 246, 255, 0.65), transparent 34%),
        radial-gradient(circle at 24% 82%, rgba(255, 252, 239, 0.72), transparent 36%),
        linear-gradient(180deg, #f5f0ff 0%, #f7f4ff 100%);
    border: 8px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(126, 56, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

html[data-theme="dark"] .concept-card {
    background:
        radial-gradient(circle at 24% 24%, rgba(114, 88, 166, 0.42), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(74, 106, 155, 0.38), transparent 34%),
        radial-gradient(circle at 24% 82%, rgba(152, 132, 86, 0.24), transparent 36%),
        linear-gradient(180deg, #241f2e 0%, #1b1824 100%);
}

.concept-card__tag {
    display: inline-flex;
    margin-bottom: 18px;
    min-height: 28px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: #6d5e85;
    font-size: 12px;
    font-weight: 700;
}

.concept-card__title {
    margin: 0;
    color: #6d5e85;
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 1.33;
    letter-spacing: -0.02em;
}

.concept-card__copy {
    margin: 18px 0 0;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.55;
}

.concept-flip-bar {
    width: 315px;
    min-height: 34px;
    margin: 0 auto;
    border-radius: 0 0 24px 24px;
    background: linear-gradient(135deg, #8c55f2 0%, #1b66b6 49%, #51318c 99%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 20px 40px rgba(85, 38, 136, 0.1);
}

.concept-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
}

.concept-actions__circle,
.concept-actions__pill {
    min-height: 60px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
}

.concept-actions__circle {
    width: 60px;
    font-size: 18px;
}

.concept-actions__pill {
    padding: 0 28px;
    font-size: 16px;
    font-weight: 590;
}

.interactive-practice-card,
.interactive-feedback,
.apply-save-card {
    padding: 20px;
}

.interactive-practice-card__eyebrow,
.apply-scene__tag {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--sheet-purple);
    color: var(--purple-ink);
    font-size: 12px;
    font-weight: 700;
}

.interactive-practice-card__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.interactive-practice-card__option {
    width: 100%;
    min-height: 58px;
    padding: 14px 16px;
    text-align: left;
    border-radius: 20px;
    background: var(--sheet-muted);
    color: var(--ink);
    font-size: 14px;
    font-weight: 590;
    transition: transform 160ms ease, background 160ms ease;
}

.interactive-practice-card__option.is-correct {
    background: linear-gradient(180deg, rgba(243, 250, 250, 0.3), rgba(243, 250, 250, 0.3)), var(--sheet);
    box-shadow: inset 0 0 0 1px var(--mint-line);
}

.interactive-practice-card__option.is-wrong {
    background: linear-gradient(180deg, rgba(255, 250, 250, 0.3), rgba(255, 250, 250, 0.3)), var(--sheet);
    box-shadow: inset 0 0 0 1px var(--rose-line);
}

.interactive-feedback.is-success {
    background: linear-gradient(180deg, rgba(243, 250, 250, 0.3), rgba(243, 250, 250, 0.3)), var(--sheet);
}

.interactive-feedback.is-danger {
    background: linear-gradient(180deg, rgba(255, 250, 250, 0.3), rgba(255, 250, 250, 0.3)), var(--sheet);
}

.interactive-feedback__copy,
.apply-save-card__copy {
    margin: 10px 0 0;
    color: var(--ink-2);
}

.interactive-feedback__actions,
.apply-save-card__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.apply-scene {
    padding: 20px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #171c25 0%, #0c0f15 100%);
}

.apply-scene__subtitle {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.apply-scene__steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.apply-scene__step {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.apply-scene__step strong {
    display: block;
    margin-bottom: 6px;
}

.apply-scene__step span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 389px) {
    .screen {
        padding-inline: 12px;
    }

    .screen-body {
        padding-inline: 16px;
    }

    .learn-stage {
        padding-inline: 18px;
    }

    .learn-tagline {
        width: 100%;
    }

    .learn-quick-action {
        width: 82px;
    }

    .deck-content,
    .folders-content {
        padding-inline: 16px;
    }

    .concept-card-shell,
    .concept-flip-bar {
        width: calc(100% - 48px);
    }

    .interactive-feedback__actions,
    .apply-save-card__actions,
    .button-row {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0ms !important;
        scroll-behavior: auto !important;
    }
}
