:root {
  --forest: #294f3e;
  --forest-2: #416b54;
  --sage: #9aac8b;
  --gold: #bb965f;
  --ink: #252a25;
  --muted: #75776f;
  --canvas: #f3f0e8;
  --paper: #fffdf8;
  --line: #e8e1d5;
  --soft: #f8f5ee;
  --shadow: 0 18px 45px rgba(46, 40, 28, .08);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.w-topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px max(24px,calc((100vw - 1480px)/2)); border-bottom:1px solid #e5ded1; background:#faf8f2; }
.w-brand { display:flex; align-items:center; gap:11px; font:700 16px Georgia,"Noto Serif SC",serif; letter-spacing:.03em; }
.w-brand-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--forest); color:#fff; font-size:19px; }
.w-header-right { display:flex; align-items:center; gap:10px; }
.w-rule-tag { border:1px solid #ded7ca; border-radius:30px; padding:7px 11px; color:#717268; font-size:10px; font-weight:700; letter-spacing:.08em; }
.w-head-btn { border:0; border-radius:7px; padding:9px 12px; background:transparent; color:#61645b; font-size:11px; font-weight:700; }
.w-head-btn:hover { background:#efebe1; }
.w-page { max-width:1480px; margin:auto; padding:30px 24px 64px; }
.w-intro { display:flex; align-items:end; justify-content:space-between; gap:24px; margin:0 0 24px; }
.w-eyebrow { color:var(--forest-2); font-size:10px; font-weight:800; letter-spacing:.18em; text-transform:uppercase; }
.w-intro h1 { margin:7px 0 7px; font:500 clamp(29px,3.3vw,40px)/1.15 Georgia,"Noto Serif SC",serif; letter-spacing:.01em; }
.w-intro p { margin:0; color:var(--muted); font-size:12px; }
.w-intro-note { max-width:245px; color:#858479; font:italic 12px/1.6 Georgia,"Noto Serif SC",serif; text-align:right; }
.w-layout { display:grid; grid-template-columns:190px minmax(470px,1fr) 300px; gap:19px; align-items:start; }
.w-rail,.w-panel,.w-preview { border:1px solid var(--line); border-radius:13px; background:var(--paper); box-shadow:var(--shadow); }
.w-rail { position:sticky; top:18px; padding:16px 11px; }
.w-rail-title { margin:0 8px 11px; color:#989387; font-size:9px; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
.w-step { display:flex; width:100%; align-items:center; gap:10px; margin:2px 0; padding:10px 8px; border:0; border-radius:8px; background:transparent; color:#7a7b72; text-align:left; }
.w-step.available:hover { background:#f5f2eb; }
.w-step.active { background:#e9eee7; color:var(--forest); }
.w-step.done .w-step-num { border-color:var(--forest-2); background:var(--forest-2); color:#fff; }
.w-step-num { display:grid; flex:0 0 24px; place-items:center; width:24px; height:24px; border:1px solid #e1dacd; border-radius:50%; color:#939187; font-size:10px; font-weight:800; }
.w-step-name { font-size:11px; font-weight:700; }
.w-step-sub { display:block; margin-top:3px; color:#a09d92; font-size:9px; font-weight:500; }
.w-progress { margin:14px 8px 5px; color:#686b61; }
.w-progress-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; font-size:11px; font-weight:700; }
.w-progress-heading strong { color:var(--forest); font-size:14px; font-variant-numeric:tabular-nums; }
.w-progress-track { height:7px; border-radius:99px; background:#eee9df; overflow:hidden; }
.w-progress-fill { height:100%; border-radius:99px; background:linear-gradient(90deg,var(--forest),#93a27f); transition:width .25s ease; }
.w-progress-count { margin-top:6px; color:#8a897f; font-size:11px; }
.w-progress-message { margin:9px 0 0; padding:8px 9px; border-radius:7px; background:#f1f5ee; color:var(--forest); font-size:12px; line-height:1.55; }
.w-progress-message.near { background:#f8f1df; color:#765b2d; font-weight:700; }
.w-milestone { position:fixed; z-index:20; top:20vh; left:50%; width:min(420px,90vw); height:150px; transform:translateX(-50%); pointer-events:none; animation:milestone-fade 2.8s ease-out both; }
.w-milestone-message { position:absolute; top:54px; left:50%; display:flex; align-items:center; gap:10px; padding:14px 20px; border:1px solid #dce5d8; border-radius:999px; background:#fffef9; box-shadow:0 12px 34px #294f3e20; color:var(--forest); white-space:nowrap; transform:translateX(-50%) scale(.78); animation:milestone-pop .55s cubic-bezier(.2,.8,.2,1.1) both; }
.w-milestone-message span { color:#bd9553; font-size:18px; }
.w-milestone-message strong { font-size:14px; }
.w-milestone-star { position:absolute; top:50%; left:50%; color:#bd9553; font-size:22px; opacity:0; animation:milestone-spark .9s ease-out both; }
.w-milestone-star.s1 { --sx:-130px; --sy:-22px; }
.w-milestone-star.s2 { --sx:-94px; --sy:43px; animation-delay:.08s; color:#7f9b7b; }
.w-milestone-star.s3 { --sx:136px; --sy:-30px; animation-delay:.13s; }
.w-milestone-star.s4 { --sx:105px; --sy:44px; animation-delay:.2s; color:#7f9b7b; }
.w-milestone-star.s5 { --sx:0px; --sy:-57px; animation-delay:.06s; font-size:15px; }
@keyframes milestone-pop { 0% { opacity:0; transform:translateX(-50%) scale(.72); } 70% { opacity:1; transform:translateX(-50%) scale(1.04); } 100% { opacity:1; transform:translateX(-50%) scale(1); } }
@keyframes milestone-spark { 0% { opacity:0; transform:translate(-50%,-50%) scale(.2); } 35% { opacity:.95; } 100% { opacity:0; transform:translate(calc(-50% + var(--sx)),calc(-50% + var(--sy))) scale(.75) rotate(20deg); } }
@keyframes milestone-fade { 0%,78% { opacity:1; } 100% { opacity:0; visibility:hidden; } }
.w-completion { position:fixed; inset:0; z-index:25; display:grid; place-items:center; background:#25372b55; backdrop-filter:blur(3px); pointer-events:auto; animation:completion-screen 3.4s ease both; }
.w-completion-card { position:relative; display:flex; width:min(470px,calc(100vw - 36px)); flex-direction:column; align-items:center; gap:10px; padding:34px 30px 30px; border:1px solid #dec99e; border-radius:18px; background:linear-gradient(145deg,#fffefa,#f8f1e3); box-shadow:0 24px 90px #15271d55, inset 0 0 0 5px #fff9; color:var(--forest); text-align:center; animation:completion-card .7s cubic-bezier(.2,.8,.2,1.1) both; }
.w-completion-close { position:absolute; top:9px; right:11px; display:grid; width:34px; height:34px; place-items:center; border:0; border-radius:50%; background:#eee8da; color:#62645b; font-size:24px; line-height:1; cursor:pointer; }
.w-completion-close:hover { background:#e0d4bc; color:#344d3d; }
.w-completion-seal { display:grid; width:58px; height:58px; place-items:center; border:1px solid #d5b771; border-radius:50%; background:#fff8e8; color:#b18232; font-size:26px; box-shadow:0 0 0 8px #f5ead1; }
.w-completion-kicker { margin-top:5px; color:#a17c3d; font-size:11px; font-weight:800; letter-spacing:.16em; }
.w-completion-card strong { font:700 24px/1.3 Georgia,"Noto Serif SC",serif; }
.w-completion-card > span:last-child { color:#65695d; font-size:15px; line-height:1.65; }
.w-completion-orbit { position:absolute; color:#d0a54f; font-size:26px; animation:completion-orbit 1.8s ease-out both; }
.w-completion-orbit.orbit-a { top:calc(50% - 105px); left:calc(50% - 165px); }
.w-completion-orbit.orbit-b { top:calc(50% + 94px); left:calc(50% + 155px); animation-delay:.12s; color:#8d9d78; }
.w-completion-orbit.orbit-c { top:calc(50% - 125px); left:calc(50% + 140px); animation-delay:.24s; color:#8d9d78; }
@keyframes completion-screen { 0%,78% { opacity:1; } 100% { opacity:0; visibility:hidden; } }
@keyframes completion-card { 0% { opacity:0; transform:translateY(22px) scale(.9); } 70% { opacity:1; transform:translateY(-3px) scale(1.025); } 100% { opacity:1; transform:translateY(0) scale(1); } }
@keyframes completion-orbit { 0% { opacity:0; transform:scale(.2) rotate(-35deg); } 30% { opacity:1; transform:scale(1.2) rotate(15deg); } 100% { opacity:0; transform:scale(.6) translateY(-18px) rotate(45deg); } }
.needs-value input,.needs-value select { border-color:#d68b62!important; background:#fff9f4!important; }
.w-required-label { margin-left:5px; color:#b85336; font-size:12px; font-weight:800; }
.needs-attention { border-radius:10px; animation:attention-flash .9s ease-in-out 3; }
@keyframes attention-flash { 0%,100% { outline:0 solid #dca45b00; box-shadow:0 0 0 0 #dca45b00; } 45%,70% { outline:3px solid #d99b4e; box-shadow:0 0 0 8px #d99b4e2c; } }
.w-identity-start { display:grid; gap:15px; margin-bottom:18px; padding:16px; border:1px solid #e8e1d5; border-radius:12px; background:linear-gradient(135deg,#fcfaf5,#f5f2e9); }
.w-avatar-field { margin:0; }
.w-identity-start .w-photo-preview { width:86px; height:86px; flex-basis:86px; }
.w-identity-start .w-required-field input { min-height:44px; font-size:16px; }
.w-background-detail .w-pill { padding:8px 12px; font-size:14px; line-height:1.5; }
.w-background-detail p { font-size:16px; line-height:1.8; }
.w-background-detail .w-hint { display:block; margin-top:8px; font-size:14px; line-height:1.6; }
.w-detail .w-class-hit-die { align-self:flex-start; padding:9px 14px; font-size:17px; }
.w-detail .w-class-saves .w-pill { padding:8px 13px; font-size:16px; }
.w-detail .w-class-features { font-size:15px; line-height:1.75; }
.w-optional-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:15px; padding:13px; border:1px solid #eee8dc; border-radius:9px; background:#fffefa; }
.w-optional-fields .w-field { gap:4px; }
.w-optional-fields .w-field > span { color:#74756c; font-size:12px; font-weight:700; }
.w-optional-fields .w-field input { min-height:33px; height:33px; padding:5px 8px; font-size:12px; }
.w-story-card { margin-top:17px; padding:16px; border:1px solid #e3d3b4; border-radius:12px; background:radial-gradient(ellipse at 90% 0%,#f1e5cd88,transparent 40%),linear-gradient(135deg,#fbf8f0,#f5f2e9); box-shadow:0 8px 24px #483b2410; }
.w-story-toolbar { margin-bottom:10px; }
.w-story-toolbar > div { display:flex; flex-direction:column; gap:3px; }
.w-story-toolbar label { font:700 20px/1.35 Georgia,"Noto Serif SC",serif; color:#344d3d; }
.w-story-kicker { color:#a17939; font-size:10px; font-weight:800; letter-spacing:.15em; }
.w-story-toolbar .w-btn { min-height:44px; padding:0 17px; border:1px solid #bd8c42; background:linear-gradient(135deg,#a97a32,#c29750); color:white; font-size:15px; box-shadow:0 5px 14px #7f5d292e; }
.w-story-toolbar .w-btn:hover { background:linear-gradient(135deg,#936725,#b6863f); transform:translateY(-1px); }
.w-story-card textarea { min-height:170px; border-color:#e2d7c1; background:#fffefaee; font-size:15px; }
.w-story-card > .w-hint { display:block; margin-top:8px; }
.w-no-armor { margin:10px 0 0; color:#77786f; font-size:14px; }
.w-race-detail .w-pill { padding:8px 12px; font-size:14px; line-height:1.45; }
.w-armor-row { grid-template-columns:16px 1fr auto; align-items:center; cursor:pointer; }
.w-armor-row b { grid-column:auto; }
.w-panel { min-width:0; overflow:hidden; }
.w-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:21px 24px 17px; border-bottom:1px solid #eee9e0; }
.w-panel-head h2 { margin:0; font:600 20px/1.25 Georgia,"Noto Serif SC",serif; }
.w-panel-head p { max-width:560px; margin:6px 0 0; color:var(--muted); font-size:11px; line-height:1.65; }
.w-step-counter { flex:0 0 auto; color:#99968b; font-size:10px; font-weight:750; letter-spacing:.1em; }
.w-panel-body { min-height:510px; padding:20px 24px 22px; }
.w-panel-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 24px; border-top:1px solid #eee9e0; background:#fcfaf5; }
.w-foot-left,.w-foot-right { display:flex; align-items:center; gap:9px; }
.w-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:39px; padding:0 14px; border:1px solid transparent; border-radius:8px; font-size:11px; font-weight:750; transition:background .16s,transform .16s,border-color .16s; }
.w-btn:active { transform:translateY(1px); }
.w-btn-primary { background:var(--forest); color:white; }
.w-btn-primary:hover { background:#1f4132; }
.w-btn-secondary { border-color:#ded8cc; background:#fffefa; color:#565951; }
.w-btn-secondary:hover { background:#f3f0e8; }
.w-btn-quiet { background:transparent; color:#73746d; }
.w-btn-quiet:hover { background:#f1eee6; }
.w-btn:disabled { cursor:not-allowed; opacity:.42; }
.w-hint { color:#918e83; font-size:10px; line-height:1.6; }
.w-section-label { display:flex; align-items:center; gap:9px; margin:0 0 12px; color:#595f55; font-size:11px; font-weight:800; letter-spacing:.04em; }
.w-section-label:before { width:3px; height:15px; border-radius:4px; background:var(--gold); content:""; }
.w-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.w-option { position:relative; display:block; width:100%; min-height:105px; padding:13px 13px 12px; border:1px solid #e9e3d8; border-radius:9px; background:#fffefa; color:var(--ink); text-align:left; transition:border-color .15s,background .15s,box-shadow .15s; }
.w-option:hover { border-color:#a8b49e; background:#fcfbf6; }
.w-option.selected { border-color:var(--forest-2); background:#f0f4ed; box-shadow:inset 0 0 0 1px var(--forest-2); }
.w-option-title { display:flex; align-items:center; justify-content:space-between; gap:8px; font:700 13px Georgia,"Noto Serif SC",serif; }
.w-option-mark { color:var(--forest-2); font-size:13px; }
.w-option-copy { display:block; margin-top:7px; color:#78796f; font-size:10px; line-height:1.55; }
.w-option-meta { display:block; margin-top:9px; color:#929083; font-size:9px; }
.w-detail { margin-top:16px; padding:15px; border:1px solid #e8e2d7; border-radius:10px; background:#faf8f2; }
.w-detail-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.w-detail h3 { margin:0; font:600 16px Georgia,"Noto Serif SC",serif; }
.w-detail p { margin:5px 0 0; color:#73746b; font-size:11px; line-height:1.7; }
.w-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.w-field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.w-field.wide { grid-column:1/-1; }
.w-field label,.w-label { color:#64665d; font-size:10px; font-weight:750; }
.w-field input,.w-field select,.w-field textarea,.w-select { width:100%; min-height:38px; padding:8px 10px; border:1px solid #e3ddd1; border-radius:7px; outline:none; background:#fffefa; color:var(--ink); font-size:11px; }
.w-field input,.w-field select,.w-select { height:38px; }
.w-field textarea { min-height:88px; resize:vertical; line-height:1.65; }
#story { min-height:220px; }
.w-field input:focus,.w-field select:focus,.w-field textarea:focus,.w-select:focus { border-color:#829a83; box-shadow:0 0 0 3px #416b5414; }
.w-lore { margin:0 0 14px; padding:11px 13px; border-left:3px solid #c3a16b; border-radius:0 7px 7px 0; background:#f9f5ec; color:#6f6c61; font:italic 12px/1.65 Georgia,"Noto Serif SC",serif; }
.w-pill-row { display:flex; flex-wrap:wrap; gap:6px; }
.w-pill { display:inline-flex; align-items:center; gap:5px; padding:6px 9px; border:1px solid #e5dfd3; border-radius:99px; background:#fffdf8; color:#696b62; font-size:9px; }
.w-pill.positive { border-color:#d7e0d4; background:#f0f4ed; color:#416b54; }
.w-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.w-grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.w-druid-spell-guide { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.w-druid-spell-guide article { padding:13px 15px; border:1px solid #dce4d8; border-radius:9px; background:#f7f9f4; }
.w-druid-spell-guide article:last-child { border-color:#eadfc8; background:#fbf7ee; }
.w-druid-spell-guide .w-section-label { margin-bottom:7px; }
.w-druid-spell-guide article > strong { display:block; color:var(--forest); font:700 20px Georgia,"Noto Serif SC",serif; }
.w-druid-spell-guide article > p { margin:6px 0 0; color:#72746b; font-size:13px; line-height:1.55; }
.w-notice { margin:12px 0 0; padding:10px 12px; border-radius:7px; background:#f2f0e9; color:#77786f; font-size:10px; line-height:1.6; }
.w-notice.gold { background:#faf3e6; color:#7c6846; }
.w-roll-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 13px; }
.w-roll-cards { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; }
.w-roll { padding:10px 6px; border:1px solid #e7e0d4; border-radius:8px; background:#fffefa; text-align:center; }
.w-roll-score { color:var(--forest); font:700 22px Georgia,"Noto Serif SC",serif; }
.w-roll-label { margin-top:4px; color:#9a968b; font-size:9px; }
.w-dice { display:flex; justify-content:center; gap:3px; margin:8px 0 4px; }
.w-die { display:grid; place-items:center; width:22px; height:22px; border:1px solid #ded8cd; border-radius:5px; background:#faf8f2; color:#55574f; font-size:9px; font-weight:750; }
.w-die.dropped { border-color:#e4cfc5; background:#f9eeea; color:#aa6f5b; text-decoration:line-through; }
.w-assignment { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.w-stat-assign { padding:10px; border:1px solid #e8e2d7; border-radius:8px; background:#fffefa; }
.w-stat-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.w-stat-head strong { color:#53584f; font-size:10px; }
.w-stat-final { margin-top:7px; color:var(--forest); font:600 17px Georgia,"Noto Serif SC",serif; }
.w-check-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.w-check { display:flex; align-items:flex-start; gap:7px; padding:9px; border:1px solid #e8e2d7; border-radius:7px; background:#fffefa; color:#55584f; font-size:10px; line-height:1.45; cursor:pointer; }
.w-check:has(input:checked) { border-color:#91a68d; background:#f1f5ef; }
.w-check input { margin:1px 0 0; accent-color:var(--forest); }
.w-count { color:#8d8b80; font-size:10px; font-weight:750; }
.w-equip-group { margin-bottom:17px; }
.w-equip-options { display:flex; flex-wrap:wrap; gap:7px; }
.w-equip-choice { display:flex; align-items:flex-start; gap:8px; min-width:calc(50% - 5px); flex:1; padding:10px; border:1px solid #e7e1d5; border-radius:8px; background:#fffefa; cursor:pointer; }
.w-equip-choice:has(input:checked) { border-color:#91a68d; background:#f0f4ed; }
.w-equip-choice input { margin:2px 0 0; accent-color:var(--forest); }
.w-equip-choice strong { display:block; color:#4f554b; font-size:10px; }
.w-equip-choice small { display:block; margin-top:4px; color:#8b897f; font-size:9px; line-height:1.45; }
.w-alignment-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.w-alignment-card { display:flex; min-height:104px; flex-direction:column; align-items:flex-start; gap:8px; padding:14px; border:1px solid #e7e1d5; border-radius:9px; background:#fffefa; color:var(--ink); text-align:left; transition:background .16s,border-color .16s,transform .16s; }
.w-alignment-card:hover { border-color:#a8b49e; transform:translateY(-1px); }
.w-alignment-card.selected { border-color:var(--forest-2); background:#f0f4ed; box-shadow:inset 0 0 0 1px var(--forest-2); }
.w-alignment-card strong { color:var(--forest); font:700 14px Georgia,"Noto Serif SC",serif; }
.w-alignment-card span { color:#77786f; font-size:11px; line-height:1.6; }
.w-story-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.w-story-toolbar label { color:#64665d; font-size:10px; font-weight:750; }
.w-story-toolbar .w-btn { min-height:34px; }
.w-wealth-panel { margin:0 0 16px; }
.w-mode-switch { display:flex; gap:8px; margin-top:12px; }
.w-wealth-roll { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding:11px; border:1px solid #e8e2d7; border-radius:8px; background:#fffefa; color:#565951; font-size:12px; }
.w-wealth-result { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; color:#73746b; font-size:12px; }
.w-wealth-result strong { color:var(--forest); font-size:18px; }
.w-custom-weapon-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:9px; }
.w-custom-weapon { padding:10px; border:1px solid #dfe7db; border-radius:8px; background:#f6f8f3; }
.w-custom-weapon select { min-height:39px; height:auto; font-size:11px; }
.w-custom-weapon small { color:#547154; font-size:10px; }
.w-inventory-preview .w-hint { display:block; margin-top:6px; }
.w-photo-row { display:flex; align-items:center; gap:14px; }
.w-photo-preview { display:grid; flex:0 0 74px; place-items:center; width:74px; height:74px; overflow:hidden; border:1px solid #e2dbcf; border-radius:50%; background:#f2eee5; color:#7b806f; font:600 23px Georgia,serif; }
.w-photo-preview img { width:100%; height:100%; object-fit:cover; }
.w-photo-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.w-avatar-input { display:none; }
.w-spell-section { margin-bottom:18px; }
.w-spell-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; max-height:260px; overflow:auto; padding:2px 2px 3px; }
.w-spell { display:flex; align-items:flex-start; gap:7px; padding:8px; border:1px solid #e8e2d7; border-radius:7px; background:#fffefa; color:#55574f; font-size:10px; line-height:1.4; cursor:pointer; }
.w-spell:has(input:checked) { border-color:#8da188; background:#eff4ec; }
.w-spell input { margin:1px 0 0; accent-color:var(--forest); }
.w-spell small { display:block; margin-top:3px; color:#939084; font-size:8px; }
.w-spell-copy { display:block; min-width:0; outline-offset:3px; cursor:help; }
.w-spell-copy:hover,.w-spell-copy:focus-visible { color:var(--forest-2); text-decoration:underline dotted; text-underline-offset:3px; }
.w-spell-image-tooltip { position:fixed; z-index:1000; display:block; max-width:min(520px,calc(100vw - 24px)); max-height:80vh; padding:7px; border:1px solid #ded6c7; border-radius:9px; background:#fffdf8; box-shadow:0 14px 40px #241b1470; pointer-events:none; }
.w-spell-image-tooltip[hidden] { display:none; }
.w-spell-image-tooltip img { display:block; max-width:min(504px,calc(100vw - 38px)); max-height:calc(80vh - 14px); width:auto; height:auto; object-fit:contain; }
.w-preview { position:sticky; top:18px; overflow:hidden; }
.w-preview-head { padding:15px 16px 13px; border-bottom:1px solid #eee9e0; }
.w-preview-title { display:flex; align-items:center; justify-content:space-between; gap:8px; font:600 15px Georgia,"Noto Serif SC",serif; }
.w-live { color:#718b6e; font:700 9px sans-serif; letter-spacing:.12em; }
.w-preview-body { padding:15px 16px; }
.w-preview-identity { display:flex; align-items:center; gap:11px; margin:0 0 15px; }
.w-preview-avatar { display:grid; flex:0 0 45px; place-items:center; width:45px; height:45px; overflow:hidden; border:1px solid #e0d9cd; border-radius:50%; background:#f2eee5; color:#77806e; font:600 14px Georgia,serif; }
.w-preview-avatar img { width:100%; height:100%; object-fit:cover; }
.w-preview-name { overflow-wrap:anywhere; margin:0; font:600 16px Georgia,"Noto Serif SC",serif; }
.w-preview-meta { margin:4px 0 0; color:#818177; font-size:9px; line-height:1.5; }
.w-preview-combat { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.w-mini-stat { padding:8px 5px; border:1px solid #ebe5da; border-radius:7px; background:#fffefa; text-align:center; }
.w-mini-stat b { display:block; color:var(--forest); font:600 17px Georgia,serif; }
.w-mini-stat span { display:block; margin-top:3px; color:#88867b; font-size:8px; }
.w-grid-3 .w-mini-stat b { font-size:19px; }
.w-grid-3 .w-mini-stat span { font-size:var(--ui-type-meta); line-height:1.4; }
.w-preview-abilities { display:grid; grid-template-columns:repeat(6,1fr); gap:4px; margin:12px 0; }
.w-mini-ability { padding:6px 2px; border-radius:5px; background:#f5f2ea; text-align:center; }
.w-mini-ability b { display:block; color:#4c5c4e; font-size:12px; }
.w-mini-ability span { display:block; margin-top:2px; color:#9b968b; font-size:7px; }
.w-preview-note { margin:11px 0 0; padding-top:10px; border-top:1px solid #eee9e0; color:#8b897f; font-size:9px; line-height:1.6; }
.w-preview-footer { padding:11px 16px; border-top:1px solid #eee9e0; background:#fcfaf5; color:#939084; font-size:9px; line-height:1.5; }
.w-toast { position:fixed; right:22px; bottom:22px; z-index:20; max-width:min(360px,calc(100vw - 32px)); padding:12px 15px; border:1px solid #d9e2d5; border-radius:9px; background:#f5f8f2; box-shadow:0 12px 34px #0002; color:#3f664b; font-size:11px; line-height:1.5; opacity:0; pointer-events:none; transform:translateY(8px); transition:opacity .2s,transform .2s; }
.w-toast.visible { opacity:1; transform:translateY(0); }
.w-empty { display:grid; place-items:center; min-height:112px; border:1px dashed #ded8cd; border-radius:9px; color:#99958a; font-size:11px; text-align:center; }
.w-ability-empty { padding:16px 20px; }
.w-ability-empty-content { display:flex; flex-direction:column; align-items:center; gap:8px; }
.w-ability-empty-content p { margin:0; }
.w-ability-die { color:var(--gold); font-size:26px; line-height:1; }
.w-ability-empty-content .w-btn { margin-top:4px; }
.w-sheet-wrap { background:#f3f0e8; padding:22px; }
.w-sheet { max-width:900px; margin:auto; padding:27px; border:1px solid #dcd4c5; background:#fffdf8; color:#252a25; box-shadow:0 10px 30px #33261712; }
.w-sheet-top { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding-bottom:15px; border-bottom:2px solid var(--forest); }
.w-sheet-brand { color:var(--forest); font:700 9px Georgia,serif; letter-spacing:.18em; text-transform:uppercase; }
.w-sheet-title { margin:6px 0 4px; font:600 28px/1.1 Georgia,"Noto Serif SC",serif; }
.w-sheet-meta { color:#77776c; font-size:10px; line-height:1.55; }
.w-sheet-avatar { flex:0 0 74px; width:74px; height:74px; overflow:hidden; border:1px solid #ddd4c4; border-radius:50%; background:#f1ede4; }
.w-sheet-avatar img { width:100%; height:100%; object-fit:cover; }
.w-sheet-facts { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; margin:12px 0; }
.w-sheet-fact { min-height:40px; padding:7px 8px; border:1px solid #e8e1d5; border-radius:5px; }
.w-sheet-fact span { display:block; color:#8b887d; font-size:8px; }
.w-sheet-fact strong { display:block; margin-top:3px; color:#3d4d40; font-size:11px; }
.w-sheet-main { display:grid; grid-template-columns:1.15fr .85fr; gap:12px; }
.w-sheet-section { margin:0 0 11px; border:1px solid #e6dfd3; border-radius:6px; overflow:hidden; }
.w-sheet-section h3 { margin:0; padding:7px 9px; background:#f2efe7; color:#536151; font:700 9px sans-serif; letter-spacing:.1em; text-transform:uppercase; }
.w-sheet-section-body { padding:9px; }
.w-sheet-abilities { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.w-sheet-ability { padding:8px 4px; border:1px solid #ece6db; border-radius:5px; text-align:center; }
.w-sheet-ability span { color:#77766d; font-size:8px; font-weight:700; }
.w-sheet-ability b { display:block; margin:4px 0 1px; color:var(--forest); font:600 20px Georgia,serif; }
.w-sheet-ability small { color:#888579; font-size:8px; }
.w-sheet-skill-columns { display:grid; grid-template-columns:1fr 1fr; gap:2px 10px; }
.w-sheet-skill { display:flex; align-items:center; gap:5px; min-height:18px; color:#65665e; font-size:8px; }
.w-skill-disadvantage { margin-left:4px; color:#9b3c2e; font-size:7px; font-style:normal; font-weight:700; white-space:nowrap; }
.w-prof-dot { display:inline-block; flex:0 0 8px; width:8px; height:8px; border:1px solid #bcb8ad; border-radius:50%; }
.w-prof-dot.on { border-color:var(--forest); background:var(--forest); }
.w-sheet-statline { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; }
.w-sheet-statbox { padding:8px 4px; border:1px solid #e9e3d8; border-radius:5px; text-align:center; }
.w-sheet-statbox b { display:block; color:var(--forest); font:600 17px Georgia,serif; }
.w-sheet-statbox span { display:block; margin-top:3px; color:#858277; font-size:7px; }
.w-sheet-list { margin:0; padding-left:15px; color:#5e6058; font-size:9px; line-height:1.7; }
.w-sheet-copy { margin:0; color:#5f6058; font:11px/1.75 Georgia,"Noto Serif SC",serif; white-space:pre-wrap; overflow-wrap:anywhere; }
.w-sheet-traits { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.w-sheet-trait { min-height:40px; padding:7px; border:1px solid #ece6db; border-radius:5px; }
.w-sheet-trait b { display:block; color:#838074; font-size:7px; text-transform:uppercase; }
.w-sheet-trait span { display:block; margin-top:4px; color:#55574f; font:10px/1.5 Georgia,"Noto Serif SC",serif; white-space:pre-wrap; }
.w-sheet-foot { display:flex; justify-content:space-between; gap:12px; margin-top:11px; padding-top:8px; border-top:1px solid #e9e2d6; color:#99958a; font-size:8px; }
.w-sheet-actions { display:flex; justify-content:center; gap:9px; margin-top:16px; }
.w-hidden { display:none!important; }
@media (max-width:1180px) {
  .w-layout { grid-template-columns:170px minmax(400px,1fr); }
  .w-preview { position:static; grid-column:2; }
  .w-preview-body { display:grid; grid-template-columns:1fr 1fr; gap:0 15px; }
  .w-preview-identity { grid-column:1/-1; }
  .w-preview-combat { align-self:start; }
  .w-preview-abilities { align-self:start; }
}
@media (max-width:780px) {
  .w-page { padding:22px 14px 42px; }
  .w-layout { grid-template-columns:1fr; gap:12px; }
  .w-rail { position:static; padding:11px; overflow-x:auto; }
  .w-rail-title { display:none; }
  .w-step-list { display:flex; min-width:max-content; gap:4px; }
  .w-step { width:auto; padding:7px 9px; }
  .w-step-copy { display:none; }
  .w-step-num { flex-basis:23px; width:23px; height:23px; }
  .w-progress { display:block; margin:9px 3px 2px; }
  .w-progress-message { max-width:100%; }
  .w-druid-spell-guide { grid-template-columns:1fr; }
  .w-preview { grid-column:auto; }
  .w-panel-body { min-height:0; padding:17px; }
  .w-panel-head { padding:17px; }
  .w-panel-foot { padding:12px 17px; }
}
@media (max-width:560px) {
  .w-topbar { padding:11px 14px; }
  .w-rule-tag { display:none; }
  .w-intro { display:block; }
  .w-intro-note { display:none; }
  .w-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .w-grid-2,.w-detail-grid { grid-template-columns:1fr; }
  .w-field.wide { grid-column:auto; }
  .w-check-grid,.w-assignment { grid-template-columns:repeat(2,1fr); }
  .w-roll-cards { grid-template-columns:repeat(3,1fr); }
  .w-spell-grid { grid-template-columns:repeat(2,1fr); }
  .w-sheet-wrap { padding:8px; }
  .w-sheet { padding:14px; }
  .w-sheet-facts { grid-template-columns:repeat(3,1fr); }
  .w-sheet-main { grid-template-columns:1fr; }
  .w-sheet-title { font-size:22px; }
  .w-panel-foot { flex-wrap:wrap; }
  .w-foot-left,.w-foot-right { flex:1; }
  .w-btn { padding:0 10px; }
}
/* Readability and the single-column builder layout. */
.w-layout { grid-template-columns:210px minmax(0,1fr); max-width:1120px; margin:0 auto; }
.w-preview { display:none!important; }
.w-intro h1 { font-size:clamp(32px,3.5vw,44px); }
.w-intro p,.w-panel-head p,.w-lore,.w-detail p,.w-hint,.w-notice { font-size:14px; }
.w-panel-head h2 { font-size:24px; }
.w-panel-body { padding:24px 28px 28px; }
.w-step-name { font-size:14px; }
.w-step-sub,.w-rail-title { font-size:11px; }
.w-step-num { flex-basis:28px; width:28px; height:28px; font-size:12px; }
.w-option-title { font-size:16px; }
.w-option-copy { font-size:13px; }
.w-option-meta { font-size:12px; }
.w-class-features { font-size:15px!important; line-height:1.75!important; }
.w-class-saves .w-pill { font-size:16px!important; }
.w-class-hit-die { font-size:17px!important; }
.w-field label,.w-label,.w-section-label { font-size:14px; }
.w-field input,.w-field select,.w-field textarea,.w-select { font-size:14px; }
.w-btn,.w-head-btn { font-size:14px; }
.w-check-grid { gap:9px; }
.w-check { align-items:center; gap:10px; padding:11px 12px; font-size:15px; line-height:1.45; }
.w-check span { font-size:15px; }
.w-check small { font-size:12px!important; }
.w-check input,.w-spell input { flex:0 0 14px; width:14px; height:14px; margin:0; }
.w-equip-choice { gap:10px; padding:12px; }
.w-equip-choice input[type="radio"] { flex:0 0 14px; width:14px; height:14px; }
.w-equip-choice strong { font-size:14px; }
.w-equip-choice small { font-size:12px; }
.w-equip-choice .w-equip-detail { margin-top:5px; color:#4b6d52; font-weight:650; }
.w-armor-guide { margin-top:20px; }
.w-armor-guide > p { margin:7px 0 13px; }
.w-armor-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.w-armor-row { display:grid; grid-template-columns:16px 1fr auto; gap:3px 8px; padding:9px 11px; border:1px solid #e7e1d5; border-radius:7px; background:#fffefa; }
.w-armor-row input { grid-row:1; grid-column:1; width:14px; height:14px; margin:1px 0 0; accent-color:var(--forest); }
.w-armor-row.unavailable { cursor:not-allowed; opacity:.58; }
.w-armor-row.unavailable:hover { transform:none; }
.w-armor-row.unavailable input { cursor:not-allowed; }
.w-armor-row strong { font-size:14px; }
.w-armor-row > span { color:#77786f; font-size:12px; }
.w-armor-row b { grid-column:1/-1; color:var(--forest); font-size:14px; }
.w-armor-row small { grid-column:1/-1; color:#8c897e; font-size:11px; }
.w-spell { gap:10px; padding:10px; font-size:14px; }
.w-spell small { font-size:12px; }
.w-stat-head strong { font-size:14px; }
.w-stat-final { font-size:19px; }
.w-stat-assign.primary-stat { border-color:#a3b19a; background:#f3f6f0; }
.w-stat-head em { margin-left:6px; color:var(--forest-2); font-size:11px; font-style:normal; }
.w-guidance-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:13px; }
.w-guidance-list article { padding:12px; border:1px solid #e7e1d5; border-radius:8px; background:#fffefa; }
.w-guidance-list strong { font-size:15px; color:var(--forest); }
.w-guidance-list p { margin:5px 0 0; font-size:14px; }
@media (max-width:560px) { .w-optional-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } .w-story-toolbar { align-items:flex-start; flex-direction:column; } .w-story-toolbar .w-btn { width:100%; } }
@media (max-width:1180px) { .w-layout { grid-template-columns:185px minmax(0,1fr); } }
@media (max-width:780px) {
  .w-layout { grid-template-columns:1fr; }
  .w-panel-body { padding:18px; }
  .w-guidance-list { grid-template-columns:1fr; }
}
@media (max-width:560px) {
  .w-check-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .w-check { padding:9px; }
  .w-armor-list { grid-template-columns:1fr; }
  .w-alignment-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .w-custom-weapon-list { grid-template-columns:1fr; }
  .w-wealth-roll { align-items:flex-start; flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) {
  .w-milestone,.w-milestone-message,.w-milestone-star,.w-completion,.w-completion-card,.w-completion-orbit,.needs-attention { animation-duration:.01ms; animation-iteration-count:1; }
}
.official-sheet { display:flex; flex-direction:column; align-items:center; gap:22px; width:100%; }
.official-page { position:relative; width:min(100%,816px); aspect-ratio:1870 / 2420; overflow:hidden; background:#fff; box-shadow:0 8px 28px #33261722; color:#111; }
.official-bg { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:fill; }
.official-overlay { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; font-family:"Microsoft YaHei","Noto Sans CJK SC",sans-serif; }
.official-text { position:absolute; overflow:hidden; color:#171717; font-size:10px; line-height:1.25; white-space:pre-line; overflow-wrap:anywhere; }
.official-text.center { text-align:center; }
.official-text.v-center { display:flex; align-items:center; }
.official-text.center.v-center { justify-content:center; }
.official-text.right { text-align:right; }
.official-text.strong { font-weight:750; }
.official-text.large { font-size:14px; font-weight:750; }
.official-text.ability-mod { font-size:17px; font-weight:750; }
.official-text.combat-value { display:grid; place-items:center; font-size:19px; font-weight:750; }
.official-text.tiny { font-size:7px; }
.official-text.stealth-disadvantage { color:#8f3328; font-weight:750; }
.official-text.compact { font-size:8px; line-height:1.3; }
.official-text.sheet-copy { box-sizing:border-box; padding:.25%; }
.official-text.spell-list { font-size:8.5px; line-height:2.2; }
.official-portrait { position:absolute; left:4.7%; top:15.8%; width:28.7%; height:31%; object-fit:cover; }
@media print {
  .w-milestone { display:none !important; }
  @page { size:letter portrait; margin:0; }
  html,body { width:8.5in!important; min-width:8.5in!important; margin:0!important; padding:0!important; background:#fff!important; }
  .w-topbar,.w-intro,.w-rail,.w-preview,.w-toast,.w-completion { display:none!important; }
  .w-panel { display:block!important; min-width:0; overflow:visible; border:0; border-radius:0; box-shadow:none; background:transparent; }
  .w-panel-head,.w-panel-foot { display:none!important; }
  .w-panel-body { display:block; min-height:0; padding:0; }
  .w-page { max-width:none; margin:0; padding:0; }
  .w-layout { display:block; }
  .w-sheet-wrap { padding:0; background:#fff; }
  .official-sheet { display:block; width:8.5in!important; margin:0!important; padding:0!important; }
  .official-page { box-sizing:border-box; width:8.5in!important; height:11in!important; min-width:8.5in!important; max-width:none!important; aspect-ratio:auto; margin:0!important; padding:0!important; box-shadow:none; break-inside:avoid; page-break-inside:avoid; break-after:page; page-break-after:always; }
  .official-page:last-child { break-after:auto; page-break-after:auto; }
  .official-page,.official-bg { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .official-text { font-size:8pt; }
  .official-text.large { font-size:11pt; }
  .official-text.ability-mod { font-size:13pt; }
  .official-text.combat-value { font-size:15pt; }
  .official-text.tiny { font-size:5.5pt; }
  .official-text.compact,.official-text.spell-list { font-size:6.5pt; }
  .official-text.spell-list { line-height:2.2; }
  .w-sheet-actions { display:none!important; }
}

/* A restrained dark-fantasy palette, with the supplied expedition artwork as a quiet backdrop. */
:root {
  color-scheme: dark;
  --forest: #8a7850;
  --forest-2: #b19a68;
  --sage: #a4a08e;
  --gold: #b99b61;
  --ink: #e6e0d2;
  --muted: #a29d90;
  --canvas: #11120f;
  --paper: #191a17;
  --line: #35352e;
  --soft: #20211d;
  --shadow: 0 10px 30px rgba(0, 0, 0, .18);
  background: var(--canvas);
  color: var(--ink);
}
html, body { min-height:100%; background:#11120f; color:#e6e0d2; }
body { background:radial-gradient(ellipse at 50% -18%, #25251f 0, #11120f 58%); }
.w-topbar { border-color:#302f29; background:#151613; }
.w-brand { color:#e6e0d2; }
.w-brand-mark { border-radius:7px; background:#8f784b; color:#14140f; }
.w-rule-tag { border-color:#3a3931; color:#b4ad9d; }
.w-head-btn { color:#c4bdad; }
.w-head-btn:hover { background:#25251f; }
.w-page { max-width:1320px; padding-top:28px; }
.w-intro { position:relative; min-height:154px; align-items:center; overflow:hidden; margin-bottom:18px; padding:24px 28px; border:1px solid #3a3830; border-radius:10px; background:linear-gradient(90deg,rgba(17,18,15,.96) 0%,rgba(17,18,15,.88) 43%,rgba(17,18,15,.38) 100%),url("assets/web-bg/3ef7de57045dfdd2defea8465507b008.jpg") center 44%/cover; }
.w-intro h1 { color:#eee7d8; }
.w-intro p { color:#b5b0a4; }
.w-eyebrow { color:#c0a56a; }
.w-intro-note { color:#d1c6a9; }
.w-layout { gap:14px; }
.w-rail,.w-panel,.w-preview { border-color:#34342e; border-radius:9px; background:#191a17; box-shadow:0 8px 24px #0003; }
.w-rail { padding:15px 10px; }
.w-rail-title,.w-step-sub { color:#8c897f; }
.w-step { color:#a8a397; }
.w-step.available:hover,.w-btn-quiet:hover { background:#252620; }
.w-step.active { background:#2a2921; color:#d1b779; }
.w-step-num { border-color:#45443a; color:#a8a397; }
.w-step.done .w-step-num { border-color:#8f784b; background:#8f784b; color:#14140f; }
.w-progress { color:#c0baad; }
.w-progress-heading strong,.w-stat-final { color:#c3a76d; }
.w-progress-track { background:#32322b; }
.w-progress-fill { background:#a48b56; }
.w-progress-count,.w-step-counter { color:#918d82; }
.w-progress-message { background:#25251f; color:#c8b786; }
.w-progress-message.near { background:#30291c; color:#d3b873; }
.w-panel { overflow:hidden; }
.w-panel-head { border-color:#34342e; }
.w-panel-head h2,.w-preview-title,.w-option-title { color:#e6e0d2; }
.w-panel-head p,.w-hint { color:#a6a093; }
.w-panel-foot,.w-preview-footer { border-color:#34342e; background:#171815; }
.w-btn-primary { background:#a58a52; color:#15140f; }
.w-btn-primary:hover { background:#b69a60; }
.w-btn-secondary { border-color:#45443a; background:#20211d; color:#d3cdbc; }
.w-btn-secondary:hover { background:#2a2b25; }
.w-btn-quiet { color:#b2ac9f; }
.w-option,.w-stat-assign,.w-check,.w-spell,.w-guidance-list article,.w-optional-fields,.w-armor-row,.w-wealth-roll,.w-equip-choice { border-color:#383831; background:#20211d; color:#ded8ca; }
.w-option:hover { border-color:#766644; background:#25251f; }
.w-option.selected,.w-check:has(input:checked),.w-spell:has(input:checked),.w-equip-choice:has(input:checked) { border-color:#a88d58; background:#2a281f; box-shadow:inset 0 0 0 1px #a88d58; }
.w-option-copy,.w-option-meta,.w-spell small,.w-preview-meta,.w-preview-note { color:#a29d90; }
.w-field label,.w-label,.w-section-label,.w-stat-head strong { color:#c6c0b3; }
.w-field input,.w-field select,.w-field textarea,.w-select,.w-optional-fields .w-field input { border-color:#414139; background:#171815; color:#e6e0d2; color-scheme:dark; }
.w-field input:focus,.w-field select:focus,.w-field textarea:focus,.w-select:focus { border-color:#a58a52; box-shadow:0 0 0 2px #a58a522b; }
.w-pill { border-color:#444239; background:#25251f; color:#c5beae; }
.w-pill.positive { border-color:#766644; background:#2a281f; color:#d1b779; }
.w-notice,.w-lore { border-color:#5d5035; background:#24221b; color:#c5b995; }
.w-lore { border-left-color:#a58a52; }
.w-detail,.w-identity-start,.w-story-card,.w-druid-spell-guide article,.w-roll { border-color:#383831; background:#20211d; color:#ded8ca; box-shadow:none; }
.w-story-card { background:linear-gradient(135deg,#22221d,#1b1c18); }
.w-druid-spell-guide article:last-child { border-color:#55482f; background:#252219; }
.w-die { border-color:#45443a; background:#292921; color:#ded8ca; }
.w-die.dropped { border-color:#66473b; background:#30221e; color:#cf987c; }
.w-spell-image-tooltip { border-color:#45443a; background:#191a17; }
.w-mini-stat { border-color:#383831; background:#20211d; color:#ded8ca; }
:root:not([data-theme="light"]) .w-grid-3 .w-mini-stat span { color:#b2ac9f; }
.w-mini-ability { background:#292921; color:#c8c2b5; }
.w-story-toolbar .w-btn { border-color:#a58a52; background:#a58a52; color:#15140f; box-shadow:none; }
.w-story-toolbar .w-btn:hover { background:#b69a60; }
.w-story-card textarea { border-color:#414139; background:#171815; color:#e6e0d2; }
.w-guidance-list strong,.w-stat-head em { color:#d0b579; }
.w-preview-head,.w-preview-note { border-color:#34342e; }
.w-preview-avatar { border-color:#45443a; background:#24251f; color:#c1ae7d; }
.w-preview-footer { color:#938f83; }
.w-toast { background:#25251f; color:#e6e0d2; }
.w-stat-assign.primary-stat { border-color:#b49a5f; background:#2d2b22; color:#ece5d7; box-shadow:inset 0 0 0 1px #b49a5f,0 0 0 2px #b49a5f26; }
.w-stat-assign.primary-stat .w-stat-head strong { color:#f0e8d7; }
.w-stat-assign.primary-stat .w-stat-head strong span { color:#c7c1b4!important; }
.w-stat-assign.primary-stat .w-stat-head em { color:#e0c276; }
.w-stat-assign.primary-stat .w-stat-final { color:#f0d28b; }
.w-stat-assign.primary-stat .w-stat-final small { color:#c7c1b4!important; }
.w-alignment-card { border-color:#3d3c35; background:#20211d; color:#e6e0d2; }
.w-alignment-card strong { color:#ddc27e; }
.w-alignment-card span { color:#c4beb1; }
.w-alignment-card:hover { border-color:#8f784b; background:#28271f; }
.w-alignment-card.selected { border-color:#d0ad61; background:#332e20; color:#f0e8d7; box-shadow:inset 0 0 0 1px #d0ad61,0 0 0 2px #d0ad6133; }
.w-alignment-card.selected strong { color:#f0d28b; }
.w-alignment-card.selected span { color:#e0dacd; }
/* Improve contrast for native controls and equipment choices in the dark theme. */
.needs-value select { border-color:#b8794e!important; background:#30291f!important; color:#f0e8d7!important; }
:root:not([data-theme="light"]) .needs-value input { border-color:#b8794e!important; background:#171815!important; color:#e6e0d2!important; }
:root:not([data-theme="light"]) .needs-value input::placeholder { color:#a99c83!important; opacity:1; }
.w-field select option,.w-select option { background:#20211d; color:#e6e0d2; }
.w-field select option:disabled,.w-select option:disabled { color:#aaa393; }
.w-field select option:checked,.w-select option:checked { background:#514329; color:#fff4d7; }
.w-custom-weapon { border-color:#383831; background:#20211d; color:#ded8ca; }
.w-custom-weapon > span { color:#c6c0b3; }
.w-custom-weapon select { border-color:#414139; background:#171815; color:#e6e0d2; }
.w-custom-weapon select:focus { border-color:#a58a52; box-shadow:0 0 0 2px #a58a522b; }
.w-equip-choice strong { color:#f0e8d7; }
.w-equip-choice small { color:#c8c1b3; }
.w-equip-choice .w-equip-detail,.w-custom-weapon small { color:#a9c39b; }
.w-armor-row { border-color:#383831; background:#20211d; color:#ded8ca; }
.w-armor-row.selected { border-color:#a88d58; background:#2a281f; box-shadow:inset 0 0 0 1px #a88d58; }
.w-armor-row strong { color:#f0e8d7; }
.w-armor-row b { color:#d1b779; }
.w-armor-row input { accent-color:#a88d58; }
@media (max-width:780px) {
  .w-intro { min-height:140px; padding:20px; background-position:58% 44%; }
  .w-page { padding-top:18px; }
}
@media (max-width:560px) {
  .w-topbar { padding:11px 14px; }
  .w-intro { min-height:124px; padding:17px; }
}
@media print {
  :root, html, body { color-scheme:light; background:#fff!important; color:#111!important; }
  .w-panel,.w-panel-head,.w-panel-foot { background:transparent!important; }
}

.w-theme-switch { display:inline-flex; align-items:stretch; padding:0; border:1px solid #3a3931; border-radius:7px; background:#20211d; }
.w-theme-switch button { min-height:35px; padding:0 11.5px; border:0; border-radius:5px; background:transparent; color:#aaa496; font-size:11px; font-weight:700; }
.w-theme-switch button[aria-pressed="true"] { background:#a58a52; color:#17160f; }
.w-theme-switch button:focus-visible { outline:2px solid #d4bd82; outline-offset:2px; }

:root[data-theme="light"] {
  color-scheme:light;
  --forest:#465a46;
  --forest-2:#627557;
  --sage:#858976;
  --gold:#a27c3e;
  --ink:#282a25;
  --muted:#74766e;
  --canvas:#eeeae0;
  --paper:#f8f5ec;
  --line:#dcd5c8;
  --soft:#f2eee4;
  --shadow:0 8px 24px rgba(49,42,30,.07);
  background:#eeeae0;
  color:#282a25;
}
:root[data-theme="light"] html,
:root[data-theme="light"] body { background:#eeeae0; color:#282a25; }
:root[data-theme="light"] body { background:radial-gradient(ellipse at 50% -18%,#f8f5ed 0,#eeeae0 60%); }
:root[data-theme="light"] .w-topbar { border-color:#dcd5c8; background:#f6f2e9; }
:root[data-theme="light"] .w-brand { color:#302f29; }
:root[data-theme="light"] .w-brand-mark { background:#465a46; color:#f7f3e9; }
:root[data-theme="light"] .w-rule-tag { border-color:#d9d1c2; color:#747166; }
:root[data-theme="light"] .w-head-btn { color:#5e5d55; }
:root[data-theme="light"] .w-head-btn:hover { background:#eae5d9; }
:root[data-theme="light"] .w-intro { border-color:#d7cdb9; background:linear-gradient(90deg,rgba(239,235,226,.97) 0%,rgba(239,235,226,.92) 43%,rgba(239,235,226,.62) 100%),url("assets/web-bg/3ef7de57045dfdd2defea8465507b008.jpg") center 44%/cover; }
:root[data-theme="light"] .w-intro h1 { color:#292b25; }
:root[data-theme="light"] .w-intro p { color:#64645c; }
:root[data-theme="light"] .w-eyebrow { color:#735c34; }
:root[data-theme="light"] .w-intro-note { padding:9px 11px; border-radius:5px; background:rgba(245,241,231,.72); color:#393528; text-shadow:none; }
:root[data-theme="light"] .w-rail,
:root[data-theme="light"] .w-panel,
:root[data-theme="light"] .w-preview { border-color:#ddd6c9; background:#f8f5ec; box-shadow:0 8px 24px rgba(49,42,30,.07); }
:root[data-theme="light"] .w-rail-title,
:root[data-theme="light"] .w-step-sub { color:#898579; }
:root[data-theme="light"] .w-step { color:#68685f; }
:root[data-theme="light"] .w-step.available:hover,
:root[data-theme="light"] .w-btn-quiet:hover { background:#eeeae0; }
:root[data-theme="light"] .w-step.active { background:#e7e8dc; color:#465a46; }
:root[data-theme="light"] .w-step-num { border-color:#d9d2c4; color:#79786e; }
:root[data-theme="light"] .w-step.done .w-step-num { border-color:#627557; background:#627557; color:#fffdf7; }
:root[data-theme="light"] .w-progress { color:#5f6058; }
:root[data-theme="light"] .w-progress-heading strong,
:root[data-theme="light"] .w-stat-final { color:#526447; }
:root[data-theme="light"] .w-progress-track { background:#e5e0d5; }
:root[data-theme="light"] .w-progress-fill { background:#687b5a; }
:root[data-theme="light"] .w-progress-count,
:root[data-theme="light"] .w-step-counter { color:#888579; }
:root[data-theme="light"] .w-progress-message { background:#e9ece3; color:#526447; }
:root[data-theme="light"] .w-progress-message.near { background:#f2ead8; color:#765a2c; }
:root[data-theme="light"] .w-panel-head { border-color:#e5dfd3; }
:root[data-theme="light"] .w-panel-head h2,
:root[data-theme="light"] .w-preview-title,
:root[data-theme="light"] .w-option-title { color:#302f29; }
:root[data-theme="light"] .w-panel-head p,
:root[data-theme="light"] .w-hint { color:#77766e; }
:root[data-theme="light"] .w-panel-foot,
:root[data-theme="light"] .w-preview-footer { border-color:#e3ddd1; background:#f3efe6; }
:root[data-theme="light"] .w-btn-primary { background:#526447; color:#fffdf7; }
:root[data-theme="light"] .w-btn-primary:hover { background:#40533c; }
:root[data-theme="light"] .w-btn-secondary { border-color:#d9d2c5; background:#f8f5ec; color:#4f5048; }
:root[data-theme="light"] .w-btn-secondary:hover { background:#eeeae0; }
:root[data-theme="light"] .w-btn-quiet { color:#69685f; }
:root[data-theme="light"] .w-option,
:root[data-theme="light"] .w-stat-assign,
:root[data-theme="light"] .w-check,
:root[data-theme="light"] .w-spell,
:root[data-theme="light"] .w-guidance-list article,
:root[data-theme="light"] .w-optional-fields,
:root[data-theme="light"] .w-armor-row,
:root[data-theme="light"] .w-wealth-roll,
:root[data-theme="light"] .w-equip-choice { border-color:#e1dbcf; background:#fdfbf5; color:#35362f; }
:root[data-theme="light"] .w-armor-row.selected { border-color:#718263; background:#edf0e7; box-shadow:inset 0 0 0 1px #718263; }
:root[data-theme="light"] .w-armor-row strong { color:#35362f; }
:root[data-theme="light"] .w-armor-row b { color:#526447; }
:root[data-theme="light"] .w-alignment-card { border-color:#e1dbcf; background:#fdfbf5; color:#35362f; }
:root[data-theme="light"] .w-alignment-card strong { color:#465a46; }
:root[data-theme="light"] .w-alignment-card span { color:#626157; }
:root[data-theme="light"] .w-alignment-card:hover { border-color:#aeb59f; background:#f6f4ec; }
:root[data-theme="light"] .w-alignment-card.selected { border-color:#718263; background:#e9eee5; box-shadow:inset 0 0 0 1px #718263; }
:root[data-theme="light"] .w-alignment-card.selected strong { color:#40533c; }
:root[data-theme="light"] .w-alignment-card.selected span { color:#4f5348; }
:root[data-theme="light"] .w-equip-choice strong { color:#35362f; }
:root[data-theme="light"] .w-equip-choice small { color:#68675e; }
:root[data-theme="light"] .w-equip-choice .w-equip-detail,
:root[data-theme="light"] .w-custom-weapon small { color:#526447; }
:root[data-theme="light"] .w-equip-choice input { accent-color:#526447; }
:root[data-theme="light"] .w-option:hover { border-color:#aeb59f; background:#f6f4ec; }
:root[data-theme="light"] .w-option.selected,
:root[data-theme="light"] .w-check:has(input:checked),
:root[data-theme="light"] .w-spell:has(input:checked),
:root[data-theme="light"] .w-equip-choice:has(input:checked) { border-color:#718263; background:#edf0e7; box-shadow:inset 0 0 0 1px #718263; }
:root[data-theme="light"] .w-option-copy,
:root[data-theme="light"] .w-option-meta,
:root[data-theme="light"] .w-spell small,
:root[data-theme="light"] .w-preview-meta,
:root[data-theme="light"] .w-preview-note { color:#77766e; }
:root[data-theme="light"] .w-field label,
:root[data-theme="light"] .w-label,
:root[data-theme="light"] .w-section-label,
:root[data-theme="light"] .w-stat-head strong { color:#5c5d54; }
:root[data-theme="light"] .w-field input,
:root[data-theme="light"] .w-field select,
:root[data-theme="light"] .w-field textarea,
:root[data-theme="light"] .w-select,
:root[data-theme="light"] .w-optional-fields .w-field input,
:root[data-theme="light"] .w-story-card textarea { border-color:#d9d3c7; background:#fffdf8; color:#302f29; color-scheme:light; }
:root[data-theme="light"] .w-field input:focus,
:root[data-theme="light"] .w-field select:focus,
:root[data-theme="light"] .w-field textarea:focus,
:root[data-theme="light"] .w-select:focus { border-color:#78876a; box-shadow:0 0 0 2px #78876a25; }
:root[data-theme="light"] .w-pill { border-color:#ded8cc; background:#f4f1e9; color:#626157; }
:root[data-theme="light"] .w-pill.positive { border-color:#d5ddce; background:#edf0e8; color:#526447; }
:root[data-theme="light"] .w-notice,
:root[data-theme="light"] .w-lore { border-color:#e3d8bf; background:#f5f0e4; color:#6e6149; }
:root[data-theme="light"] .w-lore { border-left-color:#a27c3e; }
:root[data-theme="light"] .w-notice.gold { background:#f4ecda; color:#765e36; }
:root[data-theme="light"] .w-guidance-list strong,
:root[data-theme="light"] .w-stat-head em { color:#526447; }
:root[data-theme="light"] .w-detail,
:root[data-theme="light"] .w-identity-start,
:root[data-theme="light"] .w-story-card,
:root[data-theme="light"] .w-druid-spell-guide article,
:root[data-theme="light"] .w-roll { border-color:#e1dbcf; background:#fdfbf5; color:#35362f; box-shadow:none; }
:root[data-theme="light"] .w-story-card { background:linear-gradient(135deg,#f8f4ea,#f0ebdf); }
:root[data-theme="light"] .w-druid-spell-guide article:last-child { border-color:#e3d8bf; background:#f8f3e7; }
:root[data-theme="light"] .w-die { border-color:#d9d2c5; background:#f5f1e7; color:#4f5048; }
:root[data-theme="light"] .w-die.dropped { border-color:#e4cfc5; background:#f9eeea; color:#aa6f5b; }
:root[data-theme="light"] .w-spell-image-tooltip { border-color:#ded6c7; background:#fffdf8; }
:root[data-theme="light"] .w-mini-stat { border-color:#e1dbcf; background:#fdfbf5; color:#35362f; }
:root[data-theme="light"] .w-mini-ability { background:#f1ede3; color:#56564e; }
:root[data-theme="light"] .w-story-toolbar .w-btn { border-color:#526447; background:#526447; color:#fffdf7; box-shadow:none; }
:root[data-theme="light"] .w-story-toolbar .w-btn:hover { background:#40533c; }
:root[data-theme="light"] .w-preview-head,
:root[data-theme="light"] .w-preview-note { border-color:#e3ddd1; }
:root[data-theme="light"] .w-preview-avatar { border-color:#ded7ca; background:#f0ece2; color:#526447; }
:root[data-theme="light"] .w-preview-footer { color:#77766e; }
:root[data-theme="light"] .w-toast { border-color:#d9e2d5; background:#f5f8f2; color:#3f664b; }
:root[data-theme="light"] .w-theme-switch { border-color:#d9d2c5; background:#e8e3d8; }
:root[data-theme="light"] .w-theme-switch button { color:#68675e; }
:root[data-theme="light"] .w-theme-switch button[aria-pressed="true"] { background:#526447; color:#fffdf7; }
:root[data-theme="light"] .w-theme-switch button:focus-visible { outline-color:#667858; }
@media print {
  :root[data-theme="light"], :root[data-theme="light"] html, :root[data-theme="light"] body { background:#fff!important; color:#111!important; }
}
@media (max-width:560px) {
  .w-topbar { flex-wrap:wrap; }
  .w-header-right { width:100%; justify-content:flex-end; gap:5px; }
  .w-head-btn { padding:7px 8px; font-size:12px; }
  .w-theme-switch button { padding:0 8px; font-size:11px; }
}

/* Visual system: type scale, control scale, surfaces, spacing, and motion. */
:root {
  --ui-space-1:4px; --ui-space-2:8px; --ui-space-3:12px; --ui-space-4:16px;
  --ui-space-5:20px; --ui-space-6:24px; --ui-space-7:32px;
  --ui-type-display:clamp(34px,4vw,46px); --ui-type-title:25px; --ui-type-section:18px;
  --ui-type-body:15px; --ui-type-label:14px; --ui-type-meta:12px; --ui-type-micro:11px;
  --ui-control-height:44px; --ui-control-radius:10px; --ui-nested-radius:12px; --ui-card-radius:16px;
  --ui-ease:cubic-bezier(.22,1,.36,1); --ui-duration:240ms;
  --ui-control-bg:#171815; --ui-control-fg:#e6e0d2; --ui-control-border:#414139;
  --ui-progress-track:#34342d; --ui-progress-fill:#b99b61;
}
:root[data-theme="light"] {
  --ui-control-bg:#fffdf8; --ui-control-fg:#302f29; --ui-control-border:#d9d3c7;
  --ui-progress-track:#e2ddd1; --ui-progress-fill:#687b5a;
}
html { scroll-behavior:smooth; }
.w-topbar { min-height:68px; padding-block:12px; }
.w-page { max-width:1240px; padding:28px 24px 56px; }
.w-intro { min-height:166px; margin-bottom:24px; padding:clamp(22px,3vw,36px); border-radius:var(--ui-card-radius); }
.w-intro h1 { font-size:var(--ui-type-display); }
.w-intro p { font-size:var(--ui-type-body); line-height:1.65; }
.w-layout { grid-template-columns:232px minmax(0,1fr); max-width:1160px; gap:20px; }
.w-rail,.w-panel,.w-preview { border-radius:var(--ui-card-radius); }
.w-rail { top:16px; padding:18px 14px; }
.w-rail-title { margin:0 8px 14px; font-size:var(--ui-type-micro); }
.w-step-list { position:relative; display:flex; flex-direction:column; gap:2px; isolation:isolate; }
.w-step-list::before,.w-step-list::after { position:absolute; top:26px; left:21px; width:2px; content:""; pointer-events:none; }
.w-step-list::before { bottom:26px; border-radius:99px; background:var(--ui-progress-track); }
.w-step-list::after { height:min(var(--step-progress,0%),calc(100% - 52px)); border-radius:99px; background:linear-gradient(180deg,var(--forest-2),var(--ui-progress-fill)); }
.w-step-list.is-progressing::after { animation:vertical-progress-fill 680ms var(--ui-ease) both; }
@keyframes vertical-progress-fill { from { height:0; } to { height:min(var(--step-progress,0%),calc(100% - 52px)); } }
.w-step { position:relative; z-index:1; min-height:48px; gap:12px; margin:0; padding:7px 6px; border-radius:10px; transition:background var(--ui-duration) var(--ui-ease),color var(--ui-duration) var(--ui-ease),transform var(--ui-duration) var(--ui-ease); }
.w-step-num { flex-basis:30px; width:30px; height:30px; border-color:var(--line); background:var(--paper); font-size:12px; transition:background var(--ui-duration) var(--ui-ease),border-color var(--ui-duration) var(--ui-ease),transform var(--ui-duration) var(--ui-ease); }
.w-step-name { font-size:var(--ui-type-label); }
.w-step-sub { font-size:var(--ui-type-micro); }
.w-step:hover:not(:disabled) { transform:translateX(2px); }
.w-step.active .w-step-num { border-color:var(--ui-progress-fill); box-shadow:0 0 0 4px color-mix(in srgb,var(--ui-progress-fill) 18%,transparent); }
.w-progress { margin:16px 8px 2px; }
.w-progress-track { display:none; }
.w-progress-heading { font-size:var(--ui-type-label); }
.w-progress-heading strong { font-size:18px; }
.w-progress-count { font-size:var(--ui-type-meta); }
.w-progress-message { font-size:var(--ui-type-meta); }
.w-panel { overflow:hidden; }
.w-panel-head { align-items:center; padding:22px 28px 19px; }
.w-panel-head h2 { font-size:var(--ui-type-title); }
.w-panel-head p { font-size:var(--ui-type-meta); line-height:1.7; }
.w-step-counter { padding:7px 10px; border:1px solid var(--line); border-radius:99px; font-size:var(--ui-type-micro); }
.w-panel-body { padding:24px 28px 28px; }
.w-panel-foot { min-height:68px; padding:13px 28px; }
.w-btn { min-height:var(--ui-control-height); padding-inline:16px; border-radius:var(--ui-control-radius); font-size:var(--ui-type-label); transition:background var(--ui-duration) var(--ui-ease),border-color var(--ui-duration) var(--ui-ease),color var(--ui-duration) var(--ui-ease),transform var(--ui-duration) var(--ui-ease),box-shadow var(--ui-duration) var(--ui-ease); }
.w-btn:hover:not(:disabled) { transform:translateY(-1px); }
.w-btn:focus-visible,.w-head-btn:focus-visible,.w-step:focus-visible { outline:2px solid var(--ui-progress-fill); outline-offset:3px; }
.w-field label,.w-label,.w-section-label { font-size:var(--ui-type-label); line-height:1.45; }
.w-field input,.w-field select,.w-field textarea,.w-select { border-color:var(--ui-control-border); border-radius:var(--ui-control-radius); background:var(--ui-control-bg); color:var(--ui-control-fg); font-size:var(--ui-type-body); transition:border-color var(--ui-duration) var(--ui-ease),box-shadow var(--ui-duration) var(--ui-ease),background var(--ui-duration) var(--ui-ease); }
.w-field input,.w-field select,.w-select { min-height:var(--ui-control-height); height:var(--ui-control-height); }
.w-field textarea { min-height:110px; line-height:1.7; }
.w-detail,.w-identity-start,.w-story-card,.w-roll,.w-optional-fields { border-radius:var(--ui-nested-radius); }
.w-detail h3 { font-size:var(--ui-type-section); line-height:1.4; }
.w-detail p,.w-notice,.w-lore { font-size:var(--ui-type-body); line-height:1.7; }
.w-hint { font-size:var(--ui-type-meta); line-height:1.6; }
.w-pill { min-height:30px; padding:6px 10px; border-radius:999px; font-size:var(--ui-type-micro); }
.w-option,.w-check,.w-spell,.w-alignment-card,.w-equip-choice,.w-armor-row,.w-stat-assign { border-radius:var(--ui-nested-radius); transition:border-color var(--ui-duration) var(--ui-ease),background var(--ui-duration) var(--ui-ease),box-shadow var(--ui-duration) var(--ui-ease),transform var(--ui-duration) var(--ui-ease); }
.w-option:hover,.w-check:hover,.w-spell:hover,.w-alignment-card:hover,.w-equip-choice:hover,.w-armor-row:hover { transform:translateY(-2px); }
.w-check input,.w-spell input,.w-equip-choice input[type="radio"],.w-armor-row input { width:17px; height:17px; accent-color:var(--ui-progress-fill); }
.w-toast { font-size:var(--ui-type-meta); }
.w-panel.is-entering .w-panel-head { animation:panel-head-enter 360ms var(--ui-ease) both; }
.w-panel-body.is-entering > * { animation:panel-content-enter 390ms var(--ui-ease) both; }
.w-panel-body.is-entering > *:nth-child(2) { animation-delay:45ms; }
.w-panel-body.is-entering > *:nth-child(3) { animation-delay:90ms; }
.w-panel-body.is-entering > *:nth-child(4) { animation-delay:135ms; }
@keyframes panel-head-enter { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
@keyframes panel-content-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes scroll-card-enter { from { opacity:.15; transform:translateY(16px) scale(.99); } to { opacity:1; transform:translateY(0) scale(1); } }
@supports (animation-timeline:view()) {
  .w-panel-body .w-option,.w-panel-body .w-check,.w-panel-body .w-spell,.w-panel-body .w-alignment-card,.w-panel-body .w-stat-assign,.w-panel-body .w-equip-choice,.w-panel-body .w-armor-row,.w-panel-body .w-guidance-list article {
    animation:scroll-card-enter linear both; animation-timeline:view(); animation-range:entry 0% entry 30%;
  }
}
@media (max-width:1180px) {
  .w-layout { grid-template-columns:220px minmax(0,1fr); }
}
@media (max-width:780px) {
  .w-page { padding:20px 16px 44px; }
  .w-intro { min-height:136px; padding:22px; }
  .w-layout { grid-template-columns:minmax(0,1fr); gap:14px; }
  .w-rail { position:static; padding:12px; border-radius:var(--ui-nested-radius); }
  .w-rail-title { display:block; margin-bottom:9px; }
  .w-step-list { flex-direction:row; gap:4px; overflow-x:auto; padding-bottom:2px; }
  .w-step-list::before,.w-step-list::after { display:none; }
  .w-step { min-height:38px; flex:0 0 auto; padding:6px 8px; }
  .w-step-copy { display:none; }
  .w-step-num { flex-basis:26px; width:26px; height:26px; }
  .w-progress { display:flex; align-items:center; gap:12px; margin:10px 3px 1px; }
  .w-progress-track { display:block; flex:0 0 4px; width:4px; height:52px; border-radius:99px; background:var(--ui-progress-track); overflow:hidden; }
  .w-progress-fill { width:100%; height:var(--step-progress,0%); border-radius:99px; background:linear-gradient(180deg,var(--forest-2),var(--ui-progress-fill)); }
  .w-progress.is-progressing .w-progress-fill { animation:mobile-progress-fill 680ms var(--ui-ease) both; }
  @keyframes mobile-progress-fill { from { height:0; } to { height:var(--step-progress,0%); } }
  .w-progress-heading { flex:0 0 auto; gap:10px; margin:0; }
  .w-progress-count { margin:0; }
  .w-progress-message { margin:0 0 0 auto; }
  .w-panel-head { padding:18px 20px; }
  .w-panel-body { padding:20px; }
  .w-panel-foot { padding:12px 20px; }
}
@media (max-width:560px) {
  .w-page { padding-inline:12px; }
  .w-intro { min-height:124px; padding:18px; }
  .w-panel-head { align-items:flex-start; padding:16px; }
  .w-panel-head h2 { font-size:22px; }
  .w-panel-body { padding:16px; }
  .w-panel-foot { padding:12px 16px; }
  .w-progress { flex-wrap:wrap; }
  .w-progress-message { flex-basis:100%; margin:0; }
  .w-btn { min-height:42px; padding-inline:12px; font-size:13px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .w-step,.w-step-num,.w-btn,.w-option,.w-check,.w-spell,.w-alignment-card,.w-equip-choice,.w-armor-row,.w-stat-assign { transition:none!important; }
  .w-step-list.is-progressing::after,.w-progress.is-progressing .w-progress-fill,.w-panel.is-entering .w-panel-head,.w-panel-body.is-entering > * { animation:none!important; }
  @supports (animation-timeline:view()) { .w-panel-body .w-option,.w-panel-body .w-check,.w-panel-body .w-spell,.w-panel-body .w-alignment-card,.w-panel-body .w-stat-assign,.w-panel-body .w-equip-choice,.w-panel-body .w-armor-row,.w-panel-body .w-guidance-list article { animation:none!important; } }
}
@media print {
  html { scroll-behavior:auto; }
  .w-panel.is-entering .w-panel-head,.w-panel-body.is-entering > * { animation:none!important; transform:none!important; opacity:1!important; }
  @supports (animation-timeline:view()) { .w-panel-body .w-option,.w-panel-body .w-check,.w-panel-body .w-spell,.w-panel-body .w-alignment-card,.w-panel-body .w-stat-assign,.w-panel-body .w-equip-choice,.w-panel-body .w-armor-row,.w-panel-body .w-guidance-list article { animation:none!important; transform:none!important; opacity:1!important; } }
}

/* Light-theme contrast tuning for the supplied art, native menus, and custom gear. */
:root[data-theme="light"] .w-intro {
  border-color:#d4c8b0;
  background:linear-gradient(90deg,rgba(240,235,224,.86) 0%,rgba(240,235,224,.66) 48%,rgba(240,235,224,.28) 100%),url("assets/web-bg/3ef7de57045dfdd2defea8465507b008.jpg") center 44%/cover;
  box-shadow:inset 0 0 0 1px #fff5,0 10px 28px rgba(54,43,25,.07);
}
:root[data-theme="light"] .w-intro-note { background:rgba(250,247,239,.82); color:#514630; box-shadow:0 2px 10px rgba(48,39,24,.06); }
:root[data-theme="light"] .w-field select option,
:root[data-theme="light"] .w-select option,
:root[data-theme="light"] .w-stat-assign select option { background:#fffdf8; color:#302f29; }
:root[data-theme="light"] .w-field select option:disabled,
:root[data-theme="light"] .w-select option:disabled,
:root[data-theme="light"] .w-stat-assign select option:disabled { color:#858277; }
:root[data-theme="light"] .w-field select option:checked,
:root[data-theme="light"] .w-select option:checked,
:root[data-theme="light"] .w-stat-assign select option:checked { background:#e5ebdf; color:#293b2b; }
:root[data-theme="light"] .w-custom-weapon { border-color:#d9d4c7; background:#f2f0e8; color:#37382f; }
:root[data-theme="light"] .w-custom-weapon > span { color:#55564e; font-size:var(--ui-type-label); }
:root[data-theme="light"] .w-custom-weapon select { border-color:#d4cec0; background:#fffdf8; color:#302f29; }
:root[data-theme="light"] .w-custom-weapon select:focus { border-color:#78876a; box-shadow:0 0 0 2px #78876a25; }
:root[data-theme="light"] .w-custom-weapon small { color:#53684b; font-size:var(--ui-type-meta); line-height:1.5; }
:root[data-theme="light"] .needs-value select { border-color:#d68b62!important; background:#fffdf8!important; color:#302f29!important; color-scheme:light; }
:root[data-theme="light"] .w-grid-3 .w-mini-stat b { font-size:19px; }
:root[data-theme="light"] .w-grid-3 .w-mini-stat span { color:#69685f; font-size:var(--ui-type-meta); line-height:1.4; }

/* Small, intentional feedback for selections and newly revealed details. */
.motion-enter { animation:detail-reveal 190ms var(--ui-ease) both; }
@keyframes detail-reveal { from { opacity:0; transform:translateY(7px) scale(.99); } to { opacity:1; transform:translateY(0) scale(1); } }
.w-roll.motion-roll { animation:roll-reveal 165ms var(--ui-ease) both; }
.w-roll.motion-roll:nth-child(2) { animation-delay:35ms; }
.w-roll.motion-roll:nth-child(3) { animation-delay:65ms; }
.w-roll.motion-roll:nth-child(4) { animation-delay:90ms; }
.w-roll.motion-roll:nth-child(5) { animation-delay:110ms; }
.w-roll.motion-roll:nth-child(6) { animation-delay:125ms; }
@keyframes roll-reveal { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
.w-spell-image-tooltip { opacity:0; visibility:hidden; transform:translateY(4px) scale(.985); transition:opacity 150ms var(--ui-ease),transform 150ms var(--ui-ease),visibility 0s linear 150ms; }
.w-spell-image-tooltip.is-visible { opacity:1; visibility:visible; transform:translateY(0) scale(1); transition-delay:0s; }
.w-option,.w-alignment-card,.w-equip-choice,.w-armor-row { transition:border-color var(--ui-duration) var(--ui-ease),background var(--ui-duration) var(--ui-ease),box-shadow var(--ui-duration) var(--ui-ease),transform var(--ui-duration) var(--ui-ease),filter 130ms var(--ui-ease); }
.w-option:active,.w-alignment-card:active,.w-equip-choice:active,.w-armor-row:active { filter:brightness(.94) saturate(1.06); }
@media (prefers-reduced-motion:reduce) {
  .motion-enter,.w-roll.motion-roll { animation:motion-fade 130ms ease both; }
  .w-roll.motion-roll:nth-child(n) { animation-delay:0ms!important; }
  @keyframes motion-fade { from { opacity:0; } to { opacity:1; } }
  .w-spell-image-tooltip { transform:none; transition:opacity 100ms ease,visibility 0s linear 100ms; }
  .w-spell-image-tooltip.is-visible { transform:none; }
  .w-option:active,.w-alignment-card:active,.w-equip-choice:active,.w-armor-row:active { filter:none!important; }
}
@media print {
  .motion-enter,.w-roll.motion-roll { animation:none!important; transform:none!important; opacity:1!important; }
  .w-spell-image-tooltip { display:none!important; }
}

/* Theme selector: the active surface slides between the two display modes. */
.w-theme-switch { position:relative; isolation:isolate; }
.w-theme-switch::before { position:absolute; z-index:0; inset-block:3px; left:3px; width:calc((100% - 6px) / 2); border-radius:5px; background:#a58a52; content:""; pointer-events:none; transform:translateX(0); transition:transform var(--ui-duration) var(--ui-ease); }
.w-theme-switch button { position:relative; z-index:1; flex:1; }
.w-theme-switch button[aria-pressed="true"] { background:transparent; }
:root[data-theme="light"] .w-theme-switch::before { background:#526447; transform:translateX(100%); }
:root[data-theme="light"] .w-theme-switch button[aria-pressed="true"] { background:transparent; }
:root[data-theme="light"] .w-theme-switch.is-sliding-from-dark::before { animation:theme-switch-to-light var(--ui-duration) var(--ui-ease) both; }
:root:not([data-theme="light"]) .w-theme-switch.is-sliding-from-light::before { animation:theme-switch-to-dark var(--ui-duration) var(--ui-ease) both; }
@keyframes theme-switch-to-light { from { transform:translateX(0); } to { transform:translateX(100%); } }
@keyframes theme-switch-to-dark { from { transform:translateX(100%); } to { transform:translateX(0); } }
@media (prefers-reduced-motion:reduce) {
  .w-theme-switch::before { transition:none; animation:none!important; }
}

/* D6 tumble and result reveal, timed to follow the reference GIF's dramatic reveal. */
:root { --roll-face:#ded8ca; --roll-dropped:#cf987c; --roll-flash:#d4b76d; }
:root[data-theme="light"] { --roll-face:#4f5048; --roll-dropped:#aa6f5b; --roll-flash:#a27c3e; }
.w-roll-actions { display:flex; align-items:center; gap:8px; }
.w-roll.motion-roll { position:relative; overflow:hidden; border-color:var(--gold); box-shadow:0 0 0 1px color-mix(in srgb,var(--gold) 30%,transparent),0 6px 18px color-mix(in srgb,var(--gold) 16%,transparent); }
.w-roll.motion-roll > * { position:relative; z-index:1; }
.w-roll.motion-roll::after { position:absolute; z-index:0; top:38%; left:50%; width:8px; height:8px; border-radius:50%; background:var(--roll-flash); box-shadow:0 -23px 0 -2px var(--roll-flash),20px -12px 0 -2px var(--roll-flash),20px 12px 0 -2px var(--roll-flash),0 23px 0 -2px var(--roll-flash),-20px 12px 0 -2px var(--roll-flash),-20px -12px 0 -2px var(--roll-flash); content:""; opacity:0; pointer-events:none; animation:roll-spark-burst 480ms var(--ui-ease) both; animation-delay:calc(var(--roll-index) * 120ms + 700ms); }
.w-roll.motion-roll .w-roll-score { opacity:0; filter:blur(3px); transform:translateY(5px) scale(.75); animation:roll-score-impact 360ms var(--ui-ease) both; animation-delay:calc(var(--roll-index) * 120ms + 850ms); }
.w-roll.motion-roll .w-die { position:relative; z-index:1; color:transparent; transform-style:preserve-3d; box-shadow:inset 0 1px 0 #fff3,0 3px 0 color-mix(in srgb,var(--roll-flash) 34%,transparent),0 6px 12px #0003; animation:d6-tumble 780ms cubic-bezier(.18,.72,.28,1) both; animation-delay:calc(var(--roll-index) * 120ms + var(--die-index) * 24ms); }
.w-roll.motion-roll .w-die.dropped { color:transparent; text-decoration:none; animation-name:d6-discard; }
.w-roll.motion-roll .w-die.dropped::after { position:absolute; inset:0; display:grid; place-items:center; color:var(--roll-dropped); font-size:15px; font-weight:500; content:"╱"; opacity:0; transform:scale(.55) rotate(20deg); animation:discard-mark 180ms var(--ui-ease) both; animation-delay:calc(var(--roll-index) * 120ms + 680ms); }
@keyframes d6-tumble {
  0% { opacity:0; color:transparent; filter:brightness(1.8); transform:translateY(-17px) rotateX(-125deg) rotateY(80deg) scale(.68); }
  35% { opacity:1; color:transparent; filter:brightness(1.45); transform:translateY(-9px) rotateX(150deg) rotateY(260deg) scale(1.14); }
  70% { opacity:1; color:transparent; filter:brightness(1.2); transform:translateY(2px) rotateX(330deg) rotateY(400deg) scale(.95); }
  86% { color:transparent; transform:translateY(-2px) rotateX(365deg) rotateY(350deg) scale(1.04); }
  100% { opacity:1; color:var(--roll-face); filter:none; transform:translateY(0) rotateX(360deg) rotateY(360deg) scale(1); }
}
@keyframes d6-discard {
  0%,75% { opacity:1; color:transparent; filter:brightness(1.4); transform:translateY(-8px) rotateX(-160deg) rotateY(170deg) scale(1.1); }
  100% { opacity:.78; color:var(--roll-dropped); filter:saturate(.72); transform:translateY(0) rotateX(360deg) rotateY(360deg) scale(.95); }
}
@keyframes discard-mark { to { opacity:1; transform:scale(1) rotate(20deg); } }
@keyframes roll-score-impact { 0% { opacity:0; filter:blur(4px); transform:translateY(6px) scale(.68); } 72% { opacity:1; filter:blur(0); transform:translateY(-2px) scale(1.12); } 100% { opacity:1; filter:none; transform:translateY(0) scale(1); } }
@keyframes roll-spark-burst { 0% { opacity:0; transform:translate(-50%,-50%) scale(.22) rotate(0); } 35% { opacity:.88; } 100% { opacity:0; transform:translate(-50%,-50%) scale(1.5) rotate(35deg); } }
:root[data-theme="light"] .w-roll.motion-roll { background:#faf8f0; }
:root[data-theme="light"] .w-roll.motion-roll .w-die { border-color:#c8b98e; background:linear-gradient(145deg,#fffdf7,#eee8d8); }
:root[data-theme="dark"] .w-roll.motion-roll .w-die { border-color:#8a764c; background:linear-gradient(145deg,#373329,#22221e); }
@media (prefers-reduced-motion:reduce) {
  .w-roll.motion-roll,.w-roll.motion-roll .w-die,.w-roll.motion-roll .w-die.dropped::after,.w-roll.motion-roll .w-roll-score,.w-roll.motion-roll::after { animation:none!important; }
  .w-roll.motion-roll .w-roll-score { opacity:1; filter:none; transform:none; }
  .w-roll.motion-roll .w-die { color:var(--roll-face); filter:none; transform:none; }
  .w-roll.motion-roll .w-die.dropped { color:var(--roll-dropped); opacity:.78; text-decoration:line-through; }
}
@media (max-width:780px) {
  .w-roll-cards { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .w-roll-toolbar { align-items:flex-start; flex-wrap:wrap; }
  .w-roll-actions { width:100%; justify-content:flex-end; }
}
@media print {
  .w-roll.motion-roll::after { display:none!important; }
  .w-roll.motion-roll,.w-roll.motion-roll .w-roll-score,.w-roll.motion-roll .w-die { animation:none!important; opacity:1!important; filter:none!important; transform:none!important; }
  .w-roll.motion-roll .w-die { color:var(--ink)!important; }
  .w-roll.motion-roll .w-die.dropped { color:#aa6f5b!important; text-decoration:line-through!important; }
}

