@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root{color-scheme:dark;--bg:#111315;--panel:#191c1f;--panel2:#202427;--line:#2c3034;--text:#f0eeeb;--muted:#a1a5ab;--accent:#e2ad85;--green:#9cd4ad;--red:#ef9494}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px 'DM Sans',sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--text);padding:10px 14px;transition:background .15s,transform .15s}button:hover{background:#303438}button:active{transform:translateY(1px)}button:disabled{opacity:.5;cursor:wait}a{color:var(--accent)}:focus-visible{outline:2px solid var(--accent);outline-offset:4px}input,select,textarea{color:var(--text);background:#131618;border:1px solid #393e43;border-radius:7px;padding:11px 12px;max-width:100%;width:100%}textarea{min-height:90px;resize:vertical}label{display:block;color:#c2c4c7;font-size:12px;line-height:1.6}label input,label select,label textarea{margin-top:5px}input[type=checkbox]{width:auto;accent-color:var(--accent)}input[type=range]{padding:0;accent-color:var(--accent)}h1,h2,h3,h4{font-family:Manrope,sans-serif;letter-spacing:-.035em;margin:0;color:#f3f0ed}h1{font-size:30px;font-weight:750}h2{font-size:18px}h3{font-size:15px}p{line-height:1.65}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:10px;font-weight:700;color:var(--muted)}.shell{display:grid;grid-template-columns:228px 1fr;min-height:100vh}.sidebar{border-right:1px solid var(--line);background:#151719;padding:31px 19px;position:fixed;inset:0 auto 0 0;width:228px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;gap:10px;align-items:center;margin:0 8px 5px;font-family:Manrope;font-size:24px;font-weight:800;letter-spacing:-1px}.brand img{width:35px;height:35px}.brandtag{color:#878b91;font-size:10px;margin:0 8px 43px;letter-spacing:.035em}.nav{display:flex;flex-direction:column;gap:7px}.nav button{border:0;text-align:left;background:transparent;color:var(--muted);padding:13px 16px;display:flex;align-items:center;gap:13px}.nav button.active{background:#302820;color:var(--accent)}.nav svg,.toolnav svg{width:19px;height:19px;flex-shrink:0}.nav button span{flex:1}.nav small{color:#bda184;font-size:10px}.navlabel{margin:32px 16px 12px}.sidefoot{margin-top:auto;padding:24px 10px 0;color:#858a90;font-size:11px}.statusdot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#8abd99;margin-right:6px}.main{grid-column:2;min-width:0}.topbar{height:74px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;gap:16px;color:var(--muted);font-size:12px}.topbar select{width:185px;padding:8px 12px;font-size:12px;background:#1b1e20}.topbar .context{display:flex;gap:16px;align-items:center}.key{font-size:10px;padding:3px 5px;border:1px solid #414448;border-radius:4px;color:#a3a7ac}.content{max-width:1460px;margin:auto;padding:33px 36px 40px}.pagehead{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:27px}.pagehead p{color:var(--muted);margin:7px 0 0;font-size:13px}.badge{font-size:11px;display:inline-flex;align-items:center;gap:6px;background:#22282a;border:1px solid #343c3e;padding:5px 9px;border-radius:5px;color:#a6d7ba}.badge.copper{background:#30271f;border-color:#4d3c2d;color:var(--accent)}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:23px}.panelhead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px}.panelhead p{margin:4px 0 0;color:var(--muted);font-size:12px}.rollgrid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);gap:22px;align-items:start}.stack{display:grid;gap:22px}.tabs{display:flex;gap:4px;background:#111416;padding:4px;border-radius:7px;max-width:max-content}.tabs button{border:0;background:transparent;color:var(--muted);padding:7px 13px;font-size:12px}.tabs button.active{background:#313437;color:#eee}.fields{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:18px 0}.fields.three{grid-template-columns:repeat(3,1fr)}.fields .full{grid-column:1/-1}.system-select{border-left:3px solid #bda0df}.dicepicker{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin:20px 0}.diepick{padding:12px 0 9px;background:#1d2023;display:flex;align-items:center;flex-direction:column;gap:6px;border-color:#363a3e;font-size:11px;color:#b5bac0}.diepick.selected{border-color:var(--accent);background:#30271f;color:var(--accent)}.dieicon{width:42px;height:43px;display:inline-block;position:relative}.dieicon svg{width:100%;height:100%;overflow:visible}.dieicon text{font-family:Manrope;font-weight:700;font-size:15px;fill:currentColor}.stepper{display:flex;align-items:center;background:#131618;border:1px solid #393e43;border-radius:7px;overflow:hidden;height:43px;margin-top:5px}.stepper button{border:0;background:none;color:#b9bec4;font-size:19px;padding:7px 13px;border-radius:0}.stepper input{border:0;text-align:center;padding:6px;min-width:25px;background:none;margin:0;appearance:textfield}.expr{font-family:monospace;font-size:18px;letter-spacing:.03em}.expression-hint{font-size:11px;color:#959ba2;margin:9px 0}.chiprow{display:flex;gap:7px;flex-wrap:wrap}.chip{font-size:11px;padding:7px 10px;border-radius:5px;background:#202326;color:#b4b8be}.chip.active{color:var(--accent);border-color:#74533a;background:#30271f}.rollbutton{width:100%;background:var(--accent);color:#231b15;border:0;font-size:15px;font-weight:750;padding:16px;margin-top:20px;display:flex;align-items:center;justify-content:center;gap:12px;box-shadow:0 2px 15px #e2ad8510}.rollbutton:hover{background:#f0bd96}.rollbutton svg{width:20px;height:20px}.rollbelow{display:flex;align-items:center;justify-content:space-between;margin-top:13px;color:#92989e;font-size:11px}.textbutton{background:none;border:0;color:var(--muted);padding:3px;font-size:12px}.textbutton:hover{color:var(--accent);background:none}.resultpanel{min-height:383px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#2c2923 0%,#1a1d20 65%)}.resultpanel:before{content:'';position:absolute;width:260px;height:260px;border:1px solid #b7a58b0a;transform:rotate(30deg);left:calc(50% - 130px);top:36px;pointer-events:none}.resultbody{position:relative;text-align:center;padding:12px 0 14px}.resulttotal{font-family:Manrope;font-size:88px;font-weight:800;letter-spacing:-.07em;line-height:1.2;margin:9px 0;color:#f2ddcb;text-shadow:0 0 40px #e2ad8517}.resulttotal.success{color:var(--green)}.resulttotal.failure{color:var(--red)}.resultlabel{text-transform:uppercase;letter-spacing:.15em;font-size:10px;color:#b5a897}.resultinterpret{color:#c8bdaf;font-size:12px;min-height:20px;margin:8px 0 20px}.resultdice{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin:17px 0}.resultdie{height:43px;min-width:43px;border:1px solid #64513f;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;color:#edc6a6;background:#332b23;position:relative}.resultdie.dropped{opacity:.35;text-decoration:line-through}.resultdie.wild{border-color:#dc9de4;background:#392b41;color:#eac1ed}.resultdie.exploded:after{content:'✦';position:absolute;font-size:10px;top:-6px;right:-2px;color:var(--accent)}.resultmath{font:12px monospace;color:#959da5}.resultactions{display:flex;gap:8px;margin-top:20px;position:relative}.resultactions button{flex:1;font-size:11px;background:#222528}.empty-result{padding:37px 10px 18px}.empty-result .dieicon{width:80px;height:80px;color:#dcb28d;margin:7px}.empty-result h3{font-size:18px;margin:10px 0}.empty-result p{max-width:250px;margin:8px auto;color:var(--muted);font-size:12px}.sectiontitle{display:flex;align-items:center;justify-content:space-between;margin:28px 0 15px}.sectiontitle h2{font-size:16px}.sectiontitle small{color:var(--muted)}.shortcutgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.shortcut{background:#191c1f;border:1px solid var(--line);border-radius:9px;padding:16px;position:relative}.shortcut .shortcutroll{width:100%;text-align:left;border:0;padding:0;background:none}.shortcut .shortcutroll:hover h3{color:var(--accent)}.shortcut h3{font-size:13px;margin:13px 0 6px}.shortcut .expression{font:16px monospace;color:#e3bf9f}.shortcut p{font-size:10px;color:var(--muted);margin:10px 0 0}.shortcuttop{display:flex;align-items:center;justify-content:space-between}.miniicon{width:31px;height:31px;border-radius:7px;background:#302827;display:flex;align-items:center;justify-content:center;color:var(--accent)}.shortcuttools{display:flex;gap:3px;margin-top:13px;flex-wrap:wrap}.shortcuttools button{padding:4px 7px;font-size:11px}.empty{border:1px dashed #41474b;border-radius:9px;padding:25px;text-align:center;color:var(--muted);font-size:12px;line-height:1.8}.empty button{margin-top:12px}.timelabel{display:flex;justify-content:space-between;color:#8e959b;font-size:9px;margin-top:8px}.recent{margin-top:27px}.recentrow{display:flex;align-items:center;gap:13px;padding:15px 0;border-bottom:1px solid #2a2f33}.recentrow:last-child{border:0}.recentrow .recenttitle{flex:1;min-width:0}.recentrow h3{font-size:12px;font-weight:600}.recentrow p{font-size:10px;margin:5px 0 0;color:var(--muted)}.recentvalue{font-family:Manrope;font-size:20px;color:#e1c3a8}.recentrow button{padding:5px 7px;font-size:11px}.footerline{margin-top:32px;padding-top:20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:10px;color:#737b83}.systemcards{display:grid;grid-template-columns:1fr 1fr;gap:18px}.systemcard h2{margin:12px 0 6px}.systemcard p{font-size:12px;color:var(--muted)}.systemcard .editions{font-size:11px;color:var(--accent)}.actions{display:flex;gap:8px;flex-wrap:wrap}.primary{background:var(--accent);color:#241b14;border-color:var(--accent);font-weight:650}.danger{color:#f2a0a0}.formline{margin-bottom:15px}.formline .help{font-size:11px;color:var(--muted);margin-top:6px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.stat{padding:20px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}.stat strong{display:block;font:700 28px Manrope;margin:8px 0 0}.stat span{font-size:11px;color:var(--muted)}.filters{display:flex;gap:10px;flex-wrap:wrap;margin:22px 0}.filters input,.filters select{flex:1;min-width:120px;font-size:12px}.filters input[type=date]{flex:0 1 160px}.historyitem{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:16px 20px;margin-bottom:12px}.historytop{display:flex;align-items:center;justify-content:space-between;gap:12px}.historytop h3{font-size:14px}.historytop p{margin:5px 0;color:var(--muted);font-size:11px}.historyvalue{font:750 29px Manrope;color:var(--accent)}.historyitem details{margin-top:12px;font-size:12px;color:var(--muted)}summary{cursor:pointer}.historyitem .actions{margin-top:12px}.historyitem .actions button{font-size:11px;padding:7px 10px}pre{white-space:pre-wrap;word-break:break-word;background:#111416;border-radius:7px;padding:14px;font-size:11px;max-height:330px;overflow:auto;color:#aebbc5}.histogrambars{display:flex;height:140px;align-items:end;gap:4px;margin-top:20px;border-bottom:1px solid #444}.histogrambars div{flex:1;background:#c09a79;min-width:2px;position:relative;border-radius:3px 3px 0 0}.histogrambars span{position:absolute;top:100%;left:0;right:0;text-align:center;font-size:9px;color:var(--muted);padding-top:5px}.distribution{margin-bottom:30px}.eventtrack{height:23px;background:#101315;position:relative;border-radius:4px}.eventtrack i{position:absolute;height:100%;min-width:4px;background:var(--accent);border-radius:3px}.pass{color:var(--green)}.fail,.error{color:var(--red)}.notice{padding:12px 15px;border:1px solid #544437;border-radius:8px;background:#2a241f;color:#d3bfa9;font-size:12px;line-height:1.7;margin:17px 0}.portrait{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#30271f;display:flex;align-items:center;justify-content:center;font-size:21px;color:var(--accent)}.charhead{display:flex;align-items:center;gap:13px;margin-bottom:14px}.character-card p{font-size:12px;color:var(--muted)}.character-card.active{border-color:#987151}.campaignhead{display:flex;align-items:center;justify-content:space-between;margin:25px 0 14px}.mode-toggle{display:flex;align-items:center;gap:7px}.settingsgrid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.settingsgrid .panel h2{margin-bottom:20px}.checkline{display:flex;align-items:center;gap:10px;margin:15px 0;color:#c5c9ce;font-size:12px}.checkline input{margin:0}.toggle{accent-color:var(--accent)}dialog{background:#1b1e21;color:var(--text);border:1px solid #44494f;border-radius:14px;max-width:590px;width:calc(100% - 30px);padding:25px;max-height:90vh;overflow:auto;box-shadow:0 30px 90px #0008}dialog::backdrop{background:#050709b8;backdrop-filter:blur(5px)}dialog h2{margin-bottom:20px}dialog .dialogfoot{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}#toast{position:fixed;bottom:30px;left:calc(50% + 70px);transform:translateX(-50%);background:#e6cfbb;color:#211a14;padding:12px 20px;border-radius:8px;font-size:12px;z-index:100;max-width:90vw;box-shadow:0 5px 30px #0006;display:none}#toast.visible{display:block}.rolling .resulttotal{animation:pulse .14s infinite alternate}.rolling .resultdie{animation:shake .2s infinite alternate}@keyframes pulse{to{opacity:.3;transform:translateY(-3px)}}@keyframes shake{to{transform:rotate(9deg) translateY(-4px)}}.mobile-brand{display:none}.labnav{display:flex;gap:10px;flex-wrap:wrap}.limited{font-size:11px;color:#a5adb4;margin:8px 0}.toolnav{display:flex;gap:8px}.toolnav button{display:flex;gap:7px;align-items:center;font-size:11px}.toolnav svg{width:15px}.row{display:flex;gap:10px;align-items:center}.spaced{justify-content:space-between}.mt{margin-top:20px}.portrait-preview{max-width:80px;max-height:80px}.hide{display:none!important}
@media(min-width:1500px){.content{padding-top:40px}.rollgrid{grid-template-columns:1.65fr 1fr}.dicepicker{gap:13px}.diepick{padding:17px 0}.dieicon{width:47px;height:47px}.resultpanel{min-height:419px}}
@media(max-width:1150px){.shell{grid-template-columns:190px 1fr}.sidebar{width:190px;padding:27px 12px}.brand{font-size:21px}.brandtag{font-size:8px}.content{padding:27px 23px}.topbar{padding:0 23px}.rollgrid{grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr)}.dicepicker{gap:5px}.dieicon{width:32px;height:35px}.shortcutgrid{grid-template-columns:repeat(2,1fr)}.keyhint{display:none}.fields.three{grid-template-columns:1fr 1fr}.systemcards{gap:14px}}
@media(max-width:900px){.rollgrid{grid-template-columns:1fr}.rollright{display:grid;grid-template-columns:1fr 1fr;gap:16px}.resultpanel{min-height:360px}.recent{margin-top:0}.shortcutgrid{grid-template-columns:repeat(3,1fr)}.settingsgrid{grid-template-columns:1fr}.grid3{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.shell{display:block}.sidebar{inset:auto 0 0;width:100%;height:70px;padding:4px 6px max(4px,env(safe-area-inset-bottom));border-right:0;border-top:1px solid #353a3f;background:#171a1df5;backdrop-filter:blur(15px)}.sidebar .brand,.sidebar .brandtag,.sidebar .navlabel,.sidebar .toolnav,.sidefoot,.nav.tools{display:none}.nav{flex-direction:row;justify-content:space-around;gap:0;width:100%;height:100%}.nav button{padding:7px 4px;gap:4px;flex-direction:column;font-size:10px;border-radius:7px;min-width:52px}.nav button.active{background:none}.nav svg{width:19px;height:19px}.nav button span{flex:0}.nav small{display:none}.topbar{height:64px;padding:0 17px}.topbar .breadcrumb{display:none}.mobile-brand{display:flex;font-size:20px;align-items:center;gap:5px;font-family:Manrope;font-weight:750;letter-spacing:-.7px}.mobile-brand img{width:29px;height:29px}.topbar .context{gap:7px}.topbar select{width:137px;font-size:11px}.content{padding:24px 16px 100px}.pagehead{margin-bottom:22px}.pagehead h1{font-size:26px}.pagehead p{font-size:11px;max-width:250px}.pagehead .badge{display:none}.panel{padding:19px}.rollright{display:flex;flex-direction:column;gap:18px}.rollright>*{width:100%}.resultpanel{min-height:355px}.dicepicker{gap:5px}.dieicon{width:35px;height:38px}.diepick{font-size:10px;padding:9px 0}.shortcutgrid{grid-template-columns:1fr 1fr}.shortcut{padding:14px}.fields.three{grid-template-columns:1fr 1fr}.systemcards{grid-template-columns:1fr}.grid3{grid-template-columns:1fr 1fr}.pagehead .toolnav{display:none}.footerline{display:block;line-height:2}.filters input,.filters select{min-width:42%;max-width:100%}.historyitem{padding:14px}#toast{left:50%;bottom:85px}.tabs button{padding:7px 10px}.settingsgrid{gap:16px}.sectiontitle h2{font-size:15px}.labnav button{font-size:11px}.historytop .badge{display:none}.topbar .status{display:none}}
@media(max-width:330px){.content{padding:15px 8px 85px}.panel{padding:12px}.topbar{padding:0 8px}.mobile-brand{font-size:16px}.topbar select{width:110px}.dicepicker{grid-template-columns:repeat(4,1fr)}.fields,.fields.three,.shortcutgrid,.grid3{grid-template-columns:1fr}.pagehead h1{font-size:22px}.nav button{min-width:0;font-size:8px}.nav svg{width:16px}.rollbelow{flex-wrap:wrap;gap:8px}.toolnav{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.ff-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:25px}.ff-tabs button{font-size:12px;padding:10px 13px}.ff-tabs .active{background:#372b21;border-color:#a87950;color:var(--accent)}.ff-hero{display:flex;justify-content:space-between;align-items:center;padding:30px;background:radial-gradient(ellipse at top right,#4b352421,#191c1f)}.ff-hero h2{font-size:25px;margin-top:10px}.ff-hero p{max-width:490px}.ff-mark{font-family:Manrope;font-weight:800;letter-spacing:-6px;font-size:85px;color:#d6aa7b;transform:rotate(-12deg);padding:5px 25px}.ff-book h2{margin:20px 0 8px}.ff-book .chip{font-size:10px}.ff-ministats,.ff-combat-stats{display:flex;gap:24px;margin:22px 0}.ff-ministats span,.ff-combat-stats span{font-size:10px;color:var(--muted);letter-spacing:.1em}.ff-ministats b,.ff-combat-stats b{display:block;font:700 28px Manrope;color:#ead0b6;letter-spacing:-1px;margin-top:3px}.ff-adventurehead{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:22px 0}.ff-adventurehead h2{font-size:26px;margin:6px 0}.ff-adventurehead p{margin:5px 0}.ff-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:20px 0}.ff-stat{padding:20px 18px;background:linear-gradient(135deg,#24282b,#1b1e21);border:1px solid #3b4145;border-radius:12px}.ff-statvalue{font:750 44px Manrope;color:#edcfb2;margin:8px 0;letter-spacing:-2px}.ff-statvalue small{font:400 17px Manrope;color:#8d969d;letter-spacing:0}.ff-stat p{font-size:10px;margin:4px 0 15px}.ff-statbuttons{display:flex;gap:6px}.ff-statbuttons button{min-height:43px;flex:1;padding:8px}.ff-statbuttons button:first-child,.ff-statbuttons button:last-child{font-size:19px}.ff-fear{border-color:#6c4341}.ff-fear .ff-statvalue{color:#efaaa1}.ff-quickactions{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0}.ff-quickactions button{min-height:46px;flex:1 1 125px}.ff-outcome{background:#28231e;border:1px solid #544232;border-radius:11px;padding:19px;margin:20px 0}.ff-outcome h3{font-size:15px;margin-top:9px;line-height:1.6}.ff-total{font:750 32px Manrope;color:#e9c6a5;margin-left:auto}.ff-steps{display:flex;gap:7px;flex-wrap:wrap;margin:20px 0}.ff-steps span{padding:9px 12px;background:#202528;border-radius:6px;font-size:11px;color:var(--muted)}.ff-steps .active{background:#473426;color:#edc39c}.ff-generation>.row{padding:13px 0;border-bottom:1px solid var(--line);gap:10px}.ff-generation button{font-size:11px}.ff-resources{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:20px}.ff-resources button{flex:1;min-width:80px;text-align:left}.ff-resources span{text-transform:uppercase;font-size:10px;color:var(--muted);display:block}.ff-resources strong{font:700 23px Manrope;color:var(--accent);display:block;margin-top:4px}.ff-item{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line);gap:12px}.ff-item h3{font-size:12px}.ff-item p{margin:5px 0}.ff-item button{font-size:11px;padding:7px 10px}.ff-versus{display:flex;align-items:center;justify-content:center;gap:40px;margin:25px 0}.ff-versus>div{text-align:center}.ff-versus strong{font:750 52px Manrope;display:block;color:#e1bb97}.ff-roundline{font-size:13px;line-height:1.8;text-align:center;color:#b8b6b4}.ff-defeat{background:#3d2424;border-color:#87524c;color:#ffd2c9}.ff-rolling{animation:pulse .2s infinite alternate}
@media(max-width:650px){.ff-hero{padding:22px}.ff-hero h2{font-size:22px}.ff-mark{display:none}.ff-tabs{gap:5px}.ff-tabs button{font-size:10px;padding:9px}.ff-adventurehead{align-items:start;flex-direction:column}.ff-stats{gap:7px}.ff-stat{padding:14px 9px}.ff-statvalue{font-size:36px}.ff-statvalue small{font-size:13px}.ff-statbuttons{gap:3px}.ff-statbuttons button{font-size:10px;padding:4px;min-height:42px}.ff-stat .eyebrow{font-size:9px}.ff-versus{gap:25px}.ff-quickactions button{flex-basis:40%;font-size:12px}.ff-generation .row{flex-wrap:wrap}.ff-combat-stats{justify-content:space-between}.ff-stats .ff-stat:nth-child(n+4){grid-column:auto}.ff-item .actions{flex-wrap:nowrap}}
@media(max-width:330px){.ff-stats{grid-template-columns:1fr}.ff-statvalue{font-size:33px}.ff-tabs button{font-size:9px}.ff-steps{gap:4px}.ff-steps span{padding:5px;font-size:10px}}
.brand .brandname{font-size:21px;line-height:1.06;letter-spacing:-.7px}.brandtag{font-size:8px;letter-spacing:.025em;margin-top:9px}.mobile-brand .brandname{font-size:15px;line-height:1.02;letter-spacing:-.4px}
@media(max-width:330px){.mobile-brand .brandname{font-size:12px}.mobile-brand img{width:23px;height:23px}}
.ff-character-entry{display:flex;gap:25px;align-items:center;margin-bottom:25px;padding:27px;background:radial-gradient(ellipse at top left,#315a482e,#1a1d20 70%);border-color:#4a6055}.ff-entry-mark{font:800 48px Manrope;color:#bcdfc8;transform:rotate(-12deg);min-width:100px;text-align:center}.ff-entry-copy h2{font-size:21px;margin:8px 0}.ff-entry-copy p{color:var(--muted);font-size:12px;margin:8px 0 17px}.ff-optional{margin:18px 0;padding:15px;border:1px solid var(--line);border-radius:8px}.ff-optional>summary{font-size:12px;color:var(--muted)}
@media(max-width:650px){.ff-character-entry{gap:15px;padding:21px;align-items:start}.ff-entry-mark{font-size:32px;min-width:52px;padding-top:16px}.ff-entry-copy h2{font-size:19px}.ff-entry-copy .actions{flex-direction:column}.ff-entry-copy .actions button{width:100%;font-size:12px;min-height:45px}.ff-entry-copy{min-width:0;flex:1}.ff-optional{padding:13px}}
@media(max-width:330px){.ff-entry-mark{display:none}}
.ff-current-page{display:flex;align-items:center;justify-content:space-between;margin:20px 0;padding:19px 24px;border:1px solid #52685b;border-radius:12px;background:linear-gradient(115deg,#26382d,#1c2322)}.ff-current-page strong{display:block;font:750 42px Manrope;color:#cde5d6;line-height:1.3}.ff-continue{border-color:#5c4938;background:linear-gradient(135deg,#2c251f,#1c2022)}.ff-continue h2{font-size:20px}.ff-continue-actions{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:10px;margin-top:18px}.ff-continue-actions button{min-height:49px}.ff-page-event{padding:11px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;font-size:12px}.ff-page-event time{color:var(--muted);font-size:10px;white-space:nowrap}.ff-note-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;color:#d0d2d2}.ff-journal article{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.ff-ending{text-align:center;padding:32px;margin:22px 0}.ff-ending h2{font-size:29px;margin:10px 0 16px}.ff-ending>p{max-width:620px;margin:16px auto;color:#c9cdcc}.ff-victory{background:radial-gradient(ellipse at 50% 0,#38553c,#1b2220 75%);border-color:#66866b}.ff-loss{background:radial-gradient(ellipse at 50% 0,#50392f,#211e1b 75%);border-color:#826351}.ff-ending-symbol{font-size:58px;color:#e8c291;line-height:1.2;margin-bottom:15px}.ff-ending-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:23px auto;max-width:680px}.ff-ending-actions button{min-height:49px}.ff-ending>.actions{justify-content:center}.ff-ending .small.muted{font-size:11px;color:#a6aca8}
@media(max-width:650px){.ff-continue-actions{grid-template-columns:1fr 1fr;gap:8px}.ff-continue-actions button:first-child{grid-column:1/-1}.ff-continue-actions button{font-size:12px;padding:10px}.ff-ending{padding:24px 18px}.ff-ending h2{font-size:24px}.ff-ending-actions{display:grid;grid-template-columns:1fr}.ff-ending-actions button{width:100%}.ff-current-page{padding:16px 19px}.ff-current-page>.muted{max-width:105px;text-align:right}.ff-page-event{align-items:start}.ff-page-event span{flex:1}}
.system-illustrated{padding:0;overflow:hidden}.system-picture{height:260px;display:flex;align-items:center;justify-content:center;background:#080b0c;border-bottom:1px solid var(--line)}.system-picture img{width:100%;height:100%;object-fit:contain;padding:10px;display:block}.systemcardbody{padding:23px}.systemcardbody h2{margin-top:0}.roller-system-heading{display:flex;gap:12px;align-items:center}.roller-system-heading>img{border-radius:10px;object-fit:cover;flex-shrink:0;border:1px solid #625341}.system-miniicon{position:relative;border-radius:7px;overflow:hidden;object-fit:cover}.system-miniicon>img{width:100%;height:100%;object-fit:cover;display:block}.shortcut-custom-icon{position:absolute;right:0;bottom:0;font-size:8px;background:#101315db;border-radius:3px;padding:1px 2px;color:#e7bc91}.system-portrait{object-fit:cover}.ff-entry-art{width:150px;height:140px;object-fit:contain;flex-shrink:0;border-radius:12px}.ff-hero-art{width:270px;max-width:38%;height:245px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 8px 20px #0005)}.ff-character-heading{display:flex;gap:15px;align-items:center;min-width:0}.ff-character-heading>img{width:62px;height:62px;border-radius:14px;object-fit:cover;flex-shrink:0;border:1px solid #766348}.ff-character-heading>div{min-width:0}.ff-book-selection-banner{display:flex;gap:24px;align-items:center;margin-bottom:24px;border:1px solid #65532b;background:radial-gradient(ellipse at 0 50%,#4b3e182e,#191c1f);padding:20px;border-radius:13px}.ff-book-selection-banner>img{width:155px;height:145px;object-fit:contain;flex-shrink:0}.ff-book-selection-banner .pagehead{margin-bottom:0}.ff-book-selection-banner h1{font-size:27px}
@media(max-width:1000px){.ff-hero-art{width:210px;height:210px}.system-picture{height:225px}}
@media(max-width:650px){.ff-entry-art{width:82px;height:82px;margin-top:9px}.ff-character-entry{gap:15px}.ff-hero{align-items:center;gap:15px}.ff-hero-art{width:100px;height:125px;max-width:33%;filter:none}.ff-hero h2{font-size:20px}.ff-hero p{font-size:12px}.ff-character-heading{gap:12px}.ff-character-heading>img{width:48px;height:48px;border-radius:10px}.ff-book-selection-banner{gap:13px;padding:14px}.ff-book-selection-banner>img{width:80px;height:90px}.ff-book-selection-banner h1{font-size:20px}.ff-book-selection-banner p{font-size:11px}.system-picture{height:240px}.systemcardbody{padding:20px}.roller-system-heading>img{width:39px;height:39px}.roller-system-heading{gap:9px}.roller-system-heading h2{font-size:16px}.roller-system-heading p{font-size:10px}}
@media(max-width:330px){.ff-entry-art{width:56px;height:64px}.ff-book-selection-banner{flex-direction:column;align-items:start}.ff-hero-art{display:none}.system-picture{height:200px}}@media(max-width:700px){}@media(max-width:300px){}

/* Keep adventure play focused; all editable fields stay readable without iPhone focus zoom. */
.ff-play-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 18px}.ff-play-header h2{margin-top:5px;font-size:23px}.ff-play-header .actions button{min-height:46px}.ff-play-details{border:1px solid var(--line);border-radius:10px;margin-top:14px;padding:16px;background:var(--panel)}.ff-play-details>summary{cursor:pointer;font-weight:600;min-height:24px}.ff-play-details>.panel{border:0;padding:18px 0 0;background:none}.ff-history-bottom{border-top:1px solid var(--line);margin-top:28px;padding-top:8px}.ff-history-bottom .ff-page-activity{background:transparent}.dialogfoot{position:sticky;bottom:0;background:var(--panel);padding-top:14px}#ffNextPage{font-size:18px;min-height:50px}dialog{max-height:85dvh;overflow:auto}
@media(max-width:700px),(pointer:coarse){input:not([type=checkbox]):not([type=range]),select,textarea,.topbar select{font-size:16px!important}input,select{min-height:44px}.ff-play-header{align-items:flex-start;flex-direction:column}.ff-play-header>.actions{width:100%}.ff-play-header>.actions button{flex:1}.ff-play-header .ff-character-heading .eyebrow{font-size:10px}.ff-play-details{padding:15px}.ff-play-details>summary{min-height:30px}}

.ff-adventure-navigation{margin-top:24px;gap:10px}.ff-adventure-navigation button{min-height:46px}@media(max-width:650px){.ff-adventure-navigation button{flex:1}}

.ff-roll-breakdown{min-width:0;margin-top:1rem}.ff-equation{line-height:1.7;overflow-wrap:anywhere;margin-top:.5rem}.ff-roll-breakdown .row{flex-wrap:wrap;gap:.75rem}

.ff-outcome h3,.ff-page-event>span,.ff-app .historyitem h3{white-space:pre-line}.story-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;font-size:16px;margin:20px 0 4px;max-width:80ch}.story-choices{display:grid;gap:10px;margin-top:20px}.story-choices button{display:flex;justify-content:space-between;align-items:center;gap:16px;text-align:left;min-height:54px;padding:16px 20px;font-size:15px;line-height:1.6}.story-choices button span{color:var(--accent)}.story-history{border-top:1px solid var(--line);padding:14px 0}.story-history p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 8px}@media(max-width:650px){.story-text{font-size:16px;line-height:1.8}.story-choices button{font-size:15px;padding:14px 16px}}

/* Keep the outcome below the page heading and above setup and shortcuts. */
.roll-outcome{margin-bottom:24px}

/* Compact mobile outcomes retain readable totals and touch-friendly actions. */
@media(max-width:650px){
 .roll-outcome{min-height:0;padding:14px 16px;margin-bottom:18px}
 .roll-outcome .resultbody{padding:4px 0}
 .roll-outcome .resulttotal{font-size:56px;line-height:1.1;margin:5px 0}
 .roll-outcome .resultinterpret{margin:5px 0 8px;min-height:0}
 .roll-outcome .resultdice{margin:8px 0;gap:6px}
 .roll-outcome .resultdie{height:34px;min-width:34px;font-size:16px}
 .roll-outcome .resultactions{margin-top:10px;flex-wrap:wrap}
 .roll-outcome .resultactions button{min-height:44px}
 .roll-outcome .empty-result{padding:5px 0}
 .roll-outcome .empty-result .dieicon{width:40px;height:40px;margin:3px}
 .roll-outcome .empty-result h3{font-size:16px;margin:4px 0}
 .roll-outcome .empty-result p{margin:4px auto;max-width:30ch}
}

/* Individual percentile dice, including the automatically rolled shared units die. */
.percentile-physical{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;margin:14px 0}.percentile-face{display:flex;flex-direction:column;align-items:center;gap:6px}.percentile-face .resultdie{min-width:52px}.selected-percentile{outline:2px solid var(--accent);outline-offset:3px}.san-loss-dice{justify-content:center}

.percentile-setup{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.percentile-setup>span{display:grid;grid-template-columns:32px 1fr;column-gap:9px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:10px 14px;font-size:12px}.percentile-setup .dieicon{grid-row:span 2;width:28px}.percentile-setup small{color:var(--muted);font-size:11px}

/* Production: one focused roller column and compact outcomes. */
.rollgrid{grid-template-columns:minmax(0,1fr) 300px}.roll-outcome .resultbody{padding-top:10px;padding-bottom:10px}.roll-outcome .resulttotal{font-size:58px}@media(max-width:900px){.rollgrid{grid-template-columns:1fr}.rollright{display:none}.roll-outcome .resulttotal{font-size:46px}.roll-outcome .resultbody{padding:8px 0}}
