/* General tracker colours follow the selected class; skill accents stay independent. */
:root{--ui-accent:#85c8c3;--ui-soft:#a7d8d4;--ui-bright:#d8eeeb;--ui-active:#233a39;--ui-border:#425b59;--ui-panel-border:#3d4948;--ui-page:#111414;--ui-panel:#161a1a;--ui-panel-surface:rgba(22,26,26,.8);--ui-hover:#263231}
:root[data-class="ren"]{--ui-accent:#d68b99;--ui-soft:#e4adb7;--ui-bright:#f3dfe4;--ui-active:#3d272d;--ui-border:#78505a;--ui-panel-border:#4b3d40;--ui-page:#151113;--ui-panel:#1b1719;--ui-panel-surface:rgba(27,23,25,.8);--ui-hover:#35272c}
:root{font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace;color:#d9d9d9;background:var(--ui-page);color-scheme:dark;font-size:13px}
*{box-sizing:border-box}body{margin:0;background:var(--ui-page)}button,input,select{font:inherit}button,select,input{color:#e2e2e2;background:#1d1d1d;border:1px solid #444;border-radius:2px}input,select{padding:4px 6px}input:focus,select:focus,button:focus-visible{outline:1px solid var(--ui-accent);outline-offset:1px}button{padding:4px 9px;cursor:pointer}button:hover{background:var(--ui-hover)}
.shell{max-width:1320px;margin:0 auto;padding:20px 20px 48px}.masthead{display:flex;justify-content:space-between;gap:20px;align-items:end;border-bottom:1px solid var(--ui-panel-border);padding-bottom:15px}.kicker{color:var(--ui-accent);letter-spacing:.13em;text-transform:uppercase;margin:0 0 8px;font-size:11px}h1{font-size:25px;letter-spacing:.01em;line-height:1.15;margin:0 0 7px}h2{font-size:15px;margin:0;font-weight:700}.subhead,.hint,.quiet,.source-note,.version span,footer{color:#999}.subhead{margin:0}.version{text-align:right;line-height:1.5;color:var(--ui-soft);white-space:nowrap}
.toolbar{display:flex;align-items:end;gap:14px;padding:16px 0}.toolbar label{display:grid;gap:5px;color:#aaa}.toolbar select{min-width:300px}.source-note{padding-bottom:5px}
.workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(390px,1fr);grid-template-areas:"inputs results" "quickstats results";gap:12px;align-items:start}.inputs{grid-area:inputs;display:grid;gap:12px}.inputs>.panel{margin-bottom:0}.results{grid-area:results}.quickstats{grid-area:quickstats;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.inputs,.results,.quickstats{min-width:0}.quickstats .panel{margin-bottom:0}.version #version-name{color:var(--ui-soft)}.panel{border:1px solid var(--ui-panel-border);background:var(--ui-panel);padding:13px 14px;margin-bottom:12px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.hint{font-size:11px;margin:5px 0 0;line-height:1.4}.quiet{font-size:11px;white-space:nowrap}
.column-head{display:flex;justify-content:space-between;color:#888;text-transform:uppercase;font-size:10px;letter-spacing:.08em;border-bottom:1px solid #333;padding:11px 4px 5px}.node-row,.stat-list label{display:grid;grid-template-columns:26px minmax(0,1fr) 52px;align-items:center;gap:8px;min-height:34px;border-bottom:1px solid #292929;padding:3px 4px}.node-row img{width:24px;height:24px;object-fit:cover}.node-row .node-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-row input,.stat-list input{width:52px;min-width:0;text-align:center;padding:3px 2px}.node-row:hover,.stat-list label:hover{background:#202020}.group-label{display:flex;justify-content:space-between;gap:8px;color:#bcbcbc;padding:12px 4px 5px;border-bottom:1px solid #444;font-weight:700}.group-label span{color:#858585;font-weight:400}.stat-list label{grid-template-columns:minmax(0,1fr) 52px;padding-left:38px}.resources{display:grid;grid-template-columns:1fr 1fr;gap:10px}.resources h2{grid-column:1/-1}.resources label{display:grid;gap:5px;color:#aaa}.resources input{width:100%;min-width:0}
.priority-controls{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:12px}.include-option{border-top:1px solid #333;padding:11px 0}.include-option .toggle{white-space:normal;align-items:flex-start;line-height:1.35}.toggle{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:11px;color:#aaa}.toggle input{margin:0}.table-wrap{overflow:auto;max-height:650px;margin-top:12px;border:1px solid #383838}.priority-table{width:100%;border-collapse:collapse;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12px}.priority-table th{position:sticky;top:0;background:#222;z-index:1;color:#aaa;text-align:left;font-weight:400;border-bottom:1px solid #555;padding:7px 8px}.priority-table td{padding:5px 8px;border-bottom:1px solid #292929;height:29px}.priority-table td:nth-child(n+2),.priority-table th:nth-child(n+2){text-align:right}.priority-table td:first-child{min-width:150px}.priority-table tr:nth-child(even){background:#1a1a1a}.priority-table tr.next{outline:2px solid var(--skill-accent,#a8b0ad);outline-offset:-2px;background:#242725;background:color-mix(in srgb,var(--skill-accent,#a8b0ad) 17%,#1a1a1a)}.priority-table tr.done{opacity:.45}.priority-table.hide-done tr.done{display:none}.priority-table .skill-cell{display:flex;gap:8px;align-items:center}.skill-cell .dot{width:5px;height:18px;flex:none;background:#a0a0a0}.type-mastery .dot{background:#7ba9b0}.type-skill .dot{background:#bf9a66}.type-v .dot{background:#b187a9}.type-common .dot{background:#82a480}.type-stat .dot{background:#a29ac7}.priority-table .rng{color:#9a91bd}.priority-table .zero{color:#747474}
.totals{display:grid;grid-template-columns:1fr;border-top:1px solid #444}.total{padding:10px 2px;border-bottom:1px solid #333}.total:last-child{border:0}.total small{display:block;color:#999;font-size:10px;text-transform:uppercase}.total strong{display:block;margin-top:5px;font-size:14px}footer{font-size:11px;line-height:1.5;margin-top:8px}
[hidden]{display:none!important}@media(max-width:1000px){.workspace{grid-template-columns:minmax(0,1fr);grid-template-areas:"inputs" "quickstats" "results"}.shell{padding:14px 12px 32px}.masthead{align-items:start}.version{font-size:11px}.table-wrap{max-height:470px}.toolbar{flex-wrap:wrap}.toolbar select{min-width:0;width:100%}.toolbar label{width:100%}.source-note{padding:0}}@media(max-width:640px){.node-list,.quickstats{grid-template-columns:minmax(0,1fr)}}@media(max-width:450px){h1{font-size:20px}.version{display:none}.priority-table{font-size:11px}.priority-table th,.priority-table td{padding:5px}.priority-table td:first-child{min-width:110px}.panel{padding:11px}.toggle{font-size:10px}}
.load-status{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:30;display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100% - 24px);padding:10px 12px;border:1px solid var(--ui-panel-border);background:var(--ui-page);box-shadow:0 3px 12px #0008}.load-status:has(#priority-sync:empty):has(#retry-priorities[hidden]){display:none}.load-status #priority-sync{margin:0;line-height:1.4;max-width:420px}.load-status #retry-priorities{flex-shrink:0}
/* Compact node selectors and job-themed line bars. */
:root{--stat-main:#79c8bd;--stat-additional:#83a9ca}:root[data-class="ren"]{--stat-main:#d78b9c;--stat-additional:#b89bcf}
.stat-list{display:grid;gap:10px;margin-top:10px;min-width:0}.stat-selectors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stat-selector{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 4px;border:1px solid var(--ui-panel-border);background:#1b1b1b;min-width:0}.stat-selector.selected{border-color:var(--ui-accent);background:var(--ui-active)}
.stat-unlock-icon{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:5px;border:0;background:transparent}.stat-unlock-icon img{position:absolute;width:32px;height:32px;object-fit:contain}.stat-unlock-icon>span{color:#666}.stat-unlock-icon.is-unlocked img{opacity:1;filter:none}.stat-unlock-icon.is-unlocked>span{color:var(--ui-accent)}
.stat-select{display:grid;gap:4px;justify-items:center;width:100%;min-width:0;min-height:44px;border:0;padding:2px;background:transparent}.stat-selector-name{font-size:11px;font-weight:600;overflow-wrap:anywhere}.stat-selector-summary{font-size:11px;font-variant-numeric:tabular-nums;color:var(--ui-soft);line-height:1.4}
.stat-list .stat-row{display:grid;gap:8px;min-width:0;border:1px solid var(--ui-panel-border);border-left:2px solid var(--ui-accent);padding:10px}.stat-line-heading{font-size:11px;color:#aaa;font-weight:500;margin:0}.stat-lines{display:grid;gap:8px;min-width:0}
.stat-list .stat-line{display:grid;grid-template-columns:minmax(0,1fr) 54px;align-items:center;gap:12px;padding:0;border:0;min-height:32px}.stat-list .stat-line:hover{background:transparent}.stat-list .stat-line input{width:54px;min-height:32px;min-width:0;text-align:center;padding:4px 2px}.stat-line input[aria-invalid="true"]{border-color:#d89494}
.stat-bar{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:2px;min-width:0;height:10px}.stat-bar :is(i,button){display:block;border:1px solid #3d4847;background:#202626}.stat-main .stat-bar :is(i,button).filled{background:var(--stat-main);border-color:var(--stat-main)}.stat-additional .stat-bar :is(i,button).filled{background:var(--stat-additional);border-color:var(--stat-additional)}
.stat-note{color:#aaa;font-size:11px;line-height:1.4;margin:0}.stat-note:empty{display:none}.stat-icon{width:24px;height:24px;object-fit:cover}.stat-icon[hidden],.stat-list img[hidden]{display:none}
@media(max-width:450px){.stat-selectors{gap:5px}.stat-selector{padding:6px 2px}.stat-selector-name,.stat-selector-summary{font-size:10px}}

.node-icon{position:relative;display:grid;place-items:center;width:24px;height:24px;background:#303a32;color:#b9cfbd;font-size:12px;border:1px solid #4c6552}
.node-icon img{position:absolute;inset:0;width:24px;height:24px;object-fit:cover}
.node-icon img[hidden]{display:none}
.toolbar select{min-width:145px}.world-picker{display:flex;gap:2px;margin:0;padding:0;border:0}.world-picker legend{color:#aaa;padding:0 0 5px}.world-picker label{display:block;cursor:pointer}.world-picker input{position:absolute;opacity:0;width:1px;height:1px}.world-picker span{display:block;padding:5px 10px;border:1px solid #444;background:#1d1d1d;color:#aaa;white-space:nowrap}.world-picker small{color:#858585}.world-picker input:checked+span{background:var(--ui-active);border-color:var(--ui-accent);color:var(--ui-bright)}.world-picker input:focus-visible+span{outline:1px solid var(--ui-accent);outline-offset:2px}
.next-upgrade{margin-top:12px;border:1px solid var(--skill-accent,#a8b0ad);background:#202220;background:color-mix(in srgb,var(--skill-accent,#a8b0ad) 12%,#161616);padding:10px 12px}.next-upgrade .metric:first-child{border-top:0}.priority-table .stat-icon{flex:none}.priority-table .skill-cell img[hidden]{display:none}
.next-upgrade .upgrade-cost{padding:6px 0}.next-upgrade .upgrade-cost+.upgrade-cost{border-top:1px solid #444}.next-upgrade .upgrade-cost>span{display:block;color:#ccc;font-size:11px;margin-bottom:2px}
.calculator-panel .resources{margin-top:12px}.calculator-panel .include-option{margin-top:12px}.time-estimate{border-top:1px solid #333;padding:12px 2px 2px}.time-estimate small{display:block;color:#999;font-size:10px;text-transform:uppercase}.time-estimate strong{display:block;margin-top:5px;font-size:14px}
.completion{padding:13px 2px 11px}.completion-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px;color:var(--ui-soft)}.completion-label strong{font-size:16px;color:var(--ui-bright)}.completion-track{height:7px;margin-top:8px;border-radius:7px;background:var(--ui-active);overflow:hidden}.completion-track span{display:block;height:100%;background:var(--ui-accent)}
.materials,.material-total{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px}.material-amount{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-variant-numeric:tabular-nums}.material-amount img{width:21px;height:21px;object-fit:contain}.material-total{margin-top:5px!important;line-height:1.5}.material-total .material-amount img{width:24px;height:24px}.material-heading{display:inline-flex;align-items:center;justify-content:flex-end;min-width:24px}.material-heading img{width:22px;height:22px;object-fit:contain}.material-fallback{display:none}.icon-failed img{display:none}.icon-failed .material-fallback{display:inline}.material-days{white-space:nowrap}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:780px){.toolbar{align-items:end}.toolbar label{width:auto}.toolbar select{width:100%}.world-picker{width:100%}.world-picker label{flex:1;text-align:center}.world-picker span{padding:8px 5px}}
.node-row,.stat-list .stat-row{border-left:2px solid var(--skill-accent,#a8b0ad)}
.node-icon{border-color:var(--skill-accent,#a8b0ad)}
.priority-table .skill-cell{min-width:0;white-space:normal;line-height:1.25}
.priority-table .skill-cell>span:first-of-type{color:var(--skill-accent,#d9d9d9)}
.priority-table .skill-cell .dot{background:var(--skill-accent,#a8b0ad)}
.next-upgrade .metric:first-child{border-left:3px solid var(--skill-accent,#b6d4ad);padding-left:9px}


.node-row.next-skill,.stat-list .stat-row.next-skill{background:#242725;background:color-mix(in srgb,var(--skill-accent,#a8b0ad) 17%,#1a1a1a)}
.node-row.next-skill .node-name,.stat-list .stat-row.next-skill .stat-name{font-weight:700}
.next-upgrade .upgrade-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;margin:5px 0}.next-upgrade .upgrade-label{display:flex;align-items:center;gap:8px;min-width:0}
.next-upgrade .upgrade-heading strong{min-width:0;margin:0;overflow-wrap:anywhere}
.next-upgrade .upgrade-heading .node-icon{flex:none}
.next-upgrade .upgrade-cost{display:flex;align-items:center;justify-content:space-between;gap:12px}
.next-upgrade .upgrade-cost-details{min-width:0}
.next-upgrade .upgrade-cost-details>span{display:block;color:#ccc;font-size:11px;margin-bottom:2px}
.next-upgrade .upgrade-cost button{flex:none;min-height:32px;border-color:var(--skill-accent,#a8b0ad);background:#252525;white-space:nowrap}
.next-upgrade .upgrade-cost button:hover{background:color-mix(in srgb,var(--skill-accent,#a8b0ad) 22%,#252525)}
@media(max-width:450px){.next-upgrade .upgrade-cost{align-items:flex-start}.next-upgrade .upgrade-cost button{white-space:normal;max-width:105px;text-align:center}}
.fd-gain{color:var(--ui-accent);font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}.next-upgrade .upgrade-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.next-upgrade .upgrade-heading .fd-gain{font-size:13px;font-weight:700}.priority-table td:last-child{min-width:95px}
.node-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:4px}.node-column{display:grid;align-content:start;gap:12px;min-width:0}.node-group{min-width:0}.node-group .group-label{margin:0;padding-top:10px;font-size:12px}.node-row .node-label{display:flex;align-items:center;gap:6px;min-width:0}.node-row .node-name{min-width:0;overflow:visible;text-overflow:clip;white-space:normal;line-height:1.3;overflow-wrap:anywhere}.skill-tag{flex:none;display:inline-block;padding:1px 5px;border:1px solid #747d78;border-radius:3px;color:#dce4de;background:#303633;font-size:10px;font-weight:600;line-height:1.3;white-space:nowrap}
@media(max-width:640px){.node-list{grid-template-columns:minmax(0,1fr)}}

input[type="checkbox"]{accent-color:var(--ui-accent)}
.toolbar select{border-color:var(--ui-border)}

/* Whole-tile editing and read-only line previews. */
.stat-selector{position:relative;padding:0;gap:0;cursor:pointer}.stat-select{padding:8px 5px;min-height:145px}.stat-unlock-icon{pointer-events:none}.stat-select:hover{background:transparent}.stat-mini-preview{display:grid;width:100%;gap:4px;padding:3px 6px}.stat-mini-line{display:grid;grid-template-columns:minmax(0,1fr) 14px;align-items:center;gap:5px;font-size:10px;color:#aaa}.stat-mini-line .stat-bar{height:5px;gap:1px}.stat-mini-line .stat-bar i{border:0}.stat-mini-value{text-align:right;font-variant-numeric:tabular-nums}.stat-cancel{position:absolute;right:0;top:0;padding:0;width:32px;height:32px;font-size:17px;line-height:1;border:0;background:transparent;color:#aaa}.stat-cancel:hover{color:#eee}.stat-selector-summary.fd-gain{color:var(--ui-accent)}
@media(max-width:450px){.stat-select{padding:7px 2px}.stat-mini-preview{padding:3px}.stat-mini-line{gap:3px}.stat-selector{padding:0}}

.summary-metrics{display:grid;grid-template-columns:minmax(0,1fr);gap:0}.summary-panel .totals{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0}.summary-panel .total{border:0;min-width:0}.summary-panel .include-option{margin-top:6px}.calculator-title{display:flex;align-items:center;gap:8px}.calculator-title img{width:24px;height:24px;object-fit:contain}.weekly-income{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px;align-items:center}.weekly-income>label{display:grid;gap:5px;color:#aaa}.weekly-income select{width:100%;min-width:0}.fragment-needed{display:block;color:#999;font-size:10px;margin-top:4px}@media(max-width:640px){.summary-metrics{grid-template-columns:minmax(0,1fr);gap:0}.summary-panel .totals{gap:10px}.weekly-income{grid-template-columns:minmax(0,1fr)}}@media(max-width:380px){.summary-panel .totals{grid-template-columns:minmax(0,1fr)}}

.creator-footer{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid var(--ui-panel-border);font-size:12px}
.creator-credit{color:var(--ui-accent)}
.kofi-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%}
.kofi-link img{display:block;width:160px;height:32px;max-width:100%;object-fit:contain}
.kofi-link:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}

.save-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.save-actions button{min-height:32px}#backup-status{margin:8px 0 0;line-height:1.4}@media(max-width:520px){.matrix-panel>.panel-head{align-items:flex-start}.save-actions{max-width:190px}.save-actions button{flex:1 1 auto}}

.load-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.load-status p{flex:1 1 240px}.load-status button{min-height:44px}.load-status button[hidden]{display:none}

#undo-progress:disabled{opacity:.5;cursor:default}

.save-conflict{margin:8px 0;padding:10px 12px;border:1px solid var(--ui-accent);border-radius:8px;background:var(--ui-panel-surface)}.save-conflict p{margin:0 0 8px;line-height:1.4}.save-conflict>div{display:flex;gap:8px;flex-wrap:wrap}.save-conflict button{min-height:32px}

/* FD values retain compact placement while providing native touch/keyboard controls. */
.fd-info{min-height:32px;padding:4px 2px;border:0;background:transparent;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.fd-info:hover{background:var(--ui-hover)}
.stat-selector .stat-select{min-height:113px}
.stat-selector-summary{display:grid;place-items:center;min-height:32px;width:100%}
.stat-selector-summary .fd-info{width:100%;font-size:inherit}
#fd-explanation{width:calc(100% - 32px);max-width:420px;max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:18px;border:1px solid var(--ui-accent);border-radius:8px;background:var(--ui-panel);color:#d9d9d9}
#fd-explanation::backdrop{background:rgba(0,0,0,.65)}
#fd-explanation p{line-height:1.6;overflow-wrap:anywhere}
#fd-explanation-close{min-height:44px;float:right}

/* Keep compact phone controls usable when the minimum layout is scaled. */
@media(pointer:coarse){#animations,.toolbar select,.resources input,.weekly-income select,.node-row input,.toggle,#fd-explanation-close{min-height:28px}}

/* Thin visible Stat bars keep taller button hit areas and numeric entry beside them. */
.stat-list .stat-line{grid-template-columns:minmax(0,1fr) 54px;gap:8px}.stat-entry-bar{height:28px;gap:0}.stat-list .stat-line .stat-entry-bar button{position:relative;padding:0;min-width:0;min-height:28px;border:0;border-radius:0;background:transparent;cursor:pointer}.stat-entry-bar button::before{content:'';position:absolute;inset:9px 1px;border:1px solid #3d4847;background:#202626}.stat-main .stat-entry-bar button.filled::before{background:var(--stat-main);border-color:var(--stat-main)}.stat-additional .stat-entry-bar button.filled::before{background:var(--stat-additional);border-color:var(--stat-additional)}.stat-entry-bar button:focus-visible{outline:2px solid var(--ui-bright);outline-offset:1px;z-index:1}

/* Align resource heading boxes, then offset their padded/glowing artwork optically. */
.priority-table .material-heading{display:flex;width:100%;justify-content:flex-end}.priority-table .material-heading img{display:block;transform:translateX(4px)}

@media(max-width:380px){.world-picker label{min-width:0}.world-picker span{white-space:normal}}
