/* wiki: sistema visual */
:root {
  --acc: #b4d82e; --on-acc: #0b0f00; --acc-ink: #b4d82e; --dot: #b4d82e; --focus: #b4d82e;
  --t1: #f6f7f2; --t2: #a9ab9f; --t3: #8b8d82; --ink-inv: #000;
  --bg: #000; --s0: #0b0c0a; --s1: #121310; --s2: #1b1c18; --s3: #2a2c25; --pop: #2a2c25;
  --line: rgba(255, 255, 255, 0.08); --line2: rgba(255, 255, 255, 0.14);
  --hover: rgba(255, 255, 255, 0.04); --track: rgba(255, 255, 255, 0.2);
  --red: #ff5a4f;
  --fd: Poppins, 'Avenir Next', 'Helvetica Neue', sans-serif;
  --fb: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', sans-serif;
  --glass: rgba(24, 25, 21, 0.72); --glass-edge: rgba(255, 255, 255, 0.1); --glass-hi: rgba(255, 255, 255, 0.08);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55); --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.6); --scrim: rgba(0, 0, 0, 0.6);
  --seg-bg: var(--s1); --seg-on: var(--s3); --seg-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --cover-bg: linear-gradient(155deg, #3a3c33 0%, #1c1d18 60%, #0d0e0b 100%);
  --np-top: #23251d;
  --glow: radial-gradient(150% 46% at 50% 118%, rgba(180, 216, 46, 0.3) 0%, rgba(180, 216, 46, 0.09) 45%, rgba(180, 216, 46, 0) 80%);
  --glow-panel: radial-gradient(100% 46% at 50% 120%, rgba(180, 216, 46, 0.22) 0%, rgba(180, 216, 46, 0.07) 45%, rgba(180, 216, 46, 0) 80%);
  --hero: radial-gradient(170% 80% at 50% 122%, #b9d94a 0%, #a3c62c 18%, rgba(120, 150, 25, 0.85) 38%, rgba(70, 92, 10, 0.55) 58%, rgba(25, 34, 3, 0.25) 78%, rgba(0, 0, 0, 0) 94%), #000;
  --hero-sub: #e3e5da;
  --paper-shadow: 0 16px 48px rgba(0, 0, 0, 0.5); --bar-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
/* versão clara: mesma identidade, fundo branco com o brilho limão vindo de baixo */
:root[data-theme='light'] {
  --acc-ink: #4f6b00; --dot: #a8cd1d; --focus: #8fb31a;
  --t1: #14150f; --t2: #5f6157; --t3: #8b8d82; --ink-inv: #fff;
  --bg: #f3f4ef; --s0: #fafaf7; --s1: #ffffff; --s2: #eff0ea; --s3: #e3e5dc; --pop: #ffffff;
  --line: rgba(24, 27, 10, 0.08); --line2: rgba(24, 27, 10, 0.14);
  --hover: rgba(24, 27, 10, 0.04); --track: rgba(24, 27, 10, 0.14);
  --red: #d33a2c;
  --glass: rgba(255, 255, 255, 0.78); --glass-edge: rgba(24, 27, 10, 0.08); --glass-hi: rgba(255, 255, 255, 0.9);
  --shadow: 0 14px 36px rgba(40, 46, 10, 0.14); --shadow-sm: 0 10px 28px rgba(40, 46, 10, 0.16); --scrim: rgba(30, 33, 20, 0.32);
  --seg-bg: #e9eae3; --seg-on: #ffffff; --seg-shadow: 0 1px 3px rgba(24, 27, 10, 0.14), 0 0 0 0.5px rgba(24, 27, 10, 0.06);
  --cover-bg: linear-gradient(155deg, #f4f5ef 0%, #e6e8de 60%, #d9dccf 100%);
  --np-top: #eef3da;
  --glow: radial-gradient(150% 46% at 50% 118%, rgba(180, 216, 46, 0.42) 0%, rgba(180, 216, 46, 0.12) 45%, rgba(180, 216, 46, 0) 80%);
  --glow-panel: radial-gradient(100% 46% at 50% 120%, rgba(180, 216, 46, 0.3) 0%, rgba(180, 216, 46, 0.08) 45%, rgba(180, 216, 46, 0) 80%);
  --hero: radial-gradient(170% 80% at 50% 122%, #c4e04f 0%, #b4d82e 18%, rgba(180, 216, 46, 0.72) 38%, rgba(200, 226, 100, 0.4) 58%, rgba(225, 238, 170, 0.2) 78%, rgba(255, 255, 255, 0) 94%), #f7f8f3;
  --hero-sub: #3b3d33;
  --paper-shadow: 0 1px 3px rgba(24, 27, 10, 0.1), 0 12px 32px rgba(40, 46, 10, 0.1); --bar-shadow: 0 2px 10px rgba(40, 46, 10, 0.08);
  color-scheme: light;
}
@media (min-width: 900px) { :root[data-theme='light'] { --bg: #e6e7e0; } }
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--t1); font-family: var(--fb); font-size: 15px; line-height: 1.4;
  background: var(--glow) fixed, var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; padding: 0; background: none; }
button:active, a.btn:active, .tile:active { transform: scale(0.97); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--t3); }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }

/* ---- estrutura ---- */
.strip { display: none; }
.panel { padding: max(14px, env(safe-area-inset-top)) 20px 190px; display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }
.omni { display: none; }
.topbar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar h1 { font-size: 24px; font-weight: 400; display: flex; min-width: 0; }
.topbar .acts { display: flex; align-items: center; margin-right: -6px; }
.view { display: flex; flex-direction: column; gap: 16px; }
.lockup { display: inline-flex; align-items: baseline; gap: 0.3em; line-height: 1; }
.lockup svg { width: 2.963em; height: 0.874em; flex-shrink: 0; }
.lockup span { font-family: var(--fd); font-weight: 300; letter-spacing: -0.01em; color: var(--t2); }
.title { font-family: var(--fd); font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }

.bottomnav {
  position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); height: 64px; z-index: 30; max-width: 480px; margin: 0 auto;
  padding: 0 6px; border-radius: 32px; display: flex; align-items: center;
  background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
.bottomnav a { flex: 1 1 0; min-width: 0; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--t2); position: relative; }
.bottomnav a::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.bottomnav a.on { color: var(--t1); font-weight: 600; }
.bottomnav a.on::before { background: var(--dot); }
.badge { position: absolute; top: 6px; left: 50%; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--acc); color: var(--on-acc); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.app.bare .bottomnav, .app.bare .strip, .app.bare .omni, .app.bare .topbar { display: none; }
.app.bare .panel { padding-bottom: 32px; }
.app.focus .bottomnav { display: none; }

/* ---- computador ---- */
@media (min-width: 900px) {
  .app:not(.bare) { padding: 10px; display: flex; flex-direction: column; min-height: 100dvh; }
  .strip { display: flex; align-items: flex-end; gap: 2px; padding: 0 8px; }
  .strip .brand { height: 44px; padding: 0 18px 0 8px; display: flex; align-items: center; }
  .strip .brand svg { width: 78px; height: 23px; }
  .strip nav { display: flex; align-items: flex-end; gap: 2px; }
  .strip nav a { height: 44px; padding: 0 16px; border-radius: 14px 14px 0 0; display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--t2); white-space: nowrap; position: relative; }
  .strip nav a:hover { color: var(--t1); }
  .strip nav a.on { background: var(--s0); color: var(--t1); font-weight: 600; }
  .strip nav a.on::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
  .strip nav .badge { position: static; margin: 0; }
  .strip .grow { flex-grow: 1; }
  .app:not(.bare) .panel {
    flex-grow: 1; width: 100%; max-width: none; margin: 0; padding: 20px 32px 110px; gap: 24px; border-radius: 18px;
    background: var(--glow-panel), var(--s0);
  }
  .omni { align-self: center; width: 100%; max-width: 720px; height: 48px; padding: 0 18px; border-radius: 24px; background: var(--s1); border: 1px solid var(--line2); display: flex; align-items: center; gap: 12px; }
  .omni input { flex-grow: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 15px; }
  .topbar h1 { font-size: 30px; }
  .topbar .only-mobile, .bottomnav { display: none; }
  .view { gap: 24px; }
  .narrow { width: 100%; max-width: 760px; align-self: center; }
  .fab { position: static !important; width: auto !important; height: 44px !important; padding: 0 18px; margin-right: 8px; border-radius: 22px !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35) !important; }
  .topbar .acts { margin-right: 0; }
  .fab span { display: inline !important; }
  .player { left: 50% !important; right: auto !important; bottom: 24px !important; width: 520px; transform: translateX(-50%); }
  .convo-composer { left: 50% !important; right: auto !important; width: min(760px, calc(100% - 84px)); transform: translateX(-50%); bottom: 34px !important; }
}

/* ---- componentes ---- */
.dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--dot); display: inline-block; }
.dot.off { background: transparent; }
.muted { color: var(--t2); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 12px; } .col { display: flex; flex-direction: column; } .grow { flex-grow: 1; min-width: 0; }
.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .gap8 { gap: 8px; } .gap4 { gap: 4px; } .gap16 { gap: 16px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2 { font-family: var(--fd); font-size: 18px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; margin-top: 4px; }
.label { font-size: 13px; font-weight: 600; color: var(--t2); padding-left: 4px; }
.card { border-radius: 24px; background: var(--s1); border: 1px solid var(--line); }
.pad { padding: 16px; }
.iconbtn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--t1); }
.iconbtn.line { box-shadow: inset 0 0 0 1px var(--line2); }
.iconbtn.soft { background: var(--s2); }
.iconbtn.acc { background: var(--acc); color: var(--on-acc); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.iconbtn.dim { color: var(--t2); } .iconbtn.t3 { color: var(--t3); } .iconbtn.red { color: var(--red); }
.iconbtn:disabled, .btn:disabled { opacity: 0.5; cursor: default; }
.avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; } .avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.btn { height: 44px; padding: 0 18px; border-radius: 22px; font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.acc { background: var(--acc); color: var(--on-acc); font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.soft { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); }
.btn.line { box-shadow: inset 0 0 0 1px var(--line2); }
.btn.white { background: var(--t1); color: var(--ink-inv); font-weight: 700; }
.btn.black { background: var(--ink-inv); color: var(--t1); box-shadow: inset 0 0 0 1px var(--line); }
.btn.big { height: 54px; border-radius: 27px; font-size: 16px; width: 100%; }
.btn.red { color: var(--red); }
.seg { height: 48px; padding: 3px; border-radius: 24px; background: var(--seg-bg); border: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
.seg > * { display: flex; align-items: center; justify-content: center; border-radius: 21px; font-size: 14px; font-weight: 500; color: var(--t2); white-space: nowrap; }
.seg > .on { background: var(--seg-on); color: var(--t1); font-weight: 600; box-shadow: var(--seg-shadow); }
@media (min-width: 900px) { .seg { width: 100%; max-width: 400px; } }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gridfit { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 10px; }
@media (min-width: 900px) { .grid2.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { min-height: 88px; padding: 12px 14px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 8px; text-align: left; }
.tile b { font-size: 14px; font-weight: 600; display: block; } .tile small { font-size: 12px; color: var(--t2); }
.list { border-radius: 24px; background: var(--s1); border: 1px solid var(--line); padding: 0 16px; display: flex; flex-direction: column; }
.list > * { min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%; }
.list > *:last-child { border-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.input { height: 54px; padding: 0 16px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line2); outline: 0; font-size: 16px; width: 100%; }
textarea.input { height: auto; padding: 14px 16px; resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--focus); }
select.pill { height: 44px; padding: 0 12px 0 14px; border-radius: 22px; background: var(--s2); border: 0; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; outline: 0; }
.composer { padding: 14px 10px 10px 16px; border-radius: 24px; background: var(--s1); border: 1px solid var(--line2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; gap: 6px; }
.composer textarea { width: 100%; resize: none; border: 0; outline: 0; padding: 0; background: transparent; font-size: 16px; line-height: 22px; min-height: 44px; max-height: 180px; }
.composer .tools { display: flex; align-items: center; gap: 6px; margin-left: -6px; flex-wrap: wrap; }
.fab { position: fixed; right: 20px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 80px); z-index: 25; width: 56px; height: 56px; border-radius: 28px; background: var(--acc); color: var(--on-acc); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--shadow-sm); }
.fab span { display: none; }
body.playing .fab { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 148px); }
body.playing .toast { bottom: 178px; }
.fab.top { position: static; width: 40px; height: 40px; margin-right: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.fab.top svg { width: 19px; height: 19px; }
body.watching .player { display: none; }
.notice { padding: 14px 16px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line2); font-size: 14px; color: var(--t2); display: flex; gap: 10px; align-items: flex-start; }
.notice .dot { margin-top: 6px; background: var(--t3); }
.empty { padding: 36px 16px; text-align: center; color: var(--t2); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 60; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 18px; background: var(--pop); border: 1px solid var(--line2); font-size: 14px; box-shadow: var(--shadow-sm); }
.toast.err { border-color: var(--red); }
.modal { position: fixed; inset: 0; z-index: 50; background: var(--scrim); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 620px; max-height: 92dvh; overflow: auto; padding: 20px; border-radius: 28px 28px 0 0; background: var(--s1); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 28px; } }
.art { background: var(--cover-bg); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--acc); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; } .bar > i { display: block; height: 100%; border-radius: 3px; background: var(--acc); }

/* ---- entrada ---- */
.hero { min-height: 100dvh; padding: 56px 24px 32px; display: flex; flex-direction: column; max-width: 460px; margin: 0 auto; position: relative; isolation: isolate; }
.hero-bg { position: fixed; inset: 0; z-index: -1; background: var(--hero); }
.auth { min-height: 100dvh; padding: 56px 24px 32px; display: flex; flex-direction: column; gap: 22px; max-width: 460px; margin: 0 auto; }
.auth h1 { font-family: var(--fd); font-size: 30px; line-height: 1.15; font-weight: 400; letter-spacing: -0.02em; }

/* ---- chat ---- */
.greet { font-family: var(--fd); font-size: 30px; line-height: 1.15; font-weight: 400; letter-spacing: -0.02em; margin-top: 10px; }
@media (min-width: 900px) { .greet { font-size: 44px; font-weight: 300; letter-spacing: -0.03em; text-align: center; margin: 5vh 0 8px; } }
.msgs { display: flex; flex-direction: column; gap: 18px; padding-bottom: 120px; }
.msg-user { align-self: flex-end; max-width: 82%; padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: var(--s2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg-ai { display: flex; flex-direction: column; gap: 10px; }
.msg-ai .who svg { width: 47px; height: 14px; }
.md { line-height: 1.55; overflow-wrap: anywhere; } .md p { margin: 0 0 10px; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; } .md li { margin-bottom: 6px; }
.md h3 { font-family: var(--fd); font-size: 17px; font-weight: 500; margin: 14px 0 6px; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--s2); padding: 2px 5px; border-radius: 6px; }
.md pre { margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--s2); overflow-x: auto; } .md pre code { background: none; padding: 0; }
.convo-composer { position: fixed; left: 12px; right: 12px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 20; min-height: 56px; padding: 6px; border-radius: 28px; display: flex; align-items: flex-end; gap: 2px; background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.convo-composer textarea { flex-grow: 1; min-width: 0; min-height: 44px; max-height: 160px; padding: 11px 6px; resize: none; border: 0; outline: 0; background: transparent; font-size: 16px; line-height: 22px; }

/* ---- mídia, social, arquivos ---- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 46%), 1fr)); gap: 10px; }
.thumb { position: relative; border-radius: 20px; overflow: hidden; background: var(--s1); border: 1px solid var(--line); display: block; width: 100%; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post img, .post video { display: block; width: 100%; max-height: 480px; object-fit: cover; border-radius: 16px; background: var(--s2); }
.player { position: fixed; left: 16px; right: 16px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 76px); z-index: 28; height: 60px; padding: 0 4px 0 10px; border-radius: 20px; display: flex; align-items: center; gap: 2px; overflow: hidden; background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.player .prog { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--track); } .player .prog i { display: block; height: 100%; background: var(--acc); width: 0; }
.only-wide { display: none; }
@media (min-width: 900px) { .only-wide { display: inline-flex; } }
.cover { flex-shrink: 0; overflow: hidden; background: var(--cover-bg); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--t2); }
.cover.fill { width: 100%; aspect-ratio: 1; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips::-webkit-scrollbar, .shelf::-webkit-scrollbar { display: none; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; flex-shrink: 0; display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--t2); background: var(--s1); border: 1px solid var(--line); white-space: nowrap; }
.chip.on { background: var(--t1); color: var(--ink-inv); border-color: transparent; }
.input.search { height: 48px; border-radius: 24px; padding: 0 18px; font-size: 15px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; scroll-snap-type: x proximity; }
.shelf-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; scroll-snap-align: start; }
.shelf-card .cover { margin-bottom: 6px; transition: transform 0.2s ease; }
.shelf-card:hover .cover { transform: translateY(-2px); }
.feature { padding: 14px; border-radius: 24px; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center; background: linear-gradient(120deg, rgba(180, 216, 46, 0.16), rgba(180, 216, 46, 0.02) 60%), var(--s1); border: 1px solid var(--line2); }
.media-head { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; }
.media-title { font-family: var(--fd); font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tracks { display: flex; flex-direction: column; }
.track { min-height: 60px; padding: 4px 0 4px 8px; margin: 0 -8px; border-radius: 14px; display: flex; align-items: center; gap: 2px; }
.track:hover { background: var(--hover); }
.track .name { font-size: 14.5px; font-weight: 600; }
.track.on .name { color: var(--acc-ink); }
.track .num { width: 28px; flex-shrink: 0; text-align: center; font-size: 13px; color: var(--t2); display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.track.on .num { color: var(--acc-ink); }
.track .dur { padding: 0 6px; font-variant-numeric: tabular-nums; }
.cover-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.cover-on { position: absolute; inset: 0; border-radius: 10px; background: rgba(0, 0, 0, 0.55); color: var(--acc); display: flex; align-items: center; justify-content: center; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; flex-shrink: 0; border-radius: 15px; background: var(--s3); position: relative; cursor: pointer; transition: background 0.18s ease; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 0.18s ease; }
.switch:checked { background: var(--acc); } .switch:checked::after { transform: translateX(20px); }
.upload { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 61; width: min(92vw, 420px); padding: 14px 16px; border-radius: 18px; background: var(--pop); border: 1px solid var(--line2); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.upload .bar { background: var(--track); } .upload .bar > i { transition: width 0.15s linear; }
body.playing .upload { bottom: 178px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; --fill: 0%; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--t1) var(--fill), var(--track) var(--fill)); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--track); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--t1); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.np { z-index: 55; }
.np .sheet > * { flex-shrink: 0; }
.np .sheet { max-width: 460px; gap: 18px; background: linear-gradient(180deg, var(--np-top) 0%, var(--s1) 46%); }
.np-cover { width: 100%; max-width: 320px; aspect-ratio: 1; flex-shrink: 0; align-self: center; border-radius: 24px; overflow: hidden; background: var(--cover-bg); display: flex; align-items: center; justify-content: center; color: var(--t3); box-shadow: var(--shadow); }
.np-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-title { font-family: var(--fd); font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.np-main { width: 64px !important; height: 64px !important; border-radius: 32px !important; }
.iconbtn.lit { color: var(--acc-ink); position: relative; }
.iconbtn.lit::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--acc-ink); }
.iconbtn[data-one='1']::before { content: '1'; position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 700; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 22px 18px; }
.vcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vcard.compact { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px; align-items: start; }
.poster { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--cover-bg); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: center; color: var(--t3); }
.vcard.compact .poster { border-radius: 12px; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.vcard:hover .poster img { transform: scale(1.03); }
.poster .time { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 7px; background: rgba(0, 0, 0, 0.78); color: #fff; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vtitle { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vcard.compact .vtitle { font-size: 14px; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.watch-title { font-family: var(--fd); font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.desc { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--t2); }
.desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) {
  .chips, .shelf { margin: 0; padding-left: 0; padding-right: 0; }
  .shelf { grid-auto-columns: 172px; gap: 18px; }
  .feature { grid-template-columns: 148px minmax(0, 1fr); padding: 18px; gap: 22px; }
  .feature .media-title, .media-title { font-size: 34px; }
  .media-head { grid-template-columns: 200px minmax(0, 1fr); gap: 26px; }
  .watch-title { font-size: 24px; }
  .upload { bottom: 100px; }
}
@media (min-width: 1100px) { .watch { grid-template-columns: minmax(0, 1fr) 360px; } }
.video-el { width: 100%; aspect-ratio: 16 / 9; max-height: 72dvh; border-radius: 20px; background: #000; display: block; }
.mailrow { align-items: flex-start !important; } .mailrow .dot { margin-top: 7px; }
.tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--t2); white-space: nowrap; }
.game { align-self: center; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.memo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.memo button { aspect-ratio: 1; border-radius: 16px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--fd); font-size: 26px; font-weight: 500; }
.memo button.open { background: var(--s3); } .memo button.done { background: var(--acc); color: var(--on-acc); }
canvas.snake { width: 100%; aspect-ratio: 1; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); touch-action: none; }
.pad4 { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 56px); gap: 6px; justify-content: center; }

/* ---- wiki docs ---- */
.doc { align-self: center; width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 12px; }
.doc-title { width: 100%; border: 0; outline: 0; background: transparent; font-family: var(--fd); font-size: 26px; font-weight: 500; letter-spacing: -0.01em; padding: 4px; border-radius: 10px; }
.doc-title:focus { background: var(--s1); }
.doc-bar { position: sticky; top: 8px; z-index: 15; padding: 6px 8px; border-radius: 22px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; background: var(--glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border: 1px solid var(--glass-edge); box-shadow: var(--bar-shadow); }
.doc-tool { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--t1); }
.doc-tool:hover { background: var(--s2); } .doc-tool.on { background: var(--s3); box-shadow: inset 0 0 0 1px var(--line2); }
.doc-select { height: 36px; padding: 0 8px; border-radius: 10px; border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 600; }
.doc-select:hover { background: var(--s2); }
.doc-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line2); }
.doc-page { min-height: 70dvh; padding: 56px 64px; border-radius: 6px; background: #ffffff; color: #1f1f1f; font-size: 16px; line-height: 1.6; outline: 0; box-shadow: var(--paper-shadow); overflow-wrap: anywhere; caret-color: #000; }
.doc-page :is(h1, h2, h3) { font-family: var(--fd); font-weight: 500; line-height: 1.25; margin: 0.9em 0 0.4em; letter-spacing: -0.01em; }
.doc-page h1 { font-size: 30px; } .doc-page h2 { font-size: 23px; } .doc-page h3 { font-size: 18px; }
.doc-page p, .doc-page div { margin: 0 0 0.7em; } .doc-page ul, .doc-page ol { margin: 0 0 0.7em; padding-left: 26px; }
.doc-page a { color: #4d6b00; text-decoration: underline; } .doc-page blockquote { margin: 0 0 0.7em; padding-left: 16px; border-left: 3px solid #c9cdb8; color: #4a4a4a; }
.doc-page ::selection { background: rgba(180, 216, 46, 0.45); }
@media (max-width: 700px) { .doc-page { padding: 28px 22px; } }
@media print {
  body { background: #fff !important; } body * { visibility: hidden; }
  .doc-page, .doc-page * { visibility: visible; } .doc-page { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 0; min-height: 0; }
}
/* ---- regras de conteúdo ---- */
.rule-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.dot.warn { background: var(--red); }
/* ---- botão de versão clara e escura ---- */
.theme-float { display: none; }
.app.bare .theme-float { display: flex; position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 40; }
.theme-btn svg { transition: transform 0.35s ease; }
.theme-btn:hover svg { transform: rotate(-18deg); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.32s; }
/* ---- transições e acessibilidade ---- */
.view { animation: rise 0.22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* ---- wikid studio ---- */
.studio-meta { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.studio-meta .dot { background: var(--dot); }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 46%), 1fr)); gap: 10px; align-items: start; }
.studio-tile { position: relative; display: block; width: 100%; border-radius: 20px; overflow: hidden; background: var(--s1); border: 1px solid var(--line); }
.studio-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.studio-tile:hover img { transform: scale(1.03); }
.studio-tile.wait { display: flex; align-items: center; justify-content: center; padding: 16px; color: var(--t2); min-height: 160px; }
.studio-tag { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.studio-tag:empty { display: none; }
.shimmer { background: linear-gradient(110deg, var(--s1) 30%, var(--s2) 50%, var(--s1) 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.studio-full { width: 100%; max-height: 70dvh; object-fit: contain; border-radius: 16px; background: var(--s2); }
.studio-sources { grid-auto-columns: 96px; }
.studio-src { width: 96px; height: 96px; border-radius: 18px; overflow: hidden; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--t2); scroll-snap-align: start; }
.studio-src img { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-src.on { box-shadow: 0 0 0 3px var(--acc); border-color: transparent; }
.studio-src.add { border-style: dashed; border-color: var(--line2); }
.studio-mini { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.presets .chip { cursor: pointer; }
@media (min-width: 700px) { .presets { flex-wrap: wrap; overflow: visible; } }
.studio-engines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.studio-engine { padding: 12px 14px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; text-align: left; color: var(--t2); }
.studio-engine b { font-size: 15px; color: var(--t1); }
.studio-engine.on { border-color: transparent; box-shadow: 0 0 0 2px var(--acc); background: var(--s2); }
.studio-src.none { border-style: dashed; }
.studio-src.none.on { border-style: solid; }
.studio-mini.none { display: inline-flex; align-items: center; justify-content: center; background: var(--s2); color: var(--t2); }
