:root {
  --bg: #100c09;
  --bg-2: #19120d;
  --card: #1b140f;
  --card-border: #3b2b20;
  --text: #fff4e8;
  --muted: #b6a79a;
  --accent: #ff6b00;
  --accent-hover: #ff8a24;
  --accent-dim: rgba(255, 107, 0, 0.16);
  --accent-glow: rgba(255, 107, 0, 0.32);
  --success: #36c99a;
  --danger: #ff7185;
  --radius: 18px;
}

* { box-sizing: border-box; font-family: 'Manrope', sans-serif; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .tg-btn, .patch-title { font-family: 'Manrope', sans-serif; }

/* ---------- Landing ---------- */

.scene {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 5%, #28170c 0%, var(--bg) 58%);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,107,0,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,107,0,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 70%);
}

.card {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 36px 24px;
  text-align: center;
  box-shadow: none;
}

.mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--accent-dim);
}

.hero-kicker {
  margin: 0 0 14px;
  color: #b9aaa0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.card h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 84px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: 0;
  line-height: .95;
  color: #fff8f1;
}
.card h1 span { color: var(--accent); }

.sparkle {
  position: absolute;
  top: 18px;
  right: 22px;
  opacity: 0.9;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.lede {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 28px;
  max-width: 620px;
  font-size: 15px;
  margin-bottom: 30px;
  margin-inline: auto;
}

.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stage.hidden { display: none; }

.tg-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--accent);
  color: #1a0d05;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 18px rgba(255,107,0,0.22), 0 4px 18px rgba(255,107,0,0.16);
}
.tg-btn:hover { 
  background: var(--accent-hover);
  box-shadow: 0 0 28px rgba(255,107,0,0.42), 0 6px 22px rgba(255,107,0,0.22);
}
.tg-btn:active { transform: scale(0.98); }

.hint {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0;
}
.hint b { color: var(--text); font-weight: 500; }

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--card-border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.waiting-text { color: var(--muted); font-size: 14px; margin: 0; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
  font-weight: 500;
}
.link-btn:hover { color: var(--accent-hover); }

.error-text { color: var(--danger); font-size: 14px; margin: 0 0 4px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

/* ---------- App / processor page ---------- */

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.topbar .brand {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--accent);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
}

.user-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.user-pill b {
  color: var(--text);
  font-weight: 500;
}

/* Баланс + кнопка пополнения */
.balance-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
}

.balance-pill b { color: var(--text); font-weight: 600; }

.id-part { white-space: nowrap; }

.copy-id-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
}
.copy-id-btn:hover { color: var(--accent); }

.pill-sep {
  width: 1px;
  height: 14px;
  background: var(--card-border);
}

.modal-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.plus-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.plus-btn:hover { 
  background: var(--accent);
  color: #1a0d05;
  transform: scale(1.08);
}
.plus-btn:active { transform: scale(0.94); }

/* Модалка покупки */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,31,54,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-overlay.hidden { display: none; }

.modal {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--card-border);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 14px 20px 20px; }
.modal-body.hidden { display: none; }

.pkg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.pkg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg);
}

.pkg-text { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pkg-text b { color: var(--text); font-weight: 600; }

.pkg-buy {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 14px rgba(255,107,0,0.22), 0 2px 8px rgba(255,107,0,0.18);
}
.pkg-buy:hover { 
  background: var(--accent-hover);
  box-shadow: 0 0 22px rgba(255,107,0,0.4), 0 4px 12px rgba(255,107,0,0.24);
}

.app-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.patch-panel {
  width: 100%;
  max-width: 520px;
}

.patch-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.patch-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 22px;
}

.dropzone {
  border: 1.5px dashed var(--card-border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone.drag { 
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dropzone svg { margin-bottom: 14px; opacity: 0.8; color: var(--accent); }

.dropzone .dz-title {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--text);
}

.dropzone .dz-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0;
}

.dropzone input { display: none; }

.preview-wrap {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.preview-wrap.show { display: block; }

.preview-wrap video {
  width: 100%;
  display: block;
  max-height: 360px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-top: 1px solid var(--card-border);
  font-size: 12.5px;
  color: var(--muted);
}

.file-row .clear-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
}

.local-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.local-note b { color: var(--success); }

@media (max-width: 600px) {
  .card { padding: 38px 24px; }
  .card h1 { font-size: 56px; }
  .patch-panel { padding: 24px 18px; }
  .topbar { padding: 16px 18px; }
}

/* VideoPatcher checker and content sections */
.app-main { align-items: stretch; flex-direction: column; gap: 28px; max-width: 760px; width: 100%; margin: 0 auto; }
.patch-panel, .checker-panel, .faq-section { width: 100%; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 0; margin: 0 0 12px; text-transform: uppercase; }
.red-eyebrow { color: #ef4444; }
.patch-title { max-width: 640px; font-size: clamp(28px, 5vw, 48px); line-height: 1.04; }
.patch-sub { max-width: 580px; font-size: 15px; line-height: 1.65; }
.checker-panel { padding: 30px; border: 1px solid rgba(255, 113, 133, 0.2); border-radius: 18px; background: linear-gradient(135deg, rgba(255, 113, 133, 0.07), rgba(16, 31, 51, 0.85)); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.checker-copy h2, .faq-section h2 { color: var(--text); margin: 0 0 8px; font: 600 26px/1.15 'Manrope', sans-serif; letter-spacing: 0; }
.checker-copy p:not(.eyebrow) { max-width: 560px; color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 22px; }
.checker-open-btn { border: 0; border-radius: 10px; padding: 14px 19px; background: var(--accent); color: #1a0d05; font: 600 14px 'Manrope', sans-serif; cursor: pointer; box-shadow: 0 0 18px rgba(255, 107, 0, 0.22); transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.checker-open-btn:hover { background: #54d8aa; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(54, 201, 154, 0.3); }
.checker-form { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--card-border); }
.checker-form.hidden { display: none; }
.checker-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.checker-input-row { display: flex; gap: 8px; }
.checker-input-row input { min-width: 0; flex: 1; border: 1px solid var(--card-border); border-radius: 10px; padding: 13px 14px; background: var(--bg); color: var(--text); outline: none; transition: border-color 0.15s ease; }
.checker-input-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18); }
.checker-input-row button { border: 0; border-radius: 10px; padding: 0 16px; background: var(--accent); color: #1a0d05; font-weight: 700; cursor: pointer; transition: background 0.15s ease, box-shadow 0.15s ease; box-shadow: 0 0 14px rgba(255, 107, 0, 0.22); }
.checker-input-row button:hover { background: var(--accent-hover); box-shadow: 0 0 22px rgba(255, 107, 0, 0.4); }
.checker-status { min-height: 18px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.checker-status.loading { color: var(--accent); animation: statusPulse 1.3s ease-in-out infinite; }
.checker-status.success { color: var(--success); }
.checker-status.error { color: var(--danger); }
@keyframes statusPulse { 50% { opacity: .45; } }
.checker-result { margin-top: 20px; padding: 22px; border: 1px solid rgba(255, 107, 0, 0.2); border-radius: 14px; background: linear-gradient(135deg, rgba(255, 107, 0, 0.1), rgba(25, 18, 13, 0.94)); animation: resultIn .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes resultIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.result-heading > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--success); color: #ffffff; font-weight: 800; }
.result-heading small, .result-grid small { display: block; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: 0; }
.result-heading strong { display: block; margin-top: 3px; color: var(--text); font: 600 17px 'Manrope', sans-serif; }
.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.result-grid > div { padding: 13px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--bg); }
.result-grid strong { display: block; margin: 8px 0 3px; color: var(--text); font-size: 15px; }
.result-grid span { color: var(--muted); font-size: 10px; }
.faq-section { padding: 18px 4px 0; }
.faq-section details { border-bottom: 1px solid var(--card-border); }
.faq-section summary { padding: 16px 0; color: var(--text); font-size: 14px; cursor: pointer; list-style: none; font-weight: 500; }
.faq-section summary::after { content: '+'; float: right; color: var(--accent); font-size: 18px; }
.faq-section details[open] summary::after { content: '−'; }
.faq-section details p { max-width: 600px; margin: -4px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.site-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; max-width: 760px; width: 100%; margin: 0 auto; padding: 28px 20px calc(34px + 66px + env(safe-area-inset-bottom)); border-top: 1px solid var(--card-border); }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { color: var(--text); font: 600 17px 'Manrope', sans-serif; }
.site-footer span { max-width: 210px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; max-width: 280px; }
.site-footer a { color: var(--muted); font-size: 11px; text-decoration: none; transition: color 0.15s ease; }
.site-footer a:hover { color: var(--accent); }
.footer-telegram { color: var(--accent) !important; white-space: nowrap; }
.bottom-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 25; display: flex; align-items: stretch; gap: 0; width: 100%; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--card-border); background: var(--card); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12); }
.bottom-nav .nav-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; color: var(--muted); font-size: 10px; cursor: pointer; border: none; background: transparent; border-radius: 8px; transition: all 0.15s ease; }
.bottom-nav .nav-tab.active { color: var(--accent); background: var(--accent-dim); box-shadow: none; }
.bottom-nav .nav-tab:hover { color: var(--accent); background: rgba(255, 107, 0, 0.08); }
.nav-icon { display: grid; place-items: center; width: 20px; height: 20px; color: inherit; }
.nav-icon svg { display: block; width: 20px; height: 20px; }
.language-dock { display: flex; gap: 2px; order: 2; padding: 4px; border: 1px solid var(--card-border); border-radius: 11px; background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.language-dock button { border: 0; border-radius: 7px; padding: 6px 7px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; font-weight: 600; transition: all 0.15s ease; }
.language-dock button.active, .language-dock button:hover { background: var(--accent); color: #ffffff; }
.processing-state.completed .processing-spinner { display: none; }
.processing-state.failed .processing-spinner { animation: none; border-color: var(--danger); }
.processing-state.failed #processingText { color: var(--danger); }
.patch-counter { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .brand { font-size: 17px !important; }
  .language-dock { margin-left: auto; }
  .balance-pill { order: 3; width: 100%; max-width: 100%; justify-content: space-between; }
  .checker-input-row button { min-height: 46px; }
  .bottom-nav .nav-tab { padding-inline: 4px; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { flex-direction: column; padding-inline: 16px; }
}

/* Final product navigation and processing states */
.topbar { flex-wrap: wrap; gap: 16px; }
.brand { flex: 0 0 auto; color: var(--accent); font-size: 20px !important; letter-spacing: 0 !important; }
.language-dock { order: 2; margin-right: auto; margin-left: 20px; }
.balance-pill { order: 3; }
.logout-btn { border: 0; border-left: 1px solid var(--card-border); padding: 0 4px 0 10px; background: transparent; color: var(--muted); font: 500 11px 'Manrope', sans-serif; cursor: pointer; white-space: nowrap; transition: color 0.15s ease; }
.logout-btn { display: inline-flex; align-items: center; gap: 6px; }
.logout-btn:hover { color: var(--danger); }
.logout-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; }
.compressbase-credit { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 9px; }
.compressbase-credit a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: color 0.15s ease; }
.compressbase-credit a:hover { color: var(--accent-hover); }
.view-section.hidden, .processed-result.hidden, .processing-state.hidden { display: none; }
.notice-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px; border: 1px solid rgba(251, 191, 36, 0.25); border-radius: 10px; background: rgba(251, 191, 36, 0.08); color: #f6c96b; }
.notice-banner span { display: grid; place-items: center; flex: 0 0 20px; height: 20px; border-radius: 50%; background: #fbbf24; color: #ffffff; font-weight: 800; }
.notice-banner p { margin: 0; font-size: 13px; }
.process-btn { width: 100%; margin-top: 20px; border: 0; border-radius: 10px; padding: 15px; background: var(--accent); color: #1a0d05; font: 700 14px 'Manrope', sans-serif; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 0 18px rgba(255, 107, 0, 0.22); }
.process-btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(255, 107, 0, 0.4); background: var(--accent-hover); }
.process-btn:disabled { opacity: .55; background: #171411; color: #8c8177; cursor: not-allowed; box-shadow: none; }
.processing-state { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 16px; padding: 15px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--bg); }
.processing-state strong, .processing-state span { display: block; }
.processing-state strong { color: var(--text); font-size: 13px; }
.processing-percent { margin-bottom: 5px; color: var(--accent); font-size: 13px; font-weight: 700; }
#processingText:empty { display: none; }
.processing-state.failed .processing-percent { display: none; }
.cancel-process-btn { grid-column: 2; justify-self: start; border: 1px solid var(--card-border); border-radius: 8px; padding: 7px 11px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.cancel-process-btn:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.cancel-process-btn:disabled { opacity: .45; cursor: not-allowed; }
.processing-spinner { width: 22px; height: 22px; border: 2px solid var(--card-border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.progress-track { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 5px; background: var(--accent-dim); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.processed-result { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 15px; border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 12px; background: rgba(16, 185, 129, 0.08); }
.processed-result > span { color: var(--success); font-size: 20px; }
.processed-result strong, .processed-result small { display: block; }
.processed-result strong { color: var(--text); font-size: 13px; }
.processed-result small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.processed-result a { margin-left: auto; border-radius: 8px; padding: 9px 12px; background: var(--success); color: #ffffff; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: all 0.15s ease; box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2); }
.processed-result a:hover { background: #059669; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); transform: translateY(-1px); }
.checker-support, .faq-support { color: var(--muted); font-size: 12px; text-align: center; }
.checker-support a, .faq-support a { color: var(--danger); text-decoration: none; }
.checker-support a:hover, .faq-support a:hover { text-decoration: underline; }
.faq-section a { color: var(--accent); text-decoration: none; }

.tiktok-publish-btn, .tiktok-connect-btn, .tiktok-submit-btn { min-height: 44px; border: 0; border-radius: 9px; padding: 11px 15px; background: var(--accent); color: #1a0d05; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; box-shadow: 0 0 18px rgba(255, 107, 0, 0.22); }
.tiktok-publish-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex: 0 0 auto; }
.tiktok-publish-btn::before { content: ''; display: block; width: 18px; height: 18px; flex: 0 0 18px; background: url('https://cdn.simpleicons.org/tiktok/111111') center / contain no-repeat; }
.tiktok-publish-btn:hover, .tiktok-connect-btn:hover, .tiktok-submit-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 0 26px rgba(255, 107, 0, 0.4); }
.processed-result { flex-wrap: wrap; }
.tiktok-publish-btn { flex: 0 0 auto; }
.tiktok-composer { max-width: 560px; max-height: min(88vh, 860px); max-height: min(88dvh, 860px); overflow-y: auto; background: var(--card); border-color: var(--card-border); }
.tiktok-composer .modal-head { position: sticky; top: 0; z-index: 1; background: var(--card); }
.tiktok-composer .modal-head h2 { margin: 0; color: var(--text); font-size: 17px; font-weight: 600; }
.tiktok-composer .modal-body { display: grid; gap: 10px; padding: 16px 20px 20px; }
.tiktok-account-status, .tiktok-publish-status { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tiktok-publish-status { color: var(--accent); }
.tiktok-upload-notice { margin: 0; padding: 10px 12px; border: 1px solid rgba(255, 107, 0, .2); border-radius: 8px; background: rgba(255, 107, 0, .08); color: var(--muted); font-size: 11px; line-height: 1.5; }
.tiktok-connect-btn { justify-self: start; }
.tiktok-publish-form { display: grid; gap: 9px; }
.tiktok-publish-form.hidden { display: none; }
.tiktok-field-label { margin-top: 7px; color: var(--text); font-size: 12px; font-weight: 600; }
.tiktok-publish-form textarea, .tiktok-publish-form select { width: 100%; min-height: 44px; border: 1px solid var(--card-border); border-radius: 8px; padding: 10px 12px; background: var(--bg); color: var(--text); font: 400 13px 'Manrope', sans-serif; }
.tiktok-publish-form textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.tiktok-publish-form textarea:focus, .tiktok-publish-form select:focus { outline: 2px solid rgba(255, 107, 0, .35); border-color: var(--accent); }
.tiktok-caption-hint { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.tiktok-caption-hint span:last-child { flex: 0 0 auto; }
.tiktok-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 7px 0; }
.tiktok-toggle-grid label, .tiktok-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.tiktok-toggle-grid input, .tiktok-consent input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); }
.tiktok-toggle-grid input:disabled { opacity: .45; }
.tiktok-draft-note { margin: 0; padding: 10px 12px; border: 1px solid rgba(246, 201, 107, .25); border-radius: 8px; background: rgba(246, 201, 107, .08); color: #f6c96b; font-size: 11px; line-height: 1.45; }
.tiktok-draft-note.hidden { display: none; }
.tiktok-consent { margin-top: 3px; }
.tiktok-submit-btn { margin-top: 5px; }
.tiktok-submit-btn:disabled, .tiktok-connect-btn:disabled { opacity: .55; cursor: wait; transform: none; }
@media (max-width: 600px) {
  .processed-result { flex-wrap: wrap; }
  .tiktok-publish-btn { flex: 1 1 100%; }
  .tiktok-overlay { align-items: flex-end; padding: 8px 0 env(safe-area-inset-bottom); }
  .tiktok-composer { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  .tiktok-composer .modal-body { padding-inline: 16px; }
}
.faq-section a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .topbar { padding: 14px 16px; }
  .language-dock { margin-left: 8px; }
  .balance-pill { max-width: calc(100vw - 150px); overflow: hidden; gap: 6px; font-size: 11px; }
  .logout-btn { padding-left: 7px; }
}

@media (max-width: 600px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 5px;
    padding: 12px 14px;
  }
  .topbar .brand { grid-column: 1; grid-row: 1; font-size: 16px !important; }
  .language-dock { grid-column: 1; grid-row: 2; justify-self: start; margin: 0; }
  .balance-pill {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    width: auto;
    max-width: none;
    gap: 5px;
    padding: 6px;
    overflow: visible;
    font-size: 10px;
  }
  .logout-btn { padding: 0 2px 0 6px; }
  .logout-btn span { display: none; }
  .app-main { padding: 24px 14px 108px; }
  .patch-panel { padding: 0; }
  .patch-title { max-width: 100%; font-size: 28px; line-height: 1.14; }
  .patch-sub { font-size: 14px; line-height: 1.5; }
  .checker-panel { padding: 20px 18px; }
  .checker-copy h2 { font-size: 22px; }
}

.patch-title { font-family: 'Barlow Condensed', sans-serif; font-size: 48px; font-weight: 700; }
.link-btn:hover, .compressbase-credit a:hover { color: var(--accent-hover); }
.checker-panel { border-color: rgba(255, 107, 0, 0.22); background: linear-gradient(135deg, rgba(255, 107, 0, 0.08), rgba(27, 20, 15, 0.92)); }
.red-eyebrow { color: var(--accent); }
.checker-open-btn, .checker-input-row button, .pkg-buy, .process-btn, .processed-result a, .tiktok-publish-btn, .tiktok-connect-btn, .tiktok-submit-btn {
  background: var(--accent);
  color: #1a0d05;
  box-shadow: 0 0 18px rgba(255, 107, 0, 0.22), 0 3px 10px rgba(255, 107, 0, 0.16);
}
.checker-open-btn:hover, .checker-input-row button:hover, .pkg-buy:hover, .process-btn:not(:disabled):hover, .processed-result a:hover, .tiktok-publish-btn:hover, .tiktok-connect-btn:hover, .tiktok-submit-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 26px rgba(255, 107, 0, 0.4), 0 5px 16px rgba(255, 107, 0, 0.24);
}
.checker-input-row input:focus, .tiktok-publish-form textarea:focus, .tiktok-publish-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}
.checker-result { border-color: rgba(255, 107, 0, 0.22); background: linear-gradient(135deg, rgba(255, 107, 0, 0.1), rgba(25, 18, 13, 0.94)); }
.bottom-nav .nav-tab:hover { background: rgba(255, 107, 0, 0.08); }
.tiktok-upload-notice { border-color: rgba(255, 107, 0, 0.2); background: rgba(255, 107, 0, 0.08); }

@media (max-width: 600px) {
  .patch-title { font-size: 35px; }
}

@keyframes orangeButtonGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 107, 0, 0.16), 0 0 18px rgba(255, 107, 0, 0.08); }
  50% { box-shadow: 0 0 15px rgba(255, 107, 0, 0.38), 0 0 28px rgba(255, 107, 0, 0.16); }
}

button:not(:disabled), .tg-btn {
  animation: orangeButtonGlow 2.8s ease-in-out infinite;
}

button:not(:disabled):hover, .tg-btn:hover {
  animation: none;
  box-shadow: 0 0 24px rgba(255, 107, 0, 0.46), 0 0 38px rgba(255, 107, 0, 0.2);
}

button:disabled {
  animation: none;
  box-shadow: none;
}

button:focus-visible, .tg-btn:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  button:not(:disabled), .tg-btn { animation: none; }
  button, .tg-btn { transition-duration: 0.01ms; }
}

.checker-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  border-color: rgba(255, 107, 0, 0.3);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 107, 0, 0.2), transparent 44%),
    repeating-linear-gradient(135deg, rgba(255, 107, 0, 0.025) 0 1px, transparent 1px 13px),
    linear-gradient(135deg, #21150d, #120d09 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 15px 55px rgba(0, 0, 0, 0.25);
}

.checker-form { margin-top: 22px; padding-top: 0; border-top: 0; }
.checker-input-row { align-items: stretch; gap: 10px; }
.checker-input-row input {
  height: 58px;
  border-color: rgba(255, 107, 0, 0.42);
  border-radius: 12px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  font-size: 14px;
}
.checker-input-row input::placeholder { color: #a99a8d; }
.checker-input-row button {
  min-width: 150px;
  min-height: 58px;
  border-radius: 12px;
  font-size: 14px;
}
.checker-source {
  margin: 12px 2px 0;
  padding: 10px 13px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #d5c6b9;
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(12px);
}
.checker-source.hidden, .checker-result.hidden { display: none; }
.checker-status { display: flex; align-items: center; gap: 9px; min-height: 0; margin: 0; }
.checker-status:not(:empty) { min-height: 20px; margin: 12px 2px 0; }
.checker-status.loading::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid rgba(255, 107, 0, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.checker-result {
  margin-top: 22px;
  padding: 20px;
  border-color: rgba(255, 107, 0, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(14px);
}
.result-heading > span { background: var(--accent); color: #1a0d05; }
.result-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.result-meta > div, .result-grid > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 107, 0, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.result-meta small { display: block; color: var(--accent); font-size: 10px; text-transform: uppercase; }
.result-meta strong { display: block; margin-top: 7px; overflow-wrap: anywhere; color: var(--text); font-size: 13px; }
.result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.result-grid > div { border-color: rgba(255, 107, 0, 0.12); background: rgba(255, 255, 255, 0.02); }
.faq-section details p { max-width: 600px; margin: -4px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .checker-panel { padding: 22px 18px; }
  .checker-input-row { gap: 8px; }
  .checker-input-row input { padding-inline: 12px; font-size: 12px; }
  .checker-input-row button { min-width: 112px; padding-inline: 10px; font-size: 12px; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-meta { gap: 8px; }
}

.export-note {
  margin: 10px 0 0;
  color: #ff9a3d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}
.news-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.news-callout p { min-width: 0; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.news-callout b { color: var(--text); white-space: nowrap; }
.news-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  background: #38c878;
  box-shadow: 0 0 16px rgba(56, 200, 120, 0.25);
  color: #082013;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.news-link:hover { transform: translateY(-1px); background: #55dc91; box-shadow: 0 0 22px rgba(56, 200, 120, 0.4); }
.news-link:focus-visible { outline: 2px solid #80f0ae; outline-offset: 3px; }

.dropzone.locked { border-style: solid; border-color: rgba(255, 107, 0, 0.28); background: #17110d; cursor: default; }
.dropzone-content.hidden, .balance-lock.hidden { display: none; }
.balance-lock { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px; padding: 8px; }
.balance-lock-icon { width: 34px; height: 34px; margin-bottom: 12px; color: var(--accent); }
.balance-lock-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.balance-buy-site, .balance-buy-telegram { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border-radius: 8px; font: 700 12px 'Manrope', sans-serif; text-decoration: none; }
.balance-buy-site { border: 0; background: var(--accent); color: #1a0d05; box-shadow: 0 0 16px rgba(255, 107, 0, 0.25); cursor: pointer; }
.balance-buy-telegram { border: 1px solid rgba(255, 107, 0, 0.35); color: var(--text); }
.balance-buy-site:hover { background: var(--accent-hover); }
.balance-buy-telegram:hover { border-color: var(--accent); color: var(--accent-hover); }

.bottom-nav { padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
.bottom-nav .nav-tab { gap: 2px; padding: 5px 4px; font-size: 9px; }
.nav-icon { width: 14px; height: 14px; }
.nav-icon svg { width: 14px; height: 14px; }

@media (max-width: 420px) {
  .balance-lock-actions { width: 100%; flex-direction: column; }
  .balance-buy-site, .balance-buy-telegram { width: min(100%, 220px); }
}
