:root {
  --forest: #1a5c45;
  --deep: #0f3d2e;
  --sand: #f4efe6;
  --ink: #1a1f1c;
  --muted: #5c6b63;
  --gold: #c4a35a;
  --line: rgba(15, 61, 46, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.5;
}
header {
  background: var(--deep);
  color: #f7f4ef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 6vw;
  position: sticky; top: 0; z-index: 5;
}
.brand span { display: block; font-size: 0.78rem; opacity: 0.8; font-style: italic; }
header nav { display: flex; gap: 1rem; }
header a { color: #e8d5a3; text-decoration: none; }
main { width: min(1100px, 92vw); margin: 1.5rem auto 3rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); font-size: 0.75rem; font-weight: 700; margin: 0; }
h1 { margin: 0.2rem 0 0.4rem; color: var(--deep); }
.lead { color: var(--muted); max-width: 46rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.chips button, .btn, .ghost, .phase {
  border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 0.35rem 0.8rem;
  font: inherit; cursor: pointer; color: var(--deep); text-decoration: none; display: inline-flex; align-items: center;
}
.chips button.on, .phase.on, .btn { background: var(--gold); border-color: transparent; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.card h3 { margin: 0.25rem 0; color: var(--deep); font-size: 1.05rem; }
.meta { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--forest); font-weight: 700; }
.mods, .card p { color: var(--muted); font-size: 0.88rem; margin: 0.2rem 0; }
.row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.ghost { background: transparent; }
.stage { background: #000; border-radius: 14px; overflow: hidden; position: relative; }
.stage video.flat-video { width: 100%; display: block; max-height: 62vh; background: #000; object-fit: contain; }
.stage video.flat-video.is-portrait { max-height: 72vh; width: auto; max-width: 100%; margin: 0 auto; }
.stage.is-equirect { min-height: 320px; }
.stage.is-equirect video.flat-video { display: none !important; }
.equirect-host { width: 100%; height: 55vh; min-height: 280px; }
.equirect-host canvas { display: block; width: 100% !important; height: 100% !important; }
.look-hint {
  position: absolute; top: 0.75rem; left: 50%; transform: translateX(-50%);
  background: rgba(15,61,46,0.85); color: #fff; padding: 0.35rem 0.8rem; border-radius: 999px;
  font-size: 0.82rem; z-index: 2; pointer-events: none; white-space: nowrap;
}
.badge {
  display: inline-block; margin: 0.4rem 0 0.2rem; padding: 0.25rem 0.7rem; border-radius: 999px;
  background: rgba(196,163,90,0.2); color: var(--deep); font-size: 0.82rem; font-weight: 650;
}
.stage-tools { margin: 0.4rem 0 0.6rem; }
.hotspot-toast {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem;
  background: rgba(15,61,46,0.92); color: #fff; padding: 0.7rem 0.9rem; border-radius: 12px;
  border: 1px solid rgba(196,163,90,0.5); display: none;
}
.hotspot-toast.show { display: block; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-top: 1rem; }
.checks label { display: block; margin: 0.35rem 0; }
input[type=text], textarea, select {
  width: 100%; padding: 0.5rem 0.65rem; border-radius: 10px; border: 1px solid var(--line); font: inherit;
}
.ok { color: var(--forest); font-weight: 650; }
.warn { color: #9a3412; }
.phases { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.7rem 0 1rem; }

/* ——— Responsive XR shell (phone / tablet) ——— */
@media (max-width: 720px) {
  header {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 0.65rem 4vw;
    gap: 0.45rem 0.75rem;
  }
  header nav {
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    width: 100%;
    font-size: 0.88rem;
  }
  .brand span { font-size: 0.7rem; }
  main { width: min(1100px, 94vw); margin: 1rem auto 2.5rem; }
  h1 { font-size: 1.35rem; line-height: 1.25; }
  .grid { grid-template-columns: 1fr; }
  .chips { gap: 0.35rem; }
  .chips button, .btn, .ghost, .phase {
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    min-height: 40px;
  }
  .panel { padding: 0.85rem; }
  .equirect-host { height: 48vh; min-height: 220px; }
  .stage.is-equirect { min-height: 220px; }
  .look-hint { font-size: 0.72rem; white-space: normal; text-align: center; max-width: 90%; }
  .guide-vid, .shot { border-radius: 10px; }
  .pair { grid-template-columns: 1fr !important; }
  .shot.narrow { max-width: 100%; }
  .link-table { display: block; overflow-x: auto; }
  .cast-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 420px) {
  header nav a { font-size: 0.82rem; }
  h1 { font-size: 1.2rem; }
}
