:root {
  --bg: #080708;
  --bg-2: #0d0a0b;
  --panel: #131012;
  --panel-2: #1a1417;
  --panel-3: #21181c;
  --stroke: #302228;
  --stroke-2: #4b2b35;
  --text: #f6f1f3;
  --muted: #a8979e;
  --muted-2: #75676c;
  --accent: #c72a4b;
  --accent-2: #ef4767;
  --accent-soft: rgba(199, 42, 75, .15);
  --green: #45cc8a;
  --warn: #e3b65c;
  --danger: #f05a68;
  --radius: 10px;
  --radius-lg: 14px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at 70% -20%, #241015 0, transparent 35%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted-2); }

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr) 352px;
  gap: 1px;
  background: #24191d;
  transition: filter .18s ease, transform .12s ease;
}
.app-shell.shake { animation: screenShake .26s ease; }
@keyframes screenShake {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(-2px,1px); }
  50% { transform: translate(2px,-1px); }
  75% { transform: translate(-1px,-1px); }
}

.sidebar, .master-panel { background: linear-gradient(180deg, #100b0d 0%, #0c090a 100%); min-height: 0; }
.sidebar { padding: 16px 12px 12px; display: flex; flex-direction: column; }
.brand-row { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.brand-mark { width: 38px; height: 38px; border: 1px solid var(--stroke-2); background: linear-gradient(135deg, #2b1118, #120b0e); border-radius: 9px; display: grid; place-items: center; color: var(--accent-2); font-weight: 900; letter-spacing: -1px; }
.brand-name { font-size: 15px; letter-spacing: .18em; font-weight: 800; }
.brand-sub { font-size: 10px; color: var(--accent-2); letter-spacing: .32em; margin-top: 1px; }

.side-section { border-top: 1px solid #21161a; padding: 14px 4px 0; margin-top: 2px; }
.section-title-row { height: 22px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; letter-spacing: .13em; font-weight: 800; padding: 0 6px; }
.campaign { width: 100%; border: 1px solid transparent; background: transparent; text-align: left; padding: 8px 7px; border-radius: 8px; display: grid; grid-template-columns: 35px 1fr; gap: 9px; align-items: center; cursor: pointer; margin-bottom: 2px; }
.campaign:hover { background: #171113; }
.campaign.active { background: linear-gradient(90deg, var(--accent-soft), rgba(199,42,75,.02)); border-color: #3a2029; }
.campaign-glyph { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 7px; background: #24191d; color: #e8cdd5; font-size: 10px; font-weight: 900; }
.campaign.active .campaign-glyph { background: var(--accent); color: white; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.campaign strong { display: block; font-size: 12px; line-height: 1.2; }
.campaign small { display: block; color: var(--muted-2); font-size: 9px; margin-top: 3px; }
.channel { width: 100%; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; padding: 0 9px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.channel:hover, .channel.active { background: #181113; color: var(--text); }
.channel.active { box-shadow: inset 2px 0 0 var(--accent); }
.channel i { margin-left: auto; font-style: normal; font-size: 9px; color: var(--green); background: rgba(69,204,138,.1); border: 1px solid rgba(69,204,138,.18); border-radius: 999px; padding: 2px 6px; }
.participants-section { flex: 1; min-height: 120px; overflow: hidden; display: flex; flex-direction: column; }
.participants-list { overflow: auto; padding: 3px 1px; scrollbar-width: thin; scrollbar-color: #332329 transparent; }
.participant { display: flex; align-items: center; gap: 8px; padding: 7px 7px; border-radius: 7px; }
.participant:hover { background: #151012; }
.participant-avatar { width: 25px; height: 25px; border-radius: 7px; background: #24191d; display: grid; place-items: center; font-size: 9px; font-weight: 900; position: relative; }
.participant-avatar::after { content:""; width: 7px; height: 7px; position: absolute; right: -2px; bottom: -2px; border-radius: 50%; background: var(--green); border: 2px solid #0f0b0d; }
.participant-copy { min-width: 0; flex: 1; }
.participant-copy strong { display:block; font-size: 11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.participant-copy small { color: var(--muted-2); font-size: 8px; }
.role-tag { color: var(--accent-2); font-size: 8px; letter-spacing: .08em; font-weight: 800; }
.invite-btn { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 8px 7px; cursor: pointer; font-size: 10px; }
.invite-btn:hover { color: var(--text); }

.profile-card { border: 1px solid #322028; background: #171012; border-radius: 10px; padding: 10px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; gap: 8px 9px; box-shadow: 0 -8px 30px rgba(0,0,0,.15); }
.avatar { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #76182c); display: grid; place-items: center; font-weight: 900; font-size: 11px; }
.profile-copy { align-self: center; min-width: 0; }
.profile-copy strong { display:block; font-size: 12px; white-space: nowrap; overflow:hidden; text-overflow:ellipsis; }
.profile-copy small { display:block; color: var(--muted); font-size:9px; margin-top:2px; }
.profile-actions { grid-column: 1 / -1; display:grid; grid-template-columns: repeat(4, 1fr); gap:5px; }
.icon-btn { border: 1px solid transparent; background: #21171b; color: #cdbfc4; height: 31px; min-width: 31px; border-radius: 7px; cursor:pointer; }
.icon-btn:hover { background:#2a1d22; color:white; }
.icon-btn.active { color: var(--danger); background: rgba(240,90,104,.12); border-color: rgba(240,90,104,.22); }
.icon-btn.accent { background: var(--accent); color:white; }
.icon-btn.accent:hover { background: var(--accent-2); }
.icon-btn.tiny { height:22px; min-width:22px; background:transparent; }

.stage-column { background: linear-gradient(180deg, #0a0809, #090708); min-width: 0; padding: 16px; display:grid; grid-template-rows: 58px minmax(0, 1fr) 170px; gap: 12px; }
.topbar { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #20161a; padding:0 2px 12px; }
.eyebrow { color: var(--muted-2); font-size: 8px; letter-spacing: .16em; font-weight: 900; }
h1, h2, h3, p { margin:0; }
.topbar h1 { font-size: 18px; margin-top:3px; letter-spacing:-.02em; }
.topbar-actions { display:flex; gap:8px; align-items:center; }
.live-pill { display:inline-flex; align-items:center; gap:6px; border:1px solid #283128; background:rgba(69,204,138,.06); color:#b7d9c5; border-radius:999px; padding:6px 9px; font-size:9px; }
.live-pill i { width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow:0 0 10px rgba(69,204,138,.6); }
.quiet-btn { height:28px; border:1px solid #2d2025; border-radius:7px; background:#171113; color:var(--muted); padding:0 10px; font-size:9px; cursor:pointer; }
.quiet-btn:hover { color:white; background:#21171b; }

.stream-card { min-height:0; border:1px solid #2e2025; background:#0e0b0c; border-radius:12px; overflow:hidden; display:grid; grid-template-rows: 42px minmax(0,1fr); box-shadow: 0 18px 45px rgba(0,0,0,.16); }
.stream-toolbar { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #251a1e; background:#131012; padding:0 13px; font-size:10px; }
.stream-toolbar > div:first-child { display:flex; align-items:center; gap:7px; }
.stream-dot { width:7px; height:7px; border-radius:50%; background:#4f4347; }
.stream-dot.live { background:var(--accent-2); box-shadow:0 0 10px rgba(239,71,103,.6); }
.stream-meta { color:var(--muted-2); font-size:8px; }
.video-wrap { min-height:0; position:relative; overflow:hidden; background: radial-gradient(circle at 50% 45%, #161114 0, #080708 58%); display:grid; place-items:center; }
#screenVideo { width:100%; height:100%; object-fit:contain; background:black; display:none; }
.stream-empty { width:min(520px, 80%); text-align:center; color:var(--muted); }
.screen-symbol { width:62px; height:48px; margin:0 auto 16px; border:1px solid #4a313a; border-radius:10px; display:grid; place-items:center; color:var(--accent-2); background:#171013; font-size:22px; box-shadow: 0 15px 30px rgba(0,0,0,.2); }
.stream-empty h2 { color:var(--text); font-size:17px; }
.stream-empty p { font-size:10px; max-width:430px; margin:7px auto 13px; line-height:1.55; }
.primary-btn { border:1px solid rgba(255,255,255,.08); background:linear-gradient(180deg, var(--accent-2), var(--accent)); color:white; border-radius:8px; padding:9px 14px; font-weight:800; font-size:10px; cursor:pointer; box-shadow:0 8px 24px rgba(199,42,75,.18); }
.primary-btn:hover { filter:brightness(1.08); }
.primary-btn.full { width:100%; margin-top:8px; }
.stream-badge { position:absolute; top:12px; right:12px; background:var(--accent); color:white; border:1px solid rgba(255,255,255,.1); padding:5px 7px; border-radius:6px; font-size:8px; font-weight:900; letter-spacing:.1em; }

.chat-card { min-height:0; border:1px solid #2c1f24; border-radius:10px; background:#100d0e; display:grid; grid-template-rows: minmax(0,1fr) 48px; overflow:hidden; }
.chat-log { overflow:auto; padding:11px 13px; scrollbar-width:thin; scrollbar-color:#322329 transparent; }
.system-message { color:var(--muted-2); font-size:9px; text-align:center; margin:3px 0 10px; }
.chat-message { display:grid; grid-template-columns:27px 1fr; gap:8px; margin:7px 0; }
.chat-avatar { width:27px; height:27px; border-radius:7px; background:#21171b; display:grid; place-items:center; font-size:8px; font-weight:900; }
.chat-copy header { display:flex; gap:6px; align-items:center; }
.chat-copy strong { font-size:10px; }
.chat-copy time { color:var(--muted-2); font-size:7px; }
.chat-copy p { color:#d7cdd1; font-size:10px; margin-top:2px; line-height:1.4; }
.dice-card { margin-top:4px; border-left:2px solid var(--accent); background:#171114; padding:7px 9px; border-radius:0 6px 6px 0; font-size:9px; color:#d9c9ce; }
.dice-card b { color:white; font-size:16px; margin-left:4px; }
.composer { border-top:1px solid #281b20; display:grid; grid-template-columns:35px 1fr 44px 57px; gap:5px; align-items:center; padding:7px; background:#131012; }
.composer input { height:33px; border:1px solid #2d2025; background:#0d0a0b; color:white; border-radius:7px; padding:0 10px; font-size:10px; }
.composer-btn, .send-btn { height:33px; border:1px solid #2d2025; background:#1a1316; border-radius:7px; color:var(--muted); cursor:pointer; font-size:9px; }
.composer-btn:hover { color:white; }
.send-btn { background:var(--accent); color:white; border-color:transparent; }

.master-panel { padding:14px 12px 12px; display:flex; flex-direction:column; min-width:0; }
.master-panel.player-hidden { display:none; }
.master-header { height:54px; display:flex; align-items:center; justify-content:space-between; padding:0 4px 10px; border-bottom:1px solid #25191e; }
.master-header h2 { font-size:15px; margin-top:3px; }
.master-badge { font-size:7px; letter-spacing:.13em; font-weight:900; border:1px solid #5b2a38; background:var(--accent-soft); color:#f0869b; padding:5px 7px; border-radius:5px; }
.panel-tabs { display:grid; grid-template-columns:repeat(4,1fr); gap:4px; padding:10px 0; }
.tab { height:32px; border:1px solid #2c1f24; background:#151012; color:var(--muted); border-radius:7px; cursor:pointer; font-size:9px; }
.tab:hover { color:white; }
.tab.active { background:#25161c; color:white; border-color:#57303b; box-shadow:inset 0 -2px 0 var(--accent); }
.tab.storm-tab.active { color:#ffd7de; }
.tab-panel { display:none; min-height:0; overflow:auto; padding-right:2px; scrollbar-width:thin; scrollbar-color:#332329 transparent; }
.tab-panel.active { display:block; }
.panel-block { border:1px solid #2b1f23; background:#131012; border-radius:9px; padding:11px; margin-bottom:8px; }
.label { display:block; color:var(--muted-2); font-size:7px; letter-spacing:.14em; font-weight:900; margin-bottom:6px; }
.now-playing strong { display:block; font-size:13px; margin-bottom:9px; }
.transport { display:grid; grid-template-columns:30px 30px 1fr; gap:5px; align-items:center; }
.transport button { height:30px; border:1px solid #2f2227; background:#1b1417; color:var(--muted); border-radius:6px; cursor:pointer; }
.transport label { font-size:8px; color:var(--muted); display:grid; grid-template-columns:auto 1fr; align-items:center; gap:5px; }
input[type="range"] { accent-color: var(--accent-2); width:100%; }
.block-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; font-size:10px; }
.text-btn { border:0; background:transparent; color:var(--accent-2); font-size:8px; cursor:pointer; }
.sound-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:6px; }
.sound-pad { min-height:63px; border:1px solid #302127; background:linear-gradient(180deg, #1a1316, #151012); border-radius:8px; text-align:left; padding:8px; cursor:pointer; position:relative; overflow:hidden; }
.sound-pad::after { content:""; position:absolute; inset:auto 0 0; height:2px; background:transparent; }
.sound-pad:hover { border-color:#4b3039; transform:translateY(-1px); }
.sound-pad.playing { background:#23151b; border-color:#6b3142; }
.sound-pad.playing::after { background:var(--accent); }
.sound-pad.danger span { color:var(--accent-2); }
.sound-pad span { display:block; color:#b9a5ac; font-size:13px; margin-bottom:5px; }
.sound-pad b { display:block; font-size:9px; }
.sound-pad small { display:block; margin-top:2px; color:var(--muted-2); font-size:7px; }
.fx-grid { grid-template-columns:repeat(3,1fr); }
.fx-grid .sound-pad { min-height:58px; padding:7px; }
.mixer-row { display:grid; grid-template-columns:92px 1fr; gap:9px; align-items:center; margin:9px 0; }
.toggle-chip { height:29px; border:1px solid #302228; background:#191215; color:var(--muted); border-radius:7px; font-size:8px; cursor:pointer; }
.toggle-chip.active { color:white; background:#26151c; border-color:#613142; box-shadow:inset 2px 0 0 var(--accent); }
.uploaded-list { display:grid; gap:5px; }
.uploaded-item { display:grid; grid-template-columns:1fr auto; gap:6px; align-items:center; border:1px solid #2c2024; border-radius:6px; padding:7px 8px; background:#171113; font-size:8px; }
.uploaded-item button { border:0; background:#24171c; color:#ddd; border-radius:5px; height:24px; cursor:pointer; }
.storm-hero { display:flex; gap:10px; align-items:flex-start; background:radial-gradient(circle at 15% 0%, rgba(199,42,75,.15), transparent 45%), #131012; }
.storm-icon { flex:0 0 auto; width:42px; height:42px; border-radius:9px; display:grid; place-items:center; background:#27131b; border:1px solid #5f2d3d; color:#ff6b87; font-size:22px; }
.storm-hero h3 { font-size:14px; margin-bottom:4px; }
.storm-hero p { color:var(--muted); font-size:8px; line-height:1.45; }
.switch-row { display:flex; align-items:center; justify-content:space-between; font-size:9px; margin:7px 0 10px; }
.switch { width:36px; height:20px; border:1px solid #3a2930; background:#1b1417; border-radius:999px; padding:2px; cursor:pointer; }
.switch i { display:block; width:14px; height:14px; border-radius:50%; background:#77686e; transition:transform .16s ease, background .16s ease; }
.switch.on { background:#35151f; border-color:#6f2f42; }
.switch.on i { transform:translateX(15px); background:var(--accent-2); }
.slider-label { display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; gap:5px; color:var(--muted); font-size:8px; margin:9px 0; }
.slider-label input { grid-column:1/-1; }
.slider-label span { color:#d7c9ce; }
.lightning-btn { width:100%; min-height:54px; border:1px solid #7a3449; background:linear-gradient(180deg, #3d1724, #2b111a); color:#ffe8ed; border-radius:9px; cursor:pointer; font-size:10px; font-weight:900; letter-spacing:.05em; box-shadow:inset 0 0 25px rgba(255,255,255,.02); }
.lightning-btn span { color:#ff8097; font-size:18px; margin-right:6px; vertical-align:-2px; }
.lightning-btn:hover { filter:brightness(1.15); box-shadow:0 0 24px rgba(199,42,75,.15); }
.safety-note { color:var(--muted-2); font-size:7px; line-height:1.5; margin:8px 4px; }
.master-footer { margin-top:auto; border-top:1px solid #25191e; padding:10px 4px 0; display:grid; grid-template-columns:1fr 32px; gap:8px; align-items:center; }
.master-footer label { display:grid; grid-template-columns:45px 1fr; gap:5px; align-items:center; color:var(--muted-2); font-size:7px; letter-spacing:.1em; font-weight:900; }
.master-footer span { color:var(--muted); font-size:8px; text-align:right; }

#flashOverlay { position:fixed; inset:0; z-index:9999; pointer-events:none; background:rgba(235,243,255,0); mix-blend-mode:screen; transition:background 90ms linear; }
#flashOverlay.flash { background:rgba(235,243,255,var(--flash-opacity,.75)); }

.toast-host { position:fixed; right:16px; bottom:16px; z-index:10020; display:grid; gap:6px; }
.toast { background:#181214; border:1px solid #3a2830; color:#eee; padding:9px 11px; border-radius:8px; font-size:9px; box-shadow:0 12px 30px rgba(0,0,0,.35); animation:toastIn .18s ease; }
@keyframes toastIn { from { opacity:0; transform:translateY(6px); } }

.settings-dialog { width:min(430px, calc(100vw - 30px)); border:1px solid #4a3039; background:#100c0e; color:var(--text); border-radius:12px; padding:0; box-shadow:0 30px 90px rgba(0,0,0,.55); }
.settings-dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(3px); }
.settings-dialog form { padding:16px; }
.dialog-head { display:flex; justify-content:space-between; align-items:flex-start; border-bottom:1px solid #2a1c21; padding-bottom:12px; margin-bottom:12px; }
.dialog-head h2 { font-size:17px; margin-top:3px; }
.field { display:grid; gap:6px; color:var(--muted); font-size:9px; margin:11px 0; }
.field input, .field select { height:35px; border:1px solid #38262d; background:#171113; color:white; border-radius:7px; padding:0 9px; }
.check-row { display:grid; grid-template-columns:18px 1fr; align-items:flex-start; gap:8px; padding:10px; background:#151012; border:1px solid #2d2025; border-radius:8px; font-size:9px; }
.check-row small { display:block; color:var(--muted-2); margin-top:3px; line-height:1.4; }
.volume-settings { margin-top:12px; border-top:1px solid #2b1e23; padding-top:10px; }
.volume-settings h3 { font-size:10px; margin-bottom:8px; }
.volume-settings label { display:grid; grid-template-columns:70px 1fr; gap:8px; align-items:center; color:var(--muted); font-size:8px; margin:8px 0; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 250px minmax(0,1fr) 310px; }
  .fx-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 900px) {
  body { overflow:auto; }
  .app-shell { min-height:100vh; height:auto; grid-template-columns:220px minmax(0,1fr); }
  .master-panel { position:fixed; right:0; top:0; bottom:0; width:330px; z-index:20; box-shadow:-20px 0 50px rgba(0,0,0,.4); }
  .stage-column { min-height:100vh; }
}

/* ===== Polvax RPG V1.1: real SVG icons + single-page interactions ===== */
.icon-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.icon { width:1em; height:1em; display:inline-block; fill:currentColor; flex:0 0 auto; }
.icon-btn { display:inline-grid; place-items:center; }
.icon-btn .icon { width:14px; height:14px; }
.with-icon { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.quiet-btn.with-icon .icon { width:11px; height:11px; }
.invite-btn { display:flex; align-items:center; gap:8px; }
.invite-btn .icon { width:12px; height:12px; }
.channel .icon { width:12px; height:12px; color:#817278; }
.channel.active .icon, .channel:hover .icon { color:#d8cbd0; }
.channel.voice.joined { color:#d9f1e4; background:rgba(69,204,138,.06); }
.channel.voice.joined .icon { color:var(--green); }
.profile-actions .icon-btn.active .icon { color:var(--danger); }
.stream-actions { display:flex; align-items:center; gap:7px; }
.toolbar-icon-btn { width:27px; height:27px; border:1px solid #2d2025; background:#181113; color:#a9979e; border-radius:6px; display:grid; place-items:center; cursor:pointer; }
.toolbar-icon-btn:hover { color:white; background:#21171b; }
.toolbar-icon-btn .icon { width:11px; height:11px; }
.screen-symbol .icon { width:21px; height:21px; }
.primary-btn.with-icon .icon { width:12px; height:12px; }
.composer { grid-template-columns:35px 1fr 54px 68px; }
.composer-btn, .send-btn { display:flex; align-items:center; justify-content:center; gap:5px; }
.composer-btn .icon { width:12px; height:12px; }
.dice-btn .icon { width:15px; height:15px; }
.dice-btn span { font-size:7px; font-weight:900; }
.send-btn .icon { width:11px; height:11px; }
.panel-tabs .tab { display:flex; align-items:center; justify-content:center; gap:5px; padding:0 5px; }
.panel-tabs .tab .icon { width:10px; height:10px; }
.master-badge { display:inline-flex; align-items:center; gap:4px; }
.master-badge .icon { width:8px; height:8px; }
.transport button { display:grid; place-items:center; }
.transport button .icon { width:10px; height:10px; }
.text-btn.with-icon { display:inline-flex; align-items:center; gap:4px; }
.text-btn .icon { width:8px; height:8px; }
.sound-pad .pad-icon { width:14px; height:14px; color:#b9a5ac; margin-bottom:6px; }
.sound-pad.danger .pad-icon { color:var(--accent-2); }
.toggle-chip { display:flex; align-items:center; justify-content:flex-start; gap:6px; padding:0 9px; }
.toggle-chip .icon { width:10px; height:10px; }
.storm-icon .icon { width:20px; height:20px; }
.lightning-btn.with-icon { display:flex; align-items:center; justify-content:center; gap:8px; }
.lightning-btn.with-icon .icon { width:16px; height:16px; color:#ff8097; }
.lightning-btn.with-icon span { color:inherit; font-size:10px; margin:0; vertical-align:0; }
.uploaded-item .uploaded-actions { display:flex; gap:4px; }
.uploaded-item button { width:26px; display:grid; place-items:center; }
.uploaded-item button .icon { width:9px; height:9px; }
.attachment-card { margin-top:4px; display:inline-flex; align-items:center; gap:7px; border:1px solid #302229; background:#171114; border-radius:7px; padding:7px 9px; color:#d7cdd1; }
.attachment-card .icon { width:11px; height:11px; color:var(--accent-2); }
.attachment-card small { color:var(--muted-2); }

.compact-dialog { width:min(390px, calc(100vw - 30px)); }
.dialog-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:15px; }
.dialog-actions .quiet-btn { height:34px; }
.dialog-actions .primary-btn { box-shadow:none; }

.preview-dialog { width:min(1120px, calc(100vw - 34px)); height:min(720px, calc(100vh - 34px)); border:1px solid #4a3039; background:#090708; color:var(--text); border-radius:13px; padding:0; box-shadow:0 35px 100px rgba(0,0,0,.65); overflow:hidden; }
.preview-dialog::backdrop { background:rgba(0,0,0,.78); backdrop-filter:blur(4px); }
.preview-shell { height:100%; display:grid; grid-template-rows:58px minmax(0,1fr); }
.preview-head { display:flex; justify-content:space-between; align-items:center; padding:0 14px 0 16px; border-bottom:1px solid #2a1c21; background:#110c0e; }
.preview-head h2 { font-size:15px; margin-top:2px; }
.preview-actions { display:flex; align-items:center; gap:8px; }
.preview-note { font-size:8px; color:var(--muted-2); border:1px solid #2e2025; border-radius:999px; padding:5px 8px; }
.preview-content { min-height:0; display:grid; grid-template-columns:205px minmax(0,1fr); }
.preview-sidebar { background:#0d090b; border-right:1px solid #25191e; padding:12px; }
.brand-row.mini { padding:0 3px 18px; }
.brand-row.mini .brand-mark { width:32px; height:32px; font-size:10px; }
.brand-row.mini .brand-name { font-size:12px; }
.brand-row.mini .brand-sub { font-size:7px; }
.preview-player-card { display:flex; align-items:center; gap:9px; border:1px solid #302128; background:#171012; padding:9px; border-radius:9px; }
.preview-player-card .avatar { width:32px; height:32px; }
.preview-player-card strong { display:block; font-size:10px; }
.preview-player-card small { display:block; font-size:8px; color:var(--muted); margin-top:2px; }
.preview-player-list { margin-top:12px; padding:9px; border-top:1px solid #21161a; color:#cdbfc4; }
.preview-player-list span { display:flex; align-items:center; gap:7px; font-size:9px; }
.preview-player-list .icon { width:10px; height:10px; }
.preview-player-list small { display:block; color:var(--muted-2); font-size:8px; margin-top:6px; }
.preview-stage { min-width:0; min-height:0; padding:12px; display:grid; grid-template-rows:38px minmax(0,1fr) 38px; background:radial-gradient(circle at 50% -10%, #1a0d11, #090708 40%); }
.preview-title { display:flex; align-items:center; justify-content:space-between; padding:0 3px; }
.preview-title strong { font-size:12px; }
.preview-title span { color:var(--muted-2); font-size:8px; }
.preview-video-wrap { position:relative; min-height:0; overflow:hidden; border:1px solid #332229; border-radius:10px; background:#050405; display:grid; place-items:center; }
#previewVideo { width:100%; height:100%; object-fit:contain; display:none; background:#000; }
.preview-empty { text-align:center; color:var(--muted); display:grid; place-items:center; gap:7px; }
.preview-empty .icon { width:26px; height:26px; color:var(--accent-2); }
.preview-empty strong { color:#e9e0e3; font-size:11px; }
.preview-empty small { font-size:8px; }
.preview-bottom { display:flex; align-items:center; gap:15px; color:var(--muted); font-size:8px; padding:0 3px; }
.preview-bottom span { display:flex; align-items:center; gap:5px; }
.preview-bottom .icon { width:10px; height:10px; }
.preview-flash { position:absolute; inset:0; pointer-events:none; background:rgba(235,243,255,0); mix-blend-mode:screen; transition:background 80ms linear; }
.preview-flash.flash { background:rgba(235,243,255,var(--preview-flash-opacity,.75)); }

/* app mode / browser notice helper */
.capture-info { display:none; }

@media (max-width: 1180px) {
  .panel-tabs .tab span { display:none; }
  .panel-tabs .tab .icon { width:12px; height:12px; }
}

/* ===== V1.2: legibilidade + canais no estilo Discord ===== */
.app-shell { grid-template-columns: 300px minmax(0, 1fr) 380px; }
.brand-name { font-size: 18px; }
.brand-sub { font-size: 11px; }
.section-title-row { font-size: 12px; height: 26px; }
.campaign { grid-template-columns: 40px 1fr; gap: 10px; padding: 9px 8px; }
.campaign-glyph { width: 40px; height: 40px; font-size: 12px; }
.campaign strong { font-size: 14px; }
.campaign small { font-size: 11px; }
.channel { height: 38px; font-size: 14px; gap: 9px; }
.channel .icon { width: 15px; height: 15px; }
.channel i { font-size: 10px; }
.participant { padding: 8px 7px; }
.participant-avatar { width: 32px; height: 32px; font-size: 11px; }
.participant-copy strong { font-size: 13px; }
.participant-copy small, .role-tag { font-size: 10px; }
.invite-btn { font-size: 12px; }
.profile-card { grid-template-columns: 42px 1fr; padding: 11px; }
.avatar { width: 42px; height: 42px; font-size: 12px; }
.profile-copy strong { font-size: 14px; }
.profile-copy small { font-size: 11px; }
.icon-btn { height: 35px; min-width: 35px; }

.stage-column { grid-template-rows: 64px minmax(0, 1fr) 210px; padding: 16px 18px; gap: 12px; }
.eyebrow { font-size: 10px; }
.topbar h1 { font-size: 22px; }
.live-pill, .quiet-btn { font-size: 11px; }
.quiet-btn { height: 32px; }
.stream-toolbar { font-size: 12px; }
.stream-meta { font-size: 10px; }
.stream-empty h2 { font-size: 22px; }
.stream-empty p { font-size: 13px; max-width: 560px; }
.primary-btn { font-size: 13px; padding: 10px 16px; }
.stream-badge { font-size: 10px; }

/* Em #sessão e #lore a área central vira um canal de texto completo. */
.stage-column.text-mode { grid-template-rows: 64px minmax(0, 1fr); }
.stage-column.text-mode .stream-card { display: none; }
.stage-column.text-mode .chat-card { grid-row: 2; grid-template-rows: minmax(0, 1fr) 64px; border-radius: 12px; }
.stage-column.text-mode .chat-log { padding: 22px 26px 18px; }
.stage-column.text-mode .chat-message { max-width: 980px; }
.stage-column.call-mode .stream-card { display: grid; }

.chat-card { grid-template-rows: minmax(0,1fr) 58px; }
.chat-log { padding: 14px 16px; }
.system-message { font-size: 12px; margin: 6px 0 16px; }
.chat-message { grid-template-columns: 38px 1fr; gap: 11px; margin: 11px 0; }
.chat-avatar { width: 38px; height: 38px; border-radius: 9px; font-size: 11px; }
.chat-copy header { gap: 8px; }
.chat-copy strong { font-size: 14px; }
.chat-copy time { font-size: 10px; }
.chat-copy p { font-size: 15px; margin-top: 4px; line-height: 1.5; color: #eee5e8; overflow-wrap: anywhere; }
.dice-card { font-size: 12px; padding: 9px 11px; }
.dice-card b { font-size: 20px; }
.composer { grid-template-columns: 42px 1fr 54px 72px; gap: 7px; padding: 9px; }
.composer input { height: 40px; font-size: 14px; padding: 0 12px; }
.composer-btn, .send-btn { height: 40px; font-size: 11px; }
.dice-btn span { font-size: 9px; }

.attachment-card { margin-top: 7px; gap: 9px; padding: 10px 12px; font-size: 13px; }
.attachment-card .icon { width: 15px; height: 15px; }
.attachment-card small { font-size: 11px; }
.attachment-image-card { margin-top: 8px; width: min(560px, 100%); }
.attachment-image-button { display: block; padding: 0; border: 1px solid #3b2930; border-radius: 10px; background: #0a0809; overflow: hidden; cursor: zoom-in; max-width: 100%; }
.attachment-image-button img { display: block; width: auto; max-width: 100%; max-height: 390px; object-fit: contain; background: #070607; }
.attachment-image-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 11px; }

.master-header h2 { font-size: 17px; }
.master-badge { font-size: 9px; }
.tab { font-size: 11px; height: 36px; }
.label { font-size: 9px; }
.now-playing strong { font-size: 15px; }
.transport label, .text-btn, .toggle-chip, .uploaded-item, .slider-label, .safety-note { font-size: 10px; }
.block-title { font-size: 12px; }
.sound-pad b { font-size: 11px; }
.sound-pad small { font-size: 9px; }
.storm-hero p, .switch-row { font-size: 10px; }
.master-footer label, .master-footer span { font-size: 9px; }
.toast { font-size: 12px; }

.image-viewer-dialog { width: min(1100px, calc(100vw - 50px)); height: min(820px, calc(100vh - 50px)); padding: 0; border: 1px solid #4a3039; border-radius: 14px; background: #0c090a; color: var(--text); box-shadow: 0 40px 120px rgba(0,0,0,.7); }
.image-viewer-dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(4px); }
.image-viewer-head { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 18px; border-bottom: 1px solid #2a1c21; }
.image-viewer-head strong { display: block; margin-top: 3px; font-size: 14px; }
.image-viewer-body { height: calc(100% - 64px); display: grid; place-items: center; padding: 18px; overflow: auto; }
.image-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 270px minmax(0, 1fr) 340px; }
  .chat-copy p { font-size: 14px; }
}

/* ===== Polvax RPG V1.3 Desktop: seletor próprio de transmissão ===== */
.source-picker-dialog {
  width:min(980px, calc(100vw - 42px));
  max-height:min(760px, calc(100vh - 42px));
  padding:0;
  border:1px solid #49303a;
  border-radius:14px;
  background:#0e0a0c;
  color:var(--text);
  box-shadow:0 30px 100px rgba(0,0,0,.68);
}
.source-picker-dialog::backdrop { background:rgba(0,0,0,.78); backdrop-filter:blur(6px); }
.source-picker-shell { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; min-height:min(700px, calc(100vh - 58px)); }
.source-picker-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:22px 24px 17px; border-bottom:1px solid #281b20; }
.source-picker-head h2 { font-size:22px; margin:4px 0 6px; letter-spacing:-.02em; }
.source-picker-head p { color:var(--muted); font-size:11px; line-height:1.5; max-width:620px; }
.source-picker-head .toolbar-icon-btn { width:34px; height:34px; }
.source-picker-tabs { display:flex; gap:7px; padding:14px 24px 4px; }
.source-filter { height:34px; padding:0 14px; border-radius:7px; border:1px solid #302127; background:#171113; color:#a9989f; font:inherit; font-size:10px; cursor:pointer; }
.source-filter:hover { color:white; border-color:#4a3039; }
.source-filter.active { color:white; background:#2a151d; border-color:#703246; box-shadow:inset 0 -2px 0 var(--accent); }
.source-grid { padding:14px 24px 22px; overflow:auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-content:start; scrollbar-width:thin; scrollbar-color:#3d2931 transparent; }
.source-card { border:1px solid #2d2025; background:#151012; color:var(--text); border-radius:10px; padding:8px; text-align:left; cursor:pointer; transition:border-color .15s ease, transform .15s ease, background .15s ease; min-width:0; }
.source-card:hover { transform:translateY(-2px); border-color:#774053; background:#1b1216; }
.source-thumb { display:grid; place-items:center; width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:7px; border:1px solid #2b1e23; background:#070607; }
.source-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.source-thumb-empty { color:#6d5c63; font-size:30px; }
.source-thumb-empty .icon { width:30px; height:30px; }
.source-card-copy { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:center; padding:9px 3px 3px; min-width:0; }
.source-card-copy > span { min-width:0; }
.source-card-copy strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:11px; }
.source-card-copy small { display:block; margin-top:3px; color:var(--muted-2); font-size:8px; }
.source-app-icon { width:22px; height:22px; object-fit:contain; border-radius:5px; }
.source-empty { grid-column:1/-1; min-height:220px; display:grid; place-items:center; color:var(--muted); border:1px dashed #34242a; border-radius:10px; font-size:11px; }
.source-picker-foot { display:flex; justify-content:flex-end; align-items:center; gap:12px; padding:13px 24px; border-top:1px solid #281b20; background:#100c0e; }
.source-picker-foot > span { margin-right:auto; color:#76dca5; font-size:9px; }
@media (max-width:800px) { .source-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* V1.4 - área do jogador / ficha modular */
.player-panel {
  background: linear-gradient(180deg, #100b0d 0%, #0c090a 100%);
  min-height: 0;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.role-hidden { display: none !important; }
.player-panel-header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  border-bottom: 1px solid #25191e;
}
.player-panel-header h2 { font-size: 17px; margin-top: 3px; }
.player-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: .12em;
  font-weight: 900;
  border: 1px solid #3f3041;
  background: rgba(123, 84, 138, .12);
  color: #d8bde4;
  padding: 6px 8px;
  border-radius: 6px;
}
.player-badge .icon { width: 10px; height: 10px; }
.character-card {
  margin-top: 12px;
  border: 1px solid #35232a;
  background: linear-gradient(145deg, #181113, #120d0f);
  border-radius: 11px;
  padding: 10px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.character-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #661426);
  color: white;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
}
.character-main-fields { display: grid; gap: 5px; min-width: 0; }
.character-name-input,
.character-concept-input,
.module-title-input,
.sheet-inline-input,
.sheet-number-input,
.sheet-note-area {
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
}
.character-name-input {
  font-size: 14px;
  font-weight: 800;
  padding: 4px 6px;
}
.character-concept-input {
  font-size: 10px;
  color: var(--muted);
  padding: 4px 6px;
}
.character-name-input:hover,
.character-concept-input:hover,
.character-name-input:focus,
.character-concept-input:focus,
.module-title-input:hover,
.module-title-input:focus,
.sheet-inline-input:hover,
.sheet-inline-input:focus,
.sheet-number-input:hover,
.sheet-number-input:focus,
.sheet-note-area:hover,
.sheet-note-area:focus {
  border-color: #402830;
  background: #171012;
}
.sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 3px 8px;
}
.sheet-toolbar strong { display: block; font-size: 11px; }
.sheet-toolbar small { display: block; color: var(--muted-2); font-size: 8px; margin-top: 2px; }
.sheet-add-btn {
  height: 30px;
  border: 1px solid #462832;
  background: var(--accent-soft);
  color: #f1a5b5;
  border-radius: 7px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.sheet-add-btn:hover { background: rgba(199,42,75,.24); color: white; }
.sheet-add-btn .icon { width: 10px; height: 10px; }
.sheet-modules {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: #39262d transparent;
}
.sheet-module {
  border: 1px solid #302128;
  background: #131012;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color .12s ease, transform .12s ease, opacity .12s ease;
}
.sheet-module.dragging { opacity: .48; transform: scale(.985); }
.sheet-module.drag-over { border-color: var(--accent-2); }
.sheet-module-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 6px 7px;
  border-bottom: 1px solid #25191e;
  background: #171113;
}
.module-drag {
  width: 18px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #6f5f65;
  cursor: grab;
  font-size: 13px;
  letter-spacing: -1px;
  padding: 0;
}
.module-title-input {
  width: 100%;
  min-width: 0;
  font-size: 11px;
  font-weight: 850;
  padding: 5px 6px;
}
.module-actions { display: flex; gap: 3px; }
.module-action-btn {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #917f86;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.module-action-btn:hover { background: #24181d; color: white; }
.module-action-btn.danger:hover { color: var(--danger); background: rgba(240,90,104,.1); }
.module-action-btn .icon { width: 10px; height: 10px; }
.sheet-module.collapsed .sheet-module-body { display: none; }
.sheet-module.collapsed .sheet-module-head { border-bottom: 0; }
.sheet-module-body { padding: 8px; }
.sheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px auto;
  gap: 6px;
  align-items: center;
  min-height: 33px;
  padding: 4px 0;
  border-bottom: 1px solid #21161a;
}
.sheet-row:last-child { border-bottom: 0; }
.sheet-inline-input {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 650;
}
.sheet-number-input {
  width: 100%;
  text-align: center;
  padding: 5px 4px;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sheet-row-actions { display: flex; align-items: center; gap: 3px; }
.sheet-mini-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #34242a;
  background: #1b1416;
  color: #b9a9af;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sheet-mini-btn:hover { color: white; border-color: #55303b; }
.sheet-mini-btn.roll { color: #f0879d; background: rgba(199,42,75,.08); }
.sheet-mini-btn .icon { width: 10px; height: 10px; }
.resource-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 10px 54px auto;
  gap: 4px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #21161a;
}
.resource-row:last-of-type { border-bottom: 0; }
.resource-slash { color: var(--muted-2); text-align: center; font-size: 9px; }
.module-add-row {
  width: 100%;
  margin-top: 7px;
  height: 28px;
  border: 1px dashed #3b2830;
  background: rgba(255,255,255,.01);
  color: #907d84;
  border-radius: 7px;
  font-size: 9px;
  cursor: pointer;
}
.module-add-row:hover { color: #e4d7dc; border-color: #5a3440; background: #181113; }
.inventory-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px auto;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #21161a;
}
.inventory-row:last-of-type { border-bottom: 0; }
.sheet-note-area {
  width: 100%;
  min-height: 105px;
  resize: vertical;
  padding: 8px;
  font-size: 10px;
  line-height: 1.5;
  font-family: inherit;
}
.empty-module-copy {
  color: var(--muted-2);
  text-align: center;
  font-size: 9px;
  padding: 12px 6px 6px;
}
.player-panel-footer {
  border-top: 1px solid #25191e;
  padding: 9px 4px 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
}
.player-panel-footer span { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.player-panel-footer span .icon { width: 9px; height: 9px; }
.player-panel-footer small { font-size: 8px; color: #6f6065; }
.sheet-save-pulse { color: var(--green) !important; }

@media (max-width: 1180px) {
  .player-panel { position: fixed; right: 0; top: 0; bottom: 0; width: 350px; z-index: 20; box-shadow: -20px 0 50px rgba(0,0,0,.4); }
}

/* V1.5 - modelo de ficha por campanha + assets prontos */
.panel-tabs { grid-template-columns: repeat(5, 1fr); }

.sheet-builder-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: start;
}
.sheet-builder-hero h3 { margin: 4px 0 4px; font-size: 15px; }
.sheet-builder-hero p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #264133;
  background: rgba(51, 195, 119, .08);
  color: #92e7b7;
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 8px;
  white-space: nowrap;
}
.sync-pill i { width: 6px; height: 6px; border-radius: 50%; background: #46d38b; box-shadow: 0 0 10px rgba(70,211,139,.45); }
.sync-pill.syncing { color: #f0c77d; border-color: #5b4424; background: rgba(238,173,70,.08); }
.sync-pill.syncing i { background: #e9b35c; }

.asset-palette { padding-bottom: 10px; }
.tiny-note { color: var(--muted-2); font-size: 8px; }
.field-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
  margin-top: 8px;
}
.field-asset {
  min-height: 76px;
  border: 1px solid #302128;
  background: #151012;
  color: var(--text);
  border-radius: 9px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-rows: 25px auto auto;
  gap: 3px;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.field-asset:hover { border-color: #6d3442; background: #1b1215; transform: translateY(-1px); }
.field-asset b { font-size: 9px; }
.field-asset small { color: var(--muted-2); font-size: 7px; line-height: 1.25; }
.asset-preview { height: 25px; display: flex; align-items: center; gap: 4px; color: #e79aad; }
.pips-preview i, .mini-pips i { width: 10px; height: 10px; border: 1px solid #c55a73; border-radius: 3px; background: rgba(199,42,75,.1); }
.dice-preview .icon { width: 20px; height: 20px; }
.dice-preview strong { font-size: 12px; }
.number-preview { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.resource-preview strong { font-size: 14px; }
.resource-preview em { color: #725e65; font-style: normal; }
.text-preview, .note-preview { color: #d4c6cb; font-size: 10px; border-bottom: 1px solid #594048; width: 80%; }
.note-preview { height: 21px; align-items: flex-start; border: 1px solid #49333a; border-radius: 4px; padding: 3px 5px; color: #8e7c83; }

.sheet-template-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 3px 7px;
}
.sheet-template-toolbar strong { display: block; font-size: 11px; }
.sheet-template-toolbar small { display: block; color: var(--muted-2); font-size: 8px; margin-top: 2px; }
.template-sections { padding: 2px 1px 16px; }
.template-section {
  border: 1px solid #302128;
  background: #131012;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color .12s ease, opacity .12s ease, transform .12s ease;
}
.template-section.selected { border-color: #8b3a50; box-shadow: 0 0 0 1px rgba(199,42,75,.12); }
.template-section.dragging { opacity: .46; transform: scale(.985); }
.template-section.drag-over { border-color: var(--accent-2); }
.template-section-head {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0,1fr) auto 26px;
  gap: 6px;
  align-items: center;
  padding: 6px 7px;
  border-bottom: 1px solid #25191e;
  background: #171113;
}
.template-section-title,
.template-field-label,
.template-field-type,
.mini-setting input {
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  outline: none;
  font-family: inherit;
}
.template-section-title { width: 100%; font-size: 11px; font-weight: 850; padding: 5px 6px; }
.template-section-title:focus, .template-field-label:focus, .template-field-type:focus, .mini-setting input:focus { border-color: #4d2d36; background: #1a1214; }
.template-field-count { color: var(--muted-2); font-size: 7px; white-space: nowrap; }
.template-fields { padding: 5px 7px 0; }
.template-field-row {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) 82px 72px 26px;
  gap: 5px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #21161a;
}
.template-field-row:last-child { border-bottom: 0; }
.template-field-main { min-width: 0; display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: center; gap: 4px; }
.field-type-icon { width: 24px; height: 24px; display: grid; place-items: center; color: #dc7189; }
.field-type-icon .icon { width: 13px; height: 13px; }
.mini-pips { display: flex; gap: 1px; }
.mini-pips i { width: 5px; height: 8px; border-radius: 2px; }
.template-field-label { width: 100%; padding: 5px 4px; font-size: 9px; font-weight: 700; }
.template-field-type { width: 100%; border-color: #2f2227; background: #171113; padding: 5px 4px; font-size: 8px; }
.template-field-extra { min-width: 0; }
.template-sample { color: #735f66; font-size: 7px; line-height: 1.2; display: block; }
.mini-setting { display: flex; align-items: center; gap: 3px; color: #756269; font-size: 7px; }
.mini-setting input { width: 35px; border-color: #302128; background: #171113; padding: 4px; text-align: center; font-size: 8px; }

.sheet-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #3b2c31;
  background: #171113;
  color: #9f8b92;
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 7px;
  white-space: nowrap;
}
.sheet-lock-pill .icon { width: 9px; height: 9px; }
.player-sheet-section .player-section-head { grid-template-columns: minmax(0,1fr); padding: 8px 10px; }
.player-sheet-section .player-section-head strong { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.player-sheet-field {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #21161a;
}
.player-sheet-field:last-child { border-bottom: 0; }
.player-sheet-field.field-block { display: block; }
.player-field-label { color: #e7dde0; font-size: 10px; font-weight: 750; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.field-block .player-field-label { display: block; margin-bottom: 6px; }
.pip-control { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 176px; }
.pip-box {
  width: 18px;
  height: 18px;
  border: 1px solid #665059;
  background: #100c0e;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  transition: background .1s ease, border-color .1s ease, transform .1s ease;
}
.pip-box:hover { border-color: #ca627a; transform: translateY(-1px); }
.pip-box.active { background: #d03b5a; border-color: #eb6d87; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
.roll-control { display: grid; grid-template-columns: 30px 52px; gap: 5px; align-items: center; }
.roll-front { width: 30px; height: 30px; }
.roll-front .icon { width: 14px; height: 14px; }
.standalone-number { width: 62px; height: 30px; background: #171113; border-color: #33242a; }
.resource-control { display: grid; grid-template-columns: 50px 8px 50px; gap: 3px; align-items: center; }
.resource-control span { color: #66545b; font-size: 9px; text-align: center; }
.resource-control .sheet-number-input { background: #171113; border-color: #33242a; }
.player-sheet-field .sheet-inline-input { width: 150px; background: #171113; border-color: #33242a; }
.player-sheet-field .sheet-note-area { min-height: 110px; background: #120d0f; border-color: #33242a; }

.field-picker-dialog { width: min(620px, calc(100vw - 32px)); }
.field-type-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-bottom: 13px; }
.field-type-picker > button {
  min-height: 82px;
  border: 1px solid #302128;
  background: #151012;
  color: var(--text);
  border-radius: 9px;
  padding: 8px;
  cursor: pointer;
  display: grid;
  grid-template-rows: 25px auto auto;
  gap: 3px;
  text-align: left;
}
.field-type-picker > button:hover, .field-type-picker > button.active { border-color: #8a3d50; background: #201319; box-shadow: inset 0 0 0 1px rgba(199,42,75,.12); }
.field-type-picker b { font-size: 10px; }
.field-type-picker small { color: var(--muted-2); font-size: 8px; }
.field-option { margin-top: 4px; }

@media (max-width: 1180px) {
  .panel-tabs { grid-template-columns: repeat(5, 1fr); }
  .field-type-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ===== Polvax RPG V1.6: legibilidade + controles numéricos próprios ===== */
html { font-size: 16px; }
body {
  font-family: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Nunca mostrar os steppers nativos feios do navegador. */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.app-shell { grid-template-columns: 300px minmax(0, 1fr) 420px; }
.sidebar { padding: 18px 14px 14px; }
.master-panel { padding: 16px 14px 14px; }

/* Escala tipográfica geral: nada importante abaixo de 11px. */
.brand-name { font-size: 18px; letter-spacing: .16em; }
.brand-sub { font-size: 11px; }
.section-title-row { font-size: 12px; height: 28px; }
.campaign strong { font-size: 14px; }
.campaign small { font-size: 11px; line-height: 1.35; }
.channel { height: 40px; font-size: 14px; }
.channel i { font-size: 11px; }
.participant-copy strong { font-size: 13px; }
.participant-copy small, .role-tag { font-size: 10px; }
.invite-btn { font-size: 12px; }
.profile-copy strong { font-size: 14px; }
.profile-copy small { font-size: 11px; }
.eyebrow { font-size: 10px; letter-spacing: .13em; }
.topbar h1 { font-size: 23px; }
.live-pill, .quiet-btn { font-size: 11px; }
.stream-toolbar { font-size: 12px; }
.stream-meta { font-size: 10px; }
.stream-empty h2 { font-size: 22px; }
.stream-empty p { font-size: 13px; }
.primary-btn { font-size: 13px; }
.system-message { font-size: 12px; }
.chat-copy strong { font-size: 14px; }
.chat-copy time { font-size: 11px; }
.chat-copy p { font-size: 15px; line-height: 1.52; }
.composer input { font-size: 14px; }
.composer-btn, .send-btn { font-size: 11px; }
.master-header h2, .player-panel-header h2 { font-size: 18px; }
.master-badge, .player-badge { font-size: 10px; }
.tab { min-height: 38px; height: auto; padding: 8px 5px; font-size: 11px; line-height: 1.2; }
.label { font-size: 10px; margin-bottom: 8px; color: #a8959c; }
.block-title { font-size: 13px; }
.text-btn { font-size: 11px; }
.now-playing strong { font-size: 15px; }
.transport label, .toggle-chip, .uploaded-item, .slider-label, .safety-note, .switch-row { font-size: 11px; }
.sound-pad b { font-size: 12px; }
.sound-pad small { font-size: 10px; line-height: 1.35; }
.storm-hero p { font-size: 11px; }
.master-footer label, .master-footer span { font-size: 10px; }
.toast { font-size: 12px; }
.dialog-head h2 { font-size: 19px; }
.field { font-size: 12px; }
.field input, .field select { font-size: 13px; min-height: 38px; }
.field-help { color: var(--muted-2); font-size: 11px; line-height: 1.4; margin-top: -2px; }
.check-row { font-size: 12px; }
.check-row small { font-size: 11px; }
.volume-settings h3 { font-size: 13px; }
.volume-settings label { font-size: 11px; }

/* Construtor da ficha mais autoexplicativo. */
.sheet-builder-hero {
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  padding: 14px;
}
.sheet-builder-hero h3 { font-size: 18px; margin: 4px 0 6px; }
.sheet-builder-hero p { font-size: 12px; line-height: 1.55; max-width: 620px; }
.sync-pill { font-size: 10px; padding: 6px 9px; }
.builder-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
  margin-top: 2px;
}
.builder-steps span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #322229;
  border-radius: 8px;
  background: #171113;
  color: #c9bbc0;
  font-size: 10px;
  line-height: 1.25;
}
.builder-steps b {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--accent-soft);
  color: #f3a2b4;
  border: 1px solid #5d2d39;
  font-size: 10px;
}
.tiny-note { font-size: 10px; line-height: 1.35; text-align: right; }
.field-asset-grid { gap: 8px; margin-top: 10px; }
.field-asset {
  min-height: 112px;
  padding: 11px;
  grid-template-rows: 32px auto 1fr;
  gap: 5px;
}
.field-asset b { font-size: 12px; }
.field-asset small { font-size: 10px; line-height: 1.38; color: #9f8e94; }
.asset-preview { height: 31px; }
.pips-preview i { width: 13px; height: 13px; }
.dice-preview .icon { width: 23px; height: 23px; }
.dice-preview strong { font-size: 14px; }
.number-preview { font-size: 22px; }
.resource-preview strong { font-size: 17px; }
.text-preview, .note-preview { font-size: 11px; }

.sheet-template-toolbar { padding: 14px 3px 9px; }
.sheet-template-toolbar strong { font-size: 14px; }
.sheet-template-toolbar small { font-size: 11px; line-height: 1.4; }
.sheet-add-btn { height: 34px; font-size: 11px; padding: 0 11px; }
.template-section { margin-bottom: 10px; }
.template-section-head {
  min-height: 46px;
  grid-template-columns: 22px minmax(0,1fr) auto 30px;
  gap: 8px;
  padding: 7px 9px;
}
.template-section-title { font-size: 13px; padding: 7px 8px; }
.template-field-count { font-size: 10px; }
.template-fields { padding: 7px 9px 1px; }
.template-field-row {
  grid-template-columns: minmax(0,1.3fr) 116px 126px 30px;
  gap: 7px;
  min-height: 52px;
  padding: 4px 0;
}
.template-field-main { grid-template-columns: 30px minmax(0,1fr); gap: 6px; }
.field-type-icon { width: 28px; height: 28px; }
.field-type-icon .icon { width: 15px; height: 15px; }
.template-field-label { font-size: 12px; padding: 7px 6px; }
.template-field-type { font-size: 11px; padding: 7px 6px; }
.template-sample { font-size: 10px; line-height: 1.35; color: #978087; }
.mini-setting {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  color: #a9949b;
  font-size: 10px;
}
.module-add-row { min-height: 34px; font-size: 11px; }

/* Stepper Polvax: substitui as setinhas nativas do input number. */
.number-stepper,
.dialog-stepper {
  display: grid;
  grid-template-columns: 30px minmax(36px,1fr) 30px;
  align-items: stretch;
  min-width: 102px;
  height: 34px;
  border: 1px solid #3b2930;
  border-radius: 8px;
  overflow: hidden;
  background: #100c0e;
}
.stepper-btn,
.dialog-stepper button {
  border: 0;
  background: #1c1417;
  color: #c7b7bd;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.stepper-btn:hover,
.dialog-stepper button:hover { background: #2a1920; color: white; }
.stepper-btn:active,
.dialog-stepper button:active { background: #3a1b26; }
.stepper-btn .icon,
.dialog-stepper button .icon { width: 10px; height: 10px; }
.stepper-input,
.dialog-stepper input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  border-left: 1px solid #332329 !important;
  border-right: 1px solid #332329 !important;
  border-radius: 0 !important;
  outline: 0;
  background: #171113 !important;
  color: #fff;
  text-align: center;
  font: 800 13px/1 "Segoe UI Variable", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  padding: 0 4px !important;
}
.stepper-input:focus,
.dialog-stepper input:focus { background: #20151a !important; box-shadow: inset 0 0 0 1px #704054; }
.compact-stepper { min-width: 112px; width: 112px; height: 32px; }
.compact-stepper .stepper-btn { width: auto; }
.dialog-stepper { width: 180px; height: 40px; margin-top: 2px; grid-template-columns: 42px 1fr 42px; }
.dialog-stepper button .icon { width: 12px; height: 12px; }
.dialog-stepper input { font-size: 15px; }

/* Ficha do jogador: controles grandes e entendíveis. */
.character-name-input { font-size: 16px; }
.character-concept-input { font-size: 12px; }
.sheet-toolbar strong { font-size: 13px; }
.sheet-toolbar small { font-size: 10px; }
.sheet-lock-pill { font-size: 9px; }
.player-sheet-section .player-section-head strong { font-size: 13px; }
.player-sheet-field { min-height: 48px; padding: 7px 0; }
.player-field-label { font-size: 12px; line-height: 1.3; }
.pip-box { width: 22px; height: 22px; border-radius: 6px; }
.roll-control { display: flex; align-items: center; gap: 7px; }
.roll-front { width: 36px; height: 36px; flex: 0 0 auto; }
.roll-front .icon { width: 17px; height: 17px; }
.bonus-stepper { width: 114px; }
.standalone-stepper { width: 126px; }
.resource-control {
  display: grid;
  grid-template-columns: minmax(106px,1fr) 12px minmax(106px,1fr);
  gap: 6px;
  align-items: end;
}
.resource-value { display: grid; gap: 3px; }
.resource-value small { font-size: 9px; color: #8d7a81; letter-spacing: .08em; font-weight: 800; text-align: center; }
.resource-divider { color: #756168; font-size: 14px; text-align: center; padding-bottom: 8px; }
.resource-control .number-stepper { width: 100%; min-width: 0; }
.player-sheet-field .sheet-inline-input { width: 180px; font-size: 12px; padding: 8px 9px; }
.player-sheet-field .sheet-note-area { font-size: 12px; line-height: 1.55; min-height: 120px; }
.empty-module-copy { font-size: 11px; }
.player-panel-footer span, .player-panel-footer small { font-size: 10px; }

/* Diálogo de escolha do asset. */
.field-picker-dialog { width: min(720px, calc(100vw - 32px)); }
.field-type-picker { gap: 9px; }
.field-type-picker > button { min-height: 112px; padding: 11px; grid-template-rows: 31px auto 1fr; gap: 5px; }
.field-type-picker b { font-size: 13px; }
.field-type-picker small { font-size: 11px; line-height: 1.4; color: #a6949a; }

@media (max-width: 1320px) {
  .app-shell { grid-template-columns: 276px minmax(0,1fr) 390px; }
  .template-field-row { grid-template-columns: minmax(0,1fr) 105px 116px 30px; }
}
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 250px minmax(0,1fr) 360px; }
  .builder-steps { grid-template-columns: 1fr; }
  .field-asset-grid { grid-template-columns: 1fr; }
  .template-field-row { grid-template-columns: minmax(0,1fr) 100px 110px 30px; }
}

/* V1.7: biblioteca de fichas dos jogadores para o Mestre. */
.sheet-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 2px 0 12px;
  padding: 4px;
  border: 1px solid #302027;
  border-radius: 10px;
  background: #0f0b0d;
}
.sheet-mode-tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a9969d;
  font: 800 11px/1.2 "Segoe UI Variable", "Segoe UI", sans-serif;
  cursor: pointer;
}
.sheet-mode-tab:hover { color: #fff; background: #171113; }
.sheet-mode-tab.active { color: #fff; background: #23141a; border-color: #5b2a38; box-shadow: inset 0 0 0 1px rgba(199,42,75,.08); }
.sheet-mode-tab span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  background: #3a1c26;
  color: #f0a0b2;
  font-size: 10px;
}
.sheet-master-view { display: none; }
.sheet-master-view.active { display: block; }
.master-sheets-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}
.master-sheets-hero h3 { margin: 4px 0 5px; font-size: 18px; }
.master-sheets-hero p { margin: 0; color: #aa969d; font-size: 12px; line-height: 1.48; }
.master-sheets-layout {
  display: grid;
  grid-template-columns: 132px minmax(0,1fr);
  gap: 9px;
  min-height: 480px;
}
.master-sheet-roster,
.master-sheet-detail {
  min-width: 0;
  border: 1px solid #302127;
  border-radius: 10px;
  background: #0f0b0d;
}
.master-sheet-roster { overflow: hidden; }
.master-sheet-roster-head { padding: 11px 9px 9px; border-bottom: 1px solid #281b20; }
.master-sheet-roster-head strong { display: block; font-size: 12px; }
.master-sheet-roster-head small { display: block; margin-top: 3px; color: #88757c; font-size: 9px; line-height: 1.3; }
.master-sheet-player-list { display: grid; gap: 3px; padding: 6px; max-height: 660px; overflow: auto; }
.master-sheet-player {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 8px;
  gap: 7px;
  align-items: center;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #d8cdd1;
  text-align: left;
  cursor: pointer;
}
.master-sheet-player:hover { background: #171113; }
.master-sheet-player.active { background: #24151a; border-color: #5e2d3a; }
.master-sheet-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2a171e;
  border: 1px solid #4a2632;
  color: #f3a2b4;
  font-size: 10px;
  font-weight: 900;
}
.master-sheet-player-copy { min-width: 0; }
.master-sheet-player-copy strong,
.master-sheet-player-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.master-sheet-player-copy strong { font-size: 10px; color: #f4eef0; }
.master-sheet-player-copy small { margin-top: 2px; font-size: 8px; color: #8e7b82; }
.master-sheet-status { width: 7px; height: 7px; border-radius: 50%; background: #5d5055; }
.master-sheet-status.online { background: var(--green); box-shadow: 0 0 0 3px rgba(67,200,139,.08); }
.master-roster-empty { padding: 14px 8px; color: #8c7980; font-size: 10px; line-height: 1.45; }
.master-sheet-detail { padding: 8px; overflow: auto; max-height: 720px; }
.master-sheet-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: #927e85;
}
.master-sheet-empty .icon { width: 30px; height: 30px; color: #b83f5c; }
.master-sheet-empty strong { color: #eee6e9; font-size: 13px; }
.master-sheet-empty small { max-width: 240px; font-size: 10px; line-height: 1.5; }
.master-character-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  gap: 9px;
  padding: 9px;
  margin-bottom: 8px;
  border: 1px solid #3a252c;
  border-radius: 9px;
  background: linear-gradient(145deg,#1a1014,#120d0f);
}
.master-character-card .character-avatar { width: 44px; height: 44px; }
.master-character-card .character-main-fields { gap: 5px; }
.master-character-card label { color: #8f7c83; font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.master-character-card input { width: 100%; margin-top: 2px; }
.master-edit-badge {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid #5a2a37;
  background: #25131a;
  color: #e88ba0;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
}
.master-sheet-sections { display: grid; gap: 8px; }
.master-sheet-section { margin: 0; }
.master-edit-field .player-field-label { font-size: 11px; }
.master-sheet-detail .number-stepper { min-width: 98px; }
.master-sheet-detail .resource-control { grid-template-columns: minmax(92px,1fr) 9px minmax(92px,1fr); gap: 4px; }
.master-sheet-detail .player-sheet-field .sheet-inline-input { width: 132px; }

@media (max-width: 1280px) {
  .master-sheets-layout { grid-template-columns: 112px minmax(0,1fr); }
  .master-sheet-player { grid-template-columns: 27px minmax(0,1fr); }
  .master-sheet-status { display: none; }
  .master-sheet-avatar { width: 27px; height: 27px; }
}

/* ===== Polvax RPG V1.9: ficha viva, permissões, condições e NPCs ===== */
.sheet-mode-tabs { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.sheet-mode-tab { min-height: 38px; padding: 8px 9px; font-size: 12px; }
.template-field-row {
  grid-template-columns: minmax(0,1.35fr) 104px 128px 92px 32px;
  gap: 7px;
  min-height: 48px;
}
.template-field-access {
  width: 100%; min-width: 0; border: 1px solid #34252b; background: #171113; color: #d8cdd1;
  border-radius: 7px; padding: 7px 6px; font: 700 10px/1.2 inherit; outline: none;
}
.template-field-access:focus { border-color: #7d3b4c; }
.template-field-extra { display: flex; align-items: center; min-height: 30px; }
.template-sample, .mini-setting { font-size: 10px; color: #907c83; }
.template-field-label, .template-field-type { font-size: 11px; }
.template-field-type { padding: 7px 6px; }
.template-section-title { font-size: 13px; }
.template-field-count { font-size: 10px; }

.field-access-badge, .field-access-hint {
  display: inline-flex; align-items: center; gap: 4px; justify-self: end;
  padding: 3px 6px; border: 1px solid #3c2b31; border-radius: 999px;
  color: #a9959c; background: #171113; font-size: 9px; font-weight: 800; white-space: nowrap;
}
.field-access-hint .icon { width: 9px; height: 9px; }
.access-master, .access-secret { border-color: #5f2c3a; color: #ec91a6; background: #241319; }
.access-player { border-color: #33473e; color: #8fd5b1; background: #111b17; }
.player-sheet-field { grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; min-height: 54px; }
.player-sheet-field.field-locked { opacity: .88; }
.player-sheet-field.field-locked input:disabled,
.player-sheet-field.field-locked textarea:disabled,
.player-sheet-field.field-locked button:disabled { cursor: not-allowed; opacity: .72; }
.player-field-label { font-size: 12px; }

.character-card-v19 { grid-template-columns: 64px minmax(0,1fr); align-items: stretch; }
.portrait-button, .master-portrait {
  width: 64px; height: 64px; border-radius: 12px; background-size: cover !important; background-position: center !important;
  background-repeat: no-repeat !important; overflow: hidden;
}
.portrait-button { cursor: pointer; border: 1px solid #633044; color: #ffdce4; }
.portrait-button:hover { border-color: #d14c6b; box-shadow: 0 0 0 3px rgba(209,76,107,.10); }
.portrait-button.has-portrait { color: transparent; }
.master-character-card-v19 { grid-template-columns: 64px minmax(0,1fr); }
.master-character-card-v19 .character-avatar { width: 64px; height: 64px; }

.player-status-area {
  margin: 0 0 10px; padding: 10px; border: 1px solid #302128; border-radius: 10px; background: #100c0e;
}
.status-area-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 7px; }
.status-area-head span { color: #d7c9ce; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.status-area-head small { color: #79686e; font-size: 9px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 24px; }
.status-empty { color: #796970; font-size: 10px; }
.status-chip {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 4px 8px;
  border: 1px solid #58303b; border-radius: 999px; background: #211319; color: #f1d9df; font: 800 10px/1 inherit;
}
button.status-chip { cursor: pointer; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: #dd4a69; box-shadow: 0 0 0 3px rgba(221,74,105,.1); }
.status-chip b { color: #a88992; font-size: 13px; line-height: 1; }

.sheet-toolbar { flex-wrap: wrap; }
.sheet-toolbar-actions { display: flex; gap: 6px; margin-left: auto; }
.mini-tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 6px 8px;
  border: 1px solid #38272d; border-radius: 8px; background: #171113; color: #d6c8cd; cursor: pointer;
  font: 800 10px/1 inherit;
}
.mini-tool-btn:hover { border-color: #6d3443; background: #211419; color: #fff; }
.mini-tool-btn .icon { width: 12px; height: 12px; }
.mini-tool-btn.danger { color: #f08ba2; border-color: #562b36; }

.field-resource-v19 { align-items: start; }
.resource-stack { width: min(250px, 100%); display: grid; gap: 7px; }
.resource-progress {
  position: relative; height: 20px; overflow: hidden; border: 1px solid #3e2730; border-radius: 7px; background: #100b0d;
}
.resource-progress i {
  position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg,#8f1f3c,#d54665); transition: width .18s ease;
}
.resource-progress span {
  position: relative; z-index: 1; height: 100%; display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 900; text-shadow: 0 1px 2px #000;
}

.master-quick-tools {
  margin-bottom: 9px; padding: 10px; border: 1px solid #38242b; border-radius: 10px; background: linear-gradient(145deg,#151012,#100c0e);
}
.quick-tool-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.quick-tool-head strong { font-size: 12px; }
.quick-tool-head > div { display: flex; gap: 5px; }
.quick-status-row, .quick-resource-row { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 8px; align-items: center; padding: 7px 0; }
.quick-status-row > span, .quick-resource-row > span { color: #9d8a91; font-size: 10px; font-weight: 800; }
.status-presets { display: flex; gap: 5px; flex-wrap: wrap; padding: 2px 0 8px 82px; border-bottom: 1px solid #26191e; }
.status-presets button, .quick-resource-row button {
  border: 1px solid #3a272e; border-radius: 7px; background: #171113; color: #cfbec4; padding: 6px 8px; font: 800 9px/1 inherit; cursor: pointer;
}
.status-presets button:hover, .quick-resource-row button:hover { border-color: #6c3442; color: #fff; }
.quick-resource-row > div { display: flex; gap: 5px; flex-wrap: wrap; }

.npc-layout { min-height: 520px; }
.npc-card-v19 { display: grid; gap: 12px; }
.npc-head-v19 {
  display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 10px; align-items: center;
  padding: 11px; border: 1px solid #3a252d; border-radius: 10px; background: linear-gradient(145deg,#1a1014,#120d0f);
}
.npc-avatar-v19 { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #57303b; border-radius: 12px; background: #29151d; color: #f2a0b4; font-size: 16px; font-weight: 950; }
.npc-head-v19 .label { display: block; margin-bottom: 3px; }
.npc-name { width: 100%; border: 0; border-bottom: 1px solid #4a3038; background: transparent; color: #fff; padding: 4px 0; outline: none; font: 900 17px/1.2 inherit; }
.npc-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.npc-identity-grid, .npc-stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.npc-identity-grid label, .npc-stat-grid label, .npc-abilities { color: #9b878e; font-size: 10px; font-weight: 850; }
.npc-identity-grid input {
  width: 100%; margin-top: 4px; padding: 8px 9px; border: 1px solid #35252b; border-radius: 8px; background: #151012; color: #f2e9ec; outline: none; font: 700 12px/1.2 inherit;
}
.npc-stat-grid label { padding: 8px; border: 1px solid #302128; border-radius: 9px; background: #120d0f; }
.npc-step { margin-top: 6px; }
.npc-step .number-stepper { width: 100%; grid-template-columns: 30px minmax(45px,1fr) 30px; }
.npc-hp-progress { height: 24px; }
.npc-abilities textarea { width: 100%; min-height: 150px; margin-top: 6px; resize: vertical; border: 1px solid #35252b; border-radius: 9px; background: #120d0f; color: #eee4e8; padding: 10px; outline: none; font: 600 12px/1.5 inherit; }

@media (max-width: 1450px) {
  .template-field-row { grid-template-columns: minmax(0,1.2fr) 92px 108px 78px 30px; }
  .template-field-access { font-size: 9px; }
  .quick-status-row, .quick-resource-row { grid-template-columns: 62px minmax(0,1fr); }
  .status-presets { padding-left: 70px; }
}

/* =========================
   POLVAX RPG V1.9
   Combate + ícones consistentes
   ========================= */

.app-shell { grid-template-columns: 300px minmax(0,1fr) 450px; }
.master-panel, .player-panel { min-width: 0; }
.panel-tabs { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tab {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 12px;
  gap: 7px;
  border-radius: 8px;
}
.panel-tabs .tab .icon { width: 15px; height: 15px; flex: 0 0 auto; }

/* Sheet navigation now uses real icons instead of text-only pills. */
.sheet-mode-tabs { grid-template-columns: 1.15fr 1.35fr .78fr; gap: 6px; }
.sheet-mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 9px;
  font-size: 11px;
}
.sheet-mode-tab .icon { width: 14px; height: 14px; flex: 0 0 auto; }
.sheet-mode-tab .sheet-mode-copy {
  display: inline;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: 1.2;
}
.sheet-mode-tab .sheet-mode-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin: 0;
  padding: 0 5px;
  border-radius: 999px;
  background: #3a1c26;
  color: #f0a0b2;
  font-size: 10px;
}

/* Better visual assets: every type has an actual SVG icon. */
.asset-icon-preview {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #4c2c36;
  border-radius: 9px;
  background: linear-gradient(145deg,#21141a,#130e10);
  color: #e66582;
}
.asset-icon-preview .icon { width: 18px; height: 18px; }
.field-asset:hover .asset-icon-preview,
.field-type-picker > button:hover .asset-icon-preview { border-color: #7d3448; color: #ff7794; }
.module-drag { display: grid; place-items: center; }
.module-drag .icon { width: 13px; height: 13px; }
.module-add-row.with-icon { display: flex; align-items: center; justify-content: center; gap: 7px; }
.module-add-row .icon { width: 12px; height: 12px; }
.status-presets button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.status-presets button .icon { width: 10px; height: 10px; }
.status-chip b { display: inline-grid; place-items: center; }
.status-chip b .icon { width: 9px; height: 9px; }

/* Combat tab */
.combat-hero {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 14px;
}
.combat-hero-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid #5b2837;
  background: radial-gradient(circle at 35% 30%, #3a1822, #160e12 70%);
  color: #f05a78;
}
.combat-hero-icon .icon { width: 22px; height: 22px; }
.combat-hero-copy h3 { font-size: 18px; margin: 2px 0 4px; }
.combat-hero-copy p { color: #ae9ca2; font-size: 11px; line-height: 1.48; }
#combatStartBtn.combat-stop { background: #2a181e; border-color: #63303c; color: #ff9aad; box-shadow: none; }

.combat-round-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 9px 0;
  padding: 12px 13px;
  border: 1px solid #342129;
  border-radius: 10px;
  background: linear-gradient(145deg,#161012,#0f0b0d);
}
.combat-round-copy { min-width: 0; }
.combat-round-copy > span { display: block; color: #f06c87; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.combat-round-copy strong { display: block; margin-top: 3px; font-size: 19px; }
.combat-round-copy small { display: block; margin-top: 4px; color: #9c898f; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combat-turn-controls { display: flex; align-items: center; gap: 5px; }
.combat-icon-btn,
.combat-next-btn,
.combat-row-btn {
  border: 1px solid #3a262d;
  background: #1a1215;
  color: #c9bac0;
  border-radius: 8px;
  cursor: pointer;
}
.combat-icon-btn { width: 36px; height: 36px; display: grid; place-items: center; }
.combat-icon-btn .icon { width: 12px; height: 12px; }
.combat-next-btn { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 850; }
.combat-next-btn .icon { width: 10px; height: 10px; }
.combat-icon-btn:hover:not(:disabled), .combat-next-btn:hover:not(:disabled), .combat-row-btn:hover:not(:disabled) { background: #291820; color: #fff; border-color: #5b3040; }
.combat-icon-btn:disabled, .combat-next-btn:disabled, .combat-row-btn:disabled { opacity: .35; cursor: default; }

.combat-roster-block { padding: 12px; }
.combat-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2b1820;
  color: #ef8da2;
  font-size: 10px;
  font-weight: 900;
}
.combat-add-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 10px 0; }
.combat-add-row .mini-tool-btn { min-height: 36px; justify-content: center; font-size: 10px; }
.combat-add-row .mini-tool-btn .icon { width: 12px; height: 12px; }
.combat-list { display: grid; gap: 6px; }
.combat-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  text-align: center;
  border: 1px dashed #37242b;
  border-radius: 10px;
  color: #8f7c83;
}
.combat-empty .icon { width: 26px; height: 26px; color: #b94a65; }
.combat-empty strong { color: #e9dfe2; font-size: 12px; }
.combat-empty small { max-width: 260px; font-size: 10px; line-height: 1.45; }
.combatant-row {
  display: grid;
  grid-template-columns: 28px 34px minmax(0,1fr) 118px 92px;
  gap: 7px;
  align-items: center;
  min-height: 52px;
  padding: 6px 7px;
  border: 1px solid #2e1f24;
  border-radius: 9px;
  background: #120d0f;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.combatant-row.active-turn { border-color: #7b3347; background: linear-gradient(90deg,#26131a,#130e10); box-shadow: inset 3px 0 0 #d94161; }
.combatant-order { color: #756268; text-align: center; font-size: 10px; font-weight: 900; }
.combatant-type-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #3c252d;
  border-radius: 8px;
  background: #1b1216;
  color: #c85a72;
}
.combatant-type-icon .icon { width: 14px; height: 14px; }
.combatant-copy { min-width: 0; }
.combatant-copy strong, .combatant-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combatant-copy strong { font-size: 12px; color: #f2eaed; }
.combatant-copy small { margin-top: 3px; color: #806e74; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.combatant-initiative { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 5px; align-items: center; }
.combatant-initiative > span { color: #806e74; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.combatant-initiative .number-stepper { min-width: 0; width: 100%; height: 31px; grid-template-columns: 26px 1fr 26px; }
.combatant-actions { display: grid; grid-template-columns: repeat(3,28px); gap: 3px; justify-content: end; }
.combat-row-btn { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; }
.combat-row-btn .icon { width: 9px; height: 9px; }
.combat-row-btn.danger { color: #d87183; }

/* Dice lab */
.dice-lab { padding: 12px; }
.dice-advanced-link { width:100%; min-height:40px; margin-top:8px; text-decoration:none; font-size:12px; }
.dice-private-hint { color: #826f76; font-size: 9px; }
.dice-builder { display: grid; grid-template-columns: 1fr 92px 1fr; gap: 8px; margin: 10px 0; }
.dice-step-group, .dice-select-group { min-width: 0; display: grid; gap: 5px; }
.dice-step-group > small, .dice-select-group > small { color: #85737a; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.compact-dice-stepper { width: 100%; height: 36px; grid-template-columns: 34px 1fr 34px; margin: 0; }
.dice-select-group select {
  width: 100%; height: 36px; border: 1px solid #3b2930; border-radius: 8px; background: #171113; color: #f5edf0; padding: 0 8px; font-size: 12px; font-weight: 800;
}
.dice-actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; }
.visibility-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #35232a;
  border-radius: 8px;
  background: #151012;
  color: #a69399;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.visibility-toggle .icon { width: 12px; height: 12px; }
.visibility-toggle.active { background: #26131a; border-color: #633044; color: #f18aa1; }
.dice-roll-main { min-height: 36px; justify-content: center; }
.dice-result-card {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #332229;
  border-radius: 9px;
  background: #100c0e;
}
.dice-result-card > .icon { width: 24px; height: 24px; color: #ce506c; justify-self: center; }
.dice-result-card small, .dice-result-card strong, .dice-result-card span { display: block; }
.dice-result-card small { color: #806d74; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.dice-result-card strong { margin-top: 1px; color: #fff; font-size: 21px; }
.dice-result-card span { margin-top: 2px; color: #a28f96; font-size: 10px; }

/* Rich dice message in chat. */
.dice-card-v19 {
  display: grid !important;
  grid-template-columns: 35px minmax(0,1fr);
  gap: 9px;
  align-items: center;
  min-width: 220px;
  max-width: 360px;
  padding: 9px 11px !important;
}
.dice-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #2d1720; color: #f06d88; }
.dice-card-icon .icon { width: 17px; height: 17px; }
.dice-card-v19 small, .dice-card-v19 strong, .dice-card-v19 span { display: block; }
.dice-card-v19 small { color: #b6949d; font-size: 9px; font-weight: 900; }
.dice-card-v19 strong { margin: 1px 0; color: #fff; font-size: 20px; line-height: 1; }
.dice-card-v19 span { color: #9a858c; font-size: 10px; }

/* Player combat alert. */
.player-combat-hud {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 9px;
  padding: 10px;
  border: 1px solid #4b2934;
  border-radius: 10px;
  background: linear-gradient(135deg,#1d1015,#120d0f);
}
.player-combat-hud.is-my-turn { border-color: #9b3d56; box-shadow: inset 3px 0 0 #e54d6e, 0 0 24px rgba(199,42,75,.08); }
.player-combat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: #2a151d; color: #e55b79; }
.player-combat-icon .icon { width: 17px; height: 17px; }
.player-combat-copy { min-width: 0; }
.player-combat-copy span, .player-combat-copy strong, .player-combat-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-combat-copy span { color: #d76a81; font-size: 8px; font-weight: 900; letter-spacing: .11em; }
.player-combat-copy strong { margin-top: 2px; font-size: 12px; }
.player-combat-copy small { margin-top: 3px; color: #927f86; font-size: 9px; }
.player-turn-pill { padding: 5px 7px; border: 1px solid #733044; border-radius: 999px; background: #2c141c; color: #ff8da6; font-size: 8px; font-weight: 900; letter-spacing: .07em; }

/* Slightly more generous text in private panels. */
.master-sheet-roster-head strong { font-size: 13px; }
.master-sheet-roster-head small { font-size: 10px; }
.master-sheet-player-copy strong { font-size: 11px; }
.master-sheet-player-copy small { font-size: 9px; }
.master-edit-badge { font-size: 9px; }
.template-field-count { font-size: 10px; }

@media (max-width: 1360px) {
  .app-shell { grid-template-columns: 278px minmax(0,1fr) 410px; }
  .combatant-row { grid-template-columns: 24px 30px minmax(0,1fr) 108px 84px; gap: 5px; }
  .combatant-actions { grid-template-columns: repeat(3,25px); }
  .combat-row-btn { width: 25px; height: 25px; }
}
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 250px minmax(0,1fr) 370px; }
  .panel-tabs { grid-template-columns: repeat(2,1fr); }
  .sheet-mode-tabs { grid-template-columns: 1fr; }
  .combat-hero { grid-template-columns: 42px minmax(0,1fr); }
  .combat-hero #combatStartBtn { grid-column: 1 / -1; justify-content: center; }
  .combat-round-card { grid-template-columns: 1fr; }
  .combat-turn-controls { justify-content: stretch; }
  .combat-next-btn { flex: 1; justify-content: center; }
  .combatant-row { grid-template-columns: 26px 30px minmax(0,1fr) 105px; }
  .combatant-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; }
  .dice-builder { grid-template-columns: 1fr; }
}

/* =========================
   POLVAX RPG V2.0
   Contas + Polvax IA
   ========================= */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 18%, rgba(159, 31, 60, .18), transparent 32%),
    radial-gradient(circle at 82% 74%, rgba(106, 20, 42, .14), transparent 34%),
    #080607;
  color: #f5edef;
}
.auth-gate.hidden { display: none; }
.auth-backdrop-mark {
  position: fixed;
  right: -3vw;
  bottom: -10vh;
  color: rgba(184, 46, 80, .035);
  font: 950 min(44vw, 620px)/.8 system-ui, sans-serif;
  letter-spacing: -.12em;
  pointer-events: none;
  user-select: none;
}
.auth-card {
  width: min(460px, 100%);
  position: relative;
  padding: 26px;
  border: 1px solid #3c252d;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(25,16,19,.98), rgba(12,9,10,.98));
  box-shadow: 0 28px 100px rgba(0,0,0,.48);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
.auth-brand-mark { width: 42px; height: 42px; border-radius: 11px; }
.auth-heading h1 { margin: 5px 0 8px; font-size: 28px; letter-spacing: -.035em; }
.auth-heading p { margin: 0; color: #aa979e; font-size: 13px; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 22px 0 16px; padding: 4px; border: 1px solid #302027; border-radius: 11px; background: #0d0a0b; }
.auth-tab { min-height: 39px; border: 0; border-radius: 8px; background: transparent; color: #907c83; font: 800 12px/1 inherit; cursor: pointer; }
.auth-tab.active { background: #24141a; color: #f6e9ed; box-shadow: inset 0 0 0 1px #4c2834; }
.auth-form { display: none; gap: 12px; }
.auth-form.active { display: grid; }
.auth-field { display: grid; gap: 6px; color: #bdaab0; font-size: 11px; font-weight: 800; }
.auth-input-wrap { min-height: 44px; display: grid; grid-template-columns: 34px 1fr; align-items: center; border: 1px solid #39262d; border-radius: 9px; background: #100c0e; }
.auth-input-wrap:focus-within { border-color: #83364a; box-shadow: 0 0 0 3px rgba(184,46,80,.08); }
.auth-input-wrap .icon { width: 14px; height: 14px; justify-self: center; color: #9b6d79; }
.auth-input-wrap input { width: 100%; height: 42px; border: 0; outline: 0; background: transparent; color: #f5edef; padding: 0 11px 0 0; font: 650 13px/1 inherit; }
.auth-submit { min-height: 43px; margin-top: 3px; justify-content: center; font-size: 12px; }
.auth-message { min-height: 18px; margin-top: 10px; color: #e27a91; font-size: 11px; font-weight: 750; text-align: center; }
.auth-message.success { color: #6fd7a2; }
.auth-local-note { display: grid; grid-template-columns: 18px 1fr; gap: 8px; margin: 15px 0 0; padding-top: 14px; border-top: 1px solid #2a1b20; color: #78666c; font-size: 9px; line-height: 1.5; }
.auth-local-note .icon { width: 13px; height: 13px; color: #a94d64; margin-top: 1px; }

/* The master panel gained a seventh tab. */
.panel-tabs { grid-template-columns: repeat(4, 1fr); }
.ai-tab.active { border-color: #743044; background: #2a151d; color: #ff8da6; }

/* Composer now includes a first-class AI action. */
.composer { grid-template-columns: 42px minmax(0, 1fr) 58px 58px 72px; }
.ai-composer-btn { color: #c48a98; }
.ai-composer-btn .icon { width: 13px; height: 13px; }
.ai-composer-btn.active { border-color: #8a3850; background: #331822; color: #ff8aa4; box-shadow: inset 0 0 0 1px rgba(234,80,112,.08); }
.ai-composer-btn.busy { opacity: .65; cursor: wait; }

.ai-master-hero { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; align-items: center; padding: 14px; }
.ai-master-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #663044; border-radius: 12px; background: radial-gradient(circle at 35% 25%, #401a28, #160e12 72%); color: #f36b8a; }
.ai-master-icon .icon { width: 22px; height: 22px; }
.ai-master-hero h3 { margin: 2px 0 4px; font-size: 19px; }
.ai-master-hero p { margin: 0; color: #ad999f; font-size: 11px; line-height: 1.5; }
.ai-config-block { padding: 13px; }
.ai-status-pill { display: inline-flex; align-items: center; gap: 6px; color: #947f86; font-size: 9px; font-weight: 850; }
.ai-status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #72525c; box-shadow: 0 0 0 3px rgba(114,82,92,.12); }
.ai-status-pill.ready { color: #74dba7; }
.ai-status-pill.ready i { background: #4fca8b; box-shadow: 0 0 0 3px rgba(79,202,139,.12); }
.ai-status-pill.testing i { background: #e1b460; animation: aiPulse 1s ease-in-out infinite; }
@keyframes aiPulse { 50% { opacity: .35; transform: scale(.75); } }
.api-key-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; margin-top: 5px; }
.api-key-row input,
.ai-config-block .field > input,
.ai-config-block .field > select,
.ai-config-block .field > textarea {
  width: 100%;
  border: 1px solid #3a272e;
  border-radius: 8px;
  background: #100c0e;
  color: #f3e9ec;
  outline: 0;
  font: 650 12px/1.35 inherit;
}
.api-key-row input, .ai-config-block .field > input, .ai-config-block .field > select { min-height: 39px; padding: 0 10px; }
.ai-config-block .field > textarea { min-height: 120px; padding: 10px; resize: vertical; line-height: 1.5; }
.api-key-row input:focus, .ai-config-block .field > input:focus, .ai-config-block .field > select:focus, .ai-config-block .field > textarea:focus { border-color: #743044; }
.ai-key-actions { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.danger-subtle { color: #d77b8f !important; }
.ai-player-toggle { margin: 10px 0; }
.ai-command-example { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 9px; align-items: center; padding: 10px; border: 1px solid #35222a; border-radius: 9px; background: #120d0f; }
.ai-command-example > .icon { width: 16px; height: 16px; justify-self: center; color: #dc5875; }
.ai-command-example strong, .ai-command-example small { display: block; }
.ai-command-example strong { font-size: 11px; }
.ai-command-example small { margin-top: 3px; color: #907b82; font-size: 9px; line-height: 1.45; }
.ai-tips-block p { margin: 9px 0 0; color: #947f86; font-size: 10px; line-height: 1.55; }

/* AI messages are visually distinct but stay inside the normal chat flow. */
.chat-message.ai-message { margin-top: 8px; padding: 9px 10px; border: 1px solid #482633; border-radius: 10px; background: linear-gradient(100deg, rgba(54,22,33,.62), rgba(16,12,14,.42)); }
.chat-message.ai-message .chat-avatar { background: #371924; border-color: #723249; color: #ff819e; }
.chat-message.ai-message .chat-copy header strong { color: #ff9bb0; }
.ai-badge-inline { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 5px; border: 1px solid #5e2c3c; border-radius: 999px; color: #dc6982; font-size: 7px; font-weight: 900; letter-spacing: .08em; vertical-align: middle; }
.ai-response-text { margin: 4px 0 0; white-space: pre-wrap; color: #eadfe3; font-size: 13px; line-height: 1.58; }
.ai-thinking-row { display: flex; align-items: center; gap: 7px; color: #9c858d; }
.ai-thinking-row i { width: 6px; height: 6px; border-radius: 50%; background: #d24b69; animation: aiPulse 1s ease-in-out infinite; }

.account-settings-card { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 9px; align-items: center; margin-bottom: 13px; padding: 10px; border: 1px solid #342229; border-radius: 9px; background: #120d0f; }
.account-settings-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #4a2935; border-radius: 9px; background: #221219; color: #df607c; }
.account-settings-icon .icon { width: 15px; height: 15px; }
.account-settings-copy { min-width: 0; }
.account-settings-copy span, .account-settings-copy strong, .account-settings-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-settings-copy span { color: #7f6d73; font-size: 8px; font-weight: 900; letter-spacing: .09em; }
.account-settings-copy strong { margin-top: 2px; font-size: 12px; }
.account-settings-copy small { margin-top: 2px; color: #947f86; font-size: 9px; }

@media (max-width: 1360px) {
  .composer { grid-template-columns: 40px minmax(0,1fr) 52px 52px 66px; }
  .panel-tabs { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 1180px) {
  .panel-tabs { grid-template-columns: repeat(2,1fr); }
  .composer { grid-template-columns: 38px minmax(0,1fr) 48px 48px 62px; }
  .composer-btn span { display: none; }
}

/* =========================
   POLVAX RPG V2.1
   IA universal + base de regras
   ========================= */
.ai-provider-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ai-advanced-details {
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid #342129;
  border-radius: 9px;
  background: #0e0a0c;
}
.ai-advanced-details summary {
  cursor: pointer;
  color: #bba7ad;
  font-size: 10px;
  font-weight: 850;
  user-select: none;
}
.ai-advanced-details[open] summary { margin-bottom: 9px; color: #e9dce0; }
.ai-key-optional { opacity: .72; }
.ai-key-optional::after {
  content: 'Opcional neste provedor';
  display: block;
  margin-top: 5px;
  color: #6fd7a2;
  font-size: 9px;
  font-weight: 800;
}
.ai-knowledge-intro {
  margin: 0 0 10px;
  color: #a9959d;
  font-size: 11px;
  line-height: 1.55;
}
.ai-knowledge-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.ai-knowledge-paste {
  display: grid;
  gap: 6px;
  margin-bottom: 9px;
}
.ai-knowledge-paste textarea {
  width: 100%;
  min-height: 88px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid #3a272e;
  border-radius: 8px;
  outline: 0;
  background: #100c0e;
  color: #f3e9ec;
  font: 650 12px/1.5 inherit;
}
.ai-knowledge-paste textarea:focus { border-color: #743044; }
.ai-knowledge-list {
  display: grid;
  gap: 6px;
  max-height: 245px;
  overflow: auto;
  padding-right: 2px;
}
.ai-knowledge-empty {
  padding: 14px 10px;
  border: 1px dashed #34242a;
  border-radius: 8px;
  color: #806d73;
  font-size: 10px;
  text-align: center;
}
.ai-knowledge-item {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) 31px;
  gap: 7px;
  align-items: center;
  min-height: 46px;
  padding: 6px;
  border: 1px solid #35232a;
  border-radius: 9px;
  background: #110c0e;
}
.ai-knowledge-item strong,
.ai-knowledge-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-knowledge-item strong { color: #eadfe3; font-size: 11px; }
.ai-knowledge-item small { margin-top: 2px; color: #806d73; font-size: 8px; }
.ai-knowledge-toggle,
.ai-knowledge-item .icon-only {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid #342229;
  border-radius: 7px;
  background: #171013;
  color: #806d73;
  cursor: pointer;
}
.ai-knowledge-toggle.active { color: #65d59c; border-color: #28533e; background: #102019; }
.ai-knowledge-toggle .icon,
.ai-knowledge-item .icon-only .icon { width: 12px; height: 12px; }
.ai-config-block .block-title > span:not(.ai-status-pill) { color: #806d73; font-size: 9px; font-weight: 800; }

@media (max-width: 1280px) {
  .ai-provider-grid { grid-template-columns: 1fr; }
}

/* ===== V2.2 · Rede Polvax ===== */
.social-section{padding-bottom:10px}
.social-nav-btn{width:100%;display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;border:0;background:transparent;color:#c8b9bf;padding:9px 10px;border-radius:8px;font:600 14px/1.1 inherit;text-align:left;cursor:pointer}
.social-nav-btn:hover{background:#21151a;color:#fff}
.social-nav-btn .icon{width:17px;height:17px;fill:currentColor}
.social-nav-btn i{font-style:normal;min-width:22px;height:20px;border-radius:999px;display:grid;place-items:center;background:#28191e;color:#a9939c;font-size:11px;font-weight:800;padding:0 6px}
.social-nav-btn i.has-items{background:#b82e50;color:#fff}
.network-dot{width:9px;height:9px;border-radius:50%;background:#67434d;box-shadow:0 0 0 3px rgba(103,67,77,.12)}
.network-dot.online{background:#48c78e;box-shadow:0 0 0 3px rgba(72,199,142,.12)}
.network-settings-card{border:1px solid #3a252c;background:#120d0f;border-radius:12px;padding:14px;margin:12px 0;display:grid;gap:11px}
.network-settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.network-settings-head>div{display:grid;gap:3px}.network-settings-head span{font-size:10px;letter-spacing:.13em;color:#8f777f;font-weight:800}.network-settings-head strong{font-size:15px;color:#f5eef1}
.network-status-pill{padding:5px 8px;border-radius:999px;background:#2a1a1f;color:#a9949b;font-size:10px;font-weight:800;letter-spacing:.08em}.network-status-pill.online{background:rgba(72,199,142,.13);color:#74dba7}
.social-dialog{width:min(900px,92vw);max-width:900px}.social-dialog>form{min-height:620px}
.social-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:4px 0 16px}
.social-tab{height:42px;border:1px solid #39252c;background:#130e10;color:#a9959d;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:8px;font:700 12px/1 inherit;cursor:pointer}.social-tab .icon{width:15px;height:15px;fill:currentColor}.social-tab:hover{background:#1d1317;color:#fff}.social-tab.active{border-color:#7b2940;background:#27141b;color:#f9edf1;box-shadow:inset 0 -2px 0 #c02f51}
.social-panel{display:none}.social-panel.active{display:block}.social-search-row{display:grid;grid-template-columns:1fr auto;gap:9px;margin-bottom:16px}.social-search-row .auth-input-wrap{height:44px}.social-search-row .primary-btn{height:44px}
.social-section-heading{display:flex;align-items:end;justify-content:space-between;margin:17px 0 8px;padding-bottom:7px;border-bottom:1px solid #2a1b20}.social-section-heading span{font-size:10px;letter-spacing:.14em;font-weight:900;color:#a98f98}.social-section-heading small{color:#765f67;font-size:11px}
.social-list{display:grid;gap:8px;max-height:280px;overflow:auto}.social-list.compact{max-height:170px}.social-empty{padding:18px;border:1px dashed #35242a;border-radius:10px;color:#806c73;text-align:center;font-size:13px}
.social-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px 11px;border:1px solid #302027;background:#120d0f;border-radius:10px}.social-row:hover{border-color:#4c2b36;background:#171013}.social-avatar{width:38px;height:38px;border-radius:10px;background:#26151c;border:1px solid #4a2b36;color:#e6ccd5;display:grid;place-items:center;font-weight:900;font-size:12px}.social-copy{min-width:0;display:grid;gap:2px}.social-copy strong{font-size:14px;color:#f4ecef;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.social-copy small{font-size:11px;color:#8c757d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.social-actions{display:flex;gap:6px}.social-action{height:32px;min-width:32px;border-radius:8px;border:1px solid #3c2730;background:#1b1115;color:#bda9b0;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 9px;font:700 11px/1 inherit;cursor:pointer}.social-action:hover{color:#fff;border-color:#6f3144}.social-action.primary{background:#8f2540;border-color:#b83252;color:#fff}.social-action.good{background:rgba(72,199,142,.11);border-color:rgba(72,199,142,.35);color:#79dcaa}.social-action.danger{color:#d78a9d}.social-action .icon{width:13px;height:13px;fill:currentColor}
.campaign-members-head{display:flex;align-items:center;justify-content:space-between;border:1px solid #39252c;background:#130d10;padding:13px;border-radius:11px;margin-bottom:13px}.campaign-members-head>div{display:grid;gap:4px}.campaign-members-head span{font-size:10px;letter-spacing:.13em;color:#8e747e;font-weight:800}.campaign-members-head strong{font-size:18px;color:#f4ecef}.cloud-chip{display:flex;align-items:center;gap:6px!important;background:rgba(72,199,142,.09);color:#75d7a5!important;border:1px solid rgba(72,199,142,.2);border-radius:999px;padding:6px 9px;font-size:10px!important;letter-spacing:.04em!important}.cloud-chip .icon{width:13px;height:13px;fill:currentColor}
.campaign-invite-controls{display:grid;grid-template-columns:1fr 150px auto;align-items:end;gap:9px}.campaign-invite-controls .field{margin:0}.campaign-invite-controls .primary-btn{height:42px;margin-bottom:1px}
.campaign.cloud .campaign-glyph{box-shadow:inset 0 0 0 1px rgba(72,199,142,.23)}.campaign-cloud-mark{display:inline-flex;align-items:center;gap:4px;color:#69ce9a!important}.campaign-cloud-mark .icon{width:9px;height:9px;fill:currentColor}
@media (max-width:1250px){.campaign-invite-controls{grid-template-columns:1fr 120px}.campaign-invite-controls .primary-btn{grid-column:1/-1}.social-dialog{width:min(780px,94vw)}}
.auth-network-setup{margin-top:10px;padding:11px;border:1px solid #35232a;background:#110c0e;border-radius:10px;display:grid;gap:8px}.auth-network-setup>div:first-child{display:flex;gap:9px;align-items:center;color:#a89098}.auth-network-setup>div:first-child>.icon{width:16px;height:16px;fill:#c53456}.auth-network-setup>div:first-child>span{display:grid;gap:1px}.auth-network-setup strong{font-size:11px;color:#e7dce0}.auth-network-setup small{font-size:10px;color:#7d6870}.auth-network-controls{display:grid;grid-template-columns:1fr auto;gap:7px}.auth-network-controls input{height:36px;border:1px solid #3a272e;background:#0a0809;color:#e8dfe2;border-radius:7px;padding:0 10px;font:600 11px/1 inherit;outline:none}.auth-network-controls input:focus{border-color:#823047}.auth-network-controls button{height:36px;border:1px solid #773047;background:#32131d;color:#f4e7eb;border-radius:7px;padding:0 11px;font:800 10px/1 inherit;cursor:pointer}.auth-network-controls button:hover{background:#4b1928}

/* V2.3 · call online */
.profile-actions{grid-template-columns:repeat(5,1fr)}
.icon-btn.danger{background:rgba(229,57,76,.13);color:#ff6a7d;border-color:rgba(229,57,76,.24)}
.icon-btn.danger:hover{background:#b92d42;color:#fff;border-color:#cf3b51}
.participant-net{margin-left:auto;color:#67d49a;display:grid;place-items:center;opacity:.9}
.participant-net .icon{width:12px;height:12px}
.participant.sharing{background:rgba(201,37,70,.07)}
.participant.sharing .participant-avatar{box-shadow:0 0 0 1px rgba(239,71,103,.65),0 0 18px rgba(239,71,103,.12)}
.remote-voice-audio{display:none!important}
.rtc-settings-card{border-color:#26372e;background:linear-gradient(180deg,#101712,#0f0d0e)}
.rtc-credentials-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.live-pill:not(.online){border-color:#39262d;background:#120d0f;color:#9f8f95}
.live-pill:not(.online) i{background:#66575d;box-shadow:none}
@media (max-width:1200px){.rtc-credentials-row{grid-template-columns:1fr}}

/* ===== POLVAX RPG V2.6 · Sessão Viva ===== */
.scene-hero{display:grid;grid-template-columns:44px 1fr auto;gap:10px;align-items:center;background:radial-gradient(circle at 0 0,rgba(199,42,75,.18),transparent 46%),#131012}
.scene-hero-icon{width:44px;height:44px;border-radius:10px;display:grid;place-items:center;background:#27131b;border:1px solid #5f2d3d;color:#ff6b87}
.scene-hero-icon .icon{width:20px;height:20px}.scene-hero h3{font-size:15px;margin:2px 0 4px}.scene-hero p,.scene-help{font-size:11px;line-height:1.45;color:var(--muted);margin:0}
.scene-live-pill{font-size:8px;font-weight:900;letter-spacing:.1em;color:#bba8af;border:1px solid #38262d;background:#0d0a0b;border-radius:999px;padding:7px 8px;max-width:96px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scene-live-pill.live{color:#ffd9e1;border-color:#733247;background:#2a151d}
.scene-create-block .field{margin-top:8px}.scene-name-field input{font-size:12px}
.scene-list{display:grid;gap:7px;margin-top:9px}.scene-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid #302127;background:#100c0e;border-radius:9px;padding:9px}.scene-row.active{border-color:#703247;background:#1d1116}.scene-row-copy{min-width:0}.scene-row-copy strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scene-row-copy small{display:block;color:var(--muted-2);font-size:9px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scene-row-actions{display:flex;gap:5px}.scene-row-actions button{width:31px;height:31px;border-radius:7px;border:1px solid #352329;background:#181114;color:#cbb7be;display:grid;place-items:center;cursor:pointer}.scene-row-actions button:hover{color:#fff;border-color:#5d3040}.scene-row-actions .scene-activate{background:#512033;border-color:#743046;color:#fff}.scene-row-actions .icon{width:13px;height:13px}
.scene-fx-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.scene-fx-btn{min-height:68px;text-align:left;border:1px solid #302127;background:#151012;color:#eee;border-radius:9px;padding:9px;cursor:pointer;display:grid;grid-template-columns:22px 1fr;grid-template-rows:auto auto;column-gap:7px}.scene-fx-btn .icon{grid-row:1/3;width:18px;height:18px;color:#da6a81;margin-top:2px}.scene-fx-btn span{font-size:11px;font-weight:800}.scene-fx-btn small{font-size:8px;color:var(--muted-2);margin-top:2px}.scene-fx-btn:hover{border-color:#603040;background:#1c1216}.scene-fx-btn.danger{border-color:#56303a}
.scene-intensity-label{margin-top:12px}.master-hotbar{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.master-hotbar button{height:54px;border:1px solid #322228;background:#151012;color:#d6c3ca;border-radius:8px;display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;cursor:pointer;font-size:9px}.master-hotbar button:hover{color:#fff;border-color:#6a3144;background:#211219}.master-hotbar .icon{width:15px;height:15px;color:#e55d78}
.handout-list{display:grid;gap:6px;margin-top:9px}.handout-list-empty{font-size:10px;color:var(--muted-2);padding:9px;border:1px dashed #39262d;border-radius:8px;text-align:center}.handout-row{display:grid;grid-template-columns:34px 1fr auto;gap:8px;align-items:center;padding:8px;border:1px solid #302127;background:#100c0e;border-radius:9px}.handout-thumb{width:34px;height:34px;border-radius:7px;background:#201318;display:grid;place-items:center;overflow:hidden;color:#d8637c}.handout-thumb img{width:100%;height:100%;object-fit:cover}.handout-thumb .icon{width:14px;height:14px}.handout-row strong{display:block;font-size:10px}.handout-row small{display:block;font-size:8px;color:var(--muted-2);margin-top:2px}.handout-actions{display:flex;gap:4px}.handout-actions button{width:29px;height:29px;border:1px solid #352329;background:#181114;color:#cdbbc1;border-radius:7px;display:grid;place-items:center;cursor:pointer}.handout-actions button.reveal{background:#512033;color:#fff;border-color:#743046}.handout-actions .icon{width:12px;height:12px}
.whisper-compose{display:grid;gap:7px}.whisper-compose select,.whisper-compose textarea{width:100%;border:1px solid #34242a;background:#0d0a0b;color:#f6edf0;border-radius:8px;padding:9px;font-size:11px}.whisper-compose textarea{resize:vertical;min-height:74px;line-height:1.4}.whisper-compose .primary-btn{justify-content:center}
.moment-list{display:grid;gap:6px}.moment-card{display:grid;grid-template-columns:28px 1fr 24px;gap:8px;align-items:center;width:100%;text-align:left;border:1px solid #302127;background:#121012;color:#efe7ea;border-radius:9px;padding:9px;cursor:pointer}.moment-card:hover{border-color:#633044;background:#1d1217}.moment-card>.icon:first-child{width:16px;height:16px;color:#e5627c}.moment-card span b{display:block;font-size:10px}.moment-card span small{display:block;font-size:8px;color:var(--muted-2);margin-top:2px}.moment-play{width:11px!important;height:11px!important;color:#9a7e87}
.session-history-list{display:grid;gap:5px;max-height:190px;overflow:auto}.history-row{display:grid;grid-template-columns:auto 1fr;gap:7px;align-items:start;border-left:2px solid #4d2734;padding:5px 0 5px 8px}.history-row time{font-size:8px;color:#765f67}.history-row span{font-size:9px;color:#cdbdc2;line-height:1.35}.history-empty{font-size:9px;color:var(--muted-2);padding:8px 0}
.player-scene-hud{display:grid;grid-template-columns:38px 1fr;gap:9px;align-items:center;margin:9px 0;border:1px solid #51303a;background:linear-gradient(135deg,#1b1116,#100c0e);border-radius:10px;padding:9px}.player-scene-hud.hidden{display:none}.player-scene-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:8px;background:#2a1620;color:#ef6c86}.player-scene-icon .icon{width:17px;height:17px}.player-scene-hud span{display:block;font-size:7px;letter-spacing:.13em;color:#a98792;font-weight:900}.player-scene-hud strong{display:block;font-size:12px;margin-top:2px}.player-scene-hud small{display:block;font-size:8px;color:#7f6b72;margin-top:2px}
.scene-fx-overlay,.scene-fog-overlay{position:fixed;inset:0;pointer-events:none;z-index:95;opacity:0}.scene-fx-overlay.blackout{background:#000;animation:px-blackout var(--fx-duration,1.5s) ease both}.scene-fx-overlay.danger{background:radial-gradient(circle at center,transparent 25%,rgba(150,0,25,var(--fx-opacity,.6)) 100%);animation:px-danger var(--fx-duration,1.6s) ease both}.scene-fx-overlay.glitch{background:repeating-linear-gradient(0deg,rgba(255,255,255,.04) 0 2px,transparent 2px 5px);mix-blend-mode:screen;animation:px-glitch .55s steps(2,end) both}.scene-fx-overlay.flash{background:#fff;animation:px-scene-flash .22s ease-out both}.scene-fog-overlay.fog{opacity:1;background:radial-gradient(circle at 20% 30%,rgba(215,220,220,.15),transparent 35%),radial-gradient(circle at 75% 70%,rgba(220,225,225,.12),transparent 40%),linear-gradient(120deg,rgba(170,180,180,.08),rgba(220,220,220,.17),rgba(150,160,160,.08));filter:blur(12px);animation:px-fog 5s ease-in-out both}
.fx-shake-global{animation:px-global-shake .42s ease both}.fx-glitch-global{filter:contrast(1.1) saturate(.75);animation:px-shell-glitch .55s steps(2,end) both}
@keyframes px-blackout{0%{opacity:0}18%,72%{opacity:var(--fx-opacity,.85)}100%{opacity:0}}@keyframes px-danger{0%,100%{opacity:0}25%,70%{opacity:1}}@keyframes px-scene-flash{0%{opacity:0}20%{opacity:var(--fx-opacity,.7)}100%{opacity:0}}@keyframes px-fog{0%{opacity:0;transform:translateX(-2%)}20%,78%{opacity:1}100%{opacity:0;transform:translateX(2%)}}@keyframes px-global-shake{0%,100%{transform:translate(0)}20%{transform:translate(-5px,2px)}40%{transform:translate(5px,-2px)}60%{transform:translate(-3px,2px)}80%{transform:translate(3px,-1px)}}@keyframes px-glitch{0%{opacity:0;transform:translateX(0)}20%{opacity:.8;transform:translateX(-8px)}45%{opacity:.45;transform:translateX(10px)}70%{opacity:.65;transform:translateX(-4px)}100%{opacity:0;transform:translateX(0)}}@keyframes px-shell-glitch{0%,100%{transform:translateX(0)}25%{transform:translateX(2px)}50%{transform:translateX(-3px)}75%{transform:translateX(1px)}}
.handout-overlay{position:fixed;inset:0;z-index:120;background:rgba(3,2,3,.82);backdrop-filter:blur(9px);display:grid;place-items:center;padding:32px}.handout-overlay.hidden{display:none}.handout-card{width:min(760px,92vw);max-height:88vh;background:#120d0f;border:1px solid #59303d;border-radius:16px;box-shadow:0 30px 100px rgba(0,0,0,.65);overflow:hidden}.handout-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #302027}.handout-head h2{font-size:19px;margin-top:3px}.handout-body{padding:22px;overflow:auto;max-height:calc(88vh - 75px);font-size:14px;line-height:1.65;color:#efe6e9;white-space:pre-wrap}.handout-body img{display:block;max-width:100%;max-height:55vh;object-fit:contain;margin:0 auto 18px;border-radius:10px;border:1px solid #36252b}.handout-body p{margin:0;white-space:pre-wrap}.handout-editor-dialog{width:min(600px,92vw)}.handout-image-picker{display:flex;align-items:center;gap:9px;margin:10px 0 4px}.handout-image-picker span{font-size:10px;color:var(--muted)}
.whisper-host{position:fixed;right:22px;top:20px;z-index:130;width:min(360px,calc(100vw - 44px));display:grid;gap:9px;pointer-events:none}.whisper-card{pointer-events:auto;border:1px solid #6a3545;background:linear-gradient(135deg,#21131a,#100c0e);box-shadow:0 18px 50px rgba(0,0,0,.5);border-radius:12px;padding:12px 13px;animation:px-whisper-in .2s ease both}.whisper-card header{display:flex;justify-content:space-between;gap:8px;align-items:center}.whisper-card header strong{font-size:10px;letter-spacing:.1em;color:#ef8196}.whisper-card button{border:0;background:transparent;color:#8e737c;cursor:pointer}.whisper-card p{font-size:12px;line-height:1.45;color:#f0e7ea;margin:7px 0 0}.whisper-card small{display:block;font-size:8px;color:#826d74;margin-top:5px}@keyframes px-whisper-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1100px){.scene-fx-grid{grid-template-columns:1fr}.master-hotbar{grid-template-columns:repeat(2,1fr)}}

/* V2.6 · servidor, armazenamento e anexos reais */
.network-storage-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 12px}.network-storage-summary>span{display:flex;flex-direction:column;gap:3px;padding:10px 11px;border:1px solid #2f2228;border-radius:10px;background:#0d090b}.network-storage-summary b{font-size:12px;color:#f7eef1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.network-storage-summary small{font-size:10px;color:#947f87}.attachment-download-btn{border:1px solid #3a2930;background:#171014;color:#eadde2;border-radius:8px;display:inline-flex;align-items:center;gap:6px;justify-content:center;min-height:30px;padding:5px 9px;font:700 11px/1 inherit;cursor:pointer}.attachment-download-btn:hover{border-color:#8d334c;background:#24131a;color:#fff}.attachment-download-btn .icon{width:13px;height:13px}.attachment-image-meta .attachment-download-btn{margin-left:auto;min-width:32px;padding:5px}.attachment-card{gap:10px}.attachment-card>.attachment-download-btn{margin-left:auto}@media(max-width:1200px){.network-storage-summary{grid-template-columns:1fr}}

/* V2.7 · Organização de campanha */
.stage-column.workspace-mode { grid-template-rows: 64px minmax(0, 1fr); }
.stage-column.workspace-mode .stream-card,
.stage-column.workspace-mode .chat-card { display:none; }
.stage-column.workspace-mode .campaign-workspace { display:block; grid-row:2; min-height:0; }
.campaign-workspace { display:none; min-height:0; overflow:hidden; }
.workspace-view { display:none; height:100%; min-height:0; }
.workspace-view.active { display:flex; flex-direction:column; gap:14px; min-height:0; }
.workspace-head { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:18px 20px; border:1px solid #302126; background:linear-gradient(180deg,#130e10,#100c0e); border-radius:14px; }
.workspace-head h2 { margin:3px 0 5px; font-size:24px; letter-spacing:-.02em; }
.workspace-head p { margin:0; color:#aa969e; font-size:14px; max-width:760px; line-height:1.55; }
.workspace-head .primary-btn { flex:0 0 auto; }
.organizer-nav .icon { opacity:.78; }
.organizer-nav.active .icon { opacity:1; fill:#ff4d72; }
.calendar-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:14px; min-height:0; flex:1; }
.calendar-card,.upcoming-card,.library-index,.library-reader { border:1px solid #302126; background:#100c0e; border-radius:14px; min-height:0; }
.calendar-card { display:flex; flex-direction:column; overflow:hidden; }
.calendar-toolbar { min-height:58px; padding:10px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #2b1d22; }
.calendar-toolbar > strong { font-size:17px; text-transform:capitalize; }
.calendar-nav { display:flex; align-items:center; gap:7px; }
.calendar-weekdays { display:grid; grid-template-columns:repeat(7,1fr); border-bottom:1px solid #2a1c21; background:#0d0a0b; }
.calendar-weekdays span { padding:10px 8px; text-align:center; color:#806d75; font-size:10px; font-weight:800; letter-spacing:.14em; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-template-rows:repeat(6,minmax(88px,1fr)); flex:1; min-height:0; }
.calendar-day { position:relative; padding:8px; border-right:1px solid #23181c; border-bottom:1px solid #23181c; overflow:hidden; background:#100c0e; transition:background .14s ease,border-color .14s ease; }
.calendar-day:nth-child(7n) { border-right:0; }
.calendar-day.outside { background:#0d0a0b; color:#5f5056; }
.calendar-day.today { box-shadow:inset 0 0 0 1px #bb2b4a; background:#130d10; }
.calendar-day.master-editable { cursor:pointer; }
.calendar-day.master-editable:hover { background:#171014; }
.calendar-day-number { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; font-size:12px; font-weight:800; color:#d8cbd0; }
.calendar-day.today .calendar-day-number b { display:grid; place-items:center; min-width:25px; height:25px; padding:0 5px; border-radius:7px; background:#c92d50; color:white; }
.calendar-events { display:flex; flex-direction:column; gap:4px; }
.calendar-event-pill { width:100%; border:0; text-align:left; border-radius:6px; padding:5px 7px; background:#25151b; color:#dbcbd1; font:inherit; font-size:11px; line-height:1.2; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.calendar-event-pill:hover { background:#351b24; }
.calendar-event-pill[data-event-type="session"] { border-left:3px solid #f13d65; }
.calendar-event-pill[data-event-type="world"] { border-left:3px solid #b88cff; }
.calendar-event-pill[data-event-type="deadline"] { border-left:3px solid #e3ad51; }
.calendar-event-pill[data-event-type="reminder"] { border-left:3px solid #6eb6ff; }
.upcoming-card { padding:14px; overflow:auto; }
.workspace-subhead { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:12px; border-bottom:1px solid #291b20; }
.workspace-subhead h3 { margin:3px 0 0; font-size:17px; }
.count-chip { min-width:28px; height:26px; display:grid; place-items:center; padding:0 8px; background:#21141a; border:1px solid #3a242d; border-radius:999px; color:#d9c7ce; font-size:11px; font-weight:800; }
.upcoming-list { display:flex; flex-direction:column; gap:8px; padding-top:11px; }
.upcoming-event { display:grid; grid-template-columns:45px minmax(0,1fr); gap:10px; padding:10px; border:1px solid #2d1d23; background:#151013; border-radius:10px; cursor:pointer; }
.upcoming-event:hover { border-color:#53303c; background:#191115; }
.upcoming-date { display:flex; flex-direction:column; align-items:center; justify-content:center; border-radius:8px; background:#211219; min-height:45px; }
.upcoming-date strong { font-size:18px; line-height:1; color:#fff; }
.upcoming-date small { margin-top:3px; font-size:9px; font-weight:800; color:#b78d9b; letter-spacing:.08em; }
.upcoming-copy strong { display:block; font-size:13px; color:#eee4e7; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.upcoming-copy small { display:block; margin-top:4px; color:#8e7a82; font-size:11px; line-height:1.35; }
.empty-upcoming { padding:26px 10px; text-align:center; color:#77656c; font-size:12px; line-height:1.5; }
.library-layout { display:grid; grid-template-columns:300px minmax(0,1fr); gap:14px; flex:1; min-height:0; }
.library-index { display:flex; flex-direction:column; padding:12px; overflow:hidden; }
.workspace-search { min-height:42px; display:flex; align-items:center; gap:9px; padding:0 11px; border:1px solid #332128; background:#0c090a; border-radius:9px; flex:0 0 auto; }
.workspace-search .icon { width:14px; height:14px; opacity:.58; }
.workspace-search input { width:100%; border:0; outline:0; background:transparent; color:#f1e8eb; font:inherit; font-size:13px; }
.library-list { display:flex; flex-direction:column; gap:7px; min-height:0; overflow:auto; padding-top:10px; }
.library-list-item { width:100%; display:block; text-align:left; padding:11px; border:1px solid #2b1c21; background:#151013; border-radius:9px; color:inherit; cursor:pointer; }
.library-list-item:hover { border-color:#47303a; background:#191216; }
.library-list-item.active { border-color:#7e2b40; background:#25131a; box-shadow:inset 3px 0 #d63559; }
.library-list-item header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.library-list-item strong { font-size:13px; color:#f0e5e9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.library-list-item time,.library-list-item small { color:#837078; font-size:10px; }
.library-list-item p { margin:6px 0 0; color:#9d8991; font-size:11px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.library-reader { overflow:auto; padding:24px 28px; }
.empty-library-state { height:100%; min-height:260px; display:grid; place-items:center; align-content:center; text-align:center; color:#76646b; }
.empty-library-state .icon { width:30px; height:30px; margin-bottom:12px; opacity:.46; }
.empty-library-state h3 { margin:0 0 5px; color:#c4b5ba; font-size:17px; }
.empty-library-state p { margin:0; font-size:12px; }
.reader-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding-bottom:17px; border-bottom:1px solid #2c1e23; }
.reader-head h2 { margin:3px 0 4px; font-size:26px; letter-spacing:-.025em; }
.reader-head p { margin:0; color:#8f7b83; font-size:12px; }
.reader-actions { display:flex; gap:7px; flex:0 0 auto; }
.reader-section { padding-top:20px; }
.reader-section h3 { margin:0 0 8px; font-size:12px; color:#d34863; letter-spacing:.08em; text-transform:uppercase; }
.reader-prose { color:#d4c7cc; font-size:14px; line-height:1.75; white-space:pre-wrap; overflow-wrap:anywhere; }
.reader-prose.muted { color:#9f8c93; }
.wiki-filter-row { display:flex; gap:5px; flex-wrap:wrap; padding-top:10px; }
.wiki-filter { border:1px solid #322129; background:#171013; color:#9c8990; border-radius:999px; padding:6px 8px; font:inherit; font-size:9px; font-weight:800; cursor:pointer; }
.wiki-filter.active { background:#381622; border-color:#7e2840; color:#ffb2c2; }
.wiki-tag { display:inline-flex; align-items:center; min-height:22px; padding:0 8px; margin:3px 4px 0 0; border:1px solid #3a2630; border-radius:999px; background:#1b1115; color:#a9929b; font-size:10px; }
.wiki-private-badge { display:inline-flex; align-items:center; gap:5px; margin-left:7px; padding:4px 7px; border:1px solid #573042; border-radius:999px; color:#e795aa; font-size:9px; font-weight:800; vertical-align:middle; }
.organizer-dialog { width:min(720px,calc(100vw - 28px)); }
.organizer-dialog textarea { resize:vertical; min-height:100px; }
.dialog-actions { display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:8px; margin-top:14px; }
.danger-outline-btn { min-height:38px; display:inline-flex; align-items:center; gap:8px; padding:0 12px; border:1px solid #63303d; background:#211014; color:#e993a7; border-radius:8px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.danger-outline-btn:hover { background:#2d1219; border-color:#8b3a4e; }
.check-row { display:flex; align-items:flex-start; gap:10px; padding:11px 12px; border:1px solid #312128; background:#120d0f; border-radius:9px; }
.check-row input { margin-top:3px; }
.check-row span { display:flex; flex-direction:column; gap:3px; }
.check-row strong { font-size:12px; color:#e5d9dd; }
.check-row small { font-size:10px; color:#806d74; }
.organizer-master-only.hidden-by-role { display:none !important; }

@media (max-width: 1200px) {
  .calendar-layout { grid-template-columns:minmax(0,1fr) 250px; }
  .library-layout { grid-template-columns:250px minmax(0,1fr); }
  .calendar-grid { grid-template-rows:repeat(6,minmax(76px,1fr)); }
}


/* V2.9 · Call Pro */
.call-health-bar{display:flex;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid #21171b;border-bottom:1px solid #21171b;background:#0d0a0b;min-height:42px}
.call-health-item{display:flex;align-items:center;gap:7px;padding:6px 9px;border:1px solid #2b1c22;border-radius:8px;background:#120e10;color:#9d8f94;font-size:10px;font-weight:800;letter-spacing:.04em;white-space:nowrap}
.call-health-item .icon{width:13px;height:13px;fill:#d7cbd0}.call-health-item strong{color:#f3ebee;font-size:10px}.mic-health{min-width:205px}.mic-level-meter{height:7px;flex:1;min-width:70px;border-radius:99px;overflow:hidden;background:#27191f;border:1px solid #332229}.mic-level-meter i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#4acb8b,#d5c35b,#ef4767);transition:width 70ms linear}.screen-volume-control{min-width:220px}.screen-volume-control input{width:90px;accent-color:#d62e50}.call-quality-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid #342329;background:#171014;border-radius:999px;padding:5px 9px;color:#b5a6ab;font-size:10px;font-weight:800}.call-quality-pill i{width:7px;height:7px;border-radius:50%;background:#726267}.call-quality-pill.excellent i{background:#48c78e;box-shadow:0 0 10px rgba(72,199,142,.35)}.call-quality-pill.good i{background:#d5b95b}.call-quality-pill.poor i{background:#ef4767;box-shadow:0 0 10px rgba(239,71,103,.3)}.call-quality-pill.offline{opacity:.62}
.participant.speaking{background:rgba(72,199,142,.08)}.participant.speaking .participant-avatar{box-shadow:0 0 0 2px rgba(72,199,142,.8),0 0 18px rgba(72,199,142,.16)}.participant-speaking{display:grid;place-items:center;color:#55d99a}.participant-speaking .icon{width:13px;height:13px;fill:currentColor}
.call-pro-settings{padding:14px}.call-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.call-settings-grid .field{margin:0}.call-settings-grid select,.call-settings-grid input{min-height:42px}.call-processing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:11px}.check-row.compact{margin:0;padding:10px;border:1px solid #2b1d22;border-radius:9px;background:#110d0f;align-items:flex-start}.check-row.compact strong{font-size:11px}.check-row.compact small{font-size:9px;line-height:1.35}.mic-test-panel{display:grid;grid-template-columns:max-content max-content 1fr;gap:8px;align-items:center;margin-top:11px}.mic-test-meter{display:flex;align-items:center;gap:8px;min-width:180px;color:#9d8f94;font-size:10px}.mic-test-meter .mic-level-meter{min-width:100px}.rtc-advanced-details{margin-top:12px;border-top:1px solid #2b1d22;padding-top:10px}.rtc-advanced-details summary{cursor:pointer;color:#bbaeb3;font-size:11px;font-weight:800;padding:5px 0 10px}.rtc-advanced-details .field{margin-top:8px}
.mixer-dialog{width:min(620px,92vw)}.mixer-dialog .dialog-head p{margin:5px 0 0;color:#887a80;font-size:11px}.mixer-master-card{display:grid;gap:8px;border:1px solid #2b1c22;border-radius:10px;background:#110d0f;padding:10px}.mixer-master-card label{display:grid;grid-template-columns:145px 1fr 44px;gap:10px;align-items:center}.mixer-master-card label>span{display:flex;align-items:center;gap:7px;font-size:11px}.mixer-master-card .icon{width:14px;height:14px}.mixer-master-card input,.mixer-person input{accent-color:#d62e50}.mixer-master-card strong,.mixer-person b{text-align:right;font-size:10px;color:#cbbdc2}.mixer-section-head{display:flex;align-items:center;justify-content:space-between;margin:17px 1px 8px}.mixer-section-head div{display:flex;flex-direction:column;gap:2px}.mixer-section-head span{font-size:9px;color:#806f76;font-weight:900;letter-spacing:.12em}.mixer-section-head strong{font-size:13px}.mixer-section-head>span{border:1px solid #342229;border-radius:999px;padding:3px 7px}.voice-mixer-list{display:grid;gap:6px;max-height:340px;overflow:auto}.mixer-person{display:grid;grid-template-columns:36px minmax(130px,1fr) 16px minmax(120px,1fr) 42px;gap:9px;align-items:center;border:1px solid #281b20;border-radius:9px;background:#0f0c0d;padding:8px}.mixer-person.speaking{border-color:rgba(72,199,142,.42);background:rgba(72,199,142,.04)}.mixer-person-avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#25171d;font-weight:900;font-size:10px}.mixer-person-copy{min-width:0}.mixer-person-copy strong,.mixer-person-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mixer-person-copy strong{font-size:12px}.mixer-person-copy small{font-size:9px;color:#83747a;margin-top:2px}.mixer-person>.icon{width:13px;height:13px;fill:#a9959d}.mixer-empty{border:1px dashed #342329;border-radius:10px;padding:20px;text-align:center;color:#8f8086;font-size:11px}.mixer-hint{display:flex;gap:8px;align-items:flex-start;margin-top:12px;color:#83747a;font-size:9px;line-height:1.45}.mixer-hint .icon{width:13px;height:13px;flex:0 0 auto;margin-top:1px}
@media(max-width:1050px){.call-health-bar{flex-wrap:wrap}.call-processing-grid{grid-template-columns:1fr}.call-settings-grid{grid-template-columns:1fr}.mic-test-panel{grid-template-columns:1fr 1fr}.mic-test-meter{grid-column:1/-1}.mixer-person{grid-template-columns:36px 1fr 16px 100px 38px}}

/* =========================================================
   V2.9 · SERVIDOR DA CAMPANHA
   ========================================================= */
.channel-tree{display:flex;flex-direction:column;gap:12px}.channel-category{display:flex;flex-direction:column;gap:3px}.channel-category-title{display:flex;align-items:center;justify-content:space-between;padding:0 8px;margin-top:2px;color:#8f7f85;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.channel-category-title span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.channel-tree .channel{width:100%;display:flex;align-items:center;gap:9px;border:0;background:transparent;color:#b9a9af;padding:8px 10px;border-radius:8px;text-align:left;font:inherit;font-size:14px;font-weight:620;cursor:pointer;transition:.14s ease}.channel-tree .channel:hover{background:#1a1215;color:#f1e9ec}.channel-tree .channel.active{background:#211319;color:#fff}.channel-tree .channel.active .icon{color:#e53d62}.channel-tree .channel .icon{width:15px;height:15px;color:#8c7d82;flex:0 0 auto}.channel-tree .channel.voice.joined{background:#102018;color:#dffbea}.channel-tree .channel.voice.joined .icon{color:#55e59a}.channel-tree .channel i{margin-left:auto;min-width:22px;height:20px;border-radius:10px;display:grid;place-items:center;background:#181113;color:#9b8b91;font-size:11px;font-style:normal}.channel-tree .channel.locked:after{content:'PRIVADO';margin-left:auto;font-size:9px;letter-spacing:.09em;color:#bca3ad}.master-channel-manage{display:none}.app-shell.master-role .master-channel-manage{display:grid}.notification-btn{position:relative;width:38px;height:38px;border:1px solid #2b2024;border-radius:10px;background:#120e10;color:#a9999f;display:grid;place-items:center;cursor:pointer}.notification-btn:hover{color:#fff;border-color:#51303a;background:#1a1115}.notification-btn .icon{width:15px;height:15px}.notification-badge{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#df3157;color:white;font-size:10px;font-weight:900;display:none;place-items:center;border:2px solid #0b090a}.notification-badge.has-items{display:grid}.server-manage-dialog{width:min(930px,94vw)}.server-manage-card{width:100%;max-height:min(800px,88vh);overflow:auto}.server-manage-tabs{display:flex;gap:6px;padding:4px;background:#0d0a0b;border:1px solid #281d21;border-radius:10px;margin:18px 0}.server-manage-tab{flex:1;border:0;border-radius:7px;background:transparent;color:#9f9095;padding:10px 12px;font-weight:800;cursor:pointer}.server-manage-tab.active{background:#28151c;color:#fff}.server-manage-panel{display:none;gap:14px}.server-manage-panel.active{display:grid}.server-builder-row{display:flex;gap:10px;align-items:end}.server-builder-row .grow{flex:1}.server-builder-box{display:grid;gap:13px;padding:15px;background:#0d0a0b;border:1px solid #2b2024;border-radius:12px}.server-builder-box>div:first-child{display:flex;flex-direction:column;gap:3px}.server-builder-box>div:first-child strong{font-size:15px}.server-builder-grid{display:grid;grid-template-columns:1.25fr .85fr 1fr 1fr;gap:10px}.server-builder-grid .role-access-field{grid-column:span 2}.channel-manager-list,.role-manager-list,.member-role-assignments{display:grid;gap:10px}.channel-manager-category{border:1px solid #2b2024;border-radius:12px;overflow:hidden;background:#0d0a0b}.channel-manager-category-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#120d0f;border-bottom:1px solid #271c20}.channel-manager-category-head input{flex:1;background:transparent;border:0;color:#f3ebee;font-weight:850;text-transform:uppercase;letter-spacing:.07em;outline:none}.channel-manager-category-head small{color:#786d71}.channel-manager-row{display:grid;grid-template-columns:32px minmax(120px,1fr) 108px 150px 34px;gap:8px;align-items:center;padding:9px 12px;border-bottom:1px solid #21181b}.channel-manager-row:last-child{border-bottom:0}.channel-manager-row>.icon{width:14px;height:14px;color:#8f7c83;justify-self:center}.channel-manager-row input,.channel-manager-row select,.role-card input,.role-card select,.member-role-row select{width:100%;background:#151013;border:1px solid #302329;border-radius:8px;color:#eee5e8;padding:8px 9px;font:inherit;font-size:12px;outline:none}.channel-manager-row input:focus,.channel-manager-row select:focus,.role-card input:focus,.member-role-row select:focus{border-color:#8b3149}.mini-danger-btn{width:32px;height:32px;border:1px solid #3c2029;border-radius:8px;background:#1a0f13;color:#bd6a7d;display:grid;place-items:center;cursor:pointer}.mini-danger-btn:hover{background:#31131c;color:#ff718f}.mini-danger-btn .icon{width:12px;height:12px}.role-card{display:grid;grid-template-columns:180px 1fr 34px;gap:12px;align-items:start;padding:14px;border:1px solid #2b2024;border-radius:12px;background:#0d0a0b}.role-card-title{display:grid;gap:7px}.role-card-title small{color:#766a6e;font-size:10px;line-height:1.4}.role-permissions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.permission-toggle{display:flex;gap:8px;align-items:center;padding:8px 9px;border:1px solid #2a1f23;border-radius:8px;background:#120d0f;color:#bcaeb3;font-size:11px;font-weight:700}.permission-toggle input{width:14px;height:14px;accent-color:#d9365c}.member-role-row{display:grid;grid-template-columns:42px 1fr 210px;gap:10px;align-items:center;padding:10px;border:1px solid #291e22;border-radius:10px;background:#100c0e}.member-role-row .social-avatar{width:34px;height:34px}.member-role-row strong{font-size:13px}.member-role-row small{display:block;color:#81757a;font-size:11px;margin-top:2px}.notifications-dialog{width:min(590px,92vw)}.notifications-card{width:100%}.notification-actions{display:flex;justify-content:flex-end;gap:8px;margin:10px 0}.notifications-list{display:grid;gap:8px;max-height:58vh;overflow:auto}.notification-row{display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:start;padding:12px;border:1px solid #2b2024;border-radius:10px;background:#0e0a0c}.notification-row.unread{border-color:#633044;background:#151014}.notification-icon{width:34px;height:34px;border-radius:9px;background:#25131a;color:#e34568;display:grid;place-items:center}.notification-icon .icon{width:14px;height:14px}.notification-copy strong{font-size:13px;color:#f1e9ec}.notification-copy p{margin:3px 0 0;color:#9d8e93;font-size:12px;line-height:1.45}.notification-copy small{display:block;margin-top:6px;color:#655b5f;font-size:10px}.notification-read-dot{width:8px;height:8px;border-radius:50%;background:#d9365c;margin-top:7px}.notification-empty{padding:36px 16px;text-align:center;color:#796d71}.danger-text{color:#ca6379!important}.server-manage-card .field span,.server-manage-card .field{font-size:11px}.role-hidden-by-permission{display:none!important}

@media(max-width:1180px){.server-builder-grid{grid-template-columns:1fr 1fr}.role-permissions{grid-template-columns:repeat(2,minmax(0,1fr))}.role-card{grid-template-columns:160px 1fr 34px}}


/* V3.0 Web runtime */
html[data-runtime="web"] .auth-network-setup { opacity:.92; }
html[data-runtime="web"] .auth-network-controls input:disabled,
html[data-runtime="web"] #networkBaseUrl:disabled { opacity:.82; cursor:not-allowed; }
html[data-runtime="web"] .source-picker-dialog { display:none !important; }
html[data-runtime="web"] body::after { content:"WEB"; position:fixed; right:14px; bottom:12px; z-index:5; font:700 9px/1 system-ui,sans-serif; letter-spacing:.16em; color:#6f5b62; pointer-events:none; }
@media (display-mode: standalone) { html[data-runtime="web"] body::after { content:"PWA"; } }

.web-install-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:14px;border:1px solid #2f2026;border-radius:12px;background:linear-gradient(135deg,#171014,#110c0f);margin-bottom:12px}.web-install-card .account-settings-copy{min-width:0}.web-install-card .mini-tool-btn:disabled{opacity:.45;cursor:not-allowed}@media(max-width:760px){.web-install-card{grid-template-columns:auto 1fr}.web-install-card .mini-tool-btn{grid-column:1/-1;width:100%;justify-content:center}}

/* =========================================================
   V3.0.3 · BUGFIX / ORGANIZAÇÃO WEB
   Layout travado no viewport, chat sem empurrar a tela,
   configurações responsivas e amizade por link.
   ========================================================= */
html, body { width:100%; height:100%; min-height:0; overflow:hidden; }
.app-shell {
  height:100dvh;
  min-height:0;
  max-height:100dvh;
  overflow:hidden;
  grid-template-columns:minmax(250px,286px) minmax(0,1fr) minmax(320px,380px);
}

/* A barra lateral não cresce para fora da tela quando há muitos canais. */
.sidebar {
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(72px,auto) auto minmax(110px,1fr) auto minmax(72px,.55fr) auto;
  align-content:stretch;
}
.sidebar > * { min-width:0; }
.campaigns-section { min-height:0; overflow:hidden; }
#campaignList { max-height:154px; min-height:0; overflow-y:auto; padding-right:2px; scrollbar-gutter:stable; }
.channels-section { min-height:0; overflow:hidden; display:flex; flex-direction:column; }
#channelTree { flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; padding-right:2px; scrollbar-gutter:stable; }
.organizer-section { flex:0 0 auto; }
.participants-section { min-height:0; overflow:hidden; }
.participants-list { flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; }
.profile-card { min-width:0; margin-top:4px; }
/* Preview era ferramenta de protótipo. Na versão web online só ocupava espaço. */
html[data-runtime="web"] #openTestPlayerBtn { display:none !important; }

/* O conteúdo central nunca aumenta a página: apenas o feed rola. */
.stage-column {
  height:100dvh;
  min-height:0;
  max-height:100dvh;
  overflow:hidden;
}
.stage-column.text-mode { grid-template-rows:64px minmax(0,1fr); }
.stage-column.text-mode .chat-card,
#chatCard {
  min-height:0;
  max-height:100%;
  height:100%;
  overflow:hidden;
}
.chat-log {
  min-height:0;
  max-height:100%;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  overflow-anchor:auto;
}
.chat-message, .chat-copy { min-width:0; }
.chat-copy p { max-width:78ch; }
.composer {
  min-width:0;
  position:relative;
  z-index:4;
  background:#131012;
  box-shadow:0 -8px 22px rgba(0,0,0,.16);
}
.composer > * { min-width:0; }
.composer input { width:100%; min-width:0; }
.dice-card-v19 {
  min-width:0;
  width:min(310px,100%);
  max-width:310px;
  margin-top:5px;
  padding:8px 10px !important;
}
.dice-card-icon { width:32px; height:32px; }
.dice-card-v19 strong { font-size:18px; }

/* Painel direito também rola por dentro em vez de aumentar o documento. */
.master-panel, .player-panel { min-height:0; max-height:100dvh; overflow:hidden; }
.tab-panel.active { min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; }

/* Configurações: antes a segunda coluna escapava do modal. */
#settingsDialog {
  width:min(720px,calc(100vw - 28px));
  max-width:720px;
  max-height:min(90dvh,860px);
  overflow:hidden;
}
#settingsDialog > form {
  max-height:min(90dvh,860px);
  overflow-y:auto;
  overflow-x:hidden;
  padding:20px;
  scrollbar-gutter:stable;
}
#settingsDialog .network-settings-card,
#settingsDialog .rtc-settings-card,
#settingsDialog .field,
#settingsDialog .call-settings-grid > *,
#settingsDialog .call-processing-grid > * { min-width:0; }
#settingsDialog input:not([type="checkbox"]):not([type="range"]),
#settingsDialog select { width:100%; max-width:100%; min-width:0; }
.call-settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.call-processing-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.mic-test-panel { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:9px; }
.mic-test-panel > button { width:100%; justify-content:center; }
.mic-test-meter { grid-column:1/-1; min-width:0; }
.rtc-credentials-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.volume-settings label { grid-template-columns:140px minmax(0,1fr); gap:12px; }

/* Social organizado e link de amizade. */
.social-dialog { width:min(900px,calc(100vw - 28px)); }
.social-dialog > form {
  height:min(720px,90dvh);
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.social-dialog .dialog-head,
.social-tabs { flex:0 0 auto; }
.social-panel.active { min-height:0; overflow-y:auto; overflow-x:hidden; padding-right:4px; scrollbar-gutter:stable; }
.friend-link-card {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  margin-bottom:12px;
  padding:12px;
  border:1px solid #3c2730;
  border-radius:11px;
  background:linear-gradient(135deg,#191014,#110c0f);
}
.friend-link-icon {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:1px solid #5a2a3a;
  border-radius:10px;
  background:#26131a;
  color:#ef6b88;
}
.friend-link-icon .icon { width:17px; height:17px; }
.friend-link-copy { min-width:0; }
.friend-link-copy span,
.friend-link-copy strong,
.friend-link-copy small { display:block; }
.friend-link-copy span { color:#8d7880; font-size:10px; font-weight:900; letter-spacing:.11em; }
.friend-link-copy strong { margin-top:3px; color:#f8eef2; font-size:14px; }
.friend-link-copy small { margin-top:3px; color:#9a868d; font-size:11px; line-height:1.35; }
.friend-copy-btn { white-space:nowrap; }
.friend-invite-hint {
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid rgba(72,199,142,.35);
  border-radius:9px;
  background:rgba(72,199,142,.07);
  color:#bdebd2;
  font-size:12px;
  line-height:1.4;
}
.social-search-row { grid-template-columns:minmax(0,1fr) auto; }
.social-search-row .auth-input-wrap,
.social-search-row input { min-width:0; width:100%; }

/* Organização central: conteúdo interno rola, cabeçalhos não escapam. */
.campaign-workspace,
.workspace-view,
.library-layout,
.library-index,
.library-reader { min-height:0; max-height:100%; }
.library-index, .library-reader { overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; }
.workspace-head { flex:0 0 auto; }

@media (max-width:1400px) {
  .app-shell { grid-template-columns:260px minmax(0,1fr) 340px; }
  .stage-column { padding-left:14px; padding-right:14px; }
}
@media (max-width:1180px) {
  .app-shell { grid-template-columns:240px minmax(0,1fr) 320px; }
  .friend-link-card { grid-template-columns:40px minmax(0,1fr); }
  .friend-copy-btn { grid-column:1/-1; width:100%; }
}
@media (max-width:900px) {
  body { overflow:hidden; }
  .app-shell { height:100dvh; min-height:0; grid-template-columns:220px minmax(0,1fr); }
  .stage-column { min-height:0; height:100dvh; }
  .master-panel { max-height:100dvh; }
}
@media (max-width:700px) {
  #settingsDialog { width:calc(100vw - 16px); }
  #settingsDialog > form { padding:14px; }
  .call-settings-grid,
  .call-processing-grid,
  .rtc-credentials-row,
  .mic-test-panel { grid-template-columns:1fr; }
  .mic-test-meter { grid-column:auto; }
  .volume-settings label { grid-template-columns:1fr; }
  .social-dialog > form { height:92dvh; }
  .friend-link-card { grid-template-columns:36px minmax(0,1fr); }
  .friend-link-icon { width:36px; height:36px; }
  .social-search-row { grid-template-columns:1fr; }
  .social-search-row .primary-btn { width:100%; }
}
/* Ajuste extra para navegadores com barra lateral aberta (Opera/Edge etc.). */
@media (max-width:1180px) and (min-width:901px) {
  .app-shell { grid-template-columns:225px minmax(0,1fr) 285px; }
  .sidebar { padding-left:10px; padding-right:10px; }
  .master-panel { padding-left:10px; padding-right:10px; }
  .panel-tabs { gap:3px; }
  .tab { font-size:10px; }
}
@media (max-width:900px) and (min-width:761px) {
  .app-shell { grid-template-columns:205px minmax(0,1fr) 270px; }
  .master-panel { position:static; inset:auto; width:auto; box-shadow:none; z-index:auto; }
  .stage-column { padding:12px; }
  .sidebar { padding:12px 9px 10px; }
  .master-panel { padding:12px 9px 10px; }
}

/* =========================================================
   V3.1 · MOBILE
   Navegação de app, telas independentes e controles touch.
   ========================================================= */
.mobile-nav { display:none; }

@media (max-width:760px) {
  :root { --mobile-nav-height:68px; }
  html, body { width:100%; height:100%; min-width:0; overflow:hidden; overscroll-behavior:none; }
  body { min-height:100dvh; background:#090708; }
  button, input, select, textarea { touch-action:manipulation; }
  input, select, textarea { font-size:16px; }

  .app-shell {
    display:block !important;
    width:100%;
    height:100dvh;
    max-height:100dvh;
    min-height:0;
    padding:0;
    overflow:hidden;
    background:#090708;
  }
  .sidebar,
  .stage-column,
  .master-panel,
  .player-panel {
    display:none !important;
    position:fixed !important;
    inset:0 0 calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px)) 0 !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    border:0;
    box-shadow:none !important;
  }
  .app-shell[data-mobile-screen="channels"] .sidebar { display:block !important; }
  .app-shell[data-mobile-screen="chat"] .stage-column,
  .app-shell[data-mobile-screen="call"] .stage-column { display:grid !important; }
  .app-shell[data-mobile-screen="panel"].master-role .master-panel:not(.role-hidden) { display:flex !important; }
  .app-shell[data-mobile-screen="panel"] .player-panel:not(.role-hidden) { display:flex !important; }

  .mobile-nav {
    position:fixed;
    z-index:10010;
    left:0;
    right:0;
    bottom:0;
    height:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px));
    padding:6px 6px max(6px, env(safe-area-inset-bottom, 0px));
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:3px;
    border-top:1px solid #3a242c;
    background:rgba(13,9,11,.98);
    box-shadow:0 -14px 32px rgba(0,0,0,.42);
  }
  .mobile-nav-btn {
    min-width:0;
    min-height:52px;
    padding:5px 2px;
    border:1px solid transparent;
    border-radius:10px;
    background:transparent;
    color:#83747a;
    display:grid;
    place-items:center;
    align-content:center;
    gap:4px;
    font:800 10px/1.1 Inter,ui-sans-serif,sans-serif;
    cursor:pointer;
  }
  .mobile-nav-btn .icon { width:19px; height:19px; }
  .mobile-nav-btn.active,
  .mobile-nav-btn[aria-current="page"] { color:#fff; border-color:#512835; background:#25131a; }
  .mobile-nav-btn.active .icon { color:#f05474; }

  .sidebar {
    padding:14px 12px 18px;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:auto;
  }
  .brand-row { position:sticky; top:-14px; z-index:3; margin:0 -12px; padding:14px 18px 13px; background:rgba(14,10,12,.98); border-bottom:1px solid #26191e; }
  .brand-mark { width:44px; height:44px; }
  .side-section { padding-top:13px; }
  .section-title-row { min-height:30px; font-size:12px; }
  #campaignList, #channelTree, .participants-list { max-height:none; overflow:visible; }
  .campaign, .channel-tree .channel, .social-nav-btn, .organizer-nav, .participant, .invite-btn { min-height:48px; }
  .campaign strong, .channel-tree .channel, .social-nav-btn { font-size:15px; }
  .profile-card { position:sticky; bottom:0; z-index:3; margin-top:14px; padding:11px; background:rgba(23,16,18,.98); }
  .profile-actions { grid-template-columns:repeat(6,minmax(44px,1fr)); }
  .profile-actions .icon-btn { min-width:44px; min-height:44px; }

  .stage-column {
    padding:10px;
    gap:9px;
    overflow:hidden;
    grid-template-rows:56px minmax(0,1fr);
    background:radial-gradient(circle at 50% -10%,#1a0d11,#090708 42%);
  }
  .stage-column.text-mode { grid-template-rows:56px minmax(0,1fr); }
  .stage-column.call-mode { grid-template-rows:56px minmax(220px,1fr) minmax(170px,.62fr); }
  .stage-column.workspace-mode { grid-template-rows:56px minmax(0,1fr); }
  .topbar { min-width:0; padding:0 2px 8px; }
  .topbar > div:first-child { min-width:0; }
  .topbar h1 { max-width:54vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:19px; }
  .eyebrow { font-size:10px; }
  .topbar-actions { gap:6px; }
  .topbar-actions .live-pill,
  .topbar-actions #copyRoomBtn { display:none; }
  .notification-btn { width:44px; height:44px; }

  .stream-card { grid-template-rows:44px minmax(0,1fr); border-radius:10px; }
  .stream-toolbar { min-width:0; padding:0 10px; }
  .stream-toolbar > div:first-child { min-width:0; }
  #streamTitle { max-width:38vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
  .stream-actions { gap:5px; }
  .stream-meta, .call-quality-pill { display:none; }
  .toolbar-icon-btn { width:38px; height:38px; }
  .call-health-bar { display:none; }
  .stream-empty { width:90%; }
  .screen-symbol { margin-bottom:10px; }
  .stream-empty h2 { font-size:17px; }
  .stream-empty p { font-size:13px; line-height:1.45; margin:6px auto 10px; }
  .stream-empty .primary-btn { min-height:44px; }

  .chat-card,
  .stage-column.text-mode .chat-card { min-height:0; height:100%; grid-template-rows:minmax(0,1fr) 62px; border-radius:10px; }
  .chat-log,
  .stage-column.text-mode .chat-log { padding:12px 10px 10px; scrollbar-gutter:auto; }
  .system-message { font-size:12px; margin:4px 0 12px; }
  .chat-message { grid-template-columns:36px minmax(0,1fr); gap:9px; margin:10px 0; }
  .chat-avatar { width:36px; height:36px; font-size:11px; }
  .chat-copy strong { font-size:14px; }
  .chat-copy time { font-size:11px; }
  .chat-copy p { max-width:none; font-size:16px; line-height:1.48; }
  .composer { grid-template-columns:44px minmax(0,1fr) 44px 44px 44px; gap:4px; padding:7px; }
  .composer input { height:46px; padding:0 10px; border-radius:8px; font-size:16px; }
  .composer-btn, .send-btn { width:44px; height:46px; min-width:44px; border-radius:8px; padding:0; }
  .composer-btn span, .send-btn span { display:none; }
  .composer-btn .icon, .send-btn .icon { width:16px; height:16px; }

  .master-panel, .player-panel { padding:12px 10px 14px; overflow:hidden; background:linear-gradient(180deg,#100b0d,#090708); }
  .master-header, .player-panel-header { flex:0 0 58px; height:58px; padding:0 4px 9px; }
  .master-header h2, .player-panel-header h2 { font-size:18px; }
  .master-badge, .player-badge { font-size:10px; }
  .panel-tabs { flex:0 0 auto; display:flex; gap:5px; overflow-x:auto; overflow-y:hidden; padding:8px 1px; scrollbar-width:none; }
  .panel-tabs::-webkit-scrollbar { display:none; }
  .panel-tabs .tab { flex:0 0 74px; min-width:74px; min-height:48px; padding:0 7px; border:1px solid #291d21; border-radius:9px; }
  .panel-tabs .tab span { display:inline; font-size:10px; }
  .panel-tabs .tab .icon { width:14px; height:14px; }
  .tab-panel.active { flex:1; min-height:0; padding:1px 2px 14px 0; overflow-y:auto; overflow-x:hidden; }
  .master-footer { flex:0 0 auto; padding:10px 4px 2px; }
  .panel-block { padding:13px; margin-bottom:10px; }
  .block-title { font-size:14px; }
  .field, .label { font-size:12px; }
  .sound-pad, .scene-fx-btn, .master-hotbar button, .visibility-toggle, .dice-roll-main, .mini-tool-btn, .sheet-add-btn { min-height:44px; }
  .dice-builder { grid-template-columns:1fr; }
  .compact-dice-stepper { height:46px; grid-template-columns:44px 1fr 44px; }
  .dice-actions { grid-template-columns:1fr 1fr; }
  .dice-roll-main { grid-column:1/-1; }

  .player-panel { overflow-y:auto; overscroll-behavior:contain; }
  .player-panel-header { flex:0 0 auto; }
  .character-card { margin-top:10px; }
  .character-name-input, .character-concept-input, .sheet-inline-input, .sheet-number-input, .sheet-note-area { font-size:16px; }
  .sheet-toolbar { flex-wrap:wrap; gap:8px; }
  .sheet-toolbar-actions { order:3; width:100%; margin-left:0; display:grid; grid-template-columns:1fr 1fr; }
  .sheet-toolbar-actions .mini-tool-btn { justify-content:center; }
  .sheet-lock-pill { margin-left:auto; }
  .sheet-modules { flex:none; overflow:visible; padding-bottom:14px; }
  .sheet-module-head { min-height:48px; }
  .module-action-btn, .sheet-mini-btn { min-width:40px; min-height:40px; }
  .sheet-row, .player-sheet-field { min-height:54px; }
  .resource-row { grid-template-columns:minmax(0,1fr) 62px 10px 62px; }
  .resource-row .sheet-row-actions { grid-column:1/-1; justify-content:flex-end; }
  .player-panel-footer { padding-bottom:8px; }

  .campaign-workspace { overflow-y:auto; overflow-x:hidden; }
  .workspace-head { align-items:flex-start; gap:10px; }
  .workspace-head p { font-size:13px; }
  .calendar-layout, .library-layout, .master-sheets-layout { grid-template-columns:1fr; }
  .library-layout { overflow:visible; }
  .library-index, .library-reader { max-height:none; overflow:visible; }
  .calendar-card { overflow-x:auto; }

  .settings-dialog,
  #settingsDialog,
  .social-dialog,
  .server-manage-dialog,
  .notifications-dialog,
  .mixer-dialog,
  .compact-dialog,
  .organizer-dialog {
    width:calc(100vw - 8px);
    max-width:none;
    max-height:calc(100dvh - 8px - env(safe-area-inset-bottom, 0px));
    margin:auto;
    border-radius:14px;
  }
  .settings-dialog form,
  #settingsDialog > form,
  .social-dialog > form,
  .server-manage-card {
    max-height:calc(100dvh - 8px - env(safe-area-inset-bottom, 0px));
    height:auto;
    padding:14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    overflow-y:auto;
    overflow-x:hidden;
  }
  .dialog-head { position:sticky; z-index:4; top:-14px; margin:0 -12px 12px; padding:14px 12px 11px; background:#100c0e; }
  .dialog-head .icon-btn { min-width:44px; min-height:44px; }
  .dialog-actions { position:sticky; bottom:calc(-14px - env(safe-area-inset-bottom, 0px)); padding:10px 0 calc(14px + env(safe-area-inset-bottom, 0px)); background:#100c0e; }
  .dialog-actions > button { min-height:44px; }
  .server-builder-row, .notification-actions { flex-wrap:wrap; }
  .server-builder-grid, .role-permissions, .role-card, .member-role-row, .channel-manager-row { grid-template-columns:1fr; }
  .server-builder-row .primary-btn { min-height:44px; }
  .channel-manager-row > .icon { display:none; }
  .role-card .mini-danger-btn, .channel-manager-row .mini-danger-btn { justify-self:end; }
  .mixer-master-card label, .mixer-person { grid-template-columns:1fr; }
  .toast-host { left:10px; right:10px; bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 10px); }
  .toast { width:100%; }
  html[data-runtime="web"] body::after { right:10px; bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 6px); }
}

@media (max-width:760px) and (orientation:landscape) and (max-height:540px) {
  :root { --mobile-nav-height:58px; }
  .mobile-nav { grid-template-columns:repeat(5,minmax(64px,1fr)); overflow-x:auto; padding-top:3px; }
  .mobile-nav-btn { min-height:46px; grid-template-columns:auto auto; gap:6px; }
  .stage-column, .stage-column.text-mode { grid-template-rows:48px minmax(0,1fr); padding:7px; gap:6px; }
  .stage-column.call-mode { grid-template-rows:48px minmax(150px,1fr) minmax(120px,.55fr); }
  .topbar h1 { font-size:17px; }
  .stream-empty p { display:none; }
}

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