/* 3.0.11: compact stat efficiency workspace. Scoped to preserve other tabs. */
/* 3.0.12: size the base-damage number against its card, not the viewport. */
/* Legacy TOP labels and current rank badges stay in normal flow. */
body#top .metric-cell.top-rank::before{position:static;left:auto;top:auto;display:flex;width:max-content;min-width:44px;max-width:100%;height:auto;min-height:22px;box-sizing:border-box;margin:0 0 4px auto;padding:2px 6px;line-height:1.25;white-space:nowrap}
body#top .metric-cell.top-rank strong{padding-top:0}
#treeBase .damage-base-value{container-type:inline-size;min-width:0}
#treeBase .damage-node-kicker{display:block;font-size:14px;line-height:1.4}
#treeBase .damage-node-kicker>span{white-space:nowrap}
#treeBaseImpact{display:none}
#treeBaseValue{font-size:26px;font-size:clamp(20px,16cqi,38px);line-height:1.2;letter-spacing:-.035em;white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip}
#growthLab .efficiency-defense-control{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 12px;padding:12px 14px}
#growthLab .efficiency-defense-control>div:first-child{flex:1 1 300px}
#growthLab .efficiency-defense-control strong{font-size:16px}
#growthLab .efficiency-defense-control>div:first-child span{font-size:14px;line-height:1.4}
#growthLab .efficiency-defense-control .defense-options{flex:0 1 430px;width:100%}
#growthLab .efficiency-defense-control button{height:36px;font-size:14px}
#manualPane .manual-head{padding:12px 14px}
#manualPane .manual-head>div>span{font-size:14px;line-height:1.4}
#manualPane .eff-input-guide{display:flex;align-items:baseline;gap:5px 14px;flex-wrap:wrap;margin:12px 12px 0;padding:12px 14px;border:1px solid rgba(104,216,255,.2);border-radius:10px;background:rgba(104,216,255,.04);font-size:14px;line-height:1.5;color:#b2c5cc}
#manualPane .eff-input-guide>strong{color:var(--cyan);font-size:16px}
#manualPane .eff-input-guide b{color:#e4f4f8}
#manualPane .eff-source-note{margin:8px 14px 12px;color:#9fb5bd;font-size:14px;line-height:1.5}
#manualPane .eff-source-preview{display:flex;gap:8px 24px;flex-wrap:wrap;margin:0 14px 12px;color:#aac2cc;font-size:14px;line-height:1.5}
#manualPane .eff-source-preview>span{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
#manualPane .eff-source-preview b{color:#cbdfe5;font-weight:700}
#manualPane .eff-source-preview strong{color:var(--mint)}
#manualPane .eff-source-preview small{color:#9fb5bd;font-size:13px}
#manualPane .manual-table-shell{padding:0 12px 12px 16px;overflow:visible}
#manualPane .eff-table-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:24px;min-width:0}
#manualPane .eff-table-column{min-width:0;max-width:100%;margin:0;overflow:visible!important;border:1px solid var(--line);border-radius:10px;background:#0b1920}
#manualPane .scenario-eff-table{width:100%;min-width:0!important;max-width:100%;table-layout:fixed;border-collapse:collapse;margin:0}
#manualPane .scenario-eff-table col.stat{width:40%!important}
#manualPane .scenario-eff-table col.unit-col{display:table-column!important;width:15%!important}
#manualPane .scenario-eff-table col.unit-eff-col{width:23%!important}
#manualPane .scenario-eff-table col.input{width:22%!important}
#manualPane .eff-column-title{padding:11px 10px;text-align:left;font-size:16px;font-weight:900;background:#132630;border-radius:9px 9px 0 0;color:#dceef2;border-bottom:1px solid var(--line)}
#manualPane .eff-column-title span{float:right;color:#9fb5bd;font-size:14px}
#manualPane .eff-column-title.coverage-static{color:var(--mint)}
#manualPane .eff-column-title.coverage-conditional{color:var(--cyan)}
#manualPane .scenario-eff-table thead th{position:static;padding:8px 5px;font-size:12px;line-height:1.3;white-space:nowrap;letter-spacing:-.02em;text-align:center}
#manualPane .scenario-eff-table thead th:first-child{text-align:left;padding-left:10px}
#manualPane .scenario-eff-table td{height:38px;padding:3px 5px;font-size:14px;line-height:1.2;vertical-align:middle}
#manualPane .scenario-eff-table .stat-cell{position:static;padding-left:10px;background:transparent}
#manualPane .scenario-eff-table .stat-name{display:flex;align-items:center;gap:5px;max-width:100%;font-size:14px!important;line-height:1.25;font-weight:700;letter-spacing:-.03em}
#manualPane .scenario-eff-table .stat-name>span:first-child{overflow:visible;white-space:normal;overflow-wrap:anywhere}
#manualPane .scenario-eff-table .info{flex:0 0 auto;line-height:1}
#manualPane .scenario-eff-table .info-btn{width:18px;height:18px;min-width:18px;padding:0;font-size:12px;line-height:16px}
#manualPane .scenario-eff-table .tooltip{font-size:14px;line-height:1.5}
/* Keep the first/last efficiency columns' explanations inside the viewport. */
@media(min-width:721px){
  #manualPane .scenario-eff-table .tooltip{left:-8px;transform:translateY(5px)}
  #manualPane .scenario-eff-table .info:is(:hover,:focus-within,.open) .tooltip{transform:none}
  #manualPane .scenario-eff-table .tooltip::after{left:16px}
  #manualPane .eff-table-column:last-child .tooltip{left:auto;right:-8px}
  #manualPane .eff-table-column:last-child .tooltip::after{left:auto;right:10px}
}
#manualPane .scenario-eff-table .eff-group-row th{position:static;height:auto;padding:8px 10px;text-align:left;white-space:normal;border-bottom:1px solid var(--line);background:#11272e;color:#cadfe5;font-size:14px;line-height:1.3}
#manualPane .scenario-eff-table .eff-group-row small{display:inline;margin-left:8px;color:#8faab4;font-size:12px;font-weight:400}
#manualPane .table-preset{min-width:0;max-width:100%;padding:5px 3px;border-radius:6px;font-size:12px!important;line-height:1.2;white-space:nowrap;letter-spacing:-.03em;cursor:pointer}
#manualPane .unit-eff-cell{padding-left:2px;padding-right:5px;text-align:right;white-space:nowrap}
#manualPane .unit-eff-cell strong{display:block;overflow:visible;font-size:14px!important;font-variant-numeric:tabular-nums;line-height:1.25;letter-spacing:-.03em;white-space:normal;word-break:keep-all;overflow-wrap:normal}
#manualPane .unit-eff-cell.pending strong,#manualPane .unit-eff-cell.excluded strong{font-size:12px!important;color:#91a8b1}
#manualPane .unit-eff-cell.dps-only strong{font-size:12px!important;color:var(--cyan)}
#manualPane .unit-eff-cell.excluded{opacity:1}
#manualPane .eff-input input{height:30px;padding:0 23px 0 5px;border-radius:6px;font-size:14px!important;text-align:right;line-height:1.2;appearance:textfield;-moz-appearance:textfield}
#manualPane .eff-input input::-webkit-inner-spin-button,#manualPane .eff-input input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
#manualPane .eff-input span{right:5px;font-size:12px;color:#9ab1bb}
#manualPane .eff-compact-row:focus-within{background:rgba(104,216,255,.06)}
#manualPane .conditional-row .stat-cell{box-shadow:inset 2px 0 0 rgba(255,208,109,.55)}
#manualPane .dps-only-row .stat-cell{box-shadow:inset 2px 0 0 rgba(104,216,255,.35)}
#manualPane .excluded-row td{background:rgba(255,255,255,.012);opacity:1}
#manualPane .manual-boundary{margin:0 12px 12px}
/* Rank, stat name and highlighted efficiency belong to the same row.
   Keep the badge inside its cell so it cannot read as the preceding row. */
#manualPane .eff-rank-guide{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 12px;margin:0 14px 10px;font-size:14px;line-height:1.4;color:#a9bec7}
#manualPane .eff-rank-guide strong{color:#ffdc85;white-space:nowrap}
#manualPane .eff-top-ranked{--rank-color:#75634a;--rank-tint:#f3ecdf;--rank-badge:#75634a}
#manualPane .eff-top-ranked[data-eff-rank="1"]{--rank-color:#805116;--rank-tint:#fff0c2;--rank-badge:#805116}
#manualPane .eff-top-ranked[data-eff-rank="2"]{--rank-color:#4e6540;--rank-tint:#eaf0df;--rank-badge:#4e6540}
#manualPane .eff-top-ranked[data-eff-rank="3"]{--rank-color:#885439;--rank-tint:#f8e6d9;--rank-badge:#885439}
#manualPane .scenario-eff-table .eff-top-ranked .stat-cell{position:static;padding-left:9px!important;border-radius:0;background:var(--rank-tint)!important;box-shadow:inset 4px 0 0 var(--rank-color)!important}
#manualPane .scenario-eff-table .eff-top-ranked .unit-eff-cell{outline:2px solid var(--rank-color);outline-offset:-2px}
#manualPane .scenario-eff-table .eff-top-ranked .stat-name{display:inline-flex;max-width:calc(100% - 39px);vertical-align:middle}
#manualPane .scenario-eff-table .eff-top-ranked .stat-name>span:first-child{white-space:normal;overflow-wrap:anywhere}
#manualPane .eff-rank-badge{position:static;transform:none;display:inline-flex;align-items:center;justify-content:center;gap:1px;box-sizing:border-box;min-width:32px;height:25px;margin:3px 6px 3px 0;padding:0 4px;border:1px solid var(--rank-color);border-radius:5px;background:var(--rank-badge);color:#fffdf7;font-size:14px;font-weight:900;line-height:1;font-variant-numeric:tabular-nums;vertical-align:middle;pointer-events:none}
#manualPane .eff-rank-badge::after{content:'위';font-size:11px;font-weight:700}
#manualPane .eff-rank-badge[hidden]{display:none}
@media(min-width:1500px){
  #manualPane .scenario-eff-table .stat-name>span:first-child{white-space:nowrap;overflow:visible}
}
@media(max-width:1279px){
  #manualPane .eff-table-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
  #manualPane .eff-table-column:last-child{grid-column:1/-1}
  #manualPane .eff-table-column:last-child .scenario-eff-table{max-width:760px;margin:0 auto}
}
@media(max-width:799px){
  #manualPane .eff-table-columns{grid-template-columns:1fr}
  #manualPane .eff-table-column:last-child{grid-column:auto}
  #manualPane .manual-table-shell{padding:0 6px 8px 16px}
  #manualPane .eff-input-guide{margin:8px 6px 0;padding:10px}
  #manualPane .eff-source-note{margin:8px 8px 10px}
  #manualPane .scenario-eff-table td{height:42px;padding:4px}
  #manualPane .scenario-eff-table .stat-cell{padding-left:7px}
  #manualPane .scenario-eff-table .stat-name{gap:3px}
  #manualPane .scenario-eff-table col.stat{width:39%!important}
  #manualPane .scenario-eff-table col.unit-col{width:15%!important}
  #manualPane .scenario-eff-table col.unit-eff-col{width:27%!important}
  #manualPane .scenario-eff-table col.input{width:19%!important}
  #manualPane .scenario-eff-table th>.ui-role-label{gap:3px;padding-inline:4px}
  #manualPane .scenario-eff-table th>.ui-role-label::before{width:11px;height:11px;flex-basis:11px}
  #manualPane .scenario-eff-table .eff-group-row small{display:block;margin:3px 0 0}
  #manualPane .eff-input input{height:34px;padding-left:3px;padding-right:20px}
  #manualPane .table-preset{padding:7px 2px}
  #growthLab .efficiency-defense-control .defense-options{flex-basis:100%;max-width:none}
}
