* { box-sizing: border-box; }

:root {
  --ivory: #fffaf0;
  --cream: #f8edda;
  --sand: #ead7bd;
  --adobe: #c96442;
  --adobe-dark: #7f3d29;
  --clay: #a96843;
  --taupe: #6b5848;
  --ink: #3f332b;
  --muted: #7c6858;
  --line: rgba(126, 91, 62, 0.24);
  --soft-panel: rgba(255, 250, 240, 0.82);
  --panel-2: rgba(248, 237, 218, 0.90);
  --card-shadow: 0 18px 42px rgba(48, 32, 18, 0.15);
}

html, body { width: 100%; min-height: 100%; margin: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #efe1cd;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }

.plaza-app {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255,250,240,0.03) 0%, rgba(255,250,240,0.04) 34%, rgba(248,237,218,0.62) 73%, #f8edda 100%),
    url("art/July42024SantaFe-1600.webp") center top / cover no-repeat,
    #f8edda;
  background:
    linear-gradient(180deg, rgba(255,250,240,0.03) 0%, rgba(255,250,240,0.04) 34%, rgba(248,237,218,0.62) 73%, #f8edda 100%),
    image-set(url("art/July42024SantaFe-1600.webp") type("image/webp")) center top / cover no-repeat,
    #f8edda;
}

.plaza-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 16%, rgba(255,246,211,0.12), transparent 34%),
    linear-gradient(180deg, rgba(12,19,39,0.04) 0%, transparent 44%, rgba(244,225,199,0.40) 82%);
}

#fireworkCanvas {
  position: fixed;
  inset: 0;
  z-index: 7;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
  cursor: crosshair;
  touch-action: manipulation;
}

.topbar {
  position: sticky;
  top: max(12px, env(safe-area-inset-top));
  z-index: 8;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  transform: translateY(max(12px, env(safe-area-inset-top)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: 0 10px 28px rgba(65, 42, 22, 0.13), inset 0 1px 0 rgba(255,255,255,0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.brand-link, .nav-pill, .contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.brand-link {
  gap: 10px;
  color: var(--ink);
  min-height: 46px;
  padding: 0 9px;
}
.brand-mark svg { width: 50px; height: 32px; }
.brand-mark path { fill: none; stroke: var(--adobe); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.brand-text {
  font-family: Cinzel, Georgia, serif;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(0.76rem, 0.95vw, 0.94rem);
}
.menu-toggle { display: none; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.nav-pill {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.nav-pill:hover, .nav-pill:focus-visible {
  transform: translateY(-1px);
  background: rgba(201,100,66,0.08);
  border-color: rgba(201,100,66,0.22);
  outline: none;
}
.nav-pill.is-active {
  color: #fffdf6;
  background: linear-gradient(135deg, #b94f32, #d97850);
  box-shadow: 0 10px 22px rgba(185,79,50,0.22);
}
.nav-pill.is-active span { margin-right: 6px; }

.page-wrap {
  position: relative;
  z-index: 5;
  width: min(1220px, calc(100% - 32px));
  min-height: calc(100svh - 104px);
  margin: 0 auto;
  padding-top: clamp(420px, 56vh, 610px);
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(560px, 1fr);
  gap: clamp(14px, 2.2vw, 28px);
  align-items: end;
  pointer-events: none;
}
.hero-card, .control-panel, .topbar { pointer-events: auto; }
.hero-card, .control-panel {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,0.28), transparent 44%), var(--soft-panel);
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255,255,255,0.88);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hero-card {
  width: min(320px, 100%);
  padding: 15px 16px;
  border-radius: 22px;
  text-align: left;
  background: rgba(255,250,240,0.74);
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--adobe-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  color: var(--ink);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.5rem, 1.75vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.hero-intro {
  margin: 8px 0 0;
  color: var(--taupe);
  font-size: 0.9rem;
  line-height: 1.45;
}
.zia, .location-line { display: none; }

.control-panel {
  width: 100%;
  justify-self: end;
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(220px, 1fr) minmax(170px, 0.75fr);
  grid-template-areas:
    "title launch launch"
    "show color display";
  gap: 12px;
  padding: clamp(14px, 1.6vw, 20px);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.30), transparent 40%), var(--panel-2);
}
.panel-title {
  grid-area: title;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.panel-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--adobe);
  background: #fff7eb;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  font-size: 1.35rem;
}
.panel-title h2 {
  margin: 0;
  color: var(--ink);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  line-height: 1.05;
}
.panel-title p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.88rem;
}
.launch-btn, .panel-btn, .chip {
  border: 1px solid var(--line);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.launch-btn {
  grid-area: launch;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 19px;
  color: #fffaf2;
  background: linear-gradient(135deg, #b84e32, #d2724d);
  box-shadow: 0 16px 32px rgba(184,78,50,0.26), inset 0 1px 0 rgba(255,255,255,0.34);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 950;
  font-size: 1.02rem;
}
.burst-icon { font-size: 1.8rem; line-height: 1; }
.launch-copy { display: grid; gap: 3px; text-align: left; }
.launch-copy small { font-size: 0.74rem; letter-spacing: 0; text-transform: none; font-weight: 800; color: rgba(255,250,242,0.88); }
.deck-group { display: grid; gap: 8px; align-content: start; }
.show-group { grid-area: show; }
.color-group { grid-area: color; }
.display-group { grid-area: display; }
.section-label {
  color: var(--taupe);
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 950;
}
.show-row, .secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel-btn {
  min-height: 46px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,250,240,0.62);
  font-weight: 900;
}
.panel-btn.is-hot { color: #b64d32; border-color: rgba(182,77,50,0.42); }
.panel-btn.is-cool { color: #1d5b9b; border-color: rgba(29,91,155,0.44); }
.color-row { display: grid; grid-template-columns: repeat(7, minmax(32px, 1fr)); gap: 8px; }
.chip {
  aspect-ratio: 1;
  min-height: 36px;
  border-radius: 50%;
  font-size: 0;
  background: var(--chip);
  box-shadow: 0 7px 14px rgba(66,42,22,0.14), inset 0 0 0 4px rgba(255,250,240,0.88);
}
.chip.is-selected {
  box-shadow: 0 0 0 3px rgba(201,100,66,0.30), 0 8px 18px rgba(66,42,22,0.18), inset 0 0 0 4px rgba(255,250,240,0.9);
  border-color: rgba(127,61,41,0.42);
}
.launch-btn:hover, .panel-btn:hover, .chip:hover,
.launch-btn:focus-visible, .panel-btn:focus-visible, .chip:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.04);
  border-color: rgba(127,61,41,0.42);
  outline: none;
}
.launch-btn:active, .panel-btn:active, .chip:active { transform: translateY(0) scale(0.99); }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9;
  transform: translate(-50%, 22px);
  opacity: 0;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,250,240,0.94);
  box-shadow: 0 18px 38px rgba(48,32,18,0.18);
  color: var(--adobe-dark);
  font-weight: 900;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 1440px) {
  .topbar, .page-wrap { width: min(1360px, calc(100% - 72px)); }
  .page-wrap {
    padding-top: clamp(460px, 58vh, 680px);
    grid-template-columns: minmax(230px, 340px) minmax(640px, 1fr);
  }
  .control-panel { grid-template-columns: minmax(230px, 0.8fr) minmax(240px, 1fr) minmax(190px, 0.72fr); }
}

@media (min-width: 1025px) and (max-height: 820px) {
  .page-wrap {
    min-height: calc(100svh - 92px);
    padding-top: clamp(290px, 47vh, 380px);
    grid-template-columns: minmax(210px, 280px) minmax(560px, 1fr);
  }
  .hero-card { padding: 13px 14px; }
  .hero-intro { display: none; }
  .control-panel { gap: 9px; padding: 13px; }
  .panel-title p { display: none; }
  .launch-btn { min-height: 56px; }
  .panel-btn { min-height: 42px; font-size: 0.84rem; }
  .chip { min-height: 32px; }
}

@media (max-width: 1024px) {
  .plaza-app {
    background:
      linear-gradient(180deg, rgba(255,250,240,0.02) 0%, rgba(255,250,240,0.05) 35%, rgba(248,237,218,0.78) 69%, #f8edda 100%),
      url("art/July42024SantaFe-1600.webp") center top / auto 64vh no-repeat,
      #f8edda;
    background:
      linear-gradient(180deg, rgba(255,250,240,0.02) 0%, rgba(255,250,240,0.05) 35%, rgba(248,237,218,0.78) 69%, #f8edda 100%),
      image-set(url("art/July42024SantaFe-1600.webp") type("image/webp")) center top / auto 64vh no-repeat,
      #f8edda;
  }
  .topbar { align-items: stretch; flex-direction: column; border-radius: 24px; }
  .brand-link { justify-content: flex-start; }
  .nav-links { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-pill { flex: 0 0 auto; }
  .page-wrap {
    width: min(820px, calc(100% - 28px));
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: clamp(330px, 49vh, 500px);
    gap: 12px;
  }
  .hero-card { width: min(560px, 100%); justify-self: center; text-align: center; }
  h1 { font-size: clamp(1.65rem, 4.5vw, 2.45rem); }
  .control-panel {
    justify-self: center;
    width: 100%;
    max-width: 760px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "title title"
      "launch launch"
      "show color"
      "display display";
  }
}

@media (max-width: 640px) {
  body { background: #f3e5d2; }
  .plaza-app {
    background:
      linear-gradient(180deg, rgba(255,250,240,0.01) 0%, rgba(255,250,240,0.04) 30%, rgba(248,237,218,0.86) 63%, #f8edda 100%),
      url("art/July42024SantaFe-900.webp") center top / auto 48vh no-repeat,
      #f8edda;
    background:
      linear-gradient(180deg, rgba(255,250,240,0.01) 0%, rgba(255,250,240,0.04) 30%, rgba(248,237,218,0.86) 63%, #f8edda 100%),
      image-set(url("art/July42024SantaFe-900.webp") type("image/webp")) center top / auto 48vh no-repeat,
      #f8edda;
  }
  .plaza-app::before { background: linear-gradient(180deg, rgba(14,20,40,0.03), rgba(244,225,199,0.58) 62%); }
  .topbar {
    width: calc(100% - 18px);
    top: max(8px, env(safe-area-inset-top));
    transform: translateY(max(8px, env(safe-area-inset-top)));
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 8px;
    gap: 7px;
    border-radius: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .brand-link { min-height: 42px; padding: 0 4px; }
  .brand-mark svg { width: 42px; height: 28px; }
  .brand-text { font-size: 0.72rem; letter-spacing: 0.09em; }
  .menu-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid rgba(201,100,66,0.36);
    border-radius: 15px;
    color: var(--adobe-dark);
    background: rgba(255,250,240,0.76);
    font-weight: 900;
  }
  .menu-toggle span { font-size: 1.15rem; line-height: 1; }
  .nav-links {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    overflow: visible;
    padding-top: 4px;
  }
  .topbar.is-open .nav-links { display: grid; }
  .nav-pill { min-height: 40px; padding: 0 6px; font-size: 0.78rem; }
  .nav-pill.is-active span { display: none; }
  .page-wrap { width: calc(100% - 18px); padding-top: min(340px, 40vh); gap: 9px; }
  .hero-card, .control-panel { border-radius: 22px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hero-card { padding: 13px 14px; width: 100%; }
  .eyebrow { font-size: 0.60rem; margin-bottom: 6px; letter-spacing: 0.10em; }
  h1 { font-size: clamp(1.5rem, 7vw, 2.1rem); line-height: 1.05; }
  .hero-intro { margin-top: 7px; font-size: 0.82rem; line-height: 1.35; }
  .control-panel {
    padding: 12px;
    gap: 9px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "launch"
      "color"
      "show"
      "display";
  }
  .panel-title { gap: 10px; }
  .panel-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .panel-title h2 { font-size: 1.25rem; }
  .panel-title p { font-size: 0.80rem; margin-top: 3px; }
  .launch-btn { min-height: 58px; border-radius: 17px; font-size: 0.9rem; gap: 10px; }
  .burst-icon { font-size: 1.45rem; }
  .launch-copy small { font-size: 0.68rem; }
  .section-label { font-size: 0.64rem; }
  .show-row, .secondary-actions { gap: 8px; }
  .panel-btn { min-height: 44px; border-radius: 14px; font-size: 0.82rem; padding: 0 7px; }
  .color-row { grid-template-columns: repeat(7, 1fr); gap: 7px; }
  .chip { min-height: 34px; }
  .toast { width: calc(100% - 24px); border-radius: 18px; text-align: center; bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .hero-intro, .panel-title p { display: none; }
  .page-wrap { padding-top: min(305px, 37vh); }
}

@media (max-width: 640px) and (max-height: 720px) {
  .page-wrap { padding-top: min(260px, 34vh); }
  .hero-intro { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .launch-btn, .panel-btn, .chip, .nav-pill, .toast { transition: none; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .topbar { position: relative; top: 0; transform: none; margin-top: 8px; }
  .page-wrap { padding-top: 170px; grid-template-columns: 0.55fr 1.45fr; align-items: start; }
  .hero-card { padding: 12px; }
  .hero-intro, .panel-title p { display: none; }
  .control-panel { gap: 8px; padding: 11px; grid-template-columns: 0.8fr 1fr 0.8fr; grid-template-areas: "launch color display" "show show show"; }
  .panel-title { display: none; }
}

/* Fireworks module isolation: optional diagnostics stay hidden in production. */
.performance-strip, .stats, .feature-strip, .hint-card { display: none !important; }
