body.web-account:not(.personal-game){margin:0;padding:0 0 env(safe-area-inset-bottom);min-width:320px;min-height:100dvh;background:var(--paper);color:var(--ink)}
body.web-account:not(.personal-game) *{box-sizing:border-box}.web-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px max(16px,calc((100vw - 1040px)/2));border-bottom:1px solid var(--divider);flex-wrap:wrap}
.web-brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;font-size:24px;line-height:1.1}.web-brand img{flex:none}.web-brand small{display:block;color:var(--muted);font-size:15px;margin-top:5px}
#account-nav{display:flex;gap:8px;flex-wrap:wrap}.web-main{max-width:1040px;margin:0 auto;padding:32px 16px 48px;outline:none}.web-auth{max-width:440px;margin:24px auto}.web-card{min-width:0;padding:24px;border-radius:12px;background:var(--card);margin-bottom:16px}.web-card h1,.web-card h2{margin:0 0 12px}.web-card h1{font-size:28px}.web-card h2{font-size:23px}.web-card p{color:var(--muted);margin:8px 0 18px;line-height:1.45}
body.web-account:not(.personal-game) form{display:grid;gap:16px}body.web-account:not(.personal-game) label{display:grid;gap:6px;color:var(--text-secondary);font-size:17px}body.web-account:not(.personal-game) input,body.web-account:not(.personal-game) select{width:100%;min-width:0;min-height:44px;font-size:18px}body.web-account:not(.personal-game) button{min-height:44px;padding:9px 14px}body.web-account:not(.personal-game) .primary{border:1px solid var(--accent)}body.web-account:not(.personal-game) .secondary{border:1px solid var(--control-edge)}body.web-account:not(.personal-game) button:disabled{opacity:.55;cursor:wait}body.web-account:not(.personal-game) input:focus-visible,body.web-account:not(.personal-game) button:focus-visible,body.web-account:not(.personal-game) a:focus-visible{outline:2px solid var(--focus);outline-offset:3px}body.web-account:not(.personal-game) .hint{font-size:15px;color:var(--muted);margin:0;line-height:1.4}.web-status{min-height:24px;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:var(--text-secondary)}.web-status.error{color:var(--color-red-text)}.web-status.success{color:var(--color-green)}
.web-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}.web-actions{display:flex;gap:8px;flex-wrap:wrap}.web-section-title{margin:0 0 20px;font-size:28px}.web-list{display:grid;gap:12px}.web-list-item{background:var(--control-surface);border-radius:8px;padding:16px;overflow-wrap:anywhere}.web-list-item strong{display:block;font-size:19px}.web-list-item small{display:block;color:var(--muted);margin:6px 0 12px}.web-link-box{margin:18px 0;padding:16px;border:1px solid var(--accent-text);border-radius:8px}.web-link-box input{font-size:15px;margin:8px 0}.web-inline{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}.web-skip{position:fixed;left:16px;top:-100px;padding:12px;background:var(--card);color:var(--ink);z-index:100}.web-skip:focus{top:8px}body.web-account:not(.personal-game) [hidden]{display:none!important}
@media(max-width:680px){.web-columns{grid-template-columns:1fr;gap:0}.web-header{padding:14px 16px}.web-brand{font-size:22px}.web-main{padding-top:20px}.web-auth{margin:12px auto}.web-card{padding:20px}.web-inline{grid-template-columns:1fr}.web-actions>*{flex:1}body.web-account:not(.personal-game) #account-nav{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}body.web-account:not(.personal-game) #account-nav button{flex:1}}
@media(prefers-reduced-motion:reduce){body.web-account:not(.personal-game) *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.web-character-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px;margin-top:24px}.web-trait-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.web-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.web-tabs [aria-current]{border-color:var(--accent-text);color:var(--accent-text)}.web-editor-footer{position:sticky;bottom:0;z-index:2;padding:16px;background:var(--paper);border-top:1px solid var(--divider)}.web-rating{padding:14px 0;border-bottom:1px solid var(--divider)}.web-rating-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.web-rating-title>label{flex:1;min-width:0}.web-rating-title strong{font-size:24px}.web-dots{display:flex;flex-wrap:wrap;gap:2px;margin:10px 0}.web-dots button{padding:3px;min-width:44px;min-height:44px;color:var(--muted);border:1px solid transparent;background:var(--control-surface)}.web-dots button.filled{color:var(--accent-text)}.web-dots button[aria-pressed=true]{border-color:var(--accent)}.web-dots button.starting{box-shadow:inset 0 -2px var(--accent)}body.web-account:not(.personal-game) textarea{display:block;width:100%;max-width:100%;min-width:0;resize:vertical;font:inherit;padding:10px}body.web-account:not(.personal-game) fieldset{min-width:0;border:1px solid var(--divider);border-radius:8px;padding:12px}.web-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px}body.web-account:not(.personal-game) .check-row{display:flex;align-items:center;gap:10px;min-height:44px}body.web-account:not(.personal-game) .check-row input{width:22px;min-height:22px;flex:none}.web-file{display:flex!important;align-items:center;position:relative;overflow:hidden;min-height:44px;padding:10px 14px;border:1px solid var(--control-edge);border-radius:8px;cursor:pointer}.web-file input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;max-width:100%;font-size:12px}.web-portrait{display:block;max-width:100%;max-height:350px;margin:16px auto;border-radius:12px}.web-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px}.web-summary-grid span{display:flex;justify-content:space-between;gap:12px}.web-tags{display:flex;flex-wrap:wrap;gap:8px}.web-tags span{background:var(--control-surface);padding:5px 10px;border-radius:8px}.web-magic{padding:14px;border:1px solid var(--divider);border-radius:8px;margin:12px 0}.web-discipline{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--divider)}body.web-account:not(.personal-game) details{margin:14px 0}body.web-account:not(.personal-game) summary{min-height:44px;cursor:pointer;color:var(--text-secondary)}.web-conflict{border:1px solid var(--accent)}body.web-account:not(.personal-game) .web-card label{margin-bottom:12px}.web-budget p{font-size:16px}.web-section-title small{font-size:17px;color:var(--muted)}
@media(max-width:900px){.web-trait-columns{grid-template-columns:1fr}}@media(max-width:680px){.web-editor-footer{padding:12px 0}.web-editor-footer .web-actions{display:grid;grid-template-columns:1fr 1fr}.web-editor-footer .web-actions .primary{grid-column:1/-1}.web-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.web-tabs button{padding:8px 4px;font-size:14px}}

@media(max-width:680px){.web-budget .web-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.web-budget .web-actions button:last-child:nth-child(odd){grid-column:1/-1}}
/* W4/W5: reuse the existing palette,body.web-account:not(.personal-game) typeface and control sizes. */
.game-main-nav{grid-template-columns:repeat(3,minmax(0,1fr))}body.web-account:not(.personal-game) .game-utilities{margin:0 0 16px}body.web-account:not(.personal-game) .game-subnav{margin-top:16px}body.web-account:not(.personal-game) .game-panel{min-height:120px}body.web-account:not(.personal-game) .game-roll-cards{display:grid;gap:16px;grid-template-columns:1fr}body.web-account:not(.personal-game) .game-roll-cards[data-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}body.web-account:not(.personal-game) .game-roll-cards>.web-card{margin:0}.web-separator{display:flex;align-items:center;gap:12px;padding:12px 0;grid-column:1/-1;min-height:44px;border-bottom:1px solid var(--divider);color:var(--muted)}.web-separator>span{flex:1}body.web-account:not(.personal-game) .game-resource{padding-bottom:20px}body.web-account:not(.personal-game) .game-resource progress{width:100%;height:4px;accent-color:var(--accent)}body.web-account:not(.personal-game) .game-panel .web-list-item{margin:12px 0}body.web-account:not(.personal-game) .game-panel .web-list-item h3{margin:0 0 8px}body.web-account:not(.personal-game) .game-panel .web-card>button{margin:4px 2px}body.web-account:not(.personal-game) .game-panel [data-resource="health"]{display:block;width:100%;text-align:left}body.web-account:not(.personal-game) .game-panel [aria-pressed="true"]{border-color:var(--accent);color:var(--accent-text)}body.web-account:not(.personal-game) .game-dialog{position:fixed;inset:0;margin:auto;width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:20px;color:var(--ink);background:var(--paper);border:1px solid var(--control-edge);border-radius:14px;overflow:auto;overscroll-behavior:contain;font:inherit}body.web-account:not(.personal-game) .game-dialog::backdrop{background:rgba(0,0,0,.72)}body.web-account:not(.personal-game) .game-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:var(--paper);z-index:3;padding:4px 0 12px}body.web-account:not(.personal-game) .game-dialog-head h2{margin:0;font-size:24px}body.web-account:not(.personal-game) .game-dialog-head button{min-width:44px;font-size:24px}body.web-account:not(.personal-game) .game-dialog label{margin:12px 0}body.web-account:not(.personal-game) .game-dialog button{min-height:44px}body.web-account:not(.personal-game) .game-dialog .web-actions{margin:14px 0}body.web-account:not(.personal-game) .game-dialog .web-list-item{margin:8px 0}body.web-account:not(.personal-game) .game-dialog .dice-grid{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}body.web-account:not(.personal-game) .game-dialog .die{position:static;display:grid;place-items:center;width:36px;height:36px;font-size:20px;border:1px solid var(--control-edge);border-radius:7px;background:var(--control-surface);color:var(--ink)}body.web-account:not(.personal-game) .game-dialog .result-pool{margin-bottom:20px}body.web-account:not(.personal-game) .game-dialog .result-pool h3{font-size:21px}body.web-account:not(.personal-game) .game-dialog-status{margin-top:12px;color:var(--color-red-text)}body.web-account:not(.personal-game) .game-trait-choice{border-bottom:1px solid var(--divider);padding:4px 0}body.web-account:not(.personal-game) .game-trait-choice .check-row{margin:4px 0}body.web-account:not(.personal-game) .game-quick{width:min(336px,calc(100vw - 24px));padding:16px}body.web-account:not(.personal-game) .game-quick .game-dialog-head{top:-16px}body.web-account:not(.personal-game) .game-quick-results{display:grid;gap:12px;margin-top:16px}body.web-account:not(.personal-game) .game-quick-row{display:grid;grid-template-columns:45px minmax(0,1fr);align-items:start;gap:8px}body.web-account:not(.personal-game) .game-quick-row>div{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap}body.web-account:not(.personal-game) .game-die-small{display:grid;place-items:center;min-width:36px;height:36px;background:var(--control-surface);border:1px solid var(--control-edge);border-radius:6px;font-size:20px}body.web-account:not(.personal-game) .game-wake{position:fixed;left:0;right:0;z-index:15;background:rgba(0,0,0,.72);display:grid;place-items:center;padding:16px}body.web-account:not(.personal-game) .game-wake .web-card{max-width:420px;background:var(--card);text-align:center}body.web-account:not(.personal-game) .game-wake .web-card button{margin:4px}body.web-account:not(.personal-game) .game-dialog[data-tone="success"] .result-pool,.web-list-item[data-tone="success"]{border-left:3px solid var(--color-green);padding-left:12px}body.web-account:not(.personal-game) .game-dialog[data-tone="botch"] .result-pool,.web-list-item[data-tone="botch"]{border-left:3px solid var(--color-red-text);padding-left:12px}html[data-dim-zero="yes"] .web-rating:has(.web-dots button[data-value="0"][aria-pressed="true"]){opacity:.7}body.web-account:not(.personal-game) html[data-game-animations="yes"] .game-dialog[open]{animation:game-appear .12s ease-out}@keyframes game-appear{from{opacity:.4}to{opacity:1}}@media(max-width:680px){body.web-account:not(.personal-game) .game-roll-cards[data-columns="2"]{gap:8px}body.web-account:not(.personal-game) .game-roll-cards .web-card{padding:14px}body.web-account:not(.personal-game) .game-roll-cards h3{font-size:20px}body.web-account:not(.personal-game) .game-dialog .web-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}body.web-account:not(.personal-game) .game-dialog .web-actions>.primary{grid-column:1/-1}body.web-account:not(.personal-game) .game-utilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}body.web-account:not(.personal-game) .game-utilities button{padding:8px 4px;font-size:15px}body.web-account:not(.personal-game) .game-subnav{grid-template-columns:repeat(2,minmax(0,1fr))}}body.web-account:not(.personal-game) .web-editor-footer.game-live [data-char-action="export"],body.web-account:not(.personal-game) .web-editor-footer.game-live [data-char-action="delete"],body.web-account:not(.personal-game) .web-editor-footer.game-live.game-no-draft [data-char-action="save"],body.web-account:not(.personal-game) .web-editor-footer.game-live.game-no-draft [data-char-action="cancel"]{display:none}body.web-account:not(.personal-game) .web-editor-footer.game-live.game-no-draft .web-actions{display:flex;justify-content:flex-end}body.web-account:not(.personal-game) .web-editor-footer.game-live.game-no-draft .web-actions>*{flex:none}body.web-account:not(.personal-game) .game-dialog>.game-dialog-body>button.primary{width:100%}body.web-account:not(.personal-game) .game-money-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}body.web-account:not(.personal-game) .game-money-keypad button{font-size:22px;min-height:48px}

/* W6: compact account utilities, safe areas and keyboard-sized overlays. */
.web-header{padding-top:max(12px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
.web-runtime{max-width:1040px;margin:auto;padding:0 max(16px,env(safe-area-inset-left))}.web-runtime>p,.web-runtime>aside{padding:12px 0;margin:0}.web-runtime p{color:var(--accent-text)}.web-runtime aside{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.web-runtime aside p{flex-basis:100%;margin:0}
body.web-account:not(.personal-game) .web-account-menu{margin:0;position:relative}body.web-account:not(.personal-game) .web-account-menu summary{display:flex;align-items:center;padding:9px 14px;border:1px solid var(--control-edge);border-radius:10px;background:var(--control-surface)}body.web-account:not(.personal-game) .web-account-menu>div{display:grid;gap:8px;position:absolute;right:0;top:48px;z-index:30;min-width:210px;background:var(--paper);border:1px solid var(--control-edge);border-radius:12px;padding:12px}body.web-account:not(.personal-game) .web-account-menu:not([open])>div{display:none}
body.web-account:not(.personal-game) :is(input,select,textarea,summary,button,a):focus-visible{outline:2px solid var(--focus);outline-offset:3px}.web-file:focus-within{outline:2px solid var(--focus);outline-offset:3px}
body.web-account:not(.personal-game) button,body.web-account:not(.personal-game) a,body.web-account:not(.personal-game) summary{touch-action:manipulation}body.web-account:not(.personal-game) button{min-width:44px;overflow-wrap:normal;word-break:normal}body.web-account:not(.personal-game) :is(p,h1,h2,h3,label){overflow-wrap:anywhere}body.web-account:not(.personal-game) input[type=checkbox]{min-width:22px}body.web-account:not(.personal-game) .check-row{cursor:pointer}body.web-account:not(.personal-game) summary{padding:10px 0}body.web-account:not(.personal-game) .web-account-menu summary{padding:9px 14px}
.web-main{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));padding-bottom:max(48px,env(safe-area-inset-bottom))}.web-editor-footer{padding-bottom:max(12px,env(safe-area-inset-bottom));scroll-margin-bottom:16px}body.web-account:not(.personal-game) input,body.web-account:not(.personal-game) select,body.web-account:not(.personal-game) textarea{scroll-margin-block:90px}body.web-account:not(.personal-game) .game-dialog{max-height:calc(var(--visible-height,100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));scrollbar-gutter:stable}body.web-account:not(.personal-game) .game-dialog-head h2{min-width:0}body.web-account:not(.personal-game) .game-dialog-head button{flex:none}body.web-account:not(.personal-game) .game-wake{overflow:auto;overscroll-behavior:contain}body.web-account:not(.personal-game) .game-wake .web-card{margin:0}.web-separator{flex-wrap:wrap}body.web-account:not(.personal-game) .game-panel>.web-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr))}body.web-account:not(.personal-game) .game-panel>.web-actions>*{min-width:0}body.web-account:not(.personal-game) .game-panel .web-card>button[data-resource=health][aria-pressed=true]{color:var(--ink)}
@media(max-width:680px){.web-header{gap:12px}.web-brand{font-size:20px}.web-brand small{display:none}body.web-account:not(.personal-game) #account-nav{width:auto;display:flex;margin-left:auto}.web-header #account-nav>button{padding:9px 10px}.web-main{padding-top:16px}body.web-account:not(.personal-game) .game-main-nav{margin-bottom:12px}.web-card{padding:18px}body.web-account:not(.personal-game) .game-roll-cards[data-columns="2"] h3{font-size:20px}.web-actions>button{flex:1 1 130px}.web-actions>label{flex:1 1 150px}body.web-account:not(.personal-game) .game-utilities{margin-bottom:12px}}
@media(min-width:1000px){.web-header{max-width:1120px;margin:auto}body.web-account:not(.personal-game) .game-roll-cards[data-columns="1"]{grid-template-columns:repeat(2,minmax(0,1fr))}.web-main{padding-top:24px}body.web-account:not(.personal-game) .game-utilities{justify-content:flex-end}}
@media(max-height:500px){.web-header{padding-block:8px}.web-main{padding-top:12px}.web-editor-footer{position:static}body.web-account:not(.personal-game) .game-dialog{padding:12px}body.web-account:not(.personal-game) .game-dialog-head{top:-12px}body.web-account:not(.personal-game) .game-wake{align-items:start}body.web-account:not(.personal-game) .game-wake .web-card{padding:12px}}

/* Shared styling for the two top-level account navigation controls. */
body.web-account:not(.personal-game) #account-nav .account-nav-control{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 14px;border:1px solid var(--control-edge);border-radius:10px;background:var(--control-surface);color:var(--ink);font:var(--type-label);cursor:pointer}
