/* Mobile-only skill tree: prerequisite stages with touch-sized cards. */
html[data-client=mobile] #skill-window{width:min(720px,94vw)!important;max-height:calc(var(--mobile-height,100dvh) - 24px)!important;overflow-x:hidden!important;overscroll-behavior:contain}
html[data-client=mobile] #skill-window .window-header{position:sticky;top:-12px;z-index:5;background:#182332;display:flex;gap:8px;align-items:center;padding:8px 0;white-space:normal}
html[data-client=mobile] #skill-window .window-header>span{flex:1;min-width:0;font-size:13px;line-height:1.5}
html[data-client=mobile] #skill-window .window-header>button{flex:none;min-width:44px;min-height:44px}
html[data-client=mobile] #skill-window .st-toolbar{flex-wrap:wrap;gap:6px}
html[data-client=mobile] #skill-window .st-touch-help{font-size:11px;color:#b9c9d9;line-height:1.5}
html[data-client=mobile] #skill-window .st-body{display:block;overflow:visible;border:0;background:none}
html[data-client=mobile] #skill-window .st-grid{display:flex;flex-direction:column;min-width:0;width:100%;gap:14px}
html[data-client=mobile] #skill-window .st-mobile-tier{min-width:0}
html[data-client=mobile] #skill-window .st-mobile-tier h3{margin:0 0 8px;padding:6px 8px;border-left:3px solid #b89b65;background:#243142;color:#eed7a4;font-size:13px}
html[data-client=mobile] #skill-window .st-mobile-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html[data-client=mobile] #skill-window .st-node{display:grid;grid-template-columns:48px minmax(0,1fr);align-content:start;align-items:center;justify-content:normal;gap:8px;padding:10px 8px;border:1px solid #536176;border-radius:9px;background:#182332;box-sizing:border-box;touch-action:pan-y;user-select:none;-webkit-touch-callout:none}
html[data-client=mobile] #skill-window .st-node.learned{border-color:#a88e5a}
html[data-client=mobile] #skill-window .st-node.st-planned{border-color:#77bddd}
html[data-client=mobile] #skill-window .st-name{grid-column:2;grid-row:1;font-size:12px;line-height:1.4;white-space:normal;overflow:visible;word-break:keep-all;overflow-wrap:anywhere;background:none;padding:0}
html[data-client=mobile] #skill-window .st-icon-wrap{grid-column:1;grid-row:1;width:44px;height:44px}
html[data-client=mobile] #skill-window .st-icon{width:44px;height:44px;min-height:44px;touch-action:pan-y}
html[data-client=mobile] #skill-window .st-kind-badge{left:auto;right:-3px;top:auto;bottom:-3px;transform:none;width:16px;height:16px;font-size:10px}
html[data-client=mobile] #skill-window .st-rank{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:center;height:auto;min-height:40px;gap:5px;background:none;font-size:12px}
html[data-client=mobile] #skill-window .st-rank button{width:40px;height:40px;min-height:40px;font-size:20px;line-height:1;padding:0}
html[data-client=mobile] #skill-window .st-rank select{flex-basis:100%;width:100%;max-width:100%!important;min-height:36px;padding:4px!important}
html[data-client=mobile] #skill-window .st-mobile-requires{grid-column:1/-1;align-self:start;font-size:10px;line-height:1.55;color:#b8c1cc;word-break:keep-all;overflow-wrap:anywhere;border-top:1px solid #ffffff16;padding-top:6px}
html[data-client=mobile] #skill-window .st-mobile-requires span{display:block}
html[data-client=mobile] #skill-window .st-mobile-requires .ready{color:#a8d8a2}
html[data-client=mobile] #skill-window .st-footer{position:sticky;bottom:-12px;z-index:4;background:#182332;display:grid;grid-template-columns:minmax(0,1fr) auto;padding:10px 0;gap:4px 8px}
html[data-client=mobile] #skill-window .st-footer span{grid-column:1;font-size:10px}
html[data-client=mobile] #skill-window .st-footer button{grid-column:2;grid-row:1/3;min-height:44px;min-width:72px}
html[data-client=mobile] .mobile-info-dialog{overscroll-behavior:contain;touch-action:pan-y}
html[data-client=mobile] .mobile-skill-copy .st-tooltip-icon{width:64px;height:64px;margin:8px auto}
html[data-client=mobile] .mobile-skill-copy p{font-size:12px;line-height:1.6}
html[data-client=mobile] .mobile-skill-copy strong{color:#ffe2a2}
html[data-client=mobile] .mobile-skill-copy .st-prerequisite{color:#e1bd8e}
html[data-client=mobile] .mobile-skill-copy .st-level-table{table-layout:fixed;width:100%}
html[data-client=mobile] .mobile-skill-copy .st-level-table th{width:54px;min-width:0}
html[data-client=mobile] .mobile-skill-copy .st-level-table td{overflow-wrap:anywhere}
html[data-client=mobile] .mobile-skill-picker h3{font-size:16px;margin:6px 0}
html[data-client=mobile] .mobile-skill-picker p{font-size:12px}
html[data-client=mobile] .mobile-skill-slots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:12px 0}
html[data-client=mobile] .mobile-info-dialog button{background:#263447;color:#ffe2a2;border:1px solid #8e7851;border-radius:6px;min-height:44px;padding:6px}
html[data-client=mobile] .mobile-skill-slots button{min-width:0;min-height:66px;font-size:18px}
html[data-client=mobile] .mobile-skill-slots small{display:block;font-size:10px;line-height:1.3;margin-top:5px;overflow-wrap:anywhere}
html[data-client=mobile] body #mobile-actions [data-action=cancel]{display:none!important}
html[data-client=mobile] body.job-ground-targeting #mobile-actions [data-action=cancel]{display:block!important}
html[data-client=mobile] .quick-skill-tooltip{display:none!important}
@media(min-width:600px){html[data-client=mobile] #skill-window .st-mobile-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:340px){html[data-client=mobile] #skill-window .st-mobile-cards{grid-template-columns:minmax(0,1fr)}}

/* Reference card: registration header, summary, level controls, prerequisites. */
html[data-client=mobile] #skill-window .st-mobile-cards{grid-template-columns:minmax(0,1fr);gap:10px}
html[data-client=mobile] #skill-window .st-node{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:12px;border-radius:12px;background:linear-gradient(145deg,#243141,#162230)}
html[data-client=mobile] #skill-window .st-register-zone{display:flex;align-items:center;gap:14px;min-height:62px;padding:7px;border:1px dashed #c6b18538;border-radius:7px;background:#ffffff03;touch-action:pan-y}
html[data-client=mobile] #skill-window .st-register-zone:active{background:#c6b18512;border-color:#c6b18570}
html[data-client=mobile] #skill-window .st-icon-wrap{width:54px;height:54px;flex:none}
html[data-client=mobile] #skill-window .st-icon{width:54px;height:54px;min-height:54px}
html[data-client=mobile] #skill-window .st-name{flex:1;text-align:left;font-size:15px;line-height:1.4;margin:0}
html[data-client=mobile] #skill-window .st-mobile-summary{margin:0;padding:8px 9px;min-height:34px;background:#d8bf7310;border-radius:5px;color:#d6d7ca;font-size:12px;line-height:1.55;word-break:keep-all;overflow-wrap:anywhere}
html[data-client=mobile] #skill-window .st-rank{display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:10px;min-height:42px;margin:0;padding:0}
html[data-client=mobile] #skill-window .st-rank select{flex:0 1 110px;flex-basis:110px;width:110px;max-width:110px!important;min-height:42px;margin-right:auto;padding:6px 9px!important;font-size:15px!important;border:1px solid #9e885c;border-radius:7px;background:#243344;color:#ffe0a0}
html[data-client=mobile] #skill-window .st-rank>span{font-size:14px;white-space:nowrap}
html[data-client=mobile] #skill-window .st-rank button{flex:none;width:42px;height:42px;border-radius:7px}
html[data-client=mobile] #skill-window .st-mobile-requires{font-size:11px;padding-top:9px;margin-top:0}
@media(min-width:600px){html[data-client=mobile] #skill-window .st-mobile-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Two columns on both portrait and landscape mobile screens. */
html[data-client=mobile] #skill-window .st-mobile-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
html[data-client=mobile] #skill-window .st-node{min-width:0;padding:8px;gap:7px}
html[data-client=mobile] #skill-window .st-register-zone{gap:6px;padding:4px;min-height:48px}
html[data-client=mobile] #skill-window .st-icon-wrap,html[data-client=mobile] #skill-window .st-icon{width:36px;height:36px;min-height:36px}
html[data-client=mobile] #skill-window .st-name{font-size:12px;min-width:0}
html[data-client=mobile] #skill-window .st-mobile-summary{font-size:11px;padding:6px;flex:1}
html[data-client=mobile] #skill-window .st-rank{flex-wrap:wrap;gap:4px;justify-content:space-between}
html[data-client=mobile] #skill-window .st-rank select{flex:1 0 100%;width:100%;max-width:100%!important;min-width:0;min-height:36px;font-size:12px!important}
html[data-client=mobile] #skill-window .st-rank>span{font-size:12px}
html[data-client=mobile] #skill-window .st-mobile-requires{font-size:10px}

/* PC: reserve rank controls so adding the draft-minus button never squeezes 2/10. */
html:not([data-client=mobile]) #skill-window .st-rank{
 display:grid;grid-template-columns:34px 17px 17px;grid-template-rows:19px 17px;
 gap:3px;align-items:center;justify-content:center;width:74px;min-width:74px;height:39px;
 flex:none;white-space:nowrap;word-break:normal;overflow-wrap:normal;
}
html:not([data-client=mobile]) #skill-window .st-rank>span{
 grid-row:2;grid-column:1;min-width:34px;white-space:nowrap;word-break:normal;
 overflow-wrap:normal;text-align:center;font-variant-numeric:tabular-nums;line-height:17px;
}
html:not([data-client=mobile]) #skill-window .st-rank>select{
 grid-row:1;grid-column:1 / -1;justify-self:center;max-width:48px;width:48px;
 height:19px;min-width:0;box-sizing:border-box;margin:0;
}
html:not([data-client=mobile]) #skill-window .st-rank>button{
 grid-row:2;width:17px;min-width:17px;height:17px;box-sizing:border-box;margin:0;padding:0;
}

/* PC tree: readable names and fixed control space, without placeholder squares. */
html:not([data-client=mobile]) #skill-window .st-empty{display:none}
html:not([data-client=mobile]) #skill-window .st-node{justify-content:flex-start;padding:4px 2px;box-sizing:border-box;gap:3px;min-height:0}
html:not([data-client=mobile]) #skill-window .st-name{height:30px;flex:none;line-height:15px;white-space:normal;overflow:visible;text-overflow:clip;word-break:keep-all;overflow-wrap:anywhere;text-align:center;box-sizing:border-box;width:100%;padding:0;background:none}
html:not([data-client=mobile]) #skill-window .st-rank{background:none}
html:not([data-client=mobile]) #skill-window .st-body{max-height:calc(100dvh - 190px)}

/* PC: use the actual tree width instead of seven mostly empty columns. */
html:not([data-client=mobile]) #skill-window .st-grid{min-width:440px;width:100%;flex:1;padding:10px 8px;box-sizing:border-box}
html:not([data-client=mobile]) #skill-window .st-name{font-size:12px;line-height:15px;color:#ead9b7}
html:not([data-client=mobile]) #skill-window .st-links{inset:10px 8px;width:calc(100% - 16px);height:calc(100% - 20px);stroke:#a58e625e}
html:not([data-client=mobile]) #skill-window .st-rank{font-size:11px}
html:not([data-client=mobile]) #skill-window .st-toolbar{padding:6px 0 10px}
html:not([data-client=mobile]) #skill-window .st-footer{padding-top:10px}

html:not([data-client=mobile]) #skill-window .st-links{stroke:#ab9573;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.7}
html:not([data-client=mobile]) #skill-window .st-links .ready{stroke:#dfbf76;opacity:1}
html:not([data-client=mobile]) #skill-window .st-node{align-self:start;height:116px}

/* PC rank controls: fixed center, plus left and draft-minus right. */
html:not([data-client=mobile]) #skill-window .st-rank{grid-template-columns:17px 40px 17px;width:80px;min-width:80px}
html:not([data-client=mobile]) #skill-window .st-rank>span{grid-column:2;min-width:40px}
html:not([data-client=mobile]) #skill-window .st-rank>button:first-of-type{grid-column:1}
html:not([data-client=mobile]) #skill-window .st-rank>button:last-of-type:not(:first-of-type){grid-column:3}
html:not([data-client=mobile]) #skill-window .st-name{display:flex;align-items:flex-end;justify-content:center}
html:not([data-client=mobile]) #skill-window .st-icon-wrap{margin-top:-1px}

/* PC: rank directly below icon, cast-level selector on the next line. */
html:not([data-client=mobile]) #skill-window .st-rank{grid-template-rows:17px 19px;row-gap:3px}
html:not([data-client=mobile]) #skill-window .st-rank>span,
html:not([data-client=mobile]) #skill-window .st-rank>button{grid-row:1}
html:not([data-client=mobile]) #skill-window .st-rank>select{grid-row:2;grid-column:1 / -1}

/* PC: no opaque panel behind skill names or image icons, including learned/quest states. */
html:not([data-client=mobile]) #skill-window .st-node{background:transparent!important;border:0!important;box-shadow:none!important}
html:not([data-client=mobile]) #skill-window .st-name,
html:not([data-client=mobile]) #skill-window .st-icon-wrap,
html:not([data-client=mobile]) #skill-window .st-node .st-icon{background:transparent!important;box-shadow:none!important;border:0!important}

html #skill-window .st-grid.st-rogue-tree .st-icon-wrap,
html #skill-window .st-grid.st-rogue-tree .st-icon{width:60px;height:60px;min-height:60px;flex-shrink:0;box-sizing:border-box}
html:not([data-client=mobile]) #skill-window .st-rogue-tree .st-node{height:132px;align-self:center;justify-content:center;gap:2px}
html #skill-window .st-rogue-tree .st-kind-badge{left:auto;right:-4px;top:auto;bottom:-2px;transform:none;width:15px;height:15px;font-size:10px}
html[data-client=mobile] #skill-window .st-grid.st-rogue-tree .st-icon-wrap,
html[data-client=mobile] #skill-window .st-grid.st-rogue-tree .st-icon{width:56px;height:56px;min-height:56px}
html[data-client=mobile] #skill-window .st-rogue-tree .st-register-zone{flex-wrap:wrap}

html #skill-window .st-rogue-tree .st-icon.st-image-icon{padding:0}
html #skill-window .st-rogue-tree .st-icon.st-image-icon img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain}
html:not([data-client=mobile]) #skill-window .st-rogue-tree .st-node{gap:1px;padding:1px 2px}

html #skill-window .st-rogue-tree .st-node .st-name{font-size:16px;font-weight:700;line-height:19px;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;text-align:center}
html:not([data-client=mobile]) #skill-window .st-rogue-tree .st-node{height:158px;gap:2px;padding:2px;justify-content:center}
html:not([data-client=mobile]) #skill-window .st-rogue-tree .st-name{height:38px;align-items:center}
html #skill-window .st-rogue-tree .st-rank>span{font-size:15px;font-weight:700;line-height:24px}
html:not([data-client=mobile]) #skill-window .st-rogue-tree .st-rank{grid-template-columns:24px minmax(0,1fr) 24px;grid-template-rows:24px 25px;gap:2px;width:min(104px,100%);min-width:0;height:51px}
html #skill-window .st-rogue-tree .st-rank>button{width:24px;height:24px;font-size:18px;line-height:1;padding:0}
html:not([data-client=mobile]) #skill-window .st-rogue-tree .st-rank>select{height:25px;min-width:60px;max-width:86px;width:auto;font-size:14px}
html[data-client=mobile] #skill-window .st-rogue-tree .st-rank>button{width:32px;height:32px;font-size:21px}
html[data-client=mobile] #skill-window .st-rogue-tree .st-rank>select{font-size:15px!important;min-height:40px}
html[data-client=mobile] #skill-window .st-rogue-tree .st-register-zone{justify-content:center}
@media(max-width:370px){html[data-client=mobile] #skill-window .st-rogue-tree .st-mobile-cards{grid-template-columns:minmax(0,1fr)}}
