/* ============================================================
   CodeLens × Base UI — styles for the unstyled Base UI parts.
   Base UI exposes state through data attributes ([data-checked],
   [data-highlighted], [data-open], [data-starting-style] ...).
   ============================================================ */
:root {
  --ring: 0 0 0 3px rgba(99, 102, 241, .28);
  --pop-shadow: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:focus-visible { outline: none; box-shadow: var(--ring); }
button:disabled { opacity: .4; cursor: default; }

/* ---------- boot ---------- */
.app-root { min-height: 100vh; }
.lesson-page .app-root { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.boot { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; padding: 80px 0; }
.boot img { width: 56px; animation: bootPulse 1.2s ease-in-out infinite; }
@keyframes bootPulse { 50% { transform: scale(1.08); opacity: .7; } }

/* ---------- brand ---------- */
.brand { direction: ltr; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 26px; letter-spacing: -.5px; }
.brand > span { display: inline-flex; }
.brand .lens { margin-left: 0; }
.brand.small { font-size: 21px; }
.brand.small img { width: 34px; height: 34px; }
.brand.dark .code { color: #fff; }

/* ---------- buttons ---------- */
.btn-danger { background: #dc2626; color: #fff; box-shadow: 0 6px 16px rgba(220, 38, 38, .25); }
.btn-danger:hover { background: #b91c1c; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 10px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; color: #374151; transition: border-color .15s, color .15s;
}
.ghost-btn:hover { border-color: #a5b4fc; color: #4338ca; }
.icon-btn { transition: border-color .15s, color .15s, background .15s; }
.icon-btn:hover:not(:disabled) { background: #f5f7ff; }

/* ---------- tooltip ---------- */
.tip {
  background: #0f172a; color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px;
  box-shadow: var(--pop-shadow); transform-origin: var(--transform-origin);
  transition: opacity .15s, transform .15s var(--ease);
}
.tip[data-starting-style], .tip[data-ending-style] { opacity: 0; transform: scale(.94); }
.tip-arrow { width: 10px; height: 5px; }
.tip-arrow::before { content: ""; position: absolute; inset: 0; background: #0f172a; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tip-arrow[data-side="bottom"] { top: -5px; transform: rotate(180deg); }
.tip-arrow[data-side="top"] { bottom: -5px; }

/* ---------- menu (course switcher) ---------- */
.menu-trigger {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font: inherit; font-weight: 700;
  color: var(--ink); padding: 6px 10px; border-radius: 10px; transition: background .15s;
}
.menu-trigger:hover, .menu-trigger[data-popup-open] { background: #f1f3fb; }
.menu-trigger svg { transition: transform .2s; }
.menu-trigger[data-popup-open] svg { transform: rotate(180deg); }
.menu-popup, .select-popup {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop-shadow); padding: 6px; min-width: 240px;
  transform-origin: var(--transform-origin); transition: opacity .16s, transform .16s var(--ease); outline: none;
}
.menu-popup[data-starting-style], .menu-popup[data-ending-style],
.select-popup[data-starting-style], .select-popup[data-ending-style] { opacity: 0; transform: scale(.96) translateY(-4px); }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; outline: none; color: var(--ink);
}
.menu-item[data-highlighted] { background: #f1f3fb; }
.menu-item.current { background: #eef2ff; color: #4338ca; }
.menu-text { display: flex; flex-direction: column; flex: 1; }
.menu-text b { font-size: 14.5px; }
.menu-text small { font-size: 12px; color: var(--muted); }
.menu-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.menu-dot.intro { background: #0ea5e9; }
.menu-dot.oop { background: #7c3aed; }
.menu-dot.ds { background: #2563eb; }

/* ---------- select (lesson picker) ---------- */
.select-trigger {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--line); background: #fafbff; border-radius: 10px; padding: 0 12px; height: 36px; font: inherit; font-size: 14px; color: var(--ink);
  transition: border-color .15s;
}
.select-trigger:hover, .select-trigger[data-popup-open] { border-color: #a5b4fc; }
.select-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select-icon { display: flex; color: var(--muted); }
.select-popup { min-width: var(--anchor-width); max-height: min(var(--available-height), 380px); overflow-y: auto; }
.select-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; outline: none; font-size: 14px; }
.select-item[data-highlighted] { background: #f1f3fb; }
.select-item[data-selected] { color: #4338ca; font-weight: 600; }
.select-num { width: 24px; height: 24px; border-radius: 8px; background: #f1f3fb; color: #64748b; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.select-num.done { background: #dcfce7; color: #15803d; }
.select-text { flex: 1; }
.select-ind { display: flex; color: #4338ca; }

/* ---------- switch ---------- */
.switch-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #374151; cursor: pointer; user-select: none; }
.switch {
  position: relative; width: 38px; height: 22px; border-radius: 99px; border: 0; padding: 0; background: #d1d5db; transition: background .2s;
  direction: ltr; flex-shrink: 0;
}
.switch[data-checked] { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.switch-thumb {
  display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transform: translateX(2px); transition: transform .2s var(--ease);
}
.switch-thumb[data-checked] { transform: translateX(18px); }

/* ---------- slider (speed) ---------- */
.speed { display: flex; align-items: center; gap: 8px; direction: ltr; }
.speed-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.slider-control { width: 110px; height: 20px; display: flex; align-items: center; touch-action: none; }
.slider-track { position: relative; width: 100%; height: 4px; border-radius: 99px; background: #e5e7eb; }
.slider-indicator { border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #6366f1); }
.slider-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #6366f1; box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  transition: box-shadow .15s;
}
.slider-thumb:hover, .slider-thumb[data-dragging] { box-shadow: 0 0 0 5px rgba(99, 102, 241, .18); }

/* ---------- progress (course + match) ---------- */
.header-end { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }
.progress-root { display: flex; align-items: center; gap: 10px; }
.progress-track { width: 140px; height: 8px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.progress-indicator { height: 100%; background: var(--grad); border-radius: 99px; transition: width .5s var(--ease); }
.progress-text { font-size: 13px; color: var(--muted); white-space: nowrap; }
.match { display: flex; align-items: center; gap: 8px; }
.match-label { font-size: 13px; }
.match-track { width: 110px; height: 6px; background: #eef0f6; border-radius: 99px; overflow: hidden; }
.match-indicator { height: 100%; background: linear-gradient(90deg, #22d3ee, #6366f1); transition: width .3s; }
.match-value { color: var(--ink); font-weight: 700; direction: ltr; min-width: 36px; font-size: 13px; }
.editor-card.ghost-hidden .match { opacity: .4; }

/* ---------- scroll area ---------- */
.scroll { position: relative; overflow: hidden; min-height: 0; }
.scroll-viewport { height: 100%; overscroll-behavior: contain; }
.scrollbar { display: flex; width: 8px; padding: 2px; opacity: 0; transition: opacity .2s; }
.scroll:hover .scrollbar, .scrollbar[data-scrolling] { opacity: 1; }
.scroll-thumb { width: 100%; border-radius: 99px; background: rgba(100, 116, 139, .35); }

/* ---------- lesson header ---------- */
.lesson-header { gap: 14px; }
.crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 14.5px; }
.crumb-sep { color: #cbd5e1; }
.crumb-lesson { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }

/* ---------- lesson columns ---------- */
.lesson-layout { flex: 1; min-height: 0; }
.mobile-tabs { display: none; }

.lesson-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; max-height: 55%; }
.lesson-nav { padding: 14px 14px 0; margin: 0; }
.lesson-scroll { flex: 1; }
.lesson-content { padding: 14px 18px 18px; }
.lesson-kicker { display: inline-block; font-size: 12px; font-weight: 700; color: #6366f1; background: #eef2ff; border-radius: 99px; padding: 2px 10px; margin-bottom: 8px; }
.ai-scroll { flex: 1; }
.ai-viewport { scroll-behavior: smooth; }
.ai-messages { overflow: visible; }
.ai-ask .send-btn { width: 40px; border: 0; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; }
.ai-head small { display: block; }
.java-dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #ea580c 50%, #2563eb 50%); }
.tool-btn span, .run-btn span { white-space: nowrap; }
.viz-head b { display: flex; align-items: center; gap: 6px; }

/* collapsible variables */
.vars { padding: 0; }
.vars-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; font: inherit;
  font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 10px 14px; cursor: pointer;
}
.vars-head svg { transition: transform .2s; }
.vars-head[data-panel-open] svg { transform: rotate(180deg); }
.vars-panel { padding: 0 14px 12px; overflow: hidden; height: var(--collapsible-panel-height); transition: height .2s var(--ease); }
.vars-panel[data-starting-style], .vars-panel[data-ending-style] { height: 0; }

/* ---------- dialogs ---------- */
.dlg-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); backdrop-filter: blur(3px); transition: opacity .2s; z-index: 80; }
.dlg-backdrop[data-starting-style], .dlg-backdrop[data-ending-style] { opacity: 0; }
.dlg {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 32px)); z-index: 90;
  background: var(--paper); border-radius: 18px; padding: 24px; box-shadow: var(--pop-shadow); direction: rtl;
  transition: opacity .2s, transform .2s var(--ease);
}
.dlg[data-starting-style], .dlg[data-ending-style] { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
.dlg-sm { width: min(400px, calc(100vw - 32px)); }
.dlg-title { margin: 0 0 6px; font-size: 20px; }
.dlg-desc { margin: 0 0 14px; color: #4b5563; line-height: 1.7; font-size: 14.5px; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 18px; }
.dlg-actions .btn, .dlg-ok { padding: 10px 20px; font-size: 15px; border-radius: 12px; }
.dlg-ok { margin-top: 18px; }
.help-list { margin: 0; padding-inline-start: 18px; line-height: 1.9; font-size: 14.5px; color: #374151; }
.kbd-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin-top: 14px; font-size: 14px; align-items: center; }
.kbd-grid > span:nth-child(odd) { direction: ltr; text-align: right; }
kbd { font-family: var(--mono); font-size: 12px; background: #f1f3fb; border: 1px solid #e2e8f0; border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }

/* ---------- toasts ---------- */
.toast-viewport { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); width: 360px; max-width: calc(100vw - 32px); z-index: 100; }
.toast {
  animation: none;
  position: absolute; bottom: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; direction: rtl;
  background: #0f172a; color: #fff; padding: 10px 12px 10px 14px; border-radius: 14px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
  --gap: 8px; --offset-y: calc(var(--toast-offset-y) * -1 + var(--toast-index) * var(--gap) * -1 + var(--toast-swipe-movement-y));
  transform: translateY(var(--offset-y)) scale(calc(1 - var(--toast-index) * .04));
  z-index: calc(1000 - var(--toast-index));
  transition: transform .35s var(--ease), opacity .3s;
}
.toast[data-expanded] { transform: translateY(var(--offset-y)); }
.toast[data-starting-style] { transform: translateY(120%); opacity: 0; }
.toast[data-ending-style] { opacity: 0; transform: translateY(var(--offset-y)) scale(.92); }
.toast[data-limited] { opacity: 0; }
.t-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.t-text { flex: 1; }
.t-text code { background: rgba(255, 255, 255, .12); color: #c7d2fe; }
.t-close { border: 0; background: transparent; color: #94a3b8; display: grid; place-items: center; padding: 4px; border-radius: 6px; }
.t-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------- responsive (tabs on mobile) ---------- */
@media (max-width: 860px) {
  .lesson-page .app-root { height: auto; min-height: 100vh; overflow: visible; }
  .crumbs, .lesson-header .brand-sep, .progress-text, .ghost-btn span { display: none; }
  .progress-track { width: 80px; }
  .lesson-layout { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
  .lesson-layout > .col:not(.is-active) { display: none; }
  .mobile-tabs {
    position: sticky; top: 0; z-index: 20; display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px;
  }
  .mtab {
    position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 9px 4px; border-radius: 10px;
  }
  .mtab[data-active] { color: #fff; }
  .mtab-indicator {
    position: absolute; z-index: 0; top: 4px; bottom: 4px; left: var(--active-tab-left); width: var(--active-tab-width);
    background: var(--grad); border-radius: 10px; transition: left .25s var(--ease), width .25s var(--ease);
  }
  .col { gap: 12px; }
  .lesson-card { max-height: none; }
  .lesson-scroll .scroll-viewport { max-height: none; }
  .ai-card { height: 420px; flex: none; }
  .editor-card { height: 420px; flex: none; }
  .console-card { height: 190px; }
  .viz-card { height: 520px; flex: none; }
  .editor-toolbar { gap: 8px; }
  .tool-btn span { display: none; }
}

/* ============================================================
   Homepage (Base UI parts)
   ============================================================ */
.login-link { border: 0; background: transparent; font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.login-link:hover { background: #f1f3fb; }
.main-nav { align-items: center; }
.main-nav .menu-trigger { font-weight: 600; color: #374151; font-size: 16px; }
.mobile-only { display: none; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #4338ca;
  background: var(--paper); border: 1px solid #e0e7ff; border-radius: 99px; padding: 4px 12px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(79, 70, 229, .08);
}
.hero-art > svg { width: 100%; height: 100%; }
.thumb-art, .thumb-art svg { width: 100%; height: 100%; display: block; }

/* level filter (Tabs) */
.level-tabs { display: flex; justify-content: center; margin: -8px 0 28px; }
.seg { position: relative; display: inline-flex; background: #f1f3fb; border-radius: 12px; padding: 4px; }
.seg-tab {
  position: relative; z-index: 1; border: 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 600; color: #64748b;
  padding: 8px 22px; border-radius: 9px; transition: color .2s;
}
.seg-tab[data-active] { color: #312e81; }
.seg-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: var(--active-tab-left); width: var(--active-tab-width);
  background: var(--paper); border-radius: 9px; box-shadow: 0 1px 4px rgba(15, 23, 42, .1); transition: left .25s var(--ease), width .25s var(--ease);
}

/* course card progress */
.card-progress { display: flex; align-items: center; gap: 10px; margin: 0 6px 14px; }
.card-track { flex: 1; height: 6px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.card-indicator { height: 100%; border-radius: 99px; background: var(--grad); transition: width .4s; }
.card-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* FAQ (Accordion) */
.faq { max-width: 760px; margin: 34px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item[data-open] { border-color: #c7d2fe; box-shadow: 0 6px 18px rgba(79, 70, 229, .08); }
.faq-h { margin: 0; }
.faq-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); padding: 16px 18px; text-align: start; cursor: pointer;
}
.faq-trigger svg { flex-shrink: 0; color: #6366f1; transition: transform .25s var(--ease); }
.faq-trigger[data-panel-open] svg { transform: rotate(180deg); }
.faq-panel { height: var(--accordion-panel-height); overflow: hidden; transition: height .25s var(--ease); }
.faq-panel[data-starting-style], .faq-panel[data-ending-style] { height: 0; }
.faq-panel p { margin: 0; padding: 0 18px 16px; color: #4b5563; line-height: 1.8; }

.social a { cursor: pointer; }

@media (max-width: 960px) {
  .mobile-only { display: grid; }
  .header-actions .btn { display: none; }
}
@media (max-width: 560px) {
  .header-actions .btn { display: none; }
  .seg-tab { padding: 8px 14px; }
}

/* ---------- editor robustness ---------- */
.lesson-page #code {
  width: 100%; height: 100%; box-sizing: border-box; display: block;
  pointer-events: auto; user-select: text; -webkit-user-select: text; cursor: text;
  -webkit-text-fill-color: transparent; caret-color: #4f46e5; z-index: 2;
}
.lesson-page .backdrop { z-index: 1; pointer-events: none; }
.lesson-page .editor { cursor: text; }
.editor-card { transition: border-color .2s, box-shadow .2s; }
.editor-card.focused { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.editor-hint {
  position: absolute; z-index: 3; bottom: 12px; left: 50%; transform: translateX(-50%); direction: rtl;
  background: #0f172a; color: #fff; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 99px;
  pointer-events: none; opacity: 0; transition: opacity .2s; white-space: nowrap;
}
.editor-card:not(.focused) .editor-hint { opacity: .85; }
.boot-error { max-width: 460px; text-align: center; line-height: 1.8; color: #374151; }
.boot-error b { color: #b91c1c; }
.boot-error code { direction: ltr; unicode-bidi: isolate; }

/* ---------- lesson question ---------- */
.task.question { background: linear-gradient(135deg, #f5f3ff, #eef6ff); border-color: #ddd6fe; }
.q-badge { width: 22px; height: 22px; border-radius: 7px; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-size: 14px; font-weight: 800; }
.q-text { font-size: 15.5px !important; line-height: 1.9 !important; color: #1f2937; margin: 8px 0 10px !important; }
.q-text b[dir="ltr"] { font-family: var(--mono); font-size: .92em; background: var(--paper); border: 1px solid #e0e7ff; border-radius: 6px; padding: 0 6px; color: #3730a3; unicode-bidi: isolate; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.q-btn { border: 1px solid #c7d2fe; background: var(--paper); color: #3730a3; font: inherit; font-size: 13.5px; font-weight: 700; padding: 7px 12px; border-radius: 10px; transition: background .15s, border-color .15s; }
.q-btn:hover { background: #eef2ff; border-color: #a5b4fc; }
.q-btn.on { background: #eef2ff; border-color: #818cf8; }
.q-star { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: #a16207; background: #fefce8; border: 1px solid #fde68a; border-radius: 10px; padding: 6px 10px; display: inline-block; }
.select-num.solo { background: #fef9c3; }
.editor-card.ghost-hidden .match { display: none; }

/* ============================================================
   Lesson page layout v3 — all white, code in the middle,
   tools in a rail on the far left, assistant as a pop-out.
   (RTL: the first grid column is on the right.)
   ============================================================ */
.lesson-page, .lesson-page .app-root, .lesson-header { background: var(--paper); }
/* Column widths come from CSS variables: --info-w / --viz-w are set inline when the student drags
   a panel edge; otherwise the per-screen defaults (--info-def / --viz-def) apply. A hidden panel
   keeps its grid track at 0 so the other columns never move. */
.lesson-page .lesson-layout {
  --info-def: 320px; --viz-def: 360px; --rail-w: 84px;
  display: grid; gap: 0; padding: 0; background: var(--paper);
  grid-template-columns: min(var(--info-w, var(--info-def)), 34vw) minmax(0, 1fr) min(var(--viz-w, var(--viz-def)), 40vw) var(--rail-w);
  grid-template-rows: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.lesson-page .lesson-layout.no-viz { --viz-w: 0px; }
.lesson-page .lesson-layout.no-info { --info-w: 0px; }
.lesson-layout.no-viz > .col-viz { display: none; }
.lesson-layout > .col-info { grid-column: 1; grid-row: 1; }
.lesson-layout > .col-editor { grid-column: 2; grid-row: 1; }
.lesson-layout > .col-viz { grid-column: 3; grid-row: 1; }
.lesson-layout > .rail { grid-column: 4; grid-row: 1; }
.lesson-layout.dragging { user-select: none; cursor: col-resize; }
.lesson-layout.dragging.drag-y { cursor: row-resize; }
.lesson-layout.dragging iframe, .lesson-layout.dragging .viz-stage { pointer-events: none; }

/* drag handles on panel edges (desktop only) */
.lesson-page .col-info, .lesson-page .col-viz, .lesson-page .console-card { position: relative; }
.resizer { position: absolute; z-index: 5; background: transparent; border: 0; padding: 0; touch-action: none; }
.resizer::after { content: ""; position: absolute; border-radius: 99px; background: #a5b4fc; opacity: 0; transition: opacity .15s; }
.resizer:hover::after, .resizer:focus-visible::after, .lesson-layout.dragging .resizer.active::after { opacity: 1; }
.resizer:focus-visible { outline: none; }
.resizer-x { top: 0; bottom: 0; width: 10px; cursor: col-resize; }
.resizer-x::after { top: 0; bottom: 0; left: 4px; width: 3px; }
.col-info > .resizer-x { inset-inline-end: -1px; }
.col-viz > .resizer-x { inset-inline-start: -1px; }
.resizer-y { left: 0; right: 0; top: -5px; height: 10px; cursor: row-resize; }
.resizer-y::after { left: 0; right: 0; top: 4px; height: 3px; }
.panel-x { width: 30px; height: 30px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: #64748b; display: grid; place-items: center; flex-shrink: 0; }
.panel-x:hover { background: #f1f3fb; color: #4338ca; border-color: #e0e7ff; }
.lesson-layout.no-info > .col-info { display: none; }
.lesson-header { border-bottom: 0; }

.lesson-page .col { gap: 0; min-height: 0; min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--paper); }
.lesson-page .col-info { border-inline-end: 1px solid var(--line); padding: 14px 0 0; }
.lesson-page .col-viz { border-inline-start: 1px solid var(--line); }

/* right: lesson */
.col-info .lesson-nav { padding: 0 16px 6px; }
.col-info .lesson-scroll { flex: 1; }
.col-info .lesson-content { padding: 10px 20px 24px; }
.task.question { background: var(--paper); border: 1px solid #e0e7ff; border-inline-start: 4px solid #6366f1; border-radius: 12px; }

/* middle: editor */
.lesson-page .editor-card { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 0; border-radius: 0; background: var(--paper); box-shadow: none; }
.lesson-page .editor-card.focused { box-shadow: inset 0 2px 0 #818cf8; }
.lesson-page .editor-toolbar { border-bottom: 1px solid #f1f2f7; padding: 10px 16px; min-height: 52px; }
.ghost-chip { font-size: 12.5px; font-weight: 700; color: #4338ca; background: #eef2ff; border-radius: 99px; padding: 3px 10px; }
.lesson-page .live-status { margin: 0; font-size: 13px; }
.lesson-page .editor-card.ghost-hidden .editor-status { display: none; }
.lesson-page .gutter { border-right-color: #f4f5f9; }
.lesson-page .console-card { height: var(--console-h, 190px); flex-shrink: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; display: flex; flex-direction: column; }
.lesson-page .console { background: var(--paper); }

/* left of code: live visual (white) */
.lesson-page .viz-head { padding: 14px 16px; border-bottom: 1px solid #f1f2f7; }
.lesson-page .viz-stage { background: radial-gradient(circle at 1px 1px, #eef0f6 1px, transparent 0) 0 0 / 22px 22px, var(--paper); }
.lesson-page .vars { border-top: 1px solid var(--line); }

/* far left: tool rail */
.rail {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 14px;
  background: var(--paper); border-inline-start: 1px solid var(--line); min-height: 0; overflow-y: auto; overflow-x: hidden;
}
.rail-btn {
  width: 68px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid transparent; border-radius: 14px; background: transparent; color: #475569;
  font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.25; text-align: center; padding: 6px 4px;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.rail-btn:hover:not(:disabled) { background: #f5f7ff; color: #4338ca; }
.rail-btn:active { transform: scale(.96); }
.rail-btn.active { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.rail-btn.rail-run { background: linear-gradient(160deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 6px 16px rgba(22, 163, 74, .28); margin-bottom: 4px; }
.rail-btn.rail-run:hover { background: linear-gradient(160deg, #16a34a, #15803d); color: #fff; }
.rail-btn.rail-run.running { background: linear-gradient(160deg, #ef4444, #dc2626); box-shadow: 0 6px 16px rgba(220, 38, 38, .25); }
.rail-sep { width: 40px; height: 1px; background: var(--line); margin: 4px 0; flex-shrink: 0; }
.rail-grow { flex: 1; min-height: 8px; }
.rail-ai-ic { position: relative; width: 38px; height: 38px; border-radius: 12px; background: #0f172a; display: grid; place-items: center; }
.rail-ai-ic img { width: 26px; }
.rail-btn.rail-ai.active .rail-ai-ic { box-shadow: 0 0 0 3px #c7d2fe; }
.rail-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: #ef4444; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--paper); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1);
}

/* assistant pop-out (only visible after pressing the button) */
.ai-drawer {
  position: fixed; z-index: 60; top: 78px; bottom: 16px; left: 96px; width: 390px; max-width: calc(100vw - 112px);
  display: flex; flex-direction: column; overflow: hidden; direction: rtl;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .06);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(-16px) scale(.98); transform-origin: left center;
  transition: opacity .2s, transform .22s var(--ease), visibility 0s .22s;
}
.ai-drawer.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .2s, transform .22s var(--ease); }
.ai-drawer .ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ai-drawer .ai-head small { display: block; color: var(--muted); font-size: 12.5px; }
.ai-close { margin-inline-start: auto; width: 32px; height: 32px; }
.ai-drawer .ai-scroll { flex: 1; }
.ai-drawer .ai-messages { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-drawer.thinking .ai-avatar { animation: blink 1s infinite; }
.ai-drawer .ai-ask { border-top: 1px solid var(--line); }

/* medium screens */
@media (max-width: 1280px) {
  .lesson-page .lesson-layout { --info-def: 280px; --viz-def: 300px; --rail-w: 80px; grid-template-rows: minmax(0, 1fr); }
  .lesson-layout > .col-info, .lesson-layout > .col-editor, .lesson-layout > .col-viz { grid-row: 1; }
}
@media (max-width: 1024px) {
  .lesson-page .lesson-layout { --info-def: 250px; --viz-def: 250px; --rail-w: 76px; }
  .rail-btn { width: 62px; font-size: 10.5px; }
}

/* phones: tabs switch the columns, rail becomes a top toolbar */
@media (max-width: 860px) {
  .lesson-page .lesson-layout { display: flex; flex-direction: column; padding: 10px; gap: 10px; border-top: 0; }
  .lesson-layout > .mobile-tabs { order: 0; }
  .lesson-layout > .rail { order: 1; }
  .lesson-layout > .col { order: 2; border: 1px solid var(--line) !important; border-radius: 14px; }
  .lesson-layout.no-viz > .col-viz.is-active { display: flex; }
  .rail { flex-direction: row; overflow-x: auto; padding: 6px; border: 1px solid var(--line); border-radius: 14px; gap: 4px; }
  .rail-btn { width: auto; min-width: 64px; min-height: 52px; flex-shrink: 0; }
  .rail-btn.rail-run { margin: 0; }
  .rail-sep { width: 1px; height: 36px; margin: 0 2px; }
  .rail-grow { display: none; }
  .ai-drawer { left: 10px; right: 10px; width: auto; max-width: none; top: 70px; bottom: 10px; }
  .resizer, .panel-x, .rail-info { display: none !important; }
  .lesson-layout.no-info > .col-info.is-active { display: flex; }
  .lesson-page .console-card { height: 190px !important; }
}
@media (max-width: 860px) {
  .rail { flex-wrap: wrap; justify-content: center; overflow: visible; }
  .rail-btn { min-width: 58px; min-height: 50px; padding: 4px; }
  .lesson-page .col-editor .editor-card { min-height: 380px; }
  .lesson-page .col-viz { min-height: 480px; }
  .lesson-page .col-info { max-height: none; }
}

/* ============================================================
   Accounts, points & leaderboard
   ============================================================ */
.toast a { color: #fde68a; text-decoration: underline; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.account-btn { gap: 8px; }
.menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; gap: 2px; }
.menu-head small { color: var(--muted); font-size: 12.5px; }

.auth-form { display: grid; gap: 12px; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; background: #f1f3fb; border-radius: 12px; padding: 4px; }
.auth-switch button { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: #6b7280; padding: 8px; border-radius: 9px; }
.auth-switch button.on { background: var(--paper); color: #312e81; box-shadow: 0 1px 4px rgba(15, 23, 42, .1); }
.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: #374151; }
.field input { font: inherit; font-weight: 500; font-size: 15px; padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 11px; background: var(--paper); color: var(--ink); }
.field input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.form-error { margin: 0; color: #b91c1c; font-size: 13.5px; }
.form-note { margin: 0; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; line-height: 1.6; }
.auth-submit { width: 100%; padding: 12px; font-size: 15px; border-radius: 12px; }
.auth-submit:disabled { opacity: .6; transform: none; }

.board-page .container.narrow { width: min(820px, 100% - 32px); }
.board-page .level-tabs { display: flex; justify-content: center; margin-bottom: 18px; }
.demo-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.7; margin-bottom: 18px; }

.season-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.season-card.empty { display: flex; gap: 14px; align-items: center; }
.season-card.empty p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.season-ic { font-size: 28px; }
.season-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.season-top h2 { margin: 8px 0 2px; font-size: 22px; }
.season-dates { margin: 0; color: var(--muted); font-size: 14px; }
.season-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.season-pill.running { background: #dcfce7; color: #166534; }
.season-pill.upcoming { background: #e0e7ff; color: #3730a3; }
.season-pill.ended { background: #f3f4f6; color: #374151; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: livePulse 1.6s infinite; }
@keyframes livePulse { 50% { opacity: .3; } }
.season-count { text-align: center; min-width: 96px; }
.season-count b { display: block; font-size: 32px; line-height: 1.1; color: #4338ca; }
.season-count span { font-size: 12.5px; color: var(--muted); }
.season-progress { margin-top: 14px; }
.season-track { height: 8px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.season-indicator { height: 100%; border-radius: 99px; background: var(--grad); }
.winner-banner { text-align: center; background: linear-gradient(90deg, #fef3c7, #fde68a); color: #78350f; border-radius: 14px; padding: 12px; font-size: 16px; margin-bottom: 18px; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; margin: 10px 0 18px; }
.podium-spot { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; min-width: 0; }
.podium-spot .crown { font-size: 22px; position: absolute; top: -26px; }
.podium-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: 0 6px 16px rgba(79, 70, 229, .25); }
.p1 .podium-avatar { width: 66px; height: 66px; font-size: 26px; background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 6px 18px rgba(245, 158, 11, .35); }
.podium-name { font-size: 14.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-points { font-size: 13px; color: var(--muted); }
.podium-block { width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: center; font-size: 26px; margin-top: 6px; background: #eef0fb; }
.p1 .podium-block { height: 110px; background: linear-gradient(180deg, #fde68a, #fbbf24); }
.p2 .podium-block { height: 82px; background: linear-gradient(180deg, #e5e7eb, #cbd5e1); }
.p3 .podium-block { height: 62px; background: linear-gradient(180deg, #fed7aa, #fdba74); }
.podium-spot.empty .podium-block { opacity: .35; }
.podium-spot.me .podium-name { color: #4338ca; }

.my-rank { background: #eef2ff; border: 1px solid #c7d2fe; color: #312e81; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; text-align: center; }
.board-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.board-row { display: grid; grid-template-columns: 44px 1fr 70px 44px 150px; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.board-row.head { border-top: 0; font-size: 12.5px; font-weight: 700; color: var(--muted); padding-block: 8px; }
.board-row.me { background: #eef2ff; }
.board-row .rank { font-weight: 800; color: #6b7280; text-align: center; }
.board-row.top .rank { color: #d97706; }
.board-row .who { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .solved, .board-row .stars { color: #4b5563; text-align: center; font-family: var(--mono); font-size: 13px; }
.board-row .pts { display: grid; gap: 4px; }
.board-row .pts b { font-family: var(--mono); font-size: 14px; }
.board-row .pts i { display: block; height: 5px; border-radius: 99px; background: var(--grad); }
.board-msg { text-align: center; color: var(--muted); padding: 28px 12px; line-height: 2; }
.board-msg.err { color: #b91c1c; }
.board-msg .btn { margin-top: 10px; padding: 10px 20px; font-size: 15px; }
.rules { margin-top: 24px; background: var(--paper); border: 1px dashed #d1d5db; border-radius: 16px; padding: 14px 20px; }
.rules h3 { margin: 0 0 6px; font-size: 16px; }
.rules ul { margin: 0; padding-inline-start: 20px; line-height: 2; color: #374151; font-size: 14.5px; }
@media (max-width: 640px) {
  .board-row { grid-template-columns: 32px 1fr 44px 70px; padding-inline: 10px; }
  .board-row .solved { display: none; }
  .season-top h2 { font-size: 19px; }
  .podium-avatar { width: 44px; height: 44px; font-size: 18px; }
  .p1 .podium-avatar { width: 54px; height: 54px; }
}

/* AI tutor answers */
.ai-code { background: #0f172a; color: #e2e8f0; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; padding: 10px 12px; border-radius: 10px; overflow-x: auto; margin: 8px 0; white-space: pre; text-align: left; }
.field-hint { font-weight: 500; font-size: 12px; color: var(--muted); }

/* AI assistant: easy to spot */
.rail-btn.rail-ai { background: linear-gradient(160deg, #eef2ff, #f5f3ff); border-color: #c7d2fe; color: #4338ca; }
.rail-btn.rail-ai:hover { background: linear-gradient(160deg, #e0e7ff, #ede9fe); }
.rail-btn.rail-ai.active { background: #e0e7ff; border-color: #818cf8; }
.rail-btn.rail-ai .rail-ai-ic { background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 4px 12px rgba(99, 102, 241, .35); }
.rail-btn.rail-ai.new .rail-ai-ic::after { content: ""; position: absolute; inset: -4px; border-radius: 15px; border: 2px solid #818cf8; animation: aiPulse 1.8s ease-out infinite; }
@keyframes aiPulse { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .rail-btn.rail-ai.new .rail-ai-ic::after { animation: none; opacity: .6; } }
.q-btn.q-ai { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(90deg, #4f46e5, #7c3aed); color: #fff; border-color: transparent; }
.q-btn.q-ai:hover { background: linear-gradient(90deg, #4338ca, #6d28d9); border-color: transparent; }
.q-btn.q-ai img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-top .panel-x { width: 26px; height: 26px; }
.lesson-page .viz-head { gap: 6px; }
.lesson-page .viz-head > div:first-child { margin-inline-end: auto; }

/* ============================================================
   Customer support: floating help button, ticket form, contact page, admin inbox
   ============================================================ */
.help-fab {
  position: fixed; z-index: 55; bottom: 20px; inset-inline-start: 20px;
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 18px; border-radius: 99px; background: var(--grad); color: #fff;
  font: inherit; font-weight: 700; font-size: 14.5px; box-shadow: 0 10px 26px rgba(79, 70, 229, .35);
  transition: transform .15s, box-shadow .15s;
}
.help-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, .42); }
.lesson-page .help-fab { padding: 11px; bottom: 16px; inset-inline-start: 16px; }
.lesson-page .help-fab span { display: none; }
@media (max-width: 640px) { .help-fab span { display: none; } .help-fab { padding: 13px; } }

.help-dlg { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.help-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.help-dlg-link { display: block; text-align: center; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: #4338ca; }

.ticket-form { display: grid; gap: 12px; }
.ticket-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .ticket-row { grid-template-columns: 1fr; } }
.field select, .field textarea, .reply-box textarea, .reply-actions select {
  font: inherit; font-weight: 500; font-size: 15px; padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 11px;
  background: var(--paper); color: var(--ink); width: 100%;
}
.field textarea, .reply-box textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.field select:focus, .field textarea:focus, .reply-box textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #ef4444; }
.field-error { color: #b91c1c; font-size: 12.5px; font-weight: 600; }
.hp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; inset-inline-start: -9999px; }
.ticket-submit { width: 100%; padding: 12px; font-size: 15px; border-radius: 12px; }
.ticket-submit:disabled { opacity: .6; transform: none; }
.ticket-sent { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 18px 8px; }
.ticket-sent-ic { width: 52px; height: 52px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.ticket-sent p { margin: 0; color: var(--muted); line-height: 1.8; }
.ticket-sent a { color: #4338ca; font-weight: 700; }
.ticket-sent .btn { padding: 9px 18px; font-size: 14px; margin-top: 6px; }

.contact-page .container.narrow { width: min(920px, 100% - 32px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.contact-side { display: grid; gap: 12px; }
.contact-side > div { border: 1px dashed #d1d5db; border-radius: 14px; padding: 12px 14px; }
.contact-side b { font-size: 14.5px; }
.contact-side p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.contact-side a { color: #4338ca; font-weight: 600; }
.my-tickets { margin-top: 30px; display: grid; gap: 12px; }
.my-tickets h2 { margin: 0 0 4px; font-size: 20px; }
.muted-box { margin: 0; color: var(--muted); background: #f5f7ff; border-radius: 14px; padding: 14px 16px; text-align: center; line-height: 1.8; }

.ticket-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; }
.ticket-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ticket-card header b { font-size: 15.5px; }
.ticket-card header small { color: var(--muted); font-size: 12.5px; margin-inline-start: auto; }
.ticket-status { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.ticket-status.open { background: #fef3c7; color: #92400e; }
.ticket-status.answered { background: #dcfce7; color: #166534; }
.ticket-status.closed { background: #f3f4f6; color: #4b5563; }
.ticket-msg { margin: 0; white-space: pre-wrap; line-height: 1.8; font-size: 14.5px; color: #374151; }
.ticket-reply { background: #eef2ff; border-inline-start: 3px solid #6366f1; border-radius: 0 10px 10px 0; padding: 10px 12px; }
.ticket-reply span { font-size: 12.5px; font-weight: 700; color: #4338ca; }
.ticket-reply p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.8; font-size: 14.5px; }
.reply-box { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 8px; }
.reply-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--muted); }
.reply-meta a { color: #4338ca; }
.reply-page { font-family: var(--mono); font-size: 12px; }
.reply-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reply-actions select { width: auto; padding: 8px 10px; font-size: 14px; }
.reply-actions .btn { padding: 9px 20px; font-size: 14px; border-radius: 11px; }
.contact-page .level-tabs { display: flex; justify-content: center; margin-bottom: 16px; }
.ticket-form .field { min-width: 0; }
.ticket-form .field input { width: 100%; min-width: 0; box-sizing: border-box; }
.field select, .field textarea, .reply-box textarea { box-sizing: border-box; }
