:root {
    --lc-bg: #f9f6f1;
    --lc-bg-soft: #fffdf9;
    --lc-paper: rgba(255, 255, 255, 0.92);
    --lc-paper-strong: rgba(255, 255, 255, 0.98);
    --lc-wash-aqua: rgba(133, 214, 209, 0.26);
    --lc-wash-mint: rgba(201, 236, 223, 0.3);
    --lc-wash-sky: rgba(186, 225, 236, 0.24);
    --lc-leaf: #4d8a6b;
    --lc-leaf-soft: #d9ebdf;
    --lc-primary: #256f67;
    --lc-primary-deep: #1f5952;
    --lc-accent: #63b8b1;
    --lc-text: #202425;
    --lc-muted: #716c66;
    --lc-border: rgba(64, 92, 86, 0.12);
    --lc-shadow-soft: 0 18px 38px rgba(91, 116, 111, 0.08);
    --lc-shadow-card: 0 12px 28px rgba(91, 116, 111, 0.1);
    --lc-shadow-lifted: 0 22px 48px rgba(88, 113, 108, 0.14);
    --lc-radius-card: 1.5rem;
    --lc-radius-pill: 999px;
    --lc-font-sans: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.portal-theme {
    min-height: 100vh;
    color: var(--lc-text);
    background:
        radial-gradient(circle at 8% 10%, rgba(255, 255, 255, 0.76) 0, rgba(255, 255, 255, 0) 28%),
        radial-gradient(circle at 85% 6%, var(--lc-wash-aqua) 0, rgba(133, 214, 209, 0) 26%),
        radial-gradient(circle at 78% 24%, var(--lc-wash-sky) 0, rgba(186, 225, 236, 0) 20%),
        radial-gradient(circle at 18% 32%, var(--lc-wash-mint) 0, rgba(201, 236, 223, 0) 24%),
        linear-gradient(180deg, #fffdfa 0%, var(--lc-bg) 56%, #f7f3ed 100%);
    font-family: var(--lc-font-sans);
    letter-spacing: 0.01em;
}

body.portal-theme--exercise {
    min-height: 100dvh;
    overflow: hidden;
}

body.portal-theme--exercise-completion {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.app-shell {
    position: relative;
    overflow: clip;
}

.app-shell--exercise {
    min-height: 100dvh;
}

.app-shell--exercise-completion {
    min-height: 100vh;
    overflow: visible;
}

.app-shell::before,
.app-shell::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(10px);
}

.app-shell::before {
    top: 6.5rem;
    left: -7rem;
    width: 22rem;
    height: 22rem;
    background:
        radial-gradient(circle at 40% 42%, rgba(137, 213, 207, 0.34), rgba(137, 213, 207, 0) 70%);
}

.app-shell::after {
    top: 17rem;
    right: -8rem;
    width: 24rem;
    height: 24rem;
    background:
        radial-gradient(circle at 50% 50%, rgba(196, 233, 221, 0.32), rgba(196, 233, 221, 0) 70%);
}

.app-main,
.navbar,
.wizard-action-card--tabbed {
    position: relative;
    z-index: 1;
}

.exercise-shell {
    min-height: 100dvh;
}

.exercise-wizard--fullscreen {
    --wizard-shell-max-width: 900px;
    --wizard-header-height: 5.35rem;
    --wizard-footer-height: 10.75rem;
    --wizard-shell-gutter: 0.75rem;
    min-height: 100dvh;
    position: relative;
}

.app-main {
    padding-bottom: 1rem;
}

.app-main--exercise {
    min-height: 100dvh;
    padding-bottom: 0;
}

.app-main--exercise-completion {
    min-height: auto;
    padding-bottom: 2rem;
    position: static;
    z-index: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: var(--lc-font-sans);
    font-weight: 600;
    color: var(--lc-text);
    letter-spacing: -0.02em;
}

.display-6,
.wizard-section-title {
    font-weight: 500;
    letter-spacing: -0.03em;
}

.navbar-brand {
    font-size: 1.05rem;
}

.nav-link {
    color: var(--lc-text);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--lc-primary);
}

.brand-mark {
    position: relative;
    width: 1rem;
    height: 1rem;
    border-radius: 50% 50% 46% 54%;
    background: linear-gradient(145deg, #7cc9c1, #57a694);
    box-shadow: 0 0 0 0.3rem rgba(122, 201, 194, 0.14);
    transform: rotate(-16deg);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 0.2rem 0.18rem 0.2rem 0.42rem;
    border-radius: 100% 0 100% 0;
    background: rgba(255, 255, 255, 0.45);
    transform: rotate(28deg);
}

.backdrop-blur {
    backdrop-filter: blur(16px);
}

header.sticky-top {
    border-color: rgba(77, 138, 107, 0.08) !important;
    background: rgba(255, 252, 247, 0.76) !important;
    backdrop-filter: blur(16px);
}

.card,
.rounded-4.border,
.alert,
.modal-content {
    border-color: var(--lc-border) !important;
}

.card,
.modal-content {
    border-radius: var(--lc-radius-card);
    background: var(--lc-paper);
    box-shadow: var(--lc-shadow-card);
}

.card-body {
    position: relative;
}

.hero-card {
    background:
        radial-gradient(circle at top right, rgba(157, 222, 218, 0.22), rgba(157, 222, 218, 0) 33%),
        radial-gradient(circle at bottom left, rgba(213, 239, 227, 0.3), rgba(213, 239, 227, 0) 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 249, 244, 0.93)),
        var(--lc-paper);
}

.hero-card::after,
.wizard-panel::before {
    content: "";
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    width: 1.55rem;
    height: 1.05rem;
    background: linear-gradient(135deg, rgba(91, 157, 122, 0.12), rgba(91, 157, 122, 0.22));
    border-radius: 100% 0 100% 0;
    transform: rotate(-12deg);
    opacity: 0.9;
}

.material-embed-shell {
    overflow: hidden;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(64, 92, 86, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.material-embed-frame iframe,
.material-embed-instagram iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.material-embed-instagram {
    min-height: 38rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 237, 0.95));
}

.review-question-block + .review-question-block {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(64, 92, 86, 0.08);
}

.review-answer-card {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255, 252, 247, 0.82);
    border: 1px solid rgba(64, 92, 86, 0.08);
}

.feedback-comment-card {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(218, 240, 232, 0.58);
    border: 1px solid rgba(77, 138, 107, 0.16);
}

.feedback-thread-card,
.feedback-thread-form {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255, 252, 247, 0.78);
    border: 1px solid rgba(64, 92, 86, 0.08);
}

.feedback-thread-messages {
    display: grid;
    gap: 0.9rem;
}

.feedback-thread-message {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(64, 92, 86, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.feedback-thread-message--lucy {
    background: rgba(218, 240, 232, 0.56);
    border-color: rgba(77, 138, 107, 0.16);
}

.feedback-thread-message--client {
    background: rgba(227, 240, 247, 0.56);
    border-color: rgba(69, 114, 151, 0.14);
}

.exploration-inline-note {
    padding-top: 1rem;
    border-top: 1px solid rgba(64, 92, 86, 0.08);
}

.feedback-thread-message__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.feedback-thread-message__body {
    line-height: 1.7;
}

.completion-tabs .nav-link {
    border-radius: 999px;
    color: var(--lc-primary-deep);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(64, 92, 86, 0.08);
}

.completion-tabs .nav-link.active {
    background: var(--lc-primary);
    border-color: var(--lc-primary);
    color: #fff;
}

.exploration-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scroll-snap-type: x proximity;
}

.exploration-tabs .nav-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.exploration-tabs .nav-link {
    white-space: nowrap;
}

.exploration-tab-content {
    min-width: 0;
}

.exploration-tab-panel {
    display: grid;
    gap: 1rem;
}

.exploration-inline-note details summary {
    cursor: pointer;
    list-style: none;
}

.exploration-inline-note details summary::-webkit-details-marker {
    display: none;
}

.exploration-inline-note details summary::after {
    content: "Mostrar";
    margin-left: 0.5rem;
    font-weight: 600;
    color: var(--lc-primary-deep);
}

.exploration-inline-note details[open] summary::after {
    content: "Ocultar";
}

.question-flow-page {
    padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

.question-flow-shell {
    max-width: 980px;
}

.question-jump-form {
    display: grid;
    gap: 0.65rem;
}

.question-jump-form__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.question-jump-form .form-select {
    min-width: 0;
    text-overflow: ellipsis;
}

.question-flow-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.question-exploration-card {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(233, 246, 243, 0.78);
    border: 1px solid rgba(77, 138, 107, 0.14);
}

.question-exploration-card--active {
    background: linear-gradient(135deg, rgba(232, 246, 247, 0.96), rgba(241, 250, 248, 0.96));
    border-color: rgba(37, 116, 122, 0.22);
}

.question-exploration-card--closed {
    background: linear-gradient(135deg, rgba(244, 247, 248, 0.96), rgba(252, 252, 249, 0.96));
    border-color: rgba(74, 99, 112, 0.18);
}

.review-answer-card--compact {
    padding: 1rem 1.1rem;
}

.feedback-history-details {
    border: 1px solid rgba(64, 92, 86, 0.08);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.66);
}

.feedback-history-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--lc-primary-deep);
}

.question-flow-nav-spacer {
    height: 6.25rem;
}

.question-flow-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
    z-index: 32;
}

.question-flow-nav__inner {
    width: min(100%, 980px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(64, 92, 86, 0.08);
    border-radius: 1.15rem;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(18px);
    box-shadow: 0 -4px 24px rgba(88, 113, 108, 0.12);
}

.question-flow-nav__button {
    min-width: 8.25rem;
    justify-self: start;
    text-align: center;
}

.question-flow-nav__button:last-child {
    justify-self: end;
}

.question-flow-nav__progress {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--lc-primary-deep);
    white-space: nowrap;
}

.wizard-autosave-status,
[data-autosave-status] {
    min-height: 1.25rem;
}

[data-autosave-status][data-state="saving"] {
    color: var(--lc-muted);
}

[data-autosave-status][data-state="saved"] {
    color: var(--lc-primary);
}

[data-autosave-status][data-state="error"] {
    color: #b74e59;
}

.material-preview-modal .modal-content {
    background: rgba(255, 252, 247, 0.98);
}

.material-modal-frame-shell {
    border-radius: 1.25rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(64, 92, 86, 0.08);
}

.material-modal-frame-wrap {
    background: #000;
}

.material-modal-frame-wrap--youtube {
    position: relative;
}

.material-modal-frame {
    width: 100%;
    border: 0;
    display: block;
}

.material-modal-frame--pdf {
    min-height: min(78vh, 980px);
    background: #f5f2ec;
}

.material-modal-frame--video {
    height: 100%;
    background: #000;
}

.youtube-guard-strip {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: min(24%, 11rem);
    height: min(16%, 4.5rem);
    z-index: 2;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.08), rgba(18, 18, 18, 0.28));
    backdrop-filter: blur(1.5px);
    pointer-events: auto;
}

.youtube-guard-strip-bottom {
    position: absolute;
    right: 0.8rem;
    bottom: 0;
    width: min(26%, 12rem);
    height: 50px;
    z-index: 2;
    border-radius: 0.95rem 0.95rem 0 0;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.08), rgba(18, 18, 18, 0.24));
    backdrop-filter: blur(1.5px);
    pointer-events: auto;
}

@media (max-width: 575.98px) {
    .material-modal-frame--pdf {
        min-height: 72vh;
    }

    .youtube-guard-strip {
        right: 0.45rem;
        top: 0.45rem;
        width: 34%;
        height: 18%;
        border-radius: 0.75rem;
    }

    .youtube-guard-strip-bottom {
        right: 0.45rem;
        width: 32%;
        height: 50px;
        border-radius: 0.75rem 0.75rem 0 0;
    }
}

.exercise-wizard--tabbed .wizard-panel::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    bottom: 1rem;
    width: 5rem;
    height: 5rem;
    background-image: radial-gradient(circle, rgba(96, 180, 172, 0.18) 1.15px, transparent 1.35px);
    background-size: 0.7rem 0.7rem;
    border-radius: 1.25rem;
    opacity: 0.55;
    pointer-events: none;
}

.wizard-panel::before {
    top: 1.25rem;
    right: 1.35rem;
}

.btn {
    border-radius: var(--lc-radius-pill);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lc-primary), var(--lc-primary-deep));
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(37, 111, 103, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #205f59, #194d48);
    border-color: transparent;
}

.btn-outline-secondary {
    color: var(--lc-primary-deep);
    border-color: rgba(37, 111, 103, 0.22);
    background: rgba(255, 255, 255, 0.78);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--lc-primary-deep);
    border-color: rgba(37, 111, 103, 0.38);
    background: rgba(234, 246, 243, 0.92);
}

.btn-danger {
    box-shadow: none;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.58;
    box-shadow: none;
}

.badge {
    letter-spacing: 0.04em;
    font-weight: 600;
}

.text-bg-light,
.bg-light-subtle {
    background: rgba(247, 250, 246, 0.9) !important;
    color: var(--lc-primary-deep) !important;
}

.text-bg-success-subtle {
    background: rgba(225, 242, 235, 0.92) !important;
}

.text-success-emphasis {
    color: var(--lc-leaf) !important;
}

.text-secondary {
    color: var(--lc-muted) !important;
}

.lead {
    font-weight: 400;
    line-height: 1.7;
}

.exercise-brand-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lc-primary-deep);
}

.exercise-brand-subtitle {
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(37, 111, 103, 0.78);
}

.exercise-cover-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--lc-radius-pill);
    background: rgba(219, 241, 236, 0.78);
    color: var(--lc-primary-deep);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--lc-text);
    --bs-table-border-color: rgba(64, 92, 86, 0.1);
}

.table > :not(caption) > * > * {
    border-bottom-color: rgba(64, 92, 86, 0.1);
}

.table thead {
    background: rgba(244, 250, 247, 0.85);
}

.table thead th {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lc-muted);
}

.table tbody tr {
    transition: background-color 180ms ease;
}

.table tbody tr:hover {
    background: rgba(242, 249, 246, 0.58);
}

.table-responsive {
    border-radius: 1.25rem;
}

.token-preview {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.exercise-meta-card {
    min-width: 220px;
}

.progress {
    height: 0.9rem;
    border-radius: var(--lc-radius-pill);
    background: rgba(111, 190, 183, 0.14);
}

.progress-bar {
    background: linear-gradient(90deg, #4ea99f, #7ed2cb);
}

.wizard-progress-bar .progress-bar {
    transition: width 260ms ease;
}

.form-label {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lc-muted);
}

.form-control,
.form-select {
    border-radius: 1.1rem;
    border: 1px solid rgba(70, 100, 94, 0.14);
    background: rgba(255, 255, 255, 0.95);
    color: var(--lc-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(87, 176, 168, 0.65);
    box-shadow:
        0 0 0 0.24rem rgba(126, 210, 203, 0.18),
        0 8px 18px rgba(126, 210, 203, 0.08);
}

.form-control[readonly],
.form-control:disabled {
    background: rgba(251, 250, 246, 0.96);
}

.answer-textarea,
textarea.form-control {
    min-height: 9rem;
    line-height: 1.7;
    padding: 1rem 1.05rem;
}

.answer-textarea--solo {
    min-height: clamp(8rem, 26vh, 10rem);
    padding-bottom: 1.15rem;
}

.alert {
    border-radius: 1.25rem;
    box-shadow: var(--lc-shadow-soft);
}

.modal-header,
.modal-footer {
    border-color: rgba(64, 92, 86, 0.08);
}

.wizard-panel {
    position: relative;
    overflow: hidden;
}

.wizard-panel .question-block {
    border-color: rgba(64, 92, 86, 0.08) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 249, 245, 0.94)) !important;
    box-shadow: 0 10px 24px rgba(107, 126, 122, 0.06);
}

.question-block label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--lc-text);
}

.wizard-section-title {
    font-size: clamp(1.85rem, 2.7vw, 2.55rem);
}

.wizard-action-card {
    position: sticky;
    bottom: 0.85rem;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(255, 252, 249, 0.92);
}

.wizard-nav-button {
    display: inline-flex;
}

.wizard-ready .wizard-panel {
    display: none;
}

.wizard-ready .wizard-panel.is-active {
    display: block;
    animation: wizard-panel-enter 220ms ease;
}

@keyframes wizard-panel-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.exercise-topbar {
    position: relative;
    z-index: 5;
}

.exercise-topbar--compact .card-body {
    padding-bottom: 0.95rem !important;
}

.exercise-shell__header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 35;
    padding:
        calc(env(safe-area-inset-top) + 0.45rem)
        var(--wizard-shell-gutter)
        0;
}

.exercise-shell__header-inner {
    width: min(calc(100% - (var(--wizard-shell-gutter) * 2)), var(--wizard-shell-max-width));
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.8rem;
    border: 1px solid rgba(64, 92, 86, 0.08);
    border-radius: 1.15rem;
    background: rgba(255, 252, 247, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(88, 113, 108, 0.1);
}

.exercise-shell__brand {
    min-width: 0;
}

.exercise-shell__main {
    min-height: 100dvh;
    padding-top: calc(var(--wizard-header-height) + env(safe-area-inset-top));
    padding-bottom: calc(var(--wizard-footer-height) + env(safe-area-inset-bottom));
}

.exercise-shell__content {
    width: min(calc(100% - (var(--wizard-shell-gutter) * 2)), var(--wizard-shell-max-width));
    margin: 0 auto;
}

.exercise-shell__form {
    min-height: calc(100dvh - var(--wizard-header-height) - var(--wizard-footer-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.wizard-intro-copy {
    max-width: 700px;
}

.wizard-question-title {
    font-size: clamp(1.35rem, 3.8vw, 1.85rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.question-panel-meta {
    display: grid;
    gap: 0.2rem;
}

.question-panel-counter,
.question-panel-section {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lc-primary-deep);
}

.question-panel-section {
    color: var(--lc-muted);
}

.question-panel-help {
    font-size: 0.98rem;
    line-height: 1.65;
}

.question-block--solo {
    box-shadow: 0 10px 20px rgba(95, 116, 112, 0.05);
}

.exercise-wizard--tabbed {
    padding-top: 4.75rem;
    padding-bottom: 12rem;
}

.exercise-wizard--question-flow {
    padding-top: 0;
    padding-bottom: 0;
}

.exercise-wizard--tabbed .wizard-tabs-card {
    position: sticky;
    top: 0.75rem;
    z-index: 15;
    padding: 0.15rem;
    backdrop-filter: blur(16px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 246, 241, 0.92));
    border-radius: 1.35rem;
    box-shadow: 0 14px 30px rgba(103, 127, 121, 0.11);
}

.wizard-tabs {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
}

.wizard-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 3rem;
    padding: 0.35rem;
    border: 1px solid rgba(64, 92, 86, 0.08);
    border-radius: var(--lc-radius-pill);
    background: rgba(248, 252, 250, 0.78);
    color: var(--lc-text);
    text-decoration: none;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.wizard-tab:hover,
.wizard-tab:focus {
    color: var(--lc-text);
    background: rgba(239, 249, 246, 0.98);
    border-color: rgba(87, 176, 168, 0.28);
}

.wizard-tab-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    background: rgba(96, 180, 172, 0.14);
    color: var(--lc-primary);
    font-size: 0.88rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.wizard-tab.is-current,
.wizard-tab[aria-current="step"] {
    background: linear-gradient(180deg, rgba(214, 242, 236, 0.98), rgba(255, 255, 255, 0.98));
    border-color: rgba(81, 165, 157, 0.46);
    box-shadow:
        inset 0 0 0 1px rgba(81, 165, 157, 0.08),
        0 10px 20px rgba(90, 145, 137, 0.12);
    transform: translateY(-1px);
}

.wizard-tab.is-current .wizard-tab-number,
.wizard-tab[aria-current="step"] .wizard-tab-number {
    background: linear-gradient(135deg, #3d988f, #2e756e);
    color: #fff;
}

.wizard-tab--complete {
    background: rgba(243, 250, 245, 0.95);
    border-color: rgba(77, 138, 107, 0.2);
}

.wizard-tab--complete .wizard-tab-number {
    background: rgba(77, 138, 107, 0.15);
    color: var(--lc-leaf);
}

.wizard-tab--pending {
    color: rgba(32, 36, 37, 0.78);
}

.wizard-tab--in_progress {
    border-color: rgba(96, 180, 172, 0.24);
}

.wizard-panels {
    display: grid;
    gap: 1.15rem;
    padding-bottom: 1rem;
}

.wizard-panels--fullscreen {
    min-height: calc(100dvh - var(--wizard-header-height) - var(--wizard-footer-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    align-items: center;
    padding: 0 0 1rem;
}

.wizard-panel--fullscreen {
    width: 100%;
    margin: 0 auto;
}

.wizard-panel__body {
    padding: 1.35rem 1.35rem 1.2rem;
}

.wizard-panel__body--intro {
    min-height: min(60dvh, 620px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-panel__body--question {
    display: grid;
    align-content: center;
    min-height: min(58dvh, 620px);
}

.exercise-wizard--tabbed .wizard-panel {
    background:
        radial-gradient(circle at top right, rgba(183, 230, 223, 0.18), rgba(183, 230, 223, 0) 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(251, 248, 243, 0.95));
}

.exercise-wizard--tabbed .wizard-panel .card-body {
    padding-top: 1.75rem !important;
}

.exercise-wizard--tabbed .question-block {
    box-shadow: 0 12px 24px rgba(95, 116, 112, 0.06);
}

.wizard-panel--intro .card-body {
    min-height: min(46vh, 420px);
    display: flex;
    align-items: center;
}

.wizard-panel--intro {
    background:
        radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 28%),
        radial-gradient(circle at 86% 16%, rgba(117, 203, 197, 0.22), rgba(117, 203, 197, 0) 24%),
        radial-gradient(circle at 78% 74%, rgba(196, 233, 221, 0.28), rgba(196, 233, 221, 0) 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 244, 238, 0.95));
}

.wizard-panel--question {
    min-height: auto;
}

.exercise-wizard--tabbed .wizard-panel {
    box-shadow: 0 14px 28px rgba(95, 116, 112, 0.08);
}

.exercise-wizard--tabbed .wizard-panel .card-body {
    position: relative;
    z-index: 1;
}

.wizard-action-card--tabbed {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 0.8rem;
    z-index: 30;
    width: auto;
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 246, 241, 0.95));
    box-shadow: var(--lc-shadow-lifted);
}

.wizard-action-card--compact {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.55rem;
    z-index: 30;
    width: auto;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 246, 241, 0.97));
    box-shadow: 0 16px 30px rgba(88, 113, 108, 0.16);
}

.wizard-action-card--fullscreen {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 36;
    padding:
        0
        var(--wizard-shell-gutter)
        calc(env(safe-area-inset-bottom) + 0.55rem);
}

.wizard-action-card__inner {
    width: min(calc(100% - (var(--wizard-shell-gutter) * 2)), var(--wizard-shell-max-width));
    margin: 0 auto;
    padding: 0.9rem 1rem 0.95rem;
    border: 1px solid rgba(64, 92, 86, 0.08);
    border-radius: 1.15rem;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(18px);
    box-shadow: 0 -4px 24px rgba(88, 113, 108, 0.12);
}

.wizard-bottom-progress {
    padding: 0.35rem 0 0.1rem;
}

.wizard-bottom-progress--compact {
    padding: 0;
}

.wizard-progress-bar--tabbed {
    height: 0.55rem;
}

.wizard-progress-bar--compact {
    height: 0.45rem;
}

.wizard-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.wizard-action-buttons .btn {
    min-width: 8.4rem;
}

.wizard-action-buttons--fullscreen {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.wizard-action-buttons--fullscreen .btn {
    min-width: 0;
}

.question-editor {
    display: grid;
    gap: 0.6rem;
}

@media (max-width: 991.98px) {
    .exercise-wizard--tabbed {
        padding-top: 4.5rem;
        padding-bottom: 12.75rem;
    }

    .exercise-wizard--fullscreen {
        --wizard-header-height: 5.1rem;
        --wizard-footer-height: 11rem;
    }

    .wizard-action-card {
        bottom: 0.6rem;
    }

    .wizard-action-card--tabbed {
        left: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .app-shell::before,
    .app-shell::after {
        opacity: 0.72;
    }

    .exercise-wizard--tabbed {
        padding-top: 4.15rem;
        padding-bottom: 14.35rem;
    }

    .exercise-wizard--fullscreen {
        --wizard-header-height: 4.9rem;
        --wizard-footer-height: 12.35rem;
    }

    .wizard-tabs {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(3.45rem, auto);
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scroll-snap-type: x proximity;
    }

    .wizard-tabs::-webkit-scrollbar {
        height: 0.35rem;
    }

    .wizard-tabs::-webkit-scrollbar-thumb {
        background: rgba(81, 165, 157, 0.22);
        border-radius: var(--lc-radius-pill);
    }

    .wizard-tab {
        justify-content: center;
        min-height: 3.05rem;
        padding: 0.3rem;
        scroll-snap-align: start;
    }

    .wizard-tab-number {
        width: 2rem;
        height: 2rem;
    }

    .wizard-panel--intro .card-body {
        min-height: auto;
    }

    .wizard-panel--question {
        min-height: auto;
    }

    .wizard-panel__body {
        padding: 1.1rem 1rem 1rem;
    }

    .wizard-question-title {
        font-size: 1.25rem;
    }

    .question-panel-help {
        font-size: 0.94rem;
    }

    .wizard-action-card--tabbed {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
    }

    .wizard-action-card--fullscreen {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-bottom: calc(env(safe-area-inset-bottom) + 0.45rem);
    }

    .wizard-action-card__inner {
        padding: 0.85rem 0.9rem 0.9rem;
    }

    .wizard-action-buttons--fullscreen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-action-buttons--fullscreen .btn:last-child:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .feedback-thread-message__meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .wizard-action-card .btn-lg,
    .wizard-action-card .wizard-nav-button {
        width: 100%;
        justify-content: center;
    }

    .table thead th {
        letter-spacing: 0.04em;
    }

    .exercise-wizard--fullscreen {
        --wizard-header-height: 4.65rem;
        --wizard-footer-height: 12.75rem;
    }

    .exercise-shell__header {
        padding-top: calc(env(safe-area-inset-top) + 0.35rem);
    }

    .exercise-shell__header-inner {
        padding: 0.75rem 0.85rem 0.7rem;
        border-radius: 1rem;
    }

    .exercise-shell__header-inner .h5 {
        font-size: 1rem;
    }

    .answer-textarea--solo {
        min-height: clamp(8.5rem, 24dvh, 10rem);
    }

    .wizard-panel__body--intro {
        min-height: auto;
    }

    .wizard-panel__body--question {
        min-height: auto;
        align-content: start;
    }

    .wizard-action-card__inner {
        border-radius: 1rem;
        padding: 0.8rem 0.8rem 0.85rem;
    }

    .wizard-bottom-progress--fullscreen .small {
        font-size: 0.76rem;
    }

    .wizard-action-buttons--fullscreen .btn {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }

    .question-flow-page {
        padding-bottom: calc(8.25rem + env(safe-area-inset-bottom, 0px));
    }

    .question-flow-compact-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .question-flow-nav {
        left: 0.55rem;
        right: 0.55rem;
        bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    }

    .question-flow-nav__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .question-flow-nav__progress {
        grid-column: 1 / -1;
        order: -1;
        text-align: center;
    }

    .question-flow-nav__button {
        min-width: 0;
        width: 100%;
        justify-self: stretch;
    }

    .question-flow-nav__button:last-child {
        justify-self: stretch;
    }

    .question-jump-form__controls {
        grid-template-columns: 1fr;
    }
}
