/* The Zenith Star sky (screens/zenith.js): the kit's ornate window, a drawn sky, the side panel, the shelf of Stars. */
#centre > .wnd.zenith-sky {
  --dim: var(--parch-dim); --faint: var(--parch-faint);
  box-sizing: border-box; width: min(1720px, calc(97vw / var(--ui-scale, 1))); height: calc(100vh / var(--ui-scale, 1) - 120px);
  max-height: calc(100vh / var(--ui-scale, 1) - 120px); min-height: 460px;
  padding: 8px 10px 6px; margin: 0; background: #0b0d11;
}
#ui:has(.zenith-sky) #social-hud, #ui:has(.zenith-sky) #campaign-tracker,
#ui:has(.zenith-sky) #left, #ui:has(.zenith-sky) #right { visibility: hidden; }
.zenith-sky .zs-body { overflow: hidden; display: flex; flex-direction: column; gap: 8px; height: 100%; zoom: calc(1 / var(--ui-scale, 1)); }
.zenith-sky .plaque { font-size: calc(28px / var(--ui-scale, 1)); }
.zenith-sky .wnd-foot { font-size: calc(10px / var(--ui-scale, 1)); color: var(--dim); justify-content: center; padding-top: 4px; }

.zs-top { display: flex; align-items: flex-end; gap: 28px; padding: 2px 14px 8px; border-bottom: 1px solid #4b3d2c; flex: 0 0 auto; }
.zs-top > div:first-child { flex: 1; min-width: 0; }
.zs-top small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--gold-lo); }
.zs-top h1 { font: normal 24px/1.1 var(--f-title); color: var(--gold-hi); margin: 3px 0 0; }
.zs-level { display: flex; flex-direction: column; gap: 6px; width: 220px; }
.zs-level > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
.zs-level strong { font: 26px var(--f-title); color: var(--gold-hi); }
.zs-xp { height: 8px; background: #191512; border: 1px solid #4a3d2a; }
.zs-xp > div { height: 100%; background: linear-gradient(90deg, #4f6fa8, #a9c8ff); }
.zs-pool { display: flex; align-items: center; gap: 12px; }
.zs-pool strong { font: 34px var(--f-title); color: var(--gold-hi); text-shadow: 0 0 18px #b3874740; }
.zs-pool span { font-size: 12px; line-height: 1.35; color: var(--parch); }
.zs-pool small { letter-spacing: 0; font-size: 10px; color: var(--dim); }

.zs-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
.zs-sky-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }

/* the four slots: every one is a tab that fills the sky with its Star */
.zs-slots { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, .7fr) repeat(4, minmax(0, 1fr)); gap: 8px; }
.zs-slot { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; background: #12110f; border: 1px solid #45392b; color: var(--parch); font: 12px var(--f-ui); text-align: left; cursor: pointer; }
.zs-slot:hover { border-color: var(--gold); background: #1a1712; }
.zs-slot.on { border-color: var(--gold-hi); background: linear-gradient(180deg, #3a2e1c, #1f1910); box-shadow: inset 0 0 14px #f4dc9a30, 0 0 0 1px #f4dc9a55; }
.zs-slot.locked { opacity: .7; }
.zs-slot svg { flex: none; }
.zs-slot .sn { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.zs-slot em { font-style: normal; font-size: 9px; letter-spacing: 2px; color: var(--gold-lo); }
.zs-slot.on em { color: var(--gold); }
.zs-slot b { font-weight: normal; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.zs-slot b.dim { color: var(--dim); }
.zs-slot small { font-size: 10px; color: var(--dim); line-height: 1.3; }

.zs-sky { position: relative; flex: 1; min-height: 0; border: 1px solid #2e3843; box-shadow: inset 0 0 80px #000a; overflow: hidden; background: #05070c; }
.zs-box { position: absolute; inset: 0; }
.zs-box canvas, .zs-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.zs-svg text { font-family: var(--f-ui); pointer-events: none; paint-order: stroke; stroke: #05070c; stroke-width: calc(var(--u, 1) * 2.6px); stroke-linejoin: round; }
.zs-n { cursor: pointer; }
.zs-n .hit { fill: transparent; }
.zs-n:hover .hit { fill: #f4dc9a18; }
.zs-n .avail { stroke-opacity: .55; animation: zs-pulse 2.4s ease-in-out infinite; }
@keyframes zs-pulse { 50% { stroke-opacity: .15; } }
.zs-void { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 0 24px; pointer-events: none; }
.zs-void .ring { width: 74px; height: 74px; border: 1px dashed #d2a95d; border-radius: 50%; display: grid; place-items: center; font: 30px var(--f-title); color: #d2a95d; margin-bottom: 6px; }
.zs-void.locked .ring { border-color: #6f675a; color: #6f675a; font-size: 13px; letter-spacing: 1px; }
.zs-void h3 { margin: 0; font: normal 18px var(--f-title); color: var(--gold-hi); }
.zs-void p { margin: 0; font-size: 12px; color: var(--dim); max-width: 380px; line-height: 1.5; }

.zs-panel { min-height: 0; overflow: hidden; padding: 12px 14px; display: flex; flex-direction: column; background: linear-gradient(165deg, #26221a80, #0f1113); }
.zs-kind { font-size: 10px; letter-spacing: 2px; color: var(--gold-lo); }
.zs-panel h2 { font: normal 21px/1.15 var(--f-title); color: var(--gold-hi); margin: 6px 0 4px; }
.zs-meta { font-size: 11px; color: var(--dim); margin-bottom: 8px; line-height: 1.4; }
.zs-panel p { font-size: 13px; line-height: 1.5; margin: 6px 0; color: var(--parch); }
.zs-panel .zs-fine { font-size: 11px; color: var(--dim); }
.zs-panel .zs-warn { font-size: 12px; color: #e0a46a; }
.zs-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.zs-rule { border-top: 1px solid #4a3d2a; margin: 10px 0; }
.zs-rank { height: 8px; background: #191512; border: 1px solid #4a3d2a; margin: 2px 0 8px; }
.zs-rank > div { height: 100%; background: linear-gradient(90deg, #8a6838, #f4dc9a); }
.zs-tiers { list-style: none; padding: 0; margin: 6px 0; font-size: 12px; line-height: 1.45; color: var(--parch); }
.zs-tiers li { margin-bottom: 6px; }
.zs-tiers li span { display: inline-block; min-width: 58px; color: var(--gold); }
.zs-tiers li.off, .zs-tiers li.off span { color: var(--faint); }
.zs-blist { list-style: none; padding: 0; margin: 4px 0; font-size: 12px; }
.zs-blist li { border-bottom: 1px solid #2f2820; }
.zs-blist li > button, .zs-blist li > div { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 6px; background: none; border: 0; border-left: 2px solid transparent; color: var(--parch); font: 12px var(--f-ui); text-align: left; }
.zs-blist li > button { cursor: pointer; }
.zs-blist li > button:hover { background: #ffffff0a; }
.zs-blist li > button.on { background: #3a2e1c; border-left-color: var(--gold-hi); }
.zs-blist .nm { flex: 1; min-width: 0; }
.zs-blist small { display: block; font-size: 10px; color: var(--faint); margin-top: 2px; }
.zs-blist .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.zs-blist .tag { font-size: 9px; color: var(--faint); letter-spacing: 1px; text-align: right; }
.zs-blist .pts { color: var(--gold); font-size: 11px; min-width: 44px; text-align: right; }
.zs-actions { padding-top: 10px; display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.zs-actions .btn { height: 34px; font-size: 13px; }
.zs-text { background: none; border: 0; color: var(--dim); font: 12px var(--f-ui); cursor: pointer; padding: 4px; }
.zs-text:hover { color: var(--gold-hi); }
.zs-status { font-size: 11px; color: var(--bad); min-height: 14px; }

/* the overview panel: every slot with its four branches */
.zs-ovslot { display: block; width: 100%; margin: 0 0 8px; padding: 8px 10px; background: #12110f; border: 1px solid #45392b; color: var(--parch); font: 12px var(--f-ui); text-align: left; cursor: pointer; }
.zs-ovslot:hover { border-color: var(--gold-hi); background: #1a1712; }
.zs-ovslot.dim { opacity: .7; }
.zs-ovslot .h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.zs-ovslot em { font-style: normal; font-size: 9px; letter-spacing: 2px; color: var(--gold-lo); }
.zs-ovslot b { font-weight: normal; font-size: 13px; flex: 1; min-width: 0; }
.zs-ovslot small { display: block; font-size: 10px; color: var(--dim); }
.zs-ovslot .pts { color: var(--gold); font-size: 11px; }
.zs-ovslot .br { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 8px; padding: 3px 0; border-top: 1px solid #2f2820; }
.zs-ovslot .br i { width: 8px; height: 8px; border-radius: 50%; }
.zs-ovslot .br .tag { font-size: 9px; letter-spacing: 1px; color: var(--faint); }
.zs-ovslot .bar { grid-column: 2 / -1; height: 3px; background: #1d1913; }
.zs-ovslot .bar s { display: block; height: 100%; text-decoration: none; opacity: .85; }

/* the Stars you hold, as the list in the panel */
.zs-copies { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.zs-copy { flex: none; background: #12110f; border: 1px solid #45392b; padding: 7px 9px; cursor: pointer; text-align: left; color: var(--parch); font: 12px var(--f-ui); display: flex; gap: 9px; align-items: center; position: relative; }
.zs-copy:hover { border-color: var(--gold); }
.zs-copy.here { border-color: #6a5232; background: #2a2116; }
.zs-copy.twin { opacity: .6; }
.zs-copy svg { flex: none; }
.zs-copy .cn { min-width: 0; flex: 1; }
.zs-copy b { font-weight: normal; display: block; font-size: 13px; }
.zs-copy small { display: block; font-size: 10px; color: var(--dim); margin-top: 2px; line-height: 1.35; white-space: normal; }
.zs-copy i { flex: none; font-style: normal; font-size: 9px; letter-spacing: 1px; color: var(--gold); text-align: right; max-width: 70px; }

@media (max-height: 820px) {
  .zs-top h1 { font-size: 20px; }
  .zs-pool strong { font-size: 28px; }
  .zs-slot { padding: 6px 10px; }
}
