  :root {
    --bg: #0c0c0e;
    --surface: rgba(255,255,255,0.035);
    --surface-solid: #141416;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --accent: #c8f542;
    --accent-dim: rgba(200,245,66,0.12);
    --accent2: #42d9c5;
    --accent2-dim: rgba(66,217,197,0.1);
    --text: #ffffff;
    --text-secondary: rgba(255,255,255,0.88);
    --danger: #ff5c5c;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --font-display: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    --shadow-card: 0 2px 24px rgba(0,0,0,0.25), 0 0 0 1px var(--border);
    --transition: cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* ── Orange mode (secret) ── */
  .orange-mode {
    --accent: #ffb545;
    --accent-dim: rgba(255,181,69,0.12);
    --accent2: #ff8c42;
    --accent2-dim: rgba(255,140,66,0.1);
  }
  .orange-mode .logo-badge {
    border-color: rgba(255,181,69,0.2);
  }
  .orange-mode .logo-badge::after {
    background: linear-gradient(90deg, transparent, rgba(255,181,69,0.25), transparent);
  }
  .orange-mode .logo:hover .logo-badge {
    box-shadow: 0 0 14px rgba(255,181,69,0.3);
  }
  .orange-mode .tool-card::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255,181,69,0.06) 40%, rgba(255,181,69,0.12) 50%, rgba(255,181,69,0.06) 60%, transparent 100%);
  }
  .orange-mode .tool-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.25), 0 0 24px rgba(255,181,69,0.04);
  }
  .orange-mode .home-hero h1 em {
    background: linear-gradient(90deg, #ffb545, #ff8c42, #ffb545);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .orange-mode .secret-trigger {
    display: none;
  }
  .secret-header-btn {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 10px 24px;
    border-radius: 8px;
    background: linear-gradient(180deg, #252220 0%, #1a1714 100%);
    border: 1px solid rgba(255,181,69,0.25);
    border-bottom: 3px solid rgba(140,70,0,0.4);
    color: #ffb545;
    cursor: pointer;
    transition: all 0.25s var(--transition);
    white-space: nowrap;
    box-shadow: 0 2px 0 0 #0c0804, 0 3px 8px rgba(0,0,0,0.3), 0 0 12px rgba(255,170,50,0.08);
  }
  .secret-header-btn:hover {
    border-color: rgba(255,181,69,0.45);
    color: #ffcc60;
    background: linear-gradient(180deg, #2a2522 0%, #1e1b17 100%);
    box-shadow: 0 2px 0 0 #0c0804, 0 3px 10px rgba(0,0,0,0.35), 0 0 16px rgba(255,170,50,0.12);
  }
  .secret-header-btn:active {
    transform: translateY(2px);
    border-bottom-width: 1px;
    box-shadow: 0 1px 0 0 #0c0804, 0 2px 6px rgba(0,0,0,0.3);
  }
  .orange-mode .secret-header-btn {
    display: inline-flex;
    align-items: center;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html { scroll-behavior: smooth; font-size: 18px; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  /* ── Ambient glow ── */
  body::before {
    content: '';
    position: fixed;
    top: -40%; left: -20%;
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, rgba(200,245,66,0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: drift 20s ease-in-out infinite alternate;
  }
  body::after {
    content: '';
    position: fixed;
    bottom: -30%; right: -15%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(66,217,197,0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: drift 25s ease-in-out infinite alternate-reverse;
  }
  @keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -30px) scale(1.08); }
  }

  /* ── Header ── */
  header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 36px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(12,12,14,0.8);
    backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--border);
  }

  .logo {
    cursor: pointer;
    transition: all 0.3s var(--transition);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .logo:hover .logo-badge {
    background: var(--accent);
    color: #0c0c0e;
    box-shadow: 0 0 14px rgba(200,245,66,0.3);
  }
  .logo:hover .logo-text { opacity: 1; }
  .logo-badge {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(200,245,66,0.2);
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: 0.01em;
    transition: all 0.35s var(--transition);
    position: relative;
    overflow: hidden;
  }
  .logo-badge::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(200,245,66,0.25), transparent);
    animation: shimmer 3s ease-in-out infinite;
  }
  @keyframes shimmer {
    0% { left: -100%; }
    40% { left: 150%; }
    100% { left: 150%; }
  }
  .logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.04em;
    color: var(--text);
    opacity: 0.85;
    transition: opacity 0.3s var(--transition);
  }

  .back-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 0;
    margin: 16px 0 0 28px;
    cursor: pointer;
    transition: color 0.25s var(--transition);
  }
  .back-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    transition: stroke 0.25s var(--transition), transform 0.25s var(--transition);
  }
  .back-btn:hover { color: var(--text); }
  .back-btn:hover svg { stroke: var(--text); transform: translateX(-3px); }
  .back-btn.visible { display: inline-flex; }

  .header-right { display: flex; align-items: center; gap: 12px; }

  /* ── History dropdown ── */
  .history-picker { position: relative; z-index: 101; }
  .history-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s var(--transition);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .history-btn:hover { color: var(--text); border-color: var(--border-hover); background: rgba(255,255,255,0.06); }
  .history-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: slideUp 0.2s var(--transition) both;
  }
  .history-dropdown.show { display: flex; flex-direction: column; }
  .history-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
  }
  .history-dropdown-header span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }
  .history-dropdown-header button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.62rem;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.15s;
  }
  .history-dropdown-header button:hover { color: var(--danger); background: rgba(255,92,92,0.1); }
  #history-list { overflow-y: auto; max-height: 360px; }
  #history-list::-webkit-scrollbar { width: 4px; }
  #history-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
  .history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
  }
  .history-item:hover { background: rgba(255,255,255,0.04); }
  .history-item:last-child { border-bottom: none; }
  .history-item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(163,230,53,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
  }
  .history-item-info { flex: 1; min-width: 0; }
  .history-item-tool { font-size: 0.72rem; font-weight: 600; color: var(--text); }
  .history-item-preview { font-size: 0.65rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
  .history-item-time { flex-shrink: 0; font-size: 0.58rem; color: var(--text-secondary); opacity: 0.7; }
  .history-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 28px 14px;
    font-size: 0.75rem;
  }

  .lang-picker {
    position: relative;
    z-index: 101;
  }
  .lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s var(--transition);
    letter-spacing: 0.02em;
  }
  .lang-btn:hover { color: var(--text); border-color: var(--border-hover); }
  .lang-btn::after {
    content: '\25BE';
    font-size: 0.7em;
    opacity: 0.5;
  }
  .lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    min-width: 150px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(16px);
    animation: slideUp 0.2s var(--transition) both;
  }
  .lang-dropdown.show { display: block; }
  .lang-option {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 7px 12px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: all 0.15s;
  }
  .lang-option:hover { background: var(--surface); color: var(--text); }
  .lang-option.active { color: var(--accent); }

  /* ── Page transitions ── */
  .page {
    display: none;
    position: relative;
    z-index: 1;
  }
  .page.active {
    display: block;
    animation: pageIn 0.45s var(--transition) both;
  }
  @keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── HOME ── */
  .home-hero {
    text-align: center;
    padding: 100px 32px 64px;
    position: relative;
  }
  .home-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 8vw, 4.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 18px;
  }
  .home-hero h1 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hero-gradient 4s ease infinite;
  }
  @keyframes hero-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  .home-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 400;
  }

  .tools-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px 100px;
  }
  .section-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    margin-bottom: 28px;
    padding-left: 4px;
  }

  .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }

  .tool-card {
    padding: 32px 24px 28px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: inherit;
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    transition: transform 0.5s var(--transition), border-color 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    backdrop-filter: blur(12px);
  }
  /* Sweep light beam */
  .tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(200,245,66,0.06) 40%, rgba(200,245,66,0.12) 50%, rgba(200,245,66,0.06) 60%, transparent 100%);
    transform: skewX(-15deg);
    transition: none;
    z-index: 0;
    pointer-events: none;
  }
  /* Bottom accent line */
  .tool-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.5s var(--transition);
    z-index: 1;
  }
  .tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 40px rgba(0,0,0,0.25), 0 0 24px rgba(200,245,66,0.04);
  }
  .tool-card:hover::before {
    animation: sweep-light 0.7s ease forwards;
  }
  .tool-card:hover::after { width: 70%; }
  @keyframes sweep-light {
    0% { left: -100%; }
    100% { left: 140%; }
  }
  .tool-card:active { transform: translateY(-2px); }

  .tool-card-icon {
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    position: relative;
    z-index: 1;
    width: 52px; height: 52px;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .tool-card-icon svg { width: 30px; height: 30px; }
  .tool-card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--accent);
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
  }
  .tool-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    font-weight: 400;
  }
  .tool-card-arrow {
    position: absolute;
    top: 26px; right: 22px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.35s var(--transition);
    opacity: 0;
    z-index: 1;
  }
  .tool-card:hover .tool-card-arrow {
    opacity: 1;
    color: var(--accent);
    transform: translate(3px, -3px);
  }

  /* ── TOOL PAGE ── */
  .tool-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .tool-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  .tool-page-icon {
    font-size: 1.6rem;
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
  }
  .tool-page-icon svg { width: 30px; height: 30px; }
  .tool-page-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: var(--accent);
  }
  .tool-page-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 400;
  }

  /* ── Form elements ── */
  .field-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
  }
  .yt-stats-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-top: 16px;
  }
  .yt-stats-header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
  .yt-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px;
  }
  .yt-stat-item {
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; text-align: center;
  }
  .yt-stat-value { font-size: 1.05rem; font-weight: 700; color: var(--text); }
  .yt-stat-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-top: 2px; }
  .yt-tag {
    font-size: 0.65rem; padding: 3px 10px; border-radius: 20px;
    background: var(--accent-dim); color: var(--accent); font-weight: 500;
  }

  .translate-picker { position: relative; }
  .translate-picker-btn {
    width: 100%; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); font-family: 'Outfit', sans-serif; font-size: 0.88rem; cursor: pointer;
    transition: border-color 0.25s;
  }
  .translate-picker-btn:hover { border-color: var(--border-hover); }
  .translate-picker-dropdown {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    background: var(--surface-solid); border: 1px solid var(--border); border-radius: 10px;
    padding: 6px; max-height: 260px; overflow-y: auto; z-index: 200;
  }
  .translate-picker-dropdown.show { display: block; }
  .translate-picker-dropdown::-webkit-scrollbar { width: 6px; }
  .translate-picker-dropdown::-webkit-scrollbar-track { background: transparent; }
  .translate-picker-dropdown::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  .translate-lang-opt {
    display: block; width: 100%; text-align: left; padding: 8px 12px; background: none; border: none;
    color: var(--text-secondary); cursor: pointer; border-radius: 6px;
    font-size: 0.85rem; font-family: 'Outfit', sans-serif; transition: all 0.15s;
  }
  .translate-lang-opt:hover, .translate-lang-opt.active { background: var(--accent-dim); color: var(--accent); }
  input[type=password], input[type=text] {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 11px 16px;
    transition: all 0.25s var(--transition);
    backdrop-filter: blur(8px);
  }
  input:focus { outline: none; border-color: rgba(200,245,66,0.3); box-shadow: 0 0 0 3px rgba(200,245,66,0.06); }
  input::placeholder { color: var(--text-secondary); }


  /* ── Drop zone ── */
  .dropzone {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s var(--transition);
    background: var(--surface);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
  }
  .dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
  }
  .dropzone:hover, .dropzone.drag {
    border-color: rgba(200,245,66,0.35);
  }
  .dropzone:hover::before, .dropzone.drag::before { opacity: 1; }
  .dropzone-icon {
    font-size: 2rem;
    margin-bottom: 14px;
    display: block;
    position: relative;
    z-index: 1;
    opacity: 0.7;
  }
  .dropzone-title {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
  }
  .dropzone-sub {
    font-size: 0.68rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    font-weight: 400;
  }

  .file-info {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    backdrop-filter: blur(8px);
    animation: slideUp 0.3s var(--transition) both;
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .file-info.show { display: flex; }
  .file-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
  .file-size { color: var(--text-secondary); flex-shrink: 0; font-weight: 400; }
  .file-remove {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; font-size: 0.9rem; padding: 4px 8px;
    transition: color 0.2s; border-radius: 4px;
  }
  .file-remove:hover { color: var(--danger); }
  .file-status { color: var(--text-secondary); font-size: 0.72rem; flex-shrink: 0; }

  /* ── Audio Phase 4: Speaker rename panel ── */
  .speaker-rename-panel {
    margin: 10px 0;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
  }
  .speaker-rename-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 10px;
  }
  .speaker-rename-title { font-weight: 600; }
  .speaker-rename-hint { color: var(--text-secondary); font-size: 0.7rem; }
  .speaker-rename-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .speaker-row {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg); border: 1px solid var(--border);
    padding: 4px 8px; border-radius: 4px;
  }
  .speaker-row label { color: var(--text-secondary); font-size: 0.72rem; white-space: nowrap; }
  .speaker-name-input {
    background: transparent; border: none; color: var(--text);
    font: inherit; padding: 2px 4px; outline: none;
    width: 140px;
  }
  .speaker-name-input:focus { border-bottom: 1px solid var(--accent, #a3e635); }
  .speaker-rename-actions { display: flex; gap: 6px; margin-top: 10px; }

  /* ── Audio options (Phase 1: timestamps toggle, future: enhanced toggle) ── */
  .audio-options {
    display: flex; flex-wrap: wrap; gap: 14px;
    margin: 10px 0;
  }
  .option-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.76rem; color: var(--text-secondary);
    cursor: pointer; user-select: none;
  }
  .option-toggle input[type="checkbox"] {
    width: 14px; height: 14px;
    accent-color: var(--accent, #a3e635);
    cursor: pointer;
  }
  .option-toggle:hover { color: var(--text); }

  /* ── Phase 6: Multi-file PDF queue + results ── */
  .pdf-files-list {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 8px;
  }
  .pdf-file-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    animation: slideUp 0.3s var(--transition) both;
  }
  .pdf-file-row .file-row-name {
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pdf-file-row .file-row-size { color: var(--text-secondary); flex-shrink: 0; }
  .pdf-file-row .file-row-status { color: var(--text-secondary); font-size: 0.72rem; flex-shrink: 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
  .pdf-file-row .status-icon { font-size: 0.85rem; width: 16px; text-align: center; }
  .pdf-file-row .status-done { color: var(--success, #4ade80); }
  .pdf-file-row .status-error { color: var(--danger, #f87171); }
  .pdf-file-row .status-converting,
  .pdf-file-row .status-uploading { color: var(--accent, #a3e635); }
  .pdf-file-row .status-waiting { color: var(--text-secondary); }

  .pdf-batch-info {
    margin-top: 8px; font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
  }

  .pdf-multi-results {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: var(--surface);
  }
  .multi-results-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
  }
  .multi-results-title { font-weight: 600; font-size: 0.82rem; }
  .multi-results-list { display: flex; flex-direction: column; gap: 8px; }
  .pdf-result-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    overflow: hidden;
  }
  .result-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    font-size: 0.76rem;
  }
  .result-card-header .file-row-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .result-card-header .file-row-status { color: var(--text-secondary); font-size: 0.72rem; }
  .result-actions { display: flex; gap: 4px; }
  .pdf-result-card .result-md {
    margin: 0; padding: 12px 14px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    max-height: 400px; overflow: auto;
    font-size: 0.72rem; line-height: 1.5;
    white-space: pre-wrap; word-break: break-word;
  }

  .separator-or {
    text-align: center; color: var(--text-secondary); font-size: 0.85rem;
    margin: 12px 0; position: relative;
  }
  .separator-or::before,
  .separator-or::after {
    content: ''; position: absolute; top: 50%; width: calc(50% - 50px);
    height: 1px; background: var(--border);
  }
  .separator-or::before { left: 0; }
  .separator-or::after  { right: 0; }

  textarea {
    width: 100%;
    min-height: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 16px;
    resize: vertical;
    transition: all 0.25s var(--transition);
    line-height: 1.7;
    backdrop-filter: blur(8px);
  }
  textarea:focus { outline: none; border-color: rgba(200,245,66,0.3); box-shadow: 0 0 0 3px rgba(200,245,66,0.06); }
  textarea::placeholder { color: var(--text-secondary); }

  /* ── Buttons ── */
  .btn {
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.25s var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
  }
  .btn-primary {
    background: var(--accent);
    color: #0c0c0e;
  }
  .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
    opacity: 0;
    transition: opacity 0.25s;
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(200,245,66,0.2); }
  .btn-primary:hover::before { opacity: 1; }
  .btn-primary:active { transform: translateY(0); }
  .btn-primary:disabled {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  .btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
  }
  .btn-ghost:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); }
  .convert-row { display: flex; justify-content: flex-end; gap: 10px; }

  /* ── Source-language picker wrapper (audio + video panels) ── */
  /* Uses .translate-picker / .translate-picker-btn / .translate-picker-dropdown
     / .translate-lang-opt classes already defined above. */
  .lang-row { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
  .lang-row .field-label { margin: 0; }

  /* Dropdown section header (Popular / Other languages) */
  .transcribe-lang-section {
    padding: 8px 12px 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.55;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
  }
  .transcribe-lang-section:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 10px; }

  /* Flag image (PNG from flagcdn.com) inside picker button + dropdown options */
  .lang-flag-img {
    display: inline-block;
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  }
  .lang-flag-spacer { display: inline-block; width: 24px; height: 18px; margin-right: 8px; vertical-align: middle; }
  .translate-lang-opt .lang-name,
  .translate-picker-btn .lang-name { vertical-align: middle; }
  /* Buttons in the dropdown need a flex layout so flag + name align cleanly */
  .translate-picker-dropdown .translate-lang-opt { display: flex; align-items: center; }

  /* ── Progress ── */
  .progress-wrap { display: none; flex-direction: column; gap: 10px; }
  .progress-wrap.show { display: flex; animation: slideUp 0.3s var(--transition) both; }
  .progress-bar {
    height: 2px;
    background: var(--border);
    border-radius: 1px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 1px;
    transition: width 0.3s ease;
    width: 0%;
  }
  .progress-fill.indeterminate {
    width: 40%;
    animation: indeterminate 1.4s ease-in-out infinite;
  }
  @keyframes indeterminate {
    0% { transform: translateX(-250%); }
    100% { transform: translateX(400%); }
  }
  .progress-label { font-size: 0.68rem; color: var(--text-secondary); font-weight: 400; }

  /* ── Output ── */
  .output-wrap { display: none; flex-direction: column; gap: 12px; }
  .output-wrap.show { display: flex; animation: slideUp 0.4s var(--transition) both; }
  .output-header { display: flex; align-items: center; justify-content: space-between; }
  .output-title {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
  }
  .output-title::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(200,245,66,0.4);
  }
  .output-actions { display: flex; gap: 6px; }
  .output-box {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    font-size: 0.76rem;
    line-height: 1.75;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(255,255,255,0.7);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
  }
  .output-box::-webkit-scrollbar { width: 4px; }
  .output-box::-webkit-scrollbar-track { background: transparent; }
  .output-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

  .stats { display: flex; gap: 18px; font-size: 0.65rem; color: var(--text-secondary); flex-wrap: wrap; font-weight: 400; align-items: center; }
  .ocr-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--border);
    color: var(--text);
    background: var(--surface);
  }
  .ocr-type-code        { color: #c8f542; border-color: rgba(200,245,66,0.4); }
  .ocr-type-math        { color: #42d9c5; border-color: rgba(66,217,197,0.4); }
  .ocr-type-table       { color: #f59e0b; border-color: rgba(245,158,11,0.4); }
  .ocr-type-handwriting { color: #ec4899; border-color: rgba(236,72,153,0.4); }
  .ocr-type-document    { color: rgba(255,255,255,0.85); }
  .ocr-type-decorative  { color: rgba(255,255,255,0.4); }
  .stats span { color: var(--accent2); font-weight: 500; }

  /* ── Error ── */
  .error-msg {
    display: none;
    padding: 12px 16px;
    background: rgba(255,92,92,0.06);
    border: 1px solid rgba(255,92,92,0.15);
    border-radius: var(--radius-xs);
    font-size: 0.76rem;
    color: #ff8c8c;
    font-weight: 400;
  }
  .error-msg.show { display: block; animation: slideUp 0.3s var(--transition) both; }
  .translate-warnings-banner {
    margin: 12px 0;
    padding: 12px 16px;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    color: #fbbf24;
    animation: slideUp 0.3s var(--transition) both;
  }
  .translate-warnings-banner strong { font-weight: 600; color: #fde68a; }
  .translate-warnings-banner ul { margin: 6px 0 0 0; padding-left: 20px; }
  .translate-warnings-banner li { margin: 2px 0; line-height: 1.5; }

  /* ── Toast ── */
  .toast {
    position: fixed;
    bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.74rem;
    font-weight: 400;
    opacity: 0;
    transition: all 0.35s var(--transition);
    z-index: 1000;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
  .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

  /* ── Responsive ── */
  @media (max-width: 600px) {
    header { padding: 0 16px; height: 54px; }
    .secret-header-btn { font-size: 0.8rem; padding: 8px 18px; }
    .home-hero { padding: 64px 18px 44px; }
    .home-hero h1 { font-size: clamp(2rem, 9vw, 3.2rem); }
    .home-hero p { font-size: 0.92rem; max-width: 90%; }
    .tools-section { padding: 0 16px 64px; }
    .section-label { font-size: 0.7rem; }
    .tools-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tool-card { padding: 24px 18px 20px; }
    .tool-card-icon { width: 42px; height: 42px; font-size: 1.4rem; margin-bottom: 16px; }
    .tool-card-icon svg { width: 24px; height: 24px; }
    .tool-card-title { font-size: 0.95rem; }
    .tool-card-desc { font-size: 0.76rem; }
    .seo-section { padding: 40px 18px 48px; }
    .seo-section h2 { font-size: 1.3rem; }
    .seo-section p { font-size: 0.85rem; }
    .faq-q { font-size: 0.9rem; padding: 14px 18px; }
    .faq-a { font-size: 0.82rem; }
    .seo-footer p { font-size: 0.78rem; }
    .tool-page { padding: 28px 16px 52px; }
    .convert-row { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
    .stats { gap: 10px; }
    .output-actions { gap: 4px; }
  }

  /* ── SEO Content Section ── */
  .seo-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 18px 48px;
    position: relative;
    z-index: 1;
  }
  .seo-section h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
  }
  .seo-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
    font-weight: 400;
  }
  .seo-section a {
    color: var(--accent);
    text-decoration: none;
  }
  .seo-section a:hover { text-decoration: underline; }

  .faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
  }
  .faq-q {
    padding: 18px 22px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
  }
  .faq-q:hover { background: var(--surface); }
  .faq-q::after { content: '+'; color: var(--accent); font-size: 1.3rem; transition: transform 0.2s ease; }
  .faq-item.open .faq-q::after { transform: rotate(45deg); }
  .faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 22px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 400;
  }
  .faq-item.open .faq-a {
    max-height: 250px;
    padding: 0 22px 18px;
  }

  /* ── Secret Button & Section ── */
  .secret-trigger {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 32px 12px;
    text-align: center;
    position: relative;
    z-index: 1;
  }
  .secret-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, #252220 0%, #1a1714 100%);
    border: 1px solid rgba(255,170,50,0.2);
    border-bottom: 4px solid rgba(140,70,0,0.5);
    color: #ffb545;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    padding: 18px 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    box-shadow:
      0 4px 0 0 #0c0804,
      0 6px 14px rgba(0,0,0,0.45),
      0 0 24px rgba(255,170,50,0.1),
      inset 0 1px 0 rgba(255,200,100,0.1);
    transform: translateY(0);
  }
  .secret-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,170,50,0.22), transparent);
    animation: secret-shimmer 2.5s ease-in-out infinite;
  }
  @keyframes secret-shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
  }
  .secret-btn:hover {
    background: linear-gradient(180deg, #302822 0%, #241c16 100%);
    border-color: rgba(255,180,60,0.35);
    color: #ffcc60;
    box-shadow:
      0 4px 0 0 #0c0804,
      0 8px 22px rgba(0,0,0,0.5),
      0 0 40px rgba(255,170,50,0.15),
      inset 0 1px 0 rgba(255,200,100,0.14);
  }
  .secret-btn:active {
    transform: translateY(3px);
    border-bottom-width: 1px;
    box-shadow:
      0 1px 0 0 #0c0804,
      0 2px 6px rgba(0,0,0,0.3),
      inset 0 1px 0 rgba(255,160,50,0.04);
  }
  .secret-btn.clicked {
    background: linear-gradient(180deg, rgba(255,160,50,0.1) 0%, rgba(255,160,50,0.04) 100%);
    border-color: rgba(255,160,50,0.35);
    border-bottom: 4px solid rgba(255,160,50,0.15);
    color: #ffb850;
    box-shadow:
      0 4px 0 0 rgba(140,70,0,0.3),
      0 8px 24px rgba(255,160,50,0.1),
      inset 0 1px 0 rgba(255,180,80,0.12);
  }
  .secret-section {
    display: none;
    opacity: 0;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 32px 72px;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,181,69,0.1);
  }
  .secret-section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffb545;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
  }
  .secret-section-heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffb545;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.01em;
  }
  .secret-section-number {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255,181,69,0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
  }
  .secret-article p {
    font-size: 0.95rem;
    color: #e8e8e8;
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 400;
    font-family: var(--font-display);
  }
  .secret-article p:last-child { margin-bottom: 0; }
  .secret-coming-soon {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,181,69,0.08);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(255,181,69,0.4);
    text-align: center;
    letter-spacing: 0.03em;
  }
  .secret-article strong {
    color: #ffb545;
    font-weight: 500;
  }

  .seo-footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 32px 48px;
    text-align: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
  }
  .seo-footer p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
  }
  .seo-footer a { color: var(--accent); text-decoration: none; }

  /* ── PRICING PAGE ── */
  .pricing-page { max-width: 1280px; margin: 0 auto; padding: 80px 28px 100px; }
  .pricing-header { text-align: center; margin-bottom: 56px; }
  .pricing-header h1 {
    font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
    letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px;
  }
  .pricing-header p {
    font-family: var(--font-display); font-size: 1.05rem; color: #ffffff; max-width: 520px; margin: 0 auto; line-height: 1.7;
  }

  /* Toggle annual/monthly */
  .pricing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 48px; }
  .pricing-toggle span { font-family: var(--font-display); font-size: 0.88rem; color: rgba(255,255,255,0.5); transition: color 0.3s; cursor: pointer; }
  .pricing-toggle span.active { color: #ffffff; font-weight: 600; }
  .pricing-toggle-switch {
    width: 48px; height: 26px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border);
    position: relative; cursor: pointer; transition: background 0.3s, border-color 0.3s;
  }
  .pricing-toggle-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: rgba(255,255,255,0.5); transition: transform 0.3s var(--transition), background 0.3s;
  }
  .pricing-toggle-switch.annual::after { transform: translateX(22px); background: var(--accent); }
  .pricing-toggle-switch.annual { border-color: rgba(200,245,66,0.3); }
  .pricing-save-badge {
    font-family: var(--font-display); font-size: 0.72rem; color: var(--accent); background: var(--accent-dim);
    padding: 3px 10px; border-radius: 20px; font-weight: 600; opacity: 0; transition: opacity 0.3s;
  }
  .pricing-save-badge.show { opacity: 1; }

  /* Plan cards grid — 4 columns */
  .pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
  .pricing-card {
    border-radius: var(--radius); background: var(--surface-solid); border: 1px solid var(--border);
    padding: 40px 28px 36px; position: relative; transition: transform 0.4s var(--transition), border-color 0.3s, box-shadow 0.4s;
    display: flex; flex-direction: column; min-height: 520px;
  }
  .pricing-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: 0 16px 40px rgba(0,0,0,0.2); }
  .pricing-card.popular {
    border-color: rgba(200,245,66,0.25); box-shadow: 0 0 40px rgba(200,245,66,0.06);
  }
  .pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
    color: #0c0c0e; background: var(--accent); padding: 4px 16px; border-radius: 20px; text-transform: uppercase;
  }
  .pricing-plan-name {
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: #ffffff; margin-bottom: 6px;
  }
  .pricing-plan-desc {
    font-family: var(--font-display); font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-bottom: 20px; line-height: 1.5;
  }
  .pricing-credits {
    font-family: var(--font-display); font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-bottom: 16px;
  }
  .pricing-price {
    display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px;
  }
  .pricing-price .amount {
    font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; color: #ffffff; letter-spacing: -0.03em;
  }
  .pricing-price .period {
    font-family: var(--font-display); font-size: 0.82rem; color: rgba(255,255,255,0.5);
  }
  .pricing-billed {
    font-family: var(--font-display); font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-bottom: 24px; min-height: 18px;
  }

  .pricing-cta {
    display: block; width: 100%; padding: 14px 0; border-radius: var(--radius-sm); font-family: var(--font-display);
    font-size: 0.88rem; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer;
    border: none; transition: all 0.3s var(--transition);
  }
  .pricing-cta-free {
    background: var(--surface); border: 1px solid var(--border); color: #ffffff;
  }
  .pricing-cta-free:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); }
  .pricing-cta-primary {
    background: var(--accent); color: #0c0c0e; font-weight: 700;
  }
  .pricing-cta-primary:hover { background: #d4ff4a; box-shadow: 0 0 20px rgba(200,245,66,0.3); }
  .pricing-cta-secondary {
    background: var(--surface); border: 1px solid var(--border); color: #ffffff;
  }
  .pricing-cta-secondary:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.06); }
  .pricing-cta-business {
    background: var(--accent-dim); border: 1px solid rgba(200,245,66,0.2); color: var(--accent);
  }
  .pricing-cta-business:hover { background: rgba(200,245,66,0.18); }

  .pricing-divider { height: 1px; background: var(--border); margin: 24px 0; }

  .pricing-features { list-style: none; padding: 0; margin: 0; flex: 1; }
  .pricing-features li {
    font-family: var(--font-display); font-size: 0.82rem; color: #ffffff; padding: 7px 0;
    display: flex; align-items: flex-start; gap: 10px; line-height: 1.5;
  }
  .pricing-features li::before {
    content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px;
  }
  .pricing-features li.disabled { color: rgba(255,255,255,0.3); }
  .pricing-features li.disabled::before { content: '—'; color: rgba(255,255,255,0.2); }

  /* Top-up line inside each card */
  .pricing-topup-line {
    font-family: var(--font-display) !important;
    font-size: 0.78rem !important;
    color: rgba(255,255,255,0.5) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    margin-top: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .pricing-topup-line::before { content: none !important; }
  .pricing-topup-line--accent {
    color: var(--accent) !important;
    border-color: rgba(99,102,241,0.35) !important;
    background: rgba(99,102,241,0.08) !important;
  }

  .pricing-faq { max-width: 700px; margin: 72px auto 0; }
  .pricing-faq h2 {
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 32px; color: #ffffff;
  }
  .pricing-faq-item { border-bottom: 1px solid var(--border); }
  .pricing-faq-q {
    width: 100%; background: none; border: none; color: #ffffff; font-family: var(--font-display); font-size: 0.88rem;
    padding: 18px 0; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  }
  .pricing-faq-q svg { width: 16px; height: 16px; transition: transform 0.3s; flex-shrink: 0; margin-left: 12px; }
  .pricing-faq-q.open svg { transform: rotate(180deg); }
  .pricing-faq-a {
    font-family: var(--font-display); font-size: 0.82rem; color: rgba(255,255,255,0.7); line-height: 1.7;
    max-height: 0; overflow: hidden; transition: max-height 0.35s var(--transition), padding 0.35s;
    padding: 0 0;
  }
  .pricing-faq-a.open { max-height: 800px; padding: 0 0 18px; }

  .credits-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 0.68rem; margin-top: 4px; }
  .credits-table th { text-align: left; padding: 8px 12px; color: var(--accent); font-weight: 500; border-bottom: 1px solid var(--border); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .credits-table td { padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); color: rgba(255,255,255,0.8); }
  .credits-table tbody tr:hover { background: rgba(255,255,255,0.02); }
  .credits-table .credits-free { color: var(--accent); font-weight: 500; }


  @media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .pricing-card.popular { order: -1; }
    .pricing-header h1 { font-size: 1.8rem; }
    .pricing-card { min-height: auto; }
  }
  @media (min-width: 769px) and (max-width: 1100px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .pricing-card { min-height: auto; }
  }

/* Header nav links */
.pricing-header-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 14px;
  transition: all 0.25s var(--transition);
}
.pricing-header-link:hover { color: var(--accent); }

#auth-header-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.25s var(--transition);
}
#auth-header-btn:hover { border-color: var(--border-hover); }

#signup-header-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  padding: 7px 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,245,66,0.2);
  border-radius: 8px;
  transition: all 0.25s var(--transition);
}
#signup-header-btn:hover { background: var(--accent); color: #0c0c0e; }

  /* ── CSP Inline Style Replacements ── */

  /* Tool card glow custom properties */
  .tool-card[href="/convert/pdf-to-markdown"] { --card-glow: rgba(239,68,68,0.08); }
  .tool-card[href="/convert/text-to-markdown"] { --card-glow: rgba(66,217,197,0.08); }
  .tool-card[href="/convert/word-to-markdown"] { --card-glow: rgba(43,87,154,0.08); }
  .tool-card[href="/convert/video-to-markdown"] { --card-glow: rgba(163,230,53,0.08); }
  .tool-card[href="/convert/audio-to-markdown"] { --card-glow: rgba(79,195,255,0.08); }
  .tool-card[href="/convert/url-to-markdown"] { --card-glow: rgba(168,255,120,0.08); }
  .tool-card[href="/convert/prompt-optimizer"] { --card-glow: rgba(255,215,0,0.08); }
  .tool-card[href="/convert/excel-to-markdown"] { --card-glow: rgba(34,197,94,0.08); }
  .tool-card[href="/convert/pptx-to-markdown"] { --card-glow: rgba(251,146,60,0.08); }
  .tool-card[href="/convert/image-to-markdown"] { --card-glow: rgba(168,85,247,0.08); }
  .tool-card[href="/convert/epub-to-markdown"] { --card-glow: rgba(236,72,153,0.08); }
  .tool-card[href="/convert/md-cleaner"] { --card-glow: rgba(234,179,8,0.08); }
  .tool-card[href="/convert/markdown-to-pdf"] { --card-glow: rgba(239,68,68,0.08); }
  .tool-card[href="/convert/md-merger"] { --card-glow: rgba(14,165,233,0.08); }
  .tool-card[href="/convert/chunker"] { --card-glow: rgba(139,92,246,0.08); }
  .tool-card[href="/convert/token-counter"] { --card-glow: rgba(6,182,212,0.08); }
  .tool-card[href="/convert/context-builder"] { --card-glow: rgba(245,158,11,0.08); }
  .tool-card[href="/convert/system-prompt-generator"] { --card-glow: rgba(16,185,129,0.08); }
  .tool-card[href="/convert/translate-markdown"] { --card-glow: rgba(59,130,246,0.08); }

  /* Small ghost buttons */
  .btn-sm { padding: 7px 13px; font-size: 0.68rem; }

  /* Hidden elements */
  .hidden { display: none; }

  /* Platform badges */
  .platform-badge { font-size: 0.65rem; padding: 3px 8px; border-radius: 20px; }
  .platform-badge-youtube { background: rgba(255,0,0,0.12); color: #ff4444; }
  .platform-badge-twitter { background: rgba(29,161,242,0.12); color: #1da1f2; }
  .platform-badge-instagram { background: rgba(225,48,108,0.12); color: #e1306c; }
  .platform-badge-facebook { background: rgba(66,103,178,0.12); color: #4267b2; }
  .platform-badge-twitch { background: rgba(145,70,255,0.12); color: #9146ff; }
  .platform-badge-vimeo { background: rgba(26,183,234,0.12); color: #1ab7ea; }
  .platform-badge-more { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

  /* Video tab buttons */
  .video-tab { flex: 1; padding: 10px 0; background: transparent; color: var(--text-muted); border: none; cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: all .2s; }
  .video-tab.active { background: rgba(163,230,53,0.12); color: var(--accent); }

  /* Video input tabs container */
  .video-input-tabs { display: flex; gap: 0; margin-bottom: 16px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }

  /* Platform badges wrapper */
  .platform-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

  /* URL mode toggle container */
  .url-mode-toggle { display: flex; gap: 4px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; width: fit-content; }

  /* URL mode buttons */
  .url-mode-btn { padding: 6px 16px; border: none; border-radius: 8px; font-family: 'Outfit', sans-serif; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.25s ease; background: transparent; color: var(--text-secondary); }
  .url-mode-btn.active { background: var(--accent); color: #0c0c0e; }

  /* URL textarea special */
  .url-textarea { resize: vertical; min-height: 38px; font-family: 'Outfit', sans-serif; }

  /* Crawl options elements */
  .crawl-options-row { display: flex; align-items: center; gap: 12px; }
  .crawl-options-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
  .crawl-presets { display: flex; flex-wrap: wrap; gap: 6px; }
  .crawl-preset {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: rgba(255,255,255,0.6);
    border-radius: 999px;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  }
  .crawl-preset:hover { border-color: var(--border-hover); color: var(--text); }
  .crawl-preset.active {
    background: var(--accent);
    color: #0b0b0c;
    border-color: var(--accent);
    font-weight: 600;
  }
  .crawl-custom-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
  }
  .crawl-custom-label { white-space: nowrap; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
  .crawl-limit-input {
    width: 110px;
    padding: 7px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    text-align: right;
    transition: border-color 0.15s ease;
    -moz-appearance: textfield;
  }
  .crawl-limit-input::-webkit-outer-spin-button,
  .crawl-limit-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .crawl-limit-input:focus { outline: none; border-color: var(--accent); }
  .crawl-limit-suffix { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
  .crawl-limit-hint { font-size: 0.72rem; color: rgba(255,255,255,0.45); flex: 1; min-width: 200px; }
  .epub-select { width: auto; text-align: left; padding-right: 24px; }
  .epub-mode-label-output { margin-left: 16px; }

  /* Progress bar fill initial */
  .progress-fill-zero { width: 0%; }

  /* Crawl pages list */
  .crawl-pages-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

  /* YT stats elements */
  .yt-stats-thumb { width: 120px; height: 68px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
  .yt-stats-meta { min-width: 0; flex: 1; }
  .yt-stats-title { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .yt-stats-channel { font-size: 0.75rem; color: var(--accent); text-decoration: none; margin-top: 4px; display: inline-block; }
  .yt-stats-tags { display: none; margin-top: 10px; flex-wrap: wrap; gap: 6px; }

  /* Output box variants */
  .output-box-preview { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); padding: 12px; border-radius: var(--radius-sm); }
  .output-box-mono { font-family: var(--font-mono); font-size: 0.85rem; white-space: pre-wrap; }
  .output-box-context { font-family: var(--font-mono); font-size: 0.75rem; white-space: pre-wrap; max-height: 400px; overflow-y: auto; }

  /* Section margin bottom */
  .mb-14 { margin-bottom: 14px; }

  /* Flex row with gap 12 */
  .flex-row-12 { display: flex; gap: 12px; margin-bottom: 14px; }
  .flex-1 { flex: 1; }

  /* Form input styled */
  .form-input-styled { width: 100%; padding: 10px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-display); }

  /* Dropzone/file upload button */
  .btn-dropzone { width: 100%; text-align: center; padding: 20px; border: 2px dashed var(--border); border-radius: var(--radius-sm); cursor: pointer; }

  /* File list info */
  .file-list-info { margin-top: 12px; font-size: 0.85rem; color: var(--text-secondary); }

  /* Textarea with height */
  .textarea-tall { height: 120px; }

  /* Translate-related */
  .dropzone-mt { margin-top: 12px; }
  .translate-file-info { display: none; margin-top: 8px; }
  .translate-file-name { font-size: 0.8rem; color: var(--accent); }
  .btn-clear-file { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 0.75rem; margin-left: 8px; }
  .translate-textarea { margin-top: 12px; }

  /* Chevron SVG */
  .chevron-icon { width: 14px; height: 14px; transition: transform 0.2s; }

  /* Secret section */

  /* Footer blog link */
  .footer-blog-link { margin-top: 0.5rem; }
  .footer-legal-links { margin-top: 0.4rem; font-size: 0.72rem !important; }
  .footer-legal-links a { color: var(--text-secondary); opacity: 0.6; transition: opacity 0.2s; }
  .footer-legal-links a:hover { opacity: 1; }
  .footer-company { margin-top: 0.3rem; font-size: 0.68rem !important; opacity: 0.35; }

  /* Pricing FAQ */
  .pricing-faq { margin-top: 56px; }

  /* Login page header links */
  .header-link-pricing { color: var(--text-secondary); }
  .header-link-signup { color: var(--accent); background: var(--accent-dim); padding: 7px 16px; border-radius: 8px; border: 1px solid rgba(200,245,66,0.2); }

  /* Reset password */
  .back-to-login { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); text-decoration: none; }

  /* ── SEO-only block (hidden visually, indexed by crawlers) ──
     The site CSP blocks inline <style> and style="..." attributes
     (style-src 'self'), so all SEO-related styling MUST live here. */
  .seo-only {
    position: absolute !important;
    left: -99999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    clip-path: inset(50%) !important;
    white-space: normal !important;
  }

  /* ── SEO footer (visible, rendered by api/_components.js#buildFooter) ── */
  .site-footer-seo { background:#0c0c0e; color:#cfcfd1; padding:48px 24px; font-size:14px; line-height:1.6; border-top:1px solid #1a1a1c; }
  .site-footer-seo .footer-grid { max-width:1200px; margin:0 auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:32px; }
  .site-footer-seo h3 { color:#fff; font-size:13px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; margin:0 0 12px; opacity:.8; }
  .site-footer-seo ul { list-style:none; padding:0; margin:0; }
  .site-footer-seo li { margin:4px 0; }
  .site-footer-seo a { color:#cfcfd1; text-decoration:none; }
  .site-footer-seo a:hover { color:#fff; text-decoration:underline; }
  .site-footer-seo .footer-meta { max-width:1200px; margin:32px auto 0; padding-top:24px; border-top:1px solid #1a1a1c; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:12px; opacity:.7; }
  .site-footer-seo .footer-meta a { color:#cfcfd1; }
