      .selector-container {
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
      }
      .selector-sessions-history {
        margin-top: 40px;
        padding-bottom: 40px;
      }
      .sessions-history-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text);
        margin: 0 0 16px 0;
      }
      .table-responsive {
        overflow-x: auto;
      }
      .sessions-history-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.88rem;
      }
      .sessions-history-table th,
      .sessions-history-table td {
        padding: 10px 12px;
        text-align: left;
        border-bottom: 1px solid var(--border);
      }
      .sessions-history-table th {
        font-weight: 600;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-secondary);
      }
      .sessions-history-table .text-right {
        text-align: right;
      }
      .sessions-history-table .text-center {
        text-align: center;
      }
      .sessions-history-row {
        cursor: pointer;
        transition: background-color 0.15s ease;
      }
      .sessions-history-row:hover {
        background-color: var(--bg-surface-alt, #f8fafc);
      }
      .session-date-primary {
        font-weight: 600;
        color: var(--text);
      }
      .session-date-time {
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-top: 1px;
      }
      .session-cards-val {
        font-weight: 600;
        font-family: var(--font-display, inherit);
      }
      /* Horizontal segmented ratio bar */
      .session-ratio-bar--horizontal {
        display: inline-flex;
        flex-direction: row;
        width: 72px;
        height: 8px;
        border-radius: var(--radius-pill, 9999px);
        overflow: hidden;
        background: var(--bg-surface-alt, #e5e7eb);
        vertical-align: middle;
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
      }
      .session-ratio-bar--horizontal .session-ratio-segment--reviewed {
        background: #10b981;
        height: 100%;
        transition: width 0.2s ease;
      }
      .session-ratio-bar--horizontal .session-ratio-segment--flagged {
        background: #ef4444;
        height: 100%;
        transition: width 0.2s ease;
      }
      .session-ratio-bar--horizontal .session-ratio-segment--skipped {
        background: var(--text-light, #9ca3af);
        height: 100%;
        transition: width 0.2s ease;
      }

      /* HyGuru Session Summary Modal */
      .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
      }

      .modal-dialog {
        background: var(--bg-surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg, 16px);
        width: 90%;
        max-width: 580px;
        max-height: 85vh;
        overflow-y: auto;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        position: relative;
      }

      .fc-summary-modal-dialog {
        max-width: 680px;
        width: 95%;
        padding: 1.5rem;
      }

      .fc-summary-eyebrow {
        font-size: 0.74rem;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--accent-blue);
        letter-spacing: 0.06em;
        margin: 0 0 2px 0;
      }

      .hyguru-modal-close {
        background: transparent;
        border: none;
        font-size: 1.5rem;
        line-height: 1;
        color: var(--text-secondary);
        cursor: pointer;
        transition: color 0.15s;
        padding: 4px;
      }

      .hyguru-modal-close:hover {
        color: var(--text);
      }

      .fc-summary-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 1rem;
        margin-bottom: 1.25rem;
      }

      .fc-summary-tile {
        background: var(--bg-surface-alt);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm, 12px);
        padding: 1rem 1.15rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
      }

      .fc-summary-tile__label {
        font-size: 0.72rem;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--text-secondary);
        letter-spacing: 0.05em;
        margin-bottom: 6px;
      }

      .fc-summary-tile__value {
        font-family: var(--font-display, inherit);
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--text);
        line-height: 1.1;
        margin-bottom: 4px;
      }

      .fc-summary-tile__value--reviewed {
        color: #10b981;
      }

      .fc-summary-tile__value--flagged {
        color: #ef4444;
      }

      .fc-summary-tile__value--skipped {
        color: var(--text-secondary);
      }

      .fc-summary-tile__sub {
        font-size: 0.76rem;
        color: var(--text-secondary);
      }

      .fc-summary-progress-wrap {
        background: var(--bg-surface-alt);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm, 12px);
        padding: 1.25rem;
      }

      .fc-summary-progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text);
      }

      .fc-summary-segmented-bar {
        height: 12px;
        border-radius: var(--radius-pill, 9999px);
        overflow: hidden;
        background: var(--bg-surface);
        border: 1px solid var(--border);
        display: flex;
        width: 100%;
      }

      .fc-summary-bar-seg {
        height: 100%;
        transition: width 0.3s ease;
      }

      .fc-summary-bar-seg--reviewed {
        background: #10b981;
      }

      .fc-summary-bar-seg--flagged {
        background: #ef4444;
      }

      .fc-summary-bar-seg--skipped {
        background: var(--text-light, #9ca3af);
      }

      .fc-summary-legend {
        display: flex;
        gap: 1.25rem;
        margin-top: 12px;
        font-size: 0.8rem;
        color: var(--text-secondary);
        flex-wrap: wrap;
      }

      .fc-summary-legend-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
      }

      .fc-summary-legend-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
      }

      .selector-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-3);
        flex-wrap: wrap;
        margin-bottom: 0;
      }
      .selector-header-actions {
        display: flex;
        align-items: center;
        gap: var(--space-2);
      }
      .fc-deck-updated-label {
        font-size: 0.85rem;
      }
      .selector-notices {
        margin-bottom: 24px;
      }
      .selector-notices:not(:has(.flash-list)) {
        display: none;
      }
      .selector-title {
        margin: 0 0 4px 0;
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text);
      }
      .step-toggle-bar {
        display: flex;
        gap: 8px;
        margin-bottom: 16px;
      }
      .selector-columns-grid {
        display: grid;
        grid-template-columns: 1.2fr 1.2fr;
        gap: 24px;
        margin-bottom: 0;
        align-items: stretch;
      }
      @media (max-width: 992px) {
        .selector-columns-grid {
          grid-template-columns: 1fr;
        }
      }
      .selector-left-panel,
      .selector-right-panel {
        min-height: 400px;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
      }
      .selector-left-panel .panel-body-scroll,
      .selector-right-panel .panel-body-scroll {
        flex: 1;
        max-height: none;
        min-height: 0;
      }
      @media (min-width: 993px) {
        .selector-left-panel,
        .selector-right-panel {
          height: calc(100vh - var(--header-height, 64px) - var(--site-footer-height, 52px) - 270px);
          min-height: 380px;
          max-height: 640px;
        }
      }
      .fc-filter-action-bar {
        background: var(--bg-surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 14px 20px;
        margin-top: 1.25rem;
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
        flex-wrap: wrap;
      }
      .fc-filter-bar-group {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
      }
      .fc-filter-bar-label {
        font-size: 0.82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-secondary);
      }
      .fc-filter-bar-controls {
        display: flex;
        gap: 1.25rem;
        align-items: center;
        flex-wrap: wrap;
      }
      .fc-filter-checkbox {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.9rem;
        color: var(--text);
        cursor: pointer;
        user-select: none;
      }
      .fc-filter-checkbox input[type="checkbox"] {
        width: 17px;
        height: 17px;
        accent-color: var(--accent-blue);
        cursor: pointer;
      }
      .fc-filter-count {
        font-size: 0.82rem;
        color: var(--text-secondary);
      }
      .fc-action-controls-group {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
      }
      .selector-action-count {
        font-weight: 600;
        font-size: 1rem;
      }
      .filter-panel-card {
        padding: 20px;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
      }
      .panel-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
      }
      .panel-header {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text);
      }
      .fc-panel-select-toggle {
        width: 18px;
        height: 18px;
        margin: 0;
        flex-shrink: 0;
        cursor: pointer;
        accent-color: var(--accent-blue);
      }
      .system-row.is-disabled,
      .subtopic-row.is-disabled {
        opacity: 0.45;
        cursor: not-allowed;
        pointer-events: none;
      }
      .system-row.is-disabled:hover,
      .subtopic-row.is-disabled:hover {
        background-color: transparent;
      }
      .panel-body-scroll {
        max-height: 400px;
        overflow-y: auto;
        padding-right: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .category-row-container {
        border-bottom: 1px solid var(--border);
        padding-bottom: 12px;
      }
      .category-row-container:last-child {
        border-bottom: none;
        padding-bottom: 0;
      }
      .category-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .category-name {
        font-weight: 500;
        color: var(--text);
        font-size: 0.95rem;
      }
      .chevron-btn {
        background: transparent;
        border: none;
        color: var(--muted);
        cursor: pointer;
        font-size: 1.2rem;
        padding: 0 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease;
      }
      .chevron-btn.is-active {
        transform: rotate(90deg);
      }
      .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        opacity: 0;
        padding-left: 24px;
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      .accordion-content.is-open {
        max-height: 1000px;
        opacity: 1;
        margin-top: 8px;
      }
      .system-row,
      .subtopic-row,
      .subject-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: background-color var(--duration-fast) var(--ease-standard);
        gap: 8px;
        user-select: none;
      }
      .system-row:hover,
      .subtopic-row:hover,
      .subject-row:hover {
        background-color: var(--bg-surface-alt);
      }
      .system-row-left,
      .subtopic-row-left,
      .subject-row-left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-grow: 1;
      }
      .system-row-meta,
      .subtopic-row-meta,
      .subject-row-meta {
        font-size: 0.9rem;
        color: var(--text-secondary);
      }
      .start-study-btn {
        padding: 0 32px;
        height: 46px;
        font-size: 1.05rem;
      }
      #fc-start:disabled {
        opacity: 0.4 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
        filter: none !important;
      }
      .checkbox-grid-custom {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
      }
      .nbme-row {
        padding: 4px 0;
      }
      .filter-row-grid {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 20px 120px;
      }
      .fc-filter-bar {
        padding: 16px 24px;
        margin-bottom: 24px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background-color: var(--bg-surface);
      }
      .fc-filter-bar-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 0 0 auto;
      }
      .fc-filter-bar-group--filters {
        flex: 1 1 280px;
        min-width: 0;
      }
      .fc-filter-bar-label {
        margin: 0;
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        line-height: 1.2;
        white-space: nowrap;
      }
      .fc-filter-bar-controls {
        display: flex;
        align-items: center;
        min-height: 38px;
      }
      .fc-filter-bar-controls--filters {
        gap: 24px;
        flex-wrap: wrap;
      }
      .fc-filter-checkbox {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
        user-select: none;
      }
      .fc-filter-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin: 0;
        cursor: pointer;
        accent-color: var(--accent-blue);
      }
      .fc-filter-checkbox span {
        font-weight: 500;
        font-size: 0.95rem;
        color: var(--text);
        white-space: nowrap;
      }
      .fc-filter-count {
        color: var(--muted);
        font-size: 0.85rem;
        font-weight: normal;
      }
      .fc-limit-input {
        width: 105px;
        min-width: 95px;
        height: 38px;
        padding: 0 10px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background-color: var(--bg-surface);
        color: var(--text);
        font-weight: 600;
        font-size: 0.95rem;
        text-align: center;
        box-sizing: border-box;
      }
      @media (max-width: 768px) {
        .filter-row-grid {
          flex-direction: column;
          gap: 20px;
        }
        .fc-filter-action-bar {
          padding: 12px 14px;
          flex-direction: column;
          align-items: stretch;
          gap: 12px;
          width: 100%;
          max-width: 100%;
          box-sizing: border-box;
          overflow: hidden;
        }
        .fc-filter-bar-group,
        .fc-filter-bar-group--filters {
          flex-basis: auto;
          width: 100%;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 8px;
        }
        .fc-filter-bar-controls,
        .fc-filter-bar-controls--filters {
          display: grid;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 6px;
          width: 100%;
          box-sizing: border-box;
        }
        .fc-filter-checkbox {
          min-width: 0;
          padding: 6px 4px;
          font-size: 0.78rem;
          box-sizing: border-box;
          justify-content: center;
          text-align: center;
        }
        .fc-filter-checkbox span {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        .fc-filter-checkbox input[type="checkbox"] {
          width: 15px;
          height: 15px;
          flex-shrink: 0;
        }
        .fc-action-controls-group {
          width: 100%;
          display: flex;
          justify-content: space-between;
          align-items: center;
          gap: 8px;
        }
        .fc-limit-selector-container {
          flex: 1;
        }
        .selector-container {
          overflow-x: hidden;
          max-width: 100%;
          box-sizing: border-box;
        }
      }
      :root {
        --color-rating-reviewed: rgba(22, 163, 74, 0.12);   /* subtle green tint */
        --color-rating-flag: rgba(255, 193, 7, 0.12);       /* subtle amber/yellow tint */
        /* Study card fills most of .container (1400) without edge-to-edge */
        --fc-study-max-width: 1100px;
        --fc-study-pad-x: clamp(var(--space-5), 3vw, var(--space-40));
        --fc-prompt-max-width: 52rem;
      }

      .session-container {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh - var(--header-height) - var(--footer-height) - 96px);
        box-sizing: border-box;
        width: 100%;
      }

      .card-study {
        max-width: var(--fc-study-max-width);
        width: 100%;
        margin: var(--space-6) auto;
        padding: 0 !important;
        overflow: hidden;
      }

      .session-loading {
        text-align: center;
        padding: 48px 0;
        width: 100%;
      }

      /* Card Meta Bar */
      .card-meta-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-4) var(--fc-study-pad-x);
        border-bottom: 1px solid var(--border);
        background-color: var(--bg-surface);
      }
      .meta-left {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .meta-right {
        display: flex;
        align-items: center;
        gap: 16px;
      }

      /* NBME badge */
      .nbme-badge-group {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        position: relative;
      }

      .nbme-badge {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        background-color: var(--bg-surface-alt);
        border: 1px solid var(--border);
        border-radius: var(--radius-pill);
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-secondary);
        user-select: none;
      }

      .nbme-info-wrapper {
        position: relative;
        display: inline-flex;
        align-items: center;
      }

      .nbme-info-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 19px;
        height: 19px;
        border-radius: 50%;
        border: 1px solid var(--border);
        background: var(--bg-surface-alt);
        color: var(--text-secondary);
        cursor: pointer;
        padding: 0;
        transition: all 0.15s ease;
      }

      .nbme-info-btn:hover,
      .nbme-info-btn:focus-visible,
      .nbme-info-wrapper.is-open .nbme-info-btn {
        color: var(--accent-lavender, #c084fc);
        border-color: var(--accent-lavender, #c084fc);
        background: var(--bg-surface);
        outline: none;
      }

      .nbme-info-popover {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 280px;
        padding: 10px 12px;
        font-size: 0.76rem;
        line-height: 1.45;
        color: var(--text);
        background: var(--bg-surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm, 10px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
        z-index: 1100;
        pointer-events: auto;
        text-align: left;
      }

      .nbme-info-popover strong {
        display: block;
        margin-bottom: 3px;
        color: var(--text);
        font-weight: 600;
      }

      .nbme-info-wrapper:hover .nbme-info-popover,
      .nbme-info-wrapper:focus-within .nbme-info-popover,
      .nbme-info-wrapper.is-open .nbme-info-popover {
        display: block;
      }

      /* Session stopwatch timer */
      .fc-timer {
        font-size: 0.85rem;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        color: var(--text-secondary);
        letter-spacing: 0.03em;
        user-select: none;
      }

      /* .btn--danger-outline and .btn--undo moved to style.css (shared .btn modifiers) */

      /* Linear Progress Bar (bleeding edge-to-edge) */
      .linear-progress-container {
        width: 100%;
        height: 4px;
        background-color: var(--bg-surface-alt);
        position: relative;
        overflow: hidden;
      }
      .linear-progress-fill {
        height: 100%;
        width: 0%;
        background-color: var(--brand);
        border-radius: var(--radius-pill);
        transition: width 0.3s ease;
      }

      /* Vignette Panel */
      .vignette-panel {
        padding: var(--space-4) var(--fc-study-pad-x);
        background-color: var(--bg-surface-alt);
        border-bottom: 1px solid var(--border);
      }
      .section-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 600;
        color: var(--muted);
        margin-bottom: 8px;
      }
      .vignette-content {
        font-size: var(--vignette-font-size, 0.95rem);
        line-height: 1.6;
        color: var(--text-secondary);
        white-space: pre-wrap;
      }
      .vignette-zoom-controls {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .zoom-btn {
        background: none;
        border: 1px solid var(--border);
        border-radius: 4px;
        width: 26px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: bold;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 0;
      }
      .zoom-btn:hover {
        background-color: var(--bg-surface-alt);
        color: var(--brand);
        border-color: var(--brand);
      }
      .session-disclaimer {
        text-align: left;
        font-size: 0.75rem;
        color: var(--muted);
        line-height: 1.5;
        margin-top: 16px;
        margin-bottom: 24px;
        max-width: 100%;
        padding: var(--space-4) var(--fc-study-pad-x) 0;
        border-top: 1px solid var(--border);
      }

      /* Question & Answer Sections */
      .question-section,
      .answer-section {
        padding: var(--space-40) var(--fc-study-pad-x) var(--space-6);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
      }
      .answer-reveal {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: var(--space-4);
      }
      .answer-top-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        margin-bottom: var(--space-2);
      }
      .answer-text {
        font-size: calc(var(--vignette-font-size, 0.95rem) + 0.45rem);
        font-weight: 700;
        line-height: 1.5;
        color: var(--text);
        margin: 4px 0 0 0;
        width: 100%;
        max-width: var(--fc-prompt-max-width);
        white-space: pre-wrap;
        text-align: center;
      }
      .answer-body-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-5);
        width: 100%;
        align-items: start;
      }
      .answer-body-grid--has-image {
        grid-template-columns: minmax(0, 2.1fr) minmax(180px, 0.9fr);
      }
      .fc-edu-objective-box {
        background: var(--bg-surface-alt, #f9fafb);
        border: 1px solid var(--border, #e5e7eb);
        border-radius: var(--radius-md, 16px);
        padding: 1.25rem;
        text-align: left;
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
      }
      .fc-edu-objective-label {
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--accent-blue, #3b82f6);
      }
      .fc-edu-objective-text {
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--text, #111827);
      }
      .fc-edu-objective-text strong,
      .fc-edu-objective-text b {
        font-weight: 700;
        color: var(--text, #111827);
      }
      .fc-hyguru-video-btn-wrap {
        margin-top: var(--space-3);
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      .fc-hyguru-video-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text);
        background: var(--bg-surface, #ffffff);
        border: 1px solid var(--border, #e5e7eb);
        border-radius: var(--radius-sm, 12px);
        text-decoration: none;
        transition: all 0.2s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        line-height: 1;
      }
      .fc-hyguru-video-btn:hover {
        background: var(--bg-surface-warm, #fff7ed);
        border-color: var(--brand, #ffe5b4);
        color: var(--text);
      }
      .fc-hyguru-favicon,
      .answer-reveal__main .fc-hyguru-video-btn img.fc-hyguru-favicon {
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        display: inline-block !important;
        vertical-align: middle !important;
        width: 18px !important;
        height: 18px !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
      }
      .answer-reveal__main {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        min-width: 0;
        width: 100%;
        gap: var(--space-3);
      }
      .answer-reveal__media {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 0;
        width: 100%;
      }
      .answer-reveal__media[hidden] {
        display: none !important;
      }
      .fc-card-image {
        display: block;
        width: 100%;
        max-width: 100%;
        max-height: min(420px, 52vh);
        object-fit: contain;
        border-radius: var(--radius-md, 16px);
        border: 1px solid var(--border);
        background-color: var(--bg-surface-alt);
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
      }
      .fc-card-image-caption {
        margin-top: 6px;
        font-size: 0.78rem;
        color: var(--text-secondary, #4b5563);
        text-align: center;
      }
      .fc-media-nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.45);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        cursor: pointer;
        z-index: 5;
        transition: background 0.15s ease, transform 0.15s ease;
      }
      .fc-media-nav-btn:hover {
        background: rgba(0, 0, 0, 0.75);
        transform: translateY(-50%) scale(1.1);
      }
      .fc-media-nav-prev {
        left: 8px;
      }
      .fc-media-nav-next {
        right: 8px;
      }
      .fc-media-dots {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 8px;
      }
      .fc-media-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border, #d1d5db);
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
      }
      .fc-media-dot.active {
        background: var(--accent-blue, #2563eb);
        transform: scale(1.25);
      }
      .question-text {
        font-size: calc(var(--vignette-font-size, 0.95rem) + 0.25rem);
        font-weight: 600;
        line-height: 1.65;
        color: var(--text);
        margin: 16px 0 24px 0;
        width: 100%;
        max-width: var(--fc-prompt-max-width);
        white-space: pre-wrap;
        text-align: center;
      }

      /* Show Answer Button & shortcut */
      .show-answer-wrapper {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 24px;
      }
      .show-answer-btn {
        height: 48px !important;
        padding: 0 32px !important;
        min-width: 140px;
        font-weight: 600 !important;
        border-radius: var(--radius-btn) !important;
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }
      .shortcut-kbd {
        font-family: inherit;
        font-size: 0.75rem;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 2px 6px;
        margin-left: 4px;
        opacity: 0.8;
      }

      /* Divider separating states */
      .state-divider {
        margin: 4px 0;
        border: 0;
        border-top: 1px solid var(--border);
      }

      /* NBME Pearl Section */
      .pearl-section {
        padding: var(--space-4) var(--fc-study-pad-x);
        border-top: 1px solid var(--border);
      }
      .pearl-content-box {
        padding: 16px;
        background-color: var(--bg-surface-alt);
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        margin-top: 8px;
        text-align: left;
      }
      .pearl-text {
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--text-secondary);
        white-space: pre-wrap;
      }

      /* Rating & Action Section — Flag / Reviewed only (Learn more lives in .answer-section) */
      .rating-section {
        padding: var(--space-5) var(--fc-study-pad-x) var(--space-6);
        border-top: 1px solid var(--border);
      }
      .learn-more-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        margin: 0;
        width: 100%;
        max-width: var(--fc-prompt-max-width);
        color: var(--text-secondary);
        font-size: 0.95rem;
        font-weight: 500;
      }
      .answer-reveal--has-image .learn-more-links {
        align-items: stretch;
        text-align: left;
        max-width: none;
      }
      .learn-more-links__title {
        text-align: center;
        width: 100%;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 600;
        color: var(--muted);
      }
      .answer-reveal--has-image .learn-more-links__title {
        text-align: left;
      }
      .learn-more-links__list {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
      }
      .learn-more-link-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background-color: var(--bg-surface-alt);
        color: var(--text-secondary);
        text-decoration: none;
        transition: all var(--duration-fast) var(--ease-standard);
        width: 100%;
        text-align: center;
      }
      .answer-reveal--has-image .learn-more-link-item {
        justify-content: flex-start;
        text-align: left;
      }
      .learn-more-link-item:hover {
        color: var(--text);
        border-color: var(--brand);
        transform: translateY(-1px);
      }
      .learn-more-link-item__text {
        overflow-wrap: anywhere;
        text-align: center;
      }
      .answer-reveal--has-image .learn-more-link-item__text {
        text-align: left;
      }
      .learn-more-favicon {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        object-fit: cover;
        flex-shrink: 0;
      }

      /* Rating Buttons Row */
      .rating-row {
        display: flex;
        gap: 8px;
        width: 100%;
        margin-top: 0;
      }
      .show-question-wrap {
        text-align: center;
        margin-top: var(--space-4);
      }
      .rating-btn {
        flex: 1;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border-radius: var(--radius-btn) !important;
        cursor: pointer;
        padding: 8px 12px;
        transition: all var(--duration-fast) var(--ease-standard);
      }
      .rating-btn-label {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text);
      }
      .rating-btn--again .rating-btn-label {
        color: #dc2626;
      }
      .rating-btn--good .rating-btn-label {
        color: #2563eb;
      }
      .rating-btn--hard .rating-btn-label {
        color: #ea580c;
      }
      .rating-btn--easy .rating-btn-label {
        color: #16a34a;
      }
      .rating-btn-kbd {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-surface-alt);
        border: 1px solid var(--border);
        border-radius: 4px;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--muted);
        line-height: 1;
      }
      .rating-btn--again .rating-btn-kbd {
        background: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.25);
        color: #dc2626;
      }
      .rating-btn--good .rating-btn-kbd {
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.25);
        color: #2563eb;
      }
      .rating-btn--reviewed {
        background-color: rgba(16, 185, 129, 0.06) !important;
        border: 1px solid rgba(16, 185, 129, 0.18) !important;
      }
      .rating-btn--reviewed:hover {
        background-color: rgba(16, 185, 129, 0.14) !important;
        border-color: rgba(16, 185, 129, 0.35) !important;
        transform: translateY(-1px);
      }
      .rating-btn--flag {
        background-color: rgba(245, 158, 11, 0.06) !important;
        border: 1px solid rgba(245, 158, 11, 0.18) !important;
      }
      .rating-btn--flag:hover {
        background-color: rgba(245, 158, 11, 0.14) !important;
        border-color: rgba(245, 158, 11, 0.35) !important;
        transform: translateY(-1px);
      }

      /* Show Question link */
      .show-question-toggle {
        font-size: 0.85rem;
        color: var(--muted);
        cursor: pointer;
        font-weight: 500;
        user-select: none;
        transition: color var(--duration-fast) var(--ease-standard);
      }
      .show-question-toggle:hover {
        color: var(--text-secondary);
        text-decoration: underline;
      }

      /* Completion State Card styles */
      .completion-card {
        max-width: var(--fc-study-max-width);
        width: 100%;
        margin: var(--space-6) auto;
      }
      .completion-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        padding: var(--space-40) var(--fc-study-pad-x);
      }

      /* Responsive Rules */
      @media (max-width: 768px) {
        .session-container {
          padding-left: var(--space-3);
          padding-right: var(--space-3);
        }
        .card-study {
          margin-top: var(--space-4);
          margin-bottom: var(--space-4);
        }
        .card-meta-bar,
        .vignette-panel,
        .question-section,
        .answer-section,
        .pearl-section,
        .rating-section {
          padding-left: var(--space-4) !important;
          padding-right: var(--space-4) !important;
        }
        .answer-reveal--has-image {
          grid-template-columns: 1fr;
        }
        .answer-reveal--has-image .answer-reveal__main {
          align-items: center;
          text-align: center;
        }
        .answer-reveal--has-image .answer-reveal__main .section-label,
        .answer-reveal--has-image .learn-more-links__title {
          text-align: center;
        }
        .answer-reveal--has-image .answer-text {
          text-align: center;
        }
        .answer-reveal--has-image .learn-more-links {
          align-items: center;
          text-align: center;
        }
        .answer-reveal--has-image .learn-more-link-item {
          justify-content: center;
          text-align: center;
        }
        .answer-reveal--has-image .learn-more-link-item__text {
          text-align: center;
        }
        .fc-card-image {
          max-height: min(280px, 40vh);
        }
        .question-text,
        .answer-text {
          font-size: 1.05rem !important;
        }
        .rating-row:not(.review-rating-row) {
          flex-direction: column !important;
          gap: 8px !important;
        }
        .rating-row:not(.review-rating-row) .rating-btn {
          width: 100% !important;
          min-height: 52px !important;
          flex: none !important;
        }
        .learn-more-links {
          width: 100% !important;
          text-align: center !important;
          justify-content: center !important;
        }
        .card-meta-bar {
          flex-wrap: wrap !important;
          gap: 8px;
        }
      }

      .fc-limit-selector-container {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-right: 4px;
      }
      .fc-limit-selector-container .fc-limit-input {
        width: 105px;
        min-width: 95px;
        text-align: center;
        padding: 0 10px;
      }

/* ==========================================================================
   Review Page (/review) & Heatmap Component Styles
   ========================================================================== */
.site-shell--review {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
}

.site-shell--review .review-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: var(--fc-study-max-width, 1100px);
  margin: 0 auto;
  padding: var(--space-3) var(--container-pad-x, 1rem) var(--space-3);
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  overflow: visible;
}

.site-shell--review .review-stats-bar {
  flex-shrink: 0;
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 1000;
}

.site-shell--review .review-body-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.site-shell--review .review-card-box {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--shadow-2);
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.btn-sync {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #facc15;
  font-weight: 700;
  border-radius: var(--radius-pill, 9999px);
  padding: 5px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-sync:hover {
  background: #fde047;
  border-color: #eab308;
  color: #713f12;
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-sync {
  background: rgba(234, 179, 8, 0.22);
  color: #fef08a;
  border-color: rgba(234, 179, 8, 0.5);
}
[data-theme="dark"] .btn-sync:hover {
  background: rgba(234, 179, 8, 0.35);
  border-color: rgba(234, 179, 8, 0.7);
  color: #fef9c3;
}

.review-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-sm, 12px);
  padding: var(--space-3) var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-1);
}

.review-badge-group {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

.review-stat-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill, 9999px);
}

.badge-new { background: #eff6ff; color: #1d4ed8; }
.badge-learning { background: #fff7ed; color: #c2410c; }
.badge-review { background: #f0fdf4; color: #15803d; }

.badge-remaining {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill, 9999px);
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-secondary, #4b5563);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .badge-remaining {
  background: var(--bg-surface, #1e293b);
  border-color: var(--border, #334155);
  color: var(--text-secondary, #cbd5e1);
}

.review-action-btns {
  display: flex;
  gap: var(--space-2);
}

.review-card-box {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--shadow-2);
  height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.review-card-header {
  padding: var(--space-4) var(--space-6);
  background: transparent;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  height: 52px;
  flex-shrink: 0;
}

.review-subject-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background-color: var(--bg-surface-alt, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
  user-select: none;
  max-width: calc(100% - 28px);
  white-space: nowrap;
}

.review-subject-tag[style*="--tag-h"] {
  background-color: hsl(var(--tag-h), var(--tag-s, 70%), 94%);
  color: hsl(var(--tag-h), var(--tag-s, 70%), 28%);
  border-color: hsl(var(--tag-h), var(--tag-s, 70%), 85%);
}

[data-theme="dark"] .review-subject-tag[style*="--tag-h"] {
  background-color: hsl(var(--tag-h), var(--tag-s, 60%), 18%);
  color: hsl(var(--tag-h), var(--tag-s, 60%), 85%);
  border-color: hsl(var(--tag-h), var(--tag-s, 60%), 28%);
}

.review-card-body {
  padding: var(--space-6);
  flex: 1;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.review-card-body::before,
.review-card-body::after {
  content: '';
  margin: auto;
}

.review-prompt {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text, #111827);
  max-width: var(--fc-prompt-max-width, 52rem);
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: break-word;
}

.review-answer-divider {
  width: 100%;
  max-width: 300px;
  height: 1px;
  background: var(--border, #e5e7eb);
  margin: var(--space-6) 0;
  flex-shrink: 0;
}

.review-answer {
  font-size: 1.15rem;
  color: var(--text, #111827);
  max-width: var(--fc-prompt-max-width, 52rem);
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: break-word;
}

.cloze-deletion {
  color: #2563eb;
  font-weight: 700;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.cloze-blank {
  color: #2563eb;
  font-weight: 700;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 2px;
}

.review-notes {
  margin-top: var(--space-4);
  font-size: 0.95rem;
  color: var(--text-secondary, #4b5563);
  font-style: italic;
  background: var(--bg-surface-warm, #fff7ed);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm, 12px);
  border: 1px solid #fed7aa;
}

.review-media-wrap {
  width: 100%;
  max-width: var(--fc-prompt-max-width, 52rem);
  margin: var(--space-3) auto;
  display: flex;
  justify-content: center;
}

.review-card-img {
  max-height: 380px;
  max-width: 100%;
  border-radius: var(--radius-sm, 12px);
  object-fit: contain;
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: var(--space-4);
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  border-radius: var(--radius-sm, 12px);
  font-weight: 600;
  padding: 0.45rem 1.15rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-read-more:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.review-toolbar {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border, #e5e7eb);
  background: var(--bg-app, #f9fafb);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 72px;
  flex-shrink: 0;
}

[data-theme="dark"] .review-toolbar {
  background: var(--bg-surface, #151d2f);
  border-top-color: var(--border, #243047);
}

#btn-show-answer {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 12px);
  cursor: pointer;
}

.review-rating-row {
  display: flex;
  gap: var(--space-3);
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.rating-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-sm, 12px);
  border: 1px solid var(--border, #e5e7eb);
  background: var(--bg-surface, #ffffff);
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
}

.rating-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.rating-btn--again {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.rating-btn--again:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.rating-btn--hard {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #ea580c;
}
.rating-btn--hard:hover {
  background: #ffedd5;
  border-color: #fb923c;
  color: #c2410c;
}

.rating-btn--good {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
}
.rating-btn--good:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.rating-btn--easy {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}
.rating-btn--easy:hover {
  background: #dcfce7;
  border-color: #4ade80;
  color: #15803d;
}

[data-theme="dark"] .rating-btn--again,
[data-theme-resolved="dark"] .rating-btn--again {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .rating-btn--again .rating-btn-label,
[data-theme-resolved="dark"] .rating-btn--again .rating-btn-label {
  color: #fca5a5 !important;
}
[data-theme="dark"] .rating-btn--again .rating-btn-kbd,
[data-theme-resolved="dark"] .rating-btn--again .rating-btn-kbd {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .rating-btn--again:hover,
[data-theme-resolved="dark"] .rating-btn--again:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
  color: #f87171 !important;
}

[data-theme="dark"] .rating-btn--hard,
[data-theme-resolved="dark"] .rating-btn--hard {
  background: rgba(249, 115, 22, 0.15) !important;
  border-color: rgba(249, 115, 22, 0.45) !important;
  color: #fdba74 !important;
}
[data-theme="dark"] .rating-btn--hard .rating-btn-label,
[data-theme-resolved="dark"] .rating-btn--hard .rating-btn-label {
  color: #fdba74 !important;
}
[data-theme="dark"] .rating-btn--hard .rating-btn-kbd,
[data-theme-resolved="dark"] .rating-btn--hard .rating-btn-kbd {
  background: rgba(249, 115, 22, 0.25) !important;
  border-color: rgba(249, 115, 22, 0.45) !important;
  color: #fdba74 !important;
}
[data-theme="dark"] .rating-btn--hard:hover,
[data-theme-resolved="dark"] .rating-btn--hard:hover {
  background: rgba(249, 115, 22, 0.25) !important;
  border-color: rgba(249, 115, 22, 0.65) !important;
  color: #fb923c !important;
}

[data-theme="dark"] .rating-btn--good,
[data-theme-resolved="dark"] .rating-btn--good {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.45) !important;
  color: #93c5fd !important;
}
[data-theme="dark"] .rating-btn--good .rating-btn-label,
[data-theme-resolved="dark"] .rating-btn--good .rating-btn-label {
  color: #93c5fd !important;
}
[data-theme="dark"] .rating-btn--good .rating-btn-kbd,
[data-theme-resolved="dark"] .rating-btn--good .rating-btn-kbd {
  background: rgba(59, 130, 246, 0.25) !important;
  border-color: rgba(59, 130, 246, 0.45) !important;
  color: #93c5fd !important;
}
[data-theme="dark"] .rating-btn--good:hover,
[data-theme-resolved="dark"] .rating-btn--good:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  border-color: rgba(59, 130, 246, 0.65) !important;
  color: #60a5fa !important;
}

[data-theme="dark"] .rating-btn--easy,
[data-theme-resolved="dark"] .rating-btn--easy {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #6ee7b7 !important;
}
[data-theme="dark"] .rating-btn--easy .rating-btn-label,
[data-theme-resolved="dark"] .rating-btn--easy .rating-btn-label {
  color: #6ee7b7 !important;
}
[data-theme="dark"] .rating-btn--easy .rating-btn-kbd,
[data-theme-resolved="dark"] .rating-btn--easy .rating-btn-kbd {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #6ee7b7 !important;
}
[data-theme="dark"] .rating-btn--easy:hover,
[data-theme-resolved="dark"] .rating-btn--easy:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: rgba(16, 185, 129, 0.65) !important;
  color: #34d399 !important;
}

.rating-interval {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 2px;
}

/* Card Bottom Progress Bar */
.card-progress-bar-wrap {
  height: 5px;
  width: 100%;
  background: var(--bg-surface-alt, #f9fafb);
  overflow: hidden;
  flex-shrink: 0;
  border-bottom-left-radius: var(--radius-lg, 20px);
  border-bottom-right-radius: var(--radius-lg, 20px);
}

.card-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffe5b4 0%, #ffc078 50%, #ffa94d 100%);
  transition: width 0.35s ease;
}

[data-theme="dark"] .card-progress-bar-wrap {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .card-progress-bar-fill {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
}

/* Splash Screen & 3-Month Heatmap Styling */
.splash-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-4) var(--space-6);
  text-align: center;
  overflow-y: auto;
}

.heatmap-wrapper {
  width: 100%;
  max-width: 860px;
  margin-bottom: var(--space-4);
}

.heatmap-grid-wrapper {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.heatmap-month-box {
  background: transparent;
  border: none;
  padding: 0;
  width: auto;
}

.heatmap-month-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  width: 140px;
}

.heatmap-day-cell {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background-color: var(--bg-surface-alt, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  user-select: none;
  transition: transform 0.1s ease;
}

.heatmap-day-cell:hover {
  transform: scale(1.25);
  z-index: 2;
}

.heatmap-day-cell.empty {
  background: transparent;
  border: none;
}

.splash-timing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface-alt, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
}

@media (max-width: 768px) {
  .page-review html,
  .page-review body {
    overflow: hidden !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .page-review .site-shell {
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-bottom: 34px !important;
    box-sizing: border-box !important;
  }
  .page-review .site-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
    z-index: 100 !important;
    border-top: 1px solid var(--border, #e5e7eb) !important;
    background: var(--bg-surface, #ffffff) !important;
    color: var(--text-muted, #9ca3af) !important;
  }
  .site-shell--review .review-container,
  .review-container {
    flex: 1 1 auto;
    min-height: calc(100dvh - var(--header-height, 64px) - var(--site-footer-height, 64px) - var(--space-2, 8px));
    min-height: calc(100vh - var(--header-height, 64px) - var(--site-footer-height, 64px) - var(--space-2, 8px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 12px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
  }
  .review-stats-bar {
    padding: 0 4px;
    margin-bottom: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
    width: 100%;
    box-sizing: border-box;
  }
  .review-stats-bar.is-splash {
    display: none !important;
  }
  .review-badge-group {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .review-badge-group .badge-new,
  .review-badge-group .badge-learning,
  .review-badge-group .badge-review {
    display: none !important;
  }
  .review-badge-group .badge-remaining {
    display: none !important;
  }
  .site-shell--review .review-body-wrap,
  .review-body-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 0;
  }
  .site-shell--review .review-card-box,
  .review-card-box {
    width: 100%;
    min-height: 380px;
    height: auto;
    max-height: calc(100dvh - var(--header-height, 64px) - var(--site-footer-height, 64px) - 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: var(--radius-lg, 20px);
    margin: auto 0;
  }
  .splash-container {
    flex: 1;
    min-height: 0;
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-y: auto;
  }
  .heatmap-wrapper {
    margin-bottom: 8px;
    transform: scale(0.9);
    transform-origin: center center;
  }
  .heatmap-grid-wrapper {
    gap: 6px;
  }
  .heatmap-month-days {
    width: 105px;
    gap: 2px;
  }
  .heatmap-day-cell {
    width: 12px;
    height: 12px;
  }
  .review-card-header {
    height: 40px;
    padding: 6px 12px;
  }
  .site-shell--review .review-card-body,
  .review-card-body {
    flex: 1;
    min-height: 0;
    padding: 12px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .review-prompt {
    font-size: 1.05rem;
    line-height: 1.45;
  }
  .review-answer-divider {
    margin: 10px 0;
  }
  .review-answer {
    font-size: 1rem;
    line-height: 1.45;
  }
  .review-notes {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 0.825rem;
  }
  .btn-read-more {
    margin-top: 10px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
  }
  .review-toolbar {
    padding: 6px 8px;
    height: auto;
    min-height: 56px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #btn-show-answer {
    width: 100%;
    max-width: 100%;
    height: 44px;
    font-size: 0.95rem;
  }
  .review-rating-row {
    flex-direction: row;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    align-items: stretch;
  }
  .review-rating-row .rating-btn {
    flex: 1 1 0%;
    min-width: 0;
    padding: 6px 2px;
    font-size: 0.75rem;
    box-sizing: border-box;
    border-radius: var(--radius-sm, 10px);
  }
  .review-rating-row .rating-btn span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.75rem;
    line-height: 1.2;
  }
  .rating-interval {
    font-size: 0.65rem;
    line-height: 1;
  }
}

/* ── openQbank Vignette Breakdown Card Styles ── */
.vignette-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-2-5, 0.625rem);
  margin-top: var(--space-3, 0.75rem);
  text-align: left;
}

.vignette-row {
  background: var(--bg-surface-alt, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-sm, 12px);
  padding: var(--space-2-5, 0.625rem) var(--space-3-5, 0.875rem);
  transition: border-color var(--duration-base, 0.2s) var(--ease-standard, ease);
}

.vignette-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display, var(--font-sans, inherit));
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px var(--space-2, 0.5rem);
  border-radius: var(--radius-pill, 9999px);
  background: var(--accent-blue-baby, #b4ceff);
  color: var(--text-on-baby, #1e3a8a);
  margin-bottom: var(--space-1-5, 0.375rem);
}

.vignette-value {
  display: block;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text, #111827);
}

.sequential-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--bg-surface-alt, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-pill, 9999px);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary, #4b5563);
  margin-bottom: var(--space-3, 0.75rem);
  user-select: none;
}

.sequential-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill, 9999px);
  background: var(--accent-blue-deep, #3b82f6);
  box-shadow: 0 0 6px var(--accent-blue-deep, #3b82f6);
}

.vignette-row--pending {
  border-color: var(--accent-blue, #b4ceff);
  background: var(--bg-surface, #ffffff);
  box-shadow: 0 0 0 1px var(--accent-blue, #b4ceff);
}

.vignette-placeholder {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-muted, #9ca3af);
  font-style: italic;
  padding: 2px 0;
}

.vignette-placeholder-kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-style: normal;
  background: var(--bg-surface-alt, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 4px;
  color: var(--text-secondary, #4b5563);
}

