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

    :root {
      --bg: #f3f4f6;
      --surface: #ffffff;
      --border: #e5e7eb;
      --text: #111827;
      --muted: #6b7280;
      --primary: #2563eb;
      --primary-h: #1d4ed8;
      --danger: #dc2626;
      --success: #16a34a;
      --radius: 8px;
    }

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

    /* ── Layout ── */
    .container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
    .header { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
    .spacer { flex: 1; }

    /* ── Buttons ── */
    .btn {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 7px 14px; border-radius: var(--radius); border: none;
      font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.12s, opacity 0.12s;
      font-family: inherit; white-space: nowrap;
    }
    .btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .btn-primary  { background: var(--primary); color: #fff; }
    .btn-primary:hover:not(:disabled) { background: var(--primary-h); }
    .btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
    .btn-secondary:hover:not(:disabled) { background: var(--bg); }
    .btn-danger   { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
    .btn-danger:hover:not(:disabled)  { background: #fef2f2; }
    .btn-success  { background: var(--success); color: #fff; }
    .btn-success:hover:not(:disabled) { background: #15803d; }
    .btn-ghost    { background: transparent; color: var(--muted); padding: 6px 10px; }
    .btn-ghost:hover:not(:disabled)   { background: var(--border); color: var(--text); }
    .btn-sm       { padding: 5px 10px; font-size: 12px; }

    /* ── Cards ── */
    .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
    .card + .card, .card + .card-sm { margin-top: 10px; }
    .card.no-pad { padding: 0; overflow: hidden; }
    .card-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }

    /* ── Forms ── */
    .form-group { margin-bottom: 14px; }
    .form-group:last-child { margin-bottom: 0; }
    .form-group label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 5px; }
    .form-group input, .form-group textarea, .form-group select {
      width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
      font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
    }
    .form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
    .form-group textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
    .form-row { display: flex; gap: 12px; }
    .form-row .form-group { flex: 1; }
    .form-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
    .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

    /* ── Color picker row ── */
    .color-row { display: flex; align-items: center; gap: 8px; }
    .color-row input[type="color"] { width: 38px; height: 34px; padding: 2px 3px; border-radius: var(--radius); cursor: pointer; flex-shrink: 0; }
    .color-row input[type="text"]  { flex: 1; }

    /* ── Setup ── */
    .setup-wrap { display: flex; align-items: center; justify-content: center; min-height: 90vh; padding: 16px; }
    .setup-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 36px; max-width: 460px; width: 100%; }
    .setup-card h1 { font-size: 22px; margin-bottom: 6px; }
    .setup-card .sub { color: var(--muted); margin-bottom: 28px; line-height: 1.5; }
    .option-btn {
      width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
      background: var(--surface); cursor: pointer; text-align: left; margin-bottom: 10px;
      transition: border-color .15s, box-shadow .15s; font-family: inherit;
    }
    .option-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
    .option-btn strong { display: block; font-size: 14px; margin-bottom: 3px; color: var(--text); }
    .option-btn span { font-size: 12px; color: var(--muted); }
    #github-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

    /* ── Category rows (multi-exam) ── */
    .cat-row {
      display: flex; align-items: center; gap: 14px;
      padding: 14px 16px; border-radius: 18px;
      background: var(--surface); border: 1px solid var(--border);
      cursor: pointer; text-align: left; width: 100%; margin-bottom: 10px;
      font-family: inherit; transition: border-color .15s, box-shadow .15s;
      position: relative;
    }
    .cat-row:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
    .cat-icon-box {
      width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
    }
    .cat-emoji { font-size: 22px; line-height: 1; }
    .cat-info { flex: 1; min-width: 0; }
    .cat-title { font-weight: 600; font-size: 14px; }
    .cat-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .cat-arrow { color: var(--muted); font-size: 18px; flex-shrink: 0; margin-left: 4px; }

    /* ── 2-column tile grid (single exams) ── */
    .tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
    .tile-card {
      border-radius: 18px; border: 1px solid var(--border); background: var(--surface);
      cursor: pointer; font-family: inherit; text-align: left;
      transition: border-color .15s, box-shadow .15s;
      display: flex; flex-direction: column; min-height: 130px; padding: 0;
      position: relative;
    }
    .tile-card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
    .tile-icon-area { padding: 14px 14px 6px; }
    .tile-icon-box { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
    .tile-emoji { font-size: 20px; line-height: 1; }
    .tile-body { padding: 6px 14px 14px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
    .tile-title { font-weight: 700; font-size: 13px; line-height: 1.3; color: var(--text); }
    .tile-count { font-size: 11px; color: var(--muted); margin-top: 3px; }

    /* ── Exam editor ── */
    .page-title { font-size: 18px; font-weight: 600; }

    /* ── Practice tests ── */
    .pt-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px; }
    .pt-item:last-child { border-bottom: none; padding-bottom: 0; }
    .pt-item:first-child { padding-top: 0; }
    .pt-body { flex: 1; }
    .pt-name { font-weight: 500; }
    .pt-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
    .pt-actions { display: flex; gap: 6px; flex-shrink: 0; }

    /* ── Tabs ── */
    .tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
    .tabs::-webkit-scrollbar { height: 3px; }
    .tabs::-webkit-scrollbar-track { background: transparent; }
    .tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
    .tab {
      padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border);
      background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap;
      font-family: inherit; transition: background .12s;
    }
    .tab:hover:not(.tab-active) { background: var(--bg); }
    .tab.tab-active { background: var(--primary); color: #fff; border-color: var(--primary); }
    .tab-count { opacity: .75; font-size: 12px; }

    /* ── Toolbar ── */
    .toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
    .toolbar input { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: inherit; }
    .toolbar input:focus { outline: none; border-color: var(--primary); }

    /* ── Table ── */
    table { width: 100%; border-collapse: collapse; table-layout: fixed; }
    thead th { padding: 9px 12px; border-bottom: 2px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; font-weight: 600; }
    tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
    tbody tr:last-child td { border-bottom: none; }
    tbody tr.q-row { cursor: pointer; }
    tbody tr.q-row:hover td { background: #f9fafb; }
    .cell-id  { color: var(--muted); font-size: 12px; width: 52px; }
    .cell-q   { max-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cell-ans { width: 160px; color: var(--success); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .table-footer { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 13px; color: var(--muted); }

    /* ── Answer options ── */
    .ans-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .ans-row:last-child { margin-bottom: 0; }
    .ans-row input[type="radio"] { width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; accent-color: var(--primary); }
    .ans-letter { width: 18px; flex-shrink: 0; font-weight: 600; color: var(--muted); font-size: 13px; }
    .ans-row input[type="text"] { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: inherit; }
    .ans-row input[type="text"]:focus { outline: none; border-color: var(--primary); }

    /* ── Modal overlay ── */
    .overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
    .modal { background: var(--surface); border-radius: 12px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 24px; }
    .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
    .modal-head h2 { font-size: 16px; font-weight: 600; }
    .modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

    /* ── Toast ── */
    .toast {
      position: fixed; bottom: 20px; right: 20px; z-index: 200;
      padding: 10px 18px; border-radius: var(--radius);
      background: #1f2937; color: #fff; font-size: 13px;
      animation: toast-in .2s ease; box-shadow: 0 4px 12px rgba(0,0,0,.2);
    }
    .toast.toast-error { background: var(--danger); }
    @keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

    /* ── Symbol picker ── */
    .sym-pick-btn {
      width: 38px; height: 34px; padding: 0; border-radius: var(--radius);
      border: 1px solid var(--border); background: var(--surface);
      cursor: pointer; flex-shrink: 0; font-size: 18px; line-height: 1;
      display: flex; align-items: center; justify-content: center;
      transition: border-color .12s;
    }
    .sym-pick-btn:hover { border-color: var(--primary); }
    .sym-search { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: inherit; margin-bottom: 10px; }
    .sym-search:focus { outline: none; border-color: var(--primary); }
    .sym-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px;
      max-height: 380px; overflow-y: auto; padding-right: 2px;
    }
    .sym-grid::-webkit-scrollbar { width: 4px; }
    .sym-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
    .sym-item {
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      padding: 8px 4px; border-radius: 8px; cursor: pointer;
      border: 1.5px solid transparent; background: none; font-family: inherit;
      transition: background .1s, border-color .1s;
    }
    .sym-item:hover { background: var(--bg); border-color: var(--border); }
    .sym-item.sym-active { border-color: var(--primary); background: rgba(37,99,235,.06); }
    .sym-item-icon { font-size: 22px; line-height: 1; }
    .sym-item-abbr {
      font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2px;
      color: var(--muted); background: var(--bg); border: 1px solid var(--border);
      border-radius: 5px; padding: 2px 4px; min-width: 28px; text-align: center;
    }
    .sym-item-name { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.3; word-break: break-all; }
    .sym-status { font-size: 11px; color: var(--muted); margin-bottom: 8px; min-height: 16px; }

    /* ── Scoring mode toggle ── */
    .mode-toggle { display: flex; gap: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; }
    .mode-btn { flex: 1; padding: 5px 12px; border: none; border-radius: calc(var(--radius) - 2px); font-size: 13px; font-weight: 500; cursor: pointer; background: transparent; color: var(--muted); font-family: inherit; transition: background 0.12s, color 0.12s; }
    .mode-btn-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

    /* ── Topic distribution rows ── */
    .dist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .dist-row:last-child { margin-bottom: 0; }
    .dist-input { padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text); }
    .dist-input:focus { outline: none; border-color: var(--primary); }
    .dist-topic { flex: 1; }
    .dist-count { width: 64px; text-align: center; }
    .dist-pts { width: 64px; text-align: center; }

    /* ── Empty / misc ── */
    .empty-text { font-size: 13px; color: var(--muted); padding: 8px 0; }
    .breadcrumb { font-size: 13px; color: var(--muted); }
    .breadcrumb b { color: var(--text); font-weight: 500; }
    .divider { height: 1px; background: var(--border); margin: 16px 0; }

    /* ── Question list media column ── */
    .cell-media { width: 90px; text-align: center; }
    .q-thumb { width: 74px; height: 46px; object-fit: cover; border-radius: 5px; display: block; background: var(--bg); margin: 0 auto; }
    .q-video-badge { width: 74px; height: 46px; background: #1f2937; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; margin: 0 auto; }
    .q-ans-thumbs { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
    .q-ans-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 3px; background: var(--bg); display: block; }
    .q-ans-thumb-empty { width: 32px; height: 32px; display: block; }

    /* ── Question editor media ── */
    .qe-media-section-wrap { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; background: var(--bg); border-radius: 8px; padding: 10px; }
    .qe-media-preview-box { flex-shrink: 0; }
    .qe-media-controls { flex: 1; min-width: 0; }
    .qe-media-img { max-width: 160px; max-height: 120px; border-radius: 6px; object-fit: contain; display: block; }
    .qe-media-video { max-width: 200px; max-height: 120px; border-radius: 6px; display: block; }
    .qe-media-placeholder { width: 100px; height: 70px; background: #1f2937; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
    .qe-media-filename { font-size: 11px; color: var(--muted); word-break: break-all; display: block; margin-bottom: 6px; }
    .ans-media-row { padding: 2px 0 8px 34px; }
    .ans-media-controls { display: flex; align-items: center; gap: 8px; }
    .ans-thumb { width: 56px; height: 44px; object-fit: cover; border-radius: 5px; background: var(--bg); display: block; flex-shrink: 0; }
    /* ── Media modal preview ── */
    .mm-preview { max-width: 100%; max-height: 160px; border-radius: 6px; object-fit: contain; display: block; margin: 0 auto; }

    /* ── ODR notice ── */
    .odr-steps { list-style: none; padding: 0; margin: 0; }
    .odr-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
    .odr-step:last-child { border-bottom: none; padding-bottom: 0; }
    .odr-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
    .odr-step-body { flex: 1; font-size: 13px; line-height: 1.5; }
    .odr-step-body strong { display: block; font-size: 13px; margin-bottom: 2px; }
    .odr-step-body code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
    .odr-asset-box { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; margin-top: 10px; font-size: 12px; color: var(--muted); word-break: break-all; }

    /* ── Topic management ── */
    .topic-mgmt-header { display: flex; align-items: center; margin-bottom: 10px; }
    .topic-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
    .topic-row:last-child { border-bottom: none; padding-bottom: 0; }
    .topic-swatch { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
    .topic-label { flex: 1; font-size: 13px; font-weight: 500; }
    .topic-count { font-size: 12px; color: var(--muted); flex-shrink: 0; }

    /* ── Exam delete button ── */
    .exam-del-btn {
      position: absolute; top: 8px; right: 8px; z-index: 1;
      width: 22px; height: 22px; border-radius: 50%;
      border: 1px solid var(--border); background: var(--surface);
      color: var(--muted); font-size: 11px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      line-height: 1; padding: 0; font-family: inherit;
      transition: background .12s, color .12s, border-color .12s;
    }
    .exam-del-btn:hover { background: #fef2f2; color: var(--danger); border-color: var(--danger); }
    .btn-danger-solid { background: var(--danger); color: #fff; border: none; }
    .btn-danger-solid:hover:not(:disabled) { background: #b91c1c; }

    /* ── Localization ── */
    .loc-wrap { display: flex; height: 100vh; overflow: hidden; }

    /* ═══════════════════════════════════════════
       RESPONSIVE BREAKPOINTS
    ═══════════════════════════════════════════ */

    /* Tablet: ≤ 768px */
    @media (max-width: 768px) {
      .container { padding: 16px 12px; }

      /* Header: wrap buttons onto next line */
      .header { flex-wrap: wrap; gap: 6px; row-gap: 6px; }
      .header .spacer { flex-basis: 100%; height: 0; }
      .header .btn-ghost { padding: 5px 8px; font-size: 12px; }
      .header .page-title { flex: 1; }

      /* Form rows → stack vertically */
      .form-row { flex-direction: column; gap: 0; }

      /* Tile grid → 1 column */
      .tile-grid { grid-template-columns: 1fr; }

      /* Table: hide less important columns */
      .cell-ans { display: none; }
      .cell-id { width: 40px; font-size: 11px; }

      /* Modals: full width with more padding */
      .modal { max-width: 100%; border-radius: 12px 12px 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-height: 92vh; }
      .overlay { align-items: flex-end; padding: 0; }

      /* Localization: sidebar hidden by default, toggled via class */
      .loc-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 16px rgba(0,0,0,.12); }
      .loc-sidebar.loc-sidebar-open { transform: translateX(0); }
      .loc-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 49; }
      .loc-sidebar-overlay.visible { display: block; }
      .loc-topbar { padding: 10px 14px; }
      .loc-strings-list { padding: 0 14px 32px; }
      .loc-filter-bar { padding: 10px 14px; flex-wrap: wrap; }

      /* Localization string row: stack src + translation */
      .loc-row-body { grid-template-columns: 1fr; }
    }

    /* Mobile: ≤ 480px */
    @media (max-width: 480px) {
      body { font-size: 13px; }
      .container { padding: 12px 10px; }

      .header .btn { font-size: 12px; padding: 6px 10px; }
      .page-title { font-size: 15px; }

      .card { padding: 14px; }
      .card + .card, .card + .card-sm { margin-top: 8px; }

      .btn { padding: 6px 11px; font-size: 12px; }
      .btn-sm { padding: 4px 8px; font-size: 11px; }

      /* Practice test items: stack actions below meta */
      .pt-item { flex-wrap: wrap; }
      .pt-actions { width: 100%; justify-content: flex-end; margin-top: 6px; }

      /* Table pagination footer */
      .table-footer { flex-wrap: wrap; gap: 6px; }

      /* Tabs: smaller */
      .tab { padding: 4px 10px; font-size: 12px; }

      /* Toast: full width */
      .toast { left: 10px; right: 10px; bottom: 14px; text-align: center; }

      /* Symbol picker grid: fewer columns */
      .sym-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }

      /* Localization sidebar narrower */
      .loc-sidebar { width: 85vw; max-width: 280px; }
    }

    /* Sidebar */
    .loc-sidebar {
      width: 240px; flex-shrink: 0;
      border-right: 1px solid var(--border); background: var(--surface);
      display: flex; flex-direction: column; overflow: hidden;
    }
    .loc-sidebar-top { padding: 14px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
    .loc-lang-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
    /* Language list */
    .loc-lang-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 8px;
    }
    .loc-lang-header-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
    .loc-lang-chip {
      font-size: 11px; font-weight: 700; color: var(--muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 5px; padding: 3px 7px; flex-shrink: 0;
      font-family: 'SF Mono', Consolas, monospace;
    }
    .loc-lang-chip-active { background: var(--primary); color: #fff; border-color: var(--primary); }
    .loc-lang-item {
      display: flex; align-items: center; gap: 8px;
      padding: 7px 0; border-bottom: 1px solid var(--border);
      cursor: pointer; border-radius: 0;
    }
    .loc-lang-item:last-of-type { border-bottom: none; }
    .loc-lang-item-active { background: rgba(37,99,235,.04); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 6px; }
    .loc-lang-item-body { flex: 1; min-width: 0; }
    .loc-lang-item-name { font-size: 12px; color: var(--text); display: block; }
    .loc-lang-src-badge {
      font-size: 10px; font-weight: 600; text-transform: uppercase;
      color: var(--muted); background: var(--bg); border: 1px solid var(--border);
      border-radius: 4px; padding: 1px 5px;
    }
    .loc-lang-mini-progress { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
    .loc-lang-mini-bar { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .loc-lang-mini-fill { height: 100%; background: var(--success); border-radius: 2px; transition: width .3s; }
    .loc-lang-mini-label { font-size: 10px; color: var(--muted); white-space: nowrap; }
    .loc-lang-del-btn {
      width: 20px; height: 20px; border-radius: 50%;
      border: 1px solid transparent; background: none;
      color: var(--muted); font-size: 10px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; font-family: inherit; padding: 0;
      transition: background .1s, color .1s, border-color .1s;
    }
    .loc-lang-del-btn:hover { background: #fef2f2; color: var(--danger); border-color: var(--danger); }
    .loc-add-lang-row { display: flex; gap: 5px; align-items: center; }
    .loc-add-lang-input {
      flex: 1; padding: 5px 8px; border: 1px solid var(--border);
      border-radius: 5px; font-size: 12px; font-family: inherit;
      background: var(--surface); color: var(--text);
    }
    .loc-add-lang-input:focus { outline: none; border-color: var(--primary); }
    .loc-section-list { flex: 1; overflow-y: auto; padding: 6px 0; }
    .loc-section-list::-webkit-scrollbar { width: 3px; }
    .loc-section-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
    .loc-sec-btn {
      width: 100%; display: flex; align-items: center; gap: 8px;
      padding: 7px 16px; border: none; background: none; cursor: pointer;
      text-align: left; font-family: inherit; transition: background .1s;
    }
    .loc-sec-btn:hover { background: var(--bg); }
    .loc-sec-active { background: rgba(37,99,235,.06) !important; }
    .loc-sec-active .loc-sec-name { color: var(--primary); font-weight: 600; }
    .loc-sec-name { flex: 1; font-size: 13px; color: var(--text); line-height: 1.3; }
    .loc-sec-meta { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
    .loc-badge-todo {
      background: #fef3c7; color: #92400e; border: 1px solid #fbbf24;
      font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px;
    }
    .loc-badge-done { color: var(--success); font-size: 11px; }
    .loc-badge-count { font-size: 11px; color: var(--muted); }

    /* Main area */
    .loc-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
    .loc-topbar {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 20px; border-bottom: 1px solid var(--border);
      background: var(--surface); flex-shrink: 0;
    }
    .loc-topbar-title { font-size: 15px; font-weight: 600; }
    .loc-content { flex: 1; overflow-y: auto; }

    /* Filter bar */
    .loc-filter-bar {
      display: flex; gap: 6px; padding: 12px 24px;
      border-bottom: 1px solid var(--border);
      background: var(--surface); position: sticky; top: 0; z-index: 1;
    }
    .loc-flt {
      display: flex; align-items: center; gap: 5px;
      padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border);
      background: none; font-size: 12px; font-family: inherit;
      cursor: pointer; color: var(--muted); transition: background .1s, color .1s;
    }
    .loc-flt:hover { background: var(--bg); }
    .loc-flt-active { background: var(--primary); color: #fff; border-color: var(--primary); }
    .loc-flt-active .loc-flt-count { background: rgba(255,255,255,.25); color: #fff; }
    .loc-flt-count {
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 600;
    }

    /* String rows */
    .loc-strings-list { padding: 0 24px 32px; }
    .loc-row { padding: 16px 0; border-bottom: 1px solid var(--border); }
    .loc-row:last-child { border-bottom: none; }
    .loc-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
    .loc-key {
      font-size: 11px; font-weight: 600; color: var(--muted);
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 4px; padding: 2px 7px;
      font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    }
    .loc-st {
      font-size: 11px; font-weight: 600; padding: 2px 8px;
      border-radius: 10px; flex-shrink: 0;
    }
    .st-ok   { background: #dcfce7; color: #166534; }
    .st-warn { background: #fef3c7; color: #92400e; }
    .st-miss { background: #f3f4f6; color: var(--muted); }
    .st-src  { background: #eff6ff; color: #1d4ed8; }
    .loc-comment { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-style: italic; line-height: 1.4; }
    .loc-row-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
    .loc-src {
      font-size: 13px; color: var(--muted); line-height: 1.55;
      padding: 7px 10px; background: var(--bg); border-radius: var(--radius);
      min-height: 36px; word-break: break-word;
    }
    .loc-src em { font-style: normal; opacity: .4; }
    .loc-ta {
      width: 100%; padding: 7px 10px;
      border: 1px solid var(--border); border-radius: var(--radius);
      font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text);
      resize: none; overflow: hidden; line-height: 1.55; min-height: 36px;
    }
    .loc-ta:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
    .loc-ta-full { width: 100%; }
    .loc-plural-notice {
      font-size: 12px; color: var(--muted); padding: 7px 10px;
      background: var(--bg); border-radius: var(--radius); font-style: italic;
    }
    .loc-empty-hint { text-align: center; color: var(--muted); padding: 80px 24px; font-size: 14px; }
    .loc-all-done { text-align: center; color: var(--muted); padding: 48px 24px; font-size: 14px; }
