.hugo-study-view.hero-panel {
    --hs-rose: #a85f7d;
    --hs-rose-dark: #754056;
    --hs-blue: #647fa9;
    --hs-blue-soft: #e9eff8;
    --hs-ink: #2c2730;
    --hs-muted: #746a72;
    --hs-line: #dfd7dc;
    --hs-surface: #fffdfd;
    --hs-green: #36765b;
    --hs-green-soft: #e8f5ee;
    --hs-yellow: #8b6729;
    --hs-yellow-soft: #fff5dc;
    --hs-red: #a34850;
    padding: 0;
    overflow: hidden;
    min-height: 680px;
    color: var(--hs-ink);
    font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.hugo-study-root,
.hugo-study-root * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.hugo-study-root button,
.hugo-study-root input,
.hugo-study-root select {
    font: inherit;
}

.hugo-study-loading {
    display: grid;
    min-height: 420px;
    place-items: center;
    color: var(--hs-muted);
}

.hs-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 24px;
    align-items: center;
    padding: 30px 34px 24px;
    border-bottom: 1px solid rgba(117, 64, 86, 0.15);
    background: rgba(255, 253, 253, 0.52);
}

.hs-head__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--hs-rose-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

.hs-head h2 {
    margin: 0;
    color: var(--hs-ink);
    font-size: clamp(1.55rem, 2.7vw, 2.15rem);
    line-height: 1.18;
}

.hs-head p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--hs-muted);
    font-size: 0.93rem;
    line-height: 1.65;
}

.hs-head__mascot {
    width: 116px;
    height: 116px;
    justify-self: end;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 10px 16px rgba(85, 53, 68, 0.16));
}

.hs-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 10px 18px;
    border-bottom: 1px solid var(--hs-line);
    background: rgba(255, 255, 255, 0.76);
    scrollbar-width: none;
}

.hs-tabs::-webkit-scrollbar {
    display: none;
}

.hs-tab {
    min-width: max-content;
    min-height: 40px;
    padding: 8px 15px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--hs-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

.hs-tab:hover,
.hs-tab:focus-visible {
    background: #f6eef2;
    color: var(--hs-rose-dark);
    outline: none;
}

.hs-tab.is-active {
    background: var(--hs-rose-dark);
    color: #fff;
}

.hs-main {
    padding: 26px 32px 34px;
    background: rgba(255, 253, 253, 0.62);
}

.hs-panel[hidden] {
    display: none !important;
}

.hs-section-title {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.hs-section-title h3,
.hs-section-title h4 {
    margin: 0;
    color: var(--hs-ink);
    font-size: 1.16rem;
}

.hs-section-title p {
    margin: 5px 0 0;
    color: var(--hs-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.hs-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--hs-rose);
    font-size: 0.72rem;
    font-weight: 800;
}

.hs-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.45fr);
    gap: 22px;
    align-items: start;
}

.hs-tool {
    border: 1px solid var(--hs-line);
    border-radius: 8px;
    background: var(--hs-surface);
    box-shadow: 0 12px 28px rgba(70, 49, 59, 0.07);
}

.hs-tool__head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #eee8eb;
}

.hs-tool__head h3,
.hs-tool__head h4 {
    margin: 0;
    font-size: 1.05rem;
}

.hs-tool__head p {
    margin: 5px 0 0;
    color: var(--hs-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.hs-tool__body {
    padding: 18px 20px 20px;
}

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

.hs-field {
    display: grid;
    gap: 6px;
}

.hs-field--wide {
    grid-column: 1 / -1;
}

.hs-field label,
.hs-field__label {
    color: #554b52;
    font-size: 0.77rem;
    font-weight: 700;
}

.hs-input,
.hs-select {
    width: 100%;
    height: 42px;
    padding: 0 11px;
    border: 1px solid #cfc4ca;
    border-radius: 6px;
    background: #fff;
    color: var(--hs-ink);
    outline: none;
}

.hs-input:focus,
.hs-select:focus {
    border-color: var(--hs-blue);
    box-shadow: 0 0 0 3px rgba(100, 127, 169, 0.14);
}

.hs-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 11px;
    align-items: center;
}

.hs-range {
    width: 100%;
    accent-color: var(--hs-rose);
}

.hs-range-value {
    color: var(--hs-rose-dark);
    font-size: 0.84rem;
    font-weight: 800;
    text-align: right;
}

.hs-btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--hs-rose-dark);
    color: #fff;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
}

.hs-btn:hover,
.hs-btn:focus-visible {
    background: #613346;
    outline: 3px solid rgba(168, 95, 125, 0.16);
}

.hs-btn--block {
    width: 100%;
    margin-top: 17px;
}

.hs-btn--secondary {
    border-color: #cfc4ca;
    background: #fff;
    color: #51474e;
}

.hs-btn--secondary:hover,
.hs-btn--secondary:focus-visible {
    background: #f7f1f4;
    color: var(--hs-rose-dark);
}

.hs-btn--blue {
    background: var(--hs-blue);
}

.hs-btn--blue:hover,
.hs-btn--blue:focus-visible {
    background: #526d97;
}

.hs-btn--small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.76rem;
}

.hs-plan-empty {
    display: grid;
    min-height: 340px;
    place-items: center;
    padding: 40px;
    color: var(--hs-muted);
    text-align: center;
}

.hs-plan-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--hs-ink);
    font-size: 1rem;
}

.hs-plan-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.hs-plan-metric {
    padding: 12px;
    border-left: 3px solid var(--metric-color, var(--hs-rose));
    background: #faf7f8;
}

.hs-plan-metric span {
    display: block;
    color: var(--hs-muted);
    font-size: 0.72rem;
}

.hs-plan-metric strong {
    display: block;
    margin-top: 3px;
    color: var(--hs-ink);
    font-size: 1.02rem;
}

.hs-task-list {
    display: grid;
    gap: 10px;
}

.hs-task {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: start;
    padding: 14px;
    border: 1px solid #e6dfe3;
    border-radius: 8px;
    background: #fff;
}

.hs-task.is-done {
    border-color: #bfd8ca;
    background: var(--hs-green-soft);
}

.hs-task__check {
    width: 26px;
    height: 26px;
    margin: 0;
    accent-color: var(--hs-green);
}

.hs-task__title {
    margin: 0;
    color: var(--hs-ink);
    font-size: 0.91rem;
    line-height: 1.45;
}

.hs-task__reason {
    margin: 4px 0 0;
    color: var(--hs-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.hs-task__redo {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--hs-blue-soft);
    color: #4b6388;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.hs-advice {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid #d0a84f;
    background: var(--hs-yellow-soft);
    color: #6e5628;
    font-size: 0.78rem;
    line-height: 1.55;
}

.hs-segmented {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--hs-line);
    border-radius: 7px;
    background: #f4eff2;
}

.hs-segmented button {
    min-height: 34px;
    padding: 6px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--hs-muted);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
}

.hs-segmented button.is-active {
    background: #fff;
    color: var(--hs-rose-dark);
    box-shadow: 0 2px 7px rgba(70, 49, 59, 0.1);
}

.hs-training-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
    gap: 22px;
    align-items: start;
}

.hs-trainer {
    min-height: 378px;
}

.hs-progress-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--hs-muted);
    font-size: 0.76rem;
}

.hs-progress {
    height: 7px;
    flex: 1;
    overflow: hidden;
    border-radius: 99px;
    background: #ebe5e8;
}

.hs-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--hs-blue);
    transition: width 180ms ease;
}

.hs-prompt {
    min-height: 84px;
    margin: 0 0 16px;
    color: var(--hs-ink);
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}

.hs-prompt__hint {
    display: block;
    margin-top: 8px;
    color: var(--hs-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.hs-listen-actions,
.hs-answer-actions {
    display: flex;
    gap: 9px;
    justify-content: center;
}

.hs-dictation-input {
    width: min(100%, 430px);
    height: 50px;
    margin: 0 auto 13px;
    border: 2px solid #cfc4ca;
    border-radius: 7px;
    background: #fff;
    color: var(--hs-ink);
    font-size: 1.08rem;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.hs-dictation-input:focus {
    border-color: var(--hs-blue);
    box-shadow: 0 0 0 4px rgba(100, 127, 169, 0.13);
}

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

.hs-option {
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid #d8cfd4;
    border-radius: 7px;
    background: #fff;
    color: #4b4248;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: left;
}

.hs-option:hover,
.hs-option:focus-visible {
    border-color: var(--hs-blue);
    background: #f4f7fb;
    outline: none;
}

.hs-option.is-correct {
    border-color: var(--hs-green);
    background: var(--hs-green-soft);
    color: #285943;
}

.hs-option.is-wrong {
    border-color: var(--hs-red);
    background: #fbecee;
    color: #81343b;
}

.hs-feedback {
    min-height: 54px;
    margin-top: 15px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: transparent;
    font-size: 0.8rem;
    line-height: 1.5;
}

.hs-feedback.is-correct {
    border-color: #bfd8ca;
    background: var(--hs-green-soft);
    color: #285943;
}

.hs-feedback.is-wrong {
    border-color: #edc8cc;
    background: #fbecee;
    color: #81343b;
}

.hs-mini-stats {
    display: grid;
    gap: 10px;
}

.hs-mini-stat {
    padding: 12px 14px;
    border-left: 3px solid var(--stat-color, var(--hs-blue));
    background: #faf7f8;
}

.hs-mini-stat span {
    display: block;
    color: var(--hs-muted);
    font-size: 0.72rem;
}

.hs-mini-stat strong {
    display: block;
    margin-top: 2px;
    color: var(--hs-ink);
    font-size: 1.12rem;
}

.hs-review-tip {
    margin: 15px 0 0;
    color: var(--hs-muted);
    font-size: 0.77rem;
    line-height: 1.6;
}

.hs-records {
    display: grid;
    gap: 9px;
}

.hs-record {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 13px 15px;
    border: 1px solid #e1d9dd;
    border-radius: 8px;
    background: #fff;
}

.hs-record__title {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin: 0;
    color: var(--hs-ink);
    font-size: 0.9rem;
}

.hs-record__meta {
    margin: 5px 0 0;
    color: var(--hs-muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

.hs-record__actions {
    display: flex;
    gap: 7px;
}

.hs-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--hs-yellow-soft);
    color: var(--hs-yellow);
    font-size: 0.67rem;
    font-weight: 800;
}

.hs-status--mastered {
    background: var(--hs-green-soft);
    color: var(--hs-green);
}

.hs-empty {
    padding: 48px 22px;
    border: 1px dashed #cfc4ca;
    border-radius: 8px;
    color: var(--hs-muted);
    text-align: center;
}

.hs-library {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.hs-books {
    display: grid;
    gap: 8px;
}

.hs-book {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ddd3d8;
    border-radius: 7px;
    background: #fff;
    color: var(--hs-ink);
    cursor: pointer;
    font-weight: 800;
    text-align: left;
}

.hs-book span {
    display: block;
    margin-top: 3px;
    color: var(--hs-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.hs-book.is-active {
    border-color: var(--hs-rose);
    background: #f8edf2;
    color: var(--hs-rose-dark);
}

.hs-test-list {
    display: grid;
    gap: 9px;
}

.hs-test {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid #e7dfe3;
}

.hs-test:last-child {
    border-bottom: 0;
}

.hs-test__name {
    color: var(--hs-ink);
    font-size: 0.86rem;
    font-weight: 800;
}

.hs-test__progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    color: var(--hs-muted);
    font-size: 0.72rem;
}

.hs-library-note {
    margin-top: 14px;
    padding: 11px 13px;
    background: var(--hs-blue-soft);
    color: #4b6388;
    font-size: 0.75rem;
    line-height: 1.55;
}

.hs-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10020;
    max-width: min(360px, calc(100vw - 32px));
    padding: 11px 15px;
    border-radius: 7px;
    background: #302a2e;
    color: #fff;
    box-shadow: 0 12px 30px rgba(34, 27, 31, 0.24);
    font-size: 0.8rem;
    line-height: 1.45;
}

@media (max-width: 880px) {
    .hs-layout,
    .hs-training-grid,
    .hs-library {
        grid-template-columns: 1fr;
    }

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

    .hs-books {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .hugo-study-view.hero-panel {
        min-height: 600px;
    }

    .hs-head {
        grid-template-columns: minmax(0, 1fr) 72px;
        gap: 10px;
        padding: 22px 18px 18px;
    }

    .hs-head__mascot {
        width: 70px;
        height: 82px;
    }

    .hs-head p {
        font-size: 0.82rem;
    }

    .hs-tabs {
        padding-inline: 10px;
    }

    .hs-main {
        padding: 20px 14px 26px;
    }

    .hs-form-grid,
    .hs-options,
    .hs-books {
        grid-template-columns: 1fr;
    }

    .hs-task {
        grid-template-columns: 27px minmax(0, 1fr);
    }

    .hs-task__redo {
        grid-column: 2;
        justify-self: start;
    }

    .hs-record,
    .hs-test {
        grid-template-columns: 1fr;
    }

    .hs-record__actions {
        justify-content: flex-start;
    }

    .hs-test__progress {
        grid-template-columns: minmax(0, 1fr) 38px;
    }

    .hs-listen-actions,
    .hs-answer-actions {
        flex-wrap: wrap;
    }
}

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