/* Fusion GLB Viewer extras on top of zmm.css (app, share page and pricing). */
#zmm:has(#app:not([hidden])) { height: calc(100vh - var(--fsc-hd-h, 0px)); min-height: 0; }
#app { min-height: 0; }
.glb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
.glb-page { overflow: auto; }

/* ---------- library ---------- */
.glb-lib { display: flex; flex-direction: column; min-height: 0; padding: 12px; gap: 10px; }
.glb-usage { display: grid; gap: 6px; font-size: .84rem; }
.glb-usage .row { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.glb-usage .row b { color: var(--text); }
.meter { height: 8px; border-radius: 6px; background: var(--bg); overflow: hidden; border: 1px solid var(--border); }
.meter i { display: block; height: 100%; background: var(--good); border-radius: 6px; transition: width .3s; }
.meter.warn i { background: var(--warn); } .meter.full i { background: var(--bad); }
.planpill { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: .75rem; font-weight: 700; border: 1px solid var(--accent); color: var(--accent); }
.planpill.trial { border-color: var(--warn); color: var(--warn); }
.expired-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: #3b2a1a; color: var(--warn); font-size: .84rem; }
.glb-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; display: grid; gap: 6px; align-content: start; }
.glb-list li button { width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; padding: 6px; background: none;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.glb-list li button:hover { background: var(--hover); }
.glb-list li button[aria-current=true] { background: var(--selected); border-color: var(--accent); }
.glb-list .th { width: 72px; height: 45px; border-radius: 7px; background: var(--bg) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); }
.glb-list .th .ic { width: 22px; height: 22px; }
.glb-list .nm { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glb-list small { color: var(--muted); font-size: .78rem; }
.glb-list .shared { color: var(--purple); }
.glb-list .team { color: var(--link, var(--blue-700)); font-weight: 600; }

/* ---------- 3D stage ---------- */
.glb-stage { position: relative; min-height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #16171c; }
.glb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.glb-stage canvas:active { cursor: grabbing; }
.glb-hud { position: absolute; top: 12px; left: 12px; display: grid; gap: 2px; padding: 8px 12px; border-radius: 8px; background: rgba(0, 0, 0, .5); font-size: .84rem; pointer-events: none; max-width: calc(100% - 24px); }
.glb-hud b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glb-hud span, .glb-hud small { color: #c3c8d6; }
.glb-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; color: var(--muted); }
.glb-empty .ic { width: 56px; height: 56px; color: var(--accent); stroke-width: 1.2; }
.glb-empty h2 { color: var(--text); margin: 8px 0 0; }
.glb-empty p { margin: 0 0 10px; max-width: 360px; }
.glb-drop { position: absolute; inset: 10px; border: 3px dashed var(--accent); border-radius: 12px; background: rgba(44, 88, 168, .35); display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; pointer-events: none; }
.glb-loading { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 6px; padding: 10px 16px; border-radius: 10px; background: rgba(0, 0, 0, .65); font-size: .88rem; min-width: 260px; text-align: center; }
.glb-loading i { display: block; height: 5px; border-radius: 4px; background: #333845; overflow: hidden; }
.glb-loading b { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.rexp { display: grid; gap: 4px; align-content: center; min-width: 170px; font-size: .78rem; color: var(--muted); }
.rexp input { padding: 0; accent-color: var(--accent); }

/* ---------- tables ---------- */
.glb-table { width: 100%; border-collapse: collapse; background: var(--panel); }
.glb-table th { text-align: left; padding: 11px 12px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--border); white-space: nowrap; }
.glb-table td { padding: 9px 12px; border-bottom: 1px solid #262932; vertical-align: middle; }
.glb-table tr.off td { color: var(--muted); }
.glb-table .link { display: flex; gap: 6px; align-items: center; min-width: 260px; }
.glb-table .link input { font: .82rem var(--mono); padding: 6px 8px; }
.glb-table .btn { padding: 6px 12px; font-size: .85rem; white-space: nowrap; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin: 14px 2px 10px; flex-wrap: wrap; }
.sec-head h2 { font-size: 1.05rem; margin: 0; }
.sec-head small { color: var(--muted); flex: 1; }

/* ---------- plan page ---------- */
.planbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.planbox .card { padding: 16px 18px; } .planbox small { color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.planbox b { display: block; font-size: 1.35rem; margin-top: 4px; }
.plan .btn { margin-top: 14px; width: 100%; }
.plan.current { border-color: var(--accent); }
.glb-pricing { border-top: 0; }

@media (max-width: 860px) {
  #zmm:has(#app:not([hidden])) { height: auto; min-height: calc(100vh - var(--fsc-hd-h, 0px)); }
  .glb-main { grid-template-columns: 1fr; }
  .glb-stage { height: 62vh; order: -1; }
  .glb-lib { max-height: 50vh; }
}

/* ---------- landing colours ---------- */
.landing.lp-glb { --lp-glow1: #22d3ee; --lp-glow2: #f97316; }

/* ---------- public share page ---------- */
.share-page { height: 100vh; display: flex; flex-direction: column; }
.share-page .glb-stage { flex: 1; border-radius: 0; border: 0; }
.share-page .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-tools .btn { padding: 6px 12px; font-size: .85rem; }
.share-foot { padding: 8px 18px; background: var(--panel); border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.share-gone { margin: auto; text-align: center; max-width: 460px; padding: 40px 20px; }
.glb-empty-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.glb-empty p { max-width: 440px; }
/* Free plan: usage panel note and the "try the full viewer" box on the Plan view */
.free-note { margin: 6px 0 0; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.free-note .linkbtn { display: inline; margin-left: 2px; }
.trialbox { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; margin: 0 0 18px; border-color: var(--accent); }
.trialbox b { display: block; } .trialbox small { color: var(--muted); }
@media (max-width: 640px) { .trialbox { flex-direction: column; align-items: stretch; } }
.plans.plans-four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .plans.plans-four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .plans.plans-four { grid-template-columns: 1fr; } }
