/* Local staging extension; the approved map's visual world is retained. */
.tm-live .tm-header,.tm-live .tm-objects__heading>a { display:none }
.tm-embedded,.tm-embedded body { min-height:0;height:auto }
/* The host owns scrolling. Gate-card updates can exceed the previous iframe
   height for one frame before its ResizeObserver readback reaches the host. */
.tm-embedded { overflow:hidden }
.tm-embedded body { background:transparent }
.tm-embedded .tm-main { width:100%;margin:0 auto;gap:18px }
.tm-embedded .tm-intro h1 { font-size:28px }
.tm-live.tm-hidden-D .tm-objects__labels>span:nth-child(3),
.tm-live.tm-hidden-D .tm-activation-button[data-planet^="D-"],
.tm-live.tm-hidden-P .tm-objects__labels>span:nth-child(2),
.tm-live.tm-hidden-P .tm-activation-button[data-planet^="P-"] { display:none }
.tm-live.tm-hidden-D .tm-objects__labels,.tm-live.tm-hidden-D .tm-planet-row,
.tm-live.tm-hidden-P .tm-objects__labels,.tm-live.tm-hidden-P .tm-planet-row { grid-template-columns:1fr 1fr }
.tm-live.tm-hidden-D.tm-hidden-P .tm-objects__labels,.tm-live.tm-hidden-D.tm-hidden-P .tm-planet-row { grid-template-columns:1fr }
.tm-live .tm-main { grid-template-areas:'toolbar toolbar' 'stage inspect' 'time inspect' 'objects objects' 'gates gates' 'footer footer' }
.tm-gate-cards-section { grid-area:gates;padding-top:12px }
.tm-gate-cards-section>p { color:var(--muted);margin:8px 0 16px;max-width:70ch }
.tm-gate-cards { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 24px }
.tm-gate-card { padding:18px 0;border-top:1px solid var(--line);min-width:0 }
.tm-gate-card h3 { font-size:19px;margin-bottom:8px }
.tm-gate-card p { margin:6px 0;font-size:14px;line-height:1.5;color:var(--muted) }
.tm-gate-card button { text-align:left;width:100%;min-height:44px;margin:4px 0 }
.tm-gate-card .tm-gate-planet { display:flex;align-items:center;gap:8px }
.tm-gate-card .tm-gate-planet svg { width:22px;height:22px;flex:0 0 22px }
.tm-gate-card .tm-design-name { color:#ad3029 }
.tm-gate-card time { font-variant-numeric:tabular-nums }
.tm-data-status { grid-column:1/-1;font-size:13px;color:var(--muted);margin-top:8px }
.tm-live .tm-stage[data-loading="true"] { opacity:.65 }
.tm-live [data-side="D"] { min-width:150px }
@media(max-width:860px) { .tm-gate-cards { grid-template-columns:repeat(2,minmax(0,1fr)) } .tm-live .tm-main { grid-template-areas:'toolbar' 'stage' 'time' 'inspect' 'objects' 'gates' 'footer' } }
@media(max-width:540px) {
  .tm-gate-cards { grid-template-columns:minmax(0,1fr) }
  .tm-live [data-side="D"] { min-width:0 }
  .tm-embedded .tm-main { gap:14px }
}
