/* Warden's Trove: hub doors, TroveGame panel, tables, Trade. */
.tv-help,.hv-help{margin:12px 0}
.tv-help p,.hv-help p{margin:0 0 8px}
.tv-help p:last-child,.hv-help p:last-child{margin-bottom:0}
.tv-doors{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}
.tv-doors .bp-card{padding:16px}
.tv-doors .link-card-pics{display:flex;flex-wrap:wrap;gap:6px}
.tv-doors .link-card-pics img{width:64px;height:64px;object-fit:contain;border-radius:10px;background:var(--surface-2)}
.tv-doors .bp-card-name{font-size:1.35rem}

.tv-game{--tv-ink:#fff;--tv-teal:#3f6b74;--tv-deep:#22383d;--tv-panel:#4f7f89;--tv-up:#6bdc3c;margin:0 auto 24px;padding:12px;border-radius:16px;color:var(--tv-ink);background:#2b3a3d;border:3px solid #1b2629;box-shadow:0 6px 20px #00000040;max-width:760px}
.tv-game a{color:inherit}
.tv-head{display:flex;align-items:center;gap:12px;justify-content:center;position:relative;padding:4px 0 10px}
.tv-head strong{font-size:1.4rem;font-weight:800;text-shadow:0 2px 0 #000}
.tv-back{position:absolute;inset-inline-start:4px;font-size:2rem;font-weight:800;line-height:1;text-decoration:none}
.tv-game .tv-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0;border-bottom:6px solid #e6e6e6}
.tv-game .tv-tabs a{padding:10px;text-align:center;font-weight:800;font-size:1.1rem;border-radius:10px 10px 0 0;background:#4a4d4f;color:#b9bcbd;text-decoration:none}
.tv-game .tv-tabs a[aria-current]{background:#e6e6e6;color:#34393b}
.tv-game .tv-tabs a:not([aria-current]):hover{color:#fff;text-decoration:none}
.tv-lv{display:grid;grid-template-columns:auto 1fr auto;gap:6px 10px;align-items:center;padding:12px 4px 4px}
.tv-lv output{grid-column:1 / -1;text-align:center;font-weight:800;font-size:1.05rem;text-shadow:0 1px 0 #000}
.tv-lv input{width:100%;accent-color:#19b2ef}
.tv-lv button{width:36px;height:36px;border-radius:10px;border:2px solid #12303a;background:#19b2ef;color:#fff;font-weight:800;font-size:1.2rem;cursor:pointer}
.tv-qual{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;padding:6px 0}
.tv-qual .chip{background:var(--tv-deep);border-color:#13201f;font-weight:700}
.tv-qual .chip[aria-pressed=true]{background:#e6e6e6;border-color:currentColor}
.tv-shelf{list-style:none;margin:8px 0 0;padding:12px 10px 4px;border-radius:10px;background:radial-gradient(circle,rgb(0 0 0 / .12) 3px,transparent 4px) 0 0 / 26px 26px,var(--tv-teal)}
.tv-shelf-collection{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px}
.tv-shelf-collection>li{padding-bottom:12px;background:linear-gradient(#d9dcdc,#a9b0b1) bottom / 100% 10px no-repeat}
.tv-game .tv-item{all:unset;box-sizing:border-box;cursor:pointer;display:grid;justify-items:center;gap:4px;width:100%;position:relative}
.tv-game .tv-item:focus-visible{outline:3px solid #fff;outline-offset:2px;border-radius:10px}
.tv-frame{display:grid;place-items:center;width:min(120px,100%);aspect-ratio:1;box-sizing:border-box;border-radius:10px;border:4px solid #8a4a2a;background:radial-gradient(circle at 50% 40%,color-mix(in srgb,var(--q) 55%,#fff 10%),color-mix(in srgb,var(--q) 45%,#1c1430))}
.tv-frame img{width:86%;height:86%;object-fit:contain;filter:drop-shadow(0 3px 2px rgb(0 0 0 / .35))}
.tv-game .tv-item[aria-pressed=true] .tv-frame{outline:3px solid #fff;outline-offset:3px}
.tv-plate{width:100%;box-sizing:border-box;padding:4px 6px;text-align:center;font-weight:800;font-size:.95rem;line-height:1.2;background:#263236;border-radius:4px;text-shadow:0 1px 0 #000}
.tv-type{font-weight:700;font-size:.8rem}
.tv-row{list-style:none;padding:6px 0 12px;background:linear-gradient(#d9dcdc,#a9b0b1) bottom / 100% 8px no-repeat}
.tv-row+.tv-row{margin-top:8px}
.tv-rowhead{margin:0 0 6px;font-size:1.05rem;font-weight:800;text-shadow:0 1px 0 #000;filter:brightness(1.35)}
.tv-books{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(6,1fr);gap:2px}
.tv-books>li{min-width:0}
.tv-book{aspect-ratio:1;place-items:center;border-radius:10px;overflow:hidden;font-size:.6rem}
.tv-book img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 2px rgb(0 0 0 / .35))}
.tv-book[aria-pressed=true]{outline:3px solid #fff;outline-offset:1px;background:#ffffff1f}
.tv-lvtag{position:absolute;inset-inline-end:2px;bottom:2px;min-width:18px;padding:0 4px;border-radius:8px;background:#000000a6;font-size:.75rem;font-weight:800;text-align:center}
.tv-detail{margin-top:10px;padding:12px;border-radius:10px;background:var(--tv-panel);display:grid;gap:8px}
.tv-power{display:flex;align-items:center;justify-content:center;gap:8px;padding:6px 12px;border-radius:999px;font-size:1.35rem;font-weight:800;text-shadow:0 1px 0 #000;background:radial-gradient(ellipse at center,#e27828d9,#e2782800 70%)}
.tv-up{color:var(--tv-up)}
.tv-name{margin:0;text-align:center;font-weight:800;font-size:1.05rem;text-shadow:0 1px 0 #000}
.tv-bar{margin:4px 0 0;padding:6px;text-align:center;font-size:1rem;font-weight:800;background:#36474b;border-radius:6px}
.tv-stat{display:flex;justify-content:space-between;gap:12px;padding:2px 12px;font-weight:700;flex-wrap:wrap}
.tv-val strong,.tv-arrow{color:var(--tv-up)}
.tv-game .tv-cost{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 20px;padding:4px 0}
.tv-chip{display:grid;justify-items:center;gap:2px;font-weight:800;text-shadow:0 1px 0 #000}
.tv-note{margin:0;text-align:center;font-size:.85rem}
.tv-max{margin:4px 0;text-align:center;font-weight:800;color:var(--tv-up)}
.tv-gate{color:#ffd76a}
.tv-sets{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px}
.tv-set{display:flex;gap:8px;align-items:flex-start;padding:8px;border-radius:8px;background:#0000002e;font-size:.9rem}
.tv-set .tv-shape{color:#e040e0;flex:none}
.tv-set.off .tv-shape{color:#8b9a9d}
.tv-setline{display:flex;justify-content:space-between;gap:8px}
.tv-setline strong{color:var(--tv-up)}
.tv-game [data-calc]{margin-top:8px}
.tv-game .link-card{background:#0000002e;border-color:#1b2629}

.tv-cost{display:flex;flex-wrap:wrap;gap:4px 10px}
.calc-gate{color:var(--muted);font-size:.8em;white-space:nowrap}
tr.tv-on{background:var(--surface-2)}

.tv-trades{list-style:none;padding:0;margin:0;display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}
.tv-trade{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:4px 8px;text-align:center}
.tv-trade-arrow{font-size:1.4rem;color:var(--good)}
.tv-trade-side{display:grid;justify-items:center}
.tv-trade-item{display:grid;justify-items:center;gap:4px}
.tv-trade-pic{position:relative}
.tv-trade-pic strong{position:absolute;inset-inline-end:-6px;bottom:-6px;padding:0 5px;border-radius:8px;background:var(--surface);border:1px solid var(--border);font-size:.8rem}
.tv-trade-limit{grid-column:1 / -1}

@media(max-width:480px){
  .tv-game{padding:8px;border-radius:12px}
  .tv-plate{font-size:.8rem}
  .tv-power{font-size:1.15rem}
  .tv-books{grid-template-columns:repeat(3,minmax(0,1fr))}
}
