/* Slate & Mint — v20. A single compact visual system for every screen. */
:root{--bg:#101716;--surface:#1b2422;--surface2:#222e2a;--surface3:#2c3a35;--text:#eef4f1;--muted:#afbeb7;--dim:#a0b2a8;--line:#3c4c45;--accent:#a6ddc4;--accent-bg:#223d30;--green:#a6ddc4;--danger:#f1aaa4;--radius:12px;--sans:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
::selection{background:#365a47;color:var(--text)}
body{font-size:14px}button,input,select,textarea{font-family:var(--sans)}
input,select,textarea{background:var(--bg);border-color:var(--line);font-size:16px}
input::placeholder,textarea::placeholder{color:var(--dim)}
.btn,.btn.sm{min-height:44px;font-size:13px;border-radius:9px}
.btn.primary{color:#10251b;background:var(--accent);border-color:var(--accent)}
.btn.secondary{background:transparent;border-color:var(--line)}
.btn.toggle-on,.filter-btn.active,.expertise-chip.selected,.faction-option.is-selected,.skill-check.on{background:var(--accent-bg);border-color:#5b806b;color:var(--accent)}
.btn.square,.btn.circle,.icon-btn,.character-link,.skill-check,.modal-close,.help-close{width:44px;min-width:44px;height:44px;min-height:44px}
.help-trigger{width:44px;height:44px;min-width:44px;min-height:44px;border:0;border-radius:0;background:transparent;padding:0;font-size:12px}
.help-trigger::before{width:20px;height:20px;border-color:#748b7e;border-radius:6px}
.btn.help-trigger{background:transparent;border:0}.help-popover{border-color:#748b7e}.help-popover p{font-size:14px}
.page-shell{width:100%;margin:0}.content{max-width:760px;padding:20px 20px 48px;min-height:0}
.topbar{height:calc(60px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(20px,calc((100vw - 720px)/2)) 0;gap:8px}
.topbar .return-home{padding:0;margin:0;max-width:none}.return-home button{min-height:44px;padding:8px 4px;font-size:14px;color:var(--text)}
body:not([data-page="home"]) .mobile-brand{display:none}.top-actions{gap:2px}.top-actions .icon-btn{width:44px;min-width:44px;color:var(--muted)}
.bonus-trigger{font-size:13px;min-height:44px;margin-left:4px;color:var(--text);background:transparent;border-color:var(--line)}
body[data-page="bonuses"] .bonus-trigger{display:none}
.mobile-brand{font-size:20px;letter-spacing:-.5px}.mobile-brand>.icon{width:23px;height:23px}
.footer{max-width:760px;padding:16px 20px 24px;font-size:11px}.page-heading{margin:0 0 16px;flex-wrap:wrap;gap:4px 12px}.page-heading h1{font-size:25px;letter-spacing:-.65px;font-weight:650;margin:0}
.page-identity{color:var(--muted);font-size:13px;overflow-wrap:anywhere}.play-screen .page-heading{margin-bottom:10px}
.section-head{margin:20px 0 10px}.section-head h2,.help-label h2{font-size:15px}.section-head small,.field label,.modal .field label{font-size:12px}
.card{padding:16px}.disclosure{border-color:var(--line);border-radius:12px;background:var(--surface)}
.disclosure>summary{font-size:14px;min-height:48px;padding:10px 14px}.disclosure>summary .icon{color:var(--muted)}
.inline-details{background:transparent;border:0;border-radius:0}.inline-details>summary{min-height:44px;padding:8px 0;font-size:12px}
.disclosure-body{font-size:14px}.disclosure-body p{line-height:1.6}.segments{margin:14px 0;padding:3px;background:var(--bg);border:1px solid var(--line);border-radius:11px;gap:3px}
.segments button{min-height:44px;padding:8px 12px;font-size:13px}.segments button.active{background:var(--surface3);color:var(--accent)}
.modal{border-color:var(--line);border-radius:16px}.modal p{font-size:14px;line-height:1.6}.modal .tiny,.modal .modal-note{font-size:13px}.modal-header h2{font-size:21px}
.choice-warning,.spell-choice-details .choice-warning{border-color:#5b806b}.alert-note,.advice{border-color:#5b806b;background:var(--accent-bg)}
#toast{bottom:calc(20px + env(safe-area-inset-bottom));font-size:13px}

/* Home: one compact menu; labels and line icons share a single hierarchy. */
body[data-page="home"] .content{padding-top:28px}.home-screen,.setup-screen{max-width:600px}
.home-intro{margin:0 0 22px}.home-intro h1{font-size:29px;letter-spacing:-.8px;margin:0 0 5px;overflow-wrap:anywhere}.home-intro>p:last-child{font-size:14px}
.home-menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.home-card{min-height:112px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:17px 8px;text-align:center;border-radius:12px;background:var(--surface);border:1px solid #2b3a33}
.home-card:hover,.home-link:hover{background:var(--surface2);border-color:#5b806b}.home-card strong{font-size:15px;font-weight:600}.home-card-text{display:block;flex:0}
.home-icon{width:30px;height:30px;border-radius:0;background:transparent;color:var(--accent)}.home-icon .icon{width:28px;height:28px;stroke-width:1.5}
.home-locked{font-size:11px;margin-top:-6px}.home-card:disabled{opacity:.48}.home-card:disabled:hover{background:var(--surface);border-color:#2b3a33}
.home-other{display:flex;align-items:stretch;gap:4px;border-top:1px solid var(--line);margin-top:22px;padding-top:10px}.home-link{justify-content:center;text-align:center;border:0;border-radius:8px;min-height:44px;padding:8px 4px;flex:1}.home-link strong{font-size:13px;font-weight:500;color:var(--muted)}
.character-delete{margin-top:14px;padding-top:0;border:0;text-align:center}.character-delete .btn{font-size:12px}.quick-setup-entry{margin:0 0 20px}.home-screen .choice-state{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:14px}.home-screen .choice-state strong{font-size:13px}
.setup-head{margin:4px 0 22px}.setup-head h1{font-size:27px}.setup-head>p:first-child{color:var(--muted);font-size:11px}.setup-card{padding:18px;border-radius:12px}.setup-card p{font-size:14px}.setup-card .help-label label{font-size:12px}

/* Combat: turn, health, resources, actions. No navigation band below the header. */
.combat-turn-control{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;background:transparent;border:0;padding:0;margin:0 0 12px;min-height:44px}
.combat-turn-control>.help-label{flex:1;min-width:0}.combat-turn-control strong{font-size:15px;overflow-wrap:anywhere}.combat-turn-control .btn-row{gap:6px}.combat-turn-control .btn{padding:8px 12px}
.dashboard-card,.play-screen .dashboard-card{padding:10px 14px 0;border-radius:12px}.health-row{align-items:center;gap:8px;margin-bottom:12px}.health-row .help-label{height:30px}.health-row .label-top{font-size:13px}.health-row .btn-row{flex-wrap:nowrap;gap:6px}.health-row .btn{padding:8px 10px}
.hp-value{font-size:32px;color:var(--accent);margin:0;line-height:1.2;letter-spacing:-.8px}.hp-value small{font-size:21px;color:var(--muted)}.hp-value .tag{display:inline-block;white-space:nowrap;max-width:100%;margin-left:4px;font-size:11px}.meter{height:5px}
.combat-stats{margin-top:12px}.combat-stats button{min-height:66px;padding:7px 3px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:2px}.combat-stats span{font-size:12px}.combat-stats strong{font-size:23px;color:var(--text)}.combat-stats strong small{font-size:12px}
.resource-strip,.play-screen .resource-strip{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;margin:12px 0;gap:8px;border-color:var(--line);background:var(--surface);border-radius:12px}
.inspiration-label{display:block;min-width:0;flex:1}.inspiration-label .help-label{height:32px}.inspiration-label strong{font-size:14px}.inspiration-label>span{display:block;font-size:14px;font-variant-numeric:tabular-nums;color:var(--accent)}
.resource-strip>.btn{padding:8px 15px}.spell-slot-panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 14px 0}.spell-slot-panel h2{font-size:14px}.spell-slot-panel>.help-label{height:36px}
.slot-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(66px,1fr));gap:8px;padding:4px 0}.slot-overview>div{display:flex;flex-direction:column;gap:2px}.slot-overview span{color:var(--muted);font-size:12px}.slot-overview strong{font-size:23px;color:var(--accent);font-variant-numeric:tabular-nums}.slot-overview small{font-size:17px;color:var(--muted)}
.spell-slot-panel .slot-details{margin:0}.spell-slot-panel .slot-details>summary{justify-content:flex-start;gap:8px;padding:8px 0;color:var(--muted);font-size:12px;min-height:44px}.slot-details .disclosure-body{padding:0 0 12px}.slot-card .square{width:44px;min-height:44px;height:44px}
.combat-actions{margin:12px 0}.combat-actions>summary{font-size:14px}.resource-actions{margin:12px 0;gap:8px}.resource-actions .btn{font-size:13px;flex:1}
.ongoing-panel{border-color:#5b806b;background:var(--surface);border-radius:12px;margin:12px 0;padding:12px;gap:10px}.ongoing-panel small{font-size:12px}.danger-panel{margin-top:12px;border-color:var(--danger)}

/* Character: readable stats; editing and references open only when needed. */
.character-vitals{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:10px;margin:16px 0 10px}.character-vitals>div{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:4px}
.character-vitals span{font-size:12px;color:var(--muted)}.character-vitals strong{font-size:24px;white-space:nowrap;font-variant-numeric:tabular-nums}.character-vitals small{font-size:14px;color:var(--muted)}
.ability-heading{margin:6px 0}.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ability-card{margin:0 0 18px}.stat-box{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:9px 10px}
.stat-box label{grid-column:1/-1;font-size:12px;letter-spacing:.3px;color:var(--muted)}.stat-box input{width:100%;padding:3px 0;border-color:transparent;border-radius:6px;background:transparent;min-height:44px;font-size:25px;text-align:left;color:var(--accent)}.stat-box input:hover{border-color:var(--line)}.stat-box .stat-bonus{padding:0;font-size:15px;color:var(--text)}
.skill-name{font-size:14px}.skill-name small,.saving-item>span{font-size:12px}.stat-foot{font-size:12px}.sheet-screen>.disclosure{margin:10px 0}

/* Spells: level headings and equal rows; quiet actions leave names prominent. */
.spell-summary-line{margin:-8px 0 4px;font-size:13px;min-height:36px}.spell-summary-line .help-trigger{margin-right:-4px}.spell-view{margin:6px 0 12px}.spell-toolbar{margin:12px 0 14px}
.spell-list{display:block}.spell-group{margin:0 0 16px;min-width:0}.spell-group>h2{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:9px 12px;font-size:13px;font-weight:600;background:var(--surface2);border:1px solid var(--line);border-radius:11px 11px 0 0}.spell-group>h2 small{font-size:12px;font-weight:400;color:var(--muted)}
.spell-group-list{border:1px solid var(--line);border-top:0;border-radius:0 0 11px 11px;overflow:hidden;background:var(--surface)}
.spell-card,.spell-card.prepared{height:auto;min-height:80px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 8px;padding:8px 12px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}.spell-card:last-child{border-bottom:0}
.spell-card .spell-title{grid-column:1;min-width:0}.spell-title .help-label{gap:0;min-height:32px}.spell-title h3,.spell-card.prepared h3{font-size:15px;line-height:1.35;margin:0}.spell-title .help-trigger{height:32px;margin:0;min-height:44px}
.spell-meta,.spell-card.prepared .spell-meta{font-size:12px;line-height:1.4;gap:0 6px;margin:0}.spell-meta span+span:before{content:'·';margin-right:6px;color:var(--muted)}.spell-meta .concentration-tag,.spell-card.prepared .spell-meta .concentration-tag:last-child{font-size:12px;color:var(--muted)}
.spell-card .spell-card-actions,.spell-card.prepared .spell-card-actions{grid-column:2;grid-row:1;margin:0;padding:0;gap:6px;max-width:100%;justify-content:flex-end}.spell-card-actions .btn{min-height:44px;padding:8px 12px}.spell-card>.lock-reason,.spell-card>.spell-requirement{grid-column:1/-1;margin:0;font-size:12px}
.spell-card:not(.prepared){min-height:112px;grid-template-columns:1fr}.spell-card:not(.prepared) .spell-card-actions{grid-column:1;grid-row:auto;justify-content:flex-start}.spell-card-actions:has([data-action="remove-spell"]){flex-direction:column;align-items:stretch}.spell-card:has([data-action="remove-spell"]){min-height:112px}

/* Gear: one number field per quantity; controls only for usable equipment. */
.gear-summary{margin-bottom:12px}.gold-panel{display:flex;flex-wrap:wrap;gap:4px 8px;padding:0;background:transparent;border:0;min-height:52px}.gold-panel .btn-row{width:auto;gap:6px}.gold-panel .btn-row .btn{flex:none;padding:8px 12px}
.btn.gold-balance{border:0;background:transparent;color:var(--accent);padding:4px 0;font-size:27px;letter-spacing:-.6px;font-variant-numeric:tabular-nums;gap:6px;overflow-wrap:anywhere;max-width:100%}.gold-balance small{font-size:15px;letter-spacing:0}.gold-panel>.help-label{min-width:0;max-width:100%}
.inventory-toolbar{display:flex;flex-wrap:nowrap;gap:8px;margin:12px 0}.inventory-toolbar input{min-width:0}.inventory-toolbar .btn.primary{background:transparent;border-color:var(--line);color:var(--text);font-size:13px}
.inventory-grid.grid.two{display:block;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.gear-entry{padding:10px 12px;gap:6px;border-bottom:1px solid var(--line);border-radius:0}.gear-entry:last-child{border-bottom:0}.gear-entry.gear-empty{opacity:.65;background:transparent}
.gear-item-main{display:flex;align-items:center;gap:7px;min-height:44px}.gear-item-name{flex:1;min-width:0}.gear-item-name h3{font-size:15px;margin:0;overflow-wrap:anywhere}.gear-item-name small{font-size:12px;color:var(--muted)}
.gear-quantity{width:52px;min-width:52px;max-width:52px;min-height:44px;padding:7px 4px;text-align:center;font-size:16px;line-height:1.4;background:transparent;font-variant-numeric:tabular-nums}.gear-entry .btn.square{width:44px;min-width:44px;height:44px;min-height:44px}.gear-entry .btn.square .icon{width:17px;height:17px}
.gear-entry .gear-controls{margin:0;gap:6px}.gear-controls .btn.sm{font-size:12px;padding:8px 10px}.gear-entry>.lock-reason{font-size:12px}
.library-item,.faction-option{padding:12px;border-radius:12px}.library-top h3,.faction-option h3{font-size:14px}.catalogue-note{font-size:12px}

/* Searchable bonuses and exploration share the same calm list treatment. */
.bonus-search{display:flex;align-items:center;gap:4px;margin:0 0 4px}.bonus-search input{flex:1;min-width:0}.bonus-search .help-trigger{margin-right:-4px}.roll-reminder{font-size:12px;margin:0 0 10px}.bonus-heading{margin:12px 0 4px}.bonus-group h2{font-size:14px;margin:0}.bonus-list{padding:0 12px}.bonus-row{min-height:52px;padding:10px 0;font-size:15px}.bonus-row strong{font-size:20px}.bonus-row small{font-size:12px}.bonus-row>span{min-width:0;overflow-wrap:anywhere}.bonus-row>strong{flex:none}.check-reminder{font-size:12px}
.explore-checks,.explore-cantrips{gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}.explore-row{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:8px 12px;min-height:60px;align-items:center}.explore-row:last-child{border-bottom:0}.explore-row strong{font-size:14px}.explore-row .bonus-value{font-size:20px}.explore-row .btn{font-size:13px;padding:8px 12px}

@media(min-width:700px){.home-card{min-height:132px}.spell-card:not(.prepared){grid-template-columns:minmax(0,1fr) auto;min-height:80px}.spell-card:not(.prepared) .spell-card-actions{grid-column:2;grid-row:1}.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.play-screen{max-width:680px}.sheet-screen{max-width:680px;margin:auto}}
@media(max-width:599px){.content{padding:18px 16px calc(36px + env(safe-area-inset-bottom))}.topbar{padding-left:16px;padding-right:16px}.home-card{min-height:112px}.home-other{margin-top:20px}.page-heading{margin-bottom:14px}.character-vitals{gap:8px}.character-vitals>div{padding:10px}.character-vitals strong{font-size:23px}.fields.three{grid-template-columns:repeat(2,minmax(0,1fr))}.card{padding:14px}.skill-table{grid-template-columns:1fr}.modal{padding:18px}.spell-card,.spell-card.prepared{padding:8px 10px}.spell-toolbar select{width:108px;font-size:14px}.home-intro>p:last-child{font-size:13px}}
@media(max-width:359px){.content{padding-left:12px;padding-right:12px}.topbar{padding-left:12px;padding-right:12px}.home-card{min-height:105px}.home-card strong{font-size:14px}.home-other{gap:0}.home-link strong{font-size:12px}.health-row .btn-row{gap:4px}.health-row .btn{padding:8px}.hp-value{font-size:29px}.hp-value small{font-size:18px}.combat-stats span{font-size:11px}.combat-turn-control{gap:4px}.combat-turn-control>.help-label{min-width:100px}.stat-box{padding:8px}.stat-box input{font-size:23px}.stat-box .stat-bonus{font-size:13px}.character-vitals strong{font-size:21px}.character-vitals small{font-size:12px}.gold-panel .btn-row .btn{padding:8px 9px}.btn.gold-balance{font-size:25px}.spell-title h3,.spell-card.prepared h3{font-size:14px}.spell-card .spell-card-actions{gap:4px}.spell-card-actions .btn{padding:8px 9px}.gear-item-name h3{font-size:14px}.gear-quantity{width:46px;min-width:46px;max-width:46px}.gear-item-main{gap:4px}}
@media print{.return-home{display:none}.spell-group-list,.inventory-grid.grid.two,.character-vitals>div,.stat-box,.spell-slot-panel,.home-card{background:white;color:black;border-color:#aaa}.spell-group>h2{background:#eee;color:black}.stat-box input{color:black}.content{max-width:none}}

/* Guided attacks and level choices: one clear next step at a time. */
.attack-options,.level-choice-buttons{display:grid;gap:8px;margin:12px 0}
.attack-options .btn{justify-content:flex-start;text-align:left;white-space:normal;padding:10px 12px}
.attack-options .btn span{display:grid;gap:3px}.attack-options .btn strong{font-size:14px}.attack-options .btn small{color:var(--muted);font-size:12px}
.level-choice-buttons .btn{justify-content:flex-start;text-align:left;white-space:normal}
.level-start{margin:6px 0 16px}.level-start h2{margin:0}.level-start>p{margin:6px 0 14px}.level-start .btn{min-width:160px}
.level-step>.help-label{margin:-5px 0 4px}.level-step>.help-label h2{margin:0}.level-step>.disclosure{margin:10px 0}.level-step .level-choice-buttons .btn{margin:0}
.level-chooser{margin:0 0 14px}.level-chooser h2{margin:0 0 6px;font-size:18px}.level-chooser p{margin:0 0 10px;font-size:13px;color:var(--muted);line-height:1.5}.level-chooser .btn{min-height:44px}
.tool-proficiencies{display:flex;align-items:flex-start;gap:8px;margin:16px 0}.tool-proficiency-main{min-width:0;flex:1}.tool-proficiencies h2{font-size:15px;margin:0}.tool-proficiencies p{margin:2px 0 6px;color:var(--text);font-size:14px;overflow-wrap:anywhere;white-space:pre-line}.tool-proficiencies small{color:var(--muted);font-size:12px}.tool-proficiencies>.btn{margin-top:2px}
.tool-proficiency-actions{margin-top:10px}.tool-expertise-check{margin:16px 0 10px}.tool-check-result{border:1px solid var(--line);background:var(--bg);border-radius:10px;padding:12px;margin:10px 0}.tool-check-result strong{color:var(--accent);font-size:19px}.tool-check-result p{margin:6px 0 0}
@media(max-width:450px){.tool-check-fields{grid-template-columns:1fr}}
