/* Shared frame and fixed tab row for Development. */
#talents.view { overflow:hidden; }
.development-shell {
  --stone-cut:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px);
  position:relative; isolation:isolate; display:grid; grid-template-rows:auto minmax(0,1fr);
  height:100%; min-width:0; min-height:0; padding:6px;
}
.development-shell::before,.development-shell::after { content:""; position:absolute; pointer-events:none; clip-path:var(--stone-cut); }
.development-shell::before { inset:0; z-index:-2; border:1px solid #160f20; background:linear-gradient(145deg,transparent 38%,#b78dd04d 39% 46%,transparent 47%) 0 0/78px 67px,linear-gradient(35deg,transparent 36%,#261a3c77 37% 55%,transparent 56%) 0 0/111px 93px,linear-gradient(125deg,#b795d0,#654777 25%,#a078b7 45%,#402b56 66%,#a381b9); }
.development-shell::after { inset:4px; z-index:-1; background:linear-gradient(135deg,#382943,#241d32 45%,#201a2c); box-shadow:inset 0 0 5px #160e24b0; }
.development-shell > .development-tabs {
  position:relative; gap:5px; margin:0; padding:4px 4px 6px;
  border:0; border-bottom:1px solid #9b789d70; border-radius:0;
  background:linear-gradient(165deg,#492f56,#271e36); box-shadow:inset 0 1px #b290c845;
}
.development-shell > [role="tabpanel"] { min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; }
.development-shell > .talent-screen {
  grid-template-rows:auto minmax(185px,1fr) auto;
  border:0; border-radius:0; box-shadow:none;
}
.development-shell .talent-tree { height:100%; }
.development-shell > .skill-upgrades { align-content:start; padding:8px 7px 12px; gap:8px; }
.development-shell .skill-upgrade-card {
  padding:10px; border-color:#886d9359; border-radius:8px; box-shadow:none;
  background:linear-gradient(135deg,#30273b,#211d30);
}
.development-shell .skill-upgrade-card .skill-upgrade-icon { flex-basis:48px; width:48px; height:48px; }
.development-shell > .rarity-upgrades { align-content:start; padding-bottom:4px; }
.development-shell > .development-tabs button {
  --tab-edge: linear-gradient(145deg,#ad8cbd,#795d8c 44%,#543b65 70%,#896a9b);
  --tab-face: linear-gradient(145deg,#685074,#4a365c 47%,#402c51 48%,#33223f);
  min-height:44px;
  padding:9px 3px;
  color:#d6c6e1;
  font-size:clamp(11px,3.4vw,14px);
}
.development-shell > .development-tabs button.on {
  --tab-edge: linear-gradient(145deg,#fff0ac,#ffbc4c 40%,#b65b10 72%,#f7a647);
  --tab-face: linear-gradient(145deg,#ffbf45,#ff9411 43%,#eb7b06 44%,#d36608);
  color:#fff1d4;
  text-shadow:0 1px #8a4319;
}
.development-shell > .development-tabs button::after { display:none; }

.rarity-upgrades { display:grid; gap:0; padding:0; }
.rarity-upgrades[hidden] { display:none; }
.rarity-card { min-width:0; padding:4px 7px 6px; border:0; border-radius:0; background:none; box-shadow:none; }
.rarity-table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0 5px; }
.rarity-name-column { width:62%; }
.rarity-table thead th { padding:4px 3px 9px; color:#c2b5ce; font:700 10px/1.3 "Trebuchet MS",sans-serif; text-align:right; }
.rarity-table thead th:first-child { text-align:left; }
.rarity-table tbody tr { background:linear-gradient(145deg,#ffffff07,transparent 48%),linear-gradient(90deg,rgba(var(--rarity-rgb),.21),#30263f 66%,#30243d); }
.rarity-table tbody th,.rarity-table tbody td { border-top:1px solid #9d81ac55; border-bottom:1px solid #160e2566; box-shadow:inset 0 1px #e5cbff08; }
.rarity-table tbody th { padding:10px 6px; border-left:3px solid rgb(var(--rarity-rgb)); border-radius:4px 0 0 4px; color:#f0e9e6; font:800 12px/1.25 "Trebuchet MS",sans-serif; text-align:left; }
.rarity-table td { padding:8px 4px; color:#ffe0a1; font:800 12px/1.25 "Trebuchet MS",sans-serif; text-align:right; font-variant-numeric:tabular-nums; }
.rarity-table td:last-child { border-right:1px solid #92789c66; border-radius:0 4px 4px 0; color:#c3b7cc; }
.rarity-table .rarity-locked td { color:#bdb3c9; }
.rarity-name { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.rarity-name i { flex:0 0 12px; color:rgb(var(--rarity-rgb)); font:14px/1 sans-serif; text-shadow:0 1px #170d2380; }
.rarity-lock { position:relative; flex:0 0 8px; width:8px; height:7px; margin:4px 0 0 auto; border:1px solid #c9b5d6; border-radius:1px; opacity:.6; }
.rarity-lock::before { content:""; position:absolute; left:1px; top:-5px; width:4px; height:5px; border:1px solid #c9b5d6; border-bottom:0; border-radius:3px 3px 0 0; }
.rarity-upgrade-actions { display:grid; justify-items:center; gap:7px; padding:9px 0 8px; }
.rarity-upgrade-level {
  margin:0; color:#d8b6f2; font:750 13px/1.2 system-ui,sans-serif; font-variant-numeric:tabular-nums;
}
.rarity-improve {
  display:grid; justify-items:center; gap:4px; width:clamp(132px,52%,200px); min-height:48px;
  padding:6px 9px; border:1px solid #9a72ae; border-radius:11px;
  color:#ffe3a7; background:linear-gradient(#664676,#382346 70%,#2c1d38);
  box-shadow:inset 0 1px #edd2ff37,0 3px 7px #140c1f80;
  font:700 14px/1.1 system-ui,sans-serif; cursor:pointer; touch-action:manipulation;
}
.rarity-improve:enabled:active { filter:brightness(.88); }
.rarity-improve:focus-visible { outline:2px solid #f8e2a7; outline-offset:2px; }
.rarity-improve:disabled { opacity:.72; cursor:default; }
.rarity-upgrade-cost { display:flex; align-items:center; gap:9px; color:#f6dfc5; font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rarity-upgrade-cost[hidden] { display:none; }
.rarity-upgrade-cost > span { display:flex; align-items:center; gap:3px; }
.rarity-upgrade-cost :is(img,.coin-icon) { width:15px; height:15px; object-fit:contain; }
.rarity-upgrade-cost .is-short { color:#ffb5ae; }
#rarityUpgradeStatus { margin:0; color:#ffbaae; font-size:11px; }
#rarityUpgradeStatus:empty { display:none; }
@media(max-width:350px) { .rarity-card { padding-inline:4px; } .rarity-name { gap:4px; } .rarity-table tbody th { padding-inline:4px; font-size:10px; } .rarity-table td { font-size:11px; } .rarity-name i { flex-basis:10px; font-size:12px; } }
