:root {
  color-scheme:light;
  --bg:#f7f6f2;
  --surface:#fffefa;
  --ink:#282731;
  --muted:#706d76;
  --line:#e4e1db;
  --plum:#4f365d;
  --plum-dark:#30243b;
  --lavender:#f1ecf4;
  --gold:#e9c79e;
  --green:#3d705b;
  --danger:#a23535;
  --radius:12px;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-synthesis:none;
  font-size:15px;
  line-height:1.6;
  background:var(--bg);
  color:var(--ink);
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select,textarea {
  font:inherit;
}
button {
  cursor:pointer;
}
button,a,input,select,textarea,summary {
  -webkit-tap-highlight-color:transparent;
}
button {
  color:inherit;
}
button:disabled {
  cursor:not-allowed;
  opacity:.5;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid #986ea5;
  outline-offset:3px;
}
button {
  touch-action:manipulation;
}
a {
  color:var(--plum);
}
h1,h2,h3,p {
  margin-top:0;
}
h1,h2,h3 {
  line-height:1.2;
}
h1,h2 {
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
}
h1 {
  font-size:40px;
  letter-spacing:-1.25px;
}
h2 {
  font-size:28px;
}
h3 {
  font-size:18px;
}
svg {
  display:block;
  width:24px;
  height:24px;
}
button svg {
  pointer-events:none;
}
[hidden] {
  display:none!important;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.skip-link {
  position:fixed;
  top:-100px;
  left:15px;
  padding:12px;
  background:white;
  z-index:100;
}
.skip-link:focus {
  top:10px;
}
#main:focus,#step-title:focus {
  outline:none;
}
.topbar {
  height:88px;
  padding:0 max(5%,calc((100% - 1360px)/2));
  background:var(--surface);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  border:0;
  background:none;
  text-align:left;
  padding:8px 0;
  font-size:25px;
  letter-spacing:5px;
  font-weight:650;
  line-height:1.2;
}
.brand-mark {
  font-size:47px;
  letter-spacing:0;
  color:var(--plum);
}
.brand small {
  display:block;
  font-size:8px;
  letter-spacing:1.65px;
  margin-top:5px;
  color:var(--muted);
  font-weight:500;
}
.topbar nav {
  display:flex;
  align-items:center;
  gap:32px;
}
.nav-link {
  font-size:13px;
  font-weight:600;
  border:0;
  background:none;
  padding:14px 0;
}
.help-button {
  background:none;
  border:0;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  padding:10px 0;
  color:var(--muted);
}
.help-button>span:first-child {
  border:1px solid #aaa4ad;
  border-radius:50%;
  width:21px;
  height:21px;
  line-height:19px;
}
.primary,.secondary,.danger {
  border:1px solid transparent;
  border-radius:7px;
  padding:12px 20px;
  min-height:46px;
  font-size:13px;
  font-weight:650;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  transition:background .15s,transform .15s;
}
.primary {
  background:var(--plum);
  color:white;
}
.primary:hover:not(:disabled) {
  background:#664774;
}
.secondary {
  color:var(--ink);
  background:var(--surface);
  border-color:var(--line);
}
.secondary:hover:not(:disabled) {
  background:var(--lavender);
  border-color:#c6b8cd;
}
.danger {
  background:var(--danger);
  color:white;
}
.primary.light {
  background:#f5e6cf;
  color:#382c36;
}
.primary.light:hover {
  background:white;
}
.primary.light>span:first-child {
  font-size:19px;
}
.text-button {
  padding:8px 0;
  background:none;
  border:0;
  color:var(--plum);
  font-weight:600;
  font-size:13px;
  min-height:44px;
  text-align:left;
}
.text-button:hover {
  text-decoration:underline;
}
.icon-button {
  background:none;
  border:1px solid var(--line);
  border-radius:7px;
  min-width:44px;
  min-height:44px;
  font-size:25px;
  font-weight:300;
}
.eyebrow {
  font-family:Inter,"Segoe UI",sans-serif;
  font-size:10px;
  letter-spacing:1.8px;
  font-weight:700;
  color:var(--muted);
}
.home-wrap {
  max-width:1240px;
  margin:0 auto;
  padding:42px 36px 0;
}
.hero {
  background:var(--plum-dark);
  border-radius:16px;
  color:#fff7eb;
  display:flex;
  justify-content:space-between;
  overflow:hidden;
  position:relative;
  padding:49px 52px;
  min-height:360px;
}
.hero-copy {
  position:relative;
  z-index:1;
}
.hero .eyebrow {
  color:var(--gold);
  font-size:9px;
  letter-spacing:2.2px;
}
.hero h1 {
  font-size:48px;
  line-height:1.1;
  margin:19px 0;
  letter-spacing:-.8px;
}
.hero p {
  color:#d4cbd9;
  font-size:13px;
  line-height:1.85;
  margin-bottom:25px;
}
.hero-foot {
  display:block;
  font-size:10px;
  color:#b9adbf;
  margin-top:19px;
  letter-spacing:.6px;
}
.hero-art {
  width:330px;
  align-self:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  margin-right:5px;
  color:var(--gold);
}
.hero-art .emblem {
  width:270px;
  height:270px;
  stroke-width:.9;
}
.hero-art>span {
  font-size:8px;
  letter-spacing:5px;
  display:flex;
  align-items:center;
  gap:22px;
  margin-top:6px;
}
.hero-art i {
  font-size:18px;
  font-style:normal;
}
.library-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:44px 0 24px;
  gap:20px;
}
.library-heading h2 {
  margin:7px 0 0;
  display:flex;
  align-items:center;
  gap:13px;
  font-size:29px;
}
.count {
  font:500 12px "Segoe UI",sans-serif;
  background:#eae7e2;
  border-radius:50%;
  height:25px;
  width:25px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.filter-tabs {
  display:flex;
  padding:4px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#eeece7;
}
.filter-tabs button {
  padding:8px 14px;
  min-height:36px;
  font-size:12px;
  background:transparent;
  border:0;
  border-radius:5px;
  color:var(--muted);
}
.filter-tabs button.active {
  background:var(--surface);
  color:var(--ink);
  box-shadow:0 1px 3px #0000000b;
}
.empty-state {
  border:1px dashed #d5d0d8;
  border-radius:12px;
  padding:35px;
  text-align:center;
  background:#fffefa90;
}
.empty-symbol {
  display:block;
  width:54px;
  height:54px;
  border:1px solid var(--line);
  border-radius:50%;
  line-height:52px;
  font-size:32px;
  color:var(--plum);
  margin:0 auto 15px;
}
.empty-state h3 {
  font-family:Georgia,serif;
  font-weight:400;
  font-size:24px;
  margin-bottom:9px;
}
.empty-state p {
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}
.empty-state .text-button {
  text-align:center;
}
.local-note {
  display:flex;
  align-items:center;
  gap:15px;
  margin:28px 0;
  padding:19px 21px;
  background:#eeede8;
  border-radius:9px;
}
.local-note>span:first-child {
  font-size:28px;
  color:var(--muted);
}
.local-note strong {
  font-size:12px;
  font-weight:600;
}
.local-note p {
  font-size:11px;
  color:var(--muted);
  margin:1px 0 0;
}
.local-tag {
  font-size:10px;
  margin-left:auto;
  color:var(--muted);
  white-space:nowrap;
}
.site-footer {
  max-width:1240px;
  margin:35px auto 0;
  padding:20px 36px 27px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  color:var(--muted);
  font-size:10px;
  border-top:1px solid var(--line);
}
.site-footer button {
  border:0;
  background:none;
  font-size:inherit;
  color:inherit;
  padding:0;
  min-height:30px;
  text-decoration:underline;
  text-underline-offset:3px;
}
.character-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}
.character-card {
  border:1px solid var(--line);
  background:var(--surface);
  padding:24px;
  border-radius:12px;
}
.character-card-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
}
.class-icon {
  display:inline-flex;
  width:43px;
  height:43px;
  background:#f0eaf2;
  border-radius:10px;
  color:var(--plum);
  align-items:center;
  justify-content:center;
}
.badge {
  border:1px solid #dfd6e5;
  color:var(--plum);
  background:#f4eef7;
  border-radius:4px;
  padding:3px 7px;
  font-size:9px;
  letter-spacing:.6px;
  white-space:nowrap;
}
.badge.complete {
  color:#32624c;
  border-color:#cddfd2;
  background:#eff6ef;
}
.character-card h3 {
  font:400 25px Georgia,serif;
  margin-bottom:8px;
  overflow-wrap:anywhere;
}
.character-card p {
  margin-bottom:3px;
  font-size:13px;
}
.character-card small {
  font-size:11px;
  color:var(--muted);
}
.character-card-progress {
  margin:22px 0 18px;
  font-size:10px;
  color:var(--muted);
}
progress {
  width:100%;
  height:4px;
  border:0;
  border-radius:8px;
  overflow:hidden;
  background:#e6e0e9;
  display:block;
  margin-top:8px;
}
progress::-webkit-progress-bar {
  background:#e6e0e9;
}
progress::-webkit-progress-value {
  background:var(--plum);
}
progress::-moz-progress-bar {
  background:var(--plum);
}
.character-actions {
  display:flex;
  gap:8px;
}
.character-actions .secondary {
  flex:1;
  font-size:12px;
  padding:10px;
}
.delete {
  font-size:20px;
  color:var(--muted);
}
.delete:hover {
  color:var(--danger);
  background:#f8eeee;
}
.updated {
  display:block;
  margin-top:12px;
  font-size:9px;
  color:var(--muted);
}
.new-card {
  border:1px dashed #cec7d2;
  background:none;
  border-radius:12px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  min-height:230px;
  color:var(--plum);
}
.new-card>span {
  width:45px;
  height:45px;
  border-radius:50%;
  background:var(--lavender);
  line-height:45px;
  font-size:24px;
  margin-bottom:10px;
}
.new-card strong {
  font-weight:500;
}
.new-card small {
  color:var(--muted);
  font-size:12px;
}
.wizard-top {
  max-width:1410px;
  margin:0 auto;
  padding:22px 34px 17px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.wizard-top .text-button {
  font-size:11px;
  color:var(--muted);
}
[data-save-status] {
  font-size:10px;
  color:var(--green);
}
.wizard-layout {
  display:grid;
  grid-template-columns:185px minmax(0,1fr) 254px;
  gap:30px;
  max-width:1410px;
  margin:0 auto;
  padding:0 34px;
  align-items:start;
}
.steps-sidebar {
  position:sticky;
  top:25px;
  padding-top:10px;
}
.steps-sidebar>.eyebrow {
  font-size:8px;
  letter-spacing:1px;
}
.steps-sidebar nav {
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.step-button {
  display:flex;
  align-items:center;
  gap:13px;
  padding:10px 12px;
  text-align:left;
  min-height:48px;
  border:1px solid transparent;
  border-radius:8px;
  background:none;
  color:var(--muted);
  font-size:12px;
}
.step-button>span:first-child {
  font-size:10px;
  color:#93899a;
  width:24px;
  height:24px;
  border:1px solid var(--line);
  border-radius:50%;
  text-align:center;
  line-height:22px;
  flex-shrink:0;
}
.step-button small {
  display:block;
  font-size:8px;
  line-height:1.3;
  color:var(--muted);
}
.step-button:hover {
  background:#eeebef;
}
.step-button.active {
  background:#eee7f1;
  border-color:#e0d5e5;
  color:var(--plum);
  font-weight:650;
}
.step-button.active>span:first-child {
  background:var(--plum);
  border-color:var(--plum);
  color:white;
}
.sidebar-note {
  border-top:1px solid var(--line);
  margin:22px 13px 0;
  padding-top:20px;
  color:#8a7a91;
}
.sidebar-note span {
  font-size:26px;
}
.sidebar-note p {
  font-family:Georgia,serif;
  font-style:italic;
  font-size:13px;
  max-width:140px;
  line-height:1.6;
  margin-top:4px;
}
.wizard-center {
  min-width:0;
}
.step-section {
  padding:23px 0;
}
.step-header {
  margin-bottom:30px;
}
.step-header .eyebrow {
  font-size:9px;
  color:var(--plum);
}
.step-header i {
  font-style:normal;
  margin:0 8px;
  color:#bcb2c2;
}
.step-header h1 {
  margin:12px 0 13px;
  font-size:36px;
  line-height:1.15;
}
.step-header>p {
  font-size:13px;
  color:var(--muted);
  max-width:610px;
  line-height:1.8;
  margin-bottom:0;
}
.choice-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.choice {
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
  display:flex;
  flex-direction:column;
  min-width:0;
  transition:border-color .15s,box-shadow .15s;
}
.choice:hover {
  border-color:#bba9c3;
}
.choice.selected {
  border-color:var(--plum);
  box-shadow:0 0 0 1px var(--plum);
  background:#faf7fc;
}
.choice-main {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  border:0;
  background:none;
  padding:18px 18px 10px;
  text-align:left;
  flex:1;
  border-radius:10px;
  min-width:0;
}
.choice-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:13px;
  min-height:22px;
}
.choice-top .eyebrow {
  font-size:8px;
  letter-spacing:.7px;
}
.choice-main>strong {
  font-family:Georgia,serif;
  font-size:22px;
  font-weight:400;
  line-height:1.2;
  margin-bottom:10px;
}
.choice-description {
  font-size:11px;
  color:var(--muted);
  line-height:1.8;
  display:block;
}
.choice-meta {
  margin-top:15px;
  font-size:9px;
  font-weight:600;
  color:var(--plum);
}
.selection-mark {
  width:21px;
  height:21px;
  line-height:19px;
  border:1px solid #ddd5e1;
  border-radius:50%;
  color:#96849f;
  flex-shrink:0;
  text-align:center;
  font-size:13px;
}
.selected .selection-mark {
  background:var(--plum);
  color:white;
  border-color:var(--plum);
}
.choice-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 18px 7px;
  gap:6px;
}
.choice-bottom .text-button {
  font-size:10px;
  color:var(--muted);
  min-height:38px;
}
.selected-label {
  font-size:9px;
  font-weight:600;
  color:var(--plum);
}
.unavailable-reason {
  font-size:10px;
  color:var(--muted);
  padding:0 18px 12px;
  margin:0;
}
.unavailable .choice-main {
  opacity:.65;
}
.section-heading {
  margin:34px 0 18px;
}
.section-heading h2 {
  font-size:25px;
  margin-bottom:7px;
}
.section-heading p {
  font-size:12px;
  color:var(--muted);
  margin:0;
}
.rule-details {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:8px;
  margin:20px 0;
}
.rule-details summary {
  padding:14px 17px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  min-height:48px;
}
.rule-details[open] summary {
  border-bottom:1px solid var(--line);
}
.rule-details>.prose {
  padding:16px 19px;
}
.prose {
  font-size:13px;
  line-height:1.85;
  overflow-wrap:anywhere;
}
.prose p {
  margin-bottom:13px;
}
.prose p:last-child {
  margin-bottom:0;
}
.prose h3 {
  font-family:"Segoe UI",sans-serif;
  font-size:13px;
  margin:24px 0 12px;
}
.prose ul {
  padding-left:21px;
}
.prose li {
  padding-left:3px;
  margin-bottom:8px;
}
.prose strong {
  font-weight:650;
}
.prose hr {
  border:0;
  border-top:1px solid var(--line);
  margin:22px 0;
}
.field {
  display:flex;
  flex-direction:column;
  gap:7px;
  margin:18px 0;
  color:var(--ink);
  font-size:12px;
  min-width:0;
}
.field>span {
  font-weight:600;
}
.field small {
  color:var(--muted);
  font-size:10px;
  line-height:1.65;
}
.field input,.field select,.field textarea,.search-field input {
  width:100%;
  border:1px solid #d7d1da;
  background:var(--surface);
  border-radius:7px;
  padding:12px 13px;
  font-size:14px;
  color:var(--ink);
  min-height:47px;
  min-width:0;
}
.field textarea {
  resize:vertical;
  min-height:115px;
}
.field select {
  padding-right:24px;
  text-overflow:ellipsis;
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:18px;
}
.form-grid .field {
  margin-bottom:8px;
}
.callout {
  padding:18px;
  border:1px solid #e0d9e6;
  background:#f0ebf4;
  border-radius:9px;
  display:flex;
  gap:13px;
  margin:20px 0;
}
.callout>span {
  font-size:21px;
  color:var(--plum);
}
.callout strong {
  font-size:12px;
  font-weight:600;
  color:var(--plum);
}
.callout p {
  font-size:11px;
  line-height:1.8;
  color:#6e6077;
  margin:4px 0 0;
}
.muted {
  color:var(--muted);
  font-size:12px;
  line-height:1.8;
}
.inline-toggle {
  background:#eeece7;
  border-radius:9px;
  padding:17px 18px;
  margin-bottom:23px;
}
.inline-toggle label {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  font-weight:600;
  min-height:30px;
}
.inline-toggle input {
  width:19px;
  height:19px;
  accent-color:var(--plum);
  flex-shrink:0;
}
.inline-toggle>span {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin:6px 0 0 29px;
}
.search-field {
  display:block;
  margin-bottom:20px;
}
.search-field input {
  background:transparent;
}
.chosen-features {
  border-left:3px solid var(--plum);
  background:#eeebf0;
  border-radius:0 8px 8px 0;
  padding:20px;
  margin-top:22px;
}
.chosen-features .prose {
  margin-top:14px;
}
.chosen-features .text-button {
  margin-right:20px;
}
.trait-pool {
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:9px;
  padding:18px;
  margin-bottom:18px;
}
.trait-pool>span {
  font-size:9px;
  letter-spacing:1px;
  margin-right:auto;
  max-width:90px;
  color:var(--muted);
}
.trait-pool b {
  background:#eee7f2;
  color:var(--plum);
  font-weight:500;
  font-size:20px;
  text-align:center;
  min-width:39px;
  border-radius:7px;
  padding:5px;
}
.trait-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px 20px;
  margin:12px 0;
}
.trait-field .field {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:9px;
  padding:16px;
}
.trait-field .field>span {
  font:400 20px Georgia,serif;
}
.trait-field select {
  font-size:22px;
  color:var(--plum);
  font-weight:600;
}
.stat-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin:20px 0;
}
.stat {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  text-align:center;
  padding:20px 8px;
}
.stat b {
  display:block;
  font:400 35px Georgia,serif;
  color:var(--plum);
  line-height:1.2;
}
.stat span {
  font-size:10px;
  color:var(--muted);
  display:block;
  margin-top:8px;
}
.equipment-detail {
  font-size:11px;
  background:#ece8ef;
  border-radius:7px;
  padding:12px;
  margin:8px 0 14px;
}
.equipment-detail .prose {
  font-size:11px;
  margin-top:5px;
}
.inventory-base {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.inventory-base span {
  background:#eeece7;
  border:1px solid var(--line);
  border-radius:5px;
  padding:7px 10px;
  font-size:11px;
}
.selection-counter {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:22px;
  padding:15px 18px;
  background:#ede8f0;
  border-radius:8px;
}
.selection-counter strong {
  font-size:13px;
  color:var(--plum);
}
.selection-counter p {
  font-size:10px;
  color:var(--muted);
  margin:4px 0 0;
}
.selection-counter>span {
  font-size:9px;
  letter-spacing:1px;
  white-space:nowrap;
  color:var(--plum);
}
.summary-panel {
  position:sticky;
  top:25px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  padding:21px;
  text-align:center;
  margin-top:9px;
}
.summary-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:7px;
}
.summary-heading .eyebrow {
  font-size:8px;
  letter-spacing:1px;
}
.summary-heading .badge {
  font-size:8px;
  padding:2px 5px;
}
.summary-emblem {
  display:flex;
  align-items:center;
  justify-content:center;
  width:62px;
  height:62px;
  border:1px solid #d6c9df;
  background:#f1ecf5;
  border-radius:50%;
  margin:24px auto 17px;
  color:var(--plum);
}
.summary-emblem svg {
  width:30px;
  height:30px;
}
.summary-panel h2,#dialog-body>.summary-heading~h2 {
  font-size:25px;
  margin-bottom:8px;
  overflow-wrap:anywhere;
}
.summary-panel>p {
  font-size:10px;
  color:var(--muted);
  margin-bottom:12px;
}
.summary-heritage {
  font-size:10px;
  color:var(--muted);
  line-height:1.9;
}
.summary-stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding:20px 0;
  margin-top:13px;
  border-block:1px solid var(--line);
}
.summary-stats>div:not(:last-child) {
  border-right:1px solid var(--line);
}
.summary-stats b {
  display:block;
  font:400 26px Georgia,serif;
  color:var(--plum);
}
.summary-stats span {
  font-size:9px;
  color:var(--muted);
}
.summary-traits {
  margin:17px 0;
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.summary-traits>div,.summary-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:11px;
  margin:8px 0;
}
.summary-traits dt {
  color:var(--muted);
}
.summary-traits dd {
  margin:0;
  font-weight:600;
  color:var(--plum);
}
.summary-bottom {
  font-size:10px;
  color:var(--muted);
}
.summary-bottom strong {
  font-size:11px;
  color:var(--ink);
}
.summary-panel>.text-button {
  font-size:10px;
  margin-top:12px;
  text-align:center;
}
.wizard-bottom {
  border-top:1px solid var(--line);
  padding:23px 0 5px;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:14px;
}
.wizard-bottom>div:first-child {
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}
.wizard-bottom #step-pending {
  font-size:10px;
  color:var(--plum);
}
.wizard-bottom small {
  font-size:9px;
  color:var(--muted);
}
.wizard-actions {
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.wizard-actions .primary {
  min-width:150px;
}
.mobile-progress {
  display:none;
}
.notice {
  border-left:3px solid #9a743c;
  background:#f5ecdb;
  padding:14px 17px;
  font-size:12px;
  border-radius:0 7px 7px 0;
  margin-bottom:20px;
}
.review-state {
  border:1px solid #cbdece;
  background:#eef4ee;
  border-radius:8px;
  padding:18px;
  color:#345d44;
}
.review-state.pending {
  background:#f7f0e4;
  border-color:#e5d7bc;
  color:#705629;
}
.review-state strong {
  font-size:14px;
}
.review-state p {
  margin:6px 0 0;
  font-size:11px;
}
.issue-list {
  padding:0;
  list-style:none;
  margin:14px 0 25px;
}
.issue-list li {
  border-bottom:1px solid var(--line);
}
.issue-list button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  width:100%;
  border:0;
  background:none;
  color:var(--plum);
  text-align:left;
  padding:13px 4px;
  font-size:12px;
  min-height:44px;
}
.identity-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  margin:25px 0;
}
.identity-grid dt,.narrative dt {
  font-size:10px;
  color:var(--muted);
  margin-bottom:4px;
}
.identity-grid dd {
  font-size:13px;
  margin:0;
  overflow-wrap:anywhere;
}
.sheet-traits {
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:9px;
  margin:20px 0;
}
.sheet-traits>div {
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:7px;
  padding:13px 4px;
  text-align:center;
}
.sheet-traits b {
  font:400 24px Georgia,serif;
  color:var(--plum);
}
.sheet-traits span {
  display:block;
  font-size:9px;
  margin-top:5px;
}
.sheet-traits small {
  display:block;
  font-size:8px;
  color:var(--muted);
  margin-top:5px;
}
.protection {
  background:#ece7f0;
  border-radius:8px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding:16px;
  text-align:center;
  margin-bottom:12px;
  gap:10px;
}
.protection span {
  font-size:10px;
  color:var(--plum);
}
.protection b {
  display:block;
  font:400 26px Georgia,serif;
  margin-top:7px;
}
.attack {
  border:1px solid var(--line);
  border-radius:8px;
  padding:18px;
  margin-bottom:12px;
  background:var(--surface);
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}
.attack h3 {
  font-size:14px;
  margin-bottom:4px;
}
.attack p {
  font-size:11px;
  color:var(--muted);
  margin:0;
}
.attack>b {
  font-size:19px;
  font-weight:500;
  color:var(--plum);
}
.attack>.prose {
  width:100%;
  font-size:11px;
}
.experience-summary {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.experience-summary>div {
  display:flex;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line);
  padding:10px 0;
  font-size:13px;
}
.experience-summary b {
  color:var(--plum);
}
.narrative>div {
  margin-bottom:20px;
}
.narrative dd {
  margin:0;
  font-size:13px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.sheet-wrap {
  max-width:1000px;
  padding:0 36px;
  margin:0 auto;
}
.sheet-wrap .wizard-top {
  padding:20px 0;
}
.sheet-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:var(--plum-dark);
  color:#fff7eb;
  border-radius:12px;
  padding:35px;
  margin:0 0 30px;
}
.sheet-header .eyebrow {
  color:var(--gold);
  font-size:9px;
}
.sheet-header h1 {
  margin:12px 0 8px;
  overflow-wrap:anywhere;
}
.sheet-header p {
  font-size:12px;
  color:#cbbfd0;
  margin:0;
}
.sheet-buttons {
  display:flex;
  flex-direction:column;
  gap:9px;
  flex-shrink:0;
}
.sheet-content {
  max-width:780px;
  margin:0 auto;
}
.storage-error {
  border-bottom:1px solid #dfb5b5;
  background:#fff0ef;
  color:#873030;
  padding:16px max(5%,calc((100% - 1240px)/2));
  font-size:12px;
}
.storage-error button {
  border:1px solid #dbb1b1;
  background:#fffafa;
  border-radius:5px;
  margin:8px 8px 0 0;
  padding:9px;
  min-height:40px;
  font-size:11px;
}
.error-text {
  color:var(--danger)!important;
}
dialog {
  padding:0;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:14px;
  max-height:85dvh;
  width:min(740px,calc(100% - 30px));
  box-shadow:0 25px 90px #16101d40;
}
dialog::backdrop {
  background:#20172585;
  backdrop-filter:blur(3px);
}
.dialog-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 23px;
  border-bottom:1px solid var(--line);
  gap:20px;
  position:sticky;
  top:0;
  background:var(--surface);
  z-index:2;
}
.dialog-top h2 {
  font-size:26px;
  margin:0;
}
.dialog-top .icon-button {
  border:0;
}
#dialog-body {
  padding:24px;
}
.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:24px;
}
.source-path {
  font-size:10px;
  color:var(--muted);
  overflow-wrap:anywhere;
}
@media(min-width:1500px) {
  .wizard-layout {
    grid-template-columns:195px minmax(0,1fr) 275px;
    gap:40px;
  }
  .classes {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .choice-main>strong {
    font-size:23px;
  }
}
@media(max-width:1150px) {
  .wizard-layout {
    grid-template-columns:155px minmax(0,1fr) 220px;
    gap:20px;
    padding:0 24px;
  }
  .wizard-top {
    padding-inline:24px;
  }
  .step-button {
    padding:9px 7px;
    gap:9px;
    font-size:11px;
  }
  .summary-panel {
    padding:15px;
  }
  .step-header h1 {
    font-size:32px;
  }
  .trait-pool {
    gap:7px;
    padding:12px;
  }
  .trait-pool b {
    min-width:31px;
    font-size:18px;
  }
  .hero-art {
    width:260px;
  }
  .hero-art .emblem {
    width:230px;
    height:230px;
  }
  .hero h1 {
    font-size:44px;
  }
  .wizard-bottom>div:first-child {
    flex-direction:column;
    align-items:flex-start;
  }
  .sheet-traits {
    grid-template-columns:repeat(3,1fr);
  }
  .character-grid {
    grid-template-columns:repeat(2,1fr);
  }
}
@media(max-width:950px) {
  .wizard-layout {
    grid-template-columns:145px minmax(0,1fr);
  }
  .summary-panel {
    display:none;
  }
  .mobile-progress {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    font-size:9px;
    letter-spacing:.5px;
    color:var(--muted);
    padding-top:12px;
  }
  .mobile-progress progress {
    display:none;
  }
  .mobile-progress button {
    border:1px solid var(--line);
    border-radius:5px;
    background:var(--surface);
    color:var(--plum);
    font-size:11px;
    padding:9px 12px;
    min-height:40px;
  }
  .hero {
    padding:35px;
  }
  .hero h1 {
    font-size:40px;
  }
  .hero-art {
    width:200px;
  }
  .hero-art .emblem {
    width:195px;
    height:195px;
  }
  .hero-art>span {
    font-size:7px;
    letter-spacing:2px;
    gap:10px;
  }
  .local-tag {
    display:none;
  }
  .library-heading {
    align-items:flex-start;
    flex-direction:column;
    gap:18px;
  }
}
@media(max-width:650px) {
  :root {
    font-size:14px;
  }
  .topbar {
    height:73px;
    padding:0 19px;
    gap:10px;
  }
  .brand {
    font-size:21px;
    letter-spacing:4px;
    gap:8px;
  }
  .brand-mark {
    font-size:39px;
  }
  .brand small {
    font-size:6px;
    letter-spacing:1.4px;
  }
  .topbar nav {
    gap:14px;
  }
  .nav-link {
    display:none;
  }
  .topbar nav .nav-link[data-action="wiki"] { display:block; font-size:12px; }
  .help-label {
    display:none;
  }
  .help-button {
    min-height:44px;
    min-width:44px;
    justify-content:center;
  }
  .wiki-wrap { padding:32px 18px 60px; }
  .wiki-heading h1 { font-size:32px; }
  .home-wrap {
    padding:22px 18px 0;
  }
  .hero {
    min-height:385px;
    padding:31px 26px;
  }
  .hero h1 {
    font-size:39px;
    max-width:280px;
    margin-top:18px;
  }
  .hero .eyebrow {
    font-size:7px;
    letter-spacing:1.7px;
  }
  .hero p {
    font-size:12px;
    max-width:260px;
  }
  .hero p br {
    display:none;
  }
  .hero-art {
    position:absolute;
    width:230px;
    bottom:-64px;
    right:-87px;
    opacity:.22;
    transform:rotate(12deg);
  }
  .hero-art .emblem {
    width:230px;
    height:230px;
  }
  .hero-art>span {
    display:none;
  }
  .hero-foot {
    font-size:9px;
    margin-top:23px;
  }
  .library-heading {
    margin:29px 0 18px;
    gap:18px;
  }
  .library-heading h2 {
    font-size:27px;
  }
  .library-heading .eyebrow {
    font-size:8px;
  }
  .filter-tabs {
    width:100%;
  }
  .filter-tabs button {
    flex:1;
    min-height:40px;
    font-size:11px;
    padding:8px;
  }
  .empty-state {
    padding:29px 20px;
  }
  .empty-state h3 {
    font-size:23px;
  }
  .local-note {
    padding:16px;
    gap:12px;
  }
  .local-note p {
    font-size:10px;
  }
  .site-footer {
    flex-direction:column;
    align-items:center;
    text-align:center;
    margin-top:25px;
    gap:5px;
    padding:19px 20px 23px;
    font-size:9px;
  }
  .character-grid {
    grid-template-columns:1fr;
    gap:14px;
  }
  .character-card {
    padding:22px;
  }
  .new-card {
    min-height:150px;
  }
  .wizard-top {
    padding:12px 18px 2px;
  }
  .wizard-top .text-button,[data-save-status] {
    font-size:9px;
  }
  .wizard-layout {
    display:block;
    padding:0 18px;
  }
  .steps-sidebar {
    position:static;
    padding-top:7px;
  }
  .steps-sidebar>.eyebrow,.sidebar-note {
    display:none;
  }
  .steps-sidebar nav {
    flex-direction:row;
    overflow-x:auto;
    gap:7px;
    margin:7px -18px 12px;
    padding:0 18px 10px;
    scrollbar-width:thin;
  }
  .step-button {
    flex-shrink:0;
    border-color:var(--line);
    padding:6px 10px;
    min-height:43px;
    gap:7px;
    font-size:10px;
    background:var(--surface);
  }
  .step-button>span:first-child {
    border:0;
    width:17px;
    line-height:23px;
    font-size:9px;
  }
  .step-button.active>span:first-child {
    background:none;
    color:var(--plum);
  }
  .step-button small {
    display:none;
  }
  .mobile-progress {
    padding:0;
    font-size:8px;
  }
  .mobile-progress button {
    font-size:10px;
    min-height:40px;
  }
  .mobile-progress progress {
    display:block;
    margin:12px 0 0;
  }
  .step-section {
    padding-top:25px;
  }
  .step-header {
    margin-bottom:25px;
  }
  .step-header .eyebrow {
    font-size:8px;
  }
  .step-header h1 {
    font-size:33px;
    letter-spacing:-.8px;
    margin:11px 0 12px;
  }
  .step-header>p {
    font-size:12px;
    line-height:1.8;
  }
  .choice-grid {
    grid-template-columns:1fr;
    gap:12px;
  }
  .choice-main {
    padding:18px 18px 8px;
  }
  .choice-main>strong {
    font-size:24px;
  }
  .choice-top {
    margin-bottom:12px;
  }
  .choice-description {
    font-size:12px;
    line-height:1.75;
  }
  .choice-meta {
    font-size:10px;
    margin-top:12px;
  }
  .choice-top .eyebrow {
    font-size:9px;
  }
  .choice-bottom .text-button {
    font-size:11px;
    min-height:44px;
  }
  .choice-bottom {
    padding-bottom:7px;
  }
  .selected-label {
    font-size:10px;
  }
  .form-grid {
    grid-template-columns:1fr;
    gap:0;
  }
  .field input,.field textarea,.field select,.search-field input {
    font-size:16px;
    min-height:49px;
  }
  .field>span {
    font-size:12px;
  }
  .field small {
    font-size:11px;
  }
  .field {
    margin:17px 0;
  }
  .trait-grid {
    gap:3px 12px;
  }
  .trait-field .field {
    padding:13px 11px;
  }
  .trait-field .field>span {
    font-size:18px;
  }
  .trait-field select {
    font-size:22px;
  }
  .trait-pool {
    padding:13px 11px;
    gap:6px;
    flex-wrap:wrap;
  }
  .trait-pool>span {
    font-size:8px;
    max-width:78px;
  }
  .trait-pool b {
    min-width:30px;
    padding:3px;
    font-size:19px;
  }
  .callout {
    padding:16px;
    margin-block:18px;
  }
  .callout p {
    font-size:12px;
    line-height:1.75;
  }
  .section-heading h2 {
    font-size:26px;
  }
  .section-heading p {
    font-size:12px;
  }
  .chosen-features {
    padding:17px;
  }
  .prose {
    font-size:13px;
  }
  .wizard-bottom {
    position:sticky;
    bottom:0;
    z-index:4;
    background:#f7f6f2f5;
    backdrop-filter:blur(12px);
    margin:0 -18px;
    padding:13px 18px max(15px,env(safe-area-inset-bottom));
    border-top:1px solid #d9d0df;
    gap:9px;
  }
  .wizard-bottom>div:first-child {
    flex-direction:row;
    align-items:center;
  }
  .wizard-bottom small {
    display:none;
  }
  .wizard-bottom #step-pending {
    font-size:9px;
  }
  .wizard-actions .primary {
    flex:1;
    min-width:0;
  }
  .wizard-actions .secondary {
    min-width:87px;
  }
  .wizard-actions button {
    min-height:48px;
  }
  .stat-grid {
    gap:9px;
  }
  .stat {
    padding:19px 7px;
  }
  .stat b {
    font-size:31px;
  }
  .stat span {
    font-size:9px;
  }
  .selection-counter {
    padding:15px;
    align-items:start;
  }
  .selection-counter strong {
    font-size:12px;
  }
  .selection-counter p {
    font-size:11px;
  }
  .selection-counter>span {
    font-size:8px;
  }
  .inline-toggle {
    padding:14px;
  }
  .inline-toggle label {
    font-size:12px;
    min-height:44px;
  }
  .inline-toggle>span {
    font-size:11px;
  }
  .sheet-wrap {
    padding:0 18px;
  }
  .sheet-header {
    padding:26px 22px;
    flex-direction:column;
    align-items:stretch;
    gap:25px;
  }
  .sheet-header h1 {
    font-size:34px;
  }
  .sheet-buttons {
    flex-direction:row;
    gap:9px;
  }
  .sheet-buttons button {
    flex:1;
    padding:10px;
    font-size:11px;
  }
  .sheet-traits {
    grid-template-columns:repeat(3,1fr);
  }
  .sheet-traits span {
    font-size:10px;
  }
  .sheet-traits small {
    font-size:9px;
  }
  .experience-summary {
    grid-template-columns:1fr;
  }
  .dialog-top {
    padding:13px 17px;
  }
  .dialog-top h2 {
    font-size:24px;
  }
  #dialog-body {
    padding:19px;
  }
  .dialog-actions {
    flex-direction:column-reverse;
  }
  .dialog-actions button {
    width:100%;
  }
  .source-path {
    font-size:10px;
  }
  .identity-grid {
    gap:18px 12px;
  }
  .identity-grid dd {
    font-size:12px;
  }
  .storage-error {
    padding:14px 18px;
    font-size:11px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}
@media print {
  body {
    background:white;
    color:black;
  }
  .topbar,.site-footer,.wizard-top,.sheet-buttons,.skip-link,#storage-message,dialog {
    display:none!important;
  }
  .sheet-wrap {
    max-width:none;
    padding:0;
  }
  .sheet-header {
    background:white;
    color:black;
    padding:0;
    border-radius:0;
    margin-bottom:15px;
  }
  .sheet-header .eyebrow,.sheet-header p {
    color:black;
  }
  .sheet-content {
    max-width:none;
  }
  .stat-grid {
    grid-template-columns:repeat(6,1fr);
  }
  .sheet-traits {
    grid-template-columns:repeat(6,1fr);
  }
  .rule-details,.stat,.attack,.narrative>div {
    break-inside:avoid;
  }
  .rule-details summary {
    border:0;
  }
  h2,h3 {
    break-after:avoid;
  }
  .prose {
    font-size:11px;
  }
  .site-footer {
    margin:0;
  }
}
/* Ficha de mesa: defesas e traços no topo, consulta em duas colunas. */
.character-sheet { max-width:1200px; padding:0 32px; }
.character-sheet .sheet-header { border-radius:4px; padding:28px 30px; margin-bottom:30px; background:#25232c; }
.sheet-identity { display:flex; align-items:center; gap:22px; min-width:0; }
.sheet-class-icon { display:grid; place-items:center; flex-shrink:0; width:66px; height:76px; color:var(--gold); border:1px solid #ffffff38; border-radius:4px 4px 24px 24px; }
.sheet-class-icon svg { width:38px; height:38px; }
.character-sheet .sheet-header h1 { font-size:36px; margin:8px 0; }
.character-sheet .sheet-header .eyebrow { line-height:1.7; }
.character-sheet .sheet-header p { line-height:1.6; }
.character-sheet .sheet-buttons { min-width:210px; }
.character-sheet .sheet-buttons>div { display:flex; gap:8px; }
.character-sheet .sheet-buttons>div button { flex:1; padding:10px 12px; }
.character-sheet .sheet-buttons .primary { background:#f6eddf; color:#30243b; border-color:#f6eddf; }
.character-sheet .sheet-buttons .secondary { background:transparent; color:#f6eddf; border-color:#ffffff50; }
.character-sheet .sheet-content { max-width:none; }
.sheet-top-stats { display:grid; grid-template-columns:225px minmax(0,1fr); gap:32px; padding-bottom:28px; border-bottom:1px solid var(--line); }
.defense-badges { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.sheet-trait-row { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.sheet-badge { text-align:center; min-width:0; }
.sheet-badge>span { display:block; background:#302d35; color:white; font-size:9px; font-weight:700; letter-spacing:.35px; text-transform:uppercase; padding:7px 2px; position:relative; z-index:1; }
.sheet-badge>b { display:grid; place-items:center; height:74px; max-width:83px; margin:0 auto; background:#e0d9cf; color:var(--ink); font:32px Georgia,serif; clip-path:polygon(0 0,100% 0,100% 77%,50% 100%,0 77%); position:relative; isolation:isolate; padding-bottom:9px; }
.sheet-badge>b:before { content:''; position:absolute; inset:1px 1px 2px; background:var(--surface); clip-path:inherit; z-index:-1; }
.sheet-badge>small { display:block; margin-top:12px; font-size:10px; color:var(--muted); line-height:1.7; }
.sheet-defenses .sheet-tracker { margin-top:18px; }
.sheet-casting { text-align:right; color:var(--muted); margin:10px 0 0; font-size:12px; }
.sheet-columns { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:48px; padding-top:8px; }
.sheet-column { min-width:0; }
.sheet-column>section { margin-top:32px; }
.sheet-section-title { display:flex; align-items:center; gap:0; margin:0 0 24px; color:#302d35; font:700 13px 'Segoe UI',Arial,sans-serif; letter-spacing:1.3px; text-transform:uppercase; }
.sheet-section-title:before,.sheet-section-title:after { content:''; height:4px; flex:1; border-top:1px solid #aaa29a; border-bottom:1px solid #aaa29a; }
.sheet-section-title>span { text-align:center; padding:8px 20px; border:1px solid #aaa29a; min-width:55%; background:var(--surface); }
.damage-track { display:grid; grid-template-columns:1fr 34px 1fr 34px 1fr; align-items:start; gap:0; margin-bottom:24px; }
.damage-track>div { text-align:center; }
.damage-track span { display:block; padding:10px 0; background:#302d35; color:white; font-size:10px; text-transform:uppercase; font-weight:700; }
.damage-track small { display:block; margin-top:5px; font-size:10px; color:var(--muted); }
.damage-track>b { display:grid; place-items:center; height:36px; margin-top:0; border-block:1px solid #302d35; font:20px Georgia,serif; }
.sheet-tracker { margin:18px 0; }
.tracker-heading { display:flex; justify-content:space-between; align-items:baseline; gap:10px; margin-bottom:7px; font-size:10px; font-weight:650; text-transform:uppercase; letter-spacing:.55px; }
.tracker-heading output { color:var(--muted); font-weight:400; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tracker-slots { display:flex; flex-wrap:wrap; gap:1px; }
.tracker-slot { display:grid; place-items:center; width:29px; height:32px; padding:4px; border:0; background:transparent; border-radius:3px; }
.tracker-slot>span { display:block; width:19px; height:19px; border:1px solid #4c4751; background:var(--surface); box-shadow:inset 0 0 0 3px var(--surface); }
.tracker-slot[aria-pressed=true]>span { background:var(--plum); }
.tracker-slot:hover:not(:disabled) { background:var(--lavender); }
.tracker-slot:disabled { opacity:.28; }
.tracker-slot:disabled>span { border-style:dashed; background:transparent; }
[data-tracker=hope] .tracker-slot>span { transform:rotate(45deg); width:17px; height:17px; }
.sheet-defenses .tracker-slot { width:28px; }
.sheet-help { color:var(--muted); font-size:11px; line-height:1.7; margin:12px 0 0; }
.sheet-note { font-size:12px; line-height:1.7; }
.character-sheet .prose { font-size:13px; line-height:1.85; overflow-wrap:anywhere; }
.character-sheet .prose h3 { font-size:13px; line-height:1.5; margin-top:18px; }
.sheet-experiences>div { display:flex; align-items:baseline; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); padding:12px 0; font-size:15px; overflow-wrap:anywhere; }
.sheet-experiences b { color:var(--plum); font-size:18px; flex-shrink:0; }
.sheet-hope { margin-top:22px; padding:16px 18px; border-left:2px solid #bdab8c; background:#efeae180; }
.sheet-hope p:last-child { margin-bottom:0; }
.sheet-feature-tabs { display:flex; gap:5px; margin-bottom:20px; border-bottom:1px solid var(--line); padding-bottom:8px; }
.sheet-feature-tabs button { flex:1; background:transparent; border:0; border-radius:4px; padding:10px 8px; min-height:42px; font-size:11px; font-weight:650; }
.sheet-feature-tabs button[aria-selected=true] { color:white; background:#302d35; }
.print-feature-label { display:none; }
.sheet-feature-panel p:first-child { margin-top:0; }
.sheet-proficiency { display:flex; justify-content:flex-end; align-items:center; gap:10px; font-size:10px; text-transform:uppercase; margin:-10px 0 24px; }
.sheet-proficiency>b { color:var(--plum); font-size:14px; }
.sheet-proficiency>span:last-child { letter-spacing:4px; color:var(--plum); }
.sheet-weapon { padding:0 0 20px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.sheet-weapon h3 { margin:7px 0 12px; font:24px Georgia,serif; }
.sheet-weapon .eyebrow { font-size:9px; letter-spacing:1px; color:var(--muted); }
.weapon-stats { display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:12px; }
.weapon-stats strong { font-size:20px; font-weight:600; color:var(--plum); white-space:nowrap; }
.sheet-weapon .prose { margin-top:14px; }
.sheet-weapon .prose p:last-child { margin-bottom:0; }
.sheet-edit { font-size:11px; }
.sheet-armor { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.sheet-armor h3 { font:23px Georgia,serif; margin-bottom:8px; }
.sheet-armor p { font-size:11px; margin:0; color:var(--muted); }
.armor-value { font:26px Georgia,serif; border:1px solid #b5ada3; border-radius:3px 3px 16px 16px; padding:9px 18px 14px; }
.sheet-gold .sheet-tracker { margin:12px 0; }
.sheet-gold .tracker-slot[aria-pressed=true]>span { background:#a67c32; }
.sheet-inventory { list-style:none; padding:0; margin:0; }
.sheet-inventory li { display:flex; align-items:baseline; gap:12px; border-bottom:1px solid var(--line); padding:13px 0; font-size:13px; overflow-wrap:anywhere; }
.sheet-inventory li>span { color:#9b8e7b; flex-shrink:0; }
.sheet-domains,.sheet-story { margin-top:42px; }
.sheet-domain-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:22px; }
.sheet-domain-card { min-width:0; break-inside:avoid; }
.domain-card-face { height:100%; overflow:hidden; border:1px solid color-mix(in srgb,var(--domain-color) 42%,#b9aa95); border-top:4px solid var(--domain-color); border-radius:12px; background:linear-gradient(145deg,#fffdf8,#f1e8d9); box-shadow:0 4px 12px #30243b18; color:#30243b; }
.domain-card-face[data-domain="Arcana"] { --domain-color:#70417f; }
.domain-card-face[data-domain="Grace"] { --domain-color:#c52b78; }
.domain-card-face[data-domain="Blade"] { --domain-color:#ad332a; }
.domain-card-face[data-domain="Codex"] { --domain-color:#145d91; }
.domain-card-face[data-domain="Splendor"] { --domain-color:#d1ad20; }
.domain-card-face[data-domain="Midnight"] { --domain-color:#30312d; }
.domain-card-face[data-domain="Bone"] { --domain-color:#9a9886; }
.domain-card-face[data-domain="Sage"] { --domain-color:#087344; }
.domain-card-face[data-domain="Valor"] { --domain-color:#d87524; }
.domain-card-top { display:flex; justify-content:space-between; gap:12px; padding:12px 16px; background:var(--domain-color); color:#fff; font-size:10px; text-transform:uppercase; letter-spacing:1px; }
.domain-card-face[data-domain="Splendor"] .domain-card-top { color:#30243b; }
.domain-card-body { padding:16px; }
.domain-card-meta { display:block; color:#74677b; font-size:10px; text-transform:uppercase; letter-spacing:.7px; }
.domain-card-body h3 { margin:7px 0 14px; padding-bottom:10px; border-bottom:1px solid color-mix(in srgb,var(--domain-color) 48%,#d9c9b0); font:24px/1.2 Georgia,serif; }
.domain-card-body .prose { font-size:13px; }
.domain-card-body footer { margin-top:18px; padding-top:9px; border-top:1px solid #d9c9b0; color:#887b6b; font-size:9px; letter-spacing:1px; text-align:right; }
.sheet-story>div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.sheet-story .rule-details { margin:0; align-self:start; }
.sheet-story .rule-details p { padding:16px; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; margin:0; }
@media(max-width:1000px) {
  .sheet-top-stats { grid-template-columns:1fr; gap:24px; }
  .sheet-defenses { display:flex; align-items:center; justify-content:space-between; gap:30px; }
  .defense-badges { width:225px; flex-shrink:0; }
  .sheet-defenses .sheet-tracker { margin:0; }
  .sheet-columns { gap:28px; }
  .tracker-slot { width:27px; }
}
.wiki-wrap { max-width:1280px; margin:0 auto; padding:54px 34px 90px; }
.wiki-heading { max-width:720px; margin-bottom:28px; }
.wiki-heading h1 { margin:5px 0 10px; font:500 38px/1.2 Georgia,serif; }
.wiki-heading p,.wiki-card p { color:var(--muted); }
.wiki-search { display:block; margin:26px 0 18px; }
.wiki-search input { width:100%; min-height:52px; border:1px solid var(--line); border-radius:8px; background:var(--surface); padding:0 16px; }
.wiki-categories { display:flex; flex-wrap:wrap; gap:8px; border-bottom:1px solid var(--line); padding-bottom:16px; }
.wiki-categories button { border:1px solid var(--line); border-radius:20px; background:var(--surface); padding:7px 13px; font-size:12px; }
.wiki-categories button.active { background:var(--plum); border-color:var(--plum); color:white; }
.wiki-filters { display:flex; flex-wrap:wrap; gap:12px; padding-top:16px; }
.wiki-filters label { display:grid; gap:4px; color:var(--muted); font-size:11px; }
.wiki-filters select { min-width:190px; min-height:40px; padding:0 12px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); }
.wiki-count { margin:18px 0 12px; color:var(--muted); font-size:12px; }
.wiki-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.wiki-card { min-height:180px; display:flex; flex-direction:column; justify-content:space-between; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.wiki-card[role="button"] { cursor:pointer; }
.wiki-card[role="button"]:hover,.wiki-card[role="button"]:focus-visible { border-color:#bba9c3; box-shadow:0 0 0 2px #bba9c355; outline:none; }
.wiki-domain-card { min-height:0; padding:0; border:0; background:none; }
.wiki-domain-card .domain-card-face { flex:1; }
.wiki-domain-card[role="button"]:hover .domain-card-face,.wiki-domain-card[role="button"]:focus-visible .domain-card-face { box-shadow:0 6px 16px #30243b30; }
.wiki-card h3 { margin:5px 0 7px; font:500 20px/1.25 Georgia,serif; }
.wiki-card p { margin:0 0 16px; font-size:12px; }
.wiki-card .text-button { align-self:flex-start; }
.wiki-empty { color:var(--muted); }
@media(max-width:650px) {
  .character-sheet { padding:0 18px; }
  .character-sheet .sheet-header { padding:24px 20px; gap:22px; }
  .sheet-identity { gap:14px; }
  .sheet-class-icon { width:45px; height:58px; }
  .sheet-class-icon svg { width:28px; height:28px; }
  .character-sheet .sheet-header h1 { font-size:29px; }
  .character-sheet .sheet-buttons { display:flex; flex-direction:column; gap:8px; width:100%; }
  .character-sheet .sheet-buttons button { min-height:42px; }
  .sheet-defenses { gap:16px; flex-wrap:wrap; }
  .defense-badges { width:100%; }
  .defense-badges .sheet-badge>b { max-width:95px; }
  .sheet-defenses .sheet-tracker { width:100%; }
  .sheet-trait-row { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 12px; }
  .sheet-badge>span { font-size:10px; }
  .sheet-badge>small { margin-top:7px; }
  .sheet-columns { grid-template-columns:1fr; gap:0; }
  .tracker-slot { width:26px; height:36px; }
  .tracker-slot>span { width:18px; height:18px; }
  .sheet-domain-cards,.sheet-story>div { grid-template-columns:1fr; }
  .weapon-stats { flex-wrap:wrap; }
}
@media print {
  .character-sheet { max-width:none; padding:0; }
  .character-sheet .sheet-header { background:white; color:black; border-bottom:1px solid #aaa; padding:0 0 16px; }
  .sheet-class-icon,.sheet-edit,.sheet-feature-tabs,.sheet-help { display:none; }
  .character-sheet .sheet-header p,.character-sheet .sheet-header .eyebrow { color:black; }
  .sheet-top-stats { grid-template-columns:170px minmax(0,1fr); gap:20px; }
  .sheet-defenses { display:block; }
  .defense-badges { width:auto; }
  .sheet-trait-row { grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
  .sheet-badge>span { background:white; color:black; border:1px solid #aaa; font-size:8px; }
  .sheet-badge>b { clip-path:none; background:white; border:1px solid #aaa; }
  .sheet-badge>small { font-size:8px; }
  .sheet-columns { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; }
  .sheet-feature-panel[hidden],.print-feature-label { display:block!important; }
  .tracker-slot { width:20px; height:23px; }
  .tracker-slot>span { width:15px; height:15px; }
  .tracker-slot[aria-pressed=true]>span:after { content:'×'; display:block; text-align:center; font-size:14px; line-height:13px; color:black; }
  .sheet-weapon,.sheet-domain-card,.domain-card-face,.sheet-tracker,.sheet-experiences>div { break-inside:avoid; }
  .sheet-domain-cards { grid-template-columns:1fr 1fr; }
  .domain-card-face { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .sheet-story>div { display:block; }
}
