:root{--ink:#26211d;--muted:#77716c;--line:#e8e1d9;--paper:#fffdf9;--wash:#f6f2ec;--rust:#9e432c;--rust-dark:#78321f;--gold:#c09b58;--green:#51634b;--shadow:0 12px 40px #31221710;font-family:'DM Sans',sans-serif;color:var(--ink);background:#fbf9f5}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0}.topbar{height:72px;padding:0 clamp(20px,5vw,84px);display:flex;align-items:center;gap:36px;border-bottom:1px solid #eee7de;background:#fffdf9}.brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;font-size:13px;font-weight:700;letter-spacing:.12em}.brand small{display:block;font-size:9px;font-weight:500;letter-spacing:.19em;color:#857c73;margin-top:4px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;background:var(--rust);color:white;border-radius:50%;font:600 20px 'Playfair Display',serif}.topbar nav{display:flex;gap:26px;margin-left:22px}.topbar nav a{font-size:13px;color:#655e57;text-decoration:none}.topbar nav a:hover{color:var(--rust)}.save-state{margin-left:auto;font-size:11px;color:#6c8062}.hero{min-height:432px;background:#211d19;color:#fffaf2;display:grid;grid-template-columns:1fr minmax(320px,44%);padding:62px clamp(24px,8vw,128px);gap:70px;overflow:hidden}.eyebrow{font-size:10px;line-height:1.4;font-weight:700;letter-spacing:.2em;color:var(--rust);margin:0 0 13px}.hero .eyebrow{color:#d3ac6d}.hero h1{font:600 clamp(40px,5vw,64px)/1.05 'Playfair Display',serif;letter-spacing:-.03em;margin:0 0 17px}.hero-copy{max-width:500px;color:#d2c8bb;font-size:15px;line-height:1.7}.hero-actions{display:flex;align-items:center;gap:12px;margin-top:28px}.button{appearance:none;border:1px solid transparent;border-radius:6px;padding:11px 15px;font:600 12px 'DM Sans',sans-serif;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:10px;transition:.15s}.button:hover{transform:translateY(-1px)}.button-light{background:#f7eee0;color:#291f18}.button-quiet{background:transparent;color:#eee4d8;border-color:#796b5c}.button-dark{background:var(--rust);color:white}.button-dark:hover{background:var(--rust-dark)}.button-outline{background:transparent;color:#493d34;border-color:#d6cec4}.button-outline:hover{background:#f5eee5}.hero-art{position:relative;min-height:300px;background:linear-gradient(180deg,#3e3933,#857768);border:1px solid #73695d;border-radius:4px;overflow:hidden;box-shadow:0 18px 54px #0005}.hero-art:before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#241d17a8,transparent 55%)}.sun{position:absolute;width:94px;height:94px;border-radius:50%;background:#d7a763;top:39px;right:26%;box-shadow:0 0 55px #d7a76377}.mountain{position:absolute;bottom:0;left:-5%;width:120%;height:70%;clip-path:polygon(0 100%,26% 13%,38% 48%,57% 0,100% 100%)}.mountain-back{background:#796d60;transform:translateY(6px)}.mountain-front{height:52%;background:#51483f;clip-path:polygon(0 100%,20% 30%,40% 68%,65% 15%,100% 100%)}.figure{position:absolute;bottom:30px;left:45%;width:24px;height:70px;background:#211a16;clip-path:polygon(44% 0,62% 5%,70% 25%,100% 33%,88% 41%,68% 37%,72% 100%,52% 100%,48% 59%,30% 100%,10% 100%,31% 49%,24% 29%,31% 8%)}.figure i{position:absolute;top:1px;width:18px;height:18px;background:#211a16;border-radius:50%}.figure b{position:absolute;right:-19px;top:20px;width:5px;height:50px;background:#211a16;transform:rotate(-13deg)}.art-caption{position:absolute;left:18px;bottom:15px;font-size:9px;letter-spacing:.22em;color:#f0e4d3}.workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:42px;padding:62px clamp(24px,6vw,96px) 75px;max-width:1600px;margin:auto}.rail{padding-top:8px}.rail .eyebrow{margin-bottom:20px}.step{display:flex;gap:12px;align-items:flex-start;padding:0 0 23px;position:relative;color:#8c8379}.step:after{content:"";position:absolute;left:14px;top:31px;bottom:0;width:1px;background:#ddd3c8}.step:last-of-type:after{display:none}.step>span{display:grid;place-items:center;border:1px solid #c9bcb0;background:#fbf9f5;border-radius:50%;width:29px;height:29px;font-size:10px;font-weight:700;z-index:1}.step.active>span{border-color:var(--rust);color:var(--rust)}.step b{display:block;font-size:12px;color:#39332d;margin:1px 0 4px}.step small{display:block;font-size:10px;color:#898078}.rail-note{margin-top:28px;background:#f1ece4;border-radius:8px;padding:16px}.rail-note strong{font:600 26px 'Playfair Display',serif;display:block}.rail-note>span{font-size:11px;color:var(--muted)}.progress{height:4px;background:#ddd4c8;border-radius:9px;margin-top:14px;overflow:hidden}.progress i{display:block;height:100%;width:5%;background:var(--rust);transition:.2s}.builder-main{min-width:0}.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:23px}.section-head h2{font:600 31px 'Playfair Display',serif;margin:0;letter-spacing:-.02em}.head-actions{display:flex;gap:8px;flex-wrap:wrap}.builder-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:22px;box-shadow:var(--shadow);min-width:0}.panel-title{display:flex;gap:12px;align-items:flex-start;margin-bottom:20px}.number{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:#f4e9dc;color:var(--rust);font-size:10px;font-weight:700}.panel-title h3{font:600 20px 'Playfair Display',serif;margin:0 0 4px}.panel-title p{font-size:11px;line-height:1.5;color:var(--muted);margin:0}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{font-size:10px;font-weight:600;color:#645b52;display:flex;flex-direction:column;gap:6px;min-width:0}.field.wide{grid-column:1/-1}.field input,.field select,.field textarea,.skill-search{width:100%;min-width:0;border:1px solid #ddd4ca;border-radius:5px;background:#fffefa;padding:10px 11px;color:var(--ink);font:12px 'DM Sans',sans-serif;outline:none}.field textarea{resize:vertical;line-height:1.45}.field input:focus,.field select:focus,.field textarea:focus,.skill-toolbar input:focus{border-color:#ad705c;box-shadow:0 0 0 3px #9e432c13}.race-note{font-size:11px;color:#786f65;line-height:1.55;margin-top:14px;padding:10px 11px;background:#f8f4ee;border-radius:5px;min-height:36px}.race-choice-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:12px}.race-choice-block{padding:11px 12px;border:1px solid #eee6dc;border-radius:6px;background:#fffefa}.race-choice-block h4{font:600 14px 'Playfair Display',serif;margin:0 0 5px}.race-choice-block p{font-size:9px;color:#82776c;line-height:1.4;margin:0 0 8px}.choice-chip{display:inline-flex;margin:3px 5px 2px 0;border-radius:30px;padding:5px 8px;background:#f1e9df;color:#645447;font-size:9px}.race-choice-row{display:grid;grid-template-columns:minmax(100px,150px) minmax(140px,1fr);gap:8px;align-items:center;margin:7px 0}.race-choice-row label{font-size:9px;color:#675c52}.race-choice-row select{width:100%;border:1px solid #ddd4ca;border-radius:5px;padding:8px;font:10px 'DM Sans';background:#fffefa}.ability-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.ability{padding:11px 9px;text-align:center;border:1px solid #e7dfd5;border-radius:7px;background:#fbf9f5}.ability label{display:block;font-size:9px;letter-spacing:.12em;font-weight:700;color:#84796e;margin-bottom:7px}.ability input{width:45px;border:0;border-bottom:1px solid #c8bdb1;background:transparent;text-align:center;font:600 20px 'Playfair Display',serif;color:#2b2420;outline:none}.ability input:focus{border-color:var(--rust)}.ability strong{display:block;margin-top:4px;color:var(--rust);font-size:12px}.ability small{font-size:8px;color:#8f877f}.ability-foot{display:flex;justify-content:space-between;margin-top:13px;color:#857b70;font-size:10px}.ability-foot b{color:#42382f}.advance-strip{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #e7ded3;border-radius:7px;background:#faf7f2;padding:13px 9px}.advance-strip div{text-align:center;border-right:1px solid #e7ded3}.advance-strip div:last-child{border:0}.advance-strip small{display:block;font-size:8px;letter-spacing:.12em;color:#8c8278}.advance-strip b{display:block;font:600 22px 'Playfair Display',serif;margin-top:4px}.advance-controls{display:flex;align-items:flex-end;gap:8px;margin-top:13px;flex-wrap:wrap}.advance-controls .field{flex:1;min-width:105px}.advance-controls .button{min-height:36px}.help{font-size:10px;line-height:1.5;color:#8b8177;margin:10px 0 0}.level-history{display:flex;flex-wrap:wrap;gap:6px;margin-top:11px}.level-chip{font-size:9px;border-radius:99px;padding:5px 8px;background:#f2e9dc;color:#685342}.skill-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}.skill-toolbar input{border:1px solid #ddd4ca;border-radius:5px;padding:8px 10px;font:11px 'DM Sans';width:min(58%,230px)}.skill-toolbar span{font-size:10px;font-weight:700;color:var(--rust)}.skill-list{max-height:340px;overflow:auto;border-top:1px solid #eee8df}.skill-row{display:grid;grid-template-columns:minmax(0,1fr) 78px 45px;gap:8px;align-items:center;padding:8px 3px;border-bottom:1px solid #f0ebe4}.skill-label{font-size:11px;font-weight:600}.skill-label small{display:block;font-size:8px;color:#91877d;font-weight:400;margin-top:3px}.skill-row input{width:53px;border:1px solid #e0d8cf;border-radius:4px;padding:6px;text-align:center;font:11px 'DM Sans'}.skill-cost{text-align:right;font-size:9px;color:#8a8178}.skill-field{width:100%;margin-top:6px;padding:6px 7px;border:1px solid #e0d8cf;border-radius:4px;font:10px 'DM Sans'}.feat-slot{display:grid;grid-template-columns:145px 1fr;gap:8px;align-items:center;margin-bottom:9px}.feat-slot label{font-size:10px;color:#756b60}.feat-slot label small{display:block;margin-top:4px;font-size:8px;line-height:1.3;color:#93877b}.feat-slot select{width:100%;border:1px solid #ddd4ca;border-radius:5px;padding:8px;font:10px 'DM Sans';background:#fffefa}.feat-add{display:flex;align-items:flex-end;gap:8px;margin-top:14px}.feat-add .field{flex:1}.feat-list{margin-top:11px}.feat-card{padding:9px 10px;background:#f8f4ee;border-radius:5px;margin-top:6px;display:flex;justify-content:space-between;gap:10px}.feat-card b{font-size:10px}.feat-card small{display:block;color:#857c72;font-size:9px;margin-top:4px;line-height:1.4}.feat-card button{border:0;background:none;color:#98614d;cursor:pointer;align-self:flex-start}.sheet-section{background:#f3eee7;padding:58px clamp(24px,6vw,96px) 70px}.sheet-section>.section-head,.character-sheet,.sheet-foot{max-width:1280px;margin-left:auto;margin-right:auto}.character-sheet{background:#fffefa;border:1px solid #e4dacd;border-radius:8px;padding:28px;box-shadow:var(--shadow)}.sheet-banner{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid var(--ink);padding-bottom:16px;margin-bottom:20px}.sheet-banner h2{font:600 34px 'Playfair Display',serif;margin:0}.sheet-banner p{font-size:11px;color:#7f756b;margin:6px 0 0}.sheet-level{font:600 13px 'DM Sans';text-align:right}.sheet-level strong{display:block;font:600 30px 'Playfair Display',serif}.sheet-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:16px}.sheet-box{border:1px solid #e9e1d7;border-radius:6px;padding:13px}.sheet-box h3{font-size:9px;letter-spacing:.15em;color:#8d4e38;margin:0 0 10px}.sheet-box p{font-size:11px;line-height:1.5;margin:4px 0;color:#524940}.score-table{width:100%;border-collapse:collapse}.score-table td,.score-table th{text-align:left;border-bottom:1px solid #f0ebe5;padding:6px 4px;font-size:10px}.score-table th{color:#897e73;font-size:8px;letter-spacing:.08em}.sheet-skills,.sheet-feats{columns:2;column-gap:20px}.sheet-skills div,.sheet-feats div{font-size:9px;padding:3px 0;break-inside:avoid}.sheet-feature{font-size:9px;padding:4px 0;line-height:1.4}.sheet-foot{font-size:10px;color:#7e756b;margin-top:12px}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,15px);opacity:0;background:#29231e;color:white;padding:10px 15px;border-radius:6px;font-size:11px;transition:.2s;pointer-events:none;z-index:10}.toast.show{opacity:1;transform:translate(-50%,0)}footer{display:flex;justify-content:space-between;gap:12px;padding:20px clamp(24px,6vw,96px);background:#211d19;color:#bdb2a6;font-size:9px;letter-spacing:.06em}@media(max-width:900px){.hero{grid-template-columns:1fr 38%;gap:30px}.workspace{grid-template-columns:170px 1fr;gap:24px}.builder-grid{grid-template-columns:1fr}.sheet-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){.topbar{padding:0 16px;gap:12px}.topbar nav{display:none}.hero{grid-template-columns:1fr;padding:42px 22px;gap:23px}.hero-art{min-height:190px}.workspace{display:block;padding:38px 16px 45px}.rail{display:none}.section-head{align-items:flex-start;flex-direction:column}.section-head h2{font-size:27px}.head-actions{width:100%}.head-actions .button{flex:1}.panel{padding:17px}.field-grid{grid-template-columns:1fr 1fr}.sheet-section{padding:42px 16px}.sheet-grid{grid-template-columns:1fr}.sheet-banner h2{font-size:27px}footer{flex-direction:column}.feat-slot{grid-template-columns:110px 1fr}.sheet-skills,.sheet-feats{columns:1}}@media print{body{background:white}.topbar,.hero,.workspace,footer,.sheet-section>.section-head,.sheet-foot,.toast{display:none!important}.sheet-section{padding:0;background:white}.character-sheet{max-width:none;box-shadow:none;border:0;padding:0}.sheet-banner{padding-top:8px}.sheet-grid{grid-template-columns:1fr 1fr 1fr}.sheet-box{break-inside:avoid}@page{margin:12mm}}

/* Builder interaction refinements */
.ability-mode{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-4px 0 12px}.ability-mode span{font-size:10px;color:var(--muted)}.roll-results{padding:12px;border:1px solid var(--line);border-radius:7px;background:#faf7f2;margin-bottom:12px}.roll-results>b{display:block;font:600 14px 'Playfair Display',serif;margin-bottom:8px}.roll-chip{display:inline-flex;align-items:center;gap:5px;margin:3px 5px 6px 0;padding:6px 8px;border-radius:5px;background:#eee6dc;font-size:11px;font-weight:700}.roll-chip small{font-size:8px;font-weight:400;color:#756a5f}.roll-assign-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.roll-assign-grid label{font-size:9px;color:#655b51;display:flex;flex-direction:column;gap:4px}.roll-assign-grid select{min-width:0;padding:8px;border:1px solid #ddd4ca;border-radius:5px;background:#fffefa;font:10px 'DM Sans',sans-serif}.ability input:disabled{color:#6d6258;border-bottom-color:transparent}.skill-row{grid-template-columns:minmax(0,1fr) 128px 64px;gap:14px;min-height:57px;padding:9px 5px}.skill-stepper{display:grid;grid-template-columns:40px minmax(28px,1fr) 40px;align-items:center;gap:6px}.skill-stepper button{width:40px;height:40px;border:1px solid #d9cfc3;border-radius:6px;background:#fffefa;color:#45382e;font:600 19px 'DM Sans',sans-serif;cursor:pointer}.skill-stepper button:hover:not(:disabled){border-color:var(--rust);color:var(--rust);background:#fbf2ea}.skill-stepper button:disabled{opacity:.35;cursor:not-allowed}.skill-stepper output{text-align:center;font-size:12px;font-weight:700}.skill-cost{text-align:center}.equipment-add{display:grid;grid-template-columns:minmax(0,1fr) 70px auto;gap:10px;align-items:end}.equipment-add .field{min-width:0}.equipment-add .button{min-height:38px}.equipment-info{font-size:10px;line-height:1.5;color:#786e64;background:#f8f4ee;border-radius:5px;padding:9px 10px;margin-top:9px}.custom-gear{margin-top:12px;font-size:10px;color:var(--rust-dark)}.custom-gear summary{cursor:pointer}.custom-equipment{grid-template-columns:minmax(0,1fr) 100px 100px auto;margin-top:9px}.equipment-list{margin-top:12px;border-top:1px solid var(--line)}.equipment-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 3px;border-bottom:1px solid #f0ebe4}.equipment-row b{font-size:11px}.equipment-row small{display:block;color:#8a8076;font-size:9px;margin-top:3px;line-height:1.4}.equipment-row button{border:0;background:transparent;color:#98614d;cursor:pointer;font:600 10px 'DM Sans',sans-serif}.completion-message{max-width:1280px;margin:-8px auto 13px;padding:10px 13px;background:#f5e9dd;border:1px solid #ead5c2;border-radius:6px;color:#794129;font-size:11px;line-height:1.45}.completion-message.is-ready{background:#eaf1e7;border-color:#d8e5d3;color:#42603b}.builder-grid>.equipment-panel{grid-column:1/-1}
@media(max-width:650px){.roll-assign-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.skill-row{grid-template-columns:minmax(0,1fr) 118px;gap:9px}.skill-cost{grid-column:1/-1;text-align:left;padding-left:2px}.equipment-add,.custom-equipment{grid-template-columns:minmax(0,1fr) 72px}.equipment-add>.button{grid-column:1/-1}.builder-grid>.equipment-panel{grid-column:auto}}
.skill-group-title{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;gap:8px;margin:0;padding:9px 7px;background:#f3eee7;border-bottom:1px solid #e4dbd0;color:#59483a;font-size:9px;letter-spacing:.1em}.skill-group-title small{font-size:8px;letter-spacing:0;font-weight:500;color:#81766b}.custom-gear{margin-top:15px;padding:12px;border:1px solid #eee6dc;border-radius:6px;background:#fffefa}.custom-gear h4{font:600 14px 'Playfair Display',serif;margin:0 0 4px;color:#43362d}.custom-gear .help{margin:0 0 9px}.custom-equipment{margin-top:0}
.starting-package{padding:13px;background:#f7f2eb;border:1px solid #e9dfd3;border-radius:7px}.starting-package .field{max-width:620px}.starting-package select{width:100%}.equipment-subhead{margin:18px 0 8px;font:600 14px 'Playfair Display',serif;color:#43362d}

/* Hyborian character workshop visual identity */
:root{
  --ink:#28211a;
  --muted:#786b5d;
  --line:#d9c6a6;
  --paper:#fff9ec;
  --wash:#efe1c7;
  --rust:#8e2f1f;
  --rust-dark:#642115;
  --gold:#c89b4f;
  --shadow:0 12px 32px #39241418;
  background:#eee0c5;
  color:var(--ink);
}
body{
  background:radial-gradient(ellipse at 50% 5%,#faf1df 0,#f1e5d0 48%,#e9d8bb 100%);
}
.topbar{
  position:relative;
  z-index:2;
  color:#f7ecd9;
  background:#211b17;
  border-bottom:3px solid #9c6930;
  box-shadow:0 3px 14px #20150f38;
}
.brand{color:#fff4df}
.brand-mark{border-radius:3px;background:#973b25;color:#fff0d5;box-shadow:inset 0 0 0 1px #e0b86f;font-family:Georgia,serif}
.brand small{color:#c7ad87}
.topbar nav a{color:#d7c5aa}
.topbar nav a:hover{color:#f4c778}
.save-state{color:#d6b56f}
.hero{
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  min-height:470px;
  padding:64px clamp(24px,9vw,142px);
  overflow:hidden;
  background:#35251b url('../assets/khoraja-hero.png') center 54%/cover no-repeat;
  border-bottom:5px solid #9c6930;
}
.hero::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:linear-gradient(90deg,#1d1713ed 0%,#241913d9 33%,#38221691 58%,#24161025 100%),linear-gradient(0deg,#1b1510a6,transparent 42%);
}
.hero-copy-block{max-width:660px}
.hero .eyebrow{color:#e0b66b;letter-spacing:.24em}
.hero h1{max-width:640px;color:#fff3dd;text-shadow:0 3px 16px #160f0bd9;font-family:Georgia,'Times New Roman',serif;font-weight:700;letter-spacing:-.035em}
.hero-copy{max-width:550px;color:#f0dfc2;text-shadow:0 1px 6px #160f0b;font-size:15px}
.button{border-radius:3px;letter-spacing:.015em}
.button-light{background:#e7c27d;color:#2a1b12;border-color:#f2d696;box-shadow:0 3px 10px #140e0a44}
.button-light:hover{background:#f1d394}
.button-quiet{color:#fff1d9;border-color:#c59a5f;background:#21160c55}
.button-quiet:hover{background:#472b19}
.button-dark{background:#8d3020;border-color:#6f261a;box-shadow:inset 0 1px #ffffff2b}
.button-dark:hover{background:#672317}
.button-outline{background:#fff9ec;color:#483525;border-color:#bda47d}
.button-outline:hover{background:#f3e5c9;border-color:#9d7445}
.workspace{padding-top:48px}
.rail .eyebrow,.section-head .eyebrow{color:#91512d}
.step>span{border-radius:3px;background:#f9eed9;border-color:#c9ad7d}
.step.active>span{border-color:#8e2f1f;background:#8e2f1f;color:#fff2d6}
.step:after{background:#c9b48e}
.rail-note{border:1px solid #d3bd94;border-radius:3px;background:#e8d7b7;box-shadow:inset 0 1px #fff8e9}
.progress{background:#d2bd98;border-radius:2px}
.progress i{background:#8e2f1f}
.section-head h2,.panel-title h3,.equipment-subhead,.custom-gear h4{font-family:Georgia,'Times New Roman',serif}
.section-head h2{color:#36261b}
.panel{border-color:#ddc9a6;border-radius:4px;background:linear-gradient(145deg,#fffaf0,#fff6e5);box-shadow:0 6px 20px #38241212,inset 0 1px #ffffff}
.panel-title{padding-bottom:12px;border-bottom:1px solid #eadcc1}
.number{border-radius:3px;background:#ead7b2;color:#772a1d;box-shadow:inset 0 0 0 1px #d5ba8a}
.field{color:#594630}
.field input,.field select,.field textarea,.skill-toolbar input,.skill-row input,.skill-field,.feat-slot select,.race-choice-row select{
  border-color:#d1bd99;
  border-radius:3px;
  background-color:#fffdf7;
}
.field input:focus,.field select:focus,.field textarea:focus,.skill-toolbar input:focus,.skill-row input:focus,.skill-field:focus,.feat-slot select:focus,.race-choice-row select:focus{
  border-color:#a65b31;
  box-shadow:0 0 0 3px #a65b311c;
}
.race-note,.roll-results,.equipment-info{background:#f2e6cf;border:1px solid #e0cfad;border-radius:3px;color:#67533b}
.race-choice-block,.starting-package,.custom-gear{border-color:#dfcba6;border-radius:3px;background:#f9efd9}
/* Keep controls and helper copy comfortable to read on desktop and mobile. */
.field{font-size:14px;line-height:1.5}
.field input,.field select,.field textarea,.skill-toolbar input,.skill-row input,.skill-field,.feat-slot select,.race-choice-row select{font-size:16px;line-height:1.4;min-height:44px;padding:10px 12px}
.field small,.help,.race-choice-block p,.race-choice-row label,.feat-slot label,.equipment-info,.equipment-row small,.skill-label small{font-size:13px;line-height:1.55}
.race-choice-block h4,.skill-group-title{font-size:15px}
.button,.equipment-row button,.skill-stepper button{font-size:14px}
.skill-row{font-size:15px}
.skill-stepper output{font-size:16px}
.sorcery-panel{grid-column:1/-1}
.sorcery-power-summary{padding:12px 14px;background:#f3e7cf;border:1px solid #dfcba6;border-radius:4px;font-weight:700;font-size:16px}
.sorcery-panel .race-choice-block{margin:12px 0;padding:14px}
.sorcery-style-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:7px;margin-top:12px}
.sorcery-style{display:flex;align-items:center;gap:9px;padding:9px 11px;background:#fffdf7;border:1px solid #e3d3b7;border-radius:4px;font-size:14px;cursor:pointer}
.sorcery-style input{width:18px;height:18px;accent-color:var(--rust)}
#knownSpellChoices{min-height:260px;font-size:15px;line-height:1.6}
.choice-chip,.roll-chip,.level-chip{border-radius:2px;background:#ead9b8;color:#61432b}
.ability{border-color:#dfcba6;border-radius:3px;background:#f8efdD}
.ability input{color:#312218}
.ability strong,.skill-toolbar span{color:#8e2f1f}
.advance-strip{border-color:#d8c29a;border-radius:3px;background:#f5e9d2}
.advance-strip div{border-color:#d8c29a}
.skill-list{border-top-color:#ddc9a6}
.skill-row,.equipment-row{border-bottom-color:#e5d6ba}
.skill-stepper button{border-color:#cbb48c;border-radius:3px;background:#fff9eb}
.skill-stepper button:hover:not(:disabled){border-color:#8e2f1f;background:#f4e4cb;color:#8e2f1f}
.skill-group-title{background:#e9d8b6;border-bottom-color:#d7c29b;color:#51371f}
.feat-card{border:1px solid #e5d3b1;border-radius:3px;background:#f4e8d1}
.equipment-subhead{color:#56361f}
.sheet-section{background:#e6d4b2;border-top:1px solid #d0b78b}
.character-sheet{border-color:#cfb58a;border-radius:3px;background:#fffaee;box-shadow:0 10px 26px #38241218}
.sheet-banner{border-color:#553923}
.sheet-box{border-color:#decba8;border-radius:3px;background:#fffdf6}
.sheet-box h3{color:#873b25}
.score-table td,.score-table th{border-color:#eadfc9}
.completion-message{border-radius:3px}
.toast{border:1px solid #b98d50;border-radius:3px;background:#241a14}
footer{border-top:3px solid #95672f;background:#211b17;color:#c9b99f}
@media(max-width:900px){
  .hero{min-height:430px;padding:56px clamp(24px,6vw,72px)}
  .hero::before{background:linear-gradient(90deg,#1d1713ed 0%,#241913d8 48%,#38221671 100%),linear-gradient(0deg,#1b1510a6,transparent 42%)}
}
@media(max-width:650px){
  .hero{min-height:430px;padding:48px 22px;background-position:58% center}
  .hero::before{background:linear-gradient(90deg,#1d1713e8 0%,#241913c7 72%,#38221672 100%),linear-gradient(0deg,#1b1510b0,transparent 50%)}
  .hero-copy{font-size:14px}
  .hero-actions{align-items:stretch;flex-wrap:wrap}
  .hero-actions .button{min-height:42px}
  .panel{box-shadow:0 4px 14px #38241212}
}

/* Dark, slate-and-ember character sheet theme inspired by the supplied reference. */
:root{
  color-scheme:dark;
  --ink:#edf0f2;
  --muted:#aab4bd;
  --line:#46535e;
  --paper:#242e37;
  --wash:#171e24;
  --rust:#f08a35;
  --rust-dark:#c85b25;
  --gold:#e4a956;
  --green:#88b58a;
  --shadow:0 12px 34px #05090d66;
  color:var(--ink);
  background:#141a20;
}
body{background:#141a20;color:var(--ink)}
.topbar{background:#11171d;border-bottom:1px solid #34414c;color:#edf0f2}
.brand,.brand small,.topbar nav a{color:#d6dce1}
.brand-mark{background:#e27a2d;color:#171c20;border-radius:4px}
.topbar nav a:hover{color:#ffad5e}
.save-state{color:#9fc69d}
.hero{background-color:#202930}
.hero::before{background:linear-gradient(90deg,#141a20f2 0%,#1b232ad9 48%,#242a2b66 100%),linear-gradient(0deg,#12181bc2,transparent 55%)}
.hero .eyebrow,.rail .eyebrow,.section-head .eyebrow{color:#f2a252}
.hero-copy{color:#d1d7dc}
.button-light{background:#f3a34e;color:#1b2024}
.button-quiet{color:#f1e8dc;border-color:#a66f42;background:#11182075}
.button-quiet:hover{background:#633a21}
.button-dark{background:#d96b2b;border-color:#ad5124;color:#fff7ee;box-shadow:inset 0 1px #ffffff26}
.button-dark:hover{background:#b95324}
.button-outline{background:#2a3640;color:#e8edf0;border-color:#586774}
.button-outline:hover{background:#36444f;border-color:#e18a43}
.workspace{background:#171e24;gap:34px}
.step{color:#a6b0b8}
.step:after{background:#46535d}
.step>span{background:#202a33;border-color:#586671;color:#d9e0e4;border-radius:4px}
.step.active>span{background:#e27a2d;border-color:#ffad5e;color:#1b2024}
.step b{color:#edf0f2}
.step small,.rail-note>span{color:#aab4bd}
.rail-note{background:#222d36;border:1px solid #45535e;border-radius:5px;box-shadow:inset 0 1px #ffffff08;color:#f3f4f5}
.rail-note strong{color:#f4a14c}
.progress{background:#46535e}
.progress i{background:#f08a35}
.section-head h2{color:#f3f0eb}
.panel{background:linear-gradient(145deg,#28333d,#202a33);border-color:#46535e;border-radius:5px;box-shadow:0 8px 24px #05090d52,inset 0 1px #ffffff08}
.panel-title{border-bottom:1px solid #394752;padding-bottom:12px}
.panel-title h3{color:#f0ede7}
.panel-title p,.field,.help,.race-choice-row label,.feat-slot label{color:#b9c2c9}
.number{background:#394752;color:#ffad5e;border-radius:4px;box-shadow:inset 0 0 0 1px #53616c}
.field input,.field select,.field textarea,.skill-toolbar input,.skill-row input,.skill-field,.feat-slot select,.race-choice-row select,.equipment-add select,.equipment-add input{
  color:#edf1f3;background-color:#172028;border-color:#53616c;border-radius:4px;
}
.field input::placeholder,.field textarea::placeholder,.skill-toolbar input::placeholder{color:#8e9ba5}
.field input:focus,.field select:focus,.field textarea:focus,.skill-toolbar input:focus,.skill-row input:focus,.skill-field:focus,.feat-slot select:focus,.race-choice-row select:focus{
  border-color:#f08a35;box-shadow:0 0 0 3px #f08a3529;
}
.field select option,.feat-slot select option,.race-choice-row select option{background:#1d272f;color:#f0f2f4}
.field small,.help,.race-choice-block p,.equipment-row small,.skill-label small{color:#a2adb6}
.race-note,.roll-results,.equipment-info{background:#1d2831;border:1px solid #43515d;border-radius:4px;color:#cbd3d9}
.race-choice-block,.starting-package,.custom-gear{background:#202b34;border-color:#46545f;border-radius:4px;color:#e8ecef}
.race-choice-block h4,.custom-gear h4,.equipment-subhead{color:#f2a252}
.choice-chip,.roll-chip,.level-chip{background:#384650;color:#f0c18e;border:1px solid #4b5b66;border-radius:3px}
.ability{background:#1c2730;border-color:#47545f;border-radius:4px}
.ability label,.ability small,.ability-foot{color:#aab5bd}
.ability input{color:#f4f0e9;border-color:#65727c}
.ability strong,.skill-toolbar span{color:#ffab57}
.ability-foot b{color:#edf1f3}
.advance-strip{background:#1b262e;border-color:#4b5963;border-radius:4px;color:#edf0f2}
.advance-strip div{border-color:#4b5963}
.advance-strip small{color:#aab4bd}
.advance-strip b{color:#f4a14c}
.skill-list{border-top-color:#46535e;scrollbar-color:#596975 #202a33}
.skill-row,.equipment-row{border-bottom-color:#3d4a54;color:#e8edf0}
.skill-label{color:#e7ecef}
.skill-cost{color:#a8b2ba}
.skill-stepper button{background:#2d3943;border-color:#53616d;color:#edf0f2}
.skill-stepper button:hover:not(:disabled){background:#4a3426;border-color:#f08a35;color:#ffb56c}
.skill-stepper button:disabled{color:#76838c}
.skill-group-title{background:#303d47;border-bottom-color:#4b5963;color:#f3a252}
.feat-card{background:#1c2730;border-color:#47545f;border-radius:4px;color:#edf0f2}
.feat-card small{color:#aab4bd}
.feat-card button{color:#ffad75}
.sorcery-power-summary{background:#1a252e;border-color:#495762;color:#f0c18e}
.sorcery-panel .race-choice-block{background:#1d2831}
.sorcery-style{background:#172129;border-color:#46545f;color:#e5eaed}
.sheet-section{background:#151c22;border-top:1px solid #3e4b55}
.sheet-section .section-head h2{color:#f3f0eb}
.character-sheet{background:#202a33;border-color:#4a5863;border-radius:5px;box-shadow:0 12px 30px #05090d66;color:#e9edf0}
.sheet-banner{border-color:#e17c32}
.sheet-banner h2{color:#f3efe8}
.sheet-banner p,.sheet-foot{color:#aab4bd}
.sheet-level{color:#c4ccd1}
.sheet-level strong{color:#f2a252}
.sheet-box{background:#19232b;border-color:#46545f;border-radius:4px}
.sheet-box h3{color:#f2a252}
.sheet-box p{color:#d3d9dd}
.score-table td,.score-table th{border-color:#3c4953;color:#e3e8eb}
.score-table th{color:#aab4bd}
.sheet-skills div,.sheet-feats div,.sheet-feature{color:#dbe1e5}
.completion-message{color:#d4e9d0}
.toast{background:#11181e;border-color:#db8841;color:#f5eee5}
footer{border-top:2px solid #d97831;background:#10161b;color:#b8c2c9}
input[type=checkbox],input[type=radio]{accent-color:#ed8c3c}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #ffae5d;outline-offset:2px}
@media(max-width:900px){.workspace{background:#171e24}.hero::before{background:linear-gradient(90deg,#141a20f2 0%,#1b232ad9 58%,#242a2b66 100%),linear-gradient(0deg,#12181bc2,transparent 55%)}}
@media(max-width:650px){.hero::before{background:linear-gradient(90deg,#141a20ee 0%,#1b232ad9 72%,#242a2b66 100%),linear-gradient(0deg,#12181bc2,transparent 55%)}.panel{box-shadow:0 5px 16px #05090d55,inset 0 1px #ffffff08}}

/* Foundry parchment palette, approved 2026-10-12. Visual-only override. */
:root{color-scheme:light;--ink:#35271d;--muted:#705b46;--line:#bfa779;--paper:#f2e2bf;--wash:#e1c99d;--rust:#671d17;--rust-dark:#46120f;--gold:#bb904e;--green:#536c43;--shadow:0 7px 20px #38241224;color:var(--ink);background:#dfcaa3}
body{background:linear-gradient(160deg,#e9d8b7,#d8be91);color:var(--ink)}
.topbar{background:#242320;border-bottom:3px solid #a78348;color:#f5e7c9}
.brand,.topbar nav a{color:#f5e7c9}.brand small{color:#d2b78a}.brand-mark{background:#671d17;color:#f8e8c6;border:1px solid #b48c50}.topbar nav a:hover{color:#f0cb86}.save-state{color:#e6c786}
.hero{background-color:#2b2119}.hero::before{background:linear-gradient(90deg,#1e1813f2 0%,#281c16d8 45%,#3824174d 100%),linear-gradient(0deg,#211710b8,transparent 55%)}
.hero .eyebrow,.rail .eyebrow,.section-head .eyebrow{color:#874122}.hero h1{color:#fff1d2}.hero-copy{color:#f1ddba}
.button-light{background:#e9c27d;color:#2c2118;border-color:#b8914d}.button-light:hover{background:#f5d69c}.button-quiet{background:#241b16a8;border-color:#d2ad71;color:#f7e8c8}.button-quiet:hover{background:#4b3327}
.button-dark{background:#671d17;color:#fff0d2;border-color:#46120f}.button-dark:hover{background:#4b1511}.button-outline{background:#f8edda;color:#4a2b20;border-color:#a98c5e}.button-outline:hover{background:#eddbb9}
.workspace{background:transparent}.rail-note{background:#e5d0a9;border:1px solid #bfa272;color:#382a1c}.rail-note>span,.step small{color:#6e5945}.step,.step b{color:#4a392b}.step>span{background:#f0dfbc;border-color:#bda172;color:#583825}.step.active>span{background:#671d17;color:#fff1d2;border-color:#671d17}.step:after{background:#bfa779}.progress{background:#c8af83}.progress i{background:#671d17}
.section-head h2{color:#3c251a}.panel{background:linear-gradient(145deg,#f4e6c7,#ead5ac);border:1px solid #b99b68;box-shadow:0 7px 22px #3e291c24,inset 0 1px #fff8e6;border-radius:4px;color:#34271c}.panel-title{border-bottom:1px solid #cbb18a}.panel-title h3{color:#44291e}.panel-title p,.field,.help,.race-choice-row label,.feat-slot label{color:#65513d}.number{background:#671d17;color:#f8e6be;box-shadow:inset 0 0 0 1px #aa7952}
.field input,.field select,.field textarea,.skill-toolbar input,.skill-row input,.skill-field,.feat-slot select,.race-choice-row select,.equipment-add select,.equipment-add input{background:#fff9e9;border:1px solid #bda57e;color:#34271c;border-radius:3px}.field input::placeholder,.field textarea::placeholder,.skill-toolbar input::placeholder{color:#94826e}.field select option,.feat-slot select option,.race-choice-row select option{background:#fff9e9;color:#34271c}.field input:focus,.field select:focus,.field textarea:focus,.skill-toolbar input:focus,.skill-row input:focus,.skill-field:focus,.feat-slot select:focus,.race-choice-row select:focus{border-color:#8e422c;box-shadow:0 0 0 3px #8e422c25}
.field small,.help,.race-choice-block p,.equipment-row small,.skill-label small{color:#75624e}.race-note,.roll-results,.equipment-info{background:#e6d0a7;border-color:#c7a875;color:#5c422d}.race-choice-block,.starting-package,.custom-gear{background:#f1dfbc;border-color:#c6a876;color:#38281b}.race-choice-block h4,.custom-gear h4,.equipment-subhead{color:#671d17}.choice-chip,.roll-chip,.level-chip{background:#e3c999;color:#543722;border:1px solid #c5a470}
.ability{background:#f4e4c4;border-color:#bfa174}.ability label,.ability small,.ability-foot{color:#75614b}.ability input{color:#352318;border-color:#bca071}.ability strong,.skill-toolbar span{color:#75251a}.ability-foot b{color:#36271a}.advance-strip{background:#ebd5ac;border-color:#c5a675;color:#34271c}.advance-strip div{border-color:#c5a675}.advance-strip small{color:#6f5b46}.advance-strip b{color:#671d17}
.skill-list{border-top-color:#c5a77d;scrollbar-color:#b49a70 #eedbb6}.skill-row,.equipment-row{border-bottom-color:#d1b88e;color:#382a1f}.skill-label{color:#382a1f}.skill-cost{color:#78614a}.skill-stepper button{background:#f8e9c9;border-color:#b99c70;color:#482e20}.skill-stepper button:hover:not(:disabled){background:#ead2a7;border-color:#671d17;color:#671d17}.skill-stepper button:disabled{color:#9c886c}.skill-group-title{background:#dcc49a;border-bottom-color:#b99b6f;color:#56281e}.feat-card{background:#f2dfbc;border-color:#c5a578;color:#38291f}.feat-card small{color:#78634d}.feat-card button{color:#7a281c}.sorcery-power-summary{background:#e8d1a5;border-color:#bea071;color:#5a2a1e}.sorcery-panel .race-choice-block{background:#f0ddb7}.sorcery-style{background:#fbefd5;border-color:#c4a67b;color:#493323}
.sheet-section{background:#ddc397;border-top:1px solid #ad8b57}.sheet-section .section-head h2{color:#42281d}.character-sheet{background:#f0dfbd;border-color:#b99b6b;box-shadow:0 10px 24px #38241224;color:#38291e}.sheet-banner{border-color:#671d17}.sheet-banner h2{color:#4b1b15}.sheet-banner p,.sheet-foot,.sheet-level{color:#6e5740}.sheet-level strong{color:#671d17}.sheet-box{background:#f8eacc;border-color:#c7aa7c}.sheet-box h3{color:#671d17}.sheet-box p{color:#493626}.score-table td,.score-table th{border-color:#d1b78b;color:#3b2b1e}.score-table th{color:#765b41}.sheet-skills div,.sheet-feats div,.sheet-feature{color:#483525}
.completion-message{background:#f2dfbc;border-color:#b99b70;color:#6b2d21}.completion-message.is-ready{background:#e4e9d3;color:#39502e;border-color:#9eae8a}.toast{background:#24211c;border-color:#ba9458;color:#f8e9cd}footer{background:#24211e;border-top:3px solid #a5834e;color:#e4d0a9}input[type=checkbox],input[type=radio]{accent-color:#671d17}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #8e422c;outline-offset:2px}
@media(max-width:900px){.workspace{background:transparent}.hero::before{background:linear-gradient(90deg,#1e1813f2 0%,#281c16d8 58%,#3824174d 100%)}}
@media(max-width:650px){.hero::before{background:linear-gradient(90deg,#1e1813ed 0%,#281c16d8 72%,#3824174d 100%)}.panel{box-shadow:0 5px 16px #3e291c24}}

/* Race and language workshop, Foundry-inspired visual treatment */
.race-explorer{margin-top:18px;border:2px solid #a47743;border-radius:4px;background:#201c19;color:#f3e3c5;overflow:hidden}
.race-explorer-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 17px;background:linear-gradient(110deg,#641b16,#331411);border-bottom:2px solid #bb9054}
.race-explorer-heading strong{display:block;font:700 22px Georgia,serif;color:#f5dfb5}
.race-explorer-heading small{display:block;color:#e5caa0;margin-top:4px;font-size:12px}
.race-search-label{font-size:12px;color:#f5dfb5;min-width:190px}.race-search-label input{display:block;width:100%;margin-top:5px;padding:10px;background:#fff7e6;color:#261d16;border:1px solid #a88b62;border-radius:3px;font-size:15px}
.race-explorer-layout{display:grid;grid-template-columns:minmax(155px,35%) minmax(0,1fr);min-height:340px}
.race-explorer-list{max-height:365px;overflow-y:auto;scrollbar-color:#95683f #241f1b;border-right:2px solid #8d683f}
.race-explorer-option{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;padding:12px 14px;border:0;border-bottom:1px solid #514238;background:#211f1d;color:#f4e5ca;text-align:left;font:600 15px Georgia,serif;cursor:pointer}
.race-explorer-option small{font:400 11px Arial,sans-serif;color:#c9ab83}
.race-explorer-option:hover,.race-explorer-option:focus-visible{background:#453029;outline:2px solid #c79a56;outline-offset:-2px}
.race-explorer-option.is-selected{background:#78221c;box-shadow:inset 4px 0 #e1b56b;color:#fff5dd}
.race-explorer-detail{background:#f3e3c2;color:#31241c;padding:17px;min-width:0}
.race-detail-title{background:#671e18;color:#f8e9c9;padding:11px 13px;margin:-17px -17px 14px}
.race-detail-title small{color:#e4bc79;font-size:11px}.race-detail-title h4{font:700 24px Georgia,serif;margin:4px 0 0}
.race-detail-data{display:grid;grid-template-columns:minmax(95px,34%) 1fr;gap:9px 12px;font-size:13px;line-height:1.45;margin:0}
.race-detail-data dt{font-weight:700;color:#70251b}.race-detail-data dd{margin:0;overflow-wrap:anywhere}
.race-detail-caption{font-size:11px;line-height:1.5;border-top:1px solid #c6aa7c;padding-top:10px;color:#70583c}
.race-explorer-empty{padding:12px;color:#f2dfbd}
@media(max-width:700px){.race-explorer-heading{flex-direction:column;align-items:stretch}.race-explorer-layout{grid-template-columns:minmax(125px,40%) minmax(0,1fr)}.race-explorer-option{font-size:13px;padding:10px}.race-explorer-detail{padding:12px}.race-detail-title{margin:-12px -12px 12px}.race-detail-data{grid-template-columns:1fr;gap:3px}.race-detail-data dd{margin-bottom:7px}}

/* v8 feat reference summaries */
.feat-reference{margin-top:10px;padding:11px 13px;border:1px solid rgba(130,95,58,.35);border-radius:8px;line-height:1.6;background:rgba(150,110,65,.08)}
.feat-reference small{display:block;opacity:.78;margin-top:3px}

/* v9: keep feat information readable across the full selection panel */
.feat-slot > .feat-reference{grid-column:1 / -1;width:100%;min-width:0;box-sizing:border-box;margin-top:2px;padding:12px 15px;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.feat-slot > .feat-reference small{font-size:12px;line-height:1.5}
.feat-slot > .feat-special,.feat-slot > .feat-approval,.feat-slot > .feat-invalid{grid-column:1 / -1}
@media(max-width:650px){.feat-slot > .feat-reference{font-size:14px}}

/* v10: Foundry-inspired Concept screen. Other stages retain their current working UI. */
.foundry-step-tabs{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;margin:0 0 16px;padding:5px;background:#b89a6c;border:1px solid #8f6e46;border-radius:5px}
.foundry-step-tabs span{padding:10px 3px;text-align:center;background:#352820;color:#f5e5c9;font:700 12px Georgia,serif;border-radius:4px;white-space:nowrap}
.foundry-step-tabs .selected{background:#8c2b20;box-shadow:inset 0 0 0 2px #c79658}
.concept-panel{margin-bottom:20px}.concept-panel .panel-title h3{font-size:25px}
.concept-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(250px,1fr);gap:17px;margin-top:15px}
.concept-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.concept-fields .field{min-width:0}.concept-fields .field:nth-child(2){grid-row:span 2}.concept-fields input,.concept-fields textarea,.concept-fields select{width:100%;box-sizing:border-box;font-size:16px;padding:11px}
.concept-inspiration{margin-top:18px;padding:14px;border:1px solid #c6a777;background:#f3e2bf;border-radius:5px}
.concept-inspiration h4,.concept-hero h4{font:700 20px Georgia,serif;color:#6d281c;margin:0 0 6px;border-bottom:1px solid #b99563;padding-bottom:7px}
.concept-inspiration p,.concept-hero p{font-size:13px;line-height:1.5;color:#5c4430}
.concept-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}
.concept-cards button{cursor:pointer;min-height:94px;background:#ecd2a6;border:1px solid #c5a273;border-radius:5px;padding:12px 6px;color:#482b1e}
.concept-cards button:hover{background:#e2be87;border-color:#8c2b20}.concept-cards b{display:block;font:700 17px Georgia,serif}.concept-cards small{display:block;margin-top:7px;font-size:11px;line-height:1.4}
.concept-hero{background:#f2deba;border:1px solid #c5a273;border-radius:5px;overflow:hidden}.concept-hero img{display:block;width:100%;height:250px;object-fit:cover}.concept-hero>div{padding:14px}
.concept-footer{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:12px;border-top:1px solid #b89a6c;font:700 15px Georgia,serif}.concept-footer button{min-width:220px}
@media(max-width:1100px){.foundry-step-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.concept-layout{grid-template-columns:1fr}.concept-hero{display:grid;grid-template-columns:35% 1fr}.concept-hero img{height:100%;min-height:180px}}
@media(max-width:650px){.foundry-step-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.concept-fields{grid-template-columns:1fr}.concept-fields .field:nth-child(2){grid-row:auto}.concept-cards{grid-template-columns:repeat(2,1fr)}.concept-hero{display:block}.concept-hero img{height:190px}}

/* v11 wizard: one active screen at a time, without changing page zoom */
body.wizard-ready .workspace .rail{display:none}
body.wizard-ready .workspace{display:block;max-width:1240px;margin-left:auto;margin-right:auto}
body.wizard-ready .builder-main{width:100%;min-width:0}
body.wizard-ready .builder-grid{display:block}
body.wizard-ready .builder-grid>.panel,body.wizard-ready .concept-panel{display:none!important}
body.wizard-ready [data-wizard-visible="true"]{display:block!important}
body.wizard-ready .sheet-section{display:none}
body.wizard-ready.wizard-review .sheet-section{display:block;max-width:1240px;margin-left:auto;margin-right:auto}
body.wizard-ready .foundry-step-tabs button{padding:10px 3px;text-align:center;background:#352820;color:#f5e5c9;font:700 12px Georgia,serif;border:0;border-radius:4px;cursor:pointer}
body.wizard-ready .foundry-step-tabs button.selected{background:#8c2b20;box-shadow:inset 0 0 0 2px #c79658}
body.wizard-ready .foundry-step-tabs button:focus-visible{outline:3px solid #dfad6a}
.wizard-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 25px;padding:12px;border:1px solid #b99563;background:#f0ddb8;border-radius:5px;color:#5a241a}
.wizard-footer button{min-width:160px}
body.wizard-ready .concept-footer{display:none}
@media(max-width:650px){.wizard-footer button{min-width:85px}}

/* v12: creator-first layout, removing the landing-page chrome. */
body.wizard-ready .topbar,
body.wizard-ready .hero{display:none!important}
body.wizard-ready .workspace{padding-top:18px;padding-bottom:28px}
body.wizard-ready .builder-main>.section-head{justify-content:flex-end;margin:0 0 10px;padding:0;border:0;min-height:0}
body.wizard-ready .builder-main>.section-head>div:first-child{display:none}
body.wizard-ready .builder-main>.section-head .head-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;width:auto;margin:0}
body.wizard-ready .builder-main>.section-head .head-actions .button{flex:none}
body.wizard-ready .foundry-step-tabs{margin-top:0}
@media(max-width:650px){body.wizard-ready .workspace{padding:12px 12px 24px}body.wizard-ready .builder-main>.section-head .head-actions{width:100%;justify-content:center}body.wizard-ready .builder-main>.section-head .head-actions .button{flex:1}}

/* v13: active wizard panel must outrank the hidden-panel selector. */
body.wizard-ready .builder-grid > .panel[data-wizard-visible="true"],
body.wizard-ready .concept-panel[data-wizard-visible="true"]{display:block!important}

/* v14: ability scores and rolled assignment clarity */
.abilities-panel .ability-grid{gap:12px}
.abilities-panel .ability{min-height:128px;padding:17px 12px;border:1px solid #c6a577;background:#f4e2bf;border-radius:5px}
.abilities-panel .ability label{font-size:11px;color:#6b3322;letter-spacing:.09em;margin-bottom:8px}
.abilities-panel .ability input{font-size:30px;line-height:1.2;width:72px;color:#3e241c;border-bottom:2px solid #ad8a61}
.abilities-panel .ability input:disabled{opacity:1;-webkit-text-fill-color:#3e241c}
.abilities-panel .ability-total{font-size:18px;margin-top:8px;color:#79291e}
.abilities-panel .ability-total span{font-weight:700}
.abilities-panel .ability small{display:block;font-size:10px;margin-top:4px;color:#765a44}
.abilities-panel .ability.ability-assigned{border:2px solid #77512d;background:#f1dfb8}
.abilities-panel .ability.ability-pending{border:2px dashed #ae6d50;background:#fae9cf}
.abilities-panel .ability-state{display:block;font-size:11px;font-weight:700;margin-top:8px;color:#783020}
.abilities-panel .ability-assigned .ability-state{color:#4b5932}
.roll-results{margin:14px 0 18px;padding:16px;border:1px solid #bc9870;background:#f4e3c5;border-radius:5px}
.roll-pool-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;color:#5b2a1d}
.roll-progress{font-size:12px;font-weight:700}
.roll-pool{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.roll-chip{display:flex;flex-direction:column;gap:3px;align-items:center;text-align:center;padding:10px 5px;border:1px solid #b88c60;border-radius:5px;background:#fff2d9;min-width:0}
.roll-chip b{font-size:25px;color:#6c261b}
.roll-chip span{font-size:11px;font-weight:700}
.roll-chip small{font-size:9px;line-height:1.35;color:#665142}
.roll-chip-used{background:#e1d6bb;border-color:#7e8366}
.roll-chip-used b{color:#54633b}
.roll-help{font-size:12px;color:#624b37;margin:12px 0}
.roll-assign-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.roll-assign-grid label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:700;color:#5e2c1f}
.roll-assign-grid select{width:100%;min-width:0;background:#fff9e9;border:1px solid #bb9870;border-radius:4px;padding:9px;font-size:12px}
@media(max-width:720px){.roll-pool{grid-template-columns:repeat(3,minmax(0,1fr))}.roll-assign-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v15: accessible click-to-assign rolled scores */
.roll-chip{font-family:inherit;cursor:pointer}
.roll-chip-free:hover,.roll-chip-free:focus-visible{border-color:#8d291c;box-shadow:0 0 0 2px #8d291c55}
.roll-chip-used{opacity:.62}
.roll-chip-selected,.roll-chip-selected.roll-chip-used{opacity:1;border:3px solid #8d291c;background:#f5d7a7;box-shadow:0 0 0 2px #f8e5c7 inset}
.abilities-panel .ability[data-ability-target]{cursor:pointer}
.abilities-panel .ability-click-target:hover,.abilities-panel .ability-click-target:focus-visible{border-color:#8d291c;background:#f8d9ae;outline:2px solid #8d291c;outline-offset:1px}
.ability-placeholder{font-size:30px;line-height:1.2;min-height:37px;color:#8d6955}
.roll-dice-details{font-size:12px;color:#674734;margin:12px 0}
.roll-dice-details summary{cursor:pointer;font-weight:700}
.roll-dice-details p{margin:4px 0}
.roll-progress{max-width:65%;text-align:right;line-height:1.4}

/* v16: Foundry character-sheet palette for Step 2; presentation only. */
.abilities-panel .panel-title{border-bottom:2px solid #8b3525;padding-bottom:13px}
.abilities-panel .ability-grid{gap:13px}
.abilities-panel .ability{position:relative;overflow:hidden;padding:0 12px 15px;min-height:157px;background:#f2dfb8;border:2px solid #623b2a;border-radius:5px;box-shadow:0 3px 0 #7e573222}
.abilities-panel .ability label{display:block;margin:0 -12px 10px;padding:10px 6px;background:#612219;color:#fff1d2;font-size:12px;font-weight:800;letter-spacing:.11em;border-bottom:2px solid #bc9253}
.abilities-panel .ability input{font-size:36px;font-weight:700;color:#522119;width:90px;border-bottom:1px solid #ae8b58}
.abilities-panel .ability input:disabled{opacity:1;-webkit-text-fill-color:#522119}
.abilities-panel .ability-total{font-size:19px;font-weight:800;color:#6d251b}
.abilities-panel .ability-total span{display:inline-block;padding:3px 8px;margin-left:3px;background:#743020;color:#ffe4a6;border-radius:3px;font-size:17px}
.abilities-panel .ability small{font-size:11px;color:#66503a}
.abilities-panel .ability.ability-assigned{border-color:#654124;background:#f1dfb8}
.abilities-panel .ability.ability-pending{border:2px dashed #a25b45;background:#f7e7ca}
.abilities-panel .ability-pending label{background:#795449;color:#f6e4ca}
.abilities-panel .ability-state{font-size:11px;color:#8c3a2b}
.abilities-panel .ability-assigned .ability-state{color:#42652f}
.abilities-panel .ability-click-target:hover,.abilities-panel .ability-click-target:focus-visible{background:#f9e4bd;border-color:#b47a2d;outline:2px solid #a66c28}
.abilities-panel .ability-placeholder{font-size:36px;color:#927561}
.abilities-panel .roll-results{border:2px solid #986b3f;background:#f2dfbd}
.abilities-panel .roll-pool-head{padding:9px 12px;margin:-16px -16px 14px;background:#612219;color:#fff0d4}
.abilities-panel .roll-progress{color:#ffe0a0}
.abilities-panel .roll-chip{background:#fff0d1;border-color:#a87d49}
.abilities-panel .roll-chip b{color:#7b281b}
.abilities-panel .roll-chip-used{background:#ded1b3;border-color:#6f7658}
.abilities-panel .roll-chip-used b{color:#586a42}
.abilities-panel .roll-chip-selected,.abilities-panel .roll-chip-selected.roll-chip-used{background:#f8d69a;border-color:#a0442a}
.abilities-panel .roll-assign-grid select:focus-visible{outline:2px solid #8e3526}
.abilities-panel .button-dark{background:#842b20;color:#fff1d8;border-color:#c09a61;font-weight:800}
.abilities-panel .button-dark:hover{background:#a23b2a}
@media(max-width:720px){.abilities-panel .ability{min-height:145px}.abilities-panel .ability label{font-size:10px}.abilities-panel .ability input{font-size:29px;width:65px}}

/* v17: Foundry-inspired side-by-side score assignment */
.abilities-panel .v17-score-layout{display:grid;grid-template-columns:minmax(0,35%) minmax(0,65%);gap:12px;align-items:stretch}
.abilities-panel .v17-roll-column,.abilities-panel .v17-ability-column{min-width:0;border:1px solid #9c7145;background:#f4e2c1;border-radius:5px;overflow:hidden}
.abilities-panel .v17-column-heading{background:#612219;color:#fff0d4;margin:0;padding:10px 13px;font:700 17px Georgia,serif}
.abilities-panel .v17-roll-column .ability-mode{padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:7px;align-items:stretch}
.abilities-panel .v17-roll-column .ability-mode .button{padding:10px 5px;font-size:11px;line-height:1.35;white-space:normal}
.abilities-panel .v17-roll-column #rollStatus{grid-column:1/-1;font-size:10px}
.abilities-panel .v17-roll-column .roll-results{margin:0 10px 12px;padding:10px;border:1px solid #b78e5e}
.abilities-panel .v17-roll-column .roll-pool-head{margin:-10px -10px 9px;padding:8px 10px;align-items:flex-start}
.abilities-panel .v17-roll-column .roll-pool-head b{font-size:12px}
.abilities-panel .v17-roll-column .roll-progress{font-size:10px;text-align:right}
.abilities-panel .v17-roll-column .roll-help{font-size:10px;margin:5px 0 9px}
.abilities-panel .v17-roll-column .roll-pool{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.abilities-panel .v17-roll-column .roll-chip{min-width:0;padding:8px 3px}
.abilities-panel .v17-roll-column .roll-chip b{font-size:23px}
.abilities-panel .v17-roll-column .roll-dice-details{margin-top:10px}
.abilities-panel .v17-roll-column .roll-assign-grid{display:none}
.abilities-panel .v17-roll-column .v17-advanced{margin-top:10px;font-size:11px;color:#542719}
.abilities-panel .v17-roll-column .v17-advanced summary{cursor:pointer;font-weight:700;padding:5px 0}
.abilities-panel .v17-roll-column .v17-advanced[open] .roll-assign-grid{display:grid;grid-template-columns:1fr;gap:6px;margin-top:7px}
.abilities-panel .v17-ability-column{padding-bottom:10px}
.abilities-panel .v17-ability-column .ability-grid{padding:11px;gap:9px}
.abilities-panel .v17-ability-column .ability{min-height:142px;padding:0 6px 9px}
.abilities-panel .v17-ability-column .ability label{margin:0 -6px 7px;font-size:10px;padding:9px 3px}
.abilities-panel .v17-ability-column .ability input{font-size:31px;width:65px}
.abilities-panel .v17-ability-column .ability-total{font-size:15px;margin-top:4px}
.abilities-panel .v17-ability-column .ability-total span{font-size:14px;padding:2px 5px}
.abilities-panel .v17-ability-column .ability-state{margin-top:5px}
.abilities-panel .v17-ability-column .ability-foot{margin:0 12px 4px;gap:8px;flex-wrap:wrap}
@media(max-width:850px){.abilities-panel .v17-score-layout{grid-template-columns:1fr}.abilities-panel .v17-roll-column .roll-pool{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:550px){.abilities-panel .v17-roll-column .roll-pool{grid-template-columns:repeat(3,minmax(0,1fr))}.abilities-panel .v17-ability-column .ability-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v18: tighter right column, stronger roll readability, wider wizard */
@media(min-width:1050px){.wizard-shell,.wizard-main,.wizard-header{max-width:1100px}}
.abilities-panel .v17-score-layout{align-items:start}
.abilities-panel .v17-ability-column{align-self:start;padding-bottom:4px}
.abilities-panel .v17-ability-column .ability-grid{padding-bottom:3px}
.abilities-panel .v17-ability-column .ability{min-height:130px;padding-bottom:6px}
.abilities-panel .v17-ability-column .ability small:empty{display:none}
.abilities-panel .v17-roll-column .roll-chip b{font-size:26px}
.abilities-panel .v17-roll-column .roll-chip-used b{color:#6a583c}
.abilities-panel .v17-roll-column .roll-chip-used{background:#e5d7b9}
.abilities-panel .v18-assignment-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.abilities-panel #v18AssignmentProgress{font:700 12px Arial,sans-serif;color:#ffe1a2;text-align:right}
@media(min-width:1050px){body.wizard-ready .workspace{max-width:1350px;padding-left:35px;padding-right:35px}}

/* v19: Foundry-style Race & Culture page; underlying controls and rules unchanged */
.identity-panel .v19-legacy-identity{display:none}
.identity-panel .race-explorer{margin-top:4px}
.identity-panel .race-explorer-layout{grid-template-columns:minmax(185px,30%) minmax(0,70%)}
.identity-panel .race-explorer-list{max-height:540px}
.identity-panel .race-explorer-detail{padding:16px}
.identity-panel .race-explorer-heading{padding:12px 15px}
.identity-panel .race-explorer-heading strong{font-size:20px}
.identity-panel .race-detail-title{margin:-16px -16px 14px}
.identity-panel .v19-race-profile{display:grid;grid-template-columns:minmax(150px,38%) minmax(0,1fr);gap:15px;align-items:start}
.identity-panel .v19-portrait{min-height:255px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:14px;border:2px solid #9c7545;background:radial-gradient(ellipse at center,#e8cc9e,#c7a878);color:#57271d}
.identity-panel .v19-portrait-symbol{font-size:72px;color:#793021;line-height:1}
.identity-panel .v19-portrait strong{font:700 21px Georgia,serif}
.identity-panel .v19-portrait small{font-size:11px;color:#6e5237}
.identity-panel .v19-race-stats h5{margin:0 0 11px;padding:8px 10px;background:#69251b;color:#f7e7c8;font:700 15px Georgia,serif}
.identity-panel .v19-race-stats .race-detail-data{grid-template-columns:1fr;gap:3px;font-size:12px}
.identity-panel .v19-race-stats .race-detail-data dd{margin:0 0 9px}
.identity-panel .v19-language-panel{margin:14px 0 8px;padding:14px;border:1px solid #ac8451;background:#f4e2bf;border-radius:4px}
.identity-panel .v19-language-panel h4{margin:0 0 12px;color:#64231a;font:700 18px Georgia,serif}
.identity-panel .v19-language-panel #v19LanguageMount>.field{max-width:540px}
.identity-panel .race-note{display:none}
@media(max-width:750px){.identity-panel .race-explorer-layout{grid-template-columns:1fr}.identity-panel .race-explorer-list{max-height:190px;border-right:0;border-bottom:2px solid #8d683f}.identity-panel .v19-race-profile{grid-template-columns:1fr 1.2fr}.identity-panel .v19-portrait{min-height:210px}}
@media(max-width:480px){.identity-panel .v19-race-profile{grid-template-columns:1fr}.identity-panel .v19-portrait{min-height:150px}.identity-panel .race-explorer-heading{flex-direction:column;align-items:stretch}}

/* v20: compact race language choices, no portrait changes */
.identity-panel #languageChoiceFields .race-choice-block{padding:14px}
.identity-panel #languageChoiceFields .race-choice-block>p{max-width:950px;line-height:1.55;margin:6px 0 14px}
.identity-panel #languageChoiceFields .v20-language-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 15px}
.identity-panel #languageChoiceFields .v20-language-grid .race-choice-row{display:flex;flex-direction:column;align-items:stretch;gap:4px;margin:0;min-width:0}
.identity-panel #languageChoiceFields .v20-language-grid .race-choice-row label{font-weight:700;font-size:11px}
.identity-panel #languageChoiceFields .v20-language-grid .race-choice-row select{width:100%;min-width:0}
.identity-panel .v19-race-stats .race-detail-data{display:grid;grid-template-columns:1fr 1fr;column-gap:13px;row-gap:4px}
.identity-panel .v19-race-stats .race-detail-data dt{padding:5px 0 0;border-top:1px solid #cbb188}
.identity-panel .v19-race-stats .race-detail-data dd{margin:0 0 8px;grid-column:1/-1;line-height:1.45}
.identity-panel .v19-race-stats h5{margin-bottom:10px}
.identity-panel .race-explorer-list{max-height:445px}
.identity-panel .v19-portrait{min-height:210px}
@media(max-width:650px){.identity-panel #languageChoiceFields .v20-language-grid{grid-template-columns:1fr}}

/* v21: unified race selection, traits, and choices */
.identity-panel .v19-language-panel{display:none}
.identity-panel .race-choice-grid{display:none}
.identity-panel .race-explorer-detail{padding:0}
.identity-panel .race-detail-title{margin:0}
.identity-panel .v21-race-content{padding:14px 16px 18px}
.identity-panel .v21-culture-description{font:italic 14px/1.5 Georgia,serif;color:#63442b;margin:0 0 14px}
.identity-panel .v21-race-content h5{font:700 16px Georgia,serif;color:#f6e5c5;background:#69251b;margin:14px 0 10px;padding:8px 11px}
.identity-panel .v21-trait-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.identity-panel .v21-trait-grid>div{background:#f9ebcf;border:1px solid #d3b88a;padding:10px;min-width:0}
.identity-panel .v21-trait-grid strong,.identity-panel .v21-native-language strong{display:block;color:#782b1c;font-size:12px;margin-bottom:4px}
.identity-panel .v21-trait-grid span,.identity-panel .v21-native-language span{font-size:13px;line-height:1.4}
.identity-panel .v21-race-controls{margin-top:8px}
.identity-panel .v21-race-controls .race-choice-block{background:transparent;border:0;padding:0;margin:10px 0}
.identity-panel .v21-race-controls .race-choice-block h4{display:none}
.identity-panel .v21-race-controls .race-choice-block p{font-size:12px;line-height:1.45;margin:4px 0 10px}
.identity-panel .v21-race-controls .v20-language-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px}
.identity-panel .v21-race-controls .race-choice-row{display:flex;flex-direction:column;gap:4px;min-width:0}
.identity-panel .v21-race-controls .race-choice-row select{width:100%;min-width:0}
.identity-panel .v21-native-language{background:#f9ebcf;border:1px solid #d3b88a;padding:9px 11px;margin-bottom:7px}
.identity-panel #v21NativeInputMount>.field{display:none}
.identity-panel .race-explorer-list{max-height:720px}
@media(max-width:750px){.identity-panel .race-explorer-list{max-height:210px}}
@media(max-width:520px){.identity-panel .v21-trait-grid,.identity-panel .v21-race-controls .v20-language-grid{grid-template-columns:1fr}}

.identity-panel #v21NativeInputMount.v21-needs-native-choice>.field{display:flex;margin:8px 0}
.identity-panel #v21NativeInputMount.v21-needs-native-choice>.field input{width:100%}

/* v22: stable, visible interactive controls and content-sized race browser */
.identity-panel .race-explorer-layout{align-items:start}
.identity-panel .race-explorer-list{max-height:390px;overflow-y:auto}
.identity-panel .race-explorer-detail{min-height:0}
.identity-panel .v22-persistent-controls{padding:0 16px 16px}
.identity-panel .v22-persistent-controls h5{font:700 16px Georgia,serif;color:#f6e5c5;background:#69251b;margin:12px 0 10px;padding:8px 11px}
.identity-panel .v22-persistent-controls .race-choice-block{background:transparent;border:0;padding:0;margin:8px 0}
.identity-panel .v22-persistent-controls .race-choice-block h4{font:700 16px Georgia,serif;color:#f6e5c5;background:#69251b;margin:12px 0 10px;padding:8px 11px}
.identity-panel .v22-persistent-controls .race-choice-block p{font-size:12px;line-height:1.45;margin:4px 0 10px}
.identity-panel .v22-persistent-controls .v20-language-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px}
.identity-panel .v22-persistent-controls .race-choice-row{display:flex;flex-direction:column;gap:4px;min-width:0}
.identity-panel .v22-persistent-controls .race-choice-row select{width:100%;min-width:0}
@media(max-width:650px){.identity-panel .v22-persistent-controls .v20-language-grid{grid-template-columns:1fr}}

/* v23: make the independently scrolling race list match the right panel's full height.
   Height:0 prevents the 40 list items from determining the grid row height;
   min-height:100% fills the row sized by the race details and controls. */
@media (min-width:751px){
  .identity-panel .race-explorer-layout{align-items:stretch;grid-template-rows:auto}
  .identity-panel .race-explorer-list{height:0;min-height:100%;max-height:none;overflow-y:auto;overscroll-behavior:contain}
}

/* v25 — Step 4: class browser and details, all original advancement controls retained */
.advancement-panel .v25-class-layout{display:grid;grid-template-columns:minmax(180px,30%) minmax(0,70%);border:1px solid #a67a47;min-height:390px}
.advancement-panel .v25-class-browser{background:#221d1b;color:#f4dfbb;border-right:2px solid #9d7747}
.advancement-panel .v25-class-browser h4{background:#561c17;margin:0;padding:15px;font:700 19px Georgia,serif;color:#f4dfbb}
.advancement-panel .v25-class-list{display:flex;flex-direction:column;max-height:590px;overflow:auto}
.advancement-panel .v25-class-choice{appearance:none;border:0;border-bottom:1px solid #55423a;background:transparent;text-align:left;color:#f6e8d0;padding:12px 14px;font:700 15px Georgia,serif;cursor:pointer}
.advancement-panel .v25-class-choice small{display:block;font:11px Arial,sans-serif;color:#d2ac76;margin-top:4px}
.advancement-panel .v25-class-choice.active{background:#79231b;box-shadow:inset 4px 0 #d6a45c}
.advancement-panel .v25-class-choice:hover{background:#643028}
.advancement-panel .v25-class-detail{min-width:0;padding:0 16px 17px;background:#f4e2bf}
.advancement-panel .v25-class-heading{margin:0 -16px 15px;background:#681e18;color:#f9e6c5;padding:14px 16px}
.advancement-panel .v25-class-heading small{font:10px Arial,sans-serif;color:#dfba84}
.advancement-panel .v25-class-heading h4{margin:3px 0 6px;font:700 24px Georgia,serif}
.advancement-panel .v25-class-heading p{margin:0;font-size:12px;line-height:1.5;color:#f1d6ac}
.advancement-panel .advance-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:10px}
.advancement-panel .advance-controls .field{min-width:0}
.advancement-panel .advance-controls button{width:100%}
.advancement-panel .advance-strip{margin-bottom:15px}
.advancement-panel .level-history{margin-bottom:6px}
@media(max-width:680px){.advancement-panel .v25-class-layout{grid-template-columns:1fr}.advancement-panel .v25-class-browser{border-right:0;border-bottom:2px solid #9d7747}.advancement-panel .v25-class-list{max-height:180px}.advancement-panel .advance-controls{grid-template-columns:1fr 1fr}}

/* v26 — Step 5 presentation-only redesign */
.details-panel .v26-feature-layout{display:grid;grid-template-columns:minmax(0,42%) minmax(0,58%);border:1px solid #ad8551;background:#f3e0ba;min-height:350px}
.details-panel .v26-feature-resources{border-right:2px solid #ad8551;padding:0 17px 17px;min-width:0}
.details-panel .v26-feature-notes{padding:0 17px 17px;min-width:0}
.details-panel .v26-section-head{margin:0 -17px 15px;padding:14px 17px;background:#652019;color:#f8e3be}
.details-panel .v26-section-head small{font:10px Arial,sans-serif;letter-spacing:.1em;color:#e1ba82}
.details-panel .v26-section-head h4{margin:4px 0 0;font:700 22px Georgia,serif}
.details-panel .v26-section-help{font-size:12px;line-height:1.5;color:#795034;margin:0 0 17px}
.details-panel .v26-resource-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.details-panel .v26-resource-fields .field{min-width:0}
.details-panel .v26-resource-fields input{font-size:20px;font-weight:700;text-align:center;min-width:0;width:100%}
.details-panel .v26-rule-note{margin-top:20px;padding:14px;border:1px solid #bd9863;background:#f8e8ca;color:#65251c}
.details-panel .v26-rule-note strong{font:700 17px Georgia,serif}
.details-panel .v26-rule-note p{font-size:12px;line-height:1.6;margin:7px 0 0;color:#725037}
.details-panel .v26-feature-notes .field{display:block;margin-bottom:13px}
.details-panel .v26-feature-notes textarea{width:100%;min-height:95px;resize:vertical}
@media(max-width:740px){.details-panel .v26-feature-layout{grid-template-columns:1fr}.details-panel .v26-feature-resources{border-right:0;border-bottom:2px solid #ad8551}.details-panel .v26-feature-notes{padding-top:0}}
@media(max-width:420px){.details-panel .v26-resource-fields{grid-template-columns:1fr}}

/* v27: one-sweep Step 6 presentation redesign; skill controls remain native */
.skills-panel .v27-budget-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;margin-bottom:14px;background:#6b241a;color:#f8e6c7;border:1px solid #9f6940;font-size:14px}
.skills-panel .v27-budget-bar span{font-weight:800;font-size:16px;color:#f7d7a3}
.skills-panel .v27-skill-layout{display:grid;grid-template-columns:minmax(180px,30%) minmax(0,70%);border:1px solid #ba9b6e;background:#f5e4c3}
.skills-panel .v27-skill-guide{background:#241d19;color:#f0dfc2;padding:17px 15px}
.skills-panel .v27-skill-guide h4{font:700 20px Georgia,serif;color:#f7e6c6;margin:0 0 19px}
.skills-panel .v27-skill-guide p{font-size:12px;line-height:1.6;border-bottom:1px solid #554237;padding-bottom:12px;margin:0 0 13px}
.skills-panel .v27-skill-guide b{color:#eac18b}
.skills-panel .v27-skill-main{min-width:0;padding:14px}
.skills-panel .v27-skill-main .skill-toolbar{display:block;margin-bottom:10px}
.skills-panel .v27-skill-main .skill-toolbar input{width:100%;max-width:none}
.skills-panel .v27-skill-main .skill-list{max-height:590px;overflow:auto;scrollbar-color:#a17d51 #f0dcb9}
.skills-panel .v27-skill-main .specialized-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.skills-panel .v27-skill-main .skill-row{grid-template-columns:minmax(0,1fr) 118px 53px;gap:8px}
.skills-panel .v27-skill-main .skill-label small{line-height:1.5}
.skills-panel .v27-skill-main .skill-stepper{grid-template-columns:34px 24px 34px;gap:3px}
.skills-panel .v27-skill-main .skill-stepper button{width:34px;height:36px}
@media(max-width:740px){.skills-panel .v27-skill-layout{grid-template-columns:1fr}.skills-panel .v27-skill-guide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.skills-panel .v27-skill-guide h4{grid-column:1/-1;margin-bottom:0}.skills-panel .v27-skill-guide p{margin:0}.skills-panel .v27-skill-main .skill-row{grid-template-columns:minmax(0,1fr) 110px}.skills-panel .v27-skill-main .skill-cost{grid-column:1/-1}}
@media(max-width:480px){.skills-panel .v27-skill-main .specialized-skills{grid-template-columns:1fr}.skills-panel .v27-budget-bar{align-items:flex-start;flex-direction:column}}

/* v28: Step 7 one-sweep feat browser */
.feats-panel .v28-feat-layout{display:grid;grid-template-columns:minmax(210px,30%) minmax(0,70%);border:1px solid #a87c4d;background:#f5e4c3}
.feats-panel .v28-feat-guide{background:#251e1a;color:#f2dec0;padding:0 16px 20px;border-right:2px solid #a37a4a}
.feats-panel .v28-feat-guide-head{margin:0 -16px 17px;padding:18px 16px;background:#631e18}
.feats-panel .v28-feat-guide-head small{font-size:10px;letter-spacing:1px;color:#dfbd87}
.feats-panel .v28-feat-guide-head h4{margin:5px 0 0;color:#f4dfc0;font:700 21px Georgia,serif}
.feats-panel .v28-feat-guide p{font-size:13px;line-height:1.55;color:#e6d3b5}
.feats-panel .v28-feat-guide h5{font:700 16px Georgia,serif;margin:22px 0 8px;color:#f3d9ab}
.feats-panel .v28-feat-count{border:1px solid #a07a4b;background:#402a23;padding:12px;margin:17px 0;font-size:14px;font-weight:bold;color:#f7e2bf}
.feats-panel .v28-feat-guide-foot{font-size:11px;color:#d4b58b;border-top:1px solid #765740;padding-top:15px;margin-top:20px}
.feats-panel .v28-feat-main{padding:0 17px 18px;min-width:0}
.feats-panel .v28-feat-main-head{margin:0 -17px 15px;padding:15px 17px;background:#6b251b;color:#f5e3c1}
.feats-panel .v28-feat-main-head h4{margin:0 0 5px;font:700 19px Georgia,serif;color:inherit}
.feats-panel .v28-feat-main-head p{margin:0;font-size:12px;color:#e8d0aa}
.feats-panel .feat-slot{background:#f9ebd1;border:1px solid #c9aa79;border-radius:3px;padding:14px;margin-bottom:13px}
.feats-panel .feat-slot>label:first-child{display:block;font-weight:700;color:#67271d;margin-bottom:9px}
.feats-panel .feat-slot>select{width:100%;max-width:100%;min-height:39px}
.feats-panel .feat-reference{background:#f3ddba;border-left:3px solid #8b3929;padding:11px;margin-top:11px;line-height:1.5}
.feats-panel .v28-feat-context{margin-top:14px}
.feats-panel .v28-feat-context details{background:#f3ddba;border:1px solid #c9aa79;padding:10px}
@media(max-width:760px){.feats-panel .v28-feat-layout{grid-template-columns:1fr}.feats-panel .v28-feat-guide{border-right:0;border-bottom:2px solid #a37a4a}.feats-panel .v28-feat-guide-head{margin-bottom:10px}.feats-panel .v28-feat-guide p{margin:8px 0}}

/* v29 Step 8 — single-sweep equipment layout */
.equipment-panel .v29-equipment-layout{display:grid;grid-template-columns:minmax(220px,34%) minmax(0,66%);border:1px solid #aa8758;background:#f5e4c3}
.equipment-panel .v29-equipment-side{min-width:0;background:#251f1c;color:#ead9bd;padding:0 15px 20px;border-right:2px solid #9c7043}
.equipment-panel .v29-equipment-sidehead{margin:0 -15px 15px;padding:17px 15px;background:#641f18}
.equipment-panel .v29-equipment-sidehead small{font-size:10px;color:#e0ba83;letter-spacing:1px}
.equipment-panel .v29-equipment-sidehead h4{font:700 22px Georgia,serif;color:#f6e2c2;margin:5px 0 0}
.equipment-panel .v29-equipment-side p{font-size:12px;line-height:1.5;color:#e5ceb0}
.equipment-panel .v29-equipment-side .starting-package{background:#3b2b23;border:1px solid #745239;padding:12px;margin-top:15px}
.equipment-panel .v29-equipment-side .field{color:#f1ddbe;display:block}
.equipment-panel .v29-equipment-side select{width:100%;max-width:100%;margin-top:8px}
.equipment-panel .v29-equipment-side .equipment-info{font-size:12px;line-height:1.5;color:#f0dfc6;background:#52372a;border-color:#79593b;margin-top:12px}
.equipment-panel .v29-side-note{border-top:1px solid #75543e;margin-top:20px;padding-top:16px;font-size:13px}
.equipment-panel .v29-equipment-main{min-width:0;padding:0 15px 18px}
.equipment-panel .v29-mainhead{background:#6c251c;color:#f5dfbd;margin:0 -15px 15px;padding:15px}
.equipment-panel .v29-mainhead h4{font:700 19px Georgia,serif;margin:0 0 4px;color:inherit}
.equipment-panel .v29-mainhead p{font-size:12px;margin:0;color:#f0d8b4}
.equipment-panel .v29-equipment-main .equipment-add{display:flex;flex-wrap:wrap;gap:9px;align-items:end}
.equipment-panel .v29-equipment-main .equipment-add>.field:first-child{flex:1 1 200px;min-width:0}
.equipment-panel .v29-equipment-main .equipment-add select{width:100%}
.equipment-panel .v29-equipment-main .equipment-add .quantity-field{flex:0 0 65px}
.equipment-panel .v29-equipment-main .equipment-add button{min-height:38px}
.equipment-panel .v29-equipment-main .custom-gear{margin-top:18px;border:1px solid #d0b389;padding:12px;background:#f7e8ca}
.equipment-panel .v29-equipment-main .custom-gear h4,.equipment-panel .v29-inventory-head h4{font:700 17px Georgia,serif;color:#72271e;margin:0 0 7px}
.equipment-panel .v29-inventory-head{border-bottom:2px solid #a97d4d;margin:19px 0 9px}
@media(max-width:760px){.equipment-panel .v29-equipment-layout{grid-template-columns:1fr}.equipment-panel .v29-equipment-side{border-right:0;border-bottom:2px solid #9c7043}}

/* v30 Step 9: final review visual sweep; character rendering/export logic unchanged */
body.wizard-ready.wizard-review .sheet-section{max-width:1100px;margin:18px auto 38px;padding:22px 18px 26px;border:1px solid #b99b6b;border-radius:4px;background:linear-gradient(160deg,#f3e2be,#dfc59b)}
body.wizard-ready.wizard-review .sheet-section>.section-head{align-items:center;gap:15px;margin:0 0 17px;padding:17px 19px;background:#641e18;border:1px solid #a67a4d}
body.wizard-ready.wizard-review .sheet-section>.section-head .eyebrow{color:#dbb47b;font-size:10px;letter-spacing:1.5px;margin:0 0 5px}
body.wizard-ready.wizard-review .sheet-section>.section-head h2{color:#f7e3bd;font:700 26px Georgia,serif;margin:0}
body.wizard-ready.wizard-review .v30-review-subtitle{color:#eed3aa;font-size:12px;line-height:1.45;margin:7px 0 0;max-width:520px}
body.wizard-ready.wizard-review .sheet-section>.section-head .head-actions{display:flex;align-items:center;gap:9px}
body.wizard-ready.wizard-review .sheet-section>.section-head .head-actions button{min-height:39px;border-radius:3px;white-space:nowrap}
body.wizard-ready.wizard-review #printButton{background:#f4e1be;color:#52231c;border:1px solid #d2aa77}
body.wizard-ready.wizard-review #downloadButton{background:#a7472c;color:#fff2dc;border:1px solid #cf8056}
body.wizard-ready.wizard-review #completionMessage{margin:0 0 15px;padding:13px 15px;font-size:12px;line-height:1.5;border-left:4px solid #9b4b2d}
body.wizard-ready.wizard-review #completionMessage.is-ready{border-left-color:#627448}
body.wizard-ready.wizard-review #characterSheet{margin:0;background:#f7e8ca;border:1px solid #c6a675;box-shadow:0 8px 20px #533b201c;padding:24px}
body.wizard-ready.wizard-review #characterSheet .sheet-box{border:1px solid #c9ab7c;background:#fbefd8}
body.wizard-ready.wizard-review #characterSheet .sheet-box h3{font-size:12px;letter-spacing:.07em}
body.wizard-ready.wizard-review .sheet-foot{font-size:11px;line-height:1.5;margin:15px 3px 0;color:#6c5037}
@media(max-width:760px){body.wizard-ready.wizard-review .sheet-section{margin:12px;padding:12px}body.wizard-ready.wizard-review .sheet-section>.section-head{flex-direction:column;align-items:stretch;padding:14px}body.wizard-ready.wizard-review .sheet-section>.section-head .head-actions{width:100%;flex-wrap:wrap}body.wizard-ready.wizard-review .sheet-section>.section-head .head-actions button{flex:1}body.wizard-ready.wizard-review #characterSheet{padding:12px}}
@media print{body.wizard-ready.wizard-review .sheet-section{border:0;background:white;padding:0;margin:0}body.wizard-ready.wizard-review .sheet-section>.section-head .head-actions{display:none}body.wizard-ready.wizard-review #characterSheet{box-shadow:none}}

/* v31 fail-safe: never expose the entire wizard when a script fails to initialize */
body:not(.wizard-ready) .builder-grid>.panel,body:not(.wizard-ready) .sheet-section,body:not(.wizard-ready) .wizard-footer{display:none!important}
body:not(.wizard-ready) .builder-grid>.panel.abilities-panel{display:none!important}
body.wizard-ready:not(.wizard-review) .sheet-section{display:none!important}
body.wizard-ready.wizard-review .builder-grid>.panel,body.wizard-ready.wizard-review .concept-panel{display:none!important}

/* v32 approved workflow: cultural selections in Skills and Languages steps */
.identity-panel .v22-persistent-controls{display:none!important}
.v32-languages-panel #v32LanguageMount{max-width:100%;padding:8px 0}
.v32-languages-panel #v32NativeInputMount{margin:8px 0 14px}
.v32-languages-panel #v32NativeInputMount .field{max-width:620px}
.v32-languages-panel #languageChoiceFields .v20-language-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.v32-languages-panel #languageChoiceFields select{width:100%}
.skills-panel #v32BackgroundMount,.skills-panel #v32AdaptMount{margin-bottom:14px}
@media(max-width:650px){.v32-languages-panel #languageChoiceFields .v20-language-grid{grid-template-columns:1fr}}

/* Class progression modal, horizontal scrolling on phones */
.class-progression-dialog{width:min(1100px,96vw);max-height:88vh;padding:1.25rem;border:1px solid #77644d;border-radius:12px;background:#f5ead4;color:#2b241d;box-shadow:0 16px 60px #0008}
.class-progression-dialog::backdrop{background:#000a}
.class-progression-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.class-progression-header h3{margin:0 0 .3rem}
.class-progression-header p{margin:0}
.class-progression-scroll{overflow:auto;max-height:65vh}
.class-progression-table{width:100%;border-collapse:collapse;font-size:.85rem;white-space:nowrap}
.class-progression-table th,.class-progression-table td{padding:.55rem .65rem;border-bottom:1px solid #b9a98f;text-align:left}
.class-progression-table thead{position:sticky;top:0;background:#e8d8bc}
.class-progression-table td:last-child{white-space:normal;min-width:230px}
.class-progression-table tbody tr:nth-child(even){background:#eee1ca}

/* V32: readable feat recommendations and expandable summaries */
.feat-recommended{grid-column:1/-1;padding:12px;margin:8px 0;border:1px solid #b99b68;background:#f3e2c2;color:#34271c}.feat-recommended>p{font-size:13px;margin:5px 0 10px}.feat-reference{grid-column:1/-1}.feat-reference summary{cursor:pointer;font-size:14px;font-weight:600;padding:5px 0}.feat-reference p{margin:8px 0;font-size:14px}.feat-reference[open]{background:#f6e9d1}.feat-recommended .feat-reference{margin-top:7px;background:#fff7e8}.feat-recommended .feat-reference summary{color:#532b1e}

/* v32 layout refresh: Pathbuilder-inspired navigation and legibility.
   Presentation only: no rule calculations, state, or export modifications. */
html{scroll-behavior:smooth}
body{font-size:16px;line-height:1.6}
.workspace{max-width:1540px;margin-inline:auto;padding-inline:clamp(14px,3vw,42px)}
.builder-main{min-width:0}
.section-head{gap:18px;flex-wrap:wrap}
.section-head h2{font-size:clamp(27px,2.7vw,37px);line-height:1.2}
.panel{padding:clamp(18px,2.5vw,32px);margin-bottom:22px;border-radius:10px}
.panel-title{gap:15px;margin-bottom:20px;padding-bottom:17px}
.panel-title h3{font-size:clamp(22px,2vw,29px);line-height:1.25}
.panel-title p{font-size:16px;line-height:1.6}
.field,.field label{font-size:16px}
.field input,.field select,.field textarea,.skill-toolbar input,.skill-row input,.skill-field,.feat-slot select,.race-choice-row select,.equipment-add select,.equipment-add input{min-height:48px;font-size:16px;padding:11px 13px}
.field small,.help,.race-choice-block p,.race-choice-row label,.feat-slot label,.equipment-info,.equipment-row small,.skill-label small{font-size:15px;line-height:1.6}
.button,.equipment-row button,.skill-stepper button{min-height:44px;font-size:16px;font-weight:650;padding:10px 16px}
.foundry-step-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 23px;padding:12px;border:1px solid #b99b6b;border-radius:10px;background:#f0dfbf}
.foundry-step-tabs button{flex:1 1 112px;min-height:48px;padding:10px 12px;font-size:15px;font-weight:700;line-height:1.25;border:1px solid #c5a57b;border-radius:7px;background:#fff7e7;color:#513529;cursor:pointer;white-space:normal}
.foundry-step-tabs button.selected,.foundry-step-tabs button[aria-current="step"]{background:#702b21;color:#fff8e9;border-color:#702b21;box-shadow:inset 0 0 0 1px #d19b68}
.foundry-step-tabs button:hover:not(.selected){background:#ead1a8;border-color:#8d5031}
.foundry-step-tabs button:focus-visible,.button:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #2876a7;outline-offset:3px}
.wizard-footer{gap:12px;flex-wrap:wrap}
.wizard-footer .button{min-height:50px}
.rail-note,.race-choice-block,.starting-package,.custom-gear{border-radius:8px}
.feat-reference summary,.feat-reference p{font-size:16px;line-height:1.6}
.feat-recommended>p{font-size:15px}
.class-progression-dialog{font-size:16px}
@media(max-width:900px){.workspace{padding-inline:16px}.foundry-step-tabs{position:relative}.hero{min-height:320px;padding:36px 25px}}
@media(max-width:650px){.workspace{padding-inline:10px}.panel{padding:16px}.foundry-step-tabs{gap:6px;padding:8px}.foundry-step-tabs button{flex:1 1 calc(33.333% - 8px);min-height:48px;font-size:14px;padding:9px 5px}.section-head h2{font-size:27px}.panel-title h3{font-size:22px}.head-actions{flex-wrap:wrap}.hero{min-height:290px;padding:30px 20px}}
@media print{.foundry-step-tabs{display:none!important}}

/* v32 selection-panel refinement: decorative portrait placeholders until approved art is supplied. */
.identity-panel .v32-selection-profile{display:grid;grid-template-columns:minmax(145px,32%) minmax(0,1fr);align-items:stretch;gap:0}
.identity-panel .v32-profile-body{min-width:0}
.identity-panel .v32-portrait-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:290px;padding:18px;text-align:center;background:linear-gradient(145deg,#e7d0a5,#bd9867);border-right:2px solid #aa8151;color:#5a291e}
.identity-panel .v32-portrait-mark{display:grid;place-items:center;width:92px;height:110px;border:2px solid #9a7045;border-radius:46% 46% 12% 12%;font-size:54px;color:#8c5940;background:#e8d4b1}
.identity-panel .v32-portrait-placeholder strong{font:700 21px Georgia,serif;overflow-wrap:anywhere}
.identity-panel .v32-portrait-placeholder small{font:13px Arial,sans-serif;color:#644e38}
.identity-panel .v32-profile-body .race-detail-title{margin:0}
.identity-panel .v32-profile-body .v21-race-content{padding:18px}
.identity-panel .race-explorer-option{font-size:17px;min-height:62px}
.identity-panel .race-explorer-option small{font-size:13px}
.advancement-panel .v25-class-choice{font-size:17px;line-height:1.35;padding:15px 16px}
.advancement-panel .v25-class-choice small{font-size:13px;line-height:1.45;font-family:Arial,sans-serif;font-weight:400;margin-top:7px}
.advancement-panel .v25-class-heading{position:relative;padding-right:130px;min-height:120px}
.advancement-panel .v25-class-heading p{font-size:15px;line-height:1.55}
.advancement-panel .v32-class-portrait{position:absolute;right:15px;top:14px;width:100px;min-height:95px;padding:8px;border:1px solid #c59c69;background:#8b3a2a;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.advancement-panel .v32-class-emblem{font-size:31px;line-height:1}
.advancement-panel .v32-class-portrait span:last-child{font:11px Arial,sans-serif;line-height:1.3;color:#f9e6c5}
@media(max-width:740px){.identity-panel .v32-selection-profile{grid-template-columns:1fr}.identity-panel .v32-portrait-placeholder{min-height:145px;border-right:0;border-bottom:2px solid #aa8151}.identity-panel .v32-portrait-mark{height:55px;width:70px;font-size:30px}.advancement-panel .v25-class-heading{padding-right:110px}.advancement-panel .v32-class-portrait{width:85px}}
@media(max-width:420px){.advancement-panel .v25-class-heading{padding-right:16px;padding-bottom:110px}.advancement-panel .v32-class-portrait{top:auto;bottom:10px;left:16px;right:auto;width:170px;min-height:70px}}

/* v32 equipment selection refresh: readable, separate browsing and inventory panels */
.equipment-panel .equipment-category{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:12px 0 14px;padding:14px;background:#f7edd9;border:1px solid #c9ab7b;border-radius:7px}
.equipment-panel .equipment-category .field{flex:1 1 210px;max-width:330px;font-size:15px;font-weight:700}
.equipment-panel .equipment-category select{width:100%;min-height:48px;font-size:16px}
.equipment-panel .equipment-category-hint{flex:2 1 210px;font-size:14px;line-height:1.55;color:#584736;margin:0}
.equipment-panel .v29-equipment-main .v29-mainhead{padding:16px 0 8px;border-bottom:2px solid #b99262;margin-bottom:12px}
.equipment-panel .v29-equipment-main .v29-mainhead h4{font-size:22px}
.equipment-panel .v29-equipment-main .v29-mainhead p,.equipment-panel .custom-gear .help{font-size:14px;line-height:1.55}
.equipment-panel .v29-equipment-main .equipment-add .field{font-size:15px}
.equipment-panel .equipment-info{font-size:14px;line-height:1.6;padding:14px;border:1px solid #d7b98b}
.equipment-panel .custom-gear{border-radius:7px;padding:18px}
.equipment-panel .v29-inventory-head{margin-top:22px;padding:12px 0;border-bottom:2px solid #b99262}
.equipment-panel .equipment-row{padding:15px 8px;gap:14px;flex-wrap:wrap}
.equipment-panel .equipment-row b{font-size:16px}
.equipment-panel .equipment-row small{font-size:13px;line-height:1.5}
.equipment-panel .equipment-row button{font-size:14px;min-height:40px;padding:7px 10px;border:1px solid #bb9a70;border-radius:5px}
.equipment-panel .equipment-equipped{font-size:14px;display:flex;align-items:center;gap:7px}
@media(max-width:650px){.equipment-panel .equipment-category{padding:12px}.equipment-panel .equipment-category .field{max-width:none}.equipment-panel .v29-equipment-main .equipment-add>.field:first-child{flex-basis:100%}.equipment-panel .equipment-row>div:first-child{flex:1 1 100%}}

/* Milestone A: keep optional roleplay fields out of the mandatory Features flow. */
.details-panel .v32-optional-details{display:block;padding:14px 18px;border-top:1px solid #ad8551}
.details-panel .v32-optional-details>summary{cursor:pointer;font-weight:800;font-size:1.08rem;color:#58351d}
.details-panel .v32-optional-details[open]>summary{margin-bottom:12px}
.details-panel .v26-feature-layout:has(.v32-optional-details){grid-template-columns:1fr;min-height:0}
.details-panel .v26-feature-resources{border-right:0}
.skills-panel .v32-specialty-help{padding:10px 14px;background:#f6e8c9;border-left:3px solid #a5763b}

/* Milestone A focused layout repairs */
.skills-panel .specialty-catalog{margin:12px 0 16px;padding:12px 16px;border:1px solid #bd9969;border-radius:8px;background:#f7ebd4}
.skills-panel .specialty-catalog>summary{cursor:pointer;font-weight:750;font-size:17px;line-height:1.45;color:#503121}
.skills-panel .specialty-catalog[open]>summary{margin-bottom:12px}
.skills-panel .specialty-group{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;padding:12px 0;border-top:1px solid #d8c29e}
.skills-panel .specialty-group strong{flex:0 0 105px}
.skills-panel .specialty-group span{display:flex;flex:1 1 280px;gap:7px;flex-wrap:wrap;min-width:0}
.skills-panel .specialty-shortcut{min-height:40px;padding:8px 12px;font-size:14px;line-height:1.3;white-space:normal}
.skills-panel .specialized-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.skills-panel .specialized-skills .field{min-width:0}
.identity-panel .v32-profile-body .v21-culture-description{font-size:16px;line-height:1.7;overflow-wrap:anywhere}
.identity-panel .v32-profile-body .v21-trait-grid{min-width:0}
.advancement-panel .v25-class-heading,.details-panel .v26-feature-layout{min-width:0}
.details-panel .v32-optional-details>summary{min-height:44px;display:flex;align-items:center}
@media(max-width:700px){.skills-panel .specialized-skills{grid-template-columns:1fr}.skills-panel .specialty-group{display:block}.skills-panel .specialty-group strong{display:block;margin-bottom:9px}.identity-panel .v32-profile-body .v21-race-content{padding:14px}.identity-panel .v32-selection-profile{min-width:0}.advancement-panel .v25-class-choice{padding:12px}}
@media(max-width:420px){.skills-panel .specialty-shortcut{font-size:14px;min-height:44px}.skills-panel .specialty-catalog{padding:11px}}

/* Milestone B: player-facing feat recommendations and equipment workflow */
.feats-panel .feat-slot{min-width:0;gap:12px}
.feats-panel .feat-recommended{order:1;min-width:0;border-radius:9px;padding:15px;margin:10px 0}
.feats-panel .feat-recommended h4{font-size:18px;margin:0 0 6px;color:#592d1e}
.feats-panel .feat-suggestion-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
.feats-panel .feat-suggestion-card{min-width:0;background:#fff7e8;border:1px solid #d2b68e;border-radius:8px;padding:11px}
.feats-panel .feat-suggestion-pick{display:block;width:100%;min-height:44px;padding:9px 12px;background:#55352a;color:#fff5e5;border:1px solid #55352a;border-radius:5px;font-weight:700;font-size:15px;cursor:pointer;white-space:normal;text-align:left}
.feats-panel .feat-suggestion-pick:hover,.feats-panel .feat-suggestion-pick:focus-visible{background:#744635;outline:2px solid #b68448;outline-offset:2px}
.feats-panel .feat-suggestion-card .feat-reference{margin-top:7px}
.feats-panel .feat-all-choices{order:2;display:block;font-weight:700}
.feats-panel .feat-all-choices select{width:100%;margin-top:7px}
.feats-panel .feat-slot>.feat-reference{order:3}
.equipment-panel .equipment-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.equipment-panel .equipment-steps>div{padding:13px;border:1px solid #c5a679;border-radius:8px;background:#f7e8ce;min-width:0}
.equipment-panel .equipment-steps strong{display:block;font-size:16px;color:#643427}
.equipment-panel .equipment-steps span{display:block;font-size:14px;line-height:1.5;margin-top:4px;color:#4e3b2a}
.equipment-panel .equipment-category select,.equipment-panel .equipment-add select{font-size:16px;min-height:48px}
.equipment-panel .equipment-info{font-size:15px;line-height:1.6;overflow-wrap:anywhere}
.equipment-panel .equipment-row{gap:12px;padding:13px 10px}
@media(max-width:700px){.equipment-panel .equipment-steps{grid-template-columns:1fr}.feats-panel .feat-suggestion-grid{grid-template-columns:1fr}}

/* Milestone C: readable Foundry-inspired final character sheet */
.v32-export-guide{margin:0 0 16px;padding:17px 20px;background:#fff1d6;color:#3e281c;border:2px solid #93643c;border-radius:7px;font-size:16px;line-height:1.6}
.v32-export-guide>strong{font-size:18px;letter-spacing:.025em}
.v32-export-guide ol{padding-left:23px;margin:9px 0}.v32-export-guide li{margin:4px 0}.v32-export-guide p{margin:9px 0 0}
#characterSheet{background:#f9eed7;color:#33251c;font-size:15px;line-height:1.5;padding:20px}
#characterSheet .v32-sheet-header{display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:3px solid #68251d;padding:4px 0 17px}
#characterSheet .v32-sheet-header h2{font:700 32px Georgia,serif;margin:4px 0;color:#4a2019}
#characterSheet .v32-sheet-header p{margin:0}#characterSheet .v32-sheet-kicker{font-size:11px;letter-spacing:.16em;font-weight:800}
#characterSheet .v32-sheet-level{text-align:center;border:2px solid #68251d;min-width:85px;padding:7px}
#characterSheet .v32-sheet-level span,#characterSheet .v32-sheet-summary span{display:block;font-size:11px;letter-spacing:.08em;font-weight:700}
#characterSheet .v32-sheet-level strong{font-size:29px}
#characterSheet .v32-sheet-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:16px 0}
#characterSheet .v32-sheet-summary>div{border:1px solid #bba17b;text-align:center;padding:10px 4px;background:#fff8e9}
#characterSheet .v32-sheet-summary strong{display:block;font-size:20px}
#characterSheet .v32-sheet-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#characterSheet .v32-sheet-section{min-width:0;border:1px solid #c5a579;background:#fff9eb;padding:13px 15px;overflow-wrap:anywhere}
#characterSheet .v32-sheet-wide{grid-column:1/-1}
#characterSheet .v32-sheet-section h3{margin:-13px -15px 12px;padding:9px 13px;background:#6b2b21;color:#fff4df;font-size:13px;letter-spacing:.075em}
#characterSheet .v32-sheet-section table{width:100%;border-collapse:collapse;font-size:14px}
#characterSheet .v32-sheet-section th,#characterSheet .v32-sheet-section td{padding:6px;border-bottom:1px solid #dfc8a5;text-align:left}
#characterSheet .v32-sheet-section td:not(:first-child){text-align:right}
#characterSheet .v32-sheet-section ul{margin:0;padding-left:20px}
#characterSheet .v32-sheet-facts>div{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #dfc8a5;padding:5px 0}
#characterSheet .v32-sheet-facts dd{margin:0;text-align:right}
#characterSheet .v32-sheet-small{font-size:12px}
@media(max-width:760px){#characterSheet .v32-sheet-summary{grid-template-columns:repeat(3,minmax(0,1fr))}#characterSheet .v32-sheet-columns{grid-template-columns:1fr}#characterSheet .v32-sheet-wide{grid-column:auto}#characterSheet .v32-sheet-header h2{font-size:25px}.v32-export-guide{padding:13px}}
@media(max-width:420px){#characterSheet .v32-sheet-summary{grid-template-columns:repeat(2,minmax(0,1fr))}#characterSheet{padding:9px}#characterSheet .v32-sheet-section{padding:10px}#characterSheet .v32-sheet-section h3{margin:-10px -10px 10px}}
@media print{.v32-export-guide{display:none!important}#characterSheet .v32-sheet-columns{grid-template-columns:repeat(2,minmax(0,1fr))}#characterSheet .v32-sheet-wide{grid-column:1/-1}}

/* Milestone C combat details: readable tables on narrow screens */
.v32-sheet-section table{width:100%;border-collapse:collapse}
.v32-sheet-section{min-width:0;overflow-x:auto}
.v32-sheet-section .v32-sheet-facts{overflow-wrap:anywhere}
@media(max-width:650px){.v32-sheet-section table{font-size:13px}.v32-sheet-section th,.v32-sheet-section td{padding:7px 6px}}

/* Step 9: read-only Foundry PC-sheet-inspired layout */
#characterSheet .v32-ref-hero{display:grid;grid-template-columns:minmax(110px,19%) minmax(0,1fr) minmax(230px,31%);gap:14px;align-items:start}
#characterSheet .v32-ref-portrait{width:100%;aspect-ratio:3/4;object-fit:cover;background:#d5c5a9;border:2px solid #8a6846;border-radius:5px}
#characterSheet .v32-ref-hp{padding:9px;text-align:center;background:#f4e3c5;border:1px solid #bba17b;font-size:12px;font-weight:bold}
#characterSheet .v32-ref-hp strong{display:block;font-size:19px}
#characterSheet .v32-ref-name-row h2{margin:3px 0;font-size:24px;overflow-wrap:anywhere}
#characterSheet .v32-ref-identity{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
#characterSheet .v32-ref-identity span{background:#f5e7d1;border:1px solid #d5b994;padding:6px 9px;min-width:75px}
#characterSheet .v32-ref-identity small{display:block;color:#795841;font-size:10px}
#characterSheet .v32-ref-abilities{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
#characterSheet .v32-ref-ability{display:flex;flex-direction:column;text-align:center;background:#fff9eb;border:1px solid #bba17b;padding:5px 1px;gap:3px}
#characterSheet .v32-ref-ability span{font-size:10px;font-weight:bold}#characterSheet .v32-ref-ability strong{font-size:18px}#characterSheet .v32-ref-ability b{font-size:13px;color:#6b2b21}
#characterSheet .v32-ref-resources,#characterSheet .v32-ref-defenses,#characterSheet .v32-ref-minors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:8px}
#characterSheet .v32-ref-minors{grid-template-columns:repeat(5,minmax(0,1fr))}
#characterSheet .v32-ref-stat{min-width:0;text-align:center;background:#fff9eb;border:1px solid #c5a579;padding:5px 2px}
#characterSheet .v32-ref-stat span{display:block;font-size:10px;overflow-wrap:anywhere}#characterSheet .v32-ref-stat strong{display:block;font-size:16px;margin-top:3px}
#characterSheet .v32-ref-warning{padding:8px;background:#f7eddb;border-left:3px solid #986d32}
#characterSheet .v32-ref-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:13px 0 0;border-bottom:3px solid #6b2b21}
#characterSheet .v32-ref-tabs button{border:1px solid #a68b6a;border-bottom:0;border-radius:5px 5px 0 0;background:#eee0ca;color:#372519;padding:9px 11px;font-weight:700;cursor:pointer}
#characterSheet .v32-ref-tabs button.is-active{background:#6b2b21;color:#fff4df}
#characterSheet .v32-ref-panel{padding:14px 0}#characterSheet .v32-ref-panel[hidden]{display:none!important}
@media(max-width:900px){#characterSheet .v32-ref-hero{grid-template-columns:120px minmax(0,1fr)}#characterSheet .v32-ref-right{grid-column:1/-1}}
@media(max-width:540px){#characterSheet .v32-ref-hero{grid-template-columns:88px minmax(0,1fr);gap:9px}#characterSheet .v32-ref-abilities{grid-template-columns:repeat(3,minmax(0,1fr))}#characterSheet .v32-ref-tabs button{flex:1 1 30%;font-size:12px}#characterSheet .v32-ref-identity{gap:4px}#characterSheet .v32-ref-identity span{font-size:12px}#characterSheet .v32-ref-name-row h2{font-size:20px}}

/* Page 9 viewport stability: disable browser scroll anchoring and competing smooth scroll. */
html{scroll-behavior:auto}
body.wizard-review #characterSheet,body.wizard-review #characterSheet .v32-ref-panel{overflow-anchor:none}
body.wizard-review #characterSheet .v32-ref-tabs{scroll-margin-top:16px}

/* Page 9: Foundry v2.3.9 visual alignment; display-only. */
#characterSheet .v32-ref-preview-label{font-size:11px;font-weight:800;letter-spacing:.12em;color:#765139;margin-top:13px}
#characterSheet .v32-ref-name-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 16px}
#characterSheet .v32-ref-name-row .v32-sheet-kicker{flex-basis:100%}
#characterSheet .v32-ref-name-row>strong{padding:5px 9px;border:1px solid #c6a779;background:#f4e4c8;white-space:nowrap}
#characterSheet .v32-ref-identity span{flex:1 1 85px;min-width:0;overflow-wrap:anywhere}
#characterSheet .v32-ref-stat span{font-size:11px;line-height:1.2;min-height:27px;display:flex;align-items:center;justify-content:center}
#characterSheet .v32-ref-stat strong{font-variant-numeric:tabular-nums}
#characterSheet .v32-ref-panel{min-height:330px}
#characterSheet .v32-sheet-section h3{font-size:14px;letter-spacing:.03em}
#characterSheet .v32-ref-tabs button:focus-visible{outline:3px solid #c18a36;outline-offset:2px}
@media(max-width:540px){#characterSheet .v32-ref-panel{min-height:220px}#characterSheet .v32-ref-stat span{min-height:0;font-size:10px}#characterSheet .v32-ref-minors{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Page 9: Foundry-aligned read-only sheet refinements. */
#characterSheet .v32-ref-hero{padding:14px;background:linear-gradient(180deg,#f8eedc,#edddc4);border:1px solid #b99a72;border-radius:7px}
#characterSheet .v32-ref-name-row h2{line-height:1.12;letter-spacing:.01em}
#characterSheet .v32-ref-readonly{display:inline-block;margin-left:9px;padding:3px 6px;border:1px solid #bda17a;border-radius:3px;letter-spacing:.04em;font-size:9px;color:#61462e;background:#f4e5ca}
#characterSheet .v32-ref-ability{border-radius:4px;box-shadow:inset 0 2px 0 #d6b88b}
#characterSheet .v32-ref-ability strong{font-variant-numeric:tabular-nums;font-size:21px}
#characterSheet .v32-ref-stat{border-radius:4px;box-shadow:inset 0 2px 0 #e3cba5}
#characterSheet .v32-ref-tabs{position:relative;align-items:end}
#characterSheet .v32-ref-tabs button{min-height:42px;line-height:1.2}
#characterSheet .v32-ref-tabs button[aria-selected=true]{box-shadow:inset 0 3px 0 #e3b16e}
#characterSheet .v32-ref-panel{background:#fbf5e9;border:1px solid #d7c1a2;border-top:0;padding:15px;border-radius:0 0 6px 6px}
#characterSheet .v32-ref-panel table{width:100%;border-collapse:collapse}
#characterSheet .v32-ref-panel th,#characterSheet .v32-ref-panel td{padding:8px 10px;text-align:left;vertical-align:top;border-bottom:1px solid #dfcfb7}
#characterSheet .v32-ref-panel thead th{background:#ead7b8;color:#4e3021;font-size:12px}
#characterSheet .v32-ref-panel tbody tr:nth-child(even){background:#f5ead8}
#characterSheet .v32-ref-section-intro{font-size:12px;color:#6a5441;margin:0 0 10px}
#characterSheet .v32-ref-item-status{font-size:11px;color:#665647}
#characterSheet .v32-ref-item-status.is-equipped{font-weight:700;color:#385b36}
@media(max-width:700px){#characterSheet .v32-ref-hero{padding:9px}#characterSheet .v32-ref-panel{padding:9px;overflow-x:auto}#characterSheet .v32-ref-panel th,#characterSheet .v32-ref-panel td{padding:6px 7px}#characterSheet .v32-ref-readonly{margin-left:0}}

/* Page 9 Foundry comparison refinement 03: read-only lists and tables. */
#characterSheet .v32-ref-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
#characterSheet .v32-ref-attack-table{min-width:600px}
#characterSheet .v32-ref-skill-table{min-width:350px}
#characterSheet .v32-ref-inventory-table{min-width:390px}
#characterSheet .v32-ref-skill-table th:nth-child(n+2),#characterSheet .v32-ref-skill-table td:nth-child(n+2){text-align:center;white-space:nowrap}
#characterSheet .v32-ref-attack-table td:nth-child(n+3),#characterSheet .v32-ref-attack-table th:nth-child(n+3){white-space:nowrap;text-align:center}
#characterSheet .v32-ref-feat-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:7px}
#characterSheet .v32-ref-feat-entry{display:flex;align-items:center;gap:9px;min-height:38px;padding:7px 9px;background:#f6e9d3;border:1px solid #d0b48d;border-radius:4px;font-weight:600}
#characterSheet .v32-ref-feat-icon{display:grid;place-items:center;flex:none;width:25px;height:25px;background:#6b2b21;color:#fff4df;border-radius:3px;font-size:12px}
#characterSheet .v32-ref-inventory-summary{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:11px}
#characterSheet .v32-ref-inventory-summary span{padding:7px 11px;border:1px solid #d3bb98;background:#f6e9d3;border-radius:4px;font-size:12px}
#characterSheet .v32-ref-possessions{margin-top:12px;padding:10px;background:#f5ead8;border-left:3px solid #6b2b21}
#characterSheet .v32-ref-possessions p{margin:5px 0 0}

/* Page 3 culture-first redesign: no decorative race portrait. */
.identity-panel .v32-selection-profile{display:block;min-width:0}
.identity-panel .v32-profile-body{width:100%}
.identity-panel .v32-race-story{border-bottom:1px solid #cbb188;padding-bottom:12px;margin-bottom:15px}
.identity-panel .v32-race-story h5,.identity-panel .v21-race-content>h5{font:700 18px Georgia,serif;color:#69231c;margin:0 0 9px}
.identity-panel .v32-race-story p{font:16px/1.65 Georgia,serif;margin:0 0 10px;color:#493422}
.identity-panel .v32-race-traits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.identity-panel .v32-race-trait{background:#f4e9d4;border:1px solid #c9ad82;border-radius:5px;padding:11px 13px;min-width:0;display:flex;flex-direction:column;gap:5px}
.identity-panel .v32-race-trait strong{font:700 13px Arial,sans-serif;color:#6b241e}
.identity-panel .v32-race-trait span{font:15px/1.45 Georgia,serif;color:#30251c;overflow-wrap:anywhere}
.identity-panel .v32-race-trait small{font:12px/1.45 Arial,sans-serif;color:#66513a}
.identity-panel .v32-race-step-hint{margin:16px 0 0;border-top:1px solid #cbb188;padding-top:12px;font:13px/1.55 Arial,sans-serif;color:#624934}
@media(max-width:950px){.identity-panel .v32-race-traits{grid-template-columns:1fr}}


/* v32 nine-step visual consistency pass: wizard-only, presentation-only. */
body.wizard-ready { --v32-border:#c8a779; --v32-cream:#f7e8cb; --v32-ink:#38271c; --v32-accent:#70251c; }
body.wizard-ready .builder-grid > .panel[data-wizard-visible="true"],
body.wizard-ready .concept-panel[data-wizard-visible="true"] {
  border:1px solid var(--v32-border);border-radius:6px;
  background:linear-gradient(180deg,#fff9ed,#f8ebd4);
  box-shadow:0 6px 20px #38241216;
}
body.wizard-ready .builder-grid > .panel[data-wizard-visible="true"] .panel-title,
body.wizard-ready .concept-panel[data-wizard-visible="true"] .panel-title {
  border-bottom:2px solid #d5bb91;margin-bottom:15px;padding-bottom:12px;
}
body.wizard-ready .panel-title h3 {font:700 clamp(20px,2.2vw,25px)/1.25 Georgia,serif;color:var(--v32-ink)}
body.wizard-ready .foundry-step-tabs {gap:5px;align-items:stretch}
body.wizard-ready .foundry-step-tabs button {min-height:46px;line-height:1.25;padding:8px 5px;border:1px solid #9c784d;border-radius:4px 4px 0 0;transition:background-color .12s ease}
body.wizard-ready .foundry-step-tabs button.selected {background:var(--v32-accent);border-color:#e0b879;color:#fff6e8}
body.wizard-ready .foundry-step-tabs button:focus-visible,
body.wizard-ready .wizard-footer button:focus-visible {outline:3px solid #b66e37;outline-offset:2px}
body.wizard-ready .wizard-footer {background:#f4e5c9;border-color:var(--v32-border);border-radius:5px;min-height:70px}
body.wizard-ready .wizard-footer button {min-height:44px}
body.wizard-ready .field input,body.wizard-ready .field select,body.wizard-ready .field textarea {max-width:100%;color:#30241a}
body.wizard-ready .field label,body.wizard-ready .field>span {line-height:1.4}
body.wizard-ready .race-choice-block,body.wizard-ready .starting-package,body.wizard-ready .equipment-info {border-radius:5px}
body.wizard-ready .button:disabled,body.wizard-ready button:disabled {cursor:not-allowed;opacity:.58}
@media(max-width:800px){
 body.wizard-ready .foundry-step-tabs {overflow-x:auto;scrollbar-width:thin;padding-bottom:3px}
 body.wizard-ready .foundry-step-tabs button {min-width:95px;flex-shrink:0;font-size:12px}
 body.wizard-ready .wizard-footer {gap:8px;flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){body.wizard-ready .foundry-step-tabs button{transition:none}}


/* v32 six-page visual audit: Steps 1, 2, 5, 6, 7 and 8. Scoped to wizard only. */
body.wizard-ready .concept-panel .concept-layout,
body.wizard-ready .abilities-panel .v17-score-layout,
body.wizard-ready .details-panel .v26-feature-layout,
body.wizard-ready .skills-panel .v27-skill-layout,
body.wizard-ready .feats-panel .v28-feat-layout,
body.wizard-ready .equipment-panel .v29-equipment-layout {gap:clamp(14px,2vw,25px)}
body.wizard-ready .concept-panel .concept-fields,
body.wizard-ready .abilities-panel .v17-roll-column,
body.wizard-ready .abilities-panel .v17-ability-column,
body.wizard-ready .details-panel .v26-feature-resources,
body.wizard-ready .skills-panel .v27-skill-guide,
body.wizard-ready .feats-panel .v28-feat-guide,
body.wizard-ready .equipment-panel .v29-equipment-side {min-width:0}
body.wizard-ready .concept-panel .field,
body.wizard-ready .abilities-panel .field,
body.wizard-ready .details-panel .field,
body.wizard-ready .skills-panel .field,
body.wizard-ready .feats-panel .field,
body.wizard-ready .equipment-panel .field {line-height:1.4}
body.wizard-ready .concept-panel input,
body.wizard-ready .concept-panel select,
body.wizard-ready .concept-panel textarea,
body.wizard-ready .abilities-panel input,
body.wizard-ready .details-panel input,
body.wizard-ready .details-panel textarea,
body.wizard-ready .skills-panel input,
body.wizard-ready .feats-panel select,
body.wizard-ready .equipment-panel input,
body.wizard-ready .equipment-panel select {max-width:100%;min-height:40px;border-radius:4px}
body.wizard-ready .concept-panel textarea,
body.wizard-ready .details-panel textarea {min-height:100px;line-height:1.55}
body.wizard-ready .abilities-panel .v17-column-heading,
body.wizard-ready .skills-panel .v27-skill-guide h4,
body.wizard-ready .feats-panel .v28-feat-guide h4,
body.wizard-ready .equipment-panel .v29-equipment-side h4 {color:#67251e;font-family:Georgia,serif}
body.wizard-ready .abilities-panel #rollAssignment,
body.wizard-ready .abilities-panel #abilities,
body.wizard-ready .skills-panel #skillList,
body.wizard-ready .feats-panel #featSlots,
body.wizard-ready .equipment-panel #equipmentList {min-width:0}
body.wizard-ready .skills-panel .v27-budget-bar,
body.wizard-ready .feats-panel .v28-feat-count,
body.wizard-ready .equipment-panel .equipment-steps {border-radius:5px}
body.wizard-ready .skills-panel .skill-toolbar,
body.wizard-ready .feats-panel .v28-feat-main-head,
body.wizard-ready .equipment-panel .v29-mainhead {margin-bottom:12px}
body.wizard-ready .equipment-panel .equipment-add {align-items:end;gap:10px}
body.wizard-ready .equipment-panel .equipment-add .field {min-width:0}
body.wizard-ready .details-panel .v32-optional-details {margin-top:16px;border:1px solid #cfb58f;border-radius:5px;padding:12px;background:#f8ecd7}
body.wizard-ready .details-panel .v32-optional-details summary {font-weight:700;cursor:pointer;color:#64251e}
body.wizard-ready .skills-panel .v27-skill-guide,
body.wizard-ready .feats-panel .v28-feat-guide,
body.wizard-ready .equipment-panel .v29-equipment-side {border-radius:5px}
body.wizard-ready .skills-panel button:focus-visible,
body.wizard-ready .feats-panel button:focus-visible,
body.wizard-ready .equipment-panel button:focus-visible,
body.wizard-ready .abilities-panel button:focus-visible {outline:3px solid #b66e37;outline-offset:2px}
@media(max-width:680px){
 body.wizard-ready .equipment-panel .equipment-add {flex-wrap:wrap}
 body.wizard-ready .equipment-panel .equipment-add .field {flex:1 1 150px}
 body.wizard-ready .equipment-panel .equipment-add button {min-height:44px}
 body.wizard-ready .concept-panel .concept-fields {min-width:0}
}

/* Coordinated v32: distinct review and US Letter printable sheet */
.v32-print-heading{max-width:1100px;margin:28px auto 4px;font:700 26px Georgia,serif;color:#67251e}
.v32-print-intro{max-width:1100px;margin:0 auto 16px;font-size:13px;color:#6f5641}
.v32-interactive-heading{max-width:1100px;margin:26px auto 12px;font:700 20px Georgia,serif;color:#67251e}
.v32-print-pages{max-width:1100px;margin:0 auto}
.v32-print-page{background:#fff9ec;border:1px solid #b99b70;box-shadow:0 2px 8px #3b27191a;padding:24px 28px;margin:0 auto 20px;color:#291e17;font:12px/1.35 Georgia,serif;overflow-wrap:anywhere}
.v32-print-page header{border-bottom:2px solid #67251e;padding-bottom:9px;margin-bottom:12px}
.v32-print-page header>span{font-weight:700;letter-spacing:.12em;font-size:11px}
.v32-print-page header>small{float:right}
.v32-print-page header h2{font:700 25px Georgia,serif;margin:5px 0}
.v32-print-page header p{margin:0}
.v32-print-page h3{font:700 17px Georgia,serif;color:#67251e;margin:8px 0 10px}
.v32-print-page h4{font:700 13px Georgia,serif;color:#67251e;border-bottom:1px solid #b99b70;margin:13px 0 6px}
.v32-print-page table{border-collapse:collapse;width:100%;font:11px/1.25 Georgia,serif}
.v32-print-page th,.v32-print-page td{border:1px solid #cbb79b;padding:4px 6px;text-align:left;vertical-align:top}
.v32-print-page th{background:#f0e2cb}
.v32-print-page ul{margin:6px 0;padding-left:20px}
.v32-print-page li{margin:2px 0}
.v32-print-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.v32-print-caution{font-size:10px;font-style:italic}
body.wizard-ready .foundry-step-tabs{margin-bottom:4px}
body.wizard-ready .wizard-step-nav{margin-top:4px}
@media(max-width:650px){.v32-print-page{padding:14px}.v32-print-grid{grid-template-columns:1fr}}
@media print{
 @page{size:letter portrait;margin:11mm}
 html,body{background:#fff!important}
 .topbar,.hero,.workspace,footer,.sheet-section>.section-head,.v32-export-guide,.completion-message,.v32-print-heading,.v32-print-intro,.v32-interactive-heading,#characterSheet,.sheet-foot,.toast,.foundry-step-tabs,.wizard-step-nav{display:none!important}
 .sheet-section{display:block!important;background:#fff!important;padding:0!important;margin:0!important;border:0!important}
 .v32-print-pages{display:block!important;max-width:none!important;margin:0!important}
 .v32-print-page{display:block!important;width:100%!important;min-height:0;max-width:none!important;padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:white!important;break-after:page;page-break-after:always;color:#111!important}
 .v32-print-page:last-child{break-after:auto;page-break-after:auto}
 .v32-print-page table{font-size:9pt}
 .v32-print-page tr,.v32-print-page li,.v32-print-grid>div{break-inside:avoid;page-break-inside:avoid}
 .v32-print-page h4{break-after:avoid}
}
/* Preserve native hidden state even when a layout class sets display. */
[hidden]{display:none!important}

/* Step 9: Foundry-style review at wizard width, independent Letter sheet below. */
body.wizard-ready.wizard-review .sheet-section{max-width:none!important;width:100%;border:0!important;padding:0!important;background:transparent!important;margin:0 auto 35px!important}
.v32-review-shell{max-width:1100px;margin:0 auto 32px;padding:14px;background:#f8edda;border:1px solid #c5a77d;border-radius:5px}
.v32-review-title{border-bottom:2px solid #7b2820;margin-bottom:12px;padding:5px 3px 10px}
.v32-review-title h2{font:700 24px Georgia,serif;margin:0 0 4px;color:#552119}.v32-review-title p{margin:0;font-size:13px}
.v32-review-summary{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:10px}
.v32-review-field{grid-column:span 4;background:#f0dbb6;border:1px solid #c8aa78;border-radius:5px;padding:12px;min-width:0;overflow-wrap:anywhere}
.v32-review-field:nth-child(3n + 1):not(.v32-review-wide){grid-column:span 5}.v32-review-field:nth-child(3n + 2):not(.v32-review-wide){grid-column:span 5}.v32-review-field:nth-child(3n):not(.v32-review-wide){grid-column:span 2}
.v32-review-field.v32-review-wide{grid-column:span 12}
.v32-review-field small{display:block;font:11px Georgia,serif;color:#6e5741;margin-bottom:7px}.v32-review-field strong{display:block;font:700 15px Georgia,serif;color:#33231b}
.v32-review-issues{background:#f2dfb8;border-left:4px solid #a04731;padding:11px 12px;margin:12px 0}.v32-review-issues button{margin-left:8px;background:#6c251e;color:white;border:0;padding:7px 10px;cursor:pointer}
.v32-review-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid #d0b58d;padding:14px 4px 3px}.v32-review-actions p{margin:4px 0 0;font-size:12px}
.v32-print-shell{max-width:1100px;margin:0 auto;padding:0 0 25px}.v32-print-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 15px}.v32-print-toolbar h2{font:700 23px Georgia,serif;color:#64241d;margin:0}.v32-print-toolbar p{font-size:12px;margin:4px 0 0}
@media(max-width:700px){.v32-review-field,.v32-review-field:nth-child(n){grid-column:span 12!important}.v32-review-actions,.v32-print-toolbar{flex-direction:column;align-items:stretch}.v32-review-shell{margin:0 10px 25px}.v32-print-shell{margin:0 10px}}
@media print{.v32-review-shell,.v32-print-toolbar{display:none!important}.v32-print-shell{max-width:none!important;margin:0!important;padding:0!important}}
