@font-face {
  font-family: "Umbra Caps";
  src: url("/fonts/lmromancaps10-regular.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Umbra Roman";
  src: url("/fonts/lmroman10-regular.otf") format("opentype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0d1016;
  --panel: #1b1d23;
  --panel-raised: #24232a;
  --ink: #f2eadf;
  --muted: #c2b8ae;
  --line: #6b606180;
  --accent: #ddbd89;
  --accent-deep: #936947;
  --blood: #bd6a75;
  --paper: #e7d9c5;
  --focus: #f4ce85;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 300px; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  background: radial-gradient(ellipse 90% 450px at 50% -70px, #49313b 0, #201d25 42%, transparent 85%),
    linear-gradient(180deg, #12151b, #0d1016 72%);
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .13;
  background: repeating-linear-gradient(91deg, transparent 0 46px, #bf947c16 47px 48px),
    repeating-linear-gradient(0deg, transparent 0 80px, #c9b89714 81px 82px);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.app-shell { position: relative; max-width: 960px; margin: auto; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 10; min-height: 70px; display: flex; align-items: center;
  gap: 7px; padding: 8px max(12px, env(safe-area-inset-right));
  border-bottom: 1px solid #9a726854; background: #14151beF;
  box-shadow: 0 12px 28px #08090d70; backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; min-width: 0; gap: 8px; white-space: nowrap; }
.brand-seal {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid #d5a96b8c; border-radius: 50%; color: var(--accent);
  background: radial-gradient(circle, #7a465054, #201b20 68%);
  box-shadow: inset 0 0 14px #e5b97717, 0 0 14px #9b575326;
}
.brand-seal .icon { width: 21px; height: 21px; }
.brand-wordmark {
  display: grid; gap: 0; font: 600 1.22rem/1 "Umbra Caps", Georgia, serif;
  letter-spacing: .105em; color: #f5e6cb;
}
.brand-wordmark small {
  margin-top: 3px; font: 700 .54rem/1.1 system-ui, sans-serif;
  letter-spacing: .18em; color: var(--accent);
}
.version { margin-left: auto; color: #c8b9a9; font-size: .67rem; white-space: nowrap; border: 1px solid #947b6a66; padding: 3px 5px; border-radius: 5px; }
.icon-button { border: 0; background: transparent; color: var(--paper); min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 10px; }
.icon-button:hover { background: #e9d8c015; }
.main { padding: 22px 16px calc(102px + env(safe-area-inset-bottom)); }
.main.auth-main { max-width: 560px; margin: auto; padding-top: 24px; }
.hero {
  position: relative; overflow: hidden; margin: 4px 0 23px; padding: 23px 20px 22px;
  border: 1px solid #90716470; border-radius: 15px;
  background: radial-gradient(circle at 86% 10%, #853f5240, transparent 45%),
    linear-gradient(145deg, #292129, #191b21 76%);
  box-shadow: inset 0 1px #f1caab18, 0 15px 30px #0003;
}
.hero::after {
  content: ""; position: absolute; right: -72px; top: -86px; width: 230px; height: 230px;
  border: 1px solid #d8ad7150; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 22px #d9a36c07, 0 0 0 54px #d9a36c06;
}
.hero > * { position: relative; z-index: 1; }
.hero-auth { text-align: center; padding: 27px 22px 25px; background: radial-gradient(circle at 50% 0%, #693d4447, transparent 62%), linear-gradient(160deg, #282129, #141820 85%); }
.hero-auth::after { right: calc(50% - 116px); top: -120px; }
.entry-emblem { width: 62px; height: 62px; margin: 1px auto 14px; border-radius: 50%; filter: drop-shadow(0 0 20px #b7726650); }
.entry-emblem img { width: 100%; height: 100%; display: block; }
.hero-auth h1 { font: 500 clamp(3.4rem, 15vw, 5.6rem)/.95 "Umbra Caps", Georgia, serif; letter-spacing: .1em; margin: 4px 0 2px; color: #f6e8d0; text-shadow: 0 1px 28px #dc9a8b3b; }
.hero-subtitle { margin: 0; color: var(--accent); font: 500 clamp(1.1rem, 4.7vw, 1.55rem)/1.3 "Umbra Roman", Georgia, serif; letter-spacing: .095em; }
.hero-auth h2 { font: 500 1.45rem/1.2 "Umbra Roman", Georgia, serif; margin: 22px 0 8px; }
.hero-rule { width: 96px; height: 1px; margin: 20px auto 0; background: linear-gradient(90deg, transparent, #e1bf85, transparent); }
.signature { display: block; color: #d9c2a5; font: 700 .69rem/1.3 system-ui, sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow { display: block; margin-bottom: 8px; text-transform: uppercase; color: var(--accent); font-size: .7rem; font-weight: 750; letter-spacing: .155em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Umbra Roman", Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2rem, 7vw, 3.15rem); line-height: 1.07; margin-bottom: 10px; }
h2 { font-size: 1.57rem; line-height: 1.18; margin-bottom: 12px; }
h3 { font-size: 1.04rem; line-height: 1.25; margin-bottom: 10px; }
p, li { line-height: 1.5; }
.lede { color: #d2c5b9; max-width: 64ch; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 25px 0 12px; }
.section-heading h2 { margin: 0; }
.stack { display: grid; gap: 12px; }
.two-col { display: grid; gap: 12px; }
.card {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  background: linear-gradient(155deg, #25232a, #1b1e24 74%);
  box-shadow: inset 0 1px #e9c89f0c, 0 13px 24px #0004;
}
.card:focus-within { border-color: var(--accent); }
.card.muted { background: #202228; }
.card p:last-child { margin-bottom: 0; }
.card-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
.card-header h3 { margin: 0 0 4px; }
.quiet { color: var(--muted); font-size: .88rem; }
.small { font-size: .8rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.badge, .chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; font-size: .79rem; line-height: 1.3; }
.badge { border: 1px solid #d6b37e70; border-radius: 7px; background: #b6854925; color: #f1d7ae; }
.badge.green { border-color: #78a78e8c; background: #27604355; color: #b5e5c4; }
.badge.red { border-color: #c576808c; background: #642b3b66; color: #f8b8bd; }
.chip { border: 1px solid #baa88c63; border-radius: 6px; background: #ece0cc0a; color: var(--ink); }
.chip.loss { opacity: .62; text-decoration: line-through; border-color: #b9676f8c; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.row.between { justify-content: space-between; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn {
  min-height: 48px; border-radius: 9px; border: 1px solid #efd2a287;
  background: linear-gradient(180deg, #e2bd86, #c3935d); color: #23191a;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 15px; font-weight: 750; text-align: center; text-decoration: none; line-height: 1.25;
  box-shadow: inset 0 1px #fff4d766, 0 5px 14px #0003;
}
.btn:hover { filter: brightness(1.09); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #343039; color: var(--ink); border-color: #a18a7d; box-shadow: none; }
.btn.ghost { background: #caa5710d; color: var(--accent); border-color: #bc926c8a; box-shadow: none; }
.btn.danger { background: #8f3e4e; border-color: #d07e8b; color: white; }
.btn.small { min-height: 42px; padding: 8px 11px; font-size: .86rem; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .48; cursor: default; transform: none; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 18px 0; }
.form-grid { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: .88rem; font-weight: 650; }
input, select, textarea {
  width: 100%; min-height: 48px; background: #11151c; color: var(--ink);
  border: 1px solid #91847e; border-radius: 8px; padding: 10px 12px; outline: none;
}
textarea { min-height: 94px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #b7aba6; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 500; }
.check-row input { width: 21px; min-height: 21px; accent-color: #d5ae7d; }
.choice-field { border: 0; padding: 0; margin: 0; }
.choice-field legend { font-size: .88rem; font-weight: 700; margin-bottom: 8px; }
.gesture-choice { border: 1px solid var(--line); border-radius: 10px; padding: 12px 4px; align-items: center; text-align: center; cursor: pointer; min-height: 88px; }
.gesture-choice:has(input:checked) { border-color: var(--accent); background: #ad844747; }
.gesture-choice input { position: absolute; opacity: 0; width: 1px; min-height: 1px; }
.gesture-choice:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.gesture-choice span { font-size: 1.65rem; }
.helper { color: var(--muted); font-size: .79rem; font-weight: 400; }
.notice { border-left: 3px solid var(--accent); padding: 10px 13px; background: #b68c5924; color: #f0e0c9; border-radius: 0 8px 8px 0; font-size: .88rem; }
.empty { text-align: center; padding: 28px 18px; border: 1px dashed #a58b7880; border-radius: 12px; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; margin-bottom: 8px; color: var(--accent); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #11141a; border: 1px dashed #d4ab75; padding: 12px; border-radius: 9px; }
.code-box strong { font: 700 1.32rem ui-monospace, monospace; letter-spacing: .12em; overflow-wrap: anywhere; }
.list-item { border-top: 1px solid #97827650; padding: 13px 0; }
.list-item:first-child { border-top: 0; }
.list-item p { margin: 3px 0 0; }
.loading { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid #bf95705e; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bottom-nav {
  position: fixed; z-index: 9; bottom: 0; left: 0; right: 0; max-width: 960px; margin: auto;
  display: flex; background: #181920f7; border-top: 1px solid #b48d715c;
  box-shadow: 0 -8px 25px #0009; backdrop-filter: blur(16px);
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
}
.nav-btn { flex: 1; display: grid; justify-items: center; gap: 3px; color: #c5bab0; background: none; border: 0; border-radius: 9px; padding: 8px 2px; min-height: 55px; font-size: .7rem; }
.nav-btn.active { background: #b186592b; color: #f1d2a5; box-shadow: inset 0 2px #d7ac76; }
.nav-btn .icon { width: 22px; height: 22px; }
.sheet-dialog {
  position: fixed; border: 1px solid #b69470; border-radius: 17px 17px 0 0; background: #202128;
  color: var(--ink); width: min(100%, 650px); max-width: 100%; max-height: min(90dvh, 820px);
  margin: auto auto 0; padding: 0; box-shadow: 0 -20px 70px #000b;
}
.sheet-dialog::backdrop { background: #080910d9; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 18px 18px 12px; position: sticky; top: 0; background: #22232b; z-index: 1; }
.dialog-head h2 { margin: 0; }
.dialog-body {
  max-height: calc(min(90dvh, 820px) - 68px);
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); overflow: auto;
  overscroll-behavior: contain;
}
.roster-details { margin-top: 16px; border-top: 1px solid var(--line); }
.roster-details summary, .batch-draft summary {
  min-height: 48px; display: flex; align-items: center; cursor: pointer;
  color: var(--accent); font-weight: 750; list-style-position: inside;
}
.roster-details summary:focus-visible, .batch-draft summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.catalog { min-width: 0; }
.catalog-tools { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.catalog-tools input, .catalog-tools select { min-width: 0; }
.catalog-tools + .helper { margin: 9px 0; }
.catalog-list { display: grid; gap: 8px; margin: 10px 0; }
.preset-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #9b867770; border-radius: 10px; background: #191b22;
  padding: 10px; min-width: 0;
}
.preset-card.selected { border-color: var(--accent); background: #8b6b4833; }
.preset-card > div { min-width: 0; }
.preset-card .eyebrow { margin-bottom: 3px; font-size: .61rem; }
.preset-card strong { display: block; font-size: .91rem; line-height: 1.25; }
.preset-card p { margin: 4px 0 0; line-height: 1.3; }
.preset-card .btn { flex: none; max-width: 110px; }
.preset-preview, .batch-draft {
  display: grid; gap: 7px; border: 1px solid #c9a97d91; border-radius: 10px;
  background: #ac84531c; padding: 13px;
}
.preset-preview strong { color: var(--accent); }
.scene-controls { margin-bottom: 14px; }
.scene-controls .actions { margin-top: 10px; }
.category-controls { display: grid; gap: 7px; margin-top: 16px; }
.category-adjust { display: grid; grid-template-columns: minmax(0,1fr) 72px 72px; align-items: center; gap: 7px; padding: 7px 0; border-top: 1px solid var(--line); }
.category-adjust .btn { min-height: 44px; }
.background-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); }
.background-card strong { color: var(--paper); }
.background-card p { margin: 4px 0 0; max-width: 42ch; }
.destructive-link { color: #f4aeb3 !important; border-color: #aa6571 !important; }
.destructive-link:hover { background: #8f3e4e55; }
.scene-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.scene-shortcuts .btn { min-height: 44px; }
.scene-shortcuts.nine-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invite-qr {
  display: grid; place-items: center; width: fit-content; max-width: 100%;
  margin: 16px auto; padding: 12px; border-radius: 12px; background: #fff;
}
.invite-qr img { display: block; width: min(72vw, 280px); height: auto; image-rendering: pixelated; }
.nine-actions .btn { display: grid; place-items: center; gap: 1px; min-height: 54px; padding: 6px 3px; line-height: 1.12; }
.nine-actions .btn small { font-size: .64rem; font-weight: 500; opacity: .82; }
.nine-actions .btn[aria-pressed="true"] { color: #fff1df; background: #a3344b; border-color: #f5a6a9; box-shadow: 0 0 0 2px #ed9ba447; }
.voice-card.unread { border-color: #e17687; box-shadow: inset 3px 0 #dc526b, 0 13px 24px #0004; }
.voice-card .row { flex-wrap: wrap; gap: 8px; }
.voice-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0; }
.trait-mark {
  display: inline-grid; place-items: center; flex: none; min-width: 40px; min-height: 40px;
  border: 1px solid #c49b6b7a; border-radius: 7px; background: #14151d;
  color: var(--accent); font-size: 1.16rem; font-weight: 800;
}
.chip:has(.trait-mark) { padding: 3px 3px 3px 9px; gap: 7px; }
.chip.loss:has(.trait-mark) { text-decoration: none; }
.chip.loss .trait-edit, .chip.loss .ability-label { text-decoration: line-through; }
.chip.loss .trait-mark { opacity: 1; }
.challenge-hero { padding: 15px 17px; margin-bottom: 9px; }
.challenge-hero h1 { font-size: clamp(1.5rem, 6vw, 2.1rem); margin-bottom: 4px; }
.challenge-hero p { margin: 0; }
.challenge-hero::after { opacity: .35; }
.challenge-cta { position: sticky; top: 70px; z-index: 8; display: grid; gap: 6px; padding: 4px 0 10px; background: #15161ce8; }
.quick-gesture { display: grid; gap: 12px; }
.quick-gesture .gesture-grid { margin: 2px 0; }
.quick-gesture .gesture-grid:has(.gesture[hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-gesture .gesture { min-height: 106px; }
.sheet-dialog:has(.manual-form) { max-height: 96dvh; }
.sheet-dialog:has(.manual-form) .dialog-body { max-height: calc(96dvh - 68px); padding: 12px 14px 20px; }
.manual-form { gap: 10px; }
.manual-form textarea { min-height: 65px; }
.manual-form .notice { margin: 0; }
.manual-form p { margin: 0; }
.manual-form .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 410px) {
  .manual-form .two-col { grid-template-columns: minmax(0, 1fr); }
}
.batch-draft { display: block; scroll-margin-top: 10px; }
.batch-draft summary { min-height: 40px; }
.batch-rows { display: grid; gap: 10px; }
.batch-row { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #12161d; }
.batch-row .helper { margin: 0; }
.batch-row .check-row { padding: 0; }
.batch-toolbar {
  position: sticky; bottom: -18px; z-index: 2; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 7px;
  border: 1px solid #a78c6a; border-radius: 10px; padding: 9px;
  background: #23232cee; box-shadow: 0 -8px 22px #0009;
}
.batch-toolbar .btn { flex: 1; }
@media (min-width: 520px) {
  .catalog-tools { grid-template-columns: 1fr 180px; }
}
.toast { position: fixed; z-index: 30; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: 530px; margin: auto; padding: 12px 16px; border-radius: 9px; background: #eed4ac; color: #22191a; box-shadow: 0 10px 30px #0009; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; font-weight: 700; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #efadb5; }
.sheet { position: relative; overflow: hidden; }
.sheet::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.sheet::after { content: ""; position: absolute; right: -62px; top: -65px; width: 180px; height: 180px; border: 1px solid #d7b78540; border-radius: 50%; pointer-events: none; }
.sheet.human { --accent: #d7c39b; --line: #918a7466; background: linear-gradient(150deg, #35342d, #202321 76%); }
.sheet.human::after { border-style: dashed; }
.sheet.ghoul { --accent: #c7a87c; background: linear-gradient(150deg, #372a2c, #202229 78%); }
.sheet.vampire { --accent: #d58b91; background: linear-gradient(150deg, #3b222a, #1d1a24 80%); }
.character-page.human { --accent: #d7c39b; }
.character-page.human .card:not(.sheet) { background: linear-gradient(155deg, #302f2a, #202320 79%); border-color: #aa9b785f; }
.character-page.human .chip { background: #d8c59a12; border-color: #bcaa7e7a; }
.character-page.ghoul { --accent: #c7a87c; }
.character-page.ghoul .card:not(.sheet) { background: linear-gradient(155deg, #30282b, #202227 79%); }
.character-page.vampire { --accent: #d58b91; }
.character-page.vampire .card:not(.sheet) { background: linear-gradient(155deg, #32232a, #1e1c24 79%); border-color: #ae747a73; }
.character-page.vampire .chip { background: #a24f6330; border-color: #c2888a80; }
.type-header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.type-header h1 { font-family: "Umbra Caps", Georgia, serif; font-size: clamp(1.9rem, 7vw, 3rem); }
.type-header .brand-seal { width: 42px; height: 42px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 17px 0; }
.stat { border: 1px solid #dfd3c634; background: #10141aaa; border-radius: 9px; text-align: center; padding: 11px 4px; }
.stat strong { display: block; font: 600 1.68rem "Umbra Roman", Georgia, serif; color: var(--accent); }
.stat span { font-size: .72rem; color: var(--muted); }
.trait-group { margin-top: 17px; }
.trait-group h3 { padding-bottom: 7px; border-bottom: 1px solid #c8ac8450; font-size: .8rem; text-transform: uppercase; letter-spacing: .11em; color: var(--accent); }
.trait-edit { padding: 0; border: 0; background: transparent; color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.challenge-stage { display: grid; gap: 16px; }
.combatants { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; text-align: center; margin: 11px 0; }
.combatants strong { font: 500 1.19rem "Umbra Roman", Georgia, serif; overflow-wrap: anywhere; }
.combatants .versus { color: var(--accent); text-transform: uppercase; font-size: .7rem; letter-spacing: .16em; }
.gesture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gesture-grid:has(.gesture:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gesture { border: 2px solid #927969; border-radius: 12px; background: #24272d; color: var(--ink); min-height: 104px; display: grid; place-content: center; justify-items: center; gap: 5px; }
.gesture span { font-size: 2.42rem; line-height: 1; }
.gesture strong { font-size: .85rem; }
.gesture.selected { border-color: var(--accent); background: #a97c5540; box-shadow: inset 0 0 0 2px #e5bb8533; }
.reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reveal > div { background: #11151d; border: 1px solid #9e806b; border-radius: 10px; text-align: center; padding: 14px 8px; }
.reveal b { display: block; font-size: 2.4rem; line-height: 1.3; }
.reveal small { display: block; color: var(--muted); }
.status-line { padding: 13px 14px; border-radius: 9px; border: 1px solid #c5a16c; background: #aa784c38; font-weight: 700; }
.timeline { border-left: 1px solid #a88968; margin-left: 6px; padding-left: 17px; }
.timeline p { margin: 0 0 10px; color: var(--muted); font-size: .83rem; }
.timeline p::before { content: "•"; color: var(--accent); margin: 0 10px 0 -21px; }
@media (max-width: 365px) {
  .brand { gap: 5px; }
  .brand-seal { width: 33px; height: 33px; }
  .brand-wordmark { font-size: 1.03rem; }
  .brand-wordmark small { font-size: .48rem; letter-spacing: .11em; }
  .version { font-size: .6rem; }
  .topbar { padding-inline: 7px; gap: 3px; }
  .main { padding-inline: 12px; }
  .card { padding: 15px; }
}
@media (min-width: 700px) {
  .main { padding: 36px 28px 120px; }
  .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 8px 28px; }
  .sheet-dialog { border-radius: 17px; margin: auto; }
  .hero-auth { padding: 33px 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Sangue na Lua Cheia: vermelho profundo, lua e aparições discretas atrás das fichas. */
:root {
  --bg: #0b090e; --panel: #20151d; --panel-raised: #2e1a25;
  --ink: #f8ede9; --muted: #d0b8b9; --line: #9b64736e;
  --accent: #eab3aa; --accent-deep: #9e3448; --blood: #e44d63;
  --paper: #f4e1d9; --focus: #ffd19a;
}
body {
  background: radial-gradient(ellipse 100% 520px at 72% -100px, #47111e, transparent 85%),
    linear-gradient(180deg, #180c15 0%, #120c13 58%, #09090e 100%);
}
body::before {
  z-index: 0; opacity: .56; background: url('/lunar-background.v0.6.0.svg') center top / min(100vw, 720px) auto no-repeat;
}
.app-shell { z-index: 1; }
.topbar { background: #170e17f2; border-bottom-color: #c1485c80; box-shadow: 0 12px 28px #080208a6; }
.brand-seal { color: #f1aaa9; border-color: #da657883; background: radial-gradient(circle, #a7354a75, #20121c 73%); box-shadow: 0 0 20px #cd2c4936; }
.brand-wordmark { color: #fff0e8; }
.brand-wordmark small, .eyebrow { color: var(--accent); }
.version { border-color: #b86a7980; color: #eac6c2; }
.hero { border-color: #b754696e; background: radial-gradient(circle at 85% 12%, #9f263a58, transparent 42%), linear-gradient(145deg, #301824ed, #190f1bed 76%); box-shadow: inset 0 1px #f0a6a21a, 0 15px 32px #0007; }
.hero::after { right: -38px; top: -88px; width: 204px; height: 204px; border: 1px solid #ef68736b; background: radial-gradient(circle at 42% 37%, #d74f5e88 0%, #92223588 38%, #430e1a77 70%); box-shadow: 0 0 0 23px #c1304210, 0 0 0 55px #c1304209, 0 0 65px #b62a4863; }
.hero-auth { background: radial-gradient(circle at 50% -10%, #8d263d73, transparent 69%), linear-gradient(160deg, #321823, #140e18 83%); }
.hero-auth::after { right: calc(50% - 102px); top: -137px; }
.hero-auth h1 { color: #fff1eb; text-shadow: 0 2px 30px #ea475965; }
.hero-rule { background: linear-gradient(90deg, transparent, #ec8490, transparent); }
.signature { color: #efc2bd; }
.card { background: linear-gradient(155deg, #2b1b26ef, #1c151ff0 77%); box-shadow: inset 0 1px #efa6a313, 0 13px 25px #0006; }
.card.muted { background: #241721; }
.badge { color: #f4cbd0; border-color: #b564787f; background: #9b344c32; }
.chip { background: #e4a9ae0d; border-color: #ae708175; }
.btn { color: #fff4f1; border-color: #e47785b7; background: linear-gradient(180deg, #b7364b, #862238); box-shadow: inset 0 1px #ffaca959, 0 6px 18px #08020881; }
.btn.secondary { background: #402632; color: #f9e9e4; border-color: #bb8392; }
.btn.ghost { background: #bc476122; color: #f0b8b5; border-color: #c57d8ca3; }
.btn.danger { background: #9e2039; }
input, select, textarea { background: #160f19; border-color: #aa8990; }
.check-row input { accent-color: #ce4860; }
.notice { background: #8f273c37; color: #f6dedd; }
.empty { border-color: #b45f7680; }
.code-box { background: #140d16; border-color: #cb6879; }
.list-item { border-top-color: #a2586e50; }
.bottom-nav { background: #1c101bf7; border-top-color: #bd4e6585; }
.nav-btn { position: relative; color: #e0c5c4; }
.nav-btn.active { background: #a8324c43; color: #ffdcda; box-shadow: inset 0 2px #e47687; }
.nav-btn.has-alert { color: #fff1e7; background: #a429414a; }
.nav-alert { position: absolute; right: max(13%, 8px); top: 1px; min-width: 20px; height: 20px; padding: 1px 4px; display: grid; place-items: center; border: 1px solid #ffe1d0; border-radius: 50%; color: #fff; background: #d92e4b; box-shadow: 0 0 0 3px #1c101b, 0 0 13px #ef365d; font-size: .68rem; line-height: 1; font-weight: 850; }
.sheet-dialog { border-color: #ca687c; background: #241620; }
.sheet-dialog::backdrop { background: #090209df; }
.dialog-head { background: #2a1722; }
.preset-card, .batch-row { background: #1b111a; border-color: #a36c7b80; }
.preset-card.selected, .preset-preview, .batch-draft { background: #8d304944; border-color: #e0939b8a; }
.batch-toolbar { background: #281923f4; border-color: #bb7380; }
.gesture, .reveal > div { background: #21151f; border-color: #a66e7d; }
.gesture.selected, .gesture-choice:has(input:checked) { background: #9a324a52; }
.status-line { background: #99374e59; border-color: #d87280; }
.timeline { border-left-color: #c66f7e; }
.challenge-cta { background: #170e18ef; }
.challenge-list-item { display: block; width: 100%; text-align: left; color: inherit; }
.challenge-list-item.needs-action { border-color: #ef677d; box-shadow: inset 4px 0 #ed5b73, 0 0 19px #cb2c4a36; }
.attention-card { display: flex; align-items: center; gap: 12px; border: 1px solid #f17487; border-radius: 12px; padding: 12px; background: #83253dbd; box-shadow: 0 8px 25px #06010786; margin-bottom: 18px; }
.attention-card strong { display: block; font-size: .9rem; }
.attention-card p { margin: 1px 0 0; color: #ffe0dc; font-size: .8rem; }
.attention-card .btn { margin-left: auto; flex: none; }
.event-quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: -11px 0 20px; }
.event-quick-actions .btn { min-height: 54px; }
.attention-mark { flex: none; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #f3ccd0; color: #672032; font-weight: 900; font-size: 1.2rem; }
.mediate-button { border-color: #ed8796 !important; }
.auto-countdown { margin: 0; color: #ffe4d4; font-size: .86rem; font-weight: 700; }
.mediation-picker { display: grid; gap: 8px; padding: 0; border: 0; margin: 0; }
.mediation-picker legend { margin-bottom: 8px; font-weight: 750; }
.mediation-picker label { display: flex; align-items: start; gap: 11px; padding: 12px; border: 1px solid #a7687a; border-radius: 9px; background: #2e1a27; cursor: pointer; }
.mediation-picker label:has(input:checked) { background: #832b435c; border-color: #e58896; }
.mediation-picker input { width: 20px; min-height: 20px; margin: 2px 0; accent-color: #d54c65; flex: none; }
.mediation-picker small { display: block; margin-top: 3px; color: #e2c4c6; font-size: .78rem; line-height: 1.36; font-weight: 400; }
.damage-options { border-top: 1px solid var(--line); padding-top: 6px; }
.damage-options summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 700; cursor: pointer; }
.damage-options .two-col { margin-top: 8px; }
.damage-options p { margin: 8px 0 0; }
.sheet.human { background: linear-gradient(150deg, #38312e, #221e20 76%); }
.character-page.human .card:not(.sheet) { background: linear-gradient(155deg, #2e292a, #1f1b1e 79%); }
.sheet.ghoul { background: linear-gradient(150deg, #3e222b, #20161f 78%); }
.sheet.vampire { background: linear-gradient(150deg, #471c2d, #1b111b 80%); }
.character-page.ghoul .card:not(.sheet), .character-page.vampire .card:not(.sheet) { background: linear-gradient(155deg, #321c29, #1d141e 79%); }
@media (max-width: 410px) {
  .attention-card { flex-wrap: wrap; }
  .attention-card .btn { margin-left: 43px; width: calc(100% - 43px); }
  .hero::after { right: -80px; opacity: .45; }
}

/* Inventário: cartas compactas e alvos confortáveis durante o LARP. */
.inventory-section { padding: 13px; }
.inventory-section > .helper { margin: 0 3px 12px; }
.inventory-item { margin: 8px 0; border: 1px solid #b66f807a; border-radius: 11px; background: #1b121bd9; overflow: hidden; }
.inventory-item[open] { border-color: #e29da5; background: #2b1926; }
.inventory-item.exhausted { opacity: .7; }
.inventory-item summary { min-height: 55px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.inventory-item summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.inventory-item summary::-webkit-details-marker { display: none; }
.inventory-item summary::after { content: '⌄'; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.inventory-item[open] summary::after { transform: rotate(180deg); }
.item-name { display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex: 1; }
.item-name strong { overflow-wrap: anywhere; }
.item-meta { display: grid; justify-items: end; gap: 2px; flex: none; max-width: 48%; }
.item-count { flex: none; color: #f2c0bd; font-size: .82rem; }
.item-toggle-label { color: #eab3aa; font-size: .72rem; white-space: nowrap; }
.inventory-item .item-toggle-open, .inventory-item[open] .item-toggle-closed { display: none; }
.inventory-item[open] .item-toggle-open { display: inline; }
.inventory-item-body { padding: 0 13px 13px; }
.inventory-item-body p { margin: 9px 0; }
.inventory-item-body .actions { margin-top: 11px; }
.inventory-item-body .btn { min-height: 44px; }
.inventory-history { border-top: 1px solid var(--line); margin-top: 12px; padding: 12px 3px 2px; }
.inventory-history summary { min-height: 40px; cursor: pointer; color: var(--accent); }
.item-kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 18px; }
.item-kit-grid .btn { min-height: 50px; white-space: normal; }
.catalog-tools { display: grid; gap: 8px; }
.catalog-list { display: grid; gap: 9px; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.catalog-list .preset-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; min-width: 0; }
.catalog-list .preset-card strong { display: block; margin-bottom: 4px; }
.catalog-list .preset-card p { margin: 0; }
.catalog-list .btn { min-height: 44px; }
@media (max-width: 410px) {
  .catalog-list .preset-card { grid-template-columns: 1fr; }
  .catalog-list .preset-card .btn { justify-self: stretch; }
  .inventory-section { padding: 10px; }
  .item-count { font-size: .74rem; }
}

/* Direção visual da sessão Taverna 467: eclipse rubro, veludo, bronze e cera. */
:root{--bg:#0b0809;--panel:#181012;--panel-raised:#24171a;--ink:#f5e8d2;--muted:#c7b8a7;--line:#94704766;--accent:#dfbd7e;--accent-deep:#9b683b;--blood:#d61927;--paper:#ead9bd;--focus:#ffce75}
html{background:#0b0809}body{background:linear-gradient(180deg,#0d090b,#090708 80%)}
body::before{inset:0;background:linear-gradient(180deg,#09060832,#090709bc 600px,#090708 1150px),url('/art/v0.10.0/atmosphere.webp') center top/cover no-repeat;opacity:.78;z-index:0}
.app-shell{max-width:1080px;z-index:1}.main{padding:24px 22px calc(108px + env(safe-area-inset-bottom))}
.topbar{border-bottom:1px solid #a4784866;background:#0d090aef;box-shadow:0 12px 30px #0007;min-height:80px;padding-block:6px}
.brand{min-height:62px}.brand-logo{display:block;width:184px;height:62px;object-fit:contain;object-position:left center}.version{border-color:#8a653f66;color:#bba184;background:#1b1214;font-size:.64rem;letter-spacing:.04em}.icon-button{color:#e6c494}.icon-button:hover{background:#9e172326}
.brand-seal{background:radial-gradient(circle at 35% 20%,#6d1626,#170d10 74%);border-color:#c39a58;box-shadow:inset 0 0 15px #dc1f2529,0 0 18px #b50b1820}
.hero{border:1px solid #a47a466b;border-radius:6px;padding:30px 28px;background:linear-gradient(105deg,#140d10ed,#170b0ebd),url('/art/v0.10.0/atmosphere.webp') center 55%/cover;box-shadow:inset 0 1px #dcb87825,0 18px 44px #0006}
.hero::after{border-color:#e7353438;box-shadow:0 0 0 22px #b3151d08,0 0 0 54px #b3151d05}
.hero::before{content:'';position:absolute;left:25px;right:25px;top:0;height:2px;background:linear-gradient(90deg,transparent,#c61321 26%,#efbd70 50%,#c61321 74%,transparent)}
.hero-auth{padding:34px 25px 30px;background:linear-gradient(180deg,#10090c20,#120b0def 80%),url('/art/v0.10.0/atmosphere.webp') 62% center/cover}
.hero-auth::after{display:none}.hero-auth .entry-emblem{display:none}.hero-auth .signature{margin-bottom:12px;color:#efcf99;letter-spacing:.19em;font-size:.66rem}
.hero-auth h1.umbra-wordmark{margin:0 auto 4px;max-width:390px;width:100%;font-size:0;line-height:0}.umbra-wordmark img{display:block;max-width:100%;width:390px;height:auto;aspect-ratio:3/1;object-fit:contain;filter:drop-shadow(0 6px 22px #0008)}
.hero-auth h2{font-size:1.65rem;margin-top:24px;color:#f4dfb7}.hero-auth .lede{font-size:.92rem;color:#e2ccb3;max-width:38ch;margin-inline:auto}.hero-rule{background:linear-gradient(90deg,transparent,#e02b2b,#edc176,#e02b2b,transparent);width:76%;max-width:245px}
.hero-scene{min-height:215px;background:linear-gradient(100deg,#130b0ff2 12%,#190a0dcc 66%,#130a0d68),url('/art/v0.10.0/atmosphere.webp') center 58%/cover}
.hero-scene .lede{max-width:57ch}.hero-scene h1{font-size:clamp(2rem,5vw,3rem);color:#ffe3b8}
h1,h2{color:#f4deb9}h3{font-weight:720;letter-spacing:.012em}.eyebrow{color:#dab677;letter-spacing:.17em;font-size:.67rem}.lede{color:#d5c2b0}
.card{border:1px solid #98703c62;border-radius:6px;background:linear-gradient(145deg,#211619ed,#120d10f5 78%);box-shadow:inset 0 1px #e3bd8120,0 12px 28px #0005}.card:focus-within{border-color:#d0a568}.card.muted{background:#171113}
.card-header h2{color:#f2d39d}.quiet,.helper{color:#c6b5a1}.section-heading h2{color:#efcf98}.section-heading{margin-top:28px}
.btn{position:relative;isolation:isolate;min-height:48px;border-radius:4px;border:1px solid #e1ac668c;background:linear-gradient(180deg,#bb1825,#8e0c18);color:#fff1d9;box-shadow:inset 0 1px #ffcb945e,inset 0 -2px #45020c,0 6px 17px #0007;text-shadow:0 1px 2px #3b0008;letter-spacing:.02em;font-weight:760;transition:filter .15s,transform .15s,box-shadow .15s}
.btn::before{content:'';position:absolute;inset:0;z-index:-1;background:url('/art/v0.10.0/blood-stroke.svg') center/100% 100% no-repeat;opacity:.25;pointer-events:none}
.btn:hover{filter:brightness(1.08);box-shadow:inset 0 1px #ffd69b66,0 4px 24px #ad12283b}.btn:active{transform:translateY(1px)}.btn.secondary{background:linear-gradient(180deg,#302024,#1a1215);border-color:#a37e4d;color:#f4dbb3;text-shadow:none;box-shadow:inset 0 1px #d6b06b1c,0 4px 10px #0003}.btn.secondary::before,.btn.ghost::before{opacity:0}.btn.ghost{background:#110b0c64;border-color:#95703d82;color:#e9c88e;text-shadow:none}.btn.danger{background:linear-gradient(180deg,#85121f,#550c15);border-color:#d1776d;color:#fff0dc}.btn.small{min-height:44px;border-radius:4px;font-size:.83rem;padding:9px 12px}.btn:disabled{opacity:.46;box-shadow:none;filter:none}.btn:focus-visible,.icon-button:focus-visible,.nav-btn:focus-visible{outline:3px solid #ffca71;outline-offset:3px}.btn .icon{width:1.13rem;height:1.13rem}
input,select,textarea{background:#0f0b0d;border-color:#8b654b;border-radius:4px;color:#f4e4c9;box-shadow:inset 0 2px 7px #0004}input::placeholder,textarea::placeholder{color:#aa998b}input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:#efbb67}.check-row input{accent-color:#be1522}
.badge{background:#4e2c182f;border-color:#bd8e5487;color:#edcc91;border-radius:4px}.badge.red{background:#7c142942;border-color:#d75855;color:#ffb8aa}.badge.green{background:#17433777;border-color:#639f80;color:#bde7d2}.chip{background:#d9b77808;border-color:#a382574d;border-radius:4px;color:#eed8b5}.chip.loss{border-color:#c64c4d;color:#bb8f8b}.notice{background:#66121c44;border-color:#bb6b48;color:#f8d9b5;border-radius:4px}.attention-card{background:linear-gradient(100deg,#711021,#2b1218);border-color:#d89b63}.attention-mark{background:#e6b269;color:#351013}
.bottom-nav{max-width:1080px;background:#0d090bf5;border-top:1px solid #ad7b4875;box-shadow:0 -10px 35px #0009}.nav-btn{color:#b5a18d;border-radius:4px;min-height:58px}.nav-btn.active{background:linear-gradient(180deg,#a712233d,#54122010);color:#f5d496;box-shadow:inset 0 2px #e32832}.nav-btn .icon{width:23px;height:23px}
.sheet-dialog{border:1px solid #b38650;border-radius:7px 7px 0 0;background:#140d11;box-shadow:0 0 0 1px #3a1c21,0 20px 80px #000b}.sheet-dialog::backdrop{background:#060305dc;backdrop-filter:blur(5px)}.dialog-head{background:linear-gradient(90deg,#2b141b,#160e12);border-bottom:1px solid #a87a4b77}.dialog-head h2{color:#f4d3a1;font-size:1.45rem}.dialog-body{background:linear-gradient(180deg,#1a1115,#120d10)}
.preset-card{border-color:#916a4075;border-radius:5px;background:#201418}.preset-card.selected{border-color:#e2b770;background:#451a20}.roster-details summary,.inventory-history summary{color:#e4c28b}.type-header h1{color:#f9ddb0}.stats .stat{border-color:#9a6e4d66;background:#180e12}.stat strong{color:#f2d6a2}.sheet.human{background:linear-gradient(140deg,#252016,#14100f 80%);border-color:#99784988}.sheet.vampire,.sheet.ghoul{background:linear-gradient(145deg,#3c111b,#130b10 80%);border-color:#9b3448}.character-page .card:not(.sheet){background:linear-gradient(150deg,#221519,#140e11 82%)}
.inventory-section{padding:14px}.inventory-item{border:1px solid #8a5e3e88;border-radius:5px;background:#160f12}.inventory-item[open]{border-color:#d1a466;background:linear-gradient(135deg,#2b181b,#160f13)}.inventory-item summary{min-height:88px;padding:10px;gap:12px}.item-name{gap:13px;min-width:0;align-items:center}.item-name strong{font:500 1.13rem/1.25 'Umbra Roman',Georgia,serif;color:#f4d7a5;overflow-wrap:anywhere}.item-meta{color:#c4a47c;flex:none;font-size:.76rem}.item-count{color:#f0d4a2}.item-toggle-label{font-size:.68rem;color:#b69b7c}.inventory-item-body{padding:4px 16px 17px}.inventory-item summary::after{color:#d1a264}
.item-portrait{display:block;flex:none;width:68px;height:68px;overflow:hidden;border:1px solid #c49c5b90;border-radius:5px;background:radial-gradient(circle at 40% 25%,#49301e,#0e090b 75%);box-shadow:inset 0 0 0 3px #171011,0 4px 12px #0006}.item-portrait img,.item-portrait svg{display:block;width:100%;height:100%;object-fit:cover}.item-portrait svg{padding:7px}.item-catalog-description{display:flex;align-items:center;gap:14px;min-width:0}.item-catalog-description>.item-portrait{width:74px;height:74px}.item-catalog-description>div{min-width:0}.catalog-list .preset-card{padding:13px;gap:14px}.catalog-list .preset-card strong{font-family:'Umbra Roman',Georgia,serif;font-weight:500;font-size:1.1rem;color:#f2d4a1}.catalog-list .preset-card .eyebrow{font-size:.59rem;line-height:1.4}
@media(min-width:900px){.main.auth-main{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:24px;max-width:1050px;padding-top:42px}.auth-main>.hero-auth{margin:0;min-height:530px;display:flex;flex-direction:column;justify-content:center;padding:35px}.auth-main>.card{margin:0;align-self:center;padding:28px}.auth-main>p{grid-column:1/-1;margin:0}.sheet-dialog{border-radius:7px}.hero-scene{padding-block:36px}}
@media(max-width:600px){.main{padding:18px 13px calc(102px + env(safe-area-inset-bottom))}.main.auth-main{padding-top:16px}.topbar{min-height:72px}.brand-logo{width:151px;height:55px}.hero{padding:24px 20px}.hero-auth{padding:23px 18px}.hero-auth h1.umbra-wordmark{max-width:320px}.hero-auth h2{font-size:1.5rem;margin-top:18px}.hero-auth .signature{font-size:.6rem}.hero-auth .lede{font-size:.86rem}.hero-scene{min-height:230px}.card{padding:16px}.inventory-item summary{gap:8px}.item-portrait{width:61px;height:61px}.item-name{gap:10px}.item-name strong{font-size:1.03rem}.item-meta{max-width:92px}.inventory-item summary::after{font-size:1.2rem}.catalog-list .preset-card{grid-template-columns:1fr}.catalog-list .preset-card .btn{justify-self:stretch}.item-catalog-description>.item-portrait{width:65px;height:65px}.sheet-dialog{width:100%;max-height:94dvh}.sheet-dialog .dialog-body{max-height:calc(94dvh - 68px)}.hero-auth .hero-rule{margin-top:15px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
