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

    /* Global iconify alignment */
    iconify-icon { vertical-align: -0.125em; }

    /* Global tooltip (positioned via JS) */
    #g-tip {
      position: fixed;
      background: rgba(0,0,0,0.85);
      color: #fff;
      padding: 5px 11px;
      border-radius: 7px;
      font-size: 11px;
      font-weight: 500;
      line-height: 1.35;
      pointer-events: none;
      z-index: 99999;
      opacity: 0;
      transition: opacity 0.12s;
      max-width: 280px;
      word-wrap: break-word;
      white-space: normal;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    #g-tip.visible { opacity: 1; }

    :root {
      --bg: #f5f5f7;
      --bg-white: #ffffff;
      --border: #d2d2d7;
      --border-light: #e8e8ed;
      --text: #1d1d1f;
      --text-secondary: #6e6e73;
      --text-muted: #86868b;
      --accent: #0071e3;
      --red: #ff3b30;
      --red-bg: #fff5f5;
      --green: #34c759;
      --green-bg: #f0faf3;
      --yellow: #ff9500;
      --shadow: 0 2px 12px rgba(0,0,0,0.08);
      --shadow-card: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
      --radius: 16px;
    }

    [v-cloak] { display: none !important; }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }

    /* ============ LOGIN ============ */
    .login-page {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      padding: 20px;
      background: var(--bg);
    }
    .login-card {
      background: var(--bg-white);
      border-radius: 20px;
      padding: 40px 32px;
      width: 100%;
      max-width: 380px;
      box-shadow: var(--shadow-card);
    }
    .login-card h1 {
      font-size: 26px;
      font-weight: 700;
      letter-spacing: -0.5px;
      margin-bottom: 6px;
    }
    .login-subtitle {
      font-size: 15px;
      color: var(--text-muted);
      margin-bottom: 28px;
    }
    .form-group { margin-bottom: 16px; }
    .form-group label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 5px;
    }
    .form-input {
      width: 100%;
      padding: 12px 14px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      color: var(--text);
      font-size: 16px;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .form-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
    }
    .btn-primary {
      width: 100%;
      padding: 13px;
      background: var(--accent);
      border: none;
      border-radius: 12px;
      color: #fff;
      font-size: 15px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      margin-top: 8px;
      transition: background 0.15s, transform 0.1s;
    }
    .btn-primary:hover { background: #0077ed; }
    .btn-primary:active { transform: scale(0.99); }
    .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
    .login-error {
      background: var(--red-bg);
      color: var(--red);
      padding: 10px 14px;
      border-radius: 10px;
      font-size: 13px;
      margin-bottom: 16px;
    }

    /* ============ APP SHELL ============ */
    .app-shell {
      display: flex;
      flex-direction: column;
      height: 100vh;
      height: 100dvh;
      overflow: hidden;
    }

    /* Top Bar */
    .topbar {
      flex-shrink: 0;
      height: 44px;
      background: #ffffff;
      border-bottom: 0.5px solid rgba(0,0,0,0.1);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      z-index: 10;
    }
    .topbar-left {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .topbar-brand {
      flex-shrink: 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .topbar-brand img {
      height: 22px;
      width: auto;
    }
    .topbar-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }
    .topbar-user {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }
    .btn-logout {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      padding: 4px 6px;
      border-radius: 6px;
      font-family: inherit;
    }
    .btn-logout:hover { color: var(--red); }

    /* View-as dropdown */
    .view-as-select {
      font-size: 11px;
      font-family: inherit;
      padding: 2px 6px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--bg);
      color: var(--text);
      cursor: pointer;
      max-width: 140px;
    }
    .view-as-banner {
      background: #fef3c7;
      color: #92400e;
      text-align: center;
      padding: 6px 12px;
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid #fcd34d;
    }
    .view-as-banner.admin-override {
      background: #dbeafe;
      color: #1e40af;
      border-bottom-color: #93c5fd;
    }

    /* Set selector */
    .set-selector { position: relative; }
    .set-selector-btn {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 3px 10px;
      border-radius: 100px;
      border: 1px solid var(--accent);
      background: rgba(0,113,227,0.06);
      font-size: 11px;
      font-weight: 600;
      color: var(--accent);
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
      max-width: 140px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .set-selector-btn svg { width: 10px; height: 10px; flex-shrink: 0; }
    .set-dropdown {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      background: var(--bg-white);
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: var(--shadow-card);
      min-width: 160px;
      z-index: 100;
      overflow: hidden;
      animation: dropdown-in 0.15s ease;
    }
    .set-dropdown-item {
      padding: 8px 14px;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      white-space: nowrap;
    }
    .set-dropdown-item:hover { background: var(--bg); }
    .set-dropdown-item.active { color: var(--accent); font-weight: 600; }

    /* ============ MAIN CONTENT ============ */
    .main-content {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .content-wrapper {
      max-width: 540px;
      margin: 0 auto;
      padding: 10px;
    }

    /* ============ ITEM INDICATOR ============ */
    .item-indicator {
      background: var(--bg-white);
      border-radius: var(--radius);
      box-shadow: var(--shadow-card);
      padding: 12px 16px;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .item-indicator-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 1px;
      color: var(--text-muted);
      text-transform: uppercase;
    }
    .item-indicator-number {
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -1px;
      color: var(--text);
      line-height: 1;
    }
    .item-indicator-total {
      font-size: 16px;
      font-weight: 500;
      color: var(--text-muted);
    }
    .item-indicator-meta {
      display: flex;
      gap: 6px;
      align-items: center;
      flex: 1;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .item-indicator-party, .item-indicator-platform {
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 100px;
      background: var(--bg);
      color: var(--text-secondary);
    }
    .item-indicator-done {
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 100px;
      background: var(--green-bg);
      color: var(--green);
    }

    /* ============ MEDIA CARD ============ */
    .media-card {
      background: var(--bg-white);
      border-radius: var(--radius);
      box-shadow: var(--shadow-card);
      overflow: hidden;
      margin-bottom: 10px;
    }
    .media-card.collapsed .media-visual { display: none; }
    .media-card.collapsed .media-card-footer { display: none; }
    .media-collapse-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 6px;
      font-family: inherit;
      display: flex;
      align-items: center;
      gap: 3px;
      flex-shrink: 0;
    }
    .media-collapse-btn:hover { color: var(--accent); }
    .media-card-header {
      display: flex;
      align-items: center;
      padding: 10px 12px;
      gap: 8px;
    }
    .card-avatar {
      width: 30px; height: 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }
    .card-avatar.fb { background: #1877f2; }
    .card-avatar.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
    .card-avatar.x { background: #000; }
    .card-avatar.tiktok { background: #000; }
    .card-avatar.default { background: #6366f1; }
    .card-header-info { flex: 1; min-width: 0; }
    .card-username {
      font-size: 13px;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .card-meta {
      font-size: 11px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 3px;
    }
    .card-badges {
      display: flex;
      gap: 4px;
      align-items: center;
      flex-shrink: 0;
    }
    .ai-score {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 100px;
    }
    .ai-score.high { background: var(--red-bg); color: var(--red); }
    .ai-score.medium { background: #fff8ec; color: var(--yellow); }
    .ai-score.low { background: var(--green-bg); color: var(--green); }

    /* Media area */
    .media-visual {
      background: #f0f0f2;
      display: flex;
      align-items: center;
      justify-content: center;
      max-height: 180px;
      overflow: hidden;
      position: relative;
      cursor: zoom-in;
    }
    .media-visual img, .media-visual video {
      width: 100%;
      max-height: 180px;
      object-fit: contain;
      display: block;
    }
    /* Carousel */
    .carousel-container { position: relative; width: 100%; }
    .carousel-slide {
      display: flex;
      align-items: center;
      justify-content: center;
      max-height: 180px;
      overflow: hidden;
    }
    .carousel-slide img, .carousel-slide video {
      width: 100%;
      max-height: 180px;
      object-fit: contain;
      display: block;
    }
    .carousel-dots {
      display: flex;
      justify-content: center;
      gap: 5px;
      position: absolute;
      bottom: 6px;
      left: 0; right: 0;
    }
    .carousel-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: rgba(255,255,255,0.4);
      cursor: pointer;
      border: none;
      transition: all 0.15s;
    }
    .carousel-dot.active {
      background: #fff;
      width: 16px;
      border-radius: 3px;
    }
    .carousel-dot.video-dot {
      width: 0; height: 0;
      border-radius: 0;
      background: transparent;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 6px solid rgba(255,255,255,0.5);
      transform: rotate(-90deg);
    }
    .carousel-dot.video-dot.active { border-top-color: #fff; width: 0; }
    .carousel-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 26px; height: 26px;
      border-radius: 50%;
      background: rgba(0,0,0,0.3);
      border: none;
      color: #fff;
      font-size: 15px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 5;
    }
    .carousel-nav:hover { background: rgba(0,0,0,0.5); }
    .carousel-nav.prev { left: 4px; }
    .carousel-nav.next { right: 4px; }

    /* Card footer */
    .media-card-footer {
      padding: 8px 12px;
    }
    .media-card-text {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.45;
      margin-bottom: 6px;
      word-break: break-word;
      direction: auto;
      unicode-bidi: plaintext;
    }
    .media-card-text.truncated {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .toggle-text {
      font-size: 11px;
      color: var(--text-muted);
      cursor: pointer;
      font-weight: 500;
      margin-bottom: 6px;
      display: inline-block;
    }
    .toggle-text:hover { color: var(--accent); }
    .toggle-text-prominent {
      background: rgba(0,113,227,0.06);
      padding: 3px 8px;
      border-radius: 6px;
    }
    .media-card-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }
    .media-link {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      font-weight: 500;
      color: var(--accent);
      text-decoration: none;
    }
    .media-link:hover { text-decoration: underline; }
    .media-link svg { width: 12px; height: 12px; }
    .btn-qr {
      width: 28px; height: 28px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      font-size: 13px;
      flex-shrink: 0;
    }
    .btn-qr:hover { border-color: var(--accent); color: var(--accent); }
    .url-status-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      display: inline-block;
    }
    .url-status-dot.checking { background: var(--border); animation: pulse-dot 1s ease-in-out infinite; }
    .url-status-dot.available { background: var(--green); }
    .url-status-dot.unavailable { background: var(--red); }
    @keyframes pulse-dot { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

    /* ============ QUESTION AREA ============ */
    .question-card {
      background: var(--bg-white);
      border-radius: var(--radius);
      box-shadow: var(--shadow-card);
      overflow: hidden;
      margin-bottom: 10px;
    }

    /* Section header */
    .section-header {
      padding: 10px 14px 0;
    }
    .section-title {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
    }
    .section-type-badge {
      display: inline-block;
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 100px;
      margin-left: 6px;
      vertical-align: middle;
    }
    .section-type-badge.image-only {
      background: rgba(168,85,247,0.1);
      color: #7c3aed;
    }
    .section-type-badge.text-and-image {
      background: rgba(59,130,246,0.1);
      color: #2563eb;
    }
    /* Progress */
    .question-progress {
      padding: 8px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .question-progress-label {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 500;
      white-space: nowrap;
    }
    .question-progress-bar {
      flex: 1;
      height: 3px;
      background: var(--border-light);
      border-radius: 2px;
      overflow: hidden;
    }
    .question-progress-fill {
      height: 100%;
      background: var(--accent);
      border-radius: 2px;
      transition: width 0.3s ease;
    }
    .question-progress-pct {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 500;
      white-space: nowrap;
    }

    /* Question content */
    .question-content {
      padding: 6px 14px 14px;
    }
    .question-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 4px;
      letter-spacing: -0.2px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .prefilled-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 100px;
      background: rgba(0,113,227,0.08);
      color: var(--accent);
      flex-shrink: 0;
    }
    .question-helper {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.4;
      margin-bottom: 12px;
    }
    .question-helper.collapsed {
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      cursor: pointer;
    }
    .helper-toggle {
      font-size: 11px;
      color: var(--text-muted);
      cursor: pointer;
      font-weight: 500;
      display: inline-block;
      margin-bottom: 8px;
    }
    .helper-toggle:hover { color: var(--accent); }

    /* Options: radio/checkbox */
    .option-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .option-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1.5px solid var(--border-light);
      background: var(--bg-white);
      cursor: pointer;
      transition: all 0.15s;
      min-height: 44px;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .option-item:hover { border-color: var(--accent); background: rgba(0,113,227,0.02); }
    .option-item.disabled { opacity: 0.35; pointer-events: none; cursor: not-allowed; }
    .option-item.selected {
      border-color: var(--accent);
      background: rgba(0,113,227,0.06);
    }
    .option-radio, .option-checkbox {
      width: 20px; height: 20px;
      border-radius: 50%;
      border: 2px solid var(--border);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }
    .option-checkbox { border-radius: 5px; }
    .option-item.selected .option-radio {
      border-color: var(--accent);
    }
    .option-item.selected .option-radio::after {
      content: '';
      width: 10px; height: 10px;
      border-radius: 50%;
      background: var(--accent);
    }
    .option-item.selected .option-checkbox {
      border-color: var(--accent);
      background: var(--accent);
    }
    .option-item.selected .option-checkbox::after {
      content: '';
      width: 6px; height: 10px;
      border: solid #fff;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg) translate(-1px, -1px);
    }
    .option-label {
      font-size: 14px;
      font-weight: 500;
      flex: 1;
      line-height: 1.3;
    }

    /* Multi-select filter */
    .multi-filter-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }
    .multi-filter-wrap .search-input-wrap { flex: 1; }
    .filter-no-results {
      text-align: center;
      padding: 14px;
      font-size: 13px;
      color: var(--text-muted);
    }

    /* Free text */
    .freetext-input {
      width: 100%;
      padding: 12px 14px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      color: var(--text);
      font-size: 15px;
      font-family: inherit;
      outline: none;
      resize: vertical;
      min-height: 80px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .freetext-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 4px rgba(0,113,227,0.1);
    }

    /* Searchable multi-select */
    .search-multi {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .search-input-wrap {
      position: relative;
    }
    .search-input {
      width: 100%;
      padding: 10px 14px 10px 34px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      font-size: 14px;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s;
    }
    .search-input:focus { border-color: var(--accent); }
    .search-icon {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 16px; height: 16px;
      color: var(--text-muted);
    }
    .selected-count {
      font-size: 12px;
      font-weight: 500;
      color: var(--accent);
      padding: 2px 8px;
      background: rgba(0,113,227,0.08);
      border-radius: 100px;
      white-space: nowrap;
    }
    .search-header {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Accordion groups */
    .accordion-groups {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: 320px;
      overflow-y: auto;
      border: 1px solid var(--border-light);
      border-radius: 10px;
      padding: 4px;
    }
    .accordion-group {}
    .accordion-group-header {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.1s;
    }
    .accordion-group-header:hover { background: var(--bg); }
    .accordion-chevron {
      width: 12px; height: 12px;
      color: var(--text-muted);
      transition: transform 0.2s;
      flex-shrink: 0;
    }
    .accordion-chevron.open { transform: rotate(90deg); }
    .accordion-group-name { flex: 1; }
    .accordion-group-count {
      font-size: 10px;
      font-weight: 500;
      color: var(--text-muted);
      background: var(--bg);
      padding: 1px 6px;
      border-radius: 100px;
    }
    .accordion-group-items {
      padding: 0 4px 4px;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .accordion-option-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 10px 7px 28px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.1s;
      min-height: 38px;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .accordion-option-item:hover { background: var(--bg); }
    .accordion-option-item.selected { background: rgba(0,113,227,0.06); }
    .accordion-option-item .option-checkbox {
      width: 18px; height: 18px;
    }
    .accordion-option-item.selected .option-checkbox {
      border-color: var(--accent);
      background: var(--accent);
    }
    .accordion-option-item.selected .option-checkbox::after {
      content: '';
      width: 5px; height: 9px;
      border: solid #fff;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg) translate(-1px, -1px);
    }
    .accordion-option-label {
      font-size: 13px;
      font-weight: 500;
      flex: 1;
      line-height: 1.3;
    }
    mark {
      background: rgba(0,113,227,0.15);
      color: inherit;
      border-radius: 2px;
      padding: 0 1px;
    }

    /* Submit error banner */
    .submit-error-banner {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 14px; margin: 0 14px 4px;
      background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px;
      color: #b91c1c; font-size: 12px; line-height: 1.4;
    }
    .submit-error-banner .retry-btn {
      padding: 4px 12px; border-radius: 6px; border: 1px solid #b91c1c;
      background: #b91c1c; color: #fff; font-size: 12px; font-weight: 600;
      cursor: pointer; white-space: nowrap; font-family: inherit;
    }
    .submit-error-banner .retry-btn:hover { background: #991b1b; }
    .submit-error-banner .dismiss-btn {
      padding: 2px 6px; border: none; background: transparent;
      color: #b91c1c; font-size: 16px; cursor: pointer; line-height: 1;
    }

    /* Question nav */
    .question-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 14px;
      border-top: 1px solid var(--border-light);
    }
    .btn-question-nav {
      padding: 9px 18px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 4px;
      min-height: 44px;
      transition: all 0.15s;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-question-nav:hover { border-color: var(--accent); color: var(--accent); }
    .btn-question-nav:disabled { opacity: 0.3; cursor: not-allowed; }
    .btn-question-nav.primary {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }
    .btn-question-nav.primary:hover { background: #0077ed; }
    .btn-question-nav.submit-btn {
      background: var(--green);
      border-color: var(--green);
      color: #fff;
    }
    .btn-question-nav.submit-btn:hover { background: #2db850; }

    /* Auto-advance toggle */
    .auto-advance-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      user-select: none;
      white-space: nowrap;
    }
    .toggle-track {
      width: 32px; height: 18px;
      border-radius: 9px;
      background: var(--border);
      position: relative;
      transition: background 0.2s;
      flex-shrink: 0;
    }
    .toggle-track.on { background: var(--accent); }
    .toggle-knob {
      width: 14px; height: 14px;
      border-radius: 50%;
      background: #fff;
      position: absolute;
      top: 2px; left: 2px;
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }
    .toggle-track.on .toggle-knob { transform: translateX(14px); }

    /* ============ BOTTOM BAR ============ */
    .bottom-bar {
      flex-shrink: 0;
      background: #ffffff;
      border-top: 0.5px solid rgba(0,0,0,0.1);
      padding: 6px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 10;
    }
    .bottom-bar-progress {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }
    .bottom-bar-progress strong { color: var(--text-secondary); }
    .nav-buttons {
      display: flex;
      gap: 6px;
      align-items: center;
    }
    .btn-nav {
      padding: 7px 14px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      font-family: inherit;
      min-height: 36px;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-nav:hover { border-color: var(--accent); color: var(--accent); }
    .btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
    .btn-nav svg { width: 14px; height: 14px; }
    .item-completed-check {
      color: var(--green);
      font-weight: 700;
      margin-left: 2px;
    }

    /* ============ QR MODAL ============ */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 400;
      background: rgba(0,0,0,0.45);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .modal-box {
      background: var(--bg-white);
      border-radius: 14px;
      padding: 24px 20px 18px;
      max-width: 320px;
      width: 90%;
      box-shadow: 0 8px 40px rgba(0,0,0,0.15);
      text-align: center;
    }
    .modal-box h3 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 14px;
    }
    .qr-canvas-wrap {
      display: flex;
      justify-content: center;
      margin-bottom: 14px;
    }
    .modal-close-btn {
      padding: 10px 24px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      font-size: 14px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      color: var(--text-secondary);
    }
    .modal-close-btn:hover { border-color: var(--accent); color: var(--accent); }

    /* ============ LIGHTBOX ============ */
    .lightbox {
      position: fixed;
      inset: 0;
      z-index: 300;
      background: rgba(0,0,0,0.9);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
      animation: lightbox-in 0.2s ease;
    }
    @keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
    .lightbox img, .lightbox video {
      max-width: 94vw;
      max-height: 94vh;
      object-fit: contain;
      border-radius: 8px;
    }
    .lightbox-close {
      position: absolute;
      top: 12px; right: 12px;
      width: 32px; height: 32px;
      border-radius: 50%;
      background: rgba(255,255,255,0.15);
      border: none;
      color: #fff;
      font-size: 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* ============ TOAST ============ */
    .toast-wrap {
      position: fixed;
      top: 50px; right: 10px;
      z-index: 200;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .toast {
      background: var(--bg-white);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 8px 14px;
      font-size: 12px;
      color: var(--text-secondary);
      box-shadow: var(--shadow);
      animation: toast-in 0.2s ease;
      max-width: 240px;
    }
    .toast.error { border-color: var(--red); color: var(--red); }
    .toast.success { border-color: var(--green); color: var(--green); }
    .toast.info { border-color: var(--accent); color: var(--accent); }
    @keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
    .connection-banner {
      position: fixed; top: 0; left: 0; right: 0; z-index: 300;
      background: var(--yellow); color: #fff; text-align: center;
      padding: 8px 16px; font-size: 13px; font-weight: 600;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .media-error-placeholder {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      background: var(--bg); border: 1px dashed var(--border); border-radius: 12px;
      padding: 24px; min-height: 120px; color: var(--text-muted); font-size: 13px; gap: 8px;
    }
    @keyframes dropdown-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

    /* ============ INTERSTITIAL ============ */
    .interstitial {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 60vh;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      animation: interstitial-in 0.3s ease;
    }
    @keyframes interstitial-in {
      from { opacity: 0; transform: scale(0.96); }
      to { opacity: 1; transform: scale(1); }
    }
    .interstitial-card {
      text-align: center;
      padding: 32px 24px;
    }
    .interstitial-progress-ring {
      position: relative;
      width: 80px;
      height: 80px;
      margin: 0 auto 20px;
    }
    .interstitial-progress-ring svg { width: 100%; height: 100%; }
    .interstitial-pct {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
    }
    .interstitial-msg {
      font-size: 17px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 8px;
      letter-spacing: -0.2px;
    }
    .interstitial-hint {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* ============ LOADING / EMPTY ============ */
    .loading-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 0; }
    .spinner {
      width: 26px; height: 26px;
      border: 2.5px solid var(--border-light);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading-text { font-size: 14px; color: var(--text-muted); }
    .empty-state { text-align: center; color: var(--text-muted); padding: 60px 20px; }
    .empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 600; }
    .empty-state p { font-size: 13px; }

    /* ============ AI HINTS ============ */
    .ai-highlight {
      cursor: pointer;
      padding: 1px 3px;
      border-radius: 3px;
      border-bottom: 1.5px dashed;
      transition: background 0.15s, filter 0.15s;
    }
    .ai-highlight.hl-blue { background: rgba(0,113,227,0.12); border-bottom-color: var(--accent); }
    .ai-highlight.hl-green { background: rgba(52,199,89,0.12); border-bottom-color: var(--green); }
    .ai-highlight.hl-red { background: rgba(255,59,48,0.1); border-bottom-color: var(--red); }
    .ai-highlight.hl-yellow { background: rgba(255,149,0,0.12); border-bottom-color: var(--yellow); }
    .ai-highlight.hl-purple { background: rgba(99,102,241,0.1); border-bottom-color: #6366f1; }
    .ai-highlight:hover { filter: brightness(0.92); }
    .ai-highlight.active { filter: brightness(0.85); }
    .ai-tooltip-popup {
      position: fixed;
      z-index: 500;
      transform: translateY(-100%);
      background: rgba(29,29,31,0.92);
      color: rgba(255,255,255,0.88);
      padding: 5px 10px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 400;
      line-height: 1.35;
      max-width: 260px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.18);
      animation: tooltip-in 0.12s ease;
      pointer-events: none;
    }
    .ai-tooltip-popup .tooltip-qid {
      font-size: 9px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: rgba(255,255,255,0.45);
      margin-bottom: 1px;
    }
    @keyframes tooltip-in { from { opacity: 0; } to { opacity: 1; } }
    .ai-hint-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 100px;
      background: rgba(0,113,227,0.08);
      color: var(--accent);
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease;
      flex-shrink: 0;
    }
    .ai-hint-badge:hover { background: rgba(0,113,227,0.15); }
    .ai-hint-detail {
      background: var(--card-bg, rgba(0,113,227,0.03));
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 8px 12px;
      margin-bottom: 10px;
      font-size: 13px;
      color: var(--text-secondary);
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: center;
      transition: all 0.2s ease;
    }
    .ai-hint-chip {
      display: inline-block;
      background: rgba(0,113,227,0.06);
      color: var(--accent);
      padding: 3px 10px;
      border-radius: 100px;
      font-size: 12px;
      font-weight: 500;
      transition: background 0.15s ease;
    }
    .ai-hint-chip:hover { background: rgba(0,113,227,0.12); }
    .ai-hint-source-label {
      width: 100%;
      font-size: 9px;
      color: var(--text-muted);
      margin-top: 2px;
      opacity: 0.6;
      letter-spacing: 0.2px;
    }
    .option-item.ai-suggested {
      border-left: 3px solid rgba(0,113,227,0.3);
    }

    /* ============ LARGE IMAGE MODE ============ */
    .btn-cheatsheet.large-image-active {
      color: var(--accent);
      background: rgba(0, 113, 227, 0.08);
    }

    .split-pane { display: contents; }
    .content-wrapper { transition: max-width 0.3s ease; }

    /* Grid on content-wrapper so item-indicator participates in layout */
    .content-wrapper.large-image-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0 14px;
      align-items: start;
      max-width: 1400px;
    }

    /* Keep split-pane as contents so split-media/split-questions are grid children */
    .content-wrapper.large-image-layout .split-pane.active { display: contents; }

    /* Left column: media — spans all rows, full height */
    .content-wrapper.large-image-layout .split-media {
      grid-column: 1;
      grid-row: 1 / 20;
      position: sticky;
      top: 0;
      max-height: 100vh;
      overflow-y: auto;
    }

    /* Right column: item indicator + notes + questions */
    .content-wrapper.large-image-layout .item-indicator {
      grid-column: 2;
      padding: 8px 12px;
      margin-bottom: 6px;
    }
    .content-wrapper.large-image-layout .item-indicator-number {
      font-size: 20px;
    }
    .content-wrapper.large-image-layout .item-indicator-total {
      font-size: 13px;
    }
    .content-wrapper.large-image-layout .notes-area {
      grid-column: 2;
    }
    .content-wrapper.large-image-layout .split-questions {
      grid-column: 2;
      min-width: 0;
    }

    /* Media fills available height */
    .content-wrapper.large-image-layout .media-visual { max-height: none; cursor: zoom-in; }
    .content-wrapper.large-image-layout .media-visual img,
    .content-wrapper.large-image-layout .media-visual video {
      max-height: calc(100vh - 180px); width: 100%; object-fit: contain;
    }
    .content-wrapper.large-image-layout .carousel-slide { max-height: none; }
    .content-wrapper.large-image-layout .carousel-slide img,
    .content-wrapper.large-image-layout .carousel-slide video {
      max-height: calc(100vh - 180px); width: 100%; object-fit: contain;
    }

    /* Compact media card header in large mode */
    .content-wrapper.large-image-layout .media-card { margin-bottom: 0; }
    .content-wrapper.large-image-layout .media-card-header { padding: 8px 12px; }

    /* Auto-hide topbar, filter toolbar, and bottom-bar in large image mode */
    .app-shell.large-image-active .topbar {
      position: fixed;
      top: 0; left: 0; right: 0;
      height: 44px;
      transform: translateY(-100%);
      transition: transform 0.25s ease, opacity 0.25s ease;
      opacity: 0;
      z-index: 100;
      box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    }
    .app-shell.large-image-active .ann-toolbar {
      position: fixed;
      top: 44px; left: 0; right: 0;
      transform: translateY(calc(-100% - 44px));
      transition: transform 0.25s ease, opacity 0.25s ease;
      opacity: 0;
      z-index: 100;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    .app-shell.large-image-active .bottom-bar {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      transform: translateY(100%);
      transition: transform 0.25s ease, opacity 0.25s ease;
      opacity: 0;
      z-index: 100;
      box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
    }

    /* Reveal classes toggled by JS mousemove */
    .app-shell.large-image-active.show-top-bars .topbar,
    .app-shell.large-image-active.show-top-bars .ann-toolbar {
      transform: translateY(0);
      opacity: 1;
    }
    .app-shell.large-image-active.show-bottom-bar .bottom-bar {
      transform: translateY(0);
      opacity: 1;
    }

    /* Main content fills full height when bars are hidden */
    .app-shell.large-image-active .main-content {
      height: 100vh;
      height: 100dvh;
    }

    /* Adjust sticky media to use full viewport */
    .app-shell.large-image-active .split-media {
      max-height: 100vh !important;
      max-height: 100dvh !important;
    }
    .app-shell.large-image-active .media-visual img,
    .app-shell.large-image-active .media-visual video {
      max-height: calc(100vh - 80px) !important;
    }
    .app-shell.large-image-active .carousel-slide img,
    .app-shell.large-image-active .carousel-slide video {
      max-height: calc(100vh - 80px) !important;
    }

    @media (max-width: 900px) {
      .content-wrapper.large-image-layout {
        display: block;
        max-width: 540px;
      }
      .app-shell.large-image-active .topbar,
      .app-shell.large-image-active .ann-toolbar,
      .app-shell.large-image-active .bottom-bar {
        position: static;
        transform: none;
        opacity: 1;
      }
      .app-shell.large-image-active::before,
      .app-shell.large-image-active::after {
        display: none;
      }
    }

    /* ============ MOBILE ============ */
    @media (max-width: 600px) {
      .media-visual { max-height: 150px; }
      .media-visual img, .media-visual video { max-height: 150px; }
      .carousel-slide { max-height: 150px; }
      .carousel-slide img, .carousel-slide video { max-height: 150px; }
      .accordion-groups { max-height: 240px; }
    }

    @media (min-width: 601px) {
      .topbar { height: 48px; padding: 0 16px; }
      .topbar-brand img { height: 26px; }
      .content-wrapper { padding: 14px; }
      .media-visual { max-height: 220px; }
      .media-visual img, .media-visual video { max-height: 220px; }
      .carousel-slide { max-height: 220px; }
      .carousel-slide img, .carousel-slide video { max-height: 220px; }
      .bottom-bar { padding: 8px 16px; }
      .question-title { font-size: 17px; }
    }

    /* ============ FLAG BUTTON ============ */
    .btn-flag {
      width: 28px; height: 28px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      flex-shrink: 0;
      transition: all 0.15s;
    }
    .btn-flag:hover { border-color: var(--yellow); color: var(--yellow); }
    .btn-flag.flagged { border-color: var(--yellow); color: var(--yellow); background: #fff8ec; }

    /* ============ RESET ITEM BUTTON ============ */
    .btn-reset-item {
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 100px;
      background: var(--bg);
      color: var(--text-muted);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: all 0.15s;
    }
    .btn-reset-item:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

    /* ============ REQUIRED FIELD ============ */
    .required-asterisk { color: var(--red); font-weight: 700; margin-left: 2px; }

    .validation-error {
      border-color: var(--red) !important;
      box-shadow: 0 0 0 2px rgba(255,59,48,0.15);
    }

    /* ============ TEAM PANEL ============ */
    .team-panel {
      background: var(--bg-white);
      border-top: 0.5px solid rgba(0,0,0,0.06);
      padding: 8px 12px;
      animation: dropdown-in 0.15s ease;
      max-width: 540px;
      margin: 0 auto;
      width: 100%;
    }
    .team-table {
      width: 100%;
      font-size: 12px;
      border-collapse: collapse;
    }
    .team-table th {
      text-align: left;
      font-weight: 600;
      color: var(--text-muted);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 4px 8px;
    }
    .team-table td {
      padding: 4px 8px;
      color: var(--text-secondary);
    }
    .team-table tr + tr td { border-top: 1px solid var(--border-light); }

    .item-indicator.flagged { border-left: 3px solid var(--yellow); }

    /* ============ FILTER TOOLBAR ============ */
    .ann-toolbar {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      background: var(--bg-white);
      border-bottom: 1px solid var(--border-light);
    }
    .ann-toolbar .filter-pill {
      padding: 4px 10px;
      border-radius: 100px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      font-size: 12px;
      font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .ann-toolbar .filter-pill:hover { border-color: var(--accent); color: var(--accent); }
    .ann-toolbar .filter-pill.active { background: var(--text); border-color: var(--text); color: #fff; }
    .ann-toolbar .filter-count { font-size: 11px; opacity: 0.7; margin-left: 2px; }

    .btn-team-toggle {
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 100px;
      background: var(--bg);
      color: var(--text-muted);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: all 0.15s;
      margin-left: 6px;
    }
    .btn-team-toggle:hover { border-color: var(--accent); color: var(--accent); }
    .btn-team-toggle.active { border-color: var(--accent); color: var(--accent); background: rgba(0,113,227,0.06); }

    /* ============ CHEATSHEET MODAL ============ */
    .btn-cheatsheet {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
      font-family: inherit;
      line-height: 1;
    }
    .btn-cheatsheet:hover { color: var(--accent); }
    .cheatsheet-box {
      background: var(--bg-white);
      border-radius: 14px;
      padding: 20px;
      max-width: 380px;
      width: 90%;
      box-shadow: 0 8px 40px rgba(0,0,0,0.15);
      max-height: 80vh;
      overflow-y: auto;
    }
    .cheatsheet-box h3 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 14px;
    }
    .shortcut-table {
      width: 100%;
      font-size: 13px;
      border-collapse: collapse;
    }
    .shortcut-table td {
      padding: 6px 8px;
      border-bottom: 1px solid var(--border-light);
    }
    .shortcut-table td:first-child {
      font-weight: 600;
      white-space: nowrap;
      color: var(--text-secondary);
    }
    .shortcut-table td:last-child {
      color: var(--text-muted);
    }
    .kbd {
      display: inline-block;
      padding: 2px 6px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 4px;
      font-family: monospace;
      font-size: 11px;
      line-height: 1.4;
    }

    /* ============ SKIP BUTTON ============ */
    .btn-question-nav.skip-btn {
      background: none;
      border: 1px solid var(--border);
      color: var(--text-muted);
      font-size: 12px;
      padding: 6px 12px;
      min-height: 36px;
    }
    .btn-question-nav.skip-btn:hover { border-color: var(--yellow); color: var(--yellow); }

    /* ============ ITEM OVERVIEW GRID ============ */
    .btn-grid {
      padding: 7px 10px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      font-size: 12px;
      font-weight: 600;
      font-family: inherit;
      min-height: 36px;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-grid:hover { border-color: var(--accent); color: var(--accent); }
    .btn-grid svg { width: 14px; height: 14px; }
    .overview-box {
      background: var(--bg-white);
      border-radius: 14px;
      padding: 20px;
      max-width: 420px;
      width: 90%;
      box-shadow: 0 8px 40px rgba(0,0,0,0.15);
      max-height: 80vh;
      overflow-y: auto;
    }
    .overview-box h3 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 14px;
    }
    .overview-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .overview-dot {
      width: 56px; height: 56px;
      border-radius: 8px;
      border: 2px solid var(--border-light);
      background: var(--bg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-end;
      font-size: 10px;
      font-weight: 700;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.15s;
      overflow: hidden;
      position: relative;
      padding-bottom: 2px;
    }
    .overview-dot img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.55;
      transition: opacity 0.15s;
    }
    .overview-dot:hover img { opacity: 0.8; }
    .overview-dot .overview-num {
      position: relative;
      z-index: 1;
      background: rgba(255,255,255,0.85);
      border-radius: 4px;
      padding: 0 4px;
      line-height: 1.4;
    }
    .overview-dot:hover { border-color: var(--accent); }
    .overview-dot.completed { border-color: var(--green); }
    .overview-dot.completed img { opacity: 0.3; }
    .overview-dot.completed .overview-num { background: var(--green-bg); color: var(--green); }
    .overview-dot.current { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,113,227,0.2); }
    .overview-dot.current .overview-num { background: rgba(0,113,227,0.1); color: var(--accent); }
    .overview-dot.flagged { border-color: var(--yellow); }

    /* ============ UNDO BUTTON ============ */
    .interstitial-undo {
      margin-top: 12px;
    }
    .btn-undo {
      padding: 8px 20px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      color: var(--text-secondary);
      transition: all 0.15s;
    }
    .btn-undo:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

    /* ============ DUPLICATE BUTTON ============ */
    .btn-duplicate {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      border-radius: 100px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      cursor: pointer;
      font-size: 11px;
      font-weight: 600;
      font-family: inherit;
      color: var(--text-muted);
      transition: all 0.15s;
      flex-shrink: 0;
    }
    .btn-duplicate:hover { border-color: #6366f1; color: #6366f1; background: rgba(99,102,241,0.06); }

    /* ============ COPY LINK BUTTON ============ */
    .btn-copy-link {
      background: none;
      border: 1px solid var(--border);
      color: var(--text-secondary);
      cursor: pointer;
      padding: 3px 8px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 500;
      font-family: inherit;
      display: inline-flex;
      align-items: center;
      gap: 2px;
      transition: color 0.15s, border-color 0.15s;
    }
    .btn-copy-link:hover { color: var(--accent); border-color: var(--accent); }

    /* ============ DUPLICATE MODAL ============ */
    .dup-modal {
      background: var(--bg-white);
      border-radius: 16px;
      max-width: 700px;
      width: 94%;
      box-shadow: 0 8px 40px rgba(0,0,0,0.15);
      max-height: 88vh;
      overflow-y: auto;
      animation: dropdown-in 0.15s ease;
    }
    .dup-modal-header {
      padding: 18px 20px 0;
    }
    .dup-modal-header h3 {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 4px;
      letter-spacing: -0.2px;
    }
    .dup-modal-subtitle {
      font-size: 13px;
      color: var(--text-secondary);
      margin-bottom: 12px;
    }
    .dup-step-indicator {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 20px;
      border-bottom: 1px solid var(--border-light);
    }
    .dup-step-dot {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      border: 2px solid var(--border);
      color: var(--text-muted);
      transition: all 0.2s;
    }
    .dup-step-dot.active {
      border-color: #6366f1;
      background: #6366f1;
      color: #fff;
    }
    .dup-step-dot.done {
      border-color: var(--green);
      background: var(--green);
      color: #fff;
    }
    .dup-step-line {
      flex: 1;
      height: 2px;
      background: var(--border-light);
    }
    .dup-step-line.done { background: var(--green); }
    .dup-modal-body {
      padding: 16px 20px 20px;
    }
    .dup-candidates {
      max-height: 360px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 16px;
    }
    .dup-candidate {
      display: flex;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1.5px solid var(--border-light);
      cursor: pointer;
      transition: all 0.15s;
      align-items: flex-start;
    }
    .dup-candidate:hover { border-color: #6366f1; background: rgba(99,102,241,0.03); }
    .dup-candidate.selected { border-color: #6366f1; background: rgba(99,102,241,0.06); }
    .dup-candidate-thumb {
      width: 52px;
      height: 52px;
      border-radius: 8px;
      background: var(--bg);
      overflow: hidden;
      flex-shrink: 0;
    }
    .dup-candidate-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .dup-candidate-info {
      flex: 1;
      min-width: 0;
    }
    .dup-candidate-top {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 3px;
      flex-wrap: wrap;
    }
    .dup-candidate-set {
      font-size: 10px;
      font-weight: 600;
      padding: 1px 6px;
      border-radius: 100px;
      background: var(--bg);
      color: var(--text-muted);
    }
    .dup-candidate-platform {
      font-size: 10px;
      font-weight: 600;
      padding: 1px 6px;
      border-radius: 100px;
      background: rgba(99,102,241,0.08);
      color: #6366f1;
    }
    .dup-candidate-text {
      font-size: 12px;
      color: var(--text-secondary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      direction: auto;
      unicode-bidi: plaintext;
    }
    .dup-similarity {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 100px;
      flex-shrink: 0;
      white-space: nowrap;
    }
    .dup-similarity.high { background: var(--green-bg); color: var(--green); }
    .dup-similarity.medium { background: #fff8ec; color: var(--yellow); }
    .dup-similarity.low { background: var(--bg); color: var(--text-muted); }
    .dup-hash-match {
      font-size: 9px;
      font-weight: 700;
      padding: 1px 5px;
      border-radius: 100px;
      background: rgba(99,102,241,0.1);
      color: #6366f1;
      white-space: nowrap;
    }
    .dup-modal-actions {
      display: flex;
      gap: 8px;
      margin-top: 16px;
    }
    .dup-btn {
      padding: 10px 18px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      color: var(--text-secondary);
      transition: all 0.15s;
      flex: 1;
      text-align: center;
    }
    .dup-btn:hover { border-color: #6366f1; color: #6366f1; }
    .dup-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .dup-btn.primary { background: #6366f1; border-color: #6366f1; color: #fff; }
    .dup-btn.primary:hover { background: #5558e6; }
    .dup-btn.primary:disabled { background: #6366f1; opacity: 0.4; }
    .dup-btn.submit { background: var(--green); border-color: var(--green); color: #fff; }
    .dup-btn.submit:hover { background: #2db850; }
    .dup-warning {
      background: #fef9ee;
      border: 1px solid #fde68a;
      border-radius: 10px;
      padding: 10px 14px;
      font-size: 12px;
      color: #92400e;
      margin-bottom: 14px;
      line-height: 1.5;
    }
    .dup-disclaimer-section {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 8px;
    }
    .dup-disclaimer-q {
      background: var(--bg);
      border-radius: 10px;
      padding: 10px 14px;
    }
    .dup-disclaimer-q .dup-q-title {
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 6px;
    }
    .dup-disclaimer-q .option-list { gap: 4px; }
    .dup-disclaimer-q .option-item { padding: 7px 10px; min-height: 36px; }
    .dup-disclaimer-q .option-label { font-size: 13px; }
    .dup-side-by-side {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 14px;
    }
    @media (max-width: 500px) {
      .dup-side-by-side { grid-template-columns: 1fr; }
    }
    .dup-post-card {
      border: 1px solid var(--border-light);
      border-radius: 10px;
      overflow: hidden;
    }
    .dup-post-card-label {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 8px 10px 4px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .dup-view-post-link {
      font-size: 11px;
      font-weight: 600;
      text-transform: none;
      letter-spacing: 0;
      color: var(--accent);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }
    .dup-view-post-link:hover { text-decoration: underline; }
    .dup-post-links {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
      flex-wrap: wrap;
    }
    .dup-post-link-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      background: var(--accent);
      color: #fff;
    }
    .dup-post-link-btn:hover { opacity: 0.85; }
    .dup-post-link-btn.secondary {
      background: var(--bg);
      color: var(--text);
      border: 1px solid var(--border);
    }
    .dup-post-link-btn.secondary:hover { background: var(--border-light); }
    .dup-post-card-media {
      height: 120px;
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .dup-post-card-media img, .dup-post-card-media video {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    .dup-post-card-body {
      padding: 8px 10px;
    }
    .dup-post-card-user {
      font-size: 12px;
      font-weight: 600;
      margin-bottom: 2px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .dup-post-card-text {
      font-size: 11px;
      color: var(--text-secondary);
      line-height: 1.4;
      max-height: 90px;
      overflow-y: auto;
      word-break: break-word;
      direction: auto;
      unicode-bidi: plaintext;
    }
    .dup-not-found {
      text-align: center;
      padding: 16px;
    }
    .dup-not-found p {
      font-size: 14px;
      color: var(--text-secondary);
      margin-bottom: 14px;
    }
    .dup-no-candidates {
      text-align: center;
      padding: 30px 16px;
      color: var(--text-muted);
    }
    .dup-no-candidates p { font-size: 13px; margin-bottom: 6px; }
    .dup-prefilled-banner {
      background: rgba(99,102,241,0.06);
      border: 1px solid rgba(99,102,241,0.15);
      border-radius: 8px;
      padding: 6px 10px;
      font-size: 12px;
      color: #6366f1;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .dup-loading {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 40px 0;
    }

    /* ============ BURGER MENU ============ */
    .item-actions-menu {
      position: relative;
      flex-shrink: 0;
    }
    .btn-more {
      width: 28px; height: 28px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-white);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      flex-shrink: 0;
      transition: all 0.15s;
      position: relative;
    }
    .btn-more:hover { border-color: var(--accent); color: var(--accent); }
    .btn-more.has-flag { border-color: var(--yellow); }
    .btn-more .flag-dot {
      position: absolute;
      top: -2px; right: -2px;
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--yellow);
      border: 1.5px solid var(--bg-white);
    }
    .item-menu-dropdown {
      position: absolute;
      top: calc(100% + 4px);
      right: 0;
      background: var(--bg-white);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
      min-width: 200px;
      z-index: 100;
      overflow: hidden;
      animation: dropdown-in 0.15s ease;
      padding: 4px 0;
    }
    .item-menu-dropdown button,
    .item-menu-dropdown a {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 9px 14px;
      border: none;
      background: none;
      font-size: 13px;
      font-weight: 500;
      font-family: inherit;
      color: var(--text-secondary);
      cursor: pointer;
      text-decoration: none;
      transition: background 0.1s;
    }
    .item-menu-dropdown button:hover,
    .item-menu-dropdown a:hover { background: var(--bg); }
    .item-menu-dropdown button.active { color: var(--yellow); }
    .item-menu-dropdown button.destructive { color: var(--red); }
    .item-menu-dropdown .menu-divider {
      height: 1px;
      background: var(--border-light);
      margin: 4px 0;
    }

    /* ============ NOTES AREA ============ */
    .notes-area {
      background: var(--bg-white);
      border-radius: var(--radius);
      box-shadow: var(--shadow-card);
      padding: 10px 14px;
      margin-bottom: 10px;
      animation: dropdown-in 0.15s ease;
    }
    .notes-area-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
    }
    .notes-area-header span {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
    }
    .notes-area-close {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 14px;
      padding: 2px;
    }
    .notes-area-close:hover { color: var(--accent); }
    .notes-textarea {
      width: 100%;
      padding: 8px 10px;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      font-size: 13px;
      font-family: inherit;
      outline: none;
      resize: vertical;
      min-height: 60px;
      max-height: 150px;
      transition: border-color 0.2s;
    }
    .notes-textarea:focus { border-color: var(--accent); }

    /* ============ CODEBOOK MODAL ============ */
    .codebook-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 9000;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: fade-in 0.15s ease;
    }
    @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
    .codebook-modal {
      background: var(--card-bg, #fff);
      border-radius: 16px;
      width: min(90vw, 700px);
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
      animation: modal-slide 0.2s ease;
    }
    @keyframes modal-slide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
    .codebook-modal-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 16px 20px 12px;
      border-bottom: 1px solid var(--border-light, #eee);
      flex-shrink: 0;
    }
    .codebook-modal-header h3 {
      flex: 1;
      font-size: 16px;
      font-weight: 600;
      margin: 0;
    }
    .codebook-modal-close {
      background: none;
      border: none;
      font-size: 22px;
      cursor: pointer;
      color: var(--text-secondary);
      padding: 2px 6px;
      border-radius: 6px;
    }
    .codebook-modal-close:hover { background: var(--bg); }
    .codebook-search {
      padding: 8px 16px 8px;
      flex-shrink: 0;
    }
    .codebook-search input {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 13px;
      background: var(--bg, #f5f5f5);
      color: var(--text);
      outline: none;
    }
    .codebook-search input:focus { border-color: #6366f1; }
    .codebook-search-count {
      font-size: 11px;
      color: var(--text-secondary);
      margin-top: 4px;
      padding-left: 2px;
    }
    .codebook-body {
      overflow-y: auto;
      padding: 12px 20px 20px;
      flex: 1;
      min-height: 0;
    }
    .codebook-body h1, .codebook-body h2, .codebook-body h3, .codebook-body h4 {
      font-size: 14px;
      font-weight: 600;
      margin: 10px 0 4px;
      color: var(--text);
    }
    .codebook-body h1 { font-size: 16px; }
    .codebook-body p {
      font-size: 13px;
      line-height: 1.5;
      color: var(--text-secondary);
      margin-bottom: 6px;
    }
    .codebook-body ul, .codebook-body ol {
      font-size: 13px;
      line-height: 1.5;
      color: var(--text-secondary);
      padding-left: 18px;
      margin-bottom: 6px;
    }
    .codebook-body img {
      max-width: 100%;
      border-radius: 8px;
      margin: 6px 0;
    }
    .codebook-body table {
      width: 100%;
      font-size: 12px;
      border-collapse: collapse;
      margin: 6px 0;
    }
    .codebook-body table th, .codebook-body table td {
      padding: 4px 8px;
      border: 1px solid var(--border-light);
      text-align: left;
    }
    .codebook-body table th {
      background: var(--bg);
      font-weight: 600;
    }
    .codebook-body mark {
      background: #fde68a;
      color: inherit;
      border-radius: 2px;
      padding: 0 1px;
    }
    .codebook-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 100px;
      background: rgba(99,102,241,0.08);
      color: #6366f1;
      cursor: pointer;
      transition: background 0.2s ease;
      flex-shrink: 0;
    }
    .codebook-badge:hover { background: rgba(99,102,241,0.15); }

    /* ============ QUESTION GRID ============ */
    .btn-question-grid {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--text-muted);
      padding: 2px 4px;
      border-radius: 4px;
      margin-left: 4px;
      flex-shrink: 0;
    }
    .btn-question-grid:hover { color: var(--accent); background: rgba(0,113,227,0.06); }
    .question-grid-overlay {
      background: var(--card-bg, #fff);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 8px;
      margin-bottom: 8px;
      display: flex;
      flex-direction: column;
      gap: 2px;
      max-height: 300px;
      overflow-y: auto;
      animation: dropdown-in 0.15s ease;
    }
    .question-grid-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
      color: var(--text-secondary);
      transition: background 0.1s;
    }
    .question-grid-item:hover { background: var(--bg); }
    .question-grid-item.current { background: rgba(0,113,227,0.08); color: var(--accent); font-weight: 600; }
    .question-grid-item.answered { color: var(--text); }
    .question-grid-item.skipped { opacity: 0.4; text-decoration: line-through; }
    .question-grid-num {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 600;
      flex-shrink: 0;
    }
    .question-grid-item.answered .question-grid-num { background: rgba(52,199,89,0.12); color: var(--green); }
    .question-grid-item.current .question-grid-num { background: rgba(0,113,227,0.12); color: var(--accent); }
    .question-grid-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
