/* Trading Bite App — phone-first PWA */

:root {
  --bg: #06080d;
  --bg-elev: #0c1018;
  --panel: rgba(12, 18, 28, 0.72);
  --gold: #c9917c;
  --gold-soft: #e8c4b8;
  --gold-deep: #a67c6d;
  --teal: #2dd4bf;
  --text: #f4f2ec;
  --muted: rgba(244, 242, 236, 0.58);
  --dim: rgba(244, 242, 236, 0.32);
  --border: rgba(201, 145, 124, 0.18);
  --border-strong: rgba(201, 145, 124, 0.38);
  --danger: #f87171;
  --success: #4ade80;
  --warn: #fb923c;
  --font: "Stack Sans Notch", system-ui, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: calc(82px + env(safe-area-inset-bottom, 0px));
  --top-h: calc(58px + env(safe-area-inset-top, 0px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] {
  --bg: #f3eee8;
  --bg-elev: #fffaf6;
  --panel: rgba(255, 250, 246, 0.86);
  --text: #1a1512;
  --muted: rgba(26, 21, 18, 0.58);
  --dim: rgba(26, 21, 18, 0.32);
  --border: rgba(166, 124, 109, 0.22);
  --border-strong: rgba(166, 124, 109, 0.4);
  --shadow: 0 18px 40px rgba(90, 60, 45, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* Content protection: block selection/highlight everywhere except real inputs. */
html.tb-protected, html.tb-protected body {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
html.tb-protected input,
html.tb-protected textarea,
html.tb-protected select,
html.tb-protected [contenteditable="true"] {
  -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
}
html.tb-protected img, html.tb-protected svg {
  -webkit-user-drag: none; user-drag: none; pointer-events: auto;
}
/* Privacy shield — solid cover for app switcher / background / capture attempts.
   Must be instant (no transition delay) so iOS has a chance to snapshot the cover. */
#tb-privacy-shield {
  position: fixed; inset: 0; z-index: 2147483646;
  display: grid; place-items: center;
  background: #05070c;
  opacity: 0; visibility: hidden; pointer-events: none;
}
html.tb-privacy-on #tb-privacy-shield {
  opacity: 1; visibility: visible; pointer-events: auto;
}
html.tb-privacy-on .app-main,
html.tb-privacy-on .app-top,
html.tb-privacy-on .app-nav,
html.tb-privacy-on .app-aurora,
html.tb-privacy-on .sheet {
  visibility: hidden !important;
}
.tb-privacy-mark {
  display: grid; justify-items: center; gap: 0.75rem;
  color: rgba(201, 145, 124, 0.85);
  font-family: "Stack Sans Notch", system-ui, sans-serif;
  font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.72rem;
}
.tb-privacy-mark img {
  width: 56px; height: 56px; border-radius: 14px;
  border: 1px solid rgba(201, 145, 124, 0.35);
  object-fit: cover;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

.app-aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(201, 145, 124, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(45, 212, 191, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(201, 145, 124, 0.08), transparent 55%);
}
html[data-theme="light"] .app-aurora {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(201, 145, 124, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(45, 212, 191, 0.08), transparent 50%);
}

.app-top, .app-main, .app-nav, .toast-host, .sheet { position: relative; z-index: 1; }

.app-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.65rem;
  min-height: var(--top-h);
  padding: calc(env(safe-area-inset-top, 0px) + 0.55rem) 1rem 0.55rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
html.is-standalone .app-top {
  padding-top: max(env(safe-area-inset-top, 0px), 42px);
}
.brand-lockup { display: flex; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; }
.brand-logo { width: 36px; height: 36px; object-fit: cover; border-radius: 10px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text span { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.top-actions { display: flex; gap: 0.35rem; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel);
  display: grid; place-items: center; cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.icon-btn svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn:active { transform: scale(0.94); }
.badge-wrap { position: relative; }
.badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 0.58rem; font-weight: 700; display: grid; place-items: center;
}

.app-main {
  min-height: calc(100dvh - var(--top-h) - var(--nav-h));
  padding: 1rem 1rem calc(var(--nav-h) + 1rem);
  max-width: 520px; margin: 0 auto;
  animation: rise 0.45s var(--ease);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-nav {
  position: fixed; left: 10px; right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: grid; grid-template-columns: repeat(var(--nav-cols, 4), 1fr);
  height: 68px;
  padding: 5px;
  background: color-mix(in srgb, var(--bg-elev) 91%, transparent);
  backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255,255,255,0.035);
}
.nav-item {
  border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.12rem; font-size: 0.48rem; font-weight: 650; letter-spacing: 0.03em;
  text-transform: uppercase; cursor: pointer; border-radius: 17px;
  transition: color 0.22s, background 0.22s, transform 0.22s var(--ease);
}
.nav-item .nav-ico {
  width: 23px; height: 23px; display: grid; place-items: center;
  border-radius: 9px; transition: transform 0.25s var(--ease);
}
.nav-item .nav-ico svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.active {
  color: var(--gold-soft);
  background: linear-gradient(145deg, rgba(201, 145, 124, 0.18), rgba(201, 145, 124, 0.07));
  box-shadow: inset 0 0 0 1px rgba(201, 145, 124, 0.1);
}
.nav-item.active .nav-ico {
  color: var(--gold); transform: translateY(-1px);
}
.nav-item:active { transform: scale(0.96); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border-radius: 14px; border: 1px solid var(--border);
  padding: 0.85rem 1.1rem; font-weight: 650; cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold), var(--gold-deep));
  color: #120e0c; border: none;
}
.btn-ghost { background: transparent; color: var(--text); }
.btn-soft { background: var(--panel); }

.hero {
  padding: 1.4rem 0 0.4rem;
  display: flex; flex-direction: column; gap: 0.85rem;
}
.hero-brand {
  font-size: clamp(2.1rem, 9vw, 2.8rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.05;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 {
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  font-weight: 650; letter-spacing: -0.01em; max-width: 18ch;
}
.hero p { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }
.hero-actions { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.35rem; }

.section { margin-top: 1.5rem; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.section-head h2 { font-size: 1rem; font-weight: 700; }
.section-head a, .section-head button.linkish {
  border: 0; background: none; color: var(--gold); font-size: 0.78rem; font-weight: 600; cursor: pointer;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(10px);
}
.login-card {
  position: relative; overflow: hidden;
  padding: 1.15rem;
  border-color: rgba(201, 145, 124, 0.25);
  box-shadow: 0 20px 55px rgba(0,0,0,0.24);
}
.login-card::before {
  content: ""; position: absolute; left: 15%; right: 15%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-mark {
  width: 56px; height: 56px; margin-bottom: 1rem; border-radius: 16px;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.login-mark-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 3.2rem; }
.password-toggle {
  position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.password-toggle svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.forgot-link {
  border: 0; background: transparent; color: var(--gold);
  font-size: 0.78rem; font-weight: 650; cursor: pointer;
}
.forgot-panel {
  margin-top: 0.85rem; padding-top: 0.95rem; border-top: 1px solid var(--border);
}
.forgot-panel h3 { font-size: 0.92rem; margin-bottom: 0.25rem; }
.forgot-panel > p { color: var(--muted); font-size: 0.76rem; margin-bottom: 0.75rem; }
.stack { display: flex; flex-direction: column; gap: 0.7rem; }

.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem;
}
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 0.55rem; text-align: center;
}
.stat b { display: block; font-size: 1.2rem; color: var(--gold); font-weight: 700; }
.stat span { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.product-card {
  display: grid; gap: 0.35rem; text-align: left;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.05rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.product-card:active { transform: scale(0.99); }
.product-tag {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal);
}
.product-card h3 { font-size: 1rem; }
.product-card p { color: var(--muted); font-size: 0.82rem; }
.product-price { color: var(--gold); font-weight: 700; margin-top: 0.2rem; }

.ticker {
  display: flex; gap: 0.55rem; overflow-x: auto; padding-bottom: 0.2rem;
  scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }
.tick {
  flex: 0 0 auto; min-width: 108px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.65rem 0.75rem;
}
.tick .sym { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.tick .px { font-size: 0.95rem; font-weight: 700; margin-top: 0.15rem; }
.tick .ch { font-size: 0.7rem; margin-top: 0.1rem; }
.tick .ch.up { color: var(--success); }
.tick .ch.down { color: var(--danger); }

.setup {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.95rem 1rem;
  display: grid; gap: 0.55rem;
}
.setup-highlight {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px rgba(201, 145, 124, 0.28);
  animation: setupPulse 1.4s ease;
}
@keyframes setupPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.01); }
  100% { transform: scale(1); }
}
.setup-top { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.setup-idrow { margin: 0 0 0.15rem; }
.setup-trade-id {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.32);
  padding: 0.14rem 0.48rem;
  border-radius: 6px;
  line-height: 1.2;
}
.setup-pair { font-weight: 700; font-size: 1.05rem; }
.setup-dir {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem; border-radius: 7px;
}
.setup-dir.long { background: rgba(74, 222, 128, 0.15); color: var(--success); }
.setup-dir.short { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.status-badge {
  margin-left: auto; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 0.22rem 0.5rem; border-radius: 999px; border: 1px solid var(--border);
}
.status-active { color: var(--teal); border-color: rgba(45, 212, 191, 0.4); }
.status-target_hit { color: var(--success); border-color: rgba(74, 222, 128, 0.4); }
.status-partial_exit_be { color: var(--warn); border-color: rgba(251, 146, 60, 0.45); }
.status-stopped { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); }
.status-expired { color: var(--muted); }
.setup-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.7rem;
  font-size: 0.8rem;
}
.setup-grid span { color: var(--muted); }
.setup-grid strong { font-weight: 650; }
.setup-note { color: var(--muted); font-size: 0.82rem; }
.setup-notes {
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
.setup-notes-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.setup-notes-head span { color: var(--teal); text-transform: none; letter-spacing: 0; }
.setup-notes-scroll {
  max-height: 5rem;
  overflow-y: auto;
  scrollbar-width: thin;
}
.setup-note-item {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.setup-note-item:last-child { border-bottom: none; }
.setup-note-item time {
  display: block;
  font-size: 0.62rem;
  color: var(--gold);
  font-weight: 600;
}
.setup-note-item p {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}
.setup-stamps {
  display: grid; gap: 0.28rem; margin-top: 0.15rem;
  font-size: 0.72rem; color: var(--muted);
}
.setup-stamps div { display: flex; justify-content: space-between; gap: 0.6rem; }
.setup-stamps time { color: var(--text); font-weight: 600; }

.filters {
  display: flex; gap: 0.45rem; overflow-x: auto; margin-bottom: 0.8rem;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: transparent;
  color: var(--muted); border-radius: 999px; padding: 0.4rem 0.75rem;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.chip.active { color: var(--gold); border-color: var(--border-strong); background: rgba(201, 145, 124, 0.12); }

.notif {
  display: grid; grid-template-columns: auto 1fr; gap: 0.7rem;
  padding: 0.85rem 0.2rem; border-bottom: 1px solid var(--border);
}
.notif:last-child { border-bottom: 0; }
.notif.unread .notif-dot { background: var(--gold); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-top: 0.4rem; }
.notif-msg { font-size: 0.9rem; }
.notif-time { font-size: 0.7rem; color: var(--muted); margin-top: 0.2rem; }

.form { display: grid; gap: 0.75rem; }
.form label { display: grid; gap: 0.35rem; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22); color: var(--text);
  padding: 0.8rem 0.9rem; outline: none;
}
html[data-theme="light"] .form input,
html[data-theme="light"] .form select,
html[data-theme="light"] .form textarea { background: rgba(255, 255, 255, 0.7); }
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(201, 145, 124, 0.15);
}
.remember { display: flex !important; flex-direction: row; align-items: center; gap: 0.55rem; font-size: 0.78rem !important; color: var(--text) !important; font-weight: 500 !important; }
.remember input {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px;
  padding: 0; flex: 0 0 22px; border-radius: 7px; border: 1px solid var(--border-strong);
  background: rgba(0,0,0,.24); display: grid; place-items: center;
}
.remember input::after {
  content: "✓"; color: #120e0c; font-size: 0.78rem; font-weight: 900;
  opacity: 0; transform: scale(.6); transition: .18s;
}
.remember input:checked { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); }
.remember input:checked::after { opacity: 1; transform: scale(1); }
.status-msg { min-height: 1.2em; font-size: 0.82rem; color: var(--muted); }
.status-msg.err { color: var(--danger); }
.status-msg.ok { color: var(--success); }

.profile-head {
  display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem;
}
.avatar {
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  color: #120e0c; display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem;
}
.profile-head h1 { font-size: 1.2rem; }
.profile-head p { color: var(--muted); font-size: 0.82rem; }
.tier {
  display: inline-block; margin-top: 0.25rem;
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(201, 145, 124, 0.14); padding: 0.18rem 0.45rem; border-radius: 6px;
}

.empty {
  text-align: center; color: var(--muted); padding: 2rem 1rem;
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty strong { display: block; color: var(--text); margin-bottom: 0.35rem; }

.install-banner {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.85rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(201, 145, 124, 0.14), rgba(45, 212, 191, 0.06));
}
.install-banner strong { display: block; font-size: 0.9rem; }
.install-banner span { font-size: 0.75rem; color: var(--muted); }

.sheet {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.sheet-card {
  position: relative; width: min(100%, 520px);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 22px 22px 0 0; padding: 0.6rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow); animation: sheetUp 0.35s var(--ease);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-handle {
  width: 42px; height: 4px; border-radius: 999px; background: var(--dim);
  margin: 0.2rem auto 0.9rem;
}
.sheet-card h2 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.sheet-lead { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.9rem; }
.install-note {
  margin: 0.55rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.install-steps {
  list-style: none; display: grid; gap: 0.65rem; margin-bottom: 1rem;
}
.install-steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start;
  font-size: 0.88rem;
}
.step-num {
  width: 24px; height: 24px; border-radius: 8px;
  background: rgba(201, 145, 124, 0.18); color: var(--gold);
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 800;
}
.sheet-card .btn { margin-top: 0.4rem; }

.toast-host {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 0.7rem);
  left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 0.4rem; width: min(92vw, 400px); pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-color: rgba(74, 222, 128, 0.45); }
.toast.err { border-color: rgba(248, 113, 113, 0.45); }

.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.quick {
  border: 1px solid var(--border); background: var(--panel);
  border-radius: var(--radius-sm); padding: 0.9rem 0.8rem; text-align: left; cursor: pointer;
}
.quick b { display: block; font-size: 0.88rem; margin-bottom: 0.15rem; }
.quick span { font-size: 0.72rem; color: var(--muted); }

.edu {
  margin-top: 1.4rem; font-size: 0.72rem; color: var(--dim); text-align: center; line-height: 1.4;
}

/* White Board (PWA) */
.wb-app-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.85rem; }
.wb-app-item {
  text-align: left; border: 1px solid var(--border); background: var(--panel);
  border-radius: 14px; padding: 0.85rem 1rem; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.wb-app-item strong { font-size: 0.92rem; }
.wb-app-item span { font-size: 0.75rem; color: var(--muted); }
.wb-app-item.is-active { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(201,145,124,0.35); }
.wb-badge { font-size: 0.68rem; font-weight: 700; color: var(--gold); margin-top: 0.15rem; }
.wb-badge-view { color: var(--muted); font-size: 0.68rem; font-weight: 600; }
.wb-app-meta { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.65rem; }
.wb-app-meta strong { font-size: 1.05rem; }
.wb-app-meta span { font-size: 0.78rem; color: var(--muted); }
.wb-assign-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.55rem;
  padding: 0.5rem 0.7rem; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(201, 145, 124, 0.08); font-size: 0.85rem;
}
.wb-assign-banner.wb-assign-you { border-color: rgba(201, 145, 124, 0.45); }
.wb-assign-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.wb-app-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.7rem; }
.wb-app-tools .chip.is-active { border-color: var(--gold); color: var(--gold-soft); }
.wb-app-tools .chip:disabled { opacity: 0.4; }
.wb-app-inline { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: var(--muted); }
.wb-app-stage { min-height: 160px; margin-bottom: 0.5rem; }
#app-wb-host.wb-fs,
.wb-fs {
  position: fixed !important;
  inset: 0;
  z-index: 80;
  margin: 0 !important;
  padding: 0.75rem 0.75rem 5.5rem;
  overflow: auto;
  background: var(--bg);
}
body.wb-fs-open { overflow: hidden; }
.wb-canvas-host { width: 100%; }
.wb-stage {
  position: relative; width: 100%; background: #0a0c10; border-radius: 14px;
  overflow: hidden; border: 1px solid var(--border); touch-action: none;
}
.wb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.wb-layer { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.wb-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wb-author-tag {
  position: absolute; transform: translate(-50%, -120%); font-size: 0.62rem; font-weight: 600;
  padding: 0.1rem 0.3rem; border-radius: 4px; background: rgba(0,0,0,0.55); color: #f5ebe0;
}
.wb-inline-text {
  position: absolute; z-index: 5; min-width: 120px; max-width: 70%;
  padding: 0.35rem 0.5rem; border: 1px solid var(--gold); border-radius: 6px;
  background: rgba(8,10,14,0.92); font: 600 15px Stack Sans Notch, system-ui, sans-serif;
  outline: none; resize: none; transform: translateY(-50%); color: #c9917c;
}
.hidden { display: none !important; }

@media (min-width: 720px) {
  .app-main { padding-top: 1.25rem; }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; min-width: 160px; }
}
