/* STAT-01: stat point block on the character page (src/ui/stat-panel.js). Cream text, sun accent.
   UI-CLEAN-01: it has its own view inside the character panel, so it draws no box of its own; buttons that can do nothing are hidden.
   No outlines (Owner theme); soft shadows only. Every text >= 18px; colour is never the only signal (glyph + name). */
.sp{min-width:0;max-width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:calc(var(--u) * 10);padding:calc(var(--u) * 8) calc(var(--u) * 4);color:var(--hd-cream);
  font-size:max(18px,calc(var(--u) * 18))}
.sp-head{flex-wrap:wrap;display:flex;align-items:center;justify-content:space-between;gap:8px;font-family:Mitr,sans-serif}
.sp-head>b{font-weight:500;color:var(--hd-sun)}
.sp-left{opacity:.8}
.sp-left.has{opacity:1;color:var(--hd-sun);font-weight:500}
.sp-rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:calc(var(--u) * 4)}
.sp-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;align-items:center;gap:calc(var(--u) * 8);padding:calc(var(--u) * 4) 0}
.sp-glyph{display:grid;place-items:center;width:max(30px,calc(var(--u) * 30));height:max(30px,calc(var(--u) * 30));border-radius:50%;background:var(--sp-c);color:var(--hd-ink);font-weight:700}
.sp-name{display:flex;flex-direction:column;min-width:0}
.sp-name b{font-family:Mitr,sans-serif;font-weight:500}
.sp-name small{overflow-wrap:anywhere;font-size:max(18px,calc(var(--u) * 18));opacity:.72;line-height:1.25}
.sp-val{min-width:4.2em;text-align:center;font-variant-numeric:tabular-nums}
.sp-val b{font-size:max(20px,calc(var(--u) * 22))}
.sp-val i{font-style:normal;color:var(--good,#8fe08a);margin-left:2px}
.sp-val small{font-size:max(18px,calc(var(--u) * 18));opacity:.6}
.sp-btn{width:max(44px,calc(var(--u) * 44));height:max(44px,calc(var(--u) * 44));border-radius:50%;border:none;background:var(--hd-lift);color:var(--hd-cream);font-size:max(22px,calc(var(--u) * 24));font-weight:700;cursor:pointer}
.sp-btn:disabled,.sp-recipe:disabled,.sp-ok:disabled,.sp-cancel:disabled{opacity:.35;cursor:default}
.sp-auto,.sp-actions{display:flex;flex-wrap:wrap;gap:calc(var(--u) * 6)}
.sp-actions{justify-content:flex-end}
.sp-actions:not(:has(button:not(:disabled))),.sp-auto:not(:has(button:not(:disabled))){display:none}
.sp-recipe,.sp-ok,.sp-cancel{min-height:max(44px,calc(var(--u) * 42));padding:0 calc(var(--u) * 14);border:none;border-radius:calc(var(--u) * 11);font:inherit;font-family:Mitr,sans-serif;cursor:pointer}
.sp-recipe,.sp-cancel{background:var(--hd-lift);color:var(--hd-cream)}
.sp-ok{background:var(--hd-sun);color:var(--hd-cocoa);font-weight:500}
.sp button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--hd-ink),0 0 0 6px var(--hd-sun)}
.sp button:hover:not(:disabled){filter:brightness(1.18)}
.sp-diff{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(11em,100%),1fr));gap:calc(var(--u) * 4)}
.sp-diff li{display:flex;gap:6px;align-items:baseline;padding:2px 8px;border-radius:8px;background:rgba(255,211,107,.12)}
.sp-diff span{opacity:.8}
.sp-diff em{font-style:normal;color:var(--good,#8fe08a)}
.sp-note{margin:0;opacity:.7}
.sp-reset{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.06);font-size:max(18px,calc(var(--u) * 18))}
.sp-host{min-width:0}
/* narrow column (phone: the stats column is ~190px): name on its own line, − value + under it */
.sp-host{container-type:inline-size}
@container (max-width: 380px){
  .sp{padding:6px;gap:6px}
  .sp-row{grid-template-columns:auto 1fr auto auto;grid-template-areas:"g n n n" "m v v p";padding:4px}
  .sp-glyph{grid-area:g}.sp-name{grid-area:n}.sp-val{grid-area:v;min-width:0}
  .sp-row [data-sp-minus]{grid-area:m}.sp-row [data-sp-plus]{grid-area:p}
  .sp-recipe,.sp-ok,.sp-cancel{flex:1 1 100%;padding:0 6px}
}
/* UI-CLEAN-01: phone landscape keeps compact text here too, like the rest of the page (pages.css), so the four stats fit */
@media (max-height:520px){
  .sp,.sp-name small,.sp-val small{font-size:13px}
  .sp-val b{font-size:16px}
}
