/* AntiHoax Indonesia - Single-page, no-scroll layout */

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

:root {
  --lime:      #c8f135;
  --lime-dk:   #a8d021;
  --lime-txt:  #2a4400;
  --red:       #ef4444;
  --red-l:     #fef2f2;
  --red-d:     #dc2626;
  --green:     #22c55e;
  --green-l:   #f0fdf4;
  --yellow:    #f59e0b;
  --yellow-l:  #fffbeb;
  --blue:      #3b82f6;
  --g50:       #f9fafb;
  --g100:      #f3f4f6;
  --g200:      #e5e7eb;
  --g300:      #d1d5db;
  --g400:      #9ca3af;
  --g500:      #6b7280;
  --g600:      #4b5563;
  --g700:      #374151;
  --g800:      #1f2937;
  --g900:      #111827;
  --r:         12px;
  --r2:        18px;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--g800);
  line-height: 1.6;
}

/* =====================================================
   SHELL -full-screen two-column
   ===================================================== */

.shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* =====================================================
   LEFT PANEL -sky background
   ===================================================== */

.left-panel {
  width: 44%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 32px 44px;
  overflow: hidden;
  position: relative;

  /* Sky gradient */
  background:
    radial-gradient(ellipse 380px 180px at 15% 25%, rgba(255,255,255,0.72) 0%, transparent 62%),
    radial-gradient(ellipse 300px 160px at 80% 18%, rgba(255,255,255,0.65) 0%, transparent 62%),
    radial-gradient(ellipse 220px 120px at 50% 55%, rgba(255,255,255,0.38) 0%, transparent 65%),
    linear-gradient(170deg,
      #1085d4 0%,
      #2aa3e8 15%,
      #52bdf2 32%,
      #80d3f8 52%,
      #b3e6fc 70%,
      #d6f1ff 84%,
      #edf8ff 94%,
      #f6fbff 100%
    );
}

/* ---- Nav ---- */

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.brand-logo {
  height: 126px;
  width: auto;
  object-fit: contain;
}

.affil-label {
  font-size: 16px;
  font-weight: 600;
  color: #0a1628;
  margin-top: 14px;
  letter-spacing: 0.3px;
}

.affil-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  align-items: center;
}

.affil-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 2px 10px rgba(0,0,0,0.14);
  padding: 4px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.15);
}

.nav-pill-fixed {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #000;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.15);
  padding: 5px 13px;
  border-radius: 100px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.nav-pill-fixed:hover { background: rgba(255,255,255,0.95); }

/* ---- Body ---- */

.lp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 100px;
  width: fit-content;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}

.badge-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity:1; transform:scale(1); }
  50%       { opacity:.5; transform:scale(.75); }
}

.lp-title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.12);
}

.lime { color: var(--lime); }

.lp-sub {
  font-size: 0.9rem;
  color: #0a0f1a;
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 340px;
}

/* Stats */

.lp-stats {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 14px;
  padding: 14px 0;
  width: fit-content;
  backdrop-filter: blur(10px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
}

.stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0d1e3a;
  line-height: 1;
}

.stat-lbl {
  font-size: 0.68rem;
  color: #3a5278;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.stat-sep {
  width: 1px;
  height: 26px;
  background: rgba(13,30,58,0.15);
}

/* Model metrics bar */

.model-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.mm-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-label {
  font-size: 0.68rem;
  color: #1e3a5f;
  font-weight: 600;
  width: 148px;
  flex-shrink: 0;
  white-space: nowrap;
}

.mm-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 100px;
  overflow: hidden;
}

.mm-bar {
  height: 100%;
  background: var(--lime);
  border-radius: 100px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}

.mm-bar-muted {
  background: rgba(255,255,255,0.55);
}

.mm-val {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0d1e3a;
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* Rating */

.lp-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #1e3a5f;
  font-weight: 500;
}

.stars { color: #fbbf24; letter-spacing: 2px; }

/* Footer */

.lp-foot {
  font-size: 0.72rem;
  color: #000;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.lp-credit {
  font-size: 0.68rem;
  color: #000;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* =====================================================
   RIGHT PANEL
   ===================================================== */

.right-panel {
  flex: 1;
  background: var(--g50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 40px;
  overflow-y: auto;
}

/* =====================================================
   DETECTOR CARD
   ===================================================== */

.detector-card {
  background: #fff;
  border-radius: var(--r2);
  border: 1px solid var(--g200);
  box-shadow: 0 6px 32px rgba(0,0,0,0.07);
  width: 100%;
  max-width: 480px;
}

/* ── Result Modal Overlay ── */
.result-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,15,35,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.result-panel {
  background: #fff;
  border-radius: var(--r2);
  border: 1px solid var(--g200);
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleUp .25s cubic-bezier(.4,0,.2,1);
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(.97) translateY(8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.card-header {
  padding: 24px 24px 0;
  margin-bottom: 4px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--g900);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--g400);
}

/* ---- Tabs ---- */

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--g200);
  background: var(--g100);
  margin-top: 16px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--g400);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all .18s;
}
.tab-btn:hover { color: var(--g700); }
.tab-btn.active { color: #e63946; background: #fff; border-bottom-color: #e63946; }

/* ---- Tab Content ---- */

.tab-content { display: none; padding: 20px 24px 0; }
.tab-content.active { display: block; }

/* ---- Drop Zone ---- */

.drop-zone {
  border: 2px dashed var(--g200);
  border-radius: var(--r);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--g100);
  transition: all .2s;
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: #e63946;
  background: #fff5f5;
}
.drop-zone:hover .dz-icon, .drop-zone.dragging .dz-icon { color: #e63946; }

.dz-icon   { color: var(--g300); display: flex; justify-content: center; margin-bottom: 10px; transition: color .2s; }
.dz-title  { font-size: 0.9rem; font-weight: 600; color: var(--g700); margin-bottom: 4px; }
.dz-sub    { font-size: 0.8rem; color: var(--g400); margin-bottom: 14px; }
.dz-link   { color: #e63946; font-weight: 600; }
.dz-badges { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.dz-badge  { background: #fff; border: 1px solid var(--g200); color: var(--g600); font-size: 0.68rem; font-weight: 700; padding: 2px 9px; border-radius: 5px; letter-spacing: .04em; }
.dz-limit  { font-size: 0.72rem; color: var(--g400); }

/* ---- File Preview ---- */

.file-preview {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  padding: 11px 14px;
}

.fp-row { display: flex; align-items: center; gap: 10px; }

.fp-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.63rem; font-weight: 800; letter-spacing: .03em;
  flex-shrink: 0;
}
.fp-icon.pdf { background: #fef2f2; color: var(--red); }
.fp-icon.doc { background: #eff6ff; color: var(--blue); }

.fp-info { flex: 1; min-width: 0; }
.fp-name { font-size: 0.83rem; font-weight: 600; color: var(--g800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-size { font-size: 0.72rem; color: var(--g400); margin-top: 1px; }

.fp-del {
  background: var(--g100); border: none; border-radius: 6px;
  width: 27px; height: 27px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--g400); flex-shrink: 0;
  transition: all .18s;
}
.fp-del:hover { background: var(--red-l); color: var(--red); }

/* ---- Textarea ---- */

.ta-wrap {
  border: 1.5px solid var(--g200);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s;
}
.ta-wrap:focus-within { border-color: #e63946; box-shadow: 0 0 0 3px rgba(230,57,70,0.07); }

.ta {
  width: 100%; height: 168px;
  padding: 14px; font-size: 0.87rem; font-family: inherit;
  color: var(--g800); background: #fff;
  border: none; resize: none; outline: none; line-height: 1.7;
}
.ta::placeholder { color: var(--g300); }

.ta-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
  background: var(--g100); border-top: 1px solid var(--g100);
}
.ta-count { font-size: 0.71rem; color: var(--g400); }
.ta-clear {
  font-size: 0.71rem; color: var(--g400); background: none; border: none;
  cursor: pointer; font-family: inherit; padding: 2px 6px; border-radius: 4px; transition: all .18s;
}
.ta-clear:hover { background: var(--g200); color: var(--g600); }

/* ---- Error ---- */

.err-msg {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 24px 0;
  padding: 10px 13px;
  background: var(--red-l); border: 1px solid #fecaca; border-radius: 8px;
  font-size: 0.8rem; color: var(--red-d);
}

/* ---- Submit ---- */

.submit-btn {
  margin: 16px 24px 24px;
  width: calc(100% - 48px);
  padding: 14px;
  background: var(--g900);
  color: #fff;
  border: none; border-radius: var(--r);
  font-size: 0.92rem; font-weight: 700; font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .22s;
}
.submit-btn:hover:not(:disabled) {
  background: var(--lime);
  color: var(--lime-txt);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}
.submit-btn:disabled { background: var(--g200); color: var(--g400); cursor: not-allowed; }

.spin {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   RESULT PANEL
   ===================================================== */

.result-panel {
  padding: 24px;
  animation: fadeUp .3s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }

.rp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.rp-head h3 { font-size: 1rem; font-weight: 800; color: var(--g900); }

.rp-close {
  background: var(--g100); border: none; border-radius: 7px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--g500); transition: all .18s;
}
.rp-close:hover { background: var(--g200); }

/* Verdict */
.verdict-box {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; border-radius: var(--r); margin-bottom: 16px;
}
.verdict-box.hoax      { background: var(--red-l);    border: 1.5px solid #fca5a5; }
.verdict-box.valid     { background: var(--green-l);  border: 1.5px solid #86efac; }
.verdict-box.uncertain { background: var(--yellow-l); border: 1.5px solid #fcd34d; }

.v-icon  { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }
.v-info  { flex: 1; }
.v-label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--g400); margin-bottom: 2px; }
.v-text  { font-size: 0.98rem; font-weight: 700; color: var(--g900); }

.v-badge { font-size: 0.74rem; font-weight: 700; padding: 4px 11px; border-radius: 100px; white-space: nowrap; }
.v-badge.hoax      { background: var(--red);    color: #fff; }
.v-badge.valid     { background: var(--green);  color: #fff; }
.v-badge.uncertain { background: var(--yellow); color: #fff; }

/* Confidence */
.conf-row { display: flex; justify-content: space-between; font-size: 0.77rem; font-weight: 500; color: var(--g500); margin-bottom: 6px; }
.conf-num { font-weight: 700; color: var(--g800); }
.conf-bar { height: 7px; background: var(--g100); border-radius: 100px; overflow: hidden; margin-bottom: 20px; }
.conf-fill { height: 100%; border-radius: 100px; width: 0; transition: width .9s cubic-bezier(.4,0,.2,1); }
.conf-fill.hoax      { background: linear-gradient(90deg,#ef4444,#dc2626); }
.conf-fill.valid     { background: linear-gradient(90deg,#22c55e,#16a34a); }
.conf-fill.uncertain { background: linear-gradient(90deg,#f59e0b,#d97706); }

/* Details */
.det-title { font-size: 0.72rem; font-weight: 700; color: var(--g500); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 9px; }
.det-grid  { display: grid; gap: 7px; margin-bottom: 16px; }
.det-item  { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; background: var(--g100); border-radius: 8px; }
.det-dot   { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.det-dot.red    { background: var(--red); }
.det-dot.green  { background: var(--green); }
.det-dot.yellow { background: var(--yellow); }
.det-text  { font-size: 0.8rem; color: var(--g600); line-height: 1.5; }

/* Score Breakdown */
.score-breakdown {
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.sb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--g100);
}
.sb-row:last-child { border-bottom: none; }

.sb-label  { flex: 1; display: inline-flex; align-items: center; gap: 5px; color: var(--g600); font-weight: 500; }
.sb-val    { font-weight: 800; color: var(--g900); width: 44px; text-align: right; }
.sb-weight { font-size: 0.68rem; color: var(--g400); width: 64px; text-align: right; }

.sb-total { padding-top: 9px; margin-top: 2px; }
.sb-total .sb-label { font-weight: 700; color: var(--g800); }
.sb-total .sb-val   { color: #e63946; }

/* Fact-check sources */
.fc-sources { margin-bottom: 16px; }

.tbh-empty {
  padding: 14px 16px;
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: 9px;
  font-size: 0.82rem;
  color: var(--g500);
}

.tbh-search-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.tbh-search-link:hover { text-decoration: underline; }

.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.fc-count {
  font-size: 0.72rem;
  color: var(--g400);
  font-weight: 500;
}

.fc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.fc-item {
  display: block;
  padding: 10px 13px;
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: 9px;
  text-decoration: none;
  transition: all .18s;
}
.fc-item:hover { background: var(--g100); border-color: var(--g300); }

.fc-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.fc-publisher {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--g700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.rating-hoax    { background: var(--red-l);    color: var(--red-d); }
.rating-valid   { background: var(--green-l);  color: #166534; }
.rating-neutral { background: var(--g100);     color: var(--g600); }

.fc-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--g800);
  line-height: 1.4;
  margin: 3px 0 2px;
}

.fc-claim {
  font-size: 0.73rem;
  color: var(--g500);
  line-height: 1.45;
  margin: 0;
}

/* Disclaimer */
.rp-disc {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 9px 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  font-size: 0.74rem; color: #92400e; line-height: 1.5; margin-bottom: 13px;
}
.rp-disc svg { flex-shrink: 0; margin-top: 1px; color: #d97706; }

.again-btn {
  width: 100%; padding: 12px;
  background: var(--g100); color: var(--g700);
  border: none; border-radius: var(--r);
  font-size: 0.88rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .18s;
}
.again-btn:hover { background: var(--g200); color: var(--g900); }

/* =====================================================
   EXPLAINABLE AI SECTION
   ===================================================== */

.xai-section {
  background: var(--g50);
  border: 1px solid var(--g200);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.xai-summary {
  font-size: 0.78rem;
  color: var(--g600);
  line-height: 1.55;
  margin-bottom: 12px;
}

.xai-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.xai-col-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 8px;
  letter-spacing: .02em;
}

.xai-hoax-head  { background: var(--red-l);   color: var(--red-d); }
.xai-valid-head { background: var(--green-l);  color: #166534; }

.xai-words { display: flex; flex-direction: column; gap: 5px; }

.xai-word {
  display: flex;
  align-items: center;
  gap: 6px;
}

.xai-term {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--g800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.xai-bar-wrap {
  width: 36px;
  height: 4px;
  background: var(--g200);
  border-radius: 100px;
  overflow: hidden;
  flex-shrink: 0;
}

.xai-bar {
  height: 100%;
  border-radius: 100px;
  transition: width .6s ease;
}
.xai-bar-hoax  { background: var(--red); }
.xai-bar-valid { background: var(--green); }

.xai-pct {
  font-size: 0.67rem;
  color: var(--g400);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}

.xai-none { font-size: 0.72rem; color: var(--g400); }

/* Fact-check source extras */
.fc-num {
  font-size: 0.67rem;
  font-weight: 800;
  color: var(--g400);
  width: 16px;
  flex-shrink: 0;
}

.fc-date {
  font-size: 0.67rem;
  color: var(--g400);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =====================================================
   HOW DOES IT WORK
   ===================================================== */

.lp-action-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
}

.how-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 14px;
  padding: 11px 18px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-family: inherit;
  color: #0d1e3a;
  transition: background .2s, transform .15s;
}
.how-btn:hover { background: rgba(255,255,255,0.85); transform: translateY(-1px); }

.how-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0d1e3a;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.how-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(10,15,35,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

.how-modal-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 860px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp .25s cubic-bezier(.4,0,.2,1);
}

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

.how-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--g900);
}

.how-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

/* =====================================================
   QUOTA WARNING TOAST
   ===================================================== */

.quota-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #1f2937;
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 3000;
  width: calc(100% - 48px);
  max-width: 420px;
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
}

.quota-toast svg { flex-shrink: 0; margin-top: 1px; color: #fbbf24; }

.quota-info { flex: 1; min-width: 0; }

.quota-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.quota-sub {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.45;
}

.quota-toast .pwa-close-btn { color: rgba(255,255,255,0.4); margin-top: 1px; }
.quota-toast .pwa-close-btn:hover { color: #fff; }

/* =====================================================
   PWA INSTALL BANNER
   ===================================================== */

.pwa-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--g200);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 2000;
  width: calc(100% - 48px);
  max-width: 400px;
  animation: slideUp .35s cubic-bezier(.4,0,.2,1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.pwa-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--g100);
}

.pwa-info { flex: 1; min-width: 0; }

.pwa-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--g900);
  margin-bottom: 2px;
}

.pwa-sub {
  font-size: 0.73rem;
  color: var(--g500);
  line-height: 1.4;
}

.pwa-install-btn {
  background: var(--g900);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s;
  flex-shrink: 0;
}
.pwa-install-btn:hover { background: #374151; }

.pwa-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--g400);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color .18s;
}
.pwa-close-btn:hover { color: var(--g700); }

/* =====================================================
   UTILITY
   ===================================================== */

.hidden { display: none !important; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 820px) {
  html, body { overflow: auto; }
  .shell { flex-direction: column; height: auto; }
  .left-panel { width: 100%; padding: 32px 24px; min-height: 50vh; }
  .right-panel { padding: 24px 16px 48px; align-items: flex-start; }
  .detector-card, .result-panel { max-width: 100%; }
}
