:root{--story-font-size:18px;--ui-font-size:14px}
body{font-size:var(--ui-font-size)}
.game-side .kv,.game-side .lnm,.game-side .qd,.game-side .hint,.game-side .field>span,.game-side .field input,.game-side .field textarea,.game-side .field select,.game-side .qitem,.game-side .tab,#modalDialog .field>span,#modalDialog .field input,#modalDialog .field textarea,#modalDialog .field select{font-size:var(--ui-font-size)}
#screenGame .suggest-bar button,#screenGame .hud-goal,#screenGame .hud-goal .hg-lb,#screenGame .hud-goal .hg-t,#screenGame .hud-goal .hg-risk,#screenGame .statusbar .sb-time,#screenGame .game-hud .hb-lb,#screenGame .game-hud .hb-v,#screenGame .hud-summary-row span,#screenGame .hud-summary-block span,#screenGame .hud-summary-row strong,#screenGame .hud-summary-block strong,#modalDialog .hint,#modalDialog .small{font-size:var(--ui-font-size)}
#screenGame .composer #actionInput{font-size:max(16px,var(--ui-font-size))}
#screenGame .narrative p,#screenGame .narrative .txt{font-size:var(--story-font-size);line-height:1.95;overflow-wrap:anywhere}
.play-options{line-height:1.7}.play-options>label{display:block;margin:18px 0}.play-options input[type=range]{display:block;width:100%;margin-top:12px;min-height:28px}.play-options output{float:right;color:var(--gold)}
.play-toggle{display:flex!important;align-items:flex-start;gap:12px}.play-toggle input{width:20px;height:20px;flex:none;margin:4px 0}.play-toggle strong,.play-toggle small{display:block}.play-toggle small{color:var(--text-2);margin-top:4px}.play-font-sample{border:1px solid var(--line);padding:16px;border-radius:8px;background:var(--sunken)}#playNotice{color:var(--danger-soft)}
.play-settings-shortcut{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:4px 0 8px}.play-settings-shortcut .btn{min-height:32px}
.inventory-window .inv-item,.inventory-window .inv-slot>span:last-child,.inventory-window .inv-item-description,.inventory-window .inv-button,.inventory-window .inv-tools input{font-size:var(--ui-font-size);line-height:1.65}
.inventory-window .inv-slot small,.inventory-window .inv-detail small,.inventory-window .inv-bag-toolbar small{font-size:calc(var(--ui-font-size) - 1px)}
.inventory-window .inv-item{background:var(--sunken);color:var(--text-1);min-height:104px;padding:12px 8px}.inventory-window .inv-item>span:last-child{width:100%;white-space:normal;overflow-wrap:anywhere;font-weight:500}.inventory-window .inv-slot>span:last-child{white-space:normal;width:100%}
.inventory-window .inv-symbol{color:var(--gold)}.inventory-window .inv-portrait p,.inventory-window .inv-portrait summary,.inventory-window .inv-effects,.inventory-window .inv-pagination{color:var(--text-2)}
.inventory-window .inv-item:focus-visible,.inventory-window .inv-slot:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.narr-hl-dialogue{color:#afcde2}.narr-hl-person{color:#d4bc93;font-weight:600}.narr-hl-item{color:#bfaad8;font-weight:600}.narr-hl-term{color:#93c4be;font-weight:500}.narr-hl{border-radius:2px;text-decoration:underline;text-decoration-color:currentColor;text-underline-offset:3px;text-decoration-thickness:1px}
.play-highlight{border:1px solid var(--line);padding:0 14px 12px;border-radius:8px;margin:20px 0}.play-highlight legend{color:var(--gold);padding:0 6px}.play-highlight textarea{display:block;box-sizing:border-box;width:100%;min-height:80px;background:var(--sunken);color:var(--text);border:1px solid var(--line);padding:10px;font:inherit;resize:vertical}.play-highlight-legend{font-size:var(--ui-font-size)}
.status-sync-note{font-size:var(--ui-font-size);color:var(--text-2);line-height:1.5}.status-sync-note.pending{color:#e0b991}.status-sync-note:empty{display:none}
#screenGame .game-main{position:relative}
#screenGame #hudToast{display:none;position:absolute;width:0;height:0;padding:0;margin:0;overflow:hidden;pointer-events:none}
#screenGame .game-main>.statusbar,#screenGame .game-main>.hud-goal,#screenGame .game-main>.suggest-bar,#screenGame .game-main>.status-sync-note,#screenGame .game-main>.tempbar,#screenGame .game-main>.composer{flex:0 0 auto}
#screenGame .narrative-wrap{flex:1 1 0;min-height:0}
#screenGame .tempbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;box-sizing:border-box;width:100%;max-width:none;min-height:0;padding:4px 18px;margin:0}
#screenGame .tempbar>.btn,#screenGame .temp-toggle,#screenGame .latest-narrative{flex:0 0 auto;min-height:32px;margin:0;font-size:var(--ui-font-size)}
#screenGame .tempbar>.latest-narrative{float:none;margin-left:auto}
#screenGame .temp-body{flex:1 0 100%;width:100%;box-sizing:border-box;max-height:160px;overflow:auto}
#screenGame .status-sync-note{margin:0;padding:0 18px;max-height:64px;overflow:auto}
.round-receipt{margin:8px 0 14px;border-top:1px solid var(--line);color:var(--text-2);font-size:var(--ui-font-size);max-width:100%}
.round-receipt>summary{padding:8px 2px;cursor:pointer;line-height:1.5;list-style-position:inside}
.round-receipt-body{max-height:220px;overflow:auto;overscroll-behavior:contain;padding:0 8px 8px}
.check-status{font-size:12px;max-width:100%;white-space:normal;text-align:left;color:var(--text-2)}
.check-status.off{color:#d8ba83;border-color:#9b8354}
#screenGame .narrative .round-roll{margin:6px 0;font-size:var(--ui-font-size)}
#screenGame .narrative .round-receipt-body p{font-size:var(--ui-font-size);line-height:1.6;margin:6px 0;color:var(--text-2);overflow-wrap:anywhere}
@media(max-width:760px){#screenGame .tempbar{padding:3px 8px}#screenGame .tempbar>.btn,#screenGame .temp-toggle,#screenGame .latest-narrative{font-size:12px;min-height:30px}.round-receipt-body{max-height:180px}}
@media(max-width:760px){.inventory-window .inv-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.inventory-window .inv-accessory-group>div{grid-template-columns:repeat(3,minmax(0,1fr))}.play-settings-shortcut{margin:0 8px 6px}.play-settings-shortcut .btn{font-size:var(--ui-font-size)}.inventory-window .inv-slot small{font-size:calc(var(--ui-font-size) - 1px)}#screenGame .suggest-bar{max-height:none}#screenGame .suggest-bar button{line-height:1.5}}
