    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --xjtlu-blue: #003087;
      --xjtlu-blue-light: #EEF2F9;
    }

    body {
      font-family: var(--font-body);
      font-size: var(--fs-md);
      line-height: var(--lh-base);
      color: var(--ink-1);
      background: var(--bg-base);
      min-height: 100vh;
      padding: 24px 16px;
    }

    .container {
      max-width: 780px;
      margin: 0 auto;
    }

    h1 {
      font-family: var(--font-heading);
      font-size: var(--text-xl);
      font-weight: 700;
    }

    .subtitle {
      color: var(--ink-3);
      font-size: var(--fs-sm);
      margin: 4px 0 24px;
    }

    /* Step nav */
    .steps {
      display: flex;
      background: var(--bg-card);
      border-radius: var(--r-lg);
      padding: 4px;
      box-shadow: var(--shadow-xs);
      margin-bottom: 24px;
    }

    .stp {
      flex: 1;
      text-align: center;
      padding: 9px 4px;
      border-radius: var(--r-md);
      font-size: var(--fs-sm);
      color: var(--ink-4);
    }

    .stp.active {
      background: var(--primary-color);
      color: white;
      font-weight: 600;
    }

    .stp.done {
      background: var(--s-new-bg);
      color: var(--s-new-fg);
    }

    /* Cards */
    .card {
      background: var(--bg-card);
      border-radius: var(--card-radius);
      padding: 20px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-soft);
    }

    .card h2 {
      font-size: var(--fs-md);
      font-weight: 600;
      color: var(--ink-2);
      margin-bottom: 14px;
    }

    /* Inputs */
    label {
      display: block;
      font-size: var(--fs-xs);
      font-weight: 500;
      color: var(--ink-3);
      margin-bottom: 4px;
    }

    textarea,
    input[type=date],
    select {
      border: 1px solid var(--border);
      border-radius: var(--r-md);
      padding: 8px 12px;
      font-size: var(--fs-sm);
      width: 100%;
      background: var(--bg-card);
      color: var(--ink-1);
      font-family: var(--font-body);
    }

    textarea {
      font-family: var(--font-mono);
      font-size: var(--fs-xs);
      min-height: 150px;
      resize: vertical;
    }

    input[type=number] {
      width: 50px;
      text-align: center;
      padding: 6px 2px;
      border: 1px solid var(--border);
      border-radius: var(--r-sm);
      font-size: var(--fs-sm);
    }

    textarea:focus,
    input:focus,
    select:focus {
      outline: none;
      border-color: var(--border-focus);
      box-shadow: 0 0 0 3px rgba(44, 83, 56, .12);
    }

    .form-row {
      display: flex;
      gap: 14px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }

    .form-col {
      flex: 1;
      min-width: 160px;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 9px 18px;
      border-radius: var(--btn-radius);
      font-size: var(--fs-sm);
      font-weight: 500;
      cursor: pointer;
      border: none;
      transition: filter var(--dur-fast) var(--ease-standard);
      font-family: var(--font-body);
    }

    .btn:hover {
      filter: brightness(.92);
    }
    .btn:disabled {
      cursor: not-allowed;
      opacity: 0.52;
      filter: none;
    }

    .btn-primary {
      background: var(--primary-color);
      color: white;
    }

    .btn-ghost {
      background: var(--bg-muted);
      color: var(--ink-2);
      border: 1px solid var(--border);
    }

    .btn-success {
      background: var(--s-new-fg);
      color: white;
    }

    /* Alerts */
    .alert {
      padding: 10px 14px;
      border-radius: var(--r-md);
      font-size: var(--fs-sm);
      margin-bottom: 14px;
    }

    .alert-info {
      background: var(--status-blue-bg);
      color: var(--status-blue-text);
      border: 1px solid var(--status-blue-border);
    }

    .alert-warn {
      background: var(--s-pending-bg);
      color: var(--s-pending-fg);
      border: 1px solid #fde68a;
    }

    .alert-ok {
      background: var(--s-new-bg);
      color: var(--s-new-fg);
      border: 1px solid #6ee7b7;
    }

    /* Layout day inputs */
    .layout-wrap {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 6px;
    }

    .layout-day {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 10px 12px;
      background: var(--bg-muted);
      border-radius: var(--card-radius);
      border: 1px solid var(--border);
      min-width: 84px;
      flex: 1;
    }

    .layout-day span {
      font-size: 10px;
      font-weight: 700;
      color: var(--ink-4);
      letter-spacing: .05em;
    }

    .scroller-val {
      font-family: var(--font-number);
      font-size: 20px;
      font-weight: 800;
      color: var(--primary-color);
      line-height: 1;
      margin: 4px 0;
      width: 40px;
      text-align: center;
      border: none;
      background: transparent;
      outline: none;
      appearance: textfield;
      -moz-appearance: textfield;
    }

    .scroller-val::-webkit-outer-spin-button,
    .scroller-val::-webkit-inner-spin-button {
      -webkit-appearance: none;
      appearance: none;
      margin: 0;
    }

    .day-col {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 4px;
      background: var(--border);
      border-radius: 4px;
      outline: none;
      margin-top: 4px;
    }

    .day-col::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 14px;
      height: 14px;
      background: var(--primary-color);
      border-radius: 50%;
      border: 2px solid white;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      cursor: pointer;
    }

    .cols-hint {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--ink-3);
      margin-top: 12px;
      text-align: right;
    }

    /* Ambiguous correction */
    .amb-slot {
      border: 1px solid #fde68a;
      border-radius: var(--r-lg);
      padding: 14px;
      margin-bottom: 12px;
      background: var(--s-pending-bg);
    }

    .amb-slot-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--s-pending-fg);
      margin-bottom: 10px;
    }

    .btn-confirm-all {
      font-size: 11px;
      padding: 3px 10px;
      border-radius: var(--r-sm);
      background: var(--s-new-bg);
      color: var(--s-new-fg);
      border: 1px solid #6ee7b7;
      cursor: pointer;
      font-weight: 600;
      flex-shrink: 0;
      font-family: var(--font-body);
    }

    .btn-confirm-all:hover {
      filter: brightness(.94);
    }

    /* Guide line wrapping consecutive auto-follow items */
    .auto-follow-group {
      border-left: 2px solid var(--border);
      margin-left: 8px;
      padding-left: 10px;
      margin-top: 2px;
    }

    .auto-follow-group .amb-item {
      opacity: 0.6;
    }

    .amb-item {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
      font-size: var(--fs-sm);
    }

    .amb-item:last-child {
      margin-bottom: 0;
    }

    .amb-name {
      flex: 1;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .badge {
      display: inline-block;
      padding: 2px 7px;
      border-radius: var(--r-pill);
      font-size: 11px;
      font-weight: 600;
      flex-shrink: 0;
    }

    .badge-ok {
      background: var(--s-new-bg);
      color: var(--s-new-fg);
    }

    .badge-warn {
      background: var(--s-pending-bg);
      color: var(--s-pending-fg);
    }

    .amb-item select {
      width: 130px;
      flex-shrink: 0;
      padding: 4px 6px;
      font-size: var(--fs-xs);
    }

    /* Course table */
    .tbl-wrap {
      overflow-x: auto;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: var(--fs-xs);
    }

    th {
      background: var(--bg-muted);
      padding: 8px 10px;
      text-align: left;
      border-bottom: 2px solid var(--border);
      font-weight: 600;
      white-space: nowrap;
      color: var(--ink-2);
    }

    td {
      padding: 7px 10px;
      border-bottom: 1px solid var(--bg-muted);
      vertical-align: middle;
    }

    tr.amb-row td:first-child {
      border-left: 3px solid var(--s-pending-fg);
    }

    tr:hover td {
      background: var(--bg-muted);
    }

    .actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 16px;
    }

    .hidden {
      display: none !important;
    }

    /* Day select state styles */
    select.sel-fixed {
      color: var(--s-new-fg);
      font-weight: 600;
      border-color: #6ee7b7;
    }

    select.sel-manual {
      color: var(--status-blue-text);
      font-weight: 700;
      border-color: var(--status-blue-border);
    }

    select.sel-auto {
      color: var(--ink-4);
      font-style: italic;
    }

    .badge-manual {
      background: var(--status-blue-bg);
      color: var(--status-blue-text);
    }

    /* ── Tutorial modal ──────────────────────────────────────────────────── */
    .tutor-overlay {
      position: fixed;
      inset: 0;
      background: var(--scrim);
      z-index: 200;
      display: flex;
      align-items: flex-end;
      justify-content: center;
    }

    .tutor-modal {
      background: var(--bg-card);
      border-radius: 16px 16px 0 0;
      width: 100%;
      max-width: 540px;
      max-height: 88vh;
      display: flex;
      flex-direction: column;
    }

    @media (min-width: 560px) {
      .tutor-overlay { align-items: center; }
      .tutor-modal { border-radius: var(--modal-radius); max-height: 90vh; }
      /* 竖屏视频在桌面端限制高度，保持比例居中 */
      .tutor-media-item video {
        width: auto;
        max-width: 100%;
        max-height: 58vh;
        margin: 0 auto;
      }
    }

    .tutor-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 12px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }

    .tutor-modal-head h3 {
      font-size: var(--fs-lg);
      font-weight: 700;
      font-family: var(--font-heading);
    }

    .tutor-step-counter {
      font-size: var(--fs-sm);
      color: var(--ink-3);
      margin-left: auto;
      margin-right: 12px;
    }

    .btn-close {
      width: 28px;
      height: 28px;
      border: none;
      background: var(--bg-muted);
      border-radius: 50%;
      font-size: var(--fs-md);
      cursor: pointer;
      color: var(--ink-3);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* Carousel */
    .tutor-carousel {
      overflow: hidden;
      flex: 1;
      min-height: 0;
    }

    .tutor-slides {
      display: flex;
      height: 100%;
      transition: transform 0.3s ease;
    }

    .tutor-slide {
      min-width: 100%;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 16px 20px 8px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .tutor-slide-caption {
      font-size: var(--fs-sm);
      color: var(--ink-2);
      line-height: 1.6;
    }

    .tutor-media-item {
      width: 100%;
      border-radius: var(--r-md);
      overflow: hidden;
      border: 1px solid var(--border);
      line-height: 0;
    }

    .tutor-media-item img,
    .tutor-media-item video {
      width: 100%;
      height: auto;
      display: block;
    }

    .tutor-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 20px 20px;
      border-top: 1px solid var(--border);
      flex-shrink: 0;
    }

    .tutor-dots {
      display: flex;
      gap: 6px;
    }

    .tutor-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--border);
      transition: background 0.2s, width 0.2s;
    }

    .tutor-dot.active {
      background: var(--accent);
      width: 18px;
      border-radius: 3px;
    }

    .tutor-nav-btn {
      background: none;
      border: 1px solid var(--border);
      border-radius: var(--r-sm);
      padding: 6px 14px;
      font-size: var(--fs-sm);
      cursor: pointer;
      color: var(--ink-2);
      font-family: var(--font-body);
      transition: opacity 0.15s;
    }

    .tutor-nav-btn:disabled {
      opacity: 0.25;
      cursor: default;
    }

    /* ── Timetable Grid ──────────────────────────────────────────────────── */
    .timetable-wrap {
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      max-height: 60vh;
      border: 1px solid var(--border);
      border-radius: var(--r-sm);
    }

    .timetable {
      display: grid;
      grid-template-columns: 44px repeat(var(--cols, 7), 60px);
      grid-template-rows: 28px repeat(24, 48px);
      width: max-content;
      min-width: 100%;
      background: var(--bg-card);
    }

    .tt-corner {
      position: sticky; top: 0; left: 0; z-index: 4;
      background: var(--bg-muted);
      border-right: 1px solid var(--border);
      border-bottom: 2px solid var(--border);
    }

.tt-day-head {
  position: sticky; top: 0; z-index: 3;
  background: var(--bg-muted);
      font-size: 11px;
      font-weight: 700;
      color: var(--ink-2);
      border-bottom: 2px solid var(--border);
      border-left: 1px solid var(--border);
      display: flex;
      align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}

.tt-day-head.tt-day-split {
  border-right: 1px solid var(--border);
}

.tt-day-head.tt-day-split-strong {
  border-right: 2px solid var(--ink-3);
}

    .tt-time {
      position: sticky; left: 0; z-index: 2;
      background: var(--bg-card);
      grid-column: 1;
      font-size: 9px;
      color: var(--ink-4);
      text-align: right;
      padding: 1px 5px 0 0;
      border-right: 1px solid var(--border);
      display: flex;
      align-items: flex-start;
      justify-content: flex-end;
    }

    .tt-time.tt-hr { color: var(--ink-3); font-weight: 600; }

    .tt-cell {
      border-top: 1px solid var(--bg-muted);
      border-left: 1px solid var(--bg-muted);
    }

    .tt-cell.tt-hr { border-top-color: var(--border); }

    .tt-course {
      margin: 1px;
      border-radius: var(--r-sm);
      padding: 3px 5px;
      overflow: hidden;
      z-index: 2;
      display: flex;
      flex-direction: column;
      cursor: default;
      font-size: 10px;
      line-height: 1.25;
      box-shadow: 0 1px 2px rgba(0,0,0,0.08);
      position: relative;
    }
    .tt-course.tt-draggable {
      cursor: grab;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
    }
    .tt-course.tt-draggable:active { cursor: grabbing; }

    .tt-c-title {
      font-weight: 800;
      color: #111;
      font-size: 10px;
      line-height: 1.05;
      letter-spacing: 0.01em;
      text-align: center;
      word-break: break-word;
      overflow-wrap: anywhere;
      margin-top: 2px;
    }
    .tt-c-meta {
      text-align: center;
      font-size: 9px;
      line-height: 1.1;
      color: rgba(0,0,0,0.45);
      word-break: break-word;
      overflow-wrap: anywhere;
      margin-top: 2px;
    }
    .tt-c-time { margin-top: auto; }
    .tt-c-mark {
      position: absolute; top: 2px; right: 3px;
      font-size: 8px; opacity: 0.45; line-height: 1; pointer-events: none;
    }

    /* Fixed course (confirmed / unambiguous) */
    .tt-course.tt-fixed { border: 2px solid transparent; }

    /* Pending course — drag to correct day */
    .tt-course.tt-pending {
      opacity: 0.55;
      border: 2px dashed rgba(0,0,0,0.3);
    }
    .tt-course.tt-dragging { opacity: 0.15 !important; }

    /* Locked pending — future rows, not yet active */
    .tt-course.tt-pending-locked {
      opacity: 0.28;
      border: 2px dashed rgba(0,0,0,0.12);
      cursor: not-allowed;
    }

    /* Day header drop-target highlight */
    .tt-day-head.tt-drop-ok {
      background: color-mix(in srgb, var(--primary-color) 18%, var(--bg-muted));
      outline: 2px solid var(--primary-color);
      outline-offset: -2px;
      transition: background 0.1s;
    }

    .review-tools {
      display: flex;
      gap: 8px;
      margin: 0 0 10px;
      flex-wrap: wrap;
    }

    /* ── Back link ── */
    .back-link {
      display: inline-block;
      font-size: var(--fs-sm);
      color: var(--ink-3);
      text-decoration: none;
      margin-bottom: var(--space-16);
      transition: color var(--dur-fast) var(--ease-standard);
    }
    .back-link:hover { color: var(--primary-color); }

    /* ── Format Settings ── */
    .fmt-section { margin-bottom: 18px; }
    .fmt-section:last-child { margin-bottom: 0; }

    .fmt-label {
      font-size: var(--fs-xs);
      font-weight: 600;
      color: var(--ink-3);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 8px;
    }

    .fmt-options {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .fmt-option {
      flex: 1;
      min-width: 110px;
      border: 1.5px solid var(--border);
      border-radius: var(--r-md);
      padding: 10px 12px;
      cursor: pointer;
      background: var(--bg-muted);
      transition: border-color .15s, background .15s;
      user-select: none;
    }

    .fmt-option:hover { border-color: var(--border-focus); }

    .fmt-option.active {
      border-color: var(--primary-color);
      background: var(--xjtlu-blue-light);
    }

    .fmt-opt-name {
      font-size: var(--fs-xs);
      font-weight: 700;
      color: var(--ink-2);
      margin-bottom: 3px;
    }

    .fmt-option.active .fmt-opt-name { color: var(--primary-color); }

    .fmt-opt-eg {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--ink-4);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .fmt-prefix-row {
      margin-top: 10px;
      max-width: 240px;
    }

    .fmt-checks {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
    }

    .fmt-check {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: var(--fs-sm);
      color: var(--ink-2);
      cursor: pointer;
      user-select: none;
    }

    .fmt-check input[type=checkbox] {
      width: auto;
      accent-color: var(--primary-color);
    }

    /* Preview card */
    .prev-card {
      background: var(--bg-muted);
      border: 1px solid var(--border);
      border-radius: var(--r-lg);
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .prev-title {
      font-size: var(--fs-md);
      font-weight: 700;
      color: var(--ink-1);
    }

    .prev-divider {
      height: 1px;
      background: var(--border);
    }

    .prev-row {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      font-size: var(--fs-sm);
      color: var(--ink-2);
    }

    .prev-icon { flex-shrink: 0; width: 16px; text-align: center; }
    .prev-empty { font-size: var(--fs-sm); color: var(--ink-4); font-style: italic; }

    /* Alert as clickable CTA */
    .alert-cta {
      cursor: pointer;
      width: 100%;
      text-align: left;
      border: none;
      font-family: inherit;
      font-size: inherit;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      transition: filter 0.15s;
    }
    .alert-cta:hover { filter: brightness(0.96); }
    .alert-cta::after { content: '→'; flex-shrink: 0; font-size: 1.1em; }

    /* ── Mobile progress bar ─────────────────────────────────────────────────── */
    .steps-mob {
      display: none;
      margin-bottom: 20px;
    }
    .steps-mob-label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--ink-2);
      margin-bottom: 8px;
    }
    .steps-mob-label span:last-child {
      color: var(--ink-4);
      font-weight: 400;
    }
    .steps-mob-bar {
      height: 5px;
      background: var(--border);
      border-radius: 3px;
      overflow: hidden;
    }
    .steps-mob-fill {
      height: 100%;
      background: var(--primary-color);
      border-radius: 3px;
      transition: width 0.35s ease;
    }

    /* ── Ambiguity Wizard ────────────────────────────────────────────────────── */
    .amb-wiz-header { margin-bottom: 16px; }

    .amb-wiz-label-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--ink-2);
      margin-bottom: 6px;
    }
    .amb-wiz-counter { color: var(--ink-4); font-weight: 400; }

    .amb-wiz-bar {
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      overflow: hidden;
    }
    .amb-wiz-fill {
      height: 100%;
      background: var(--s-pending-fg);
      border-radius: 2px;
      transition: width 0.3s ease;
    }

    .amb-ctx {
      background: var(--bg-muted);
      border-radius: var(--r-md);
      padding: 10px 14px;
      margin-bottom: 14px;
    }
    .amb-ctx-title {
      font-size: 11px;
      font-weight: 600;
      color: var(--ink-4);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 8px;
    }
    .amb-ctx-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: var(--fs-sm);
      padding: 2px 0;
    }
    .amb-ctx-name { flex: 1; color: var(--ink-2); }
    .amb-ctx-day { color: var(--s-new-fg); font-weight: 600; font-size: var(--fs-xs); }

    .amb-course-card {
      border: 2px solid var(--primary-color);
      border-radius: var(--r-lg);
      padding: 14px 16px;
      margin-bottom: 16px;
      background: var(--xjtlu-blue-light);
    }
    .amb-course-name {
      font-size: var(--fs-md);
      font-weight: 700;
      color: var(--ink-1);
      margin-bottom: 3px;
    }
    .amb-course-type { font-weight: 400; color: var(--ink-3); }
    .amb-course-meta { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.6; }

    .amb-wiz-q {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--ink-2);
      margin-bottom: 10px;
    }

    .day-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

    .day-btn {
      flex: 1;
      min-width: 48px;
      padding: 11px 4px;
      border-radius: var(--r-md);
      border: 2px solid var(--border);
      background: var(--bg-muted);
      cursor: pointer;
      text-align: center;
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--ink-2);
      font-family: var(--font-body);
      transition: border-color .15s, background .15s, color .15s;
    }
    .day-btn:hover { border-color: var(--border-focus); }
    .day-btn.selected {
      border-color: var(--primary-color);
      background: var(--primary-color);
      color: white;
    }

    .amb-wiz-nav {
      display: flex;
      gap: 10px;
      margin-top: 16px;
    }
    .amb-wiz-nav .btn { flex: 1; justify-content: center; }

    /* ── Method tabs ─────────────────────────────────────────────────────────── */
    .method-tabs {
      display: flex;
      background: var(--bg-muted);
      border-radius: var(--r-md);
      padding: 3px;
      margin-bottom: 16px;
      gap: 3px;
    }
    .method-tab {
      flex: 1;
      padding: 8px 10px;
      border: none;
      border-radius: var(--r-sm);
      font-size: var(--fs-sm);
      font-weight: 500;
      cursor: pointer;
      background: transparent;
      color: var(--ink-3);
      font-family: var(--font-body);
      transition: background .15s, color .15s;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }
    .method-tab.active {
      background: var(--bg-card);
      color: var(--ink-1);
      font-weight: 600;
      box-shadow: var(--shadow-xs);
    }
    .method-tab-name {
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .method-tab-badge {
      font-size: 10px;
      padding: 1px 6px;
      background: var(--primary-color);
      color: white;
      border-radius: 10px;
      font-weight: 600;
      line-height: 1.5;
    }
    .method-tab:not(.active) .method-tab-badge {
      background: var(--ink-4);
    }
    .method-tab-desc {
      font-size: 11px;
      font-weight: 400;
      color: var(--ink-4);
      line-height: 1.3;
    }
    .method-tab.active .method-tab-desc {
      color: var(--ink-3);
    }

    /* ── Bookmarklet section ─────────────────────────────────────────────────── */
    .bm-steps {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 12px 0 16px;
    }
    .bm-step {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: var(--fs-sm);
      color: var(--ink-2);
      line-height: 1.6;
    }
    .bm-step-num {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--xjtlu-blue-light);
      color: var(--primary-color);
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 2px;
    }
    .bm-code-row {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-muted);
      border: 1px solid var(--border);
      border-radius: var(--r-md);
      padding: 8px 10px;
      margin-top: 6px;
    }
    .bm-code-text {
      flex: 1;
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--ink-3);
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      user-select: all;
    }
    .bm-copy-btn {
      flex-shrink: 0;
      padding: 4px 12px;
      font-size: 12px;
      background: var(--primary-color);
      color: white;
      border: none;
      border-radius: var(--r-sm);
      cursor: pointer;
      font-family: var(--font-body);
      font-weight: 500;
      white-space: nowrap;
    }
    .bm-copy-btn:hover { filter: brightness(.92); }
    .bm-step > div:last-child { min-width: 0; flex: 1; }
    .bm-browser-guide { margin-top: 7px; }
    .bm-browser-guide summary {
      cursor: pointer;
      color: var(--primary-color);
      font-size: var(--fs-xs);
      user-select: none;
      list-style: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .bm-browser-guide summary::before { content: '▶'; font-size: 9px; }
    .bm-browser-guide[open] summary::before { content: '▼'; }
    .bm-browser-list {
      margin-top: 7px;
      padding: 10px 12px;
      background: var(--bg-muted);
      border-radius: var(--r-sm);
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: var(--fs-xs);
      color: var(--ink-2);
      line-height: 1.55;
    }
    .bm-browser-item b { color: var(--ink-1); }
    .bm-browser-note {
      margin-top: 2px;
      padding-top: 6px;
      border-top: 1px solid var(--border);
      color: var(--ink-3);
    }
    @media (max-width: 559px) {
      .bm-code-row { flex-direction: column; align-items: stretch; gap: 6px; }
      .bm-copy-btn { width: 100%; padding: 8px; text-align: center; }
    }

    /* ── ICS import guide tabs ───────────────────────────────────────────────── */
    .imp-tabs {
      display: flex;
      background: var(--bg-muted);
      border-radius: var(--r-md);
      padding: 3px;
      margin-bottom: 16px;
      gap: 2px;
    }
    .imp-tab {
      flex: 1;
      padding: 7px 6px;
      border: none;
      border-radius: var(--r-sm);
      font-size: var(--fs-xs);
      font-weight: 500;
      cursor: pointer;
      background: transparent;
      color: var(--ink-3);
      font-family: var(--font-body);
      transition: background .15s, color .15s;
      text-align: center;
      white-space: nowrap;
    }
    .imp-tab.active {
      background: var(--bg-card);
      color: var(--ink-1);
      font-weight: 600;
      box-shadow: var(--shadow-xs);
    }

    /* ── Mobile sticky actions ───────────────────────────────────────────────── */
    @media (max-width: 559px) {
      .steps { display: none; }
      .steps-mob { display: block; }

      .review-tools .btn {
        flex: 1;
        justify-content: center;
      }

      .actions {
        position: sticky;
        bottom: 0;
        background: var(--bg-base);
        padding: 12px 0 24px;
        margin-top: 8px;
      }

      /* All primary/ghost buttons inside actions go full-width */
      .actions .btn {
        flex: 1;
        justify-content: center;
      }

      /* Single next-button on page 1 */
      .actions.actions-single .btn {
        width: 100%;
        padding: 14px 18px;
        font-size: var(--fs-md);
        justify-content: center;
      }

    }

/* ── Community ───────────────────────────────────────────── */
.community-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  margin: 24px 0 8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
}

.community-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.community-qr {
  width: 80px;
  height: 80px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  object-fit: cover;
}

.community-text h3 {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-1);
  margin: 0 0 4px;
}

.community-text p {
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin: 0 0 4px;
  line-height: 1.5;
}

.community-expire {
  display: inline-block;
  font-size: 11px;
  color: var(--ink-4);
  background: var(--bg-base);
  border-radius: 999px;
  padding: 2px 8px;
}

.community-support { flex-shrink: 0; }

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-base);
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: 500;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
}

.support-btn:hover {
  border-color: var(--green-primary, #22c55e);
  color: var(--green-primary, #22c55e);
}

@media (max-width: 559px) {
  .community-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .community-support { width: 100%; }
  .support-btn { width: 100%; justify-content: center; }
}

/* ── Pay Modal ───────────────────────────────────────────── */
.pay-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: 280px;
  padding: 24px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
}

.pay-modal::backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.pay-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-base);
  border-radius: 50%;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}

.pay-modal-close:hover { background: var(--border); }

.pay-modal-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-1);
  margin: 0 0 16px;
}

.pay-modal-qr {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: var(--r-md);
  display: block;
  margin: 0 auto;
}

.pay-modal-hint {
  font-size: var(--fs-xs);
  color: var(--ink-4);
  margin: 12px 0 0;
}
