/* =====================================================================
   Whoami Profissional (Fase 7) — sistema visual "Apple Pro", só escuro.
   Carregado DEPOIS de styles.css: redefine os tokens e reestiliza os componentes.
   ===================================================================== */
:root {
  /* superfícies */
  --bg: #000;
  --bg2: #080a09;
  --win: #121715;
  --win2: #1a211e;
  --win3: #24302b;
  --glass: rgba(30, 30, 34, 0.72);
  --glass-hi: rgba(48, 48, 52, 0.8);
  --panel: var(--glass);
  --panel-solid: var(--win);
  --panel2: var(--win2);
  /* texto */
  --text: #F5F5F7;
  --text2: #98989D;
  --text3: #636366;
  --muted: var(--text2);
  --dim: var(--text3);
  /* linhas e preenchimentos */
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.12);
  --fill: rgba(110,104,190, 0.24);
  --fill2: rgba(110,104,190, 0.16);
  /* cores do sistema */
  --green: #30D158;
  --red: #FF453A;
  --orange: #FF9F0A;
  --yellow: #FFD60A;
  --teal: #64D2FF;
  --pink: #FF375F;
  --gold: #E8B84A;
  --gold2: #C9962E;
  --violet: #7A66FF;
  /* destaque (Azul Apple por padrão; body.acc-violet troca) */
  --acc: #2fd16f;
  --acc-soft: rgba(57, 255, 136, 0.18);
  --acc-text: #64B5FF;
  /* forma e movimento */
  --radius: 12px;
  --shadow: 0 0 0 .5px rgba(0, 0, 0, .6), 0 10px 34px rgba(0, 0, 0, .42);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --display: var(--font);
  color-scheme: dark;
}
body.acc-violet { --acc: #7A66FF; --acc-soft: rgba(122, 102, 255, 0.22); --acc-text: #B4A8FF; }

html, body { font-family: var(--font); font-size: 13px; }
body { font-feature-settings: "cv11", "ss03"; letter-spacing: -0.003em; }
::selection { background: var(--acc-soft); }
a { color: var(--acc-text); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.ui-icw { display: inline-grid; place-items: center; flex: none; }
.ui-icw svg, .ui-ic { display: block; }
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.kbd, kbd.kbd {
  font: 500 11px/16px var(--font); color: var(--text2); background: var(--fill2);
  border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; display: inline-block;
}

/* ---------- Menu do botão direito (macOS) ---------- */
.ctxmenu {
  position: fixed; z-index: 90; width: 236px; padding: 5px; border-radius: 10px; font-size: 13px;
  background: var(--glass); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--line2); box-shadow: 0 0 0 .5px rgba(0,0,0,.7), 0 14px 40px rgba(0,0,0,.45);
  animation: ctxPop .2s var(--spring) both;
}
.ctxmenu.out { opacity: 0; transform: scale(.97); transition: opacity .12s, transform .12s; }
@keyframes ctxPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ctxIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.ctx-title { display: flex; align-items: center; gap: 9px; padding: 6px 8px 8px; }
.ctx-title img { width: 28px; height: 28px; border-radius: 50%; background: var(--fill2); }
.ctx-title strong { display: block; font-weight: 600; font-size: 13px; color: var(--text); }
.ctx-title small { display: block; color: var(--text2); font-size: 11.5px; }
.ctx-item {
  appearance: none; width: 100%; display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 8px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: default;
}
.ctx-item .ctx-ico { color: var(--text2); display: grid; place-items: center; }
.ctx-item.hl { background: var(--acc); color: #fff; }
.ctx-item.hl .ctx-ico, .ctx-item.hl .ctx-hint { color: rgba(255,255,255,.85); }
.ctx-item.danger, .ctx-item.danger .ctx-ico { color: var(--red); }
.ctx-item.danger.hl { background: var(--red); color: #fff; }
.ctx-item.danger.hl .ctx-ico { color: #fff; }
.ctx-item:disabled { opacity: .4; }
.ctx-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-hint { margin-left: auto; font: inherit; font-size: 12px; color: var(--text3); background: none; border: 0; box-shadow: none; padding: 0; }
.ctxmenu hr { border: 0; height: 1px; background: var(--line2); margin: 5px 8px; }
.ctx-sec { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--text3); padding: 3px 8px 2px; }
.ctx-sec svg { color: var(--gold); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* =====================================================================
   Base de componentes
   ===================================================================== */
.btn {
  border: 0; background: var(--fill); color: var(--text); box-shadow: none; border-radius: 8px;
  padding: 7px 14px; font: 500 13px var(--font); display: inline-flex; align-items: center; gap: 7px; transition: filter .15s, transform .2s var(--spring);
}
.btn:hover { filter: brightness(1.18); }
.btn:active { transform: scale(.97); box-shadow: none; }
.btn-accent, .btn-teal { background: var(--acc); color: #fff; border: 0; box-shadow: none; }
.btn-danger { background: rgba(255,69,58,.16); color: var(--red); border: 0; box-shadow: none; }
.btn-danger:hover { background: var(--red); color: #fff; filter: none; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.07); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { padding: 10px 20px; font-size: 14px; border-radius: 10px; }
.input, .select, textarea.input, select.input {
  background: var(--fill2); border: 0; box-shadow: inset 0 0 0 .5px var(--line2); border-radius: 8px; color: var(--text);
  padding: 8px 11px; font: 400 13.5px var(--font);
}
.input:focus, .select:focus, textarea.input:focus, select.input:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--acc), 0 0 0 3px var(--acc-soft); border-color: transparent; }
.input::placeholder { color: var(--text3); }
.hint { color: var(--text2); font-size: 12.5px; }
.err { color: #FF6961; font-weight: 500; }
.section-title { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--text); margin: 18px 0 8px; }
.tabs .tab, .tab { border: 0; background: transparent; color: var(--text2); font: 500 13px var(--font); border-radius: 7px; padding: 6px 12px; }
.tab.on { background: var(--win3); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.tabs { background: var(--fill2); border-radius: 9px; padding: 2px; gap: 2px; display: inline-flex; }
.seg { display: inline-flex; background: var(--fill2); border: 0; border-radius: 9px; padding: 2px; gap: 2px; flex-wrap: nowrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font: 500 12.5px var(--font); color: var(--text2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .2s var(--ease), color .2s; white-space: nowrap; }
.seg button.on { background: var(--win3); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.seg button i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.kbd { font: 500 11px/16px var(--font); color: var(--text2); background: var(--fill2); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; box-shadow: none; }
img.emoji { width: 1.2em; height: 1.2em; vertical-align: -0.25em; display: inline-block; }

/* ---------- janelas (modais) ---------- */
.modal-backdrop { background: rgba(0,0,0,.38); backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1); }
.modal {
  background: var(--win); border: 0; border-radius: 12px; box-shadow: 0 0 0 1px var(--line2), 0 0 0 .5px #000, 0 30px 80px rgba(0,0,0,.55);
  backdrop-filter: none; -webkit-backdrop-filter: none; transform: scale(.97); opacity: .6; transition: transform .28s var(--spring), opacity .18s;
}
.modal-backdrop.in .modal { transform: none; opacity: 1; }
.modal-head { position: relative; padding: 14px 150px 10px 20px; min-height: 52px; }
.modal-head h2 { font: 600 17px var(--font); letter-spacing: -.01em; }
.modal-head.has-wctl { justify-content: flex-start; }
.modal-head .wctl { position: absolute; top: 0; right: 0; }
.modal-body { padding: 4px 20px 20px; }
.modal-foot { border-top: 1px solid var(--line); }
.wctl { display: flex; z-index: 5; }
.wctl button { width: 46px; height: 36px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text2); transition: background .12s, color .12s; padding: 0; }
.wctl button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.wctl button.close:hover { background: #C42B1C; color: #fff; }
.wctl button:last-child { border-top-right-radius: 12px; }
.modal.modal-max { width: calc(100vw - 24px) !important; max-width: none !important; height: calc(100vh - 24px) !important; max-height: none !important; }

/* alertas */
.modal-alert { width: min(380px, 100%); }
.alert { padding: 22px 22px 18px; text-align: center; }
.alert h3 { margin: 4px 0 6px; font: 600 15px var(--font); }
.alert p { margin: 0 0 14px; color: var(--text2); font-size: 13px; line-height: 1.45; }
.alert-ico { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 13px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-text); }
.alert-ico.danger { background: rgba(255,69,58,.15); color: var(--red); }
.alert .input { width: 100%; margin-bottom: 14px; text-align: left; }
.alert-btns { display: flex; gap: 8px; justify-content: stretch; margin-top: 6px; }
.alert-btns .btn { flex: 1; justify-content: center; padding: 8px 10px; }
.alert-form { text-align: left; }
.alert-form h3 { text-align: left; }
.form-f { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-f > span { font-size: 12px; font-weight: 500; color: var(--text2); }
.form-f > small { font-size: 11.5px; color: var(--text3); }
.form-f .input { margin: 0; }
.choose-list { display: flex; flex-direction: column; background: var(--win2); border-radius: 10px; overflow: hidden; margin: 6px 0 14px; text-align: left; }
.choose-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; font: inherit; }
.choose-item + .choose-item { box-shadow: inset 0 1px 0 var(--line); }
.choose-item:hover { background: rgba(255,255,255,.05); }
.choose-ico { color: var(--acc-text); display: grid; }
.choose-dot { width: 18px; height: 18px; border-radius: 50%; }
.choose-txt { flex: 1; display: flex; flex-direction: column; }
.choose-txt b { font-weight: 500; }
.choose-txt small { color: var(--text2); font-size: 11.5px; }
.choose-chev { color: var(--text3); display: grid; }

/* ---------- toasts e faixas ---------- */
.toasts { top: 70px; }
.toast {
  background: var(--glass-hi); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--line2); border-radius: 14px; padding: 10px 14px 10px 12px; font: 500 13px var(--font); box-shadow: 0 10px 30px rgba(0,0,0,.4);
  transform: translateY(-10px) scale(.98); transition: transform .35s var(--spring), opacity .2s;
}
.toast-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--fill2); color: var(--text2); flex: none; font-size: 0; }
.toast-icon:has(img), .toast-icon:has(.gi) { background: none; font-size: inherit; }
.toast-ok .toast-icon { background: rgba(48,209,88,.16); color: var(--green); }
.toast-warn .toast-icon { background: rgba(255,214,10,.14); color: var(--yellow); }
.toast-err .toast-icon { background: rgba(255,69,58,.16); color: var(--red); }
.toast-ok, .toast-warn, .toast-err { border-color: var(--line2); }
.toast .btn { margin-left: 4px; }
.banner { background: var(--glass); border: 1px solid var(--line2); color: var(--text2); font: 500 12px var(--font); border-radius: 999px; backdrop-filter: blur(20px); bottom: 70px; padding: 5px 12px; }
.net-banner { background: var(--glass-hi); border: 1px solid var(--line2); font: 500 13px var(--font); backdrop-filter: blur(30px); }

/* =====================================================================
   HUD
   ===================================================================== */
.hud-top { top: 16px; left: 16px; right: 16px; align-items: flex-start; }
.hud-me { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 16px; }
.hud-me .prog-lv { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0 !important; border-radius: 12px; color: var(--text); cursor: pointer; font: inherit; }
.hud-me .prog-lv:hover { background: transparent !important; }
.hud-me .prog-mid { display: flex; flex-direction: column; gap: 5px; min-width: 128px; }
.hud-me .prog-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hud-me .prog-name { font: 600 13px var(--font); }
.hud-me .prog-xp { font: 500 11px var(--font); color: var(--text2); font-variant-numeric: tabular-nums; }
.hud-me .xpbar { height: 4px; background: var(--fill); }
.hud-me .xpbar i { background: var(--acc); }
.hud-me .vsep, .vsep { width: 1px; height: 26px; background: var(--line2); }
.hud-me .prog-coins { display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--font) !important; color: var(--text) !important; padding: 4px 6px !important; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-variant-numeric: tabular-nums; }
.hud-me .prog-chest { border: 0; background: transparent; cursor: pointer; padding: 2px 4px !important; border-radius: 8px; position: relative; display: grid; place-items: center; }
.hud-me .prog-coins:hover, .hud-me .prog-chest:hover { background: rgba(255,255,255,.07) !important; }
.hud-me .prog-chest .badge { top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); font: 600 10px/16px var(--font); text-align: center; border: 0; box-shadow: 0 0 0 2px #040605; }
.hud-clock { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 12px; white-space: nowrap; }
.hud-time { font: 600 15px var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.01em; cursor: default; }
.hud-clock .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text3); }
.hud-area { color: var(--text2); font-size: 12.5px; }
.hud-next { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text2); font: 400 12.5px var(--font); cursor: pointer; padding: 0; max-width: 300px; }
.hud-next .dot { display: none; }
.hud-next b { color: var(--text); font-weight: 500; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.hud-next .ev-i { display: grid; }
.hud-next.live .ev-i { color: var(--red); animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 50% { opacity: .35; } }
.hud-tr { display: flex; align-items: center; gap: 8px; }
.hud-avs { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 6px; border-radius: 12px; cursor: pointer; color: var(--text); font: inherit; }
.hud-avs .stack { display: flex; }
.hud-avs .av { position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--win3); box-shadow: 0 0 0 2px #040605; }
.hud-avs .av + .av { margin-left: -6px; }
.hud-avs .av img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.hud-avs .av .st { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px #040605; }
.hud-avs small { color: var(--text2); font-size: 12px; font-weight: 500; }
.hud-ib { position: relative; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--text); padding: 0; }
.hud-ib:hover, .hud-avs:hover, .hud-status:hover { background: var(--glass-hi); }
.hud-ib .badge { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #040605; }
.dock-btn.on, .dock-btn.in-call { color: var(--acc-text); }
.dock-btn.in-call::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.dock-btn .dock-badge { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/16px var(--font); text-align: center; box-shadow: 0 0 0 2px #040605; }
.dock-ico { display: grid; }
.hud-status { height: 36px; border-radius: 12px; display: flex; align-items: center; gap: 7px; padding: 0 12px 0 11px; cursor: pointer; color: var(--text); font: 500 12.5px var(--font); max-width: 220px; }
.hud-status .st-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hud-status .st-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-status img.emoji { width: 15px; height: 15px; }

/* aviso do admin */
.hud-ann { position: fixed; top: 64px; left: 50%; transform: translate(-50%, -12px); opacity: 0; z-index: 12; display: flex; align-items: center; gap: 12px; max-width: min(620px, calc(100vw - 32px));
  padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--glass-hi); border: 1px solid rgba(255,159,10,.35); backdrop-filter: blur(40px) saturate(180%); box-shadow: 0 12px 34px rgba(0,0,0,.45); transition: transform .45s var(--spring), opacity .2s; }
.hud-ann.in { transform: translate(-50%, 0); opacity: 1; }
.ann-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--orange); color: #fff; flex: none; }
.ann-t { flex: 1; min-width: 0; font-size: 13.5px; }
.ann-t small { display: block; color: var(--text2); font-size: 11.5px; }
.ann-x { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.ann-x:hover { background: rgba(255,255,255,.08); color: var(--text); }

/* chat em uma linha */
.hud-bottom-left { left: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); }
.hud-chat { border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.hud-chat .chat-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 4px 12px; }
.chat-ch { display: flex; align-items: center; gap: 4px; color: var(--text2); font-weight: 500; font-size: 12.5px; }
.chat-ch svg { display: block; }
.chat-open { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.chat-open:hover { background: rgba(255,255,255,.08); color: var(--text); }
.hud-chat .chat-log { max-height: 220px; padding: 4px 12px 8px; gap: 5px; font-size: 13px; }
.hud-chat .chat-msg { line-height: 1.4; }
.hud-chat .chat-msg .who { font-weight: 600; margin-right: 6px; }
.hud-chat .chat-msg .when { color: var(--text3); font-size: 10.5px; }
.hud-chat .chat-msg.sys { color: var(--text2); font-style: normal; font-size: 12px; }
.hud-chat .chat-msg.quick .txt { color: var(--text2); }
.hud-chat .chat-input { padding: 6px; border-top: 1px solid var(--line); }
.chat-in { width: 100%; height: 32px; border: 0; border-radius: 8px; background: var(--fill2); color: var(--text); font: 400 13px var(--font); padding: 0 10px; outline: 0; }
.chat-in:focus { box-shadow: inset 0 0 0 1px var(--acc); }
.chatline-btn { display: none; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; font: 400 13px var(--font); text-align: left; }
.hud-chat.collapsed .chat-top, .hud-chat.collapsed .chat-log, .hud-chat.collapsed .chat-input { display: none; }
.hud-chat.collapsed .chatline-btn { display: flex; }
.chatline-btn .ch { display: flex; align-items: center; gap: 3px; color: var(--text2); font-weight: 500; flex: none; }
.chatline-btn .ch svg { display: block; }
.chatline-btn .msg { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatline-btn .msg b { font-weight: 600; }
.chatline-btn .msg.dim { color: var(--text3); }
.chatline-btn .unread { min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font: 600 11px/18px var(--font); text-align: center; padding: 0 5px; }

/* base direita */
.hud-bottom-right { right: 16px; bottom: 16px; }
.hud-dock { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; }
.hud-dock button { border: 0; background: transparent; color: var(--text); cursor: pointer; height: 34px; border-radius: 10px; display: flex; align-items: center; gap: 7px; padding: 0 12px; font: 500 13px var(--font); transition: background .15s; }
.hud-dock button span:not(.kbd) { display: grid; }
.hud-dock button:hover { background: rgba(255,255,255,.08); }
.hud-dock button.prim { background: var(--acc); color: #fff; }
.hud-dock button.prim:hover { filter: brightness(1.1); background: var(--acc); }
.hud-dock button.prim.live { background: var(--red); }
.hud-dock .kbd { margin-left: 2px; }
.hud-dock .sp { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.hud-dock button.q { width: 34px; padding: 0; justify-content: center; }

/* menus de status etc. usam .ctxmenu */

/* =====================================================================
   Central de notificações
   ===================================================================== */
.notes { position: fixed; z-index: 80; width: 360px; max-height: min(520px, calc(100vh - 90px)); display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; animation: ctxPop .22s var(--spring); }
.notes-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.notes-h b { font-weight: 600; font-size: 14px; }
.notes-clear { border: 0; background: transparent; color: var(--acc-text); font: 500 12.5px var(--font); cursor: pointer; }
.notes-list { overflow: auto; padding: 0 6px 6px; }
.nt-item { width: 100%; display: flex; gap: 10px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.nt-item:hover { background: rgba(255,255,255,.06); }
.nt-item.unread { background: rgba(255,255,255,.04); }
.nt-item.unread .note-r b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); margin-left: 6px; vertical-align: 1px; }
.note-ic { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: grid; place-items: center; flex: none; }
.note-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.note-r { display: flex; justify-content: space-between; gap: 8px; }
.note-r b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-r small { color: var(--text3); font-size: 11.5px; flex: none; }
.note-b { color: var(--text2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notes-empty { padding: 26px 20px 30px; text-align: center; color: var(--text2); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.notes-empty > span { color: var(--text3); margin-bottom: 6px; }
.notes-empty div { color: var(--text); font-weight: 600; }
.notes-empty small { font-size: 12px; max-width: 240px; }

/* =====================================================================
   Configurações (Ajustes)
   ===================================================================== */
.modal-settings { width: min(900px, calc(100vw - 32px)); height: min(620px, calc(100vh - 40px)); max-height: none; padding: 0; overflow: hidden; }
.set-win { position: relative; display: flex; height: 100%; }
.set-win > .wctl { position: absolute; top: 0; right: 0; }
.set-sb { width: 236px; flex: none; background: rgba(37,42,88,.55); border-right: 1px solid var(--line); padding: 46px 10px 12px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.set-search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 8px; background: var(--fill2); color: var(--text3); margin: 0 2px 10px; }
.set-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 400 13px var(--font); outline: 0; }
.set-search span { display: grid; }
.set-prof { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 9px; margin-bottom: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.set-prof:hover { background: rgba(255,255,255,.05); }
.set-prof.on { background: var(--acc); }
.set-prof.on small { color: rgba(255,255,255,.8); }
.set-prof img { width: 38px; height: 38px; border-radius: 50%; background: var(--win3); }
.set-prof strong { display: block; font-weight: 600; font-size: 13px; }
.set-prof small { color: var(--text2); font-size: 11.5px; }
.set-i { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: 400 13px var(--font); text-align: left; cursor: pointer; width: 100%; }
.set-i:hover { background: rgba(255,255,255,.05); }
.set-i.on { background: var(--acc); color: #fff; }
.set-gap { height: 10px; flex: none; }
.set-sbk { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--text3); padding: 2px 8px 4px; }
.set-sbk span { color: var(--gold); display: grid; }
.sq { border-radius: 6px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.15); }
.sq svg { display: block; }
.set-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.set-head { height: 52px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 150px 0 14px; }
.set-head h3 { margin: 0 0 0 4px; font: 600 15px var(--font); }
.set-nav { display: flex; gap: 2px; }
.set-nav button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.set-nav button:hover { background: rgba(255,255,255,.07); color: var(--text); }
.set-body { flex: 1; overflow: auto; padding: 2px 28px 32px; }
.set-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 4px; }
.set-top-btns { display: flex; gap: 6px; flex: none; }
.set-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.grp { margin: 20px 0 8px 2px; }
.grp:first-child { margin-top: 6px; }
.grp-t { font-size: 13px; font-weight: 600; color: var(--text); }
.grp-d { font-size: 12px; color: var(--text2); margin-top: 2px; line-height: 1.45; }
.list { background: var(--win2); border-radius: 10px; box-shadow: inset 0 0 0 .5px var(--line); }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--line); }
.row .lbl { flex: 1; min-width: 0; font-size: 13px; }
.row .lbl small { display: block; color: var(--text2); font-size: 11.5px; margin-top: 1px; line-height: 1.35; }
.row .val { color: var(--text2); font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.row .you { color: var(--text3); font-size: 12px; }
.row-tools { display: flex; gap: 2px; }
.row.log .lbl b { font-weight: 600; }
.ch-ico { color: var(--text2); display: grid; flex: none; }
.ch-ico.inline { display: inline-grid; vertical-align: -3px; margin-right: 5px; }
/* toggle */
.tg { position: relative; width: 40px; height: 24px; flex: none; }
.tg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.tg > span { position: absolute; inset: 0; border-radius: 12px; background: var(--fill); transition: background .25s var(--ease); }
.tg > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); transition: transform .35s var(--spring); }
.tg input:checked + span { background: var(--green); }
.tg input:checked + span::after { transform: translateX(16px); }
.tg input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
/* slider */
.sl-wrap { display: flex; align-items: center; gap: 10px; flex: 1.2; min-width: 220px; }
.sl { display: flex; align-items: center; gap: 9px; flex: 1; color: var(--text2); }
.sl > span { display: grid; }
.sl input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 22px; background: transparent; margin: 0; cursor: pointer; --p: 50%; }
.sl input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--acc) var(--p), var(--fill) var(--p)); }
.sl input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--acc) var(--p), var(--fill) var(--p)); }
.sl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; margin-top: -8px; box-shadow: 0 0 0 .5px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.35); transition: transform .2s var(--spring); }
.sl input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.sl input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
/* pop-up */
select.pop { -webkit-appearance: none; appearance: none; height: 26px; padding: 0 26px 0 10px; border: 0; border-radius: 7px; background: var(--fill2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398989D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E") right 8px center no-repeat; box-shadow: inset 0 0 0 .5px var(--line2); color: var(--text); font: 400 13px var(--font); cursor: pointer; max-width: 260px; }
select.pop:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--acc), 0 0 0 3px var(--acc-soft); }
select.pop option { background: var(--win2); }
/* botão pequeno */
.kbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--fill); color: var(--text); font: 500 12.5px var(--font); cursor: pointer; white-space: nowrap; flex: none; transition: filter .15s, transform .2s var(--spring); }
.kbtn span { display: grid; }
.kbtn:hover { filter: brightness(1.18); }
.kbtn:active { transform: scale(.96); }
.kbtn.acc { background: var(--acc); color: #fff; }
.kbtn.danger { background: rgba(255,69,58,.16); color: var(--red); }
.kbtn.ghost { background: transparent; color: var(--acc-text); padding: 0 6px; }
.kbtn:disabled { opacity: .45; cursor: default; }
.more { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.more:hover { background: var(--fill2); color: var(--text); }
.more.danger:hover { color: var(--red); }
.more:disabled { opacity: .3; cursor: default; }
.kfield { height: 28px; border: 0; border-radius: 7px; background: var(--fill2); box-shadow: inset 0 0 0 .5px var(--line2); color: var(--text); font: 400 13px var(--font); padding: 0 10px; width: 210px; }
.kfield.wide { width: min(360px, 100%); }
.kfield:focus { outline: 0; box-shadow: inset 0 0 0 1px var(--acc), 0 0 0 3px var(--acc-soft); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; flex: none; }
.tag span { display: grid; }
.tag.admin { background: rgba(232,184,74,.16); color: var(--gold); }
.tag.member { background: var(--fill2); color: var(--text2); }
.mav { position: relative; width: 32px; height: 32px; flex: none; }
.mav img { width: 100%; height: 100%; border-radius: 50%; background: var(--win3); display: block; }
.mav .st { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--win2); }
.hero { display: flex; align-items: center; gap: 16px; padding: 16px; }
.hero-t { flex: 1; min-width: 0; }
.hero-n { font: 600 17px var(--font); }
.hero-s { margin-top: 5px; }
.avatar-edit { position: relative; width: 68px; height: 68px; flex: none; }
.avatar-edit img { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #24302b, #121715); }
.avatar-edit button { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--win3); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 3px var(--win2); }
.avatar-edit button:hover { background: var(--acc); color: #fff; }
.kswatches { display: flex; gap: 8px; flex-wrap: wrap; }
.kswatch { width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; transition: transform .2s var(--spring); }
.kswatch:hover { transform: scale(1.12); }
.kswatch.on { box-shadow: 0 0 0 2px var(--win2), 0 0 0 4px var(--text); }
.kswatches.lg { justify-content: center; margin: 10px 0 18px; gap: 12px; }
.kswatches.lg .kswatch { width: 28px; height: 28px; }
.kswatches.lg .kswatch.on { box-shadow: 0 0 0 2px var(--win), 0 0 0 4px var(--text); }
.cs-emoji { display: grid; }
.cs-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.cs-row .input { margin: 0; flex: 1; }
.cs-pick { width: 38px; height: 36px; border: 0; border-radius: 8px; background: var(--fill2); cursor: pointer; display: grid; place-items: center; flex: none; }
.cs-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 8px; margin-bottom: 12px; border-radius: 10px; background: var(--win2); }
.cs-grid button { border: 0; background: transparent; border-radius: 7px; padding: 5px; cursor: pointer; display: grid; place-items: center; }
.cs-grid button:hover { background: rgba(255,255,255,.08); }
.perm { display: grid; }
.perm.granted { color: var(--green); }
.perm.denied { color: var(--red); }
.meter { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--text3); border-radius: 3px; transition: width .06s; }
.meter i.on { background: var(--green); }
.meter b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--yellow); border-radius: 1px; }
.vs-cam { width: 100%; max-height: 240px; border-radius: 10px; background: #000; margin-top: 10px; object-fit: cover; transform: scaleX(-1); }
.kb-slots { display: flex; gap: 6px; }
.kb-key { min-width: 64px; height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--fill); color: var(--text); font: 500 12px var(--font); cursor: pointer; display: inline-grid; place-items: center; }
.kb-key.empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line2); color: var(--text3); }
.kb-key.cap { background: var(--acc); color: #fff; animation: pulseDot 1s infinite; }
.kb-key.clash { box-shadow: inset 0 0 0 1px var(--orange); color: var(--orange); }
.storage { padding: 16px; }
.storage-h b { font: 600 22px var(--font); }
.storage-h span { color: var(--text2); }
.storage-bar { display: flex; height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; margin: 12px 0 10px; }
.storage-bar i { display: block; height: 100%; }
.storage-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text2); }
.storage-legend span { display: flex; align-items: center; gap: 6px; }
.storage-legend i { width: 8px; height: 8px; border-radius: 50%; }
.file-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about { display: flex; align-items: center; gap: 16px; padding: 18px 16px; }
.about-mark, .mark { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(160deg, #1a211e, #181b3c); box-shadow: 0 0 0 1px var(--line2), 0 10px 30px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font: 600 17px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: -.04em; color: var(--text); flex: none; }
.about-mark span, .mark span { color: var(--acc-text); }
.about-n { font: 600 17px var(--font); }
.about-v { color: var(--text2); font-size: 12.5px; }

/* =====================================================================
   Atalhos (?)
   ===================================================================== */
.modal-sc { width: min(900px, calc(100vw - 32px)); }
.sc { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.sc .grp-t { margin: 16px 2px 8px; }
.sc .grp-t:first-child { margin-top: 4px; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 6px 12px; font-size: 13px; }
.sc-row + .sc-row { box-shadow: inset 0 1px 0 var(--line); }
.sc-keys { display: flex; gap: 4px; flex: none; }
.sc-m { display: flex; align-items: center; gap: 8px; }
.sc-m span { display: grid; color: var(--text2); }
.sc-d { color: var(--text2); text-align: right; }
.sc-foot { padding: 0 20px 18px; color: var(--text2); font-size: 12px; }

/* =====================================================================
   Jukebox
   ===================================================================== */
.jbx { position: fixed; right: 16px; top: 64px; z-index: 11; width: 356px; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line2), 0 16px 40px rgba(0,0,0,.5); }
.jbx-video { width: 356px; height: 200px; background: #000; }
.jbx-video iframe, .jbx-video > div { width: 100%; height: 100%; display: block; border: 0; }
.jbx-card { border-radius: 0; border: 0; box-shadow: none; position: relative; }
.jbx-grip { position: absolute; left: 0; right: 0; top: -200px; height: 26px; cursor: grab; display: grid; place-items: center; z-index: 2; }
.jbx-grip i { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.45); box-shadow: 0 1px 4px rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; }
.jbx:hover .jbx-grip i { opacity: 1; }
.jbx-grip:active { cursor: grabbing; }
.jbx-meta { display: flex; align-items: center; gap: 10px; padding: 10px 12px 2px; }
.jbx-meta > div { flex: 1; min-width: 0; }
.jbx-meta strong { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jbx-meta small { color: var(--text2); font-size: 11.5px; }
.jbx-note { color: var(--acc-text); display: grid; }
.jbx-prog { margin: 8px 12px 0; height: 3px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.jbx-prog i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 2px; transition: width 1s linear; }
.jbx-times { display: flex; justify-content: space-between; margin: 4px 12px 0; color: var(--text3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.jbx-ctl { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 8px; }
.jbx-grp { display: flex; gap: 2px; }
.jbx-grp button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.jbx-grp button:hover { background: rgba(255,255,255,.08); }
.jbx-vote { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--fill2); color: var(--text2); font: 500 12px var(--font); cursor: pointer; }
.jbx-vote span { display: grid; }
.jbx-vote b { color: var(--text); font-weight: 600; }
.jbx-vote:hover { background: var(--fill); color: var(--text); }
.jbx-vote.on { background: var(--acc-soft); color: var(--acc-text); }
.jbx-pill { display: none; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border-radius: 19px; color: var(--text); cursor: pointer; font: 500 12.5px var(--font); max-width: 300px; }
.jbx-pill small { color: var(--acc-text); font-size: 12px; flex: none; }
.jbx-pill-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jbx.paused { width: auto; background: none; box-shadow: none; overflow: visible; }
.jbx.paused .jbx-video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.jbx.paused .jbx-card { display: none; }
.jbx.paused .jbx-pill { display: flex; }
.modal-jbx { width: min(560px, calc(100vw - 32px)); }
.jbx-q { padding: 0 20px 20px; }
.jbx-add { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--win2); box-shadow: inset 0 0 0 .5px var(--line); }
.jbx-add .input { flex: 1; background: transparent; box-shadow: none; padding: 6px 2px; }
.jbx-add-ico { color: var(--text2); display: grid; }
.jbx-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; position: relative; }
.jbx-row + .jbx-row::before { content: ""; position: absolute; top: 0; left: 92px; right: 0; height: 1px; background: var(--line); }
.jbx-thumb { width: 68px; height: 38px; border-radius: 6px; object-fit: cover; background: var(--win3); flex: none; }
.jbx-row-t { flex: 1; min-width: 0; }
.jbx-row-t b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jbx-row-t small { color: var(--text2); font-size: 11.5px; }
.jbx-live { color: var(--acc-text); display: grid; animation: pulseDot 1.6s infinite; }
.jbx-row.past { opacity: .8; }
.jbx-empty { color: var(--text2); font-size: 12.5px; padding: 12px 2px; }
.jbx-now-ctl { display: flex; gap: 8px; margin-top: 8px; }
.jbx-now-ctl .btn span { display: grid; }
.jbx-admin { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 10px 12px; border-radius: 10px; background: rgba(232,184,74,.08); }
.jbx-admin-k { display: flex; align-items: center; gap: 6px; color: var(--gold); font-size: 12.5px; font-weight: 600; }
.jbx-foot { margin-top: 14px; }

/* =====================================================================
   Entrada, carregamento e abertura
   ===================================================================== */
.screen { position: fixed; inset: 0; display: grid; place-items: center; background: #0a0d0c; overflow: hidden; }
.screen-bg { position: absolute; inset: 0; }
.screen-bg-cv { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(18px) brightness(.5) saturate(1.2); }
.screen-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.45)); }
.lcard { position: relative; z-index: 1; width: 380px; max-width: calc(100vw - 32px); border-radius: 20px; padding: 36px 32px 28px; text-align: center; animation: cardIn .6s var(--spring) both; }
.lcard .mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px; font-size: 18px; }
.lcard h2 { margin: 0; font: 700 22px var(--font); letter-spacing: -.02em; }
.lcard p { margin: 6px 0 22px; color: var(--text2); font-size: 13.5px; line-height: 1.45; }
.lform { display: flex; flex-direction: column; gap: 10px; }
.inp { display: block; width: 100%; height: 40px; border-radius: 10px; background: rgba(110,104,190,.18); border: 0; box-shadow: inset 0 0 0 1px var(--line); padding: 0 12px; font: 400 14px var(--font); color: var(--text); outline: 0; transition: box-shadow .15s; }
.inp:focus { box-shadow: inset 0 0 0 1px var(--acc), 0 0 0 3px var(--acc-soft); }
.inp::placeholder { color: var(--text3); }
.big-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; border-radius: 10px; border: 0; background: var(--acc); color: #fff; font: 600 14px var(--font); cursor: pointer; margin-top: 4px; transition: transform .2s var(--spring), filter .15s; }
.big-btn:hover { filter: brightness(1.1); }
.big-btn:active { transform: scale(.97); }
.big-btn:disabled { opacity: .7; cursor: default; }
.big-btn.busy { color: transparent; position: relative; }
.big-btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-err { min-height: 0; font-size: 12.5px; color: #FF6961; text-align: left; }
.auth-err:empty { display: none; }
.auth-err.ok { color: var(--green); }
.lfoot { margin-top: 18px; color: var(--text2); font-size: 13px; }
.lfoot a { color: var(--acc-text); text-decoration: none; font-weight: 500; }
.lfoot a:hover { text-decoration: underline; }
.demo-note { margin: -10px 0 18px; font-size: 12px; color: var(--text2); background: var(--fill2); border-radius: 8px; padding: 8px 10px; text-align: left; }
.lcard.shake { animation: shake .45s; }
.lcard.leaving { transform: scale(.96); opacity: 0; transition: transform .22s var(--ease), opacity .22s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.screen .loading { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--text2); font: 500 13px var(--font); }
.screen .loading .mark { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05); box-shadow: 0 0 0 1px var(--line2), 0 0 40px var(--acc-soft); } }
.load-bar { width: 140px; height: 3px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.load-bar i { display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--acc); animation: loadSlide 1.1s var(--ease) infinite; }
@keyframes loadSlide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.intro-veil { position: fixed; inset: 0; z-index: 200; pointer-events: none; background: rgba(13,13,16,.5); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); transition: backdrop-filter 1.1s var(--ease), -webkit-backdrop-filter 1.1s var(--ease), background 1.1s var(--ease), opacity 1.1s var(--ease); }
.intro-veil.out { backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); background: rgba(13,13,16,0); opacity: 0; }

/* =====================================================================
   Outros
   ===================================================================== */
.overlay-center .scoreboard, .minimap { background: var(--win); border: 0; border-radius: 14px; box-shadow: 0 0 0 1px var(--line2), 0 30px 80px rgba(0,0,0,.55); }
.scoreboard h3, .minimap .mm-head { font: 600 16px var(--font); }
.profile-card h2 { font: 600 20px var(--font); }
.profile-card img { border-radius: 50%; background: radial-gradient(circle at 50% 70%, #24302b, #121715); }
.set-sb { padding-top: 12px; }
.set-title { font: 600 13px var(--font); color: var(--text2); padding: 2px 10px 12px; height: 34px; display: flex; align-items: center; }
.jbx-q .grp-t { margin: 18px 2px 8px; }
.jbx-q .list { overflow: hidden; }
.st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 1px; margin-right: 6px; flex: none; }
/* janelas de tela cheia (missões, agenda, projeção, bandeiras) */
.proj.plan .proj-top { position: relative; }
.proj-top { background: rgba(18, 24, 21,.82); border-bottom: 1px solid var(--line); }
.proj-top h2 { font: 600 17px var(--font); }
.modal-fullbox { background: #0a0d0c; }
.proj-empty .big { font-size: 0; color: var(--text2); background: none; }
.mb-col { background: var(--win); border-color: var(--line); border-radius: 12px; }
.mb-col-head { font: 600 14px var(--font); }
.mb-filters .chip, .mb-filters button { font-family: var(--font); }

/* =====================================================================
   Fliperama
   ===================================================================== */
.fg { background: radial-gradient(900px 500px at 50% 0%, rgba(122,102,255,.10), transparent 70%), #0a0d0c; }
.fg .proj-top { position: relative; }
.fg-lobby h3, .fg-end h3 { font: 700 26px var(--font); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; justify-content: center; }
.fg-mode { background: var(--win2); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; font-family: var(--font); }
.fg-mode b { font: 600 15px var(--font); }
.fg-mode span { font-weight: 400; color: var(--text2); }
.fg-mode.on { box-shadow: inset 0 0 0 2px var(--acc); border-color: transparent; }
.fg-player { background: var(--win2); border: 0; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.fg-player img { border-radius: 50%; }
.fg-round, .fg-hint { font-family: var(--font); }
.fg-hint { color: var(--yellow); }
.fg-timer i { background: var(--acc); }
.fg-pod .fg-pname, .fg-pod .fg-pscore { font-family: var(--font); }
.ar-ic { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; vertical-align: middle; }
.ar-hero { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.25); margin-bottom: 8px; }
.ar-how { max-width: 620px; line-height: 1.5; }
.ar-rest { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; color: var(--text2); margin-top: 10px; }
.ar-area { flex: 1; min-height: 0; position: relative; display: flex; }
.ar-game { flex: 1; display: grid; grid-template-columns: 1fr 260px; gap: 16px; padding: 16px; min-height: 0; }
.ar-game.bm { grid-template-columns: 1fr; }
.ar-main { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.ar-main.center { align-items: center; }
.ar-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.ar-timebar { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.ar-timebar i { display: block; height: 100%; background: var(--acc); border-radius: 3px; }
.ar-timebar.low i { background: var(--red); }
.ar-time { font: 600 14px var(--font); font-variant-numeric: tabular-nums; color: var(--text2); min-width: 40px; text-align: right; }
.ar-live { background: var(--win); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px; overflow: auto; }
.ar-lrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ar-lrow img { width: 28px; height: 28px; border-radius: 50%; background: var(--win3); }
.ar-lrow.done .ar-lname span::after { content: " ✓"; color: var(--green); }
.ar-lmid { flex: 1; min-width: 0; }
.ar-lname { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.ar-lname img { width: 22px; height: 22px; border-radius: 50%; }
.ar-lname small { margin-left: auto; color: var(--text2); font-variant-numeric: tabular-nums; }
.ar-lbar { height: 4px; border-radius: 2px; background: var(--fill); margin-top: 5px; overflow: hidden; }
.ar-lbar i { display: block; height: 100%; border-radius: 2px; transition: width .3s var(--ease); }
.ar-count { position: absolute; inset: 0; display: grid; place-items: center; font: 800 120px var(--font); color: #fff; text-shadow: 0 10px 40px rgba(0,0,0,.5); pointer-events: none; z-index: 5; }
.ar-count.pop { animation: arPop .9s var(--ease); }
@keyframes arPop { from { transform: scale(1.6); opacity: 0; } 30% { transform: scale(1); opacity: 1; } to { opacity: .2; transform: scale(.85); } }
.ar-wait { margin: auto; color: var(--text2); font-size: 15px; }
/* Mira */
.aim-arena { flex: 1; position: relative; border-radius: 14px; background: radial-gradient(circle at 50% 40%, #1d2a22, #121615); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; cursor: crosshair; min-height: 320px; }
.aim-target { position: absolute; border-radius: 50%; display: grid; place-items: center; }
.aim-target i { position: absolute; border-radius: 50%; inset: 0; background: #FF453A; box-shadow: 0 4px 18px rgba(255,69,58,.45); }
.aim-target i:nth-child(2) { inset: 18%; background: #fff; box-shadow: none; }
.aim-target i:nth-child(3) { inset: 36%; background: #FF453A; box-shadow: none; }
.aim-target.in { animation: aimIn .18s var(--spring); }
@keyframes aimIn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.aim-hit { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; box-shadow: 0 0 0 2px #30D158; animation: aimHit .4s ease-out forwards; pointer-events: none; }
@keyframes aimHit { to { transform: scale(5); opacity: 0; } }
.aim-hud, .calc-stat { color: var(--text2); font-size: 13px; text-align: center; }
/* Cálculo */
.calc-q { font: 700 64px var(--font); letter-spacing: -.02em; margin-top: 8vh; font-variant-numeric: tabular-nums; }
.calc-in { width: 260px; height: 64px; text-align: center; font: 700 34px var(--font); border-radius: 14px; border: 0; background: var(--win2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); outline: 0; }
.calc-in:focus { box-shadow: inset 0 0 0 2px var(--acc), 0 0 0 4px var(--acc-soft); }
.calc-in.shake, .shake { animation: shake .35s; }
/* Digitação */
.typ-text { font: 400 22px/1.6 var(--font); background: var(--win); border-radius: 14px; padding: 22px 24px; box-shadow: inset 0 0 0 1px var(--line); user-select: none; }
.typ-text .ok { color: var(--green); }
.typ-text .bad { background: rgba(255,69,58,.3); color: #fff; border-radius: 3px; }
.typ-text .cur { border-left: 2px solid var(--acc); animation: pulseDot 1s infinite; color: var(--text); }
.typ-text .rest { color: var(--text2); }
.typ-in { width: 100%; resize: none; border: 0; border-radius: 12px; background: var(--win2); color: var(--text); font: 400 18px var(--font); padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line2); outline: 0; }
.typ-in:focus { box-shadow: inset 0 0 0 2px var(--acc); }
/* Termo */
.termo-boards { display: grid; gap: 18px; justify-content: center; margin-top: 6px; }
.termo-boards.n2 { grid-template-columns: repeat(2, auto); }
.termo-boards.n4 { grid-template-columns: repeat(2, auto); gap: 12px 22px; }
.termo-board { display: flex; flex-direction: column; gap: 5px; }
.termo-board.solved { opacity: .8; }
.termo-row { display: flex; gap: 5px; }
.termo-c { width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; font: 700 26px var(--font); color: #fff; background: transparent; box-shadow: inset 0 0 0 2px var(--fill); }
.termo-boards.n2 .termo-c { width: 44px; height: 44px; font-size: 22px; }
.termo-boards.n4 .termo-c { width: 32px; height: 32px; font-size: 16px; border-radius: 6px; }
.termo-c.edit { box-shadow: inset 0 0 0 2px var(--text3); }
.termo-c.edit.cur { box-shadow: inset 0 0 0 2px var(--acc); }
.termo-c.g, .termo-c.y, .termo-c.x { animation: termoFlip .45s var(--ease) both; box-shadow: none; }
.termo-c.g { background: #2FA84F; }
.termo-c.y { background: #D4A72C; }
.termo-c.x { background: #24302b; }
@keyframes termoFlip { from { transform: rotateX(90deg); } to { transform: none; } }
.termo-msg { min-height: 22px; font-weight: 600; color: var(--text); }
.termo-msg.bad { color: #FF6961; }
.termo-kb { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-top: 4px; }
.termo-kr { display: flex; gap: 5px; }
.termo-k { min-width: 38px; height: 46px; border: 0; border-radius: 7px; background: var(--win3); color: var(--text); font: 600 15px var(--font); cursor: pointer; padding: 0 8px; }
.termo-k.wide { min-width: 70px; font-size: 13px; }
.termo-k.g { background: #2FA84F; }
.termo-k.y { background: #D4A72C; }
.termo-k.x { background: #232325; color: var(--text3); }
.termo-other { margin-bottom: 14px; }
.termo-mini { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.termo-mr { display: flex; gap: 2px; }
.termo-mr i { width: 12px; height: 12px; border-radius: 2px; background: #24302b; }
.termo-mr i.g { background: #2FA84F; }
.termo-mr i.y { background: #D4A72C; }
/* Codenames */
.cn { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px 22px; min-height: 0; overflow: auto; align-items: center; }
.cn-head { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cn-team { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--win2); box-shadow: inset 0 0 0 1px var(--line); min-width: 220px; opacity: .65; }
.cn-team.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--c, var(--acc)); }
.cn-team.red { --c: #FF453A; } .cn-team.blue { --c: #2fd16f; } .cn-team.green { --c: #30D158; }
.cn-team b { grid-row: span 2; font: 800 28px var(--font); color: var(--c); }
.cn-team span { font-weight: 600; }
.cn-team small { color: var(--text2); font-size: 11.5px; }
.cn-status { font: 600 15px var(--font); padding: 6px 14px; border-radius: 999px; background: var(--win2); box-shadow: inset 0 0 0 1px var(--c); }
.cn-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: min(900px, 100%); }
.cn-card { position: relative; height: 64px; border: 0; border-radius: 10px; background: #E9E4D8; color: #1d1d1f; font: 700 14px var(--font); letter-spacing: .02em; cursor: pointer; transition: transform .2s var(--spring), filter .15s; box-shadow: 0 2px 0 #b9b1a0; padding: 0 6px; }
.cn-card:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.05); }
.cn-card:disabled { cursor: default; }
.cn-card.hint.red { box-shadow: inset 0 -5px 0 #FF453A, 0 2px 0 #b9b1a0; }
.cn-card.hint.blue { box-shadow: inset 0 -5px 0 #2fd16f, 0 2px 0 #b9b1a0; }
.cn-card.hint.green { box-shadow: inset 0 -5px 0 #30D158, 0 2px 0 #b9b1a0; }
.cn-card.hint.assassin { background: #24302b; color: #fff; box-shadow: 0 2px 0 #111; }
.cn-card.hint.neutral { opacity: .75; }
.cn-card.rev { color: #fff; box-shadow: none; animation: termoFlip .4s var(--ease); }
.cn-card.rev.red { background: #D93A30; } .cn-card.rev.blue { background: #0A6FD6; } .cn-card.rev.green { background: #24A148; }
.cn-card.rev.neutral { background: #8E8676; } .cn-card.rev.assassin { background: #111; }
.cn-skull { position: absolute; top: 5px; right: 6px; display: grid; }
.cn-act { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.cn-act .input { width: 220px; }
.cn-act .cn-n { width: 70px; }
.cn-log { display: flex; flex-direction: column; gap: 3px; align-items: center; color: var(--text2); font-size: 13px; }
.cn-me { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 12.5px; }
.cn-me img { width: 22px; height: 22px; border-radius: 50%; }
/* Bomber */
.bm-score { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.bm-pl { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--win2); font-weight: 600; font-size: 13px; }
.bm-pl img { width: 26px; height: 26px; border-radius: 50%; }
.bm-pl b { color: var(--yellow); letter-spacing: 2px; font-weight: 400; }
.bm-pl.dead { opacity: .45; }
.bm-time { font: 600 14px var(--font); color: var(--text2); font-variant-numeric: tabular-nums; margin-left: 8px; }
.bm-wrap { flex: 1; width: 100%; min-height: 0; display: grid; place-items: center; }
.bm-canvas { border-radius: 10px; box-shadow: 0 0 0 1px var(--line2), 0 20px 50px rgba(0,0,0,.5); image-rendering: auto; }
/* janela do Fliperama */
.modal-arcade { width: min(1000px, calc(100vw - 32px)); }
.ar-hub { padding: 4px 20px 22px; }
.ar-hub-g { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.ar-games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ar-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 12px; background: var(--win2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-align: left; cursor: pointer; font: inherit; position: relative; transition: transform .2s var(--spring), background .15s; }
.ar-card:hover { background: var(--win3); transform: translateY(-1px); }
.ar-card-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.ar-card-t { display: flex; flex-direction: column; min-width: 0; }
.ar-card-t b { font-weight: 600; font-size: 14px; }
.ar-card-t small { color: var(--text2); font-size: 12px; }
.ar-card-t .ar-card-p { color: var(--text3); font-size: 11px; }
.ar-open { position: absolute; top: 8px; right: 8px; font-size: 10.5px; font-weight: 600; color: #fff; background: var(--green); border-radius: 999px; padding: 1px 7px; }
.ar-season-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ar-season-h b { display: block; font-weight: 600; font-size: 14px; }
.ar-season-h small { color: var(--text2); font-size: 12px; }
.ar-crown { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,214,10,.15); color: var(--yellow); display: grid; place-items: center; flex: none; }
.ar-crown.sm { width: 26px; height: 26px; border-radius: 7px; }
.ar-pos { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11.5px var(--font); background: var(--fill); flex: none; }
.ar-pos.p1 { background: #FFD60A; color: #3a2a00; } .ar-pos.p2 { background: #C7C7CC; color: #222; } .ar-pos.p3 { background: #C08552; color: #fff; }
.ar-av { width: 28px; height: 28px; border-radius: 50%; background: var(--win3); flex: none; }
.ar-lead { display: inline-grid; color: var(--yellow); margin-left: 5px; vertical-align: -2px; }

/* =====================================================================
   Fase 9 · Arsenal do Brainstorm
   ===================================================================== */
.board .proj-top { position: relative; flex-wrap: nowrap; gap: 10px; }
.board .proj-top > div:last-child { flex-wrap: nowrap; }
.board-text.frame { white-space: nowrap; outline: 1.5px dashed rgba(108,92,231,.6); outline-offset: 3px; }
.board-text::placeholder { color: rgba(61,56,84,.4); }

.bx-session { display: flex; align-items: center; gap: 6px; }
.bx-sbtn { display: inline-flex; align-items: center; gap: 6px; }
.bx-sbtn.on { background: var(--acc); color: #fff; box-shadow: none; }
.bx-timer { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 15px; cursor: pointer; overflow: hidden; color: #fff; font: 700 14px var(--font); font-variant-numeric: tabular-nums; background: linear-gradient(90deg, rgba(57, 255, 136,.55) var(--p, 0%), rgba(57, 255, 136,.22) var(--p, 0%)); }
.bx-timer.urgent { background: linear-gradient(90deg, rgba(255,69,58,.75) var(--p, 0%), rgba(255,69,58,.3) var(--p, 0%)); animation: bxPulse 1s ease-in-out infinite; }
.bx-timer.done { background: var(--red); animation: bxPulse .8s ease-in-out 4; }
@keyframes bxPulse { 50% { transform: scale(1.06); } }

.bx-banners { position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; pointer-events: none; max-width: calc(100% - 360px); }
.bx-banner { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 22px; background: rgba(18, 24, 21,.92); color: var(--text); box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(0,0,0,.25); font: 500 13.5px var(--font); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.bx-banner > .ui-icw { color: var(--acc-text); display: grid; }
.bx-banner-t b { font-weight: 700; }
.bx-bbtn { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--fill); color: var(--text); font: 600 12.5px var(--font); cursor: pointer; white-space: nowrap; }
.bx-bbtn:hover { background: var(--win3); }
.bx-bbtn.primary { background: var(--acc); color: #fff; }

.bx-bar { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(18, 24, 21,.94); box-shadow: 0 0 0 1px var(--line2), 0 10px 30px rgba(0,0,0,.3); white-space: nowrap; }
.bx-r { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .1s, transform .1s; }
.bx-r:hover { background: var(--fill); transform: translateY(-1px); }
.bx-r.on { background: var(--acc-soft); box-shadow: inset 0 0 0 1.5px var(--acc); }
.bx-r img.emoji { width: 20px; height: 20px; }
.bx-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line2); }
.bx-b { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.bx-b:hover:not(:disabled) { background: var(--fill); }
.bx-b:disabled { opacity: .35; cursor: default; }
.bx-b.on { background: var(--acc-soft); color: var(--acc-text); }
.bx-b.done { color: var(--green); }
.bx-b.primary { background: var(--acc); color: #fff; }
.bx-b.primary:hover { background: #7a68f0; }
.bx-b .ui-icw { display: grid; }
.bx-votes { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; font: 700 14px var(--font); color: var(--text); font-variant-numeric: tabular-nums; }

.bx-comments, .bx-rank { position: absolute; z-index: 7; width: 320px; display: flex; flex-direction: column; border-radius: 14px; background: rgba(18, 24, 21,.96); color: var(--text); box-shadow: 0 0 0 1px var(--line2), 0 16px 40px rgba(0,0,0,.35); font-family: var(--font); overflow: hidden; }
.bx-comments { max-height: 440px; }
.bx-rank { right: 14px; top: 14px; max-height: calc(100% - 90px); }
.bx-chead { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px 14px; }
.bx-chead > .ui-icw { color: var(--acc-text); display: grid; }
.bx-chead b { flex: 1; font: 700 14px var(--font); }
.bx-x { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.bx-x:hover { background: var(--fill); color: var(--text); }
.bx-csnip { padding: 0 14px 10px; font: 400 12.5px/1.35 var(--font); color: var(--text2); border-bottom: 1px solid var(--line); }
.bx-clist { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 10px; }
.bx-cempty { padding: 8px 4px; font-size: 13px; color: var(--text2); }
.bx-c { display: flex; gap: 10px; }
.bx-cav { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #111; font: 800 12px var(--font); }
.bx-cbody { flex: 1; min-width: 0; }
.bx-cmeta { display: flex; align-items: center; gap: 6px; }
.bx-cmeta b { font: 700 13px var(--font); }
.bx-cmeta small { color: var(--text3); font-size: 11.5px; }
.bx-cdel { margin-left: auto; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--text3); cursor: pointer; display: grid; place-items: center; opacity: 0; }
.bx-c:hover .bx-cdel { opacity: 1; }
.bx-cdel:hover { color: var(--red); background: rgba(255,69,58,.12); }
.bx-ctext { margin-top: 2px; font: 400 13.5px/1.4 var(--font); white-space: pre-wrap; word-wrap: break-word; }
.bx-crow { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.bx-cin { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); font: 400 13.5px var(--font); outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.bx-cin:focus { box-shadow: inset 0 0 0 1.5px var(--acc); }
.bx-csend { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--acc); color: #fff; cursor: pointer; display: grid; place-items: center; }
.bx-rlist { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.bx-ritem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; text-align: left; font: 500 13px/1.3 var(--font); }
.bx-ritem:hover { background: var(--fill2); }
.bx-ritem.static { cursor: default; }
.bx-ritem.static:hover { background: transparent; }
.bx-rpos { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--text2); font: 800 11.5px var(--font); }
.bx-rpos.p1 { background: #E8B84A; color: #231a05; }
.bx-rpos.p2 { background: #C7CBD1; color: #1c1d20; }
.bx-rpos.p3 { background: #C98B5A; color: #22140a; }
.bx-rsw { width: 12px; height: 12px; flex: none; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.bx-rtext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bx-rn { min-width: 28px; height: 24px; padding: 0 8px; border-radius: 12px; background: #5865f2; color: #fff; display: grid; place-items: center; font: 800 12.5px var(--font); font-variant-numeric: tabular-nums; }
.bx-rprog { font: 700 12.5px var(--font); color: var(--text2); font-variant-numeric: tabular-nums; }
.bx-rprog.full { color: var(--green); }

.bx-pop { position: fixed; z-index: 80; border-radius: 14px; background: var(--win); color: var(--text); box-shadow: 0 0 0 1px var(--line2), 0 20px 50px rgba(0,0,0,.45); font-family: var(--font); animation: bxIn .14s var(--ease); }
@keyframes bxIn { from { opacity: 0; transform: translateY(-4px); } }
.bx-pop-in { width: 300px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bx-pop.wide .bx-pop-in { width: 540px; }
.bx-pop-h { font: 700 15px var(--font); }
.bx-pop-sub { margin-top: -4px; font: 400 12.5px/1.4 var(--font); color: var(--text2); }
.bx-pop-k { font: 600 12px var(--font); color: var(--text2); }
.bx-pop-row { display: flex; gap: 8px; justify-content: flex-end; padding: 0 10px 10px; }
.bx-pop-in .bx-pop-row { padding: 0; }
.bx-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bx-pick { height: 58px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text2); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font: 500 11.5px var(--font); }
.bx-pick b { font: 700 20px var(--font); color: var(--text); font-variant-numeric: tabular-nums; }
.bx-pick:hover { background: var(--acc-soft); }
.bx-seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--fill2); }
.bx-seg button { flex: 1; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.bx-seg button.on { background: var(--win3); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.bx-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--fill2); cursor: pointer; }
.bx-check input { margin-top: 2px; accent-color: var(--acc); width: 16px; height: 16px; }
.bx-check b { display: block; font: 600 13px var(--font); }
.bx-check small { display: block; margin-top: 2px; font: 400 12px/1.35 var(--font); color: var(--text2); }
.bx-wide { width: 100%; justify-content: center; }
.bx-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bx-tpl { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px; border: 0; border-radius: 12px; background: var(--fill2); color: var(--text); cursor: pointer; text-align: left; }
.bx-tpl:hover { background: var(--acc-soft); }
.bx-tpl-i { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; background: var(--win3); display: grid; place-items: center; color: var(--acc-text); }
.bx-tpl b { font: 600 13.5px var(--font); }
.bx-tpl small { font: 400 12px/1.3 var(--font); color: var(--text2); }

.bx-tplk { margin: 14px 0 8px; font: 600 12px var(--font); color: var(--text2); }
.bx-tplrow { display: flex; flex-wrap: wrap; gap: 6px; }
.bx-tplopt { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); font: 500 13px var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px transparent; }
.bx-tplopt .ui-icw { color: var(--text2); display: grid; }
.bx-tplopt:hover { background: var(--fill); }
.bx-tplopt.on { background: var(--acc-soft); box-shadow: inset 0 0 0 1.5px var(--acc); }
.bx-tplopt.on .ui-icw { color: var(--acc-text); }
.bx-tplopt b { font-weight: 600; }

.bx-sum { max-height: 58vh; overflow: auto; margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: 13px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-wrap: break-word; user-select: text; }

/* =====================================================================
   Fase 10 · Biblioteca
   ===================================================================== */
.lib { background: var(--bg2); color: var(--text); }
.lib .proj-top { position: relative; flex: none; gap: 16px; }
.lib .proj-top h2 .lib-ic { color: var(--acc-text); }
.lib-ic { display: inline-grid; place-items: center; flex: none; }
.lib-ic svg { display: block; }
.lib-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--fill2); }
.lib-tab { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--text2); font: 500 13.5px var(--font); cursor: pointer; }
.lib-tab:hover { color: var(--text); }
.lib-tab.on { background: var(--win3); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.lib-content { flex: 1; min-height: 0; overflow-y: auto; }
.lib-content:has(> .lib-wiki) { overflow: hidden; }

.lib-sect { margin: 26px 0 10px; font: 600 13px var(--font); color: var(--text2); }
.lib-hint { color: var(--text3); font: 400 12.5px/1.4 var(--font); }
.lib-hint.pad { padding: 8px 10px; }
.lib-err { display: flex; align-items: center; gap: 8px; margin: 16px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,69,58,.1); box-shadow: inset 0 0 0 1px rgba(255,69,58,.35); color: #ffb4ae; font: 500 13.5px/1.4 var(--font); }
.lib-err.sm { margin: 8px 0; font-size: 12.5px; }
.lib-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 12px; border-radius: 10px; background: var(--acc-soft); color: var(--text); font: 500 13px var(--font); }
.lib-banner .btn { margin-left: auto; }
.lib-banner .btn + .btn { margin-left: 0; }
.lib-banner.warn { background: rgba(255,159,10,.12); }
.lib-banner .lib-ic { color: var(--acc-text); }
.lib-banner.warn .lib-ic { color: var(--orange); }
.lib-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; color: var(--text2); text-align: center; }
.lib-empty.wide { grid-column: 1 / -1; }
.lib-ibtn { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.lib-ibtn:hover:not(:disabled) { background: var(--fill); }
.lib-ibtn:disabled { opacity: .3; cursor: default; }
.lib-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; max-width: 260px; padding: 0 10px; border: 0; border-radius: 13px; background: var(--fill2); color: var(--text); font: 500 12.5px var(--font); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-chip:hover { background: var(--acc-soft); }
.lib-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lib-av { border-radius: 50%; background: var(--win3); flex: none; display: block; }
.lib-avbtn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.lib-lsp { flex: 1; }

/* ---------- daily ---------- */
.lib-daily, .lib-report, .lib-links { max-width: 1200px; margin: 0 auto; padding: 22px 28px 40px; }
.lib-dhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lib-dtitle { display: flex; flex-direction: column; min-width: 200px; }
.lib-dtitle b { font: 700 21px/1.2 var(--font); letter-spacing: -.01em; }
.lib-dtitle small { color: var(--text2); font-size: 13px; }
.lib-dprog { margin-left: auto; display: flex; gap: 6px; }
.lib-dpip { position: relative; display: grid; border-radius: 50%; opacity: .35; filter: grayscale(.6); transition: opacity .2s; }
.lib-dpip.on { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--c); }
.lib-dwrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 20px; align-items: start; }
.lib-dmain { min-width: 0; }
.lib-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.lib-dcard { position: relative; padding: 16px; border-radius: 16px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }
.lib-dcard.me { box-shadow: 0 0 0 1.5px rgba(57, 255, 136,.55); }
.lib-dcard.blocked::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.lib-dcard.empty { display: flex; align-items: center; gap: 12px; color: var(--text2); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lib-dcard.empty p { margin: 2px 0 0; font-size: 13px; }
.lib-dcard.empty .btn { margin-left: auto; }
.lib-dcard.empty.me { margin-bottom: 4px; }
.lib-dch { display: flex; align-items: center; gap: 12px; }
.lib-dwho { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lib-dwho b { font: 600 15px var(--font); }
.lib-dwho small { color: var(--text3); font-size: 12px; }
.lib-mood { display: grid; }
.lib-dsec { margin-top: 12px; }
.lib-dsk { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font: 600 12px var(--font); color: var(--text2); }
.lib-dst { font: 400 14.5px/1.55 var(--font); white-space: pre-wrap; word-wrap: break-word; }
.lib-dst code, .lib-block-t code { padding: 1px 5px; border-radius: 5px; background: var(--fill); font: 12.5px ui-monospace, Consolas, monospace; }
.lib-dst a { color: var(--acc-text); }
.lib-dsec.red { padding: 10px 12px; border-radius: 10px; background: rgba(255,69,58,.08); }
.lib-dsec.red .lib-dsk { color: #ff8a80; }
.lib-dcard.form { padding: 18px; }
.lib-dfield { margin-top: 14px; }
.lib-dfield label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 600 12.5px var(--font); color: var(--text2); }
.lib-dfield.red label { color: #ff8a80; }
.lib-ta { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); font: 400 14.5px/1.5 var(--font); resize: vertical; outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.lib-ta:focus { box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 3px var(--acc-soft); }
.lib-ta::placeholder { color: var(--text3); }
.lib-dmoodw { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lib-dmoodw small { color: var(--text3); font-size: 11.5px; }
.lib-moods { display: flex; gap: 4px; }
.lib-moodbtn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; opacity: .55; transition: opacity .1s, transform .1s; }
.lib-moodbtn:hover { opacity: 1; transform: translateY(-1px); }
.lib-moodbtn.on { opacity: 1; background: var(--acc-soft); box-shadow: inset 0 0 0 1.5px var(--acc); }
.lib-dfoot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.lib-dfoot > :first-child { flex: 1; }
.lib-dside { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.lib-scard { padding: 14px 16px; border-radius: 16px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }
.lib-sk { display: flex; align-items: center; gap: 6px; font: 600 13px var(--font); color: var(--text2); }
.lib-sk .lib-ic { color: var(--yellow); }
.lib-sk.red .lib-ic { color: var(--red); }
.lib-sbig { margin: 6px 0 10px; font: 700 34px/1 var(--font); font-variant-numeric: tabular-nums; }
.lib-sbig small { font: 500 14px var(--font); color: var(--text2); }
.lib-ddots { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin-bottom: 10px; }
.lib-ddot { aspect-ratio: 1; border: 0; padding: 0; border-radius: 4px; background: var(--fill); cursor: pointer; }
.lib-ddot.on { background: var(--green); }
.lib-ddot.cur { box-shadow: 0 0 0 2px var(--text); }
.lib-block { display: block; width: 100%; margin-top: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); text-align: left; cursor: pointer; }
.lib-block:hover { background: var(--fill); }
.lib-block-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.lib-block-h small { color: var(--text3); }
.lib-block-t { margin-top: 3px; font: 400 13px/1.4 var(--font); color: var(--text2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- wiki ---------- */
.lib-wiki { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100%; min-height: 0; }
.lib-wside { min-height: 0; overflow-y: auto; padding: 14px 10px 20px; border-right: 1px solid var(--line); background: var(--win); display: flex; flex-direction: column; gap: 1px; }
.lib-wsearchw { position: relative; display: flex; align-items: center; }
.lib-wsearchw .lib-ic { position: absolute; left: 10px; color: var(--text3); pointer-events: none; }
.lib-wsearch, .lib-lsearch { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 0; border-radius: 9px; background: var(--fill2); color: var(--text); font: 400 13.5px var(--font); outline: none; }
.lib-wsearch:focus, .lib-lsearch:focus { box-shadow: 0 0 0 2px var(--acc-soft), inset 0 0 0 1px var(--acc); }
.lib-wnew { margin: 8px 0 10px; justify-content: center; }
.lib-wgroup { display: flex; align-items: center; gap: 5px; padding: 12px 10px 4px; font: 600 12px var(--font); color: var(--text3); }
.lib-wfolder { display: flex; align-items: center; gap: 6px; width: 100%; height: 30px; margin-top: 8px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text2); font: 600 12.5px var(--font); cursor: pointer; text-align: left; }
.lib-wfolder:hover { background: var(--fill2); color: var(--text); }
.lib-wfolder small { color: var(--text3); font-weight: 500; }
.lib-wchev { display: grid; transition: transform .15s; }
.lib-wfolder.closed .lib-wchev { transform: rotate(-90deg); }
.lib-wfolder.trash { margin-top: 18px; }
.lib-witem { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 10px 0 22px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 400 13.5px var(--font); cursor: pointer; text-align: left; }
.lib-witem:hover { background: var(--fill2); }
.lib-witem.on { background: var(--acc-soft); }
.lib-witem .lib-ic { color: var(--text3); }
.lib-witem small { margin-left: auto; color: var(--text3); font-size: 11.5px; white-space: nowrap; }
.lib-wt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-wicon { display: grid; flex: none; }
.lib-wlive { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(255,159,10,.2); flex: none; }
.lib-wmain { min-width: 0; min-height: 0; overflow-y: auto; padding: 24px 40px 60px; }
.lib-wpage, .lib-whome { max-width: 860px; margin: 0 auto; }
.lib-whome h1 { margin: 10px 0 6px; font: 700 30px/1.2 var(--font); letter-spacing: -.02em; }
.lib-lead { margin: 0; max-width: 640px; color: var(--text2); font: 400 15px/1.55 var(--font); }
.lib-tpls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lib-tpl { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 0; border-radius: 14px; background: var(--win); box-shadow: 0 0 0 1px var(--line); color: var(--text); text-align: left; cursor: pointer; }
.lib-tpl:hover { box-shadow: 0 0 0 1.5px var(--acc); }
.lib-tpl-i { width: 36px; height: 36px; margin-bottom: 6px; border-radius: 10px; background: var(--acc-soft); color: var(--acc-text); display: grid; place-items: center; }
.lib-tpl b { font: 600 14px var(--font); }
.lib-tpl small { color: var(--text2); font: 400 12.5px/1.35 var(--font); }
.lib-wrecent { display: flex; flex-direction: column; gap: 2px; }
.lib-wrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.lib-wrow:hover { background: var(--win); }
.lib-wrow .lib-ic { color: var(--text3); }
.lib-wrow-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lib-wrow-t b { font: 600 14px var(--font); }
.lib-wrow-t small { color: var(--text2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-wrow-m { color: var(--text3); font-size: 12px; white-space: nowrap; }
.lib-wbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.lib-wcrumb { display: flex; align-items: center; gap: 6px; color: var(--text3); font: 500 13px var(--font); }
.lib-wacts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lib-wacts .btn { display: inline-flex; align-items: center; gap: 6px; }
.lib-wacts .btn.on { background: var(--acc-soft); color: var(--acc-text); }
.lib-wh1 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font: 700 32px/1.2 var(--font); letter-spacing: -.02em; word-break: break-word; }
.lib-wh1i { display: grid; }
.lib-wmeta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--text3); font-size: 12.5px; }
.lib-wmeta .lib-av { margin-right: 4px; }
.lib-wback { margin-top: 36px; padding-top: 6px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.lib-wback .lib-sect { width: 100%; margin-top: 14px; }

.md { font: 400 15.5px/1.65 var(--font); color: #e5e5ea; word-wrap: break-word; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3 { margin: 1.5em 0 .5em; color: var(--text); letter-spacing: -.01em; line-height: 1.25; }
.md h1 { font-size: 26px; font-weight: 700; }
.md h2 { font-size: 21px; font-weight: 700; }
.md h3 { font-size: 17px; font-weight: 600; }
.md p { margin: 0 0 .9em; }
.md ul, .md ol { margin: 0 0 1em; padding-left: 24px; }
.md li { margin: 3px 0; }
.md li.md-task { list-style: none; margin-left: -22px; display: flex; align-items: flex-start; gap: 8px; }
.md li.md-task input { margin-top: 5px; width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; flex: none; }
.md li.md-task.done span { color: var(--text3); text-decoration: line-through; }
.md a { color: var(--acc-text); text-decoration: none; }
.md a:hover { text-decoration: underline; }
.md a.md-wikilink { color: var(--acc-text); border-bottom: 1px dashed currentColor; cursor: pointer; }
.md a.md-wikilink.missing { color: var(--orange); }
.md code { padding: 1px 6px; border-radius: 6px; background: var(--fill); font: 13.5px ui-monospace, "Cascadia Mono", Consolas, monospace; }
.md pre.md-code { margin: 0 0 1em; padding: 14px 16px; border-radius: 12px; background: #0a0e0c; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }
.md pre.md-code code { padding: 0; background: none; font-size: 13.5px; line-height: 1.55; }
.md blockquote { margin: 0 0 1em; padding: 4px 16px; border-left: 3px solid var(--acc); color: var(--text2); }
.md hr { margin: 1.6em 0; border: 0; border-top: 1px solid var(--line2); }
.md img.md-img { display: block; max-width: 100%; margin: 6px 0 14px; border-radius: 12px; cursor: zoom-in; }
.md-table { overflow-x: auto; margin: 0 0 1em; }
.md table { border-collapse: collapse; min-width: 50%; font-size: 14px; }
.md th, .md td { padding: 8px 12px; border: 1px solid var(--line2); text-align: left; vertical-align: top; }
.md th { background: var(--fill2); font-weight: 600; }

.lib-weditor { max-width: 1400px; margin: 0 auto; }
.lib-whead-in { display: flex; align-items: center; gap: 10px; }
.lib-wicon-in { width: 52px; height: 52px; flex: none; border: 0; border-radius: 12px; background: var(--fill2); color: var(--text); font-size: 26px; text-align: center; outline: none; }
.lib-wicon-in:focus, .lib-wfolder-in:focus { box-shadow: inset 0 0 0 1.5px var(--acc); }
.lib-wtitle-in { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 700 30px var(--font); letter-spacing: -.02em; outline: none; }
.lib-wtitle-in::placeholder { color: var(--text3); }
.lib-wfolder-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; color: var(--text3); }
.lib-wfolder-in { width: 260px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--fill2); color: var(--text); font: 400 13px var(--font); outline: none; }
.lib-toolbar { position: sticky; top: -24px; z-index: 2; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px; margin-bottom: 10px; border-radius: 12px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }
.lib-tb { min-width: 32px; height: 30px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.lib-tb:hover { background: var(--fill); color: var(--text); }
.lib-tb.txt { font: 700 13px var(--font); }
.lib-tb.i { font-style: italic; font-family: Georgia, serif; }
.lib-tb.s { text-decoration: line-through; }
.lib-tbsep { width: 1px; height: 20px; margin: 0 4px; background: var(--line2); }
.lib-wsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.lib-wta { display: block; width: 100%; min-height: calc(100vh - 330px); padding: 16px 18px; border: 0; border-radius: 14px; background: #0a0e0c; color: var(--text); font: 400 14.5px/1.65 ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; outline: none; box-shadow: inset 0 0 0 1px var(--line); tab-size: 2; }
.lib-wta:focus { box-shadow: inset 0 0 0 1.5px var(--acc); }
.lib-wprev { min-height: calc(100vh - 330px); max-height: calc(100vh - 330px); overflow-y: auto; padding: 16px 22px; border-radius: 14px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }

.lib-whist { max-width: 1100px; margin: 0 auto; }
.lib-hwrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.lib-hlist { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 14px; background: var(--win); box-shadow: 0 0 0 1px var(--line); max-height: calc(100vh - 200px); overflow-y: auto; }
.lib-hitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.lib-hitem:hover { background: var(--fill2); }
.lib-hitem.on { background: var(--acc-soft); }
.lib-hitem b { display: block; font: 600 13px var(--font); }
.lib-hitem small { color: var(--text3); font-size: 12px; }
.lib-hview { padding: 20px 26px; border-radius: 14px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }

/* ---------- links ---------- */
.lib-ladd { margin-bottom: 16px; }
.lib-ladd-in { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }
.lib-ladd-in > .lib-ic { color: var(--acc-text); }
.lib-lurl, .lib-ltags { height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); font: 400 14px var(--font); outline: none; }
.lib-lurl { flex: 2; min-width: 0; }
.lib-ltags { flex: 1; min-width: 0; }
.lib-lurl:focus, .lib-ltags:focus { box-shadow: inset 0 0 0 1.5px var(--acc); }
.lib-ladd > small { display: block; margin: 8px 4px 0; }
.lib-lbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.lib-lbar .lib-wsearchw { width: 260px; }
.lib-lfilters { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-ftag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--fill2); color: var(--text2); font: 500 12.5px var(--font); cursor: pointer; }
.lib-ftag[style] { color: hsl(var(--h) 80% 72%); background: hsla(var(--h), 80%, 60%, .12); }
.lib-ftag:hover { filter: brightness(1.15); }
.lib-ftag.on { background: var(--acc); color: #fff; }
.lib-lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.lib-lcard { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--win); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s; }
.lib-lcard:hover { box-shadow: 0 0 0 1px var(--line2), 0 10px 30px rgba(0,0,0,.25); }
.lib-lcard.pinned { box-shadow: 0 0 0 1.5px rgba(255,214,10,.45); }
.lib-lthumb { display: block; aspect-ratio: 1.91; background: var(--win3); overflow: hidden; }
.lib-lthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-lthumb.noimg { display: grid; place-items: center; background: linear-gradient(135deg, #2c2c34, #1d1d22); color: rgba(255,255,255,.25); font: 800 46px var(--font); text-decoration: none; }
.lib-lbody { flex: 1; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 5px; }
.lib-lsite { display: flex; align-items: center; gap: 6px; color: var(--text3); font: 500 12px var(--font); }
.lib-fav { width: 14px; height: 14px; border-radius: 3px; }
.lib-lpin { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--yellow); }
.lib-ltitle { color: var(--text); font: 600 15px/1.35 var(--font); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.lib-ltitle:hover { color: var(--acc-text); }
.lib-ldesc { margin: 0; color: var(--text2); font: 400 13px/1.45 var(--font); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-ltagrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.lib-ltag { height: 22px; padding: 0 8px; border: 0; border-radius: 11px; color: hsl(var(--h) 80% 72%); background: hsla(var(--h), 80%, 60%, .12); font: 600 11.5px var(--font); cursor: pointer; }
.lib-lfoot { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); }
.lib-lfoot small { color: var(--text3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-lbtn { min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--text3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: 600 12px var(--font); }
.lib-lbtn:hover { background: var(--fill2); color: var(--text); }
.lib-lbtn.on { color: var(--acc-text); }
.lib-lbtn.danger:hover { color: var(--red); background: rgba(255,69,58,.12); }
.lib-lcomments { padding: 10px 14px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,.12); }
.lib-lc { display: flex; gap: 8px; }
.lib-lc > div { flex: 1; min-width: 0; }
.lib-lch { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.lib-lch small { color: var(--text3); }
.lib-lct { font: 400 13px/1.45 var(--font); word-wrap: break-word; }
.lib-cdel { margin-left: auto; width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent; color: var(--text3); cursor: pointer; display: grid; place-items: center; }
.lib-cdel:hover { color: var(--red); }
.lib-cin { width: 100%; height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill2); color: var(--text); font: 400 13px var(--font); outline: none; }
.lib-cin:focus { box-shadow: inset 0 0 0 1.5px var(--acc); }

/* ---------- relatório ---------- */
.lib-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.lib-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--win); box-shadow: 0 0 0 1px var(--line); }
.lib-tile-i { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.lib-tile b { font: 700 22px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.lib-tile small { color: var(--text2); font-size: 12.5px; }
.lib-hls { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.lib-hl { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(232,184,74,.12), rgba(232,184,74,0) 60%), var(--win); box-shadow: 0 0 0 1px var(--line); }
.lib-hl-i { position: absolute; right: 14px; top: 14px; color: var(--gold); }
.lib-hl > small { color: var(--text2); font: 500 12.5px var(--font); }
.lib-hl-who { display: flex; align-items: center; gap: 8px; }
.lib-hl-who b { font: 700 16px var(--font); }
.lib-hl-v { color: var(--text); font: 600 13px var(--font); }
.lib-rtable-w { overflow-x: auto; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); background: var(--win); }
.lib-rtable { width: 100%; border-collapse: collapse; font: 400 13.5px var(--font); }
.lib-rtable th { padding: 10px 14px; text-align: left; color: var(--text2); font: 600 12px var(--font); border-bottom: 1px solid var(--line); white-space: nowrap; }
.lib-rtable td { padding: 9px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lib-rtable tr:last-child td { border-bottom: 0; }
.lib-rtable td.zero { color: var(--text3); }
.lib-rwho { display: inline-flex; align-items: center; gap: 8px; }
.lib-rcols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lib-rlist { display: flex; flex-direction: column; gap: 4px; }
.lib-ritem { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--win); box-shadow: 0 0 0 1px var(--line); font-size: 13.5px; }
.lib-ritem .lib-ic { color: var(--green); }
.lib-ritem.block .lib-ic { color: var(--red); }
.lib-ritem-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lib-ritem small { color: var(--text3); white-space: nowrap; font-size: 12px; }

@media (max-width: 1250px) {
  .lib-dwrap { grid-template-columns: 1fr; }
  .lib-tiles { grid-template-columns: repeat(2, 1fr); }
  .lib-tpls { grid-template-columns: repeat(2, 1fr); }
  .lib-wsplit { grid-template-columns: 1fr; }
}

/* ---------- Diagnóstico de voz ---------- */
.vdiag { display: flex; flex-direction: column; gap: 8px; }
.vdiag .section-title { margin-top: 6px; }
.vdiag-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); }
.vdiag-row b { display: block; font-size: 14px; }
.vdiag-row small { display: block; margin-top: 2px; color: var(--muted, #9aa0aa); font-size: 12.5px; line-height: 1.4; }
.vdiag-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #8e8e93; }
.vdiag-row.ok .vdiag-dot { background: #30d158; box-shadow: 0 0 0 3px rgba(48,209,88,.18); }
.vdiag-row.warn .vdiag-dot { background: #ffd60a; box-shadow: 0 0 0 3px rgba(255,214,10,.18); }
.vdiag-row.bad .vdiag-dot { background: #ff453a; box-shadow: 0 0 0 3px rgba(255,69,58,.18); }
.vdiag-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
