/* ═══════════════════════════════════════════════════════════════════════════
   styles/mac-sim.css
   ─────────────────────────────────────────────────────────────────────────
   When `<html class="is-mac-sim">` is set (auto-detected on macOS by the
   inline script at the top of index.html), constrain the page to iPad-
   portrait dimensions and frame it centrally. Lets the user develop on
   Mac while seeing the exact iPad layout — no DevTools device-mode toggle
   needed.

   Opt out per-tab with `?desktop=1` (the inline script honors it).
   Force iPad landscape with `?ipad-landscape=1`.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Default viewport-width variable · used by other CSS so we can swap it
   from 100vw to a fixed iPad width when sim mode is on. */
:root { --vp-w: 100vw; }

html.is-mac-sim {
  background: #000;
  --vp-w: 1024px;
}
html.is-mac-sim body {
  width: 1024px;
  max-width: 1024px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 60px rgba(0,0,0,.55);
  position: relative;
  overflow-x: hidden;
}

/* iPad-landscape variant · 1366 wide */
html.is-mac-sim.is-mac-sim-landscape { --vp-w: 1366px; }
html.is-mac-sim.is-mac-sim-landscape body {
  width: 1366px;
  max-width: 1366px;
}

/* Tiny corner badge so it's obvious you're in sim mode (Mac only).
   Click to toggle landscape. Hidden on iPad. */
html.is-mac-sim::before {
  content: "iPad sim · " attr(data-sim-mode);
  position: fixed;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  font: 600 9px Manrope, ui-monospace, monospace;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(213, 177, 87, .85);
  background: rgba(15, 20, 24, .85);
  border: 1px solid rgba(213, 177, 87, .35);
  padding: 4px 10px;
  border-radius: 99px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
