:root {
    --bg: #e9edf6;
    --surface: #f8fbff;
    --surface-2: #eff5ff;
    --stroke: #cfddf3;
    --ink: #13345f;
    --muted: #5d7390;
    --primary: #1f6fd0;
    --primary-strong: #0f4f9f;
    --success: #3a9a52;
    --shadow: 0 18px 40px rgba(13, 51, 99, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 10% 5%, #f5f9ff 0%, #e7eef8 50%, #dce6f4 100%);
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    filter: blur(0.5px);
}

.bg-shape-a {
    top: -110px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(116, 179, 255, 0.42) 0%, rgba(116, 179, 255, 0) 70%);
}

.bg-shape-b {
    right: -120px;
    bottom: -130px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 107, 179, 0.24) 0%, rgba(53, 107, 179, 0) 68%);
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(187, 208, 236, 0.8);
    background: rgba(248, 251, 255, 0.83);
    backdrop-filter: blur(8px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #dcedff;
    color: var(--primary);
}

.brand-mark svg {
    width: 20px;
    height: 20px;
}

.menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.menu a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    transition: 0.2s ease;
}

.menu a:hover {
    color: var(--primary-strong);
    background: #e5f0ff;
}

.page-stack {
    display: grid;
    gap: 1rem;
    padding-block: 1.2rem 2rem;
}

.card {
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, var(--surface) 0%, #f4f9ff 100%);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.section-card {
    padding: 1.5rem;
}

.section-card h2 {
    margin: 0 0 1rem;
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    color: var(--ink);
    text-align: center;
}

.hero-card {
    min-height: 340px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 1.25rem;
    padding: 1.7rem;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4f85c2;
    font-weight: 700;
    font-size: 0.78rem;
}

.hero-text h1 {
    margin: 0.45rem 0 0.85rem;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    line-height: 1.16;
    font-family: 'Sora', sans-serif;
}

.hero-text p {
    margin: 0;
    color: var(--muted);
    max-width: 57ch;
}

.hero-actions {
    margin-top: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.btn {
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.7rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(180deg, #2e84ea 0%, #1f6fd0 100%);
    color: #fff;
    box-shadow: 0 7px 16px rgba(31, 111, 208, 0.28);
}

.btn-ghost {
    border-color: #a6bfdf;
    color: var(--ink);
    background: #f5f9ff;
}

.btn-success {
    background: linear-gradient(180deg, #4cb36a 0%, #3a9a52 100%);
    color: #fff;
    box-shadow: 0 7px 16px rgba(58, 154, 82, 0.26);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hero-visual {
    background: linear-gradient(150deg, #c8e4ff 0%, #eff7ff 58%, #d4e7ff 100%);
    border: 1px solid #a7caee;
    border-radius: 14px;
    min-height: 250px;
    display: grid;
    place-items: center;
    padding: 0.65rem;
}

.hero-visual svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.topic-hint {
    text-align: center;
    margin-bottom: 0.8rem !important;
}

.topic-item {
    border: 1px solid #c6dbf5;
    border-radius: 12px;
    background: #f8fcff;
    text-align: center;
    padding: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topic-item:hover {
    transform: translateY(-3px);
    border-color: #90b9e7;
    box-shadow: 0 12px 24px rgba(26, 86, 153, 0.16);
}

.topic-item:focus-visible {
    outline: 3px solid rgba(31, 111, 208, 0.35);
    outline-offset: 3px;
}

.topic-item.is-active {
    border-color: #2e84ea;
    background: #f1f8ff;
    box-shadow: 0 12px 24px rgba(26, 86, 153, 0.16);
}

.topic-link {
    text-decoration: none;
    color: inherit;
}

.topic-thumb {
    width: 100%;
    height: 135px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid #cfe0f5;
    margin-bottom: 0.65rem;
}

.topic-item h3 {
    margin: 0;
    font-size: 1rem;
}

.topic-item p {
    margin: 0.5rem 0 0;
    font-size: 0.89rem;
    color: var(--muted);
}

.topic-detail {
    margin-top: 1rem;
    border: 1px solid #c6dbf5;
    border-radius: 12px;
    background: #f7fbff;
    padding: 1rem;
}

.topic-detail h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: var(--ink);
}

.topic-detail ul {
    margin: 0.7rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.55;
}

.topic-detail li + li {
    margin-top: 0.3rem;
}

.material-hero h1 {
    margin: 0.35rem 0 0.7rem;
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    line-height: 1.2;
}

.material-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
    align-items: center;
}

.material-hero-grid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #c8ddf5;
}

.material-section h2 {
    text-align: left;
}

.material-section p + p {
    margin-top: 0.7rem;
}

.material-section a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.material-section a:hover {
    color: var(--primary-strong);
}

.material-overview {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 0.8rem;
}

.material-nav-info {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.back-link {
    text-decoration: none;
    color: var(--primary-strong);
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.practice-list {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--ink);
    line-height: 1.7;
}

.practice-list li {
    margin-bottom: 0.6rem;
}

.practice-list li + li {
    margin-top: 0.6rem;
}

.material-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.material-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--surface-2);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    overflow: hidden;
}

.material-nav-item:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(31, 111, 208, 0.15);
    transform: translateY(-2px);
}

.material-nav-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.material-nav-item strong {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.material-nav-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid #cfe0f5;
}

.material-nav-item strong {
    font-size: 0.94rem;
}

.material-deep-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.material-block {
    border: 1px solid #c6dbf5;
    border-radius: 12px;
    background: #f7fbff;
    padding: 0.95rem;
}

.material-block h3 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
    color: var(--ink);
}

.material-block ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.55;
}

.material-block li + li {
    margin-top: 0.35rem;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.topology-box {
    position: relative;
    height: 190px;
    border: 1px solid #c8ddf5;
    border-radius: 12px;
    background: #f4f9ff;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.topology-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
}

.node {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #3d8eea;
    color: #fff;
    font-size: 0.77rem;
    font-weight: 700;
}

.node.center {
    width: 52px;
    height: 52px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #1f6fd0;
}

.node.n1 { top: 18px; left: 34px; }
.node.n2 { top: 18px; right: 34px; }
.node.n3 { bottom: 18px; left: 34px; }
.node.n4 { bottom: 18px; right: 34px; }

.line {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 90px;
    height: 3px;
    background: #6ca8e5;
    transform-origin: left center;
}

.l1 { transform: translate(-50%, -50%) rotate(-150deg); }
.l2 { transform: translate(-50%, -50%) rotate(-30deg); }
.l3 { transform: translate(-50%, -50%) rotate(150deg); }
.l4 { transform: translate(-50%, -50%) rotate(30deg); }

.section-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.inline-actions {
    margin-top: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.video-thumb {
    border: 1px solid #c4dbf6;
    border-radius: 12px;
    overflow: hidden;
    background: #0f223b;
    aspect-ratio: 16 / 9;
    margin-bottom: 0.8rem;
}

.video-thumb iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-hint {
    margin: 0 0 0.95rem !important;
    text-align: center;
    color: var(--muted);
}

.video-carousel-shell {
    position: relative;
}

.video-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(31, 111, 208, 0.92);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(19, 52, 95, 0.24);
    z-index: 2;
}

.video-carousel-control:hover {
    background: rgba(15, 79, 159, 0.98);
}

.video-carousel-control:focus-visible {
    outline: 3px solid rgba(31, 111, 208, 0.35);
    outline-offset: 3px;
}

.video-carousel-control-prev {
    left: -10px;
}

.video-carousel-control-next {
    right: -10px;
}

.video-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(320px, 78vw);
    gap: 0.95rem;
    overflow-x: auto;
    padding: 0 1rem 0.4rem;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #8eb5e3 #e7effa;
}

.video-carousel::-webkit-scrollbar {
    height: 10px;
}

.video-carousel::-webkit-scrollbar-track {
    background: #e7effa;
    border-radius: 999px;
}

.video-carousel::-webkit-scrollbar-thumb {
    background: #8eb5e3;
    border-radius: 999px;
}

.video-slide {
    border: 1px solid #c6dbf5;
    border-radius: 16px;
    background: #f7fbff;
    padding: 0.95rem;
    scroll-snap-align: start;
}

.video-slide h3 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
    color: var(--ink);
}

.video-thumb-large {
    margin-bottom: 0.9rem;
    border-radius: 16px;
}

.video-thumb-large iframe {
    border-radius: inherit;
}

.video-slide p {
    margin: 0;
}

.video-slide p + p {
    margin-top: 0.6rem;
}

.video-slide a {
    color: var(--primary-strong);
    font-weight: 700;
    text-decoration: none;
}

.video-slide a:hover {
    text-decoration: underline;
}

.video-thumb p {
    position: absolute;
    left: 0.8rem;
    top: 0.8rem;
    background: rgba(18, 52, 95, 0.72);
    color: #fff;
    border-radius: 7px;
    padding: 0.32rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.play-button {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(20, 65, 117, 0.95);
    box-shadow: 0 9px 22px rgba(19, 52, 95, 0.3);
    position: relative;
}

.play-button::before {
    content: '';
    position: absolute;
    left: 31px;
    top: 23px;
    border-left: 20px solid #fff;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.video-list {
    margin: 0.7rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.55;
}

.video-list li + li {
    margin-top: 0.3rem;
}

.quiz-card .quiz-question {
    margin-bottom: 0.95rem;
    color: var(--ink);
    font-weight: 700;
}

.quiz-layout {
    display: grid;
    gap: 1rem;
}

.quiz-stage {
    padding: 1.8rem;
}

.quiz-stage .quiz-question {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.35;
}

.quiz-result-panel {
    padding: 1.8rem;
}

.quiz-meta {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    margin-bottom: 0.65rem;
}

.quiz-progress,
.quiz-timer {
    margin: 0 !important;
    font-weight: 700;
    color: var(--ink);
    font-size: 0.92rem;
}

.quiz-timer-wrap {
    width: min(580px, 100%);
    display: grid;
    gap: 0.35rem;
    justify-items: center;
}

.quiz-timer {
    color: #155da8;
}

.quiz-timer-track {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e3eefb 0%, #d5e5f9 100%);
    border: 1px solid #c2d6ee;
    overflow: hidden;
}

.quiz-timer-track span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2e84ea 0%, #1f6fd0 100%);
    transform-origin: center center;
    transition: transform 0.1s linear;
    will-change: transform;
}

.quiz-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #dbe9fb;
    overflow: hidden;
    margin-bottom: 0.9rem;
}

.quiz-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2e84ea, #5aa0f5);
    transition: width 0.25s ease;
}

.quiz-options {
    display: grid;
    gap: 0.56rem;
    margin-bottom: 1rem;
}

.option {
    width: 100%;
    text-align: left;
    border: 1px solid #c7d8ee;
    background: #f9fcff;
    border-radius: 10px;
    padding: 0.75rem 0.78rem;
    color: var(--ink);
    cursor: pointer;
    font-weight: 600;
}

.option:hover {
    border-color: #8fb8e7;
    background: #f1f8ff;
}

.option.active {
    border-color: #2e84ea;
    background: #deecff;
}

.option.correct {
    border-color: #3a9a52;
    background: #e7f8ec;
}

.option.wrong {
    border-color: #c84545;
    background: #fdeceb;
}

.quiz-actions {
    justify-content: flex-end;
}

.full {
    width: 100%;
}

.score-card {
    text-align: center;
}

.score-badge {
    width: 120px;
    height: 120px;
    margin: 0.7rem auto 0.35rem;
    border-radius: 50%;
    border: 5px solid #7eb4eb;
    color: var(--primary-strong);
    font-size: 2.25rem;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    display: grid;
    place-items: center;
    background: #f5faff;
}

.score-card strong {
    display: inline-block;
    color: #fff;
    background: #2e84ea;
    border-radius: 8px;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.55rem;
}

.score-note {
    margin-bottom: 0.8rem;
}

.result-counts {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--ink);
}

.result-breakdown {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
    max-height: 320px;
    overflow: auto;
    text-align: left;
}

.result-breakdown li {
    border: 1px solid #c7d8ee;
    border-radius: 10px;
    background: #f8fcff;
    padding: 0.58rem 0.65rem;
    font-size: 0.88rem;
    color: var(--ink);
}

.result-breakdown li.correct-item {
    border-color: #9fd4ad;
    background: #edf9f1;
}

.result-breakdown li.wrong-item {
    border-color: #efb7b7;
    background: #fff0f0;
}

.result-meta {
    margin: 0;
    font-weight: 700;
    line-height: 1.45;
}

.result-explanation {
    margin-top: 0.45rem;
}

.result-explanation summary {
    cursor: pointer;
    color: #165ea9;
    font-weight: 700;
}

.result-explanation p {
    margin-top: 0.45rem !important;
}

.result-material-link {
    display: inline-block;
    margin-top: 0.35rem;
    text-decoration: none;
    font-weight: 700;
    color: #1f6fd0;
}

.history-card {
    text-align: left;
}

.history-caption {
    margin-bottom: 0.75rem !important;
    text-align: center;
}

.history-table-wrap {
    border: 1px solid #c7d8ee;
    border-radius: 12px;
    overflow: auto;
    background: #f9fcff;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.history-table th,
.history-table td {
    border-bottom: 1px solid #d9e5f4;
    padding: 0.62rem 0.7rem;
    font-size: 0.88rem;
    color: var(--ink);
    text-align: left;
}

.history-table th {
    background: #eaf3ff;
    font-weight: 700;
}

.history-table tbody tr:last-child td {
    border-bottom: 0;
}

.history-empty-cell {
    text-align: center !important;
    color: var(--muted) !important;
    font-style: italic;
}

.about-card {
    text-align: center;
    background: linear-gradient(165deg, #f9fcff 0%, #edf6ff 100%);
}

.team-grid {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.team-member {
    border: 1px solid #c7dbf4;
    border-radius: 12px;
    background: #f8fcff;
    padding: 0.65rem;
}

.team-member img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #c7dbf4;
}

.team-member h3 {
    margin: 0.55rem 0 0;
    font-size: 0.95rem;
    color: var(--ink);
}

.about-purpose {
    margin-top: 0.9rem !important;
}

.source-note {
    margin-top: 0.7rem !important;
    font-size: 0.87rem;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.55s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.12s; }
.reveal:nth-child(4) { animation-delay: 0.16s; }
.reveal:nth-child(5) { animation-delay: 0.2s; }
.reveal:nth-child(6) { animation-delay: 0.24s; }

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero-card,
    .split-grid,
    .topic-grid,
    .material-deep-grid,
    .material-hero-grid,
    .material-nav-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .video-carousel {
        grid-auto-columns: minmax(280px, 84vw);
    }

    .hero-card {
        min-height: auto;
    }

    .menu {
        gap: 0.4rem;
    }

    .menu a {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .quiz-stage {
        padding: 1.3rem;
    }

    .quiz-result-panel {
        padding: 1.3rem;
    }

    .quiz-stage .quiz-question {
        font-size: clamp(1.1rem, 1.8vw, 1.5rem);
        margin-bottom: 0.8rem;
    }

    .quiz-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .quiz-actions .btn {
        flex: 0 0 auto;
        min-width: 100px;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }

    .result-breakdown {
        max-height: 400px;
    }

    .history-table-wrap {
        font-size: 0.8rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 620px) {
    .site-header {
        position: static;
    }

    .nav-wrap {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.7rem 0;
    }

    .menu {
        flex-wrap: wrap;
    }

    .section-card,
    .hero-card {
        padding: 1.1rem;
    }

    .quiz-stage {
        padding: 1rem;
    }

    .quiz-result-panel {
        padding: 1rem;
    }

    .quiz-stage .quiz-question {
        font-size: clamp(1rem, 1.5vw, 1.3rem);
        margin-bottom: 0.7rem;
    }

    .quiz-meta {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .quiz-progress,
    .quiz-timer {
        font-size: 0.8rem;
    }

    .quiz-timer-wrap {
        width: 100%;
    }

    .quiz-options {
        gap: 0.4rem;
        margin-bottom: 0.8rem;
    }

    .option {
        padding: 0.65rem 0.6rem;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .quiz-actions {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: center;
    }

    .quiz-actions .btn {
        width: 100%;
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    .score-badge {
        width: 100px;
        height: 100px;
        font-size: 1.85rem;
    }

    .result-counts {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .result-breakdown {
        max-height: 300px;
    }

    .result-breakdown li {
        padding: 0.5rem 0.55rem;
        font-size: 0.8rem;
    }

    .result-meta {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .result-explanation summary {
        font-size: 0.85rem;
    }

    .result-explanation p {
        font-size: 0.8rem;
    }

    .result-material-link {
        font-size: 0.85rem;
    }

    .history-table {
        min-width: 100%;
        font-size: 0.75rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.4rem 0.35rem;
        font-size: 0.75rem;
        border-bottom: 1px solid #d9e5f4;
    }

    .inline-actions {
        flex-wrap: wrap;
    }

    .inline-actions .btn {
        flex: 1;
        min-width: 120px;
        font-size: 0.8rem;
    }
}
