/* misc.css
   Lesson stars, mistake fixing, lesson player, progress, owner usage,
   daily review, hands-free, lesson pictures, languages quiz.
   Part of the old features.css, split in load order: see index.html. */

/* ===== What each lesson star is for ===== */
.star-steps { list-style: none; display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 4px 0 2px; }
.star-step { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14.5px; }
.star-step.is-done { color: var(--ink-2); }
.star-step-star { color: var(--warning-ink); font-size: 17px; width: 18px; text-align: center; }
.star-step:not(.is-done) .star-step-star { color: var(--faint); }
.star-step-go { font-size: 14px; }
.lesson-use.is-pulsing { animation: use-pulse 1.4s ease-out 1; }
@keyframes use-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 168, 102, 0.7); }
    100% { box-shadow: 0 0 0 14px rgba(34, 168, 102, 0); }
}
.lesson-card-stars { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.lesson-next-star { font-size: 11.5px; color: var(--success-ink); }

/* ===== Review mistakes: fix only the wrong part ===== */
.review-wrote { font-size: 17px; line-height: 1.6; font-weight: normal; }
.review-wrote-label { color: var(--muted); font-size: 14px; }
.review-wrong {
    background: rgba(229, 72, 77, 0.18);
    color: var(--danger-ink);
    border-radius: 4px;
    padding: 0 3px;
    text-decoration: line-through;
    text-decoration-color: rgba(229, 72, 77, 0.6);
}
.review-fix-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 6px;
    font-size: 19px;
    line-height: 1.5;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    margin-bottom: 4px;
}
.review-fix-word { color: var(--ink-2); }
.review-blank {
    font: inherit;
    font-size: 18px;
    min-width: 3ch;
    max-width: 100%;
    padding: 3px 8px;
    border: none;
    border-bottom: 2px solid var(--danger);
    border-radius: 6px 6px 0 0;
    background: rgba(229, 72, 77, 0.12);
    color: var(--ink);
    text-align: center;
}
.review-blank:focus { outline: none; background: rgba(18, 124, 181, 0.18); border-bottom-color: var(--primary); }
.review-blank.is-missing { border-bottom-style: dashed; }
.review-blank.is-right { background: rgba(34, 168, 102, 0.18); border-bottom-color: var(--success); color: var(--success-ink); }
.review-blank.is-wrong { text-decoration: line-through; color: var(--danger-ink); }
.review-blank-fix { color: var(--success-ink); font-weight: bold; }
.offline-card-sentence { font-size: 20px; line-height: 1.6; }
.offline-fixed { background: rgba(34, 168, 102, 0.22); color: var(--success-ink); border-radius: 4px; padding: 0 3px; }

/* ===== Third star earned mid-conversation ===== */
.star-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--primary);
    animation: star-in 0.35s ease-out;
}
.star-banner.is-earned {
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.18), rgba(34, 168, 102, 0.15));
    border-color: var(--warning);
}
.star-banner-icon { font-size: 28px; flex: none; }
.star-banner.is-earned .star-banner-icon { animation: star-pop 0.8s ease-out; }
.star-banner-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--ink-2); }
.star-banner-text b { font-size: 15.5px; color: var(--ink); }
@keyframes star-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes star-pop {
    0% { transform: scale(0.3) rotate(-30deg); }
    60% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
    .star-banner, .star-banner-icon { animation: none !important; }
}
.star-banner { grid-column: 1 / -1; }

/* ===== Lessons by level ===== */
.lesson-levels {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 16px;
}
.lesson-level-tab {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-width: 0;
}
.lesson-level-tab:hover { border-color: var(--line-strong); }
.lesson-level-tab.active { border-color: var(--primary); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--primary); }
.lesson-level-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lesson-level-code { font-size: 22px; font-weight: bold; color: var(--ink); }
.lesson-level-you {
    font-size: 10.5px;
    font-weight: bold;
    color: var(--success-ink);
    background: rgba(34, 168, 102, 0.15);
    border-radius: 999px;
    padding: 2px 7px;
    white-space: nowrap;
}
.lesson-level-name { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-level-bar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.lesson-level-fill { display: block; height: 100%; background: var(--success); border-radius: 3px; }
.lesson-level-count { font-size: 12px; color: var(--muted); }
.lesson-level-head { margin: 0 0 14px; }
.lesson-level-title { font-size: 20px; margin-bottom: 4px; }
.lesson-level-can { color: var(--muted); font-size: 14.5px; }
.lesson-level-can b { color: var(--ink-2); font-weight: normal; }
.lesson-review { margin-bottom: 16px; }
.lesson-review-card { border-color: var(--warning) !important; }
.lesson-review-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: bold;
    color: var(--warning-ink);
    background: rgba(201, 162, 39, 0.16);
    border-radius: 999px;
    padding: 2px 8px;
}
.lesson-review-badge + .lesson-offline-badge { margin-left: 6px; }
@media (max-width: 700px) {
    .lesson-levels { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
    .lesson-level-word { display: none; }
    .lesson-level-tab { padding: 10px 8px; gap: 4px; border-radius: 12px; }
    .lesson-level-code { font-size: 18px; }
    .lesson-level-you, .lesson-level-name { display: none; }
}

/* ===== Lesson player ===== */
.lesson-view { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.lv-nav { display: none; }
.lv-step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 20px;
}
.lv-step-label { font-size: 12px; font-weight: bold; letter-spacing: 0.6px; text-transform: uppercase; color: var(--primary-ink); margin-bottom: 12px; }
.lv-step-body { display: flex; flex-direction: column; gap: 12px; }
.lv-continue { display: none; }
.lv-tip { font-size: 13px; color: var(--muted); }
.lv-sub { font-size: 13px; font-weight: bold; color: var(--muted); margin-top: 4px; }

.lv-goal { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(34, 168, 102, 0.12); border: 1px solid var(--success); }
.lv-goal-label { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.6px; color: var(--success-ink); flex: none; }
.lv-goal-text { color: var(--success-ink); font-size: 15px; }
.lv-scene { font-size: 13.5px; color: var(--muted); font-style: italic; }
.lv-dialogue { display: flex; flex-direction: column; gap: 10px; }
.lv-line { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 88%; }
.lv-line.is-right { align-self: flex-end; align-items: flex-end; }
.lv-speaker { font-size: 11.5px; color: var(--muted); padding: 0 6px; }
.lv-bubble { background: var(--surface); border-radius: 14px 14px 14px 4px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.lv-line.is-right .lv-bubble { background: var(--primary-tint); border-radius: 14px 14px 4px 14px; }
.lv-bubble-top { display: flex; align-items: flex-start; gap: 8px; }
.lv-line-text { font-size: 16.5px; line-height: 1.45; color: var(--ink); }
.lv-hl { background: rgba(245, 197, 66, 0.25); color: var(--warning-ink); border-radius: 4px; padding: 0 2px; }
.lv-translation { font-size: 13.5px; color: var(--muted); }
.lv-speak { flex: none; border: none; background: var(--hover-fill); border-radius: 999px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; }
.lv-speak:hover { background: var(--hover-fill-strong); }

.lv-rule-title { font-size: 18px; }
.lv-rule { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); line-height: 1.5; }
.lv-table-wrap { overflow-x: auto; }
.lv-table { border-collapse: collapse; font-size: 14.5px; min-width: 60%; }
.lv-table th, .lv-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.lv-table th { background: var(--surface); color: var(--ink); }
.lv-table td { color: var(--ink-2); }
.lv-watch { border-left: 3px solid var(--warning); background: rgba(224, 165, 38, 0.08); padding: 10px 14px; border-radius: 0; display: flex; flex-direction: column; gap: 4px; }
.lv-watch b { color: var(--warning-ink); font-size: 13px; }
.lv-pair { font-size: 15.5px; }
.lv-wrong { color: var(--danger-ink); text-decoration: line-through; }
.lv-right { color: var(--success-ink); font-weight: bold; }
.lv-points { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.lv-point { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.lv-point-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lv-point-text { font-weight: bold; color: var(--ink); }
.lv-point-meaning { color: var(--muted); font-size: 14px; }
.lv-point-note { color: var(--muted); font-size: 12.5px; }

.lv-understand { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.lv-sentence { font-size: 17px; color: var(--ink); font-weight: bold; }
.lv-question { color: var(--muted); font-size: 14.5px; }
.lv-options { display: flex; flex-direction: column; gap: 8px; }
.lv-options-row { flex-direction: row; flex-wrap: wrap; }
.lv-options-row .lv-choice { flex: 1 1 120px; }
.lv-choice { text-align: left; }

.lv-practice { display: flex; flex-direction: column; gap: 10px; }
.lv-counter { font-size: 13px; color: var(--muted); }
.lv-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.lv-progress-fill { height: 100%; background: var(--primary); transition: width 0.3s; }
.lv-item { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.lv-kind { font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.lv-from { font-size: 13px; color: var(--muted); }
.lv-prompt { font-size: 18px; color: var(--ink); line-height: 1.6; }
.lv-meaning { font-size: 16px; color: var(--ink-2); }
.lv-blank {
    font: inherit;
    font-size: 17px;
    width: 9ch;
    min-width: 5ch;
    margin: 0 4px;
    padding: 2px 8px;
    border: none;
    border-bottom: 2px solid var(--primary);
    border-radius: 6px 6px 0 0;
    background: rgba(18, 124, 181, 0.14);
    color: var(--ink);
    text-align: center;
}
.lv-blank:focus { outline: none; background: rgba(18, 124, 181, 0.26); }
.lv-write {
    font: inherit;
    font-size: 16px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    resize: vertical;
}
.lv-write:focus { outline: none; border-color: var(--primary); }
.lv-built, .lv-bank { display: flex; flex-wrap: wrap; gap: 8px; min-height: 46px; padding: 8px; border-radius: 10px; }
.lv-built { border: 1px dashed var(--line-strong); background: var(--surface); }
.lv-chip {
    font: inherit;
    font-size: 16px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}
.lv-chip:hover { border-color: var(--primary); }
.lv-chip:disabled { cursor: default; opacity: 0.85; }
.lv-feedback { font-size: 14.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--surface); color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.lv-feedback.is-good { background: rgba(34, 168, 102, 0.14); border: 1px solid var(--success); }
.lv-feedback.is-bad { background: rgba(229, 72, 77, 0.12); border: 1px solid var(--danger); }
.lv-feedback.is-hint { background: rgba(224, 165, 38, 0.12); border: 1px solid var(--warning); }
.lv-feedback.is-hint::before { content: "💡"; }
.lv-answer b { color: var(--success-ink); }
.lv-why { color: var(--muted); font-size: 13.5px; }
.lv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lv-actions .landing-primary, .lv-continue, .lv-done { padding: 10px 22px; font-size: 15px; }
.lv-summary { display: flex; align-items: center; gap: 14px; }
.lv-result { flex-direction: column; align-items: flex-start; }
.lv-takeaways { padding-left: 20px; display: flex; flex-direction: column; gap: 5px; color: var(--ink-2); }
.lv-save { align-self: flex-start; }
.lv-done { align-self: flex-start; }
.lesson-view .lesson-use { border: none; padding: 0; background: none; }

/* Phones: one step at a time, like cards */
.lesson-view.is-paged .lv-nav {
    display: flex;
    gap: 5px;
    position: sticky;
    top: 56px;
    z-index: 5;
    padding: 8px 0;
    background: var(--surface);
}
.lv-dot { flex: 1; height: 6px; border: none; border-radius: 3px; background: var(--track); cursor: pointer; padding: 0; }
.lv-dot.is-past { background: var(--success); }
.lv-dot.is-current { background: var(--primary); }
.lesson-view.is-paged .lv-step { display: none; padding: 16px; }
.lesson-view.is-paged .lv-step.is-current { display: block; animation: lv-in 0.2s ease-out; }
.lesson-view.is-paged .lv-continue { display: block; width: 100%; margin-top: 16px; }
.lesson-view.is-paged .lv-line { max-width: 94%; }
.lesson-view.is-paged .lv-prompt { font-size: 17px; }
@keyframes lv-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lesson-view.is-paged .lv-step.is-current { animation: none; } }
.lv-step.is-pulsing { animation: use-pulse 1.4s ease-out 1; }
.lesson-view.is-paged .lv-continue[hidden] { display: none; }

/* Lessons click through one step at a time on every screen */
.lv-step-nav { display: flex; gap: 10px; margin-top: 18px; }
.lesson-view.is-paged .lv-continue { display: block; width: auto; margin-top: 0; flex: 1; }
.lesson-view.is-paged .lv-continue[hidden] { display: none; }
.lv-back { flex: none; }
.lv-step:first-of-type .lv-step-nav:empty { display: none; }
.lesson-view.is-paged .lv-nav { top: 0; border-radius: 0 0 10px 10px; }
.lesson-view.is-paged .lv-step { min-height: 340px; }
@media (min-width: 701px) {
    .lesson-view.is-paged .lv-step { padding: 24px 28px; }
    .lesson-view.is-paged .lv-continue { flex: 0 0 auto; min-width: 180px; margin-left: auto; }
}
@media (max-width: 700px) {
    .lesson-view.is-paged .lv-nav { top: 56px; }
}

/* The step bar scrolls with the page (pinned, it covered the lesson text) */
.lesson-view.is-paged .lv-nav {
    position: static;
    top: auto;
    padding: 0 0 4px;
    background: none;
    border-radius: 0;
}

/* ===== Weak spots: summary line ===== */
.weak-topic { text-transform: none; font-size: 15px; }
.weak-head { justify-content: flex-start; gap: 10px; }
.weak-new {
    font-size: 11px;
    font-weight: bold;
    color: var(--warning-ink);
    background: rgba(201, 162, 39, 0.16);
    border-radius: 999px;
    padding: 2px 8px;
}
.weak-summary { font-size: 13.5px; color: var(--muted); margin: 4px 0 6px; }
.weak-sum-total { color: var(--ink-2); font-weight: bold; }
.weak-sum-due { color: var(--orange-ink); }
.weak-sum-mastered { color: var(--success-ink); }
.weak-sum-muted { color: var(--faint); }
.weak-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-bottom: 10px; max-width: 260px; }
.weak-bar-fill { height: 100%; background: var(--success); border-radius: 2px; }

/* ===== Progress: one card for mistakes and saved words ===== */
.practice-hub { margin-top: 20px; padding: 0; overflow: hidden; }
.hub-tabs { display: flex; border-bottom: 1px solid var(--line); }
.hub-tab {
    flex: 1;
    padding: 16px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
}
.hub-tab:hover { color: var(--ink-2); }
.hub-tab.active { color: var(--ink); border-bottom-color: var(--primary); }
.hub-count { font-size: 12.5px; font-weight: bold; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; margin-left: 4px; }
.hub-count:empty { display: none; }
.hub-panel { padding: 18px 20px 20px; }

.mistake-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.overview-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.overview-stat { display: flex; flex-direction: column; min-width: 92px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.overview-stat b { font-size: 22px; color: var(--ink); }
.overview-stat span { font-size: 12.5px; color: var(--muted); }
.overview-stat.is-due b { color: var(--orange-ink); }
.overview-stat.is-good b { color: var(--success-ink); }
.overview-trend { font-size: 13.5px; color: var(--muted); flex: 1 1 200px; }
.overview-trend.is-good { color: var(--success-ink); }
.overview-go { margin-left: auto; text-decoration: none; padding: 10px 18px; font-size: 14.5px; }

.mistake-topics { display: flex; flex-direction: column; }
.topic-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: none; padding-bottom: 0; }
.topic-row.is-mastered { opacity: 0.75; }
.topic-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.topic-name { font-size: 16px; font-weight: bold; color: var(--ink); }
.topic-done { font-size: 11px; font-weight: bold; color: var(--success-ink); background: rgba(34, 168, 102, 0.15); border-radius: 999px; padding: 2px 8px; }
.topic-examples { display: flex; flex-direction: column; gap: 10px; }
.topic-example .weak-example { margin-bottom: 2px; }
.topic-remove { font-size: 12.5px; margin-top: 4px; align-self: flex-start; }
.topic-example { display: flex; flex-direction: column; align-items: flex-start; }
.topic-status { margin-left: 8px; font-size: 12px; }
.topic-status.is-good { color: var(--success-ink); }
.topic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.topic-btn { padding: 7px 14px; font-size: 13.5px; }

.hub-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; }
.hub-word { padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.hub-word.is-due { border-color: var(--warning); }
.hub-word-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hub-word-text { color: var(--ink); }
.hub-word-meaning { font-size: 13.5px; color: var(--muted); }
.hub-word-dots { display: inline-flex; gap: 3px; flex: none; }
.hub-word-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--track); }
.hub-word-dots i.on { background: var(--primary); }
.hub-all { grid-column: 1 / -1; justify-self: start; }

@media (max-width: 700px) {
    .hub-tab { padding: 14px 12px; font-size: 15px; }
    .hub-panel { padding: 14px; }
    .overview-go { margin-left: 0; width: 100%; text-align: center; }
    .overview-stat { min-width: 0; flex: 1; }
    .overview-stats { width: 100%; }
}

/* Error types: closed rows that open on click */
.topic-row { padding: 0; }
.topic-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 14px 4px;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.topic-toggle:hover .topic-name { color: var(--primary-ink); }
.topic-toggle .weak-summary { margin: 0; display: block; }
.topic-toggle .weak-bar { display: block; margin: 4px 0 0; }
.topic-toggle .weak-bar-fill { display: block; }
.topic-chevron { margin-left: auto; color: var(--muted); transition: transform 0.2s; }
.topic-row.is-open .topic-chevron { transform: rotate(180deg); }
.topic-detail { padding: 2px 4px 16px; }
.topic-tag { display: inline-block; font-size: 11.5px; color: var(--muted); background: var(--surface); border-radius: 6px; padding: 1px 7px; margin-top: 2px; }
.topic-row:last-child { padding-bottom: 0; }
.topic-head { width: 100%; }

/* Tabs: the selected one gets a soft background instead of a blue underline */
.hub-tabs { gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.hub-tab {
    flex: 0 1 auto;
    padding: 9px 16px;
    border: none;
    border-bottom: none;
    border-radius: 10px;
}
.hub-tab.active { border-bottom-color: transparent; background: var(--surface-2); color: var(--ink); }
.hub-tab:not(.active):hover { background: var(--hover-fill-soft); }
.hub-tab.active .hub-count { background: var(--primary); color: var(--on-color); }

/* Home: compact saved words, full width under Today and This week */
.home-words { grid-column: 1 / -1; }
.home-word-list { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
.home-words-line { display: flex; align-items: center; gap: 14px; }
.home-words-summary { font-size: 13.5px; color: var(--muted); flex: none; }
.home-words-mastered { color: var(--success-ink); font-weight: bold; }
.home-words-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.home-words-bar > div { height: 100%; background: var(--success); border-radius: 999px; }
.home-words-note { font-size: 12.5px; color: var(--muted); }
.home-word-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.home-word-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--success); background: rgba(34, 168, 102, 0.1); color: var(--ink-2); font-size: 14px; font-weight: bold; text-decoration: none; }
.home-word-pill:hover { background: rgba(34, 168, 102, 0.2); }
.home-word-pill.is-learning { border-color: var(--line); background: var(--surface); }
.home-word-pill.is-more { border-color: var(--line); background: transparent; color: var(--muted); font-weight: normal; }
.home-word-check { color: var(--success-ink); }
@media (max-width: 560px) { .home-words-line { flex-direction: column; align-items: stretch; gap: 6px; } .home-words-bar { flex: none; } }
.lv-translate-hint { font-size: 14px; color: var(--primary-ink); font-weight: bold; margin-top: -2px; }

/* ===== Owner: usage and errors ===== */
.owner-chart-users .owner-bar-fill { background: var(--success); }
.owner-error-list { display: flex; flex-direction: column; gap: 8px; }
.owner-model-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.owner-model { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.owner-model-status { flex: none; font-size: 11px; font-weight: bold; border-radius: 999px; padding: 2px 8px; margin-top: 2px; }
.owner-model-status.is-ok { background: rgba(48, 164, 108, 0.16); color: var(--success-ink); }
.owner-model-status.is-warn { background: rgba(245, 159, 0, 0.18); color: var(--orange-ink); }
.owner-model-status.is-bad { background: rgba(229, 72, 77, 0.15); color: var(--danger-ink); }
.owner-model-status.is-unknown { background: var(--track); color: var(--muted); }
.owner-model-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.owner-model-text b { word-break: break-all; }
.owner-model-text .settings-help { margin: 0; }
.owner-model-detail { color: var(--muted); font-size: 12px; word-break: break-word; }
.owner-model-when { flex: none; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .owner-model { flex-wrap: wrap; } .owner-model-when { width: 100%; } }
.owner-error { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.owner-error-head { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.owner-error-head::-webkit-details-marker { display: none; }
.owner-error-source { font-size: 11px; font-weight: bold; border-radius: 999px; padding: 2px 8px; flex: none; }
.owner-error-source.is-server { background: rgba(229, 72, 77, 0.15); color: var(--danger-ink); }
.owner-error-source.is-browser { background: rgba(18, 124, 181, 0.18); color: var(--primary-ink); }
.owner-error-kind { flex: none; }
.owner-error-message { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 14px; }
.owner-error-count { flex: none; color: var(--orange-ink); font-weight: bold; }
.owner-error[open] .owner-error-message { white-space: normal; }
.owner-error-detail { margin-top: 8px; padding: 10px; background: var(--surface); border-radius: 8px; font-size: 12px; color: var(--muted); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; }

/* ===== Random lessons ===== */
.lesson-level-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lesson-level-title-row .lesson-level-title { margin-bottom: 0; }
.lesson-random-btn {
    flex: none;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid var(--violet);
    background: rgba(109, 91, 208, 0.14);
    color: var(--violet-ink);
    font-weight: bold;
    font-size: 14.5px;
    cursor: pointer;
}
.lesson-random-btn:hover:not(:disabled) { background: rgba(109, 91, 208, 0.24); }
.lesson-random-btn:disabled { opacity: 0.7; cursor: wait; }
.lesson-level-title-row + .lesson-random-error:empty { display: none; }
.lesson-level-head .lesson-level-can { margin-top: 4px; }
.lesson-random-list { margin-bottom: 18px; }
.lesson-random-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: bold;
    color: var(--violet-ink);
    background: rgba(109, 91, 208, 0.16);
    border-radius: 999px;
    padding: 2px 8px;
}
.lesson-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 4px;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
}
.lesson-delete:hover,
.lesson-delete:focus-visible {
    color: var(--danger-ink);
    background: var(--surface-2);
    outline: none;
}
.lesson-random-badge + .lesson-review-badge,
.lesson-random-badge + .lesson-offline-badge { margin-left: 6px; }
@media (max-width: 560px) { .lesson-random-btn { width: 100%; } }

/* ===== Owner: AI spending ===== */
.owner-budget-meter { height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; margin: 10px 0 6px; }
.owner-budget-meter > div { height: 100%; background: var(--success); border-radius: 999px; }
.owner-budget-meter > div.is-warning { background: var(--warning); }
.owner-budget-meter > div.is-over { background: var(--danger); }
.owner-budget-line { font-weight: bold; margin-bottom: 12px; }
.owner-budget-top { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.owner-budget-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.owner-budget-row span { color: var(--muted); }
.owner-budget-limit { margin-left: auto; font-size: 11px; font-weight: bold; color: var(--danger-ink) !important; background: rgba(229, 72, 77, 0.15); border-radius: 999px; padding: 2px 8px; }

/* ===== Daily review ===== */
.daily-panel { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.daily-summary { display: flex; flex-direction: column; gap: 6px; }
.daily-big { font-size: 22px; font-weight: bold; }
.daily-go { align-self: flex-start; }
.daily-body { display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.daily-tag { align-self: flex-start; font-size: 12px; font-weight: bold; border-radius: 999px; padding: 3px 10px; }
.daily-tag.is-mistake { color: var(--orange-ink); background: rgba(255, 151, 64, 0.14); }
.daily-tag.is-word { color: var(--primary-ink); background: rgba(18, 124, 181, 0.16); }
.daily-tag.is-phrase { color: var(--violet-ink); background: rgba(109, 91, 208, 0.16); }
.daily-ask { color: var(--muted); font-size: 14px; }
.daily-front { font-size: 24px; font-weight: bold; line-height: 1.35; }
.daily-front.is-wrong { color: var(--danger-ink); font-size: 21px; }
.daily-context { color: var(--muted); font-size: 14px; font-style: italic; }
.daily-input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 17px; }
.daily-back { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.daily-label { font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.daily-answer { font-size: 21px; font-weight: bold; color: var(--success-ink); }
.daily-note { color: var(--muted); font-size: 14.5px; }
.daily-verdict { font-weight: bold; }
.daily-verdict.is-right { color: var(--success-ink); }
.daily-verdict.is-wrongish { color: var(--orange-ink); }
.daily-actions { display: flex; flex-direction: column; gap: 8px; }
.daily-show { align-self: stretch; }
.daily-how { font-size: 14px; color: var(--muted); text-align: center; }
.daily-ratings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.daily-rate { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 15px; }
.daily-rate span { font-size: 12px; color: var(--muted); }
.daily-rate:hover { background: var(--surface-3); }
.daily-rate.is-again b { color: var(--danger-ink); }
.daily-rate.is-hard b { color: var(--orange-ink); }
.daily-rate.is-good b { color: var(--success-ink); }
.daily-rate.is-easy b { color: var(--primary-ink); }
.daily-rate.is-suggested { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.daily-keys { text-align: center; }
@media (max-width: 700px) { .daily-keys { display: none; } .daily-front { font-size: 21px; } }

/* Voice: "Still there?" before the silence cutoff */
#mic-instructions.is-warning { color: var(--orange-ink); font-weight: bold; }

/* ===== Hands-free mode (Speak page) ===== */
.handsfree { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 10px; }
.handsfree-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: bold; font-size: 15px; }
.handsfree-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.handsfree-track { width: 40px; height: 22px; border-radius: 999px; background: var(--track); position: relative; transition: background 0.2s; flex: none; }
.handsfree-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); transition: transform 0.2s; }
.handsfree-toggle input:checked + .handsfree-track { background: var(--primary); }
.handsfree-toggle input:checked + .handsfree-track::after { transform: translateX(18px); }
.handsfree-toggle input:focus-visible + .handsfree-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.handsfree-toggle input:disabled + .handsfree-track { opacity: 0.5; }
.handsfree-hint { font-size: 12.5px; color: var(--muted); }
.handsfree-status { font-size: 13.5px; color: var(--muted); min-height: 1em; }
.handsfree-status:empty { display: none; }
.handsfree-status.is-on { color: var(--success-ink); }
.handsfree-status.is-error { color: var(--orange-ink); }

/* ===== Lesson pictures ===== */
.lv-point.has-picture { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.lv-point.has-picture .lv-picture { align-self: flex-start; }
.lv-point-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lv-picture { flex: none; width: 76px; height: 76px; margin: 0; border-radius: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.lv-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lv-picture.is-placeholder { background: transparent; border: 1.5px dashed var(--line-strong); flex-direction: column; gap: 2px; padding: 4px; text-align: center; }
.lv-picture-icon { font-size: 20px; opacity: 0.6; }
.lv-picture-query { font-size: 10.5px; color: var(--muted); line-height: 1.2; word-break: break-word; }
.lv-picture-big { width: 180px; height: 180px; margin: 6px auto 12px; }
.lv-picture-big img { object-fit: contain; }
.lv-picture-credit { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.daily-picture { width: 140px; height: 140px; margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.daily-picture img { width: 100%; height: 100%; object-fit: contain; display: block; }
.owner-picture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.owner-picture { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.owner-picture img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface); border-radius: 6px; }
.owner-picture figcaption { font-size: 12.5px; color: var(--muted); text-align: center; }
.owner-picture-actions { display: flex; justify-content: space-between; }
.owner-picture-waiting { grid-column: 1 / -1; }
@media (max-width: 560px) { .lv-picture { width: 60px; height: 60px; } }
.owner-picture-buttons { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== Languages quiz (onboarding) ===== */
body.is-onboarding { overflow: hidden; }
.onboarding { position: fixed; inset: 0; z-index: 3000; background: var(--surface); overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 32px 16px; }
.onboarding-card { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.onboarding-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onboarding-brand { font-weight: bold; font-size: 15px; color: var(--muted); }
.onboarding-steps { display: flex; gap: 6px; }
.onboarding-dot { width: 26px; height: 6px; border-radius: 999px; background: var(--surface-2); }
.onboarding-dot.is-on { background: var(--primary); }
.onboarding-dot.is-done { background: var(--success); }
.onboarding-body { display: flex; flex-direction: column; gap: 12px; }
.onboarding-title { font-size: 23px; margin: 4px 0 0; }
.onboarding-sub { color: var(--muted); font-size: 14.5px; }
.onboarding-kicker { font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary-ink); }
.onboarding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.onboarding-grid-wide { grid-template-columns: 1fr; }
.onboarding-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: bold; cursor: pointer; text-align: left; }
.onboarding-choice small { font-weight: normal; font-size: 13px; color: var(--muted); }
.onboarding-choice:hover, .onboarding-choice.is-selected { border-color: var(--primary); background: var(--surface-3); }
.onboarding-choice .flag { width: 32px; height: auto; border-radius: 3px; }
.onboarding-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onboarding-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 14.5px; }
.onboarding-chip.is-selected { background: var(--primary); border-color: var(--primary); color: var(--on-color); font-weight: bold; }
.onboarding-levels { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.onboarding-level-row { display: flex; flex-direction: column; gap: 6px; }
.onboarding-fluency { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.onboarding-fluency-btn { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font-weight: bold; font-size: 14px; }
.onboarding-fluency-btn small { font-weight: normal; color: var(--muted); font-size: 12px; }
.onboarding-fluency-btn.is-selected { border-color: var(--primary); background: rgba(34, 168, 102, 0.12); }
.onboarding-question { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.onboarding-prompt { font-weight: bold; font-size: 16px; }
.onboarding-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.onboarding-option.selected { border-color: var(--primary) !important; background: var(--primary) !important; color: var(--on-color) !important; font-weight: bold; }
.onboarding-unsure { align-self: flex-start; font-size: 13px; }
.onboarding-unsure.is-selected { color: var(--ink); font-weight: bold; }
.onboarding-actions { display: flex; justify-content: space-between; gap: 10px; }
.onboarding-actions .landing-primary:only-child { margin-left: auto; }
.onboarding-error:empty { display: none; }
.onboarding-emoji { font-size: 40px; }
.onboarding-summary { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.profile-languages-card { margin-bottom: 16px; }
.profile-languages { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.profile-languages-lines { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 560px) {
    .onboarding { padding: 0; }
    .onboarding-card { border-radius: 0; min-height: 100%; border: none; }
    .onboarding-options, .onboarding-fluency { grid-template-columns: 1fr; }
}
.onboarding-back { background: transparent; border: 1px solid var(--line); color: var(--ink-2); border-radius: 10px; padding: 10px 18px; font-size: 15px; font-weight: bold; cursor: pointer; }
.onboarding-back:hover { background: var(--surface-3); }


/* "All levels" next to the level title on the Lessons page */
.lesson-all-levels { margin-right: auto; font-size: 14px; }

/* ===== Lessons as a book =====
   Each step is a page: paper, a page number, and a page turn. Only the
   look changes. */
:root {
    --paper: #fbf7ee;
    --paper-edge: #e6dcc6;
    --paper-ink: #3b3326;
    --paper-shadow: rgba(80, 60, 30, 0.12);
    --ribbon: #c0392b;
    --paper-card: #fffdf8;
    --book-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #221d17;
        --paper-edge: #3a3226;
        --paper-ink: #e9dfcb;
        --paper-shadow: rgba(0, 0, 0, 0.45);
        --ribbon: #b8473a;
        --paper-card: #2d271f;
    }
}
:root[data-theme="dark"] {
    --paper: #221d17;
    --paper-edge: #3a3226;
    --paper-ink: #e9dfcb;
    --paper-shadow: rgba(0, 0, 0, 0.45);
    --ribbon: #b8473a;
    --paper-card: #2d271f;
}

.lesson-view.is-book { perspective: 1600px; }
/* cards, tables and boxes on the page take the paper's tone */
.lesson-view.is-book .lv-step { --surface: var(--paper-card); --line: var(--paper-edge); }
.lesson-view.is-book .lv-step {
    position: relative;
    border: 1px solid var(--paper-edge);
    border-radius: 4px 12px 12px 4px;
    /* the spine's shadow on the left edge */
    background: linear-gradient(to right, var(--paper-shadow), transparent 22px), var(--paper);
    /* two pages peeking out underneath */
    box-shadow:
        3px 3px 0 -1px var(--paper), 3px 3px 0 0 var(--paper-edge),
        6px 6px 0 -1px var(--paper), 6px 6px 0 0 var(--paper-edge),
        0 14px 30px var(--paper-shadow);
    margin-right: 6px;
    transform-origin: left center;
}
/* a ribbon bookmark on the open page */
.lesson-view.is-book .lv-step::before {
    content: "";
    position: absolute;
    top: -1px;
    right: 28px;
    width: 14px;
    height: 34px;
    background: var(--ribbon);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.lesson-view.is-book .lv-step-label {
    font-family: var(--book-font);
    font-size: 15px;
    font-weight: normal;
    font-style: italic;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--paper-ink);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--paper-edge);
}
.lesson-view.is-book .lv-step-label span { font-size: 22px; font-style: normal; }
.lv-folio {
    margin: 18px 0 0;
    text-align: center;
    font-family: var(--book-font);
    font-style: italic;
    font-size: 13px;
    color: var(--muted);
}
.lesson-view.is-book .lv-nav { gap: 3px; }
.lesson-view.is-book .lv-dot { height: 4px; }

/* turning the page: forward from the right, back from the left */
.lesson-view.is-book .lv-step.is-current { animation: book-turn 0.38s ease-out; }
.lesson-view.is-book[data-turn="back"] .lv-step.is-current { animation-name: book-turn-back; }
@keyframes book-turn {
    from { opacity: 0; transform: rotateY(-14deg) translateX(24px); }
    to { opacity: 1; transform: none; }
}
@keyframes book-turn-back {
    from { opacity: 0; transform: rotateY(10deg) translateX(-24px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .lesson-view.is-book .lv-step.is-current,
    .lesson-view.is-book[data-turn="back"] .lv-step.is-current { animation: lv-fade 0.2s ease-out; }
}
@keyframes lv-fade { from { opacity: 0; } to { opacity: 1; } }

/* A page fills the screen's height, and on big screens reads a bit larger */
.lesson-view.is-book .lv-step.is-current { display: flex; flex-direction: column; }
.lesson-view.is-book .lv-step-body { flex: 1; }
@media (min-width: 701px) {
    .lesson-view.is-book .lv-step { min-height: calc(100vh - 200px); padding: 32px 40px 22px; }
    .lesson-view.is-book .lv-step-body { font-size: 17px; }
}

/* Intro quiz: the welcome screen before the questions */
.onboarding-welcome { text-align: center; align-items: center; }
.onboarding-welcome .onboarding-emoji { margin: 0; }
.onboarding-points { list-style: none; padding: 0; margin: 6px auto; display: flex; flex-direction: column; gap: 10px; text-align: left; font-size: 15.5px; font-weight: 600; }
.onboarding-points li { display: flex; align-items: center; gap: 12px; }
.onboarding-point-icon { font-size: 22px; width: 28px; text-align: center; }
.onboarding-class-note { color: var(--primary-ink); font-weight: 700; }
.onboarding-card:has(.onboarding-welcome) .onboarding-actions { justify-content: center; }
.onboarding-card:has(.onboarding-welcome) .onboarding-actions .landing-primary { margin: 0; }

/* Owner page: sign-ups chart, learners and teachers stacked per bar */
.owner-span { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.owner-span-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.owner-span-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.owner-signup-numbers { margin: 4px 0 14px; }
.owner-stack-fill { display: flex; flex-direction: column-reverse; width: 100%; border-radius: 4px 4px 2px 2px; overflow: hidden; }
.owner-stack-fill.is-empty { background: var(--track); }
.owner-stack-part { display: block; flex-basis: 0; min-height: 2px; }
.owner-stack-part.is-learner, .swatch.is-learner { background: var(--primary); }
.owner-stack-part.is-teacher, .swatch.is-teacher { background: var(--success); }
.owner-stack-part.is-unconfirmed { opacity: 0.4; }
.owner-stack:hover .owner-stack-fill { filter: brightness(1.1); }
.owner-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.owner-legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.swatch.is-unconfirmed { background: var(--primary); opacity: 0.4; }
