/* Portais RPG — tema "dark academia × portais" (preto do vazio, carmesim e ouro da mesa original + violeta/turquesa dos portais) */
:root {
  --void: #05050a; --ink: #0b0a14; --ink2: #120f1e; --panel: rgba(18, 15, 30, 0.78); --panel2: rgba(255, 255, 255, 0.035);
  --line: rgba(212, 175, 55, 0.16); --line2: rgba(255, 255, 255, 0.08);
  --gold: #d4af37; --gold2: #f1d78a; --crimson: #9b111e; --crimsonGlow: #ff2a3f; --portal: #7b5cff; --portal2: #3ee0d0;
  --parch: #efe6d2; --text: #ece8f4; --muted: #a39cb3; --green: #4fd18b; --blue: #5aa2ff;
  --r: 16px; --r-s: 10px; --top: 56px; --tabs: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --f-title: 'Cinzel', 'Times New Roman', serif; --f-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-lore: 'Cormorant Garamond', Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--void); color: var(--text); font-family: var(--f-body); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { background:
  radial-gradient(900px 600px at 110% -10%, rgba(123, 92, 255, 0.18), transparent 60%),
  radial-gradient(700px 500px at -20% 110%, rgba(155, 17, 30, 0.22), transparent 60%),
  linear-gradient(-45deg, #05050a, #140913, #0b1020, #05050a); background-size: auto, auto, 400% 400%; background-attachment: fixed; animation: bgPan 30s ease infinite; }
@keyframes bgPan { 0%, 100% { background-position: 0 0, 0 0, 0% 50%; } 50% { background-position: 0 0, 0 0, 100% 50%; } }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
a { color: var(--gold2); }
h1, h2, h3, h4 { font-family: var(--f-title); margin: 0; letter-spacing: 0.02em; }
:focus-visible { outline: 2px solid var(--portal2); outline-offset: 2px; }
.sr-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ico { flex: none; display: block; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.up { text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.hint { color: var(--muted); font-size: 0.8rem; margin: 0.2rem 0; display: block; }
.lore { font-family: var(--f-lore); font-size: 1.12rem; color: var(--parch); margin: 0.3rem 0 0.6rem; font-style: italic; }
.row { display: flex; align-items: center; min-width: 0; }
.col { display: flex; flex-direction: column; min-width: 0; }
.wrap { flex-wrap: wrap; } .gap { gap: 10px; } .gap-s { gap: 6px; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .center { align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt { margin-top: 10px; }

/* ---------- carregando / anel do portal ---------- */
.loading { height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; color: var(--muted); font-family: var(--f-title); position: relative; overflow: hidden; }
.loading .portal-ring { position: relative; width: 120px; height: 120px; inset: auto; }
.portal-ring { position: absolute; width: 520px; height: 520px; right: -200px; top: -170px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: conic-gradient(from 0deg, transparent, rgba(123, 92, 255, 0.55), rgba(62, 224, 208, 0.45), transparent, rgba(255, 42, 63, 0.4), rgba(212, 175, 55, 0.5), transparent);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%, #000 66%, transparent 70%); mask: radial-gradient(circle, transparent 58%, #000 60%, #000 66%, transparent 70%);
  filter: blur(2px) drop-shadow(0 0 30px rgba(123, 92, 255, 0.6)); animation: spin 14s linear infinite; opacity: 0.8; }
.portal-ring.big { width: 140vmin; height: 140vmin; right: auto; top: auto; left: 50%; top: 50%; margin: -70vmin 0 0 -70vmin; opacity: 0.55; animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.06); font-weight: 600; font-size: 0.92rem; transition: transform 0.15s, background 0.2s, box-shadow 0.2s; white-space: nowrap; text-decoration: none; color: var(--text); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 0.84rem; border-radius: 10px; }
.btn.big { min-height: 54px; font-size: 1.02rem; width: 100%; border-radius: 14px; white-space: normal; text-align: center; }
.btn.primary { background: linear-gradient(135deg, var(--crimson), #c4182b); border-color: rgba(255, 42, 63, 0.45); color: #fff; box-shadow: 0 0 18px rgba(155, 17, 30, 0.45); }
.btn.gold { background: linear-gradient(135deg, var(--gold), #f3c64a); color: #1a1205; border-color: transparent; box-shadow: 0 0 16px rgba(212, 175, 55, 0.35); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.09); }
.btn.danger { background: rgba(155, 17, 30, 0.18); border-color: rgba(255, 42, 63, 0.4); color: #ff8a96; }
.btn.green { background: rgba(79, 209, 139, 0.18); border-color: rgba(79, 209, 139, 0.5); color: #9ff0c3; }
.btn.blue { background: rgba(90, 162, 255, 0.18); border-color: rgba(90, 162, 255, 0.5); color: #b6d5ff; }
.btn.icon { width: 46px; padding: 0; flex: none; }
.btn.back { margin-bottom: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.mini { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); flex: none; color: var(--muted); }
.mini.on { color: var(--gold); border-color: rgba(212, 175, 55, 0.45); }
.mini:hover { color: var(--text); }
.input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line2); color: var(--text); outline: none; transition: border-color 0.2s; }
.input:focus { border-color: var(--gold); }
.input:disabled { opacity: 0.6; }
.input.sm { min-height: 38px; padding: 7px 10px; font-size: 0.9rem; border-radius: 10px; }
.input.xs { width: 64px; min-height: 36px; padding: 6px 8px; text-align: center; border-radius: 9px; flex: none; }
textarea.input { resize: vertical; line-height: 1.4; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
select.input option { background: #15121f; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 6px 0; min-width: 0; }
.field-l, .lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 4px 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.color { width: 44px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: none; padding: 2px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 0; text-align: left; color: var(--text); font-size: 0.9rem; }
.toggle .knob { flex: none; width: 40px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); position: relative; transition: background 0.2s; }
.toggle .knob::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #cfc8dc; transition: transform 0.2s; }
.toggle.on .knob { background: var(--gold); }
.toggle.on .knob::after { transform: translateX(18px); background: #1a1205; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line2); border-radius: 12px; max-width: 100%; }
.seg.wrap { flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.seg.sm button { padding: 5px 9px; font-size: 0.78rem; }
.seg button.on { background: var(--gold); color: #1a1205; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, 0.3); flex: none; }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.2rem; }
.stepper span { min-width: 42px; text-align: center; font-weight: 700; }
.stepper.sm button { width: 32px; height: 34px; }
.stepper.sm span { min-width: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.05); padding: 6px 11px; border-radius: 99px; font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: rgba(123, 92, 255, 0.25); border-color: var(--portal); color: #fff; }
.chip.cond { background: rgba(123, 92, 255, 0.14); border-color: rgba(123, 92, 255, 0.4); color: #d7cdff; padding: 3px 9px; font-size: 0.72rem; }
.chip .x, .pchip .x { border: 0; background: none; color: inherit; opacity: 0.7; padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; background: rgba(255, 255, 255, 0.07); color: var(--muted); border: 1px solid var(--line2); white-space: nowrap; }
.tag.gold { color: var(--gold2); border-color: rgba(212, 175, 55, 0.4); background: rgba(212, 175, 55, 0.1); }
.tag.red { color: #ff8a96; border-color: rgba(255, 42, 63, 0.4); }
.tag.green { color: var(--green); border-color: rgba(79, 209, 139, 0.4); }
.tag.violet { color: #cbbcff; border-color: rgba(123, 92, 255, 0.5); background: rgba(123, 92, 255, 0.12); }
.tag.dim { opacity: 0.75; }
.badge { display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; vertical-align: middle; }
.badge.sug { background: rgba(62, 224, 208, 0.12); color: var(--portal2); border: 1px dashed rgba(62, 224, 208, 0.5); }
.badge.orig { background: rgba(212, 175, 55, 0.14); color: var(--gold2); border: 1px solid rgba(212, 175, 55, 0.45); }
.badge.secret { background: rgba(123, 92, 255, 0.25); color: #ddd2ff; }

/* ---------- painéis ---------- */
.panel { background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0 0 12px; position: relative; min-width: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03); }
.panel > * + * { margin-top: 8px; }
.panel > .sec-head + * { margin-top: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sec-head h3 { font-size: 1rem; color: var(--gold2); display: flex; align-items: center; gap: 8px; }
.sec-t { font-size: 0.82rem; color: var(--gold2); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.1em; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; display: grid; place-items: center; gap: 6px; }
.empty .ico { color: var(--portal); opacity: 0.8; }
.simple-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.simple-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); min-width: 0; }
.simple-list li small { display: block; color: var(--muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; }
.simple-list li a { text-decoration: none; color: var(--text); min-width: 0; }
.simple-list .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.note-li { cursor: pointer; }
.clamp { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }

/* ---------- avisos ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs) + var(--safe-b) + 12px); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { background: rgba(20, 16, 32, 0.96); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-size: 0.9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: tin 0.25s ease-out; text-align: center; }
.toast.err { border-color: rgba(255, 42, 63, 0.6); color: #ffb3bb; }
.toast.seal { border-color: var(--crimsonGlow); background: rgba(155, 17, 30, 0.92); color: #fff; font-weight: 700; box-shadow: 0 0 30px rgba(255, 42, 63, 0.6); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.35s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(3, 2, 8, 0.7); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s; }
.modal { width: 100%; max-height: 92dvh; background: linear-gradient(180deg, #16122a, #0c0a16); border: 1px solid var(--line); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up 0.3s cubic-bezier(0.16, 1, 0.3, 1); padding-bottom: var(--safe-b); min-width: 0; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.modal-h h2 { font-size: 1.15rem; color: var(--gold2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.modal-b { padding: 14px 16px; overflow-y: auto; overflow-x: hidden; flex: 1; }
.modal-b > * + * { margin-top: 10px; }
.modal-f { padding: 12px 16px; border-top: 1px solid var(--line2); display: flex; gap: 10px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
body.modal-open { overflow: hidden; }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { width: 560px; border-radius: 22px; max-height: 86dvh; } .modal.wide { width: 760px; } }

/* ---------- tela inicial ---------- */
.landing { min-height: 100dvh; max-width: 760px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 16px 40px; position: relative; overflow: hidden; }
.landing > *:not(.portal-ring) { position: relative; z-index: 1; }
.land-h { text-align: center; margin: 12px 0 22px; }
.land-logo { border-radius: 24px; box-shadow: 0 0 40px rgba(123, 92, 255, 0.45); }
.land-h h1 { font-size: clamp(2.6rem, 11vw, 4rem); font-weight: 900; background: linear-gradient(90deg, var(--gold), var(--gold2), #fff3c9); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(212, 175, 55, 0.25); margin-top: 8px; }
.tag-line { color: var(--portal2); text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.7rem; font-weight: 700; margin: 2px 0 8px; }
.land-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
.land-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: transform 0.2s, border-color 0.2s; }
.land-card .ico { grid-row: span 2; color: var(--portal2); }
.land-card b { font-family: var(--f-title); font-size: 1.08rem; }
.land-card small { color: var(--muted); }
.land-card.gold { border-color: rgba(212, 175, 55, 0.5); background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(18, 15, 30, 0.8)); }
.land-card.gold .ico { color: var(--gold); }
.land-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.land-form h2, .demo-box h2, .recent h2 { font-size: 1.1rem; color: var(--gold2); }
.land-f { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.version { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; }
@media (min-width: 640px) { .land-actions { grid-template-columns: repeat(3, 1fr); } .land-card { grid-template-columns: 1fr; text-align: center; justify-items: center; row-gap: 6px; } .land-card .ico { grid-row: auto; } }

/* ---------- estrutura da mesa ---------- */
.app { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'top' 'main' 'tabs'; overflow: hidden; }
.topbar { grid-area: top; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; background: rgba(7, 6, 13, 0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); z-index: 20; min-width: 0; }
.tb-brand img { border-radius: 9px; display: block; }
.tb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tb-title b { font-family: var(--f-title); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gold2); }
.tb-title small { color: var(--muted); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.tb-actions { display: flex; gap: 6px; flex: none; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: #777; flex: none; }
.conn.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.conn.connecting, .conn.off { background: #f0a24a; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.main { grid-area: main; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; min-width: 0; overscroll-behavior: contain; }
.tabbar { grid-area: tabs; display: flex; justify-content: space-around; align-items: stretch; background: rgba(7, 6, 13, 0.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + var(--safe-b)); z-index: 20; min-width: 0; }
.tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--muted); border-radius: 12px; min-height: 54px; position: relative; }
.tab-ico { position: relative; display: block; }
.tab-l { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab.on { color: var(--gold); }
.tab.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.dotn { position: absolute; top: -6px; right: -10px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--crimsonGlow); color: #fff; font-size: 0.62rem; display: grid; place-items: center; padding: 0 4px; font-style: normal; }
.dotn.gold { background: var(--gold); color: #1a1205; animation: pulse 1s infinite; }
.tab-ver { display: none; }
.side { display: none; }
.view { padding: 14px 12px 24px; max-width: 980px; margin: 0 auto; min-width: 0; }
.view-h { margin: 2px 0 12px; gap: 10px; }
.view-h h1 { font-size: 1.45rem; font-weight: 900; background: linear-gradient(90deg, var(--gold), var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--muted); margin: 3px 0 0; font-size: 0.86rem; }
@media (min-width: 1024px) {
  .app { grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'top top' 'tabs main'; }
  .tabbar { flex-direction: column; justify-content: flex-start; gap: 6px; border-top: 0; border-right: 1px solid var(--line); padding: 14px 8px; }
  .tab { flex: none; min-height: 64px; }
  .tab:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
  .tab.on { background: rgba(212, 175, 55, 0.08); }
  .tab.on::before { top: 20%; bottom: 20%; left: -8px; right: auto; width: 3px; height: auto; }
  .tab-l { font-size: 0.7rem; }
  .tab-ver { display: block; margin-top: auto; text-align: center; font-size: 0.66rem; color: var(--muted); }
  .view { padding: 20px 22px 30px; }
  .toasts { bottom: 24px; }
}
@media (min-width: 1200px) {
  .app.with-side { grid-template-columns: 92px minmax(0, 1fr) 400px; grid-template-areas: 'top top top' 'tabs main side'; }
  .app.with-side .side { display: flex; flex-direction: column; grid-area: side; border-left: 1px solid var(--line); background: rgba(7, 6, 13, 0.5); min-height: 0; overflow: hidden; }
  .side .init-view { flex: 0 1 auto; max-height: 48%; overflow-y: auto; border-bottom: 1px solid var(--line); padding: 14px; }
  .side .chat-view { flex: 1 1 0; min-height: 0; padding: 14px; display: flex; flex-direction: column; }
}

/* ---------- barras ---------- */
.bar { margin: 4px 0; }
.bar-l { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; margin-bottom: 3px; letter-spacing: 0.04em; }
.bar-t { height: 8px; border-radius: 99px; background: rgba(0, 0, 0, 0.45); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); }
.bar.compact .bar-t { height: 5px; }
.bar-f { height: 100%; border-radius: 99px; transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.bar.hp .bar-f { background: linear-gradient(90deg, #c4182b, #ff5b6b); }
.bar.mp .bar-f { background: linear-gradient(90deg, #3c64d8, var(--blue)); }
.bar.mp .bar-l { color: #9fc3ff; }
.bar.hp.low .bar-f { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* ---------- avatar ---------- */
.avatar { border-radius: 14px; object-fit: cover; object-position: top; flex: none; background: #1a1626; border: 1px solid var(--line); display: block; }
.avatar.ph { display: grid; place-items: center; font-family: var(--f-title); color: rgba(255, 255, 255, 0.35); background: linear-gradient(135deg, #2a2140, #0d0b16); }

/* ---------- fichas ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.char-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); color: var(--text); width: 100%; min-width: 0; transition: border-color 0.2s, transform 0.2s; }
.char-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.cc-body { flex: 1; min-width: 0; }
.cc-top { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.cc-top b { font-family: var(--f-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-body small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-body small .on { color: var(--green); }
.cc-seals, .seals { display: flex; gap: 4px; flex: none; }
.cc-seals i, .seals i { width: 9px; height: 22px; background: #2a2333; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.cc-seals i.on, .seals i.on { background: var(--crimsonGlow); box-shadow: 0 0 10px var(--crimsonGlow); filter: drop-shadow(0 0 4px var(--crimsonGlow)); }
.seals { border: 1px solid rgba(255, 42, 63, 0.35); background: rgba(0, 0, 0, 0.35); padding: 6px 10px; border-radius: 10px; }
.seals i { width: 12px; height: 30px; }
.claim-card { display: flex; flex-direction: column; gap: 6px; }
.sheet { max-width: 860px; margin: 0 auto; }
.sheet-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; min-width: 0; }
.portrait { position: relative; flex: none; border-radius: 18px; box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.4), 0 0 30px rgba(123, 92, 255, 0.35); cursor: pointer; }
.portrait .avatar { border-radius: 18px; }
.portrait.ro { cursor: default; }
.portrait-edit { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #1a1205; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.sheet-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.title-in { font-family: var(--f-title); font-size: 1.3rem; font-weight: 700; color: var(--gold2); background: transparent; border-color: transparent; padding: 4px 6px; min-height: 40px; }
.title-in:hover, .title-in:focus { border-color: var(--line2); background: rgba(0, 0, 0, 0.25); }
.with-lock { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lock-btn { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.04); color: var(--muted); flex: none; }
.lock-btn.on { color: var(--crimsonGlow); border-color: rgba(255, 42, 63, 0.5); background: rgba(155, 17, 30, 0.2); }
.res .res-row { display: flex; align-items: center; gap: 10px; }
.res-btns { display: flex; gap: 4px; flex: none; }
.rb { min-width: 38px; height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.05); font-weight: 700; font-size: 0.85rem; padding: 0 8px; }
.rb:active { transform: scale(0.94); }
.seals-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.attr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.attr { min-width: 0; }
.attr-roll { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border-radius: 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.2)); border: 1px solid var(--line2); color: var(--text); transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s; }
.attr-roll:not(.static):hover { border-color: var(--gold); box-shadow: 0 0 18px rgba(212, 175, 55, 0.25); }
.attr-roll:not(.static):active { transform: scale(0.95); }
.attr-n { font-size: 0.66rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 700; }
.attr-v { font-family: var(--f-title); font-size: 1.7rem; font-weight: 900; line-height: 1.1; }
.attr-m { font-size: 0.66rem; color: var(--portal2); font-weight: 600; }
.attr.a .attr-v { color: var(--gold); text-shadow: 0 0 10px rgba(212, 175, 55, 0.6); }
.attr.ex .attr-v { color: #ff6b7a; text-shadow: 0 0 12px rgba(255, 42, 63, 0.8); }
.attr-grid.mini .attr-v { font-size: 1.2rem; }
.attr-edit { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.attr-edit input[type=range] { flex: 1; min-width: 0; }
.attr-edit .input.xs { width: 48px; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 22px; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); margin-top: -7px; box-shadow: 0 0 10px rgba(212, 175, 55, 0.6); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 0; }
.li-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.li-list li { display: flex; gap: 6px; align-items: flex-start; padding: 6px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); min-width: 0; }
.li-main { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.li-main.col { flex-direction: column; align-items: stretch; }
.li-main .row { min-width: 0; }
.li-roll { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(62, 224, 208, 0.4); background: rgba(62, 224, 208, 0.1); color: var(--portal2); display: grid; place-items: center; flex: none; }
.li-del { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; flex: none; margin-top: 4px; }
.gm-only { border-color: rgba(123, 92, 255, 0.4); background: linear-gradient(180deg, rgba(123, 92, 255, 0.08), var(--panel)); }

/* ---------- dados ---------- */
.dice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.die-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.3); color: var(--text); min-width: 0; transition: transform 0.12s, border-color 0.2s; }
.die-btn:active { transform: scale(0.93) rotate(-4deg); }
.die-btn.on { border-color: var(--gold); background: rgba(212, 175, 55, 0.1); }
.die-btn small { color: var(--muted); font-weight: 700; font-size: 0.72rem; }
.die-btn .cnt { position: absolute; top: 4px; right: 6px; background: var(--crimsonGlow); color: #fff; border-radius: 99px; font-size: 0.7rem; min-width: 18px; height: 18px; display: grid; place-items: center; }
.die-ico { width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--f-title); font-weight: 900; font-size: 0.95rem; color: #1a1205; background: linear-gradient(135deg, var(--gold2), var(--gold)); filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4)); }
.die-ico.s4 { clip-path: polygon(50% 4%, 96% 92%, 4% 92%); padding-top: 10px; }
.die-ico.s6 { border-radius: 8px; width: 34px; height: 34px; }
.die-ico.s8 { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.die-ico.s10, .die-ico.s100 { clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); background: linear-gradient(135deg, #b9a7ff, var(--portal)); color: #fff; }
.die-ico.s12 { clip-path: polygon(50% 0, 98% 35%, 80% 95%, 20% 95%, 2% 35%); }
.die-ico.s20 { clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); background: linear-gradient(135deg, #ff7381, var(--crimson)); color: #fff; }
.dice-view .panel > .row { margin-top: 10px; }
.chip:hover { border-color: var(--gold); }
.roll-log { display: flex; flex-direction: column; gap: 6px; }
.roll-entry { padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--portal); min-width: 0; }
.roll-entry.crit { border-left-color: var(--gold); background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), transparent); }
.roll-entry.fumble { border-left-color: var(--crimsonGlow); background: linear-gradient(90deg, rgba(255, 42, 63, 0.12), transparent); }
.roll-entry.secret { border-left-style: dashed; opacity: 0.9; }
.re-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.re-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-time { color: var(--muted); font-size: 0.7rem; flex: none; }
.re-body { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.re-total { font-family: var(--f-title); font-weight: 900; font-size: 1.5rem; color: var(--gold2); min-width: 40px; }
.re-detail { flex: 1; min-width: 0; color: var(--muted); font-size: 0.78rem; font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.re-detail s { opacity: 0.5; }
.re-tags { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }

/* animação de rolagem */
.roll-overlay { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; background: radial-gradient(circle at center, rgba(40, 20, 70, 0.6), rgba(3, 2, 8, 0.82)); backdrop-filter: blur(4px); animation: fade 0.2s; overflow: hidden; padding: 16px; }
.roll-overlay.other { background: radial-gradient(circle at center, rgba(40, 20, 70, 0.35), rgba(3, 2, 8, 0.55)); }
.roll-card { position: relative; z-index: 2; text-align: center; width: min(420px, 100%); }
.roll-who { color: var(--parch); font-size: 0.95rem; margin-bottom: 14px; }
.dice-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; perspective: 700px; min-height: 96px; }
.dice-row .dropped { opacity: 0.35; filter: grayscale(1); }
.die3d { width: 78px; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: dieDrop 1.05s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; animation-delay: var(--d); }
.die3d small { color: var(--muted); font-weight: 700; font-size: 0.72rem; }
.die-spin { width: 70px; height: 70px; position: relative; transform-style: preserve-3d; animation: tumble 1s cubic-bezier(0.25, 0.8, 0.35, 1) both; animation-delay: var(--d); }
.die-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; font-family: var(--f-title); font-weight: 900; font-size: 1.7rem; color: #1a1205; background: linear-gradient(135deg, var(--gold2), var(--gold) 60%, #9c7a1b); box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35); }
.die-face.f1 { transform: translateZ(35px); } .die-face.f2 { transform: rotateY(180deg) translateZ(35px); } .die-face.f3 { transform: rotateY(90deg) translateZ(35px); } .die-face.f4 { transform: rotateY(-90deg) translateZ(35px); } .die-face.f5 { transform: rotateX(90deg) translateZ(35px); } .die-face.f6 { transform: rotateX(-90deg) translateZ(35px); }
.d6 .die-face { border-radius: 12px; }
.d20 .die-face { clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); background: linear-gradient(135deg, #ff8794, var(--crimson) 65%, #4d0710); color: #fff; }
.d20 .die-face.f1::after { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); background: linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 40%); }
.d12 .die-face { clip-path: polygon(50% 0, 98% 35%, 80% 95%, 20% 95%, 2% 35%); }
.d10 .die-face { clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); background: linear-gradient(135deg, #c4b5ff, var(--portal) 60%, #2c1a7a); color: #fff; }
.d8 .die-face { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.d4 .die-face { clip-path: polygon(50% 0, 100% 92%, 0 92%); padding-top: 18px; }
.die3d.crit .die-face { background: linear-gradient(135deg, #fff6c9, var(--gold) 60%); color: #1a1205; box-shadow: 0 0 30px var(--gold); }
.die3d.fumble .die-face { background: linear-gradient(135deg, #555, #222 70%); color: #ff5b6b; }
@keyframes tumble { 0% { transform: rotateX(720deg) rotateY(540deg) rotateZ(180deg) scale(0.6); } 70% { transform: rotateX(-12deg) rotateY(14deg) rotateZ(-6deg) scale(1.08); } 100% { transform: rotateX(0) rotateY(0) rotateZ(0) scale(1); } }
@keyframes dieDrop { 0% { transform: translateY(-140px); opacity: 0; } 40% { opacity: 1; } 65% { transform: translateY(10px); } 82% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
.roll-total { font-family: var(--f-title); font-size: 4.4rem; font-weight: 900; line-height: 1; margin-top: 16px; color: #fff; text-shadow: 0 0 30px rgba(123, 92, 255, 0.8); }
.done .roll-total { animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
.is-crit .roll-total { color: var(--gold2); text-shadow: 0 0 40px var(--gold), 0 0 80px rgba(212, 175, 55, 0.6); }
.is-fumble .roll-total { color: #ff6b7a; text-shadow: 0 0 30px var(--crimsonGlow); }
.is-fumble .roll-card { animation: shake 0.5s; }
@keyframes pop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
@keyframes shake { 10%, 90% { transform: translateX(-3px); } 20%, 80% { transform: translateX(6px); } 30%, 50%, 70% { transform: translateX(-10px); } 40%, 60% { transform: translateX(10px); } }
.roll-flag { font-family: var(--f-title); font-weight: 900; letter-spacing: 0.2em; margin-top: 6px; font-size: 1.2rem; }
.roll-flag.crit { color: var(--gold); animation: glow 1s infinite alternate; }
.roll-flag.fumble { color: var(--crimsonGlow); }
@keyframes glow { to { text-shadow: 0 0 20px var(--gold); } }
.roll-expr { color: var(--muted); font-size: 0.8rem; margin-top: 8px; font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.rays { position: absolute; width: 160vmax; height: 160vmax; left: 50%; top: 50%; margin: -80vmax 0 0 -80vmax; background: repeating-conic-gradient(rgba(212, 175, 55, 0.22) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); mask: radial-gradient(circle, #000 0, transparent 55%); animation: spin 8s linear infinite; z-index: 1; }
.sparks { position: absolute; left: 50%; top: 50%; z-index: 1; }
.sparks i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 10px var(--gold); animation: spark 0.9s ease-out forwards; transform: rotate(var(--a)) translateX(0); }
@keyframes spark { to { transform: rotate(var(--a)) translateX(var(--r)); opacity: 0; } }
.crack { position: absolute; width: 70vmin; height: 70vmin; z-index: 1; opacity: 0.8; }
.crack path { fill: none; stroke: var(--crimsonGlow); stroke-width: 2; filter: drop-shadow(0 0 6px var(--crimsonGlow)); stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 0.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- turnos ---------- */
.init-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.init-actions .btn { padding: 0 6px; font-size: 0.82rem; white-space: normal; line-height: 1.1; min-height: 50px; }
.turn-ctrl { display: flex; gap: 8px; margin-bottom: 10px; }
.round-pill { display: inline-block; background: var(--crimson); color: #fff; padding: 1px 9px; border-radius: 99px; font-weight: 700; font-size: 0.78rem; }
.my-turn { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; text-align: center; padding: 12px; margin-bottom: 10px; border-radius: 14px; font-family: var(--f-title); font-weight: 700; color: var(--gold2); background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), rgba(123, 92, 255, 0.18)); border: 1px solid var(--gold); animation: glowBox 1.6s infinite alternate; }
@keyframes glowBox { to { box-shadow: 0 0 26px rgba(212, 175, 55, 0.45); } }
.init-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.combatant { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); min-width: 0; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.combatant.npc { border-left: 3px solid rgba(255, 42, 63, 0.5); }
.combatant.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(212, 175, 55, 0.3); background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), var(--panel)); transform: scale(1.01); }
.combatant.dead { opacity: 0.45; filter: grayscale(0.9); }
.combatant.hidden-c { border-style: dashed; opacity: 0.8; }
.combatant.hit { animation: shake 0.45s; }
.c-pos { width: 24px; text-align: center; font-family: var(--f-title); font-weight: 900; color: var(--muted); flex: none; }
.current .c-pos { color: var(--gold); }
.c-body { flex: 1; min-width: 0; cursor: default; }
.is-gm .c-body { cursor: pointer; }
.c-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.c-name { font-family: var(--f-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.c-init { margin-left: auto; flex: none; font-family: var(--f-title); font-weight: 900; color: var(--portal2); background: rgba(62, 224, 208, 0.1); border: 1px solid rgba(62, 224, 208, 0.35); border-radius: 8px; padding: 0 7px; font-size: 0.85rem; }
.c-turn { position: absolute; top: -8px; right: 12px; background: var(--gold); color: #1a1205; font-size: 0.62rem; font-weight: 900; padding: 2px 8px; border-radius: 99px; letter-spacing: 0.12em; animation: pulse 1.4s infinite; }
.c-side { display: flex; flex-direction: column; gap: 4px; flex: none; }
.dmg-pop { position: absolute; right: 60px; top: 6px; font-family: var(--f-title); font-weight: 900; font-size: 1.4rem; color: #ff5b6b; text-shadow: 0 0 10px #000; animation: dmg 1.3s ease-out forwards; pointer-events: none; }
.dmg-pop.crit { color: var(--gold2); font-size: 1.8rem; }
@keyframes dmg { 0% { transform: translateY(10px) scale(0.6); opacity: 0; } 20% { transform: translateY(0) scale(1.2); opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
.init-view.compact .view-h h1 { font-size: 1.1rem; }
.init-view.compact .init-actions, .init-view.compact .turn-ctrl .btn { min-height: 40px; }
.init-view.compact .combatant { padding: 7px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); text-align: left; color: var(--text); min-width: 0; }
.pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; }
.pick small { display: block; color: var(--muted); font-size: 0.72rem; }
.pick:hover:not(:disabled) { border-color: var(--gold); }
.atk-res { text-align: center; }
.atk-res.crit .atk-text { color: var(--gold2); }
.atk-text { font-family: var(--f-title); font-size: 1.15rem; }
/* sorteio */
.draw-overlay { position: fixed; inset: 0; z-index: 260; background: rgba(3, 2, 8, 0.86); backdrop-filter: blur(6px); display: grid; place-items: center; overflow: hidden; padding: 16px; animation: fade 0.25s; }
.draw-card { position: relative; z-index: 2; width: min(440px, 100%); text-align: center; }
.draw-card h2 { color: var(--gold2); font-size: 1.5rem; margin-bottom: 14px; text-shadow: 0 0 20px rgba(212, 175, 55, 0.5); }
.draw-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.draw-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(18, 15, 30, 0.9); border: 1px solid var(--line2); height: 52px; overflow: hidden; }
.draw-list li.locked { border-color: var(--gold); box-shadow: 0 0 18px rgba(212, 175, 55, 0.3); animation: lockIn 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
.draw-list .pos { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--crimson); color: #fff; font-weight: 900; font-family: var(--f-title); flex: none; }
.draw-list .reel { flex: 1; min-width: 0; height: 34px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: space-between; }
.draw-list .reel b { font-family: var(--f-title); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draw-list .reel em { font-style: normal; color: var(--portal2); font-weight: 800; }
.reel-names { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; animation: reel 0.6s linear infinite; animation-delay: calc(var(--i) * -0.13s); }
.reel-names span { height: 34px; line-height: 34px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; filter: blur(0.6px); }
@keyframes reel { to { transform: translateY(-50%); } }
@keyframes lockIn { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }
.draw-first { margin-top: 14px; font-family: var(--f-title); color: var(--gold); font-size: 1.15rem; animation: pop 0.4s; }
.turn-banner { position: fixed; z-index: 240; left: 50%; top: calc(var(--top) + var(--safe-t) + 14px); transform: translateX(-50%); padding: 10px 22px; border-radius: 16px; background: rgba(18, 15, 30, 0.95); border: 1px solid var(--portal2); box-shadow: 0 0 30px rgba(62, 224, 208, 0.35); text-align: center; display: flex; flex-direction: column; animation: bannerIn 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); width: max-content; max-width: 92vw; }
.turn-banner b { font-family: var(--f-title); font-size: 1.1rem; }
.turn-banner span { font-size: 0.78rem; color: var(--muted); }
.turn-banner.mine { border-color: var(--gold); box-shadow: 0 0 40px rgba(212, 175, 55, 0.55); }
.turn-banner.mine b { color: var(--gold2); font-size: 1.3rem; }
@keyframes bannerIn { from { transform: translate(-50%, -30px); opacity: 0; } }

/* ---------- mapa ---------- */
.board-wrap { overflow: auto; border-radius: var(--r); border: 1px solid var(--line); background: #08070e; max-height: 72dvh; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.board-zoom { min-width: 100%; }
.board { position: relative; width: 100%; background-color: #0e0c18; background-size: 100% 100%; background-repeat: no-repeat; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.board.grid::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px); background-size: calc(100% / var(--cols)) calc(100% / var(--rows)); }
.board.painting { cursor: crosshair; }
.board-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-size: 0.85rem; text-align: center; padding: 10px; background: radial-gradient(circle, rgba(123, 92, 255, 0.12), transparent 70%); }
.fog { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.token { position: absolute; z-index: 4; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--c); background: #1a1626; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 12px var(--c); display: grid; place-items: center; min-width: 22px; transition: left 0.25s, top 0.25s; }
.token.dragging { transition: none; z-index: 6; transform: translate(-50%, -50%) scale(1.15); }
.token.movable { cursor: grab; }
.token.mine { border-width: 3px; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 16px var(--gold); }
.token.hid { opacity: 0.45; border-style: dashed; }
.token img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; pointer-events: none; }
.token span { font-family: var(--f-title); font-weight: 900; font-size: clamp(0.6rem, 2.4vw, 1rem); color: var(--c); }
.token em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; font-style: normal; font-size: 0.6rem; font-weight: 700; white-space: nowrap; background: rgba(0, 0, 0, 0.75); padding: 0 5px; border-radius: 4px; pointer-events: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.tool { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.3); color: var(--muted); font-size: 0.68rem; font-weight: 700; cursor: pointer; min-width: 0; }
.tool.on { color: var(--gold); border-color: var(--gold); background: rgba(212, 175, 55, 0.1); }
.tok-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.tok-list li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; background: var(--panel2); }
.tok-list li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.table-view .view:first-child { padding-bottom: 0; }
.table-cols { display: grid; gap: 0 12px; }
@media (min-width: 900px) { .table-cols { grid-template-columns: 1fr 1fr; } }
.handout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.handout-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 12px; background: linear-gradient(160deg, #2a2216, #15110b); border: 1px solid rgba(212, 175, 55, 0.35); color: var(--parch); text-align: center; font-family: var(--f-lore); font-size: 1rem; min-width: 0; }
.handout-card img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; }
.handout-card .ico { color: var(--gold); }
.parchment { white-space: pre-wrap; font-family: var(--f-lore); font-size: 1.15rem; line-height: 1.5; color: #2b2112; background: linear-gradient(160deg, #f3e7c9, #e1cf9f); padding: 18px; border-radius: 6px; box-shadow: inset 0 0 40px rgba(120, 80, 20, 0.35), 0 10px 30px rgba(0, 0, 0, 0.5); }
.handout-img { width: 100%; border-radius: 10px; }
.music-frame { width: 100%; height: 160px; border: 0; border-radius: 12px; }
.premise .lore { font-size: 1.05rem; }

/* ---------- relógio e portais ---------- */
.clock { display: flex; align-items: center; gap: 12px; }
.clock-svg { width: 92px; height: 92px; flex: none; filter: drop-shadow(0 0 10px rgba(123, 92, 255, 0.35)); }
.seg-c { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 12; cursor: pointer; transition: stroke 0.3s; }
.seg-c.on { stroke: var(--crimsonGlow); filter: drop-shadow(0 0 4px var(--crimsonGlow)); }
.clock-n { fill: var(--text); font-family: var(--f-title); font-weight: 900; font-size: 15px; }
.clock small { display: block; }
.portal-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.portal-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); min-width: 0; }
.portal-list li > div { min-width: 0; }
.portal-list li small { display: block; color: var(--muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; }
.portal-list.edit li { align-items: flex-start; }
.portal-list.edit .grow > * + * { margin-top: 4px; }
.portal-list.edit select { width: 116px; }
.portal-list.edit li > .col { flex: 0 0 auto; align-items: flex-end; }
.portal-list.edit li > .grow { flex: 1 1 0; }
.pdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: #888; }
.pst.suspeito .pdot { background: #8a83a0; }
.pst.encontrado .pdot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.pst.aberto .pdot { background: var(--portal); box-shadow: 0 0 10px var(--portal); animation: pulse 1.2s infinite; }
.pst.fechado .pdot { background: var(--green); }
.pcounts { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.78rem; color: var(--muted); }
.pcounts .pst { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- escudo do mestre ---------- */
.room-card .rc-main { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 16px; align-items: start; }
.room-card .lbl { white-space: nowrap; }
.code { font-family: var(--f-title); font-weight: 900; font-size: 1.5rem; letter-spacing: 0.12em; color: var(--gold2); display: flex; align-items: center; gap: 6px; }
.code.pin { font-size: 1.2rem; color: var(--portal2); }
.rc-sess .code { color: var(--text); }
.players-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); font-size: 0.8rem; }
.pchip i { width: 8px; height: 8px; border-radius: 50%; background: #555; }
.pchip.on i { background: var(--green); box-shadow: 0 0 6px var(--green); }
.gm-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; }
.gm-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.28); color: var(--muted); font-size: 0.66rem; font-weight: 700; min-width: 0; }
.gm-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-tabs button.on { color: var(--gold); border-color: var(--gold); background: rgba(212, 175, 55, 0.1); }
.gm-dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; align-items: start; }
@media (min-width: 760px) { .gm-tabs { grid-template-columns: repeat(10, minmax(0, 1fr)); } .gm-dash { display: block; columns: 2; column-gap: 12px; } .gm-dash > * { break-inside: avoid; display: block; width: 100%; } }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.hero-card { border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line2); min-width: 0; display: flex; flex-direction: column; }
.hc-img { position: relative; height: 130px; background: linear-gradient(135deg, #2a2140, #0d0b16); display: grid; place-items: center; }
.hc-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: absolute; inset: 0; }
.hc-img > span { font-family: var(--f-title); font-size: 3.4rem; color: rgba(255, 255, 255, 0.16); }
.hc-grad { position: absolute; inset: 0; background: linear-gradient(to top, var(--void), transparent 70%); }
.hc-title { position: absolute; left: 10px; right: 10px; bottom: 8px; }
.hc-title small { color: var(--gold); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.62rem; font-weight: 700; display: block; }
.hc-title b { font-family: var(--f-title); font-size: 1rem; line-height: 1.15; display: block; }
.hc-badge { position: absolute; top: 8px; left: 8px; }
.hc-at { display: grid; grid-template-columns: repeat(6, 1fr); padding: 6px 4px; gap: 2px; text-align: center; font-family: var(--f-title); font-weight: 700; font-size: 0.8rem; color: var(--gold2); }
.hc-at > span > small { display: block; font-family: var(--f-body); font-size: 0.5rem; color: var(--muted); letter-spacing: 0.06em; }
.hc-act { display: flex; gap: 6px; justify-content: flex-end; padding: 0 8px 8px; margin-top: auto; }
.card-mystic { border-radius: 14px; padding: 12px; border: 1px solid var(--line2); border-top: 3px solid var(--gold); background: rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-mystic small { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 0.64rem; color: var(--gold); }
.card-mystic.heal small { color: var(--green); } .card-mystic.mana small { color: var(--blue); } .card-mystic.dano small { color: #ff6b7a; }
.card-mystic b { font-family: var(--f-title); }
.card-mystic p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.upload-box { position: relative; display: grid; place-items: center; height: 150px; border-radius: 14px; border: 2px dashed var(--line2); background: rgba(255, 255, 255, 0.03); overflow: hidden; color: var(--muted); cursor: pointer; }
.upload-box.sm { height: 100px; }
.upload-box img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.upload-box span { display: flex; gap: 8px; align-items: center; }
.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .rank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rank-slider { padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line2); min-width: 0; }
.rank-slider input[type=range] { width: 100%; }
.rank-in { font-family: var(--f-title); font-weight: 900; font-size: 1.05rem; width: 56px; }
.rank-slider.a .rank-in { color: var(--gold); }
.rank-slider.ex .rank-in { color: #ff6b7a; }
.ticks { display: flex; justify-content: space-between; font-size: 0.58rem; color: var(--muted); padding: 0 2px; }
.tl { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.tl li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-left: 2px solid var(--portal); background: var(--panel2); border-radius: 0 10px 10px 0; min-width: 0; }
.tl li.secret { border-left-style: dashed; border-left-color: var(--muted); opacity: 0.8; }
.tl li small { display: block; color: var(--muted); font-size: 0.7rem; }
.tl-s { font-family: var(--f-title); font-weight: 900; font-size: 0.72rem; color: var(--portal2); flex: none; margin-top: 2px; }
.summary { white-space: pre-wrap; font-family: var(--f-body); background: rgba(0, 0, 0, 0.35); padding: 12px; border-radius: 12px; border: 1px solid var(--line2); font-size: 0.88rem; overflow-wrap: anywhere; }
.howto summary { cursor: pointer; color: var(--portal2); font-weight: 600; font-size: 0.88rem; }
.howto ol { margin: 6px 0 0 18px; padding: 0; color: var(--muted); font-size: 0.86rem; }
.rules-ref { background: rgba(0, 0, 0, 0.3); border-radius: 12px; padding: 10px 12px; border: 1px dashed var(--line); }
.rules-ref h4 { font-size: 0.8rem; color: var(--gold2); }
.rules-ref ul { margin: 6px 0 0 16px; padding: 0; font-size: 0.82rem; color: var(--muted); }

/* ---------- chat ---------- */
.chat-view { display: flex; flex-direction: column; min-height: calc(100dvh - var(--top) - var(--tabs) - var(--safe-b) - var(--safe-t) - 10px); }
.chat-view .log { flex: 1; min-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 10px; }
.chat-view.compact .log { min-height: 0; }
.composer { position: sticky; bottom: 0; background: rgba(9, 8, 16, 0.96); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 6px; backdrop-filter: blur(12px); }
.msg { padding: 8px 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); max-width: 92%; align-self: flex-start; min-width: 0; }
.msg.mine { align-self: flex-end; background: rgba(123, 92, 255, 0.12); border-color: rgba(123, 92, 255, 0.35); }
.msg.ic { border-left: 3px solid var(--gold); }
.msg.whisper { border-color: rgba(123, 92, 255, 0.6); background: rgba(123, 92, 255, 0.16); border-style: dashed; }
.msg-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; }
.msg-h small { color: var(--muted); font-size: 0.68rem; margin-left: auto; }
.msg-b { margin-top: 2px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ic-quote { font-family: var(--f-lore); font-size: 1.12rem; font-style: italic; color: var(--parch); }
.sys-entry { align-self: center; text-align: center; font-size: 0.8rem; color: var(--muted); padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); max-width: 96%; overflow-wrap: anywhere; }
.sys-entry small { display: block; font-size: 0.66rem; opacity: 0.7; }
.sys-entry.combat { color: #ffb3bb; }
.sys-entry.seal { color: #fff; background: rgba(155, 17, 30, 0.45); border: 1px solid var(--crimsonGlow); font-weight: 700; }
.sys-entry.portal { color: #d7cdff; background: rgba(123, 92, 255, 0.12); }
.sys-entry.handout, .sys-entry.card { color: var(--gold2); }
.sys-entry.attack { color: var(--text); background: rgba(155, 17, 30, 0.14); border: 1px solid rgba(255, 42, 63, 0.25); }
.sys-entry.attack.crit { background: rgba(212, 175, 55, 0.14); border-color: var(--gold); }
.chat-view .roll-entry { align-self: stretch; }

/* ---------- guia ---------- */
.guide { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.guide li { display: flex; gap: 12px; align-items: flex-start; }
.g-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(123, 92, 255, 0.16); color: var(--portal2); flex: none; }
.guide p { margin: 2px 0 0; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 380px) {
  .view { padding: 12px 10px 20px; }
  .attr-v { font-size: 1.45rem; }
  .code { font-size: 1.25rem; }
  .room-card .rc-main { gap: 10px; }
  .sheet-hero { gap: 10px; }
  .portrait .avatar { width: 88px !important; height: 88px !important; }
  .res-btns .rb { min-width: 34px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }

/* ===== 1.1: arte temática ===== */
.land-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5, 5, 10, 0.25) 0%, rgba(5, 5, 10, 0.55) 45%, rgba(5, 5, 10, 0.94) 80%), url('/art/bg-mobile.webp') center top / cover no-repeat; }
@media (min-width: 900px) { .land-bg { background: radial-gradient(ellipse at 50% 30%, rgba(5, 5, 10, 0.15), rgba(5, 5, 10, 0.88) 70%), url('/art/bg-desktop.webp') center 20% / cover no-repeat; } }
.landing > .land-bg { position: fixed; z-index: 0; }
.land-h h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.35); }
.land-h .lore, .land-h .tag-line { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.land-card, .landing .panel { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background-color: rgba(12, 10, 22, 0.78); }
@media (min-width: 640px) { .land-actions { grid-template-columns: repeat(2, 1fr); } }
.land-card.slim { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 12px 0; width: 100%; text-align: left; }
.land-card.slim b { font-size: 0.95rem; }
.gm-home { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.gm-home .sec-head h2 { display: flex; gap: 8px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gm-home .rooms { display: flex; flex-direction: column; gap: 8px; }
.room-open { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(123, 92, 255, 0.18), rgba(18, 15, 30, 0.85)); border: 1px solid rgba(123, 92, 255, 0.45); color: var(--text); min-width: 0; }
.room-open:hover { border-color: var(--gold); }
.room-open > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.room-open b { font-family: var(--f-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-open .ico:first-child { color: var(--portal2); }
.land-more { border-top: 1px solid var(--line); padding-top: 8px; }
.land-more > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--gold2); font-weight: 600; font-size: 0.9rem; padding: 6px 0; list-style: none; }
.land-more > summary::-webkit-details-marker, .gms > summary::-webkit-details-marker { display: none; }
.land-more[open] > summary { margin-bottom: 8px; }
.gms { margin: 8px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; background: rgba(0, 0, 0, 0.18); }
.gms > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--gold2); font-weight: 600; list-style: none; padding: 4px 0; }
.gms .simple-list li { padding: 6px 0; }
.gms .simple-list small { display: block; color: var(--muted); font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; }
.gms form { margin: 6px 0 4px; }
.gms form .input { min-width: 0; }

/* emblemas de classe, selos de rank e retratos provisórios */
.emblem { flex: none; display: inline-block; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ec) 45%, transparent)); }
.with-lock .emblem { margin-right: 2px; }
.avatar.ph { overflow: hidden; padding: 0; background: #0b0814; }
.avatar.ph svg, .hc-img > svg { display: block; width: 100%; height: 100%; }
.hc-img > svg { position: absolute; inset: 0; }
.hc-title { display: flex; align-items: flex-end; gap: 8px; }
.hc-title > span { min-width: 0; }
.rank-badge { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; }
.rank-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rank-badge path { fill: rgba(12, 10, 22, 0.9); stroke: var(--rk, #8a8fa3); stroke-width: 1.6; }
.rank-badge b { position: relative; font-family: var(--f-title); font-weight: 900; font-size: 0.82rem; color: var(--rk, #c9ccd8); line-height: 1; letter-spacing: -0.02em; }
.rank-badge.sm { width: 24px; height: 24px; } .rank-badge.sm b { font-size: 0.66rem; }
.rank-badge.lg { width: 44px; height: 44px; margin: 2px auto; } .rank-badge.lg b { font-size: 1.15rem; }
.rank-badge.r-e { --rk: #8a8fa3; } .rank-badge.r-d { --rk: #c98a54; } .rank-badge.r-c { --rk: #9fd3ff; }
.rank-badge.r-b { --rk: #7b9bff; } .rank-badge.r-a { --rk: #d4af37; } .rank-badge.r-a path { fill: rgba(212, 175, 55, 0.14); }
.rank-badge.r-ex { --rk: #ff4d5e; } .rank-badge.r-ex path { fill: rgba(255, 42, 63, 0.16); } .rank-badge.r-ex { filter: drop-shadow(0 0 8px rgba(255, 42, 63, 0.65)); }
.rank-badge.r-a { filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.45)); }
.attr-roll .rank-badge.lg { pointer-events: none; }
.hc-at > span { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.portal-thumb { width: 52px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; border: 1px solid rgba(123, 92, 255, 0.5); box-shadow: 0 0 10px rgba(123, 92, 255, 0.35); }
.portal-list.edit .portal-thumb { width: 46px; height: 46px; }
.c-top .emblem { margin-right: 1px; }
