/* Bornomala font (self-hosted, replaces Hind Siliguri - Jahid, 2026-11-28) */
@font-face { font-family: 'Bornomala'; src: url('assets/fonts/bornomala-regular.woff2') format('woff2'); font-weight: 100 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bornomala'; src: url('assets/fonts/bornomala-bold.woff2') format('woff2'); font-weight: 600 900; font-style: normal; font-display: swap; }
/* Li Ador Noirrit (self-hosted - Jahid's chosen font, v192 2026-12-01).
   Primary UI font from v192; Bornomala above stays as the fallback.
   The two re-stacks at the end live here because theme.css loads
   AFTER index.html's inline style, whose body rule names Bornomala. */
@font-face { font-family: 'Li Ador Noirrit'; src: url('assets/fonts/ador-noirrit-regular.woff2') format('woff2'); font-weight: 100 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Li Ador Noirrit'; src: url('assets/fonts/ador-noirrit-semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Li Ador Noirrit'; src: url('assets/fonts/ador-noirrit-bold.woff2') format('woff2'); font-weight: 700 900; font-style: normal; font-display: swap; }
body { font-family: 'Li Ador Noirrit','Bornomala','Hind Siliguri',sans-serif; }
.cdrop-btn, #introSkip { font-family: 'Li Ador Noirrit','Bornomala','Hind Siliguri',sans-serif; }
/* Edustika Quick Tools — light-mode overrides (split from index.html
   in v50 because the page outgrew the deploy upload limit).
   Dark is the base skin in index.html; these rules apply only
   under html[data-theme="light"]. Loaded after the main style. */
  html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body {
  background: radial-gradient(900px 480px at 50% -8%, rgba(34,197,94,.20), transparent 62%), radial-gradient(700px 420px at 88% 108%, rgba(16,185,129,.12), transparent 60%), #eef5ee;
  color: #173526;
}
html[data-theme="light"] header h1 { background: linear-gradient(90deg,#15803d,#16a34a,#65a30d); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 10px rgba(34,197,94,.18)); }
html[data-theme="light"] header p { color: #4c6a58; }
html[data-theme="light"] .tab { background: linear-gradient(180deg,#ffffff,#edf5ed); color: #2f5240; border-color: rgba(22,163,74,.30); box-shadow: 0 2px 8px rgba(20,60,35,.10); }
html[data-theme="light"] .tab:hover { color: #14532d; box-shadow: 0 10px 22px rgba(34,197,94,.20); border-color: rgba(22,163,74,.5); }
html[data-theme="light"] .tab.active { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; }
html[data-theme="light"] .panel { background: linear-gradient(180deg,#ffffff,#f3f9f3); border-color: rgba(22,163,74,.25); box-shadow: 0 14px 34px rgba(20,60,35,.12); }
html[data-theme="light"] .panel.active:hover { box-shadow: 0 24px 48px rgba(34,197,94,.16), 0 4px 14px rgba(20,60,35,.10); }
html[data-theme="light"] label { color: #2c4a38; }
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=url], html[data-theme="light"] textarea, html[data-theme="light"] select { background: #ffffff; color: #12291a; border-color: rgba(22,163,74,.35); }
html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: #7d9a89; }
html[data-theme="light"] input:focus, html[data-theme="light"] textarea:focus, html[data-theme="light"] select:focus { background: #f4fbf5; border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
html[data-theme="light"] input[type=color] { background: #ffffff; border-color: rgba(22,163,74,.35); }
html[data-theme="light"] .check { color: #24402f; }
html[data-theme="light"] .lang-toggle { background: #ffffff; border-color: rgba(22,163,74,.35); box-shadow: 0 2px 10px rgba(20,60,35,.12); }
html[data-theme="light"] .lang-btn { color: #4c6a58; }
html[data-theme="light"] .lang-btn.active { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; }
html[data-theme="light"] .theme-btn { background: #ffffff; border-color: rgba(22,163,74,.4); color: #14532d; box-shadow: 0 2px 10px rgba(20,60,35,.12); }
html[data-theme="light"] .chip { background: rgba(22,163,74,.08); color: #15803d; border-color: rgba(22,163,74,.3); }
html[data-theme="light"] .chip:hover { background: rgba(22,163,74,.16); }
html[data-theme="light"] .dict-word, html[data-theme="light"] .dict-bn { color: #15803d; }
html[data-theme="light"] .dict-phon { color: #5b7a67; }
html[data-theme="light"] .dict-sec, html[data-theme="light"] .dict-defs .pos { color: #16a34a; }
html[data-theme="light"] .btn-ghost { background: rgba(22,163,74,.08); color: #15803d; border-color: rgba(22,163,74,.35); }
html[data-theme="light"] .result-box { background: rgba(22,163,74,.06); border-color: rgba(22,163,74,.4); }
html[data-theme="light"] .result-box a { color: #15803d; }
html[data-theme="light"] .result-box .svc { color: #5b7a67; }
html[data-theme="light"] .msg.ok { background: rgba(22,163,74,.10); color: #166534; border-color: rgba(22,163,74,.4); }
html[data-theme="light"] .msg.err { background: rgba(220,38,38,.07); color: #b91c1c; border-color: rgba(220,38,38,.35); }
html[data-theme="light"] .status { color: #4c6a58; }
html[data-theme="light"] .interim { color: #7d9a89; }
html[data-theme="light"] footer { color: #7d9a89; }
html[data-theme="light"] .qr-hint { color: #5b7a67; }
html[data-theme="light"] .prev-count { color: #4c6a58; }
html[data-theme="light"] #tooltip { background: #ffffff; color: #173526; border-color: rgba(22,163,74,.4); box-shadow: 0 10px 24px rgba(20,60,35,.22); }
html[data-theme="light"] #tooltip::after { background: #ffffff; }
html[data-theme="light"] .mic-btn { background: linear-gradient(180deg,#ffffff,#edf5ed); border-color: rgba(22,163,74,.4); }
html[data-theme="light"] .mic-btn.listening { background: linear-gradient(135deg,#b91c1c,#ef4444); border-color: #f87171; }
html[data-theme="light"] .ai-msg.bot { background: #ffffff; border-color: rgba(22,163,74,.3); color: #173526; }
html[data-theme="light"] .ai-row { background: rgba(255,255,255,.98); border-top-color: rgba(22,163,74,.3); box-shadow: 0 -10px 28px rgba(20,60,35,.12); }
html[data-theme="light"] .ai-attach { background: linear-gradient(180deg,#ffffff,#edf5ed); border-color: rgba(22,163,74,.4); }
html[data-theme="light"] .ai-attach-bar { background: rgba(22,163,74,.06); border-color: rgba(22,163,74,.35); }
html[data-theme="light"] .ai-attach-bar .af-name { color: #173526; }
html[data-theme="light"] .ai-attach-bar .af-size { color: #5b7a67; }
html[data-theme="light"] .ai-back { background: #ffffff; color: #14532d; border-color: rgba(22,163,74,.4); }
html[data-theme="light"] body.ai-full .ai-topbar { background: rgba(255,255,255,.97); border-bottom-color: rgba(22,163,74,.3); }
html[data-theme="light"] .ai-top-title { color: #173526; }
html[data-theme="light"] .sent-card { background: rgba(22,163,74,.05); border-color: rgba(22,163,74,.25); }
html[data-theme="light"] .sent-main { color: #173526; }
html[data-theme="light"] .sent-tr { color: #4c6a58; }
html[data-theme="light"] .sent-pron { color: #0369a1; }
html[data-theme="light"] .sent-lvl.easy { background: rgba(22,163,74,.14); color: #15803d; }
html[data-theme="light"] .sent-lvl.medium { background: rgba(217,119,6,.14); color: #b45309; }
html[data-theme="light"] .sent-lvl.hard { background: rgba(220,38,38,.10); color: #b91c1c; }
html[data-theme="light"] .wr-card { background: #ffffff; border-color: rgba(22,163,74,.3); }
html[data-theme="light"] .wr-title { color: #14532d; }
html[data-theme="light"] .wr-pron { color: #0369a1; }
html[data-theme="light"] .wr-mean { color: #047857; }
html[data-theme="light"] .wr-sources { color: #6b8577; }
html[data-theme="light"] .wr-sources a { color: #15803d; }
html[data-theme="light"] .wr-meta { color: #6b8577; }
html[data-theme="light"] .hist-ui { background: #f2f7f2; }
html[data-theme="light"] .hist-head, html[data-theme="light"] .hist-actions { background: rgba(255,255,255,.97); border-color: rgba(22,163,74,.3); }
html[data-theme="light"] .hist-title { color: #173526; }
html[data-theme="light"] .hist-word { color: #15803d; }
html[data-theme="light"] .hist-time { color: #4c7a5c; }
html[data-theme="light"] .hist-row { background: rgba(22,163,74,.05); border-color: rgba(22,163,74,.22); }
html[data-theme="light"] .hist-empty { color: #4c6a58; }
html[data-theme="light"] .call-ui { background: radial-gradient(700px 420px at 50% 30%, rgba(34,197,94,.12), transparent 65%), #f2f7f2; }
html[data-theme="light"] .call-avatar { background: radial-gradient(circle, #e6f4ea, #d5ecd9); border-color: rgba(22,163,74,.45); }
html[data-theme="light"] .call-status { color: #173526; }
html[data-theme="light"] .call-sub { color: #4c6a58; }
html[data-theme="light"] .call-timer { color: #15803d; }
html[data-theme="light"] .call-hint { color: #6b8577; }
html[data-theme="light"] .soc-btn { background: #25D366; color: #ffffff; border-color: rgba(37,211,102,.9); box-shadow: 0 8px 20px rgba(20,60,35,.16); }
html[data-theme="light"] .cdrop-btn { background: linear-gradient(165deg, rgba(34,197,94,.16), rgba(255,255,255,.75) 45%, rgba(20,60,35,.05)); color: #173526; border-color: rgba(22,163,74,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -10px 18px rgba(20,60,35,.05), 0 8px 20px rgba(20,60,35,.10); }
html[data-theme="light"] .cdrop-btn.open { border-color: #22c55e; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 3px rgba(34,197,94,.16), 0 10px 26px rgba(20,60,35,.12); }
html[data-theme="light"] .cdrop-pop { background: linear-gradient(165deg, rgba(255,255,255,.98), rgba(238,246,238,.98)); border-color: rgba(22,163,74,.3); box-shadow: 0 26px 54px rgba(20,60,35,.25), inset 0 1px 0 rgba(255,255,255,.8); }
html[data-theme="light"] .cdrop-group { color: #15803d; }
html[data-theme="light"] .cdrop-opt { color: #24402f; }
html[data-theme="light"] .cdrop-opt:hover { background: rgba(34,197,94,.12); color: #0c2417; }
html[data-theme="light"] .cdrop-opt.selected { background: linear-gradient(90deg, rgba(34,197,94,.25), rgba(34,197,94,.08)); color: #0c2417; }

html[data-theme="light"] .tr-dir { background: #ffffff; color: #15803d; border-color: rgba(22,163,74,.35); }
html[data-theme="light"] .tr-dir.tr-on { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; }
html[data-theme="light"] .tr-out { color: #15803d; }
html[data-theme="light"] .tr-pron { color: #14532d; }
html[data-theme="light"] .tr-pron b { color: #16a34a; }
html[data-theme="light"] .tr-src { color: #5c7a66; }
html[data-theme="light"] .tr-btns .btn { background: rgba(22,163,74,.08); color: #15803d; border-color: rgba(22,163,74,.3); }

/* Smoothness (2026-11-28): export-tools.js adds .qt-anim-off to <body>
   while the social dock is off-screen or the app is backgrounded, so
   the buttons' endless shine/spin animations stop draining the GPU. */
body.qt-anim-off .soc-btn::before,
body.qt-anim-off .soc-btn::after { animation-play-state: paused !important; }

/* YouTube latest videos section (v69) */
#ytLatest { max-width: 1080px; margin: 26px auto 34px; padding: 0 16px; text-align: center; }
#ytLatest .yt-h { font-size: 20px; margin: 0 0 14px; color: #eafff2; }
#ytGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (min-width: 760px) { #ytGrid { grid-template-columns: repeat(3, 1fr); } }
.yt-card { display: block; text-align: left; text-decoration: none; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.yt-card:hover { transform: translateY(-2px); border-color: rgba(46,204,113,.55); }
.yt-thumb { position: relative; display: block; aspect-ratio: 16/9; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: #e62117; color: #fff; font-size: 11px; line-height: 26px; text-align: center; }
.yt-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.45; color: #eafff2; padding: 9px 11px 2px; min-height: 41px; }
.yt-date { display: block; font-size: 11.5px; color: #8fd6ab; padding: 0 11px 10px; }
.yt-more { display: inline-block; margin-top: 16px; padding: 9px 20px; border-radius: 999px; border: 1px solid rgba(46,204,113,.6); color: #7be495; text-decoration: none; font-weight: 700; font-size: 14px; }
html[data-theme="light"] #ytLatest .yt-h { color: #0c2d1a; }
html[data-theme="light"] .yt-card { background: #ffffff; border-color: #d8e8dc; }
html[data-theme="light"] .yt-name { color: #123524; }
html[data-theme="light"] .yt-date { color: #4c7a5e; }
html[data-theme="light"] .yt-more { color: #0d7a3f; border-color: #0d7a3f; }

/* Floating scrolling-text bar (ticker) - admin-controlled (v72) */
#tickerBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; height: 37px; overflow: hidden; background: linear-gradient(90deg, #14532d, #166534, #14532d); border-top: 1px solid rgba(74,222,128,.55); color: #eafff1; box-shadow: 0 -4px 16px rgba(0,0,0,.35); }
#tickerBar.show { display: block; }
body.ticker-top #tickerBar { bottom: auto; top: 0; border-top: none; border-bottom: 1px solid rgba(74,222,128,.55); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
body.has-ticker { padding-bottom: 37px; }
body.has-ticker.ticker-top { padding-bottom: 0; padding-top: 37px; }
#tickerIn { display: inline-flex; white-space: nowrap; line-height: 37px; animation: tickMove 18s linear infinite; will-change: transform; }
#tickerIn span { padding: 0 56px; font-size: 14.5px; font-weight: 600; }
@keyframes tickMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
body.ai-full #tickerBar { display: none; }

/* Keep the floating WhatsApp / install buttons clear of the ticker bar */
body.has-ticker #waFloat { bottom: 55px; }
body.has-ticker #btnInstall { bottom: 53px; }

/* Edustika Shop corner button */
#btnInstall { bottom: 16px; }
body.has-ticker #btnInstall { bottom: 53px; }

/* v96: top blinking Shop button in the header */
#btnShopTop { border-color: rgba(74,222,128,.7); color: #4ade80; background: rgba(34,197,94,.13); text-decoration: none; animation: qtGlow 1.6s ease-in-out infinite; }
#btnShopTop .bdot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex: none; animation: qtBlink 1s steps(1) infinite; }
@keyframes qtBlink { 50% { opacity: .12; } }
@keyframes qtGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } 50% { box-shadow: 0 0 16px 3px rgba(74,222,128,.45); } }
html[data-theme="light"] #btnShopTop { color: #15803d; border-color: #22c55e; background: rgba(34,197,94,.10); }
html[data-theme="light"] #btnShopTop .bdot { background: #16a34a; }

/* ============================================================
   v140 — Modern glossy green redesign (Jahid, 2026-11-29)
   Priority: simple first, then user-friendly, then beautiful.
   Nothing moves: same tabs, same order, same controls, same IDs —
   only surfaces, depth and polish change. Green is the main colour:
   emerald -> teal gradients, glass surfaces, glossy icon tiles.
   The admin theme overrides (applySettings) are injected after this
   file and still win wherever the admin picks a custom accent/bg.
   ============================================================ */

/* --- Page backdrop: deep green-black, layered glows + fine dot texture --- */
body {
  background-color: #020604;
  background-image:
    radial-gradient(rgba(74,222,128,.05) 1px, transparent 1.4px),
    radial-gradient(900px 480px at 50% -8%, rgba(34,197,94,.17), transparent 62%),
    radial-gradient(700px 420px at 88% 108%, rgba(16,185,129,.11), transparent 60%),
    radial-gradient(560px 380px at 6% 104%, rgba(45,212,191,.07), transparent 60%);
  background-size: 26px 26px, auto, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
}

/* --- Header: floating glass bar, glowing gradient title (not sticky —
   a stuck bar would permanently eat screen space on phones) --- */
header {
  background: linear-gradient(165deg, rgba(17,42,26,.78), rgba(4,13,8,.86));
  border: 1px solid rgba(74,222,128,.30);
  border-radius: 20px;
  padding: 18px 14px 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,.45), 0 0 30px rgba(34,197,94,.10), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
header h1 {
  background: linear-gradient(92deg, #6ee7a0, #22c55e 45%, #2dd4bf);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 18px rgba(34,197,94,.45));
}
header p { color: #9cc7ab; }
.lang-toggle, .theme-btn {
  background: linear-gradient(180deg, rgba(16,38,24,.88), rgba(5,15,9,.92));
  border-color: rgba(74,222,128,.42);
  box-shadow: 0 4px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.09);
}
.lang-btn.active {
  background: linear-gradient(135deg, #059669, #22c55e 60%, #2dd4bf);
  box-shadow: 0 4px 12px rgba(34,197,94,.4), inset 0 1px 0 rgba(255,255,255,.3);
}

/* --- Tabs: glass chips; active = emerald -> teal gradient + gloss.
   Icons are glossy app-icon tiles (baked into the PNGs) at a big,
   easy-to-see size; labels and order are unchanged. --- */
.tabs { gap: 9px; }
.tab {
  background: linear-gradient(165deg, rgba(19,44,28,.88), rgba(5,14,9,.94));
  border: 1px solid rgba(74,222,128,.30);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.07);
  color: #b7dcc2;
  min-height: 52px;
}
.tab.active {
  background: linear-gradient(140deg, #059669, #22c55e 55%, #2dd4bf);
  border-color: rgba(134,239,172,.7);
  box-shadow: 0 10px 24px rgba(34,197,94,.45), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.35);
  color: #fff;
}
.tab .tab-ic {
  width: 38px; height: 38px; border-radius: 10px;
  vertical-align: -12px; margin-right: 7px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.tab.active .tab-ic { box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 5px 12px rgba(0,0,0,.35); }
.tab .au-lock { position: absolute; top: 5px; right: 7px; margin: 0; font-size: 11px; }
@media (max-width: 480px) {
  .tab { min-height: 48px; }
  .tab .tab-ic { width: 32px; height: 32px; border-radius: 9px; vertical-align: -10px; margin-right: 5px; }
}

/* --- Panels: deep glass, green-tinted border, soft inner light.
   (No backdrop-filter here: panels contain fixed-position bars —
   blur would trap them. The tint + border + shadow carry the glass.) --- */
.panel:not([id="panel-learn"]) {
  background: linear-gradient(170deg, rgba(12,30,19,.92), rgba(3,10,6,.96));
  border: 1px solid rgba(74,222,128,.27);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
}
/* Panel headings (JS-built panels) become glossy pills */
.panel:not([id="panel-learn"]) h2 {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 19px; line-height: 1.3; color: #eafff1;
  padding: 8px 18px 8px 13px; margin-bottom: 14px;
  border-radius: 99px;
  background: linear-gradient(150deg, rgba(34,197,94,.22), rgba(7,32,17,.4));
  border: 1px solid rgba(74,222,128,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 16px rgba(0,0,0,.28);
}

/* --- Inputs: dark glass, rounded, clear green focus ring --- */
input[type=text], input[type=url], textarea, select {
  background: linear-gradient(180deg, rgba(11,27,17,.95), rgba(6,16,10,.97));
  border: 1px solid rgba(74,222,128,.32);
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35);
}
input:focus, textarea:focus, select:focus {
  border-color: #4ade80;
  background: linear-gradient(180deg, rgba(13,33,20,.97), rgba(7,20,12,.98));
  box-shadow: 0 0 0 4px rgba(74,222,128,.16), inset 0 2px 6px rgba(0,0,0,.3);
}

/* --- Buttons: glossy emerald -> teal primaries, glass ghosts --- */
.btn { border-radius: 14px; }
.btn-primary {
  background: linear-gradient(140deg, #059669, #22c55e 55%, #2dd4bf);
  box-shadow: 0 10px 24px rgba(34,197,94,.38), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.32);
}
.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(34,197,94,.5), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.32);
  transform: translateY(-1px);
}
.btn-green {
  background: linear-gradient(140deg, #047857, #10b981 60%, #2dd4bf);
  color: #ecfdf5;
  box-shadow: 0 8px 20px rgba(16,185,129,.35), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-ghost {
  background: linear-gradient(180deg, rgba(34,197,94,.13), rgba(34,197,94,.07));
  border: 1px solid rgba(74,222,128,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  color: #a7f3c9;
}

/* --- Cards & bubbles inside panels --- */
.result-box {
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(34,197,94,.13), rgba(34,197,94,.05));
  border: 1.5px solid rgba(74,222,128,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 24px rgba(0,0,0,.3);
}
.wr-card {
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border-color: rgba(74,222,128,.4);
}
.sent-card { border-radius: 16px; }
.ai-msg.bot {
  background: linear-gradient(170deg, rgba(14,34,21,.95), rgba(7,19,12,.97));
  border-color: rgba(74,222,128,.32);
  border-radius: 18px;
}
.ai-msg.user { background: linear-gradient(140deg, #059669, #22c55e 60%, #2dd4bf); }
.chip {
  background: linear-gradient(180deg, rgba(34,197,94,.15), rgba(34,197,94,.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
}
.qr-card { box-shadow: 0 22px 50px rgba(34,197,94,.25), 0 4px 12px rgba(0,0,0,.5); }
.cdrop-btn { border-radius: 14px; }
#noticeBar { border-radius: 14px; box-shadow: 0 8px 22px rgba(34,197,94,.28), inset 0 1px 0 rgba(255,255,255,.18); }
.yt-card { border-radius: 16px; }

/* ================= v140 — Light mode mirrors ================= */
html[data-theme="light"] body {
  background-color: #edf6ee;
  background-image:
    radial-gradient(rgba(22,163,74,.055) 1px, transparent 1.4px),
    radial-gradient(900px 480px at 50% -8%, rgba(34,197,94,.20), transparent 62%),
    radial-gradient(700px 420px at 88% 108%, rgba(16,185,129,.12), transparent 60%),
    radial-gradient(560px 380px at 6% 104%, rgba(45,212,191,.08), transparent 60%);
  background-size: 26px 26px, auto, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat;
}
html[data-theme="light"] header {
  background: linear-gradient(165deg, rgba(255,255,255,.88), rgba(238,248,240,.84));
  border: 1px solid rgba(22,163,74,.35);
  border-radius: 20px;
  padding: 18px 14px 14px;
  box-shadow: 0 16px 36px rgba(20,60,35,.14), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
html[data-theme="light"] .lang-toggle, html[data-theme="light"] .theme-btn {
  background: linear-gradient(180deg, #ffffff, #eef6ee);
  border-color: rgba(22,163,74,.4);
  box-shadow: 0 4px 14px rgba(20,60,35,.12), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .tab {
  background: linear-gradient(165deg, rgba(255,255,255,.96), rgba(236,246,238,.92));
  border: 1px solid rgba(22,163,74,.32);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(20,60,35,.10), inset 0 1px 0 #ffffff;
  color: #2f5240;
  min-height: 52px;
}
html[data-theme="light"] .tab.active {
  background: linear-gradient(140deg, #059669, #22c55e 55%, #2dd4bf);
  border-color: rgba(22,163,74,.55);
  box-shadow: 0 10px 24px rgba(34,197,94,.35), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.3);
  color: #fff;
}
html[data-theme="light"] .panel:not([id="panel-learn"]) {
  background: linear-gradient(170deg, rgba(255,255,255,.95), rgba(241,248,242,.93));
  border: 1px solid rgba(22,163,74,.28);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(20,60,35,.12), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] .panel:not([id="panel-learn"]) h2 {
  background: linear-gradient(150deg, rgba(34,197,94,.16), rgba(255,255,255,.65));
  border-color: rgba(22,163,74,.35);
  color: #14532d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 16px rgba(20,60,35,.10);
}
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=url],
html[data-theme="light"] textarea, html[data-theme="light"] select {
  background: linear-gradient(180deg, #ffffff, #f4faf4);
  border: 1px solid rgba(22,163,74,.35);
  border-radius: 14px;
  box-shadow: inset 0 2px 5px rgba(20,60,35,.06);
}
html[data-theme="light"] input:focus, html[data-theme="light"] textarea:focus, html[data-theme="light"] select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.16), inset 0 2px 5px rgba(20,60,35,.05);
}
html[data-theme="light"] .btn-primary {
  background: linear-gradient(140deg, #059669, #22c55e 55%, #2dd4bf);
  box-shadow: 0 10px 24px rgba(34,197,94,.32), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.3);
}
html[data-theme="light"] .btn-ghost {
  background: linear-gradient(180deg, rgba(34,197,94,.10), rgba(34,197,94,.05));
  border-color: rgba(22,163,74,.38);
  color: #15803d;
}
html[data-theme="light"] .ai-msg.bot {
  background: linear-gradient(170deg, #ffffff, #f2f8f2);
  border-color: rgba(22,163,74,.3);
}
html[data-theme="light"] .ai-msg.user { background: linear-gradient(140deg, #059669, #22c55e 60%, #2dd4bf); }
html[data-theme="light"] .result-box {
  background: linear-gradient(165deg, rgba(34,197,94,.09), rgba(34,197,94,.04));
  border-color: rgba(22,163,74,.45);
}
html[data-theme="light"] .wr-card { background: linear-gradient(170deg, #ffffff, #f6faf6); border-color: rgba(22,163,74,.32); }

/* ============================================================
   v141 — Grammar + Question Maker: ONE big segmented rectangle
   (Jahid, 2026-11-29). The two tabs stay separate buttons that
   open their own panels, but they sit side by side inside a
   single large rectangle with a divider down the middle. The
   #tabDuo wrapper is built by the wrap routine at the end of
   qmake-block.js; the halves keep no border/background of their
   own, so together they read as one rectangle, not two buttons.
   The active half takes the v140 emerald -> teal gradient; the
   wrapper's overflow + radius clip it to its own half, so it is
   rounded only on the outer corners, square against the divider.
   ============================================================ */
#tabDuo {
  flex: 1 1 100%;
  display: flex;
  position: relative;
  background: linear-gradient(165deg, rgba(19,44,28,.88), rgba(5,14,9,.94));
  border: 1px solid rgba(74,222,128,.30);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.07);
  overflow: hidden;
}
/* The divider: a soft green line down the middle of the rectangle,
   fading out at both ends, always visible over either half. */
#tabDuo::after {
  content: '';
  position: absolute; top: 10px; bottom: 10px; left: 50%;
  width: 1px; margin-left: -.5px; z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(74,222,128,.45) 25%, rgba(74,222,128,.45) 75%, transparent);
  pointer-events: none;
}
#tabDuo .tab {
  flex: 1 1 50%;
  min-height: 56px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-size: 15.5px;
}
#tabDuo .tab:hover { transform: none; box-shadow: none; }
#tabDuo .tab.active {
  background: linear-gradient(140deg, #059669, #22c55e 55%, #2dd4bf);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.35);
  color: #fff;
}
@media (max-width: 480px) {
  #tabDuo .tab { min-height: 54px; font-size: 14.5px; }
}
html[data-theme="light"] #tabDuo {
  background: linear-gradient(165deg, rgba(255,255,255,.96), rgba(236,246,238,.92));
  border-color: rgba(22,163,74,.32);
  box-shadow: 0 6px 16px rgba(20,60,35,.10), inset 0 1px 0 #ffffff;
}
html[data-theme="light"] #tabDuo::after {
  background: linear-gradient(180deg, transparent, rgba(22,163,74,.40) 25%, rgba(22,163,74,.40) 75%, transparent);
}
html[data-theme="light"] #tabDuo .tab { background: transparent; border: none; box-shadow: none; color: #2f5240; }
html[data-theme="light"] #tabDuo .tab.active {
  background: linear-gradient(140deg, #059669, #22c55e 55%, #2dd4bf);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(3,84,42,.3);
  color: #fff;
}

/* v189: no pinch zoom, no double-tap zoom (v165 'manipulation' still allowed pinch-zoom) */
html, body { touch-action: pan-x pan-y; }

/* v168: Quick Tools shell reskinned to the Shop's v3 design language
   (Jahid, 2026-12-01): glossy white animated logo plaque in the header,
   emerald-teal title gradient, glass panels/tabs, gold accents, footer
   policy pills + credit line. Visual only — no behaviour changes. */
body { background: radial-gradient(900px 520px at 88% -4%, rgba(45,212,191,.10), transparent 60%), radial-gradient(1100px 640px at 50% -12%, rgba(16,185,129,.15), transparent 65%), #020604; }
header { position: relative; }
header::before { content: ""; display: block; width: 78px; height: 78px; margin: 4px auto 14px; border-radius: 20px;
  background-image: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(167,243,208,.45) 46%, rgba(255,255,255,.95) 50%, rgba(167,243,208,.45) 54%, rgba(255,255,255,0) 70%), linear-gradient(118deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.45) 30%, rgba(255,255,255,.08) 50%, rgba(255,255,255,0) 62%), url('assets/edustika-logo-full.webp'), linear-gradient(160deg, #ffffff 0%, #f6faf7 52%, #e7f2ec 100%);
  background-size: 250% 100%, 100% 100%, calc(100% - 10px) calc(100% - 10px), 100% 100%;
  background-position: 130% 0, 0 0, center, 0 0;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(6,78,59,.10), inset 0 -10px 18px -12px rgba(4,47,30,.22), 0 12px 24px -10px rgba(0,0,0,.65), 0 0 22px -4px rgba(16,185,129,.40), 0 0 46px -10px rgba(45,212,191,.22);
  animation: qtPlaque 4.8s ease-in-out infinite; }
@keyframes qtPlaque { 0% { background-position: 130% 0, 0 0, center, 0 0; } 22% { background-position: -130% 0, 0 0, center, 0 0; } 100% { background-position: -130% 0, 0 0, center, 0 0; } }
@media (prefers-reduced-motion: reduce) { header::before { animation: none; } }
html[data-theme="light"] header::before { box-shadow: inset 0 1px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(6,78,59,.14), inset 0 -10px 18px -12px rgba(4,47,30,.18), 0 10px 24px -8px rgba(20,60,35,.35), 0 0 22px -6px rgba(16,185,129,.35); }
header h1 { background: linear-gradient(100deg, #34d399 5%, #2dd4bf 55%, #5eead4 95%); -webkit-background-clip: text; background-clip: text; }
header p { color: #9db3a6; }
.panel { background: linear-gradient(165deg, rgba(255,255,255,.055), rgba(255,255,255,.018) 46%, rgba(16,185,129,.05)), linear-gradient(180deg, #08130c, #040805); border-color: rgba(94,234,212,.26); box-shadow: 0 30px 60px -30px rgba(0,0,0,.75), 0 14px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); }
.tab { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 4px 14px rgba(0,0,0,.3); }
#btnShopTop { border-color: rgba(217,184,119,.55); }
#polLinks { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; align-items: center; max-width: 820px; margin: 14px auto 0; padding: 0 12px; }
#polLinks a { font-size: 13.5px; font-weight: 500; color: #9db3a6; padding: 8px 17px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); text-decoration: none; }
#polLinks a:hover { color: #f2f7f3; border-color: rgba(255,255,255,.34); }
html[data-theme="light"] #polLinks a { color: #2c4a35; border-color: #c2e2ca; background: #ffffff; box-shadow: none; }
#qtCredit { text-align: center; font-size: 13px; color: #64806f; margin: 10px auto 0; padding: 0 12px 6px; }
#qtCredit a { color: #d9b877; font-weight: 600; text-decoration: none; }
#qtCredit a:hover { text-decoration: underline; }
html[data-theme="light"] #qtCredit { color: #7d9a86; }
body.ai-full #qtCredit { display: none; }
body.ai-full #polLinks { display: none; }

/* v181 (2026-12-01): desktop layout fix (Jahid: on desktop the whole
   site sat in a narrow centred column). Everything below sits behind
   min-width:1024px — phone/tablet layouts are byte-for-byte the old
   behaviour. The .wrap cap rises 660px -> 1220px; form+output tool
   panels split into two columns (controls left, output right, the
   output spanning the panel height). AI Chat, Learn English and the
   Link Preview stay full-width surfaces inside the wider wrap. */
@media (min-width: 1024px) {
  .wrap { max-width: 1220px; }
  #ytLatest { max-width: 1220px; }
  #panel-qr.active, #panel-short.active, #panel-voice.active, #panel-ocr.active,
  #panel-dict.active, #panel-sent.active, #panel-write.active, #panel-ytdl.active,
  #panel-trans.active, #panel-gsearch.active, #panel-grammar.active, #panel-qmake.active {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    column-gap: 30px;
    align-items: start;
  }
  #panel-qr > *, #panel-short > *, #panel-voice > *, #panel-ocr > *,
  #panel-dict > *, #panel-sent > *, #panel-write > *, #panel-ytdl > *,
  #panel-trans > *, #panel-gsearch > *, #panel-grammar > *, #panel-qmake > * {
    grid-column: 1;
    min-width: 0;
  }
  #qrStage, #shortResult, #voiceText, #ocrText, #dictResult, #sentResult,
  #wrResult, #ytResult, #trResult, #gsResults, #grResult, #qmResult {
    grid-column: 2;
    grid-row: 1 / span 40;
    min-width: 0;
  }
  #gsMore { grid-column: 2; min-width: 0; }
  #voiceText { max-height: 68vh; overflow-y: auto; }
}

/* ============================================================
   v188 — Button writings in the MIDDLE (Jahid, 2026-12-01):
   on desktop AND mobile, every button's icon+label group sits
   centred in the middle of the button, as one unit. The tool
   tab buttons (.tab — incl. the Learn English bar and the two
   #tabDuo halves) previously centred only via the browser's
   implicit <button> default, with no site rule guaranteeing
   it; they are now explicit flex containers (justify-content:
   center), so the group is centred on every engine/WebView,
   and a label that wraps on a narrow phone tab stays grouped
   beside its icon instead of spilling underneath it. The
   in-panel .btn family was already flex-centred; text-align:
   center added so a wrapped second line centres too.
   Dropdown-style selectors (.cdrop-btn: label left, chevron
   right, space-between) deliberately keep their layout.
   ============================================================ */
.tab { display: flex; align-items: center; justify-content: center; text-align: center; }
.tab .tab-ic { flex: 0 0 auto; }
.btn { text-align: center; }
.chip { text-align: center; }
.lang-btn { text-align: center; }
.theme-btn { justify-content: center; text-align: center; }
#btnInstall { text-align: center; }
