@charset "UTF-8";

:root {
  --ink: #010101;
  --ink-soft: #090806;
  --ivory: #fbf3df;
  --ivory-muted: rgba(251, 243, 223, 0.6);
  --gold: #f7d28b;
  --gold-bright: #fff2c8;
  --gold-dim: rgba(247, 210, 139, 0.34);
  --mint: #efd295;
  --glass: rgba(18, 15, 11, 0.5);
  --glass-strong: rgba(10, 9, 7, 0.8);
  --line: rgba(255, 246, 220, 0.14);
  --line-bright: rgba(255, 246, 220, 0.25);
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Songti SC", "STSong", serif;
  --sans: "Avenir Next", "SF Pro Display", "Helvetica Neue", "PingFang SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

button,
input {
  font: inherit;
}

input {
  user-select: text;
  -webkit-user-select: text;
}

button {
  color: inherit;
}

button:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

#stage {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

body.is-dragging #stage {
  cursor: grabbing;
}

body.camera-on #stage,
body.camera-on.is-dragging #stage {
  cursor: default;
}

.aura {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 30% at 50% 77%, rgba(214, 155, 70, 0.065), transparent 72%),
    radial-gradient(ellipse 23% 30% at 50% 23%, rgba(255, 216, 130, 0.05), transparent 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 22%, transparent 74%, rgba(0, 0, 0, 0.25));
  mix-blend-mode: screen;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 72% at 50% 48%, transparent 38%, rgba(0, 0, 0, 0.22) 70%, rgba(0, 0, 0, 0.72) 115%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent 17%, transparent 82%, rgba(0, 0, 0, 0.46));
}

.grain {
  position: fixed;
  inset: -8%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(6) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(2%, 2%); }
  80% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 26px;
  padding: 30px 38px 0;
  pointer-events: none;
  animation: header-in 1.4s var(--ease) both;
}

@keyframes header-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 38px;
}

.brand-star {
  width: 32px;
  height: 32px;
  overflow: visible;
  fill: var(--gold);
  filter: drop-shadow(0 0 12px rgba(255, 206, 110, 0.33));
}

.brand-star circle {
  fill: var(--ivory);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.31em;
}

.brand-copy span {
  font-size: 6.5px;
  letter-spacing: 0.22em;
  color: rgba(251, 243, 223, 0.43);
}

.masthead {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 2px;
  white-space: nowrap;
}

.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(14px, 1.25vw, 19px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  color: var(--gold-bright);
  text-shadow: 0 0 28px rgba(255, 218, 140, 0.26);
}

.masthead p {
  margin: 0;
  font-family: var(--serif);
  font-size: 7px;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  color: rgba(251, 243, 223, 0.45);
}

.masthead-rule {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247, 210, 139, 0.62), transparent);
}

.actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 29, 21, 0.52);
  color: rgba(251, 243, 223, 0.7);
  font-size: 9px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.35s, background 0.35s, color 0.35s, transform 0.35s var(--ease);
}

.icon-button:hover {
  color: var(--ivory);
  border-color: var(--line-bright);
  background: rgba(18, 48, 35, 0.54);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button svg path:first-child {
  fill: none;
}

.icon-button svg circle {
  fill: none;
}

#soundButton svg path:first-child {
  fill: currentColor;
  stroke: none;
}

#soundButton.is-muted .sound-wave {
  display: none;
}

#soundButton:not(.is-muted) .sound-off {
  display: none;
}

#soundButton:not(.is-muted) {
  color: var(--gold);
  border-color: rgba(247, 210, 139, 0.27);
}

.icon-only {
  width: 36px;
  padding: 0;
}

.camera-trigger.is-active {
  color: var(--gold-bright);
  border-color: rgba(247, 210, 139, 0.42);
  background: rgba(67, 43, 16, 0.58);
  box-shadow: 0 0 24px rgba(232, 174, 83, 0.12), inset 0 0 16px rgba(247, 210, 139, 0.06);
}

.camera-trigger.is-active svg {
  animation: camera-soft-pulse 2.8s ease-in-out infinite;
}

@keyframes camera-soft-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(247, 210, 139, 0)); }
  50% { filter: drop-shadow(0 0 5px rgba(247, 210, 139, 0.55)); }
}

.mode-pill {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 245, 218, 0.07);
  border-radius: 999px;
  background: rgba(18, 13, 5, 0.46);
  transform: translateX(-50%);
  color: rgba(251, 243, 223, 0.35);
  font-size: 7px;
  letter-spacing: 0.24em;
  pointer-events: none;
  transition: color 0.5s, border-color 0.5s, background 0.5s, opacity 0.5s;
}

.mode-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

body.camera-on .mode-pill {
  color: rgba(255, 230, 170, 0.9);
  border-color: rgba(247, 210, 139, 0.2);
  background: rgba(35, 24, 8, 0.5);
}

body.camera-on .mode-dot {
  animation: dot-pulse 2.2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.2); }
}

.formation-flash {
  --flash-accent: #ffd27a;
  position: fixed;
  top: clamp(122px, 15vh, 150px);
  left: 50%;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.formation-flash.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.formation-flash-kicker {
  color: rgba(251, 243, 223, 0.3);
  font-size: 6px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.formation-flash-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.formation-flash-row::before,
.formation-flash-row::after {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--flash-accent));
  opacity: 0.42;
}

.formation-flash-row::after {
  transform: scaleX(-1);
}

#formationFlashIndex {
  color: var(--flash-accent);
  font-size: 8px;
  letter-spacing: 0.16em;
  opacity: 0.78;
}

#formationFlashName {
  color: rgba(255, 242, 210, 0.92);
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-shadow: 0 0 22px rgba(255, 224, 158, 0.28);
  white-space: nowrap;
}

.camera-card {
  position: fixed;
  left: 38px;
  bottom: 74px;
  z-index: 18;
  width: 242px;
  padding: 8px;
  border: 1px solid rgba(255, 246, 220, 0.11);
  border-radius: 18px;
  background: rgba(4, 19, 13, 0.62);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transform-origin: left bottom;
  pointer-events: none;
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

body.camera-on .camera-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.camera-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #020907;
}

#cameraView {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0, 7, 4, 0.45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 40%, rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.camera-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -25%;
  z-index: 2;
  height: 22%;
  opacity: 0.55;
  background: linear-gradient(180deg, transparent, rgba(116, 255, 194, 0.1), transparent);
  animation: scan 4.8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.6; }
  80% { opacity: 0.35; }
  100% { transform: translateY(580%); opacity: 0; }
}

.live-badge {
  position: absolute;
  top: 8px;
  left: 9px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(158, 255, 209, 0.2);
  border-radius: 999px;
  background: rgba(1, 16, 9, 0.55);
  color: #c2ffe2;
  font-size: 6.5px;
  letter-spacing: 0.2em;
}

.live-badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #68f5b9;
  box-shadow: 0 0 7px #68f5b9;
}

.camera-label {
  position: absolute;
  right: 9px;
  bottom: 8px;
  z-index: 3;
  color: rgba(229, 255, 241, 0.51);
  font-size: 6.5px;
  letter-spacing: 0.22em;
}

.camera-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 6px 4px;
}

.camera-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.camera-copy strong {
  overflow: hidden;
  color: rgba(246, 255, 249, 0.88);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-copy span {
  overflow: hidden;
  color: rgba(233, 255, 242, 0.38);
  font-size: 8px;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  opacity: 0.38;
}

.signal i {
  display: block;
  width: 1.5px;
  border-radius: 2px;
  background: var(--mint);
  box-shadow: 0 0 5px rgba(247, 210, 139, 0.45);
  animation: signal-flicker 1.3s ease-in-out infinite alternate;
}

.signal i:nth-child(1) { height: 4px; animation-delay: -0.2s; }
.signal i:nth-child(2) { height: 8px; animation-delay: -0.8s; }
.signal i:nth-child(3) { height: 12px; animation-delay: -0.4s; }
.signal i:nth-child(4) { height: 7px; animation-delay: -1.1s; }
.signal i:nth-child(5) { height: 3px; animation-delay: -0.6s; }

.camera-card.is-tracking .signal {
  opacity: 0.95;
}

.camera-card.is-tracking .camera-copy strong {
  color: #d7ffeb;
}

.camera-card.is-tracking .live-badge {
  border-color: rgba(158, 255, 209, 0.38);
  background: rgba(5, 38, 23, 0.68);
}

.formation-dock {
  position: fixed;
  left: 50%;
  bottom: 72px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 245, 218, 0.11);
  border-radius: 22px;
  background:
    linear-gradient(100deg, rgba(11, 38, 27, 0.78), rgba(4, 18, 12, 0.84)),
    radial-gradient(circle at 50% 0%, rgba(255, 220, 143, 0.055), transparent 65%);
  box-shadow: 0 16px 58px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease), border-color 0.5s;
}

body.explore-ready .formation-dock {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

body.camera-on .formation-dock {
  border-color: rgba(255, 245, 218, 0.15);
}

.formation-title {
  padding: 1px 10px 1px 4px;
  border-right: 1px solid rgba(255, 245, 218, 0.09);
  color: rgba(251, 243, 223, 0.28);
  font-size: 5.5px;
  line-height: 1.45;
  letter-spacing: 0.2em;
}

.formation-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 49px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(251, 243, 223, 0.42);
  cursor: pointer;
  transition: color 0.32s, background 0.32s, transform 0.32s var(--ease), box-shadow 0.32s;
}

.formation-button:hover {
  color: rgba(255, 249, 231, 0.82);
  background: rgba(255, 246, 220, 0.045);
  transform: translateY(-1px);
}

.formation-button svg {
  width: 17px;
  height: 17px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.formation-button span {
  font-size: 6.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.formation-button.is-active {
  color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(255, 230, 170, 0.13), rgba(255, 210, 122, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 225, 160, 0.12), 0 0 22px rgba(255, 208, 116, 0.055);
}

.formation-button.is-active svg {
  filter: drop-shadow(0 0 6px rgba(255, 213, 131, 0.52));
}

.formation-button.is-active::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 6px var(--gold);
  transform: translateX(-50%);
}

.scatter-button.is-active {
  color: #d7fff0;
  background: radial-gradient(circle at 50% 35%, rgba(111, 255, 196, 0.16), rgba(53, 205, 145, 0.02) 72%);
  box-shadow: inset 0 0 0 1px rgba(129, 255, 205, 0.13), 0 0 22px rgba(76, 232, 163, 0.05);
}

.greeting-trigger.is-active {
  color: #ffe6b6;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 226, 168, 0.19), rgba(255, 167, 126, 0.03) 72%),
    linear-gradient(180deg, rgba(255, 234, 190, 0.08), transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 228, 172, 0.16), 0 0 24px rgba(255, 199, 122, 0.08);
}

.formation-divider {
  width: 1px;
  height: 26px;
  margin: 0 5px;
  background: rgba(255, 245, 218, 0.085);
}

@keyframes signal-flicker {
  from { transform: scaleY(0.55); opacity: 0.38; }
  to { transform: scaleY(1); opacity: 0.9; }
}

.invite {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(760px, calc(100vw - 64px));
  padding: 16px 17px 16px 18px;
  border: 1px solid rgba(255, 245, 218, 0.14);
  border-radius: 23px;
  background:
    linear-gradient(105deg, rgba(15, 46, 33, 0.84), rgba(5, 20, 14, 0.88)),
    radial-gradient(circle at 14% 0%, rgba(255, 219, 140, 0.11), transparent 37%);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transform: translateX(-50%);
  animation: invite-in 1.2s 0.35s var(--ease) both;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

@keyframes invite-in {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.invite.is-leaving {
  opacity: 0;
  transform: translate(-50%, 14px) scale(0.98);
  pointer-events: none;
}

.invite-icon {
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(247, 210, 139, 0.18);
  border-radius: 50%;
  background: radial-gradient(circle at 45% 36%, rgba(255, 222, 153, 0.13), rgba(2, 15, 9, 0.3) 70%);
  box-shadow: inset 0 0 22px rgba(255, 222, 153, 0.035), 0 0 30px rgba(255, 206, 110, 0.035);
}

.invite-icon svg {
  width: 33px;
  height: 33px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(255, 211, 128, 0.35));
}

.invite-icon .spark {
  fill: var(--gold-bright);
  stroke: none;
}

.invite-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.invite-copy .eyebrow {
  margin: 0 0 3px;
  color: rgba(247, 210, 139, 0.63);
  font-size: 6.5px;
  letter-spacing: 0.28em;
}

.invite-copy h2 {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #fff8e8;
}

.invite-copy > p:last-child {
  margin: 0;
  color: rgba(241, 250, 244, 0.48);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.invite-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 12px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(255, 235, 182, 0.65);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffedbe, #e7bd6d);
  box-shadow: 0 6px 24px rgba(241, 191, 92, 0.18), inset 0 1px 0 #fff9e8;
  color: #241a08;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, filter 0.35s;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 32px rgba(241, 191, 92, 0.28), inset 0 1px 0 #fff9e8;
}

.primary-button:active {
  transform: translateY(0) scale(0.98);
}

.primary-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: rgba(247, 239, 220, 0.45);
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s;
}

.text-button:hover {
  color: var(--ivory);
}

.invite-close {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 247, 226, 0.24);
  font-size: 17px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s;
}

.invite-close:hover {
  color: rgba(255, 247, 226, 0.75);
}

.gesture-dock {
  position: fixed;
  right: 38px;
  bottom: 72px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 245, 218, 0.08);
  border-radius: 999px;
  background: rgba(4, 19, 13, 0.58);
  color: rgba(251, 243, 223, 0.42);
  font-size: 8px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

body.camera-on .gesture-dock {
  opacity: 1;
  transform: translateY(0);
}

.dock-kicker {
  padding-right: 14px;
  border-right: 1px solid rgba(255, 245, 218, 0.09);
  color: rgba(247, 210, 139, 0.58);
  font-size: 6.5px;
  letter-spacing: 0.18em;
}

.dock-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.dock-item i {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 10px;
  font-style: normal;
}

.mouse-hints {
  position: fixed;
  right: 38px;
  bottom: 72px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 245, 218, 0.08);
  border-radius: 999px;
  background: rgba(4, 19, 13, 0.52);
  color: rgba(251, 243, 223, 0.36);
  font-size: 8px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

body.explore-ready:not(.camera-on) .mouse-hints {
  opacity: 1;
  transform: translateY(0);
}

.mouse-hints b {
  color: rgba(247, 210, 139, 0.82);
  font-weight: 400;
}

.hint-separator {
  width: 1px;
  height: 10px;
  background: rgba(255, 245, 218, 0.1);
}

.wish-toast {
  position: fixed;
  left: 50%;
  bottom: 202px;
  z-index: 29;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid rgba(255, 225, 155, 0.21);
  border-radius: 999px;
  background: rgba(10, 33, 23, 0.72);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.29), 0 0 38px rgba(255, 204, 108, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: rgba(255, 249, 231, 0.85);
  font-size: 9px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.wish-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast-star {
  color: var(--gold-bright);
  font-size: 12px;
  text-shadow: 0 0 13px rgba(255, 220, 136, 0.6);
}

.camera-error {
  position: fixed;
  right: 38px;
  top: 90px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 266px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 173, 130, 0.23);
  border-radius: 14px;
  background: rgba(37, 18, 12, 0.83);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
}

.camera-error.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.camera-error strong {
  color: #ffd9c7;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.camera-error span {
  color: rgba(255, 235, 222, 0.53);
  font-size: 8px;
  line-height: 1.65;
}

.camera-error button {
  align-self: flex-end;
  margin-top: 3px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: rgba(255, 208, 180, 0.8);
  font-size: 8px;
  cursor: pointer;
}

.greeting-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 50% 48% at 50% 45%, rgba(36, 82, 57, 0.2), transparent 72%),
    rgba(0, 7, 4, 0.68);
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.greeting-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.greeting-card {
  position: relative;
  width: min(548px, 100%);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 34px 34px 30px;
  border: 1px solid rgba(255, 238, 198, 0.19);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 219, 143, 0.14), transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(95, 228, 164, 0.08), transparent 40%),
    linear-gradient(145deg, rgba(15, 46, 32, 0.92), rgba(4, 20, 13, 0.94));
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 0 80px rgba(255, 199, 108, 0.035);
  transform: translateY(18px) scale(0.976);
  transition: transform 0.7s var(--ease);
}

.greeting-overlay.is-open .greeting-card {
  transform: translateY(0) scale(1);
}

.greeting-kicker {
  margin: 0 0 9px;
  color: rgba(247, 210, 139, 0.56);
  font-size: 6.5px;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
}

.greeting-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 33px);
  font-weight: 400;
  letter-spacing: 0.055em;
  color: #fff7e5;
  text-shadow: 0 0 34px rgba(255, 220, 145, 0.13);
}

.greeting-copy {
  margin: 0;
  color: rgba(236, 248, 240, 0.48);
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.045em;
}

.greeting-label {
  display: block;
  margin: 23px 0 8px;
  color: rgba(247, 210, 139, 0.6);
  font-size: 7px;
  letter-spacing: 0.32em;
}

.greeting-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

#nameInput {
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(255, 239, 205, 0.13);
  border-radius: 14px;
  outline: none;
  background:
    linear-gradient(180deg, rgba(255, 249, 230, 0.045), rgba(255, 249, 230, 0.012)),
    rgba(1, 12, 9, 0.4);
  color: #fff8e8;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.035em;
  caret-color: var(--gold);
  transition: border-color 0.35s, box-shadow 0.35s, background 0.35s;
}

#nameInput::placeholder {
  color: rgba(251, 243, 223, 0.25);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}

#nameInput:focus {
  border-color: rgba(255, 219, 142, 0.5);
  background: rgba(7, 26, 18, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.055), 0 0 34px rgba(255, 204, 112, 0.055);
}

.greeting-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255, 237, 188, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff0c7, #e8bb67);
  box-shadow: 0 10px 32px rgba(238, 181, 75, 0.2), inset 0 1px 0 #fff9e9;
  color: #241807;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.35s var(--ease), filter 0.35s, box-shadow 0.35s;
}

.greeting-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.045);
  box-shadow: 0 14px 38px rgba(238, 181, 75, 0.29), inset 0 1px 0 #fff9e9;
}

.greeting-submit svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.greeting-preview {
  margin: 20px 0 0;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 240, 205, 0.08);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 231, 180, 0.55);
}

.greeting-preview strong {
  color: #fff1c9;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-shadow: 0 0 22px rgba(255, 221, 141, 0.42);
}

.greeting-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 247, 226, 0.24);
  font-size: 19px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s;
}

.greeting-close:hover {
  color: rgba(255, 247, 226, 0.8);
}

.footer-note {
  position: fixed;
  left: 38px;
  right: 38px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(251, 243, 223, 0.22);
  font-size: 6.5px;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.footer-line {
  width: 28px;
  height: 1px;
  background: rgba(251, 243, 223, 0.14);
}

#video {
  position: fixed;
  width: 1px;
  height: 1px;
  top: -10px;
  left: -10px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .topbar {
    padding: 20px 22px 0;
  }

  .brand-copy span,
  .masthead p {
    display: none;
  }

  .mode-pill {
    top: 72px;
  }

  .invite {
    bottom: 66px;
    width: min(690px, calc(100vw - 36px));
    gap: 13px;
    padding: 14px 14px 14px 16px;
  }

  .invite-copy h2 {
    font-size: 18px;
  }

  .invite-copy > p:last-child {
    font-size: 8px;
  }

  .invite-icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .invite-icon svg {
    width: 28px;
    height: 28px;
  }

  .camera-card {
    left: 22px;
    bottom: 60px;
    width: 205px;
  }

  .gesture-dock,
  .mouse-hints {
    right: 22px;
    bottom: 58px;
  }

  .formation-dock {
    bottom: 58px;
  }

  .formation-title,
  .formation-button span {
    display: none;
  }

  .formation-button {
    width: 38px;
    height: 38px;
  }

  .formation-divider {
    height: 22px;
    margin: 0 2px;
  }

  .gesture-dock {
    gap: 11px;
  }

  .dock-kicker,
  .dock-item:last-child {
    display: none;
  }

  .footer-note {
    left: 22px;
    bottom: 18px;
  }

  .camera-error {
    right: 22px;
    top: 72px;
  }
}

@media (max-width: 660px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    padding: 16px 15px 0;
    gap: 10px;
  }

  .brand-star {
    width: 26px;
    height: 26px;
  }

  .brand-copy {
    display: none;
  }

  .masthead h1 {
    font-size: 12px;
    letter-spacing: 0.33em;
    text-indent: 0.33em;
  }

  .masthead-rule {
    width: 18px;
  }

  .icon-button span {
    display: none;
  }

  .icon-button {
    width: 34px;
    height: 34px;
    padding: 0;
  }

  .actions {
    gap: 5px;
  }

  .mode-pill {
    top: 60px;
    padding: 5px 8px;
    font-size: 6px;
  }

  .formation-flash {
    top: 92px;
  }

  .formation-flash-kicker {
    display: none;
  }

  #formationFlashName {
    font-size: 15px;
  }

  .invite {
    flex-wrap: wrap;
    justify-content: center;
    width: calc(100vw - 24px);
    bottom: 54px;
    padding: 14px;
    border-radius: 19px;
  }

  .invite-icon {
    display: none;
  }

  .invite-copy {
    flex-basis: 100%;
    text-align: center;
  }

  .invite-copy h2 {
    font-size: 17px;
  }

  .invite-copy > p:last-child {
    white-space: normal;
    line-height: 1.5;
  }

  .invite-actions {
    width: 100%;
    justify-content: center;
    padding-right: 0;
  }

  .primary-button {
    height: 37px;
  }

  .invite-close {
    top: 5px;
    right: 8px;
  }

  .camera-card {
    left: 14px;
    bottom: 48px;
    width: 150px;
    padding: 6px;
    border-radius: 14px;
  }

  .camera-info {
    padding: 7px 3px 1px;
  }

  .camera-copy strong {
    font-size: 8px;
  }

  .camera-copy span,
  .signal {
    display: none;
  }

  .gesture-dock,
  .mouse-hints {
    right: 14px;
    bottom: 44px;
    padding: 8px 11px;
    gap: 8px;
    font-size: 7px;
  }

  .formation-dock {
    bottom: 48px;
    padding: 6px;
    border-radius: 17px;
  }

  .formation-button {
    width: 36px;
    height: 36px;
  }

  .gesture-dock,
  .mouse-hints {
    display: none;
  }

  .dock-item:nth-child(4) {
    display: none;
  }

  .hint-separator,
  .mouse-hints span:last-child {
    display: none;
  }

  .wish-toast {
    bottom: 180px;
  }

  .footer-note {
    display: none;
  }

  .camera-error {
    left: 14px;
    right: 14px;
    top: 64px;
    width: auto;
  }
}

@media (max-width: 420px) {
  .gesture-dock,
  .mouse-hints {
    display: none;
  }

  .invite {
    bottom: 48px;
  }

  .camera-card {
    bottom: 42px;
  }
}

@media (max-width: 560px) {
  .formation-dock {
    bottom: 184px;
  }

  .formation-button {
    width: 33px;
    height: 34px;
  }

  .formation-button svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 560px) {
  .greeting-overlay {
    padding: 14px;
  }

  .greeting-card {
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .greeting-card h2 {
    font-size: 23px;
  }

  .greeting-input-row {
    grid-template-columns: 1fr;
  }

  .greeting-submit {
    width: 100%;
  }

  .greeting-preview {
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .greeting-preview strong {
    font-size: 12px;
  }
}

@media (max-height: 700px) {
  .invite {
    bottom: 58px;
  }

  .camera-card {
    bottom: 48px;
    width: 185px;
  }

  .gesture-dock,
  .mouse-hints {
    bottom: 46px;
  }

  .footer-note {
    display: none;
  }

  .wish-toast {
    bottom: 165px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ── Photo light frames ─────────────────────────────────────────────── */
.photo-trigger {
  gap: 6px;
}

.photo-trigger .photo-badge {
  display: inline-grid;
  min-width: 17px;
  height: 15px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(247, 210, 139, 0.18);
  border-radius: 999px;
  background: rgba(255, 225, 157, 0.055);
  color: rgba(255, 228, 167, 0.76);
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

body.photo-gesture-on .mode-pill {
  color: rgba(255, 231, 173, 0.94);
  border-color: rgba(247, 210, 139, 0.26);
  background: rgba(43, 28, 10, 0.55);
}

body.photo-gesture-on .mode-pill::after {
  content: " · PHOTO ZOOM";
  color: rgba(247, 210, 139, 0.62);
}

.photo-overlay {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 52% 48% at 50% 46%, rgba(55, 87, 60, 0.18), transparent 72%),
    rgba(0, 7, 4, 0.7);
  backdrop-filter: blur(15px) saturate(0.94);
  -webkit-backdrop-filter: blur(15px) saturate(0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.photo-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.photo-overlay.is-dragging-file .photo-card {
  border-color: rgba(255, 224, 157, 0.44);
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.55), inset 0 0 70px rgba(255, 210, 126, 0.08);
}

.photo-card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 34px 34px 28px;
  border: 1px solid rgba(255, 238, 198, 0.19);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 219, 143, 0.13), transparent 36%),
    radial-gradient(circle at 88% 100%, rgba(95, 228, 164, 0.075), transparent 40%),
    linear-gradient(145deg, rgba(15, 46, 32, 0.94), rgba(4, 20, 13, 0.95));
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.065),
    0 0 80px rgba(255, 199, 108, 0.035);
  transform: translateY(18px) scale(0.976);
  transition: transform 0.7s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.photo-overlay.is-open .photo-card {
  transform: translateY(0) scale(1);
}

.photo-kicker {
  margin: 0 0 9px;
  color: rgba(247, 210, 139, 0.56);
  font-size: 6.5px;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
}

.photo-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 33px);
  font-weight: 400;
  letter-spacing: 0.055em;
  color: #fff7e5;
  text-shadow: 0 0 34px rgba(255, 220, 145, 0.13);
}

.photo-copy {
  max-width: 560px;
  margin: 0;
  color: rgba(236, 248, 240, 0.5);
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: 0.045em;
}

.photo-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 19px 0 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 240, 205, 0.08);
  color: rgba(255, 247, 228, 0.4);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.photo-stats strong {
  color: #ffeec2;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

#photoModeLabel {
  color: rgba(247, 210, 139, 0.52);
  font-size: 7.5px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  max-height: min(31vh, 272px);
  overflow-y: auto;
  padding: 2px 4px 8px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 210, 139, 0.22) transparent;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 225, 157, 0.2);
  border-radius: 9px;
  background: #080604;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 201, 101, 0.03);
}

.photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.photo-thumb-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(1, 8, 5, 0.62);
  color: rgba(255, 235, 183, 0.7);
  font-size: 5.5px;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.photo-thumb-upload .photo-thumb-tag {
  color: rgba(205, 255, 227, 0.76);
}

.photo-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 235, 190, 0.2);
  border-radius: 50%;
  background: rgba(5, 14, 9, 0.72);
  color: rgba(255, 244, 221, 0.62);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, color 0.25s;
}

.photo-thumb:hover .photo-thumb-remove {
  opacity: 1;
}

.photo-thumb-remove:hover {
  color: #fff4d6;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
}

.photo-upload,
.photo-mode-button,
.photo-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.055em;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, color 0.3s;
}

.photo-upload {
  border: 1px solid rgba(255, 237, 188, 0.68);
  background: linear-gradient(180deg, #ffefc5, #e5b963);
  box-shadow: 0 8px 24px rgba(238, 181, 75, 0.18), inset 0 1px 0 #fff9e9;
  color: #241807;
  font-weight: 600;
}

.photo-upload svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-upload:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.photo-mode-button,
.photo-reset-button {
  border: 1px solid rgba(255, 239, 205, 0.13);
  background: rgba(1, 12, 9, 0.28);
  color: rgba(255, 248, 228, 0.6);
}

.photo-mode-button:hover,
.photo-reset-button:hover {
  border-color: rgba(255, 231, 173, 0.28);
  color: #fff7e4;
}

.photo-mode-button.is-active {
  border-color: rgba(203, 255, 227, 0.34);
  background: rgba(62, 156, 111, 0.19);
  color: #d9ffea;
}

.photo-mode-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  opacity: 0.72;
}

.photo-mode-button.is-active .photo-mode-dot {
  animation: dot-pulse 2.2s ease-in-out infinite;
}

.photo-hint {
  margin: 15px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 240, 205, 0.07);
  color: rgba(255, 240, 211, 0.3);
  font-size: 7.5px;
  line-height: 1.7;
  letter-spacing: 0.035em;
}

.photo-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 247, 226, 0.24);
  font-size: 19px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s;
}

.photo-close:hover {
  color: rgba(255, 247, 226, 0.8);
}

/* ── 12-second one-take opening ─────────────────────────────────────── */
.intro-caption {
  position: fixed;
  left: 50%;
  bottom: 58px;
  z-index: 32;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  white-space: nowrap;
}

.intro-caption.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.intro-index {
  color: rgba(255, 226, 160, 0.85);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.intro-rule {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 220, 145, 0.7), rgba(255, 220, 145, 0.04));
}

.intro-title {
  color: rgba(255, 247, 226, 0.76);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-shadow: 0 0 18px rgba(255, 220, 145, 0.22);
}

.intro-meta {
  color: rgba(255, 247, 226, 0.28);
  font-size: 5.8px;
  letter-spacing: 0.24em;
}

.intro-progress {
  position: fixed;
  left: 50%;
  bottom: 44px;
  z-index: 32;
  width: min(280px, 44vw);
  height: 1px;
  overflow: hidden;
  background: rgba(255, 242, 212, 0.1);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease);
}

.intro-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 225, 160, 0.16), rgba(255, 237, 195, 0.92));
  box-shadow: 0 0 10px rgba(255, 218, 142, 0.42);
}

body.intro-playing .intro-progress {
  opacity: 1;
}

body.pre-intro .mode-pill,
body.pre-intro .formation-dock,
body.pre-intro .gesture-dock,
body.pre-intro .mouse-hints,
body.pre-intro .camera-card,
body.pre-intro .footer-note {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.intro-playing .topbar,
body.intro-playing .mode-pill,
body.intro-playing .formation-dock,
body.intro-playing .gesture-dock,
body.intro-playing .mouse-hints,
body.intro-playing .camera-card,
body.intro-playing .formation-flash,
body.intro-playing .invite,
body.intro-playing .footer-note {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.intro-playing .aura {
  opacity: 0;
}

body.intro-playing .vignette {
  opacity: 0.62;
}

body.intro-playing #stage {
  cursor: default;
}

@media (max-width: 900px) {
  .photo-card {
    padding: 30px 24px 24px;
  }

  .photo-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .photo-trigger .photo-badge {
    display: none;
  }

  .photo-card {
    padding: 26px 18px 20px;
    border-radius: 22px;
  }

  .photo-card h2 {
    font-size: 23px;
  }

  .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 29vh;
    gap: 6px;
  }

  .photo-actions {
    gap: 7px;
  }

  .photo-upload,
  .photo-mode-button,
  .photo-reset-button {
    height: 35px;
    padding: 0 12px;
    font-size: 8px;
  }

  .intro-caption {
    bottom: 44px;
    gap: 8px;
  }

  .intro-rule {
    width: 24px;
  }

  .intro-meta {
    display: none;
  }

  .intro-title {
    font-size: 7.5px;
  }

  .intro-progress {
    bottom: 32px;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 7px;
    padding: 14px 12px 0;
  }

  .actions {
    gap: 3px;
  }

  .icon-button {
    width: 32px;
    height: 32px;
  }

  .masthead h1 {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }

  .masthead-rule {
    width: 12px;
  }
}

/* ---- 2026-11-28 · deep-blue / champagne / cyan theme layer ---- */

html,
body {
  background: #030913;
}

.vignette {
  background:
    radial-gradient(ellipse 68% 62% at 50% 44%, transparent 42%, rgba(1, 4, 10, 0.58) 100%),
    radial-gradient(ellipse 120% 90% at 50% 120%, rgba(10, 26, 58, 0.4), transparent 70%);
}

.formation-dock {
  border-color: rgba(198, 232, 255, 0.12);
  background:
    linear-gradient(110deg, rgba(9, 22, 43, 0.66), rgba(3, 9, 20, 0.74)),
    radial-gradient(circle at 50% 0%, rgba(255, 220, 150, 0.06), transparent 65%);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(64, 132, 220, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.formation-button.is-active {
  color: #fff0c6;
  background: linear-gradient(180deg, rgba(255, 229, 168, 0.15), rgba(255, 206, 118, 0.03));
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 162, 0.16),
    0 0 22px rgba(255, 206, 116, 0.07);
}

.scatter-button.is-active {
  color: #d6f2ff;
  background: radial-gradient(circle at 50% 35%, rgba(132, 210, 255, 0.2), rgba(46, 124, 220, 0.03) 72%);
  box-shadow:
    inset 0 0 0 1px rgba(158, 222, 255, 0.2),
    0 0 24px rgba(86, 168, 255, 0.09);
}

.pattern-dock {
  bottom: 140px;
}

.mode-divider {
  width: 1px;
  height: 26px;
  margin: 0 5px;
  background: rgba(198, 232, 255, 0.1);
}

.mini-button svg {
  width: 15px;
  height: 15px;
}

.mini-button span {
  font-size: 6px;
}

/* ---- 2026-11-30 · warmth / depth / touch layer ---- */

html,
body {
  background:
    radial-gradient(ellipse 90% 70% at 50% 42%, #0d0a07 0%, #070604 46%, #040302 100%);
}

.aura {
  background:
    radial-gradient(ellipse 46% 32% at 50% 78%, rgba(226, 162, 72, 0.09), transparent 72%),
    radial-gradient(ellipse 26% 30% at 50% 24%, rgba(255, 216, 130, 0.07), transparent 72%),
    radial-gradient(ellipse 120% 90% at 50% 110%, rgba(255, 176, 86, 0.05), transparent 70%),
    linear-gradient(180deg, rgba(18, 11, 4, 0.18), transparent 22%, transparent 74%, rgba(10, 6, 2, 0.22));
}

.vignette {
  background:
    radial-gradient(ellipse 70% 64% at 50% 44%, transparent 40%, rgba(6, 4, 2, 0.4) 78%, rgba(2, 1, 0, 0.78) 118%),
    radial-gradient(ellipse 120% 90% at 50% 118%, rgba(52, 32, 12, 0.22), transparent 68%);
}

.grain {
  opacity: 0.085;
  mix-blend-mode: soft-light;
}

.growth-meter {
  position: fixed;
  left: 38px;
  top: 92px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border: 1px solid rgba(255, 226, 162, 0.12);
  border-radius: 999px;
  background: rgba(20, 14, 7, 0.58);
  color: rgba(255, 239, 208, 0.52);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

body.explore-ready .growth-meter {
  opacity: 1;
  transform: translateY(0);
}

.growth-meter b {
  color: #ffe6a9;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(255, 214, 132, 0.5);
}

.growth-spark {
  color: rgba(255, 224, 158, 0.85);
  text-shadow: 0 0 10px rgba(255, 210, 130, 0.7);
  animation: growth-twinkle 2.6s ease-in-out infinite;
}

@keyframes growth-twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.08); }
}

.growth-meter.is-pulse {
  animation: growth-pulse 0.9s var(--ease);
}

@keyframes growth-pulse {
  0% { box-shadow: 0 0 0 rgba(255, 214, 132, 0); }
  35% { box-shadow: 0 0 26px rgba(255, 214, 132, 0.34); }
  100% { box-shadow: 0 0 0 rgba(255, 214, 132, 0); }
}

.touch-hint {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 19;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.touch-hint span {
  display: block;
  padding: 3px 10px 4px;
  border: 1px solid rgba(255, 232, 176, 0.32);
  border-radius: 999px;
  background: rgba(24, 16, 7, 0.6);
  color: #ffefc6;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  white-space: nowrap;
  box-shadow: 0 0 22px rgba(255, 206, 122, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.touch-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* intro player (5 chapters) */

.intro-player {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 32;
  width: min(520px, 76vw);
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

body.intro-playing .intro-player {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

body.intro-finished .intro-player {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: none;
}

body.intro-finished .intro-chapters,
body.intro-finished .intro-progress {
  opacity: 0;
  pointer-events: none;
}

body.intro-finished .intro-replay {
  pointer-events: auto;
}

body.intro-playing .intro-replay {
  opacity: 0;
  pointer-events: none;
}

.intro-chapters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 2.2vw, 18px);
  margin-bottom: 9px;
}

.intro-chapters button {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 2px;
  border: 0;
  background: none;
  color: rgba(255, 244, 220, 0.3);
  cursor: pointer;
  transition: color 0.35s var(--ease), text-shadow 0.35s var(--ease);
}

.intro-chapters button b {
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

.intro-chapters button span {
  font-size: 7.5px;
  letter-spacing: 0.18em;
}

.intro-chapters button:hover,
.intro-chapters button.is-current {
  color: rgba(255, 236, 194, 0.96);
  text-shadow: 0 0 14px rgba(255, 214, 132, 0.5);
}

.intro-progress {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  height: 2px;
  overflow: visible;
  background: rgba(255, 242, 212, 0.1);
  transform: none;
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.intro-progress::before {
  content: "";
  position: absolute;
  inset: -8px 0;
}

.intro-progress i {
  box-shadow: 0 0 12px rgba(255, 218, 142, 0.55);
}

.intro-replay {
  margin: 10px auto 0;
  display: block;
  padding: 4px 12px;
  border: 1px solid rgba(255, 230, 170, 0.16);
  border-radius: 999px;
  background: rgba(20, 14, 7, 0.4);
  color: rgba(255, 239, 208, 0.5);
  font-size: 7px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.intro-replay:hover {
  color: #ffefc6;
  border-color: rgba(255, 230, 170, 0.4);
  background: rgba(40, 28, 12, 0.56);
}

.intro-skip {
  position: absolute;
  top: 1px;
  right: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: rgba(255, 239, 208, 0.42);
  font-size: 7.5px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.intro-skip:hover {
  color: #ffefc6;
}

body.intro-finished .intro-skip {
  display: none;
}

body.pre-intro .growth-meter,
body.intro-playing .growth-meter {
  opacity: 0 !important;
}

@media (max-width: 720px) {
  .growth-meter {
    left: 18px;
    top: 74px;
  }
  .intro-player {
    width: 86vw;
    bottom: 26px;
  }
  .intro-chapters button span {
    display: none;
  }
}

/* atmosphere controls */

.scene-panel {
  position: fixed;
  right: 26px;
  bottom: 188px;
  z-index: 19;
  display: grid;
  gap: 9px;
  width: 196px;
  padding: 11px 13px 12px;
  border: 1px solid rgba(255, 231, 178, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(155deg, rgba(16, 22, 32, 0.86), rgba(7, 11, 18, 0.9));
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

body.explore-ready .scene-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scene-kicker {
  color: rgba(255, 238, 200, 0.38);
  font-size: 6.5px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

.scene-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-row > span:first-child {
  width: 30px;
  flex: none;
  color: rgba(255, 238, 200, 0.55);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.scene-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 2px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  outline: none;
  background: linear-gradient(90deg, rgba(255, 225, 160, 0.55), rgba(180, 230, 255, 0.22));
  cursor: pointer;
}

.scene-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 248, 224, 0.8);
  background: radial-gradient(circle at 36% 32%, #fffdf2, #ffd88f 60%, #b98939);
  box-shadow: 0 0 10px rgba(255, 211, 132, 0.7);
}

.scene-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 248, 224, 0.8);
  background: radial-gradient(circle at 36% 32%, #fffdf2, #ffd88f 60%, #b98939);
  box-shadow: 0 0 10px rgba(255, 211, 132, 0.7);
}

.scene-value {
  width: 30px;
  flex: none;
  color: rgba(255, 240, 208, 0.7);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: right;
}

.palette-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.palette-swatch {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 245, 220, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}

.palette-swatch:hover {
  transform: scale(1.12);
  border-color: rgba(255, 245, 220, 0.45);
}

.palette-swatch.is-active {
  border-color: rgba(255, 248, 224, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 232, 175, 0.55), 0 0 14px rgba(255, 210, 130, 0.55);
}

.swatch-champagne {
  background: radial-gradient(circle at 35% 30%, #fff7c7, #ffd84f 58%, #9a6d12);
}

.swatch-aurora {
  background: radial-gradient(circle at 35% 30%, #e9fff3, #7cf0bd 55%, #277a54);
}

.swatch-ice {
  background: radial-gradient(circle at 35% 30%, #f2fdff, #9fe6ff 55%, #3b7fa6);
}

.swatch-rose {
  background: radial-gradient(circle at 35% 30%, #fff0f2, #ffb3c1 55%, #a65068);
}

@media (max-width: 720px) {
  .scene-panel {
    right: 14px;
    bottom: 178px;
    width: 164px;
    padding: 9px 11px 10px;
  }
}

/* wish trigger */

.wish-trigger {
  position: fixed;
  right: 26px;
  bottom: 132px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 227, 165, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 214, 132, 0.16), transparent 60%),
    rgba(7, 16, 32, 0.8);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: rgba(255, 241, 210, 0.86);
  font-size: 9px;
  letter-spacing: 0.16em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.4s;
}

body.explore-ready .wish-trigger {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wish-trigger:hover {
  border-color: rgba(255, 227, 165, 0.36);
}

.wish-trigger-orb {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fff9e6, #ffd07e 52%, rgba(255, 173, 79, 0.5) 74%, transparent 80%);
  box-shadow: 0 0 12px rgba(255, 205, 120, 0.75), 0 0 24px rgba(255, 192, 96, 0.35);
  animation: wish-orb-pulse 2.8s ease-in-out infinite;
}

@keyframes wish-orb-pulse {
  0%, 100% { transform: scale(0.82); opacity: 0.72; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* wish overlay + card */

.wish-overlay {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 52% 50% at 50% 45%, rgba(28, 58, 104, 0.22), transparent 72%),
    rgba(0, 5, 14, 0.7);
  backdrop-filter: blur(16px) saturate(0.92);
  -webkit-backdrop-filter: blur(16px) saturate(0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.wish-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wish-card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 30px);
  overflow-y: auto;
  padding: 34px 34px 28px;
  border: 1px solid rgba(214, 234, 255, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 219, 148, 0.13), transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(84, 150, 230, 0.12), transparent 44%),
    linear-gradient(150deg, rgba(12, 28, 52, 0.93), rgba(3, 10, 22, 0.95));
  box-shadow:
    0 44px 120px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 90px rgba(255, 198, 108, 0.04);
  transform: translateY(18px) scale(0.976);
  transition: transform 0.7s var(--ease);
}

.wish-overlay.is-open .wish-card {
  transform: translateY(0) scale(1);
}

.wish-kicker {
  margin: 0 0 9px;
  color: rgba(247, 210, 139, 0.56);
  font-size: 6.5px;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
}

.wish-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #fff8e8;
  text-shadow: 0 0 34px rgba(255, 220, 145, 0.14);
}

.wish-copy {
  margin: 0 0 18px;
  color: rgba(228, 238, 252, 0.5);
  font-size: 9px;
  line-height: 1.72;
  letter-spacing: 0.04em;
}

.wish-label {
  display: block;
  margin: 0 0 8px;
  color: rgba(247, 210, 139, 0.6);
  font-size: 7px;
  letter-spacing: 0.28em;
}

.wish-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

#wishInput {
  min-width: 0;
  min-height: 86px;
  padding: 13px 15px;
  border: 1px solid rgba(214, 234, 255, 0.14);
  border-radius: 14px;
  outline: none;
  resize: none;
  background:
    linear-gradient(180deg, rgba(255, 249, 230, 0.04), rgba(255, 249, 230, 0.01)),
    rgba(2, 9, 20, 0.5);
  color: #fff8e8;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  caret-color: var(--gold);
  transition: border-color 0.35s, box-shadow 0.35s;
}

#wishInput::placeholder {
  color: rgba(251, 243, 223, 0.24);
}

#wishInput:focus {
  border-color: rgba(255, 219, 142, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 210, 122, 0.05), 0 0 34px rgba(255, 204, 112, 0.05);
}

.voice-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 92px;
  border: 1px solid rgba(214, 234, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 24, 44, 0.5);
  color: rgba(228, 240, 255, 0.62);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.voice-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-button:hover {
  color: #fff2cd;
  border-color: rgba(255, 226, 168, 0.3);
}

.voice-button[aria-pressed="true"] {
  color: #ffe6b6;
  border-color: rgba(255, 204, 120, 0.5);
  background: radial-gradient(circle at 50% 30%, rgba(255, 205, 120, 0.2), rgba(255, 170, 90, 0.04));
  animation: voice-listening 1.4s ease-in-out infinite;
}

@keyframes voice-listening {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 205, 120, 0.22); }
  50% { box-shadow: 0 0 0 6px rgba(255, 205, 120, 0); }
}

.wish-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

#wishCounter {
  color: rgba(228, 238, 252, 0.34);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.wish-submit {
  height: 42px;
  padding: 0 22px;
  border: 1px solid rgba(255, 228, 170, 0.32);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 228, 168, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(255, 224, 158, 0.16), rgba(255, 190, 110, 0.05));
  color: #fff3d3;
  font-size: 9px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.wish-submit:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 232, 182, 0.5);
  box-shadow: 0 0 30px rgba(255, 205, 120, 0.12);
}

/* vertical share card */

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 66;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 50% 46% at 50% 44%, rgba(255, 208, 132, 0.1), transparent 68%),
    radial-gradient(ellipse 56% 50% at 68% 72%, rgba(84, 150, 230, 0.1), transparent 72%),
    rgba(0, 5, 14, 0.78);
  backdrop-filter: blur(17px) saturate(0.9);
  -webkit-backdrop-filter: blur(17px) saturate(0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.share-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.share-card-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(430px, 100%);
  max-height: calc(100vh - 26px);
  overflow-y: auto;
  padding: 30px 28px 26px;
  border: 1px solid rgba(255, 232, 180, 0.19);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 219, 148, 0.14), transparent 38%),
    radial-gradient(circle at 86% 100%, rgba(96, 164, 238, 0.1), transparent 44%),
    linear-gradient(150deg, rgba(12, 26, 46, 0.95), rgba(2, 8, 18, 0.97));
  box-shadow:
    0 46px 130px rgba(0, 0, 0, 0.64),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 100px rgba(255, 198, 108, 0.05);
  transform: translateY(20px) scale(0.965);
  transition: transform 0.7s var(--ease);
}

.share-overlay.is-open .share-card-panel {
  transform: translateY(0) scale(1);
}

.share-card-panel h2 {
  margin: 0 0 8px;
  align-self: flex-start;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 29px);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #fff8e8;
  text-shadow: 0 0 34px rgba(255, 220, 145, 0.15);
}

.share-card-panel .wish-kicker,
.share-card-panel .wish-copy {
  align-self: flex-start;
}

.share-preview {
  position: relative;
  width: min(250px, 44vh);
  aspect-ratio: 9 / 16;
  margin: 14px auto 18px;
  padding: 1px;
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(255, 232, 180, 0.55), rgba(255, 232, 180, 0.08) 34%, rgba(140, 202, 255, 0.28));
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.52),
    0 0 46px rgba(255, 205, 126, 0.1);
}

.share-preview::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 245, 218, 0.16);
  border-radius: 9px;
  pointer-events: none;
}

.share-preview img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: #030913;
}

.share-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.share-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.share-regenerate {
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(214, 234, 255, 0.15);
  border-radius: 999px;
  background: rgba(10, 24, 44, 0.5);
  color: rgba(228, 240, 255, 0.62);
  font-size: 9px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.share-regenerate:hover {
  color: #fff2cd;
  border-color: rgba(255, 226, 168, 0.3);
  background: rgba(24, 45, 70, 0.6);
}

#shareButton:hover {
  color: #ffe9b9;
  border-color: rgba(255, 226, 168, 0.34);
}

@media (max-width: 660px) {
  .share-preview {
    width: min(190px, 40vh);
  }

  .share-card-panel {
    padding: 26px 20px 22px;
  }
}

.wish-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(214, 234, 255, 0.09);
  color: rgba(228, 238, 252, 0.4);
  font-size: 7.5px;
  letter-spacing: 0.2em;
}

.wish-history-button {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(247, 210, 139, 0.62);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.wish-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wish-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(214, 234, 255, 0.08);
  border-radius: 11px;
  background: rgba(8, 20, 38, 0.46);
  color: rgba(255, 247, 230, 0.78);
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.wish-history-item:hover {
  border-color: rgba(255, 226, 168, 0.24);
  background: rgba(12, 28, 50, 0.62);
}

.wish-history-item i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7e2, #ffcc7c 60%, rgba(255, 170, 80, 0.4));
  box-shadow: 0 0 8px rgba(255, 200, 110, 0.6);
}

.wish-history-item.is-old i {
  background: radial-gradient(circle at 35% 30%, #ffffff, #ffe9c8 60%, rgba(255, 220, 180, 0.4));
  box-shadow: 0 0 7px rgba(255, 230, 200, 0.5);
}

.wish-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed rgba(214, 234, 255, 0.1);
  border-radius: 11px;
  color: rgba(228, 238, 252, 0.34);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

/* wish detail */

.wish-detail {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 36;
  width: min(400px, calc(100vw - 40px));
  padding: 30px 30px 26px;
  border: 1px solid rgba(255, 230, 172, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 214, 140, 0.16), transparent 55%),
    linear-gradient(150deg, rgba(13, 29, 54, 0.94), rgba(3, 9, 20, 0.96));
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translate(-50%, -46%) scale(0.97);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}

.wish-detail.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.wish-detail-star {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 16px;
  text-shadow: 0 0 18px rgba(255, 210, 130, 0.7);
}

.wish-detail p {
  margin: 0 0 16px;
  color: #fff8e8;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

.wish-detail time {
  color: rgba(228, 238, 252, 0.36);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.wish-detail-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: rgba(228, 238, 252, 0.5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* theme pass on existing panels */

.greeting-overlay {
  background:
    radial-gradient(ellipse 50% 48% at 50% 45%, rgba(30, 60, 110, 0.24), transparent 72%),
    rgba(0, 5, 14, 0.7);
}

.greeting-card {
  border-color: rgba(214, 234, 255, 0.16);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 219, 143, 0.14), transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(84, 150, 230, 0.1), transparent 42%),
    linear-gradient(150deg, rgba(12, 28, 52, 0.92), rgba(3, 10, 22, 0.94));
}

#nameInput {
  border-color: rgba(214, 234, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 249, 230, 0.045), rgba(255, 249, 230, 0.012)),
    rgba(2, 9, 20, 0.42);
}

#nameInput:focus {
  background: rgba(8, 22, 42, 0.66);
}

.greeting-copy {
  color: rgba(228, 238, 252, 0.48);
}

.photo-overlay {
  background:
    radial-gradient(ellipse 54% 50% at 50% 45%, rgba(28, 58, 104, 0.22), transparent 72%),
    rgba(0, 5, 14, 0.7);
}

.photo-card {
  border-color: rgba(214, 234, 255, 0.16);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 219, 148, 0.11), transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(84, 150, 230, 0.1), transparent 44%),
    linear-gradient(150deg, rgba(12, 28, 52, 0.93), rgba(3, 10, 22, 0.95));
}

@media (max-width: 900px) {
  .pattern-dock {
    bottom: 118px;
  }

  .wish-trigger {
    right: 18px;
    bottom: 108px;
  }
}

@media (max-width: 660px) {
  .pattern-dock {
    bottom: 98px;
  }
}

@media (max-width: 560px) {
  .pattern-dock {
    bottom: 236px;
  }

  .wish-trigger {
    right: 14px;
    bottom: 96px;
    height: 34px;
    padding: 0 12px 0 10px;
  }

  .wish-card {
    padding: 28px 20px 24px;
  }
}

@media (max-height: 700px) {
  .wish-trigger {
    bottom: 120px;
  }
}

/* ---- 2026-12-06 · desktop / mobile fit pass ---- */

/* Once the intro is over only the replay button remains; collapse the
   invisible chapter row so it cannot overlap the bottom controls. */
body.intro-finished .intro-chapters,
body.intro-finished .intro-progress {
  display: none;
}

body.intro-finished .intro-player {
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 560px) {
  /* Move the atmosphere panel into the empty top-right corner and give the
     three bottom controls their own rows. */
  .scene-panel {
    top: calc(84px + env(safe-area-inset-top, 0px));
    right: 12px;
    bottom: auto;
    width: min(156px, calc(100vw - 24px));
    padding: 8px 10px 9px;
  }

  .scene-panel .scene-row > span:first-child {
    width: 26px;
  }

  .scene-panel .scene-value {
    width: 27px;
  }

  .formation-dock {
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  .pattern-dock {
    bottom: calc(114px + env(safe-area-inset-bottom, 0px));
  }

  .wish-trigger {
    right: 14px;
    bottom: calc(170px + env(safe-area-inset-bottom, 0px));
  }

  .intro-player {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }
}

@media (max-width: 360px) {
  /* The fullscreen glyph is the least useful control on a phone and is the
     one that pushes the header past the 320px viewport. */
  #fullscreenButton {
    display: none;
  }

  /* Keep the atmosphere panel out of the crown's way on 320px phones. */
  .scene-panel {
    top: calc(78px + env(safe-area-inset-top, 0px));
    right: 8px;
    width: 124px;
    padding: 7px 8px 8px;
  }

  .scene-panel .palette-row {
    gap: 6px;
  }

  .scene-panel .palette-swatch {
    width: 16px;
    height: 16px;
  }

  .topbar {
    gap: 6px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 10px 0;
  }

  .actions {
    gap: 3px;
  }

  .icon-button {
    width: 30px;
    height: 30px;
  }

  .masthead h1 {
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .masthead-rule {
    width: 10px;
  }
}

/* ── Trial access + Afdian unlock ───────────────────────────────────── */

.access-chip {
  position: fixed;
  top: 82px;
  right: 38px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(247, 210, 139, 0.15);
  border-radius: 999px;
  background: rgba(8, 15, 21, 0.54);
  color: rgba(251, 243, 223, 0.46);
  font-size: 7px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.5s, border-color 0.5s, background 0.5s, opacity 0.5s;
}

.access-chip-star {
  color: var(--gold);
  font-size: 8px;
  line-height: 1;
  text-indent: 0;
  text-shadow: 0 0 9px rgba(255, 208, 120, 0.7);
}

.access-chip.is-low {
  color: rgba(255, 224, 162, 0.84);
  border-color: rgba(247, 210, 139, 0.32);
  background: rgba(38, 25, 11, 0.58);
  animation: access-low-pulse 2.4s ease-in-out infinite;
}

.access-chip.is-unlocked {
  color: rgba(255, 231, 177, 0.9);
  border-color: rgba(247, 210, 139, 0.3);
  background: rgba(34, 25, 11, 0.52);
}

.access-chip.is-preview {
  color: rgba(218, 229, 242, 0.45);
  border-color: rgba(214, 234, 255, 0.12);
}

@keyframes access-low-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 201, 106, 0); }
  50% { box-shadow: 0 0 22px rgba(255, 201, 106, 0.12); }
}

.paywall {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 54% 46% at 50% 44%, rgba(44, 65, 87, 0.24), transparent 72%),
    radial-gradient(ellipse 34% 32% at 50% 78%, rgba(172, 109, 36, 0.1), transparent 72%),
    rgba(1, 5, 11, 0.78);
  backdrop-filter: blur(12px) saturate(0.72);
  -webkit-backdrop-filter: blur(12px) saturate(0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}

.paywall.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.paywall-card {
  position: relative;
  width: min(520px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 44px 44px 34px;
  border: 1px solid rgba(255, 232, 180, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 220, 146, 0.12), transparent 34%),
    radial-gradient(circle at 86% 100%, rgba(84, 144, 214, 0.09), transparent 38%),
    linear-gradient(152deg, rgba(14, 25, 39, 0.97), rgba(3, 9, 18, 0.985));
  box-shadow:
    0 50px 160px rgba(0, 0, 0, 0.76),
    0 0 90px rgba(255, 201, 116, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
  transform: translateY(16px) scale(0.975);
  transition: transform 0.65s var(--ease);
}

.paywall.is-open .paywall-card {
  transform: translateY(0) scale(1);
}

.paywall-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 239, 205, 0.055);
  border-radius: 20px;
  pointer-events: none;
}

.paywall-orbit {
  position: absolute;
  border: 1px solid rgba(247, 210, 139, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.paywall-orbit::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe3a6;
  box-shadow: 0 0 14px #ffd27a;
}

.paywall-orbit-a {
  top: -86px;
  right: -72px;
  width: 210px;
  height: 210px;
  animation: paywall-orbit 18s linear infinite;
}

.paywall-orbit-a::after {
  left: 22px;
  bottom: 43px;
}

.paywall-orbit-b {
  left: -92px;
  bottom: -94px;
  width: 228px;
  height: 228px;
  animation: paywall-orbit 24s linear reverse infinite;
}

.paywall-orbit-b::after {
  top: 39px;
  right: 28px;
}

@keyframes paywall-orbit {
  to { transform: rotate(360deg); }
}

.paywall-kicker {
  margin: 0 0 14px;
  color: rgba(247, 210, 139, 0.56);
  font-size: 7px;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
}

.paywall-card h2 {
  margin: 0;
  color: #fff6df;
  font-family: var(--serif);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 0 38px rgba(255, 221, 151, 0.12);
}

.paywall-copy {
  max-width: 410px;
  margin: 18px 0 0;
  color: rgba(230, 238, 247, 0.56);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.02em;
}

.paywall-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;
}

.paywall-price {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  text-shadow: 0 0 26px rgba(255, 211, 128, 0.2);
}

.paywall-duration {
  color: rgba(247, 210, 139, 0.44);
  font-size: 7px;
  letter-spacing: 0.22em;
}

.paywall-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
  padding: 0 19px;
  border: 1px solid rgba(255, 228, 168, 0.38);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 238, 196, 0.16), rgba(255, 221, 155, 0.055)),
    rgba(28, 23, 15, 0.48);
  color: #fff1ce;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-decoration: none;
  box-shadow: 0 0 38px rgba(255, 205, 115, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s, box-shadow 0.35s;
}

.paywall-primary:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 238, 198, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 238, 196, 0.21), rgba(255, 221, 155, 0.08)),
    rgba(34, 27, 17, 0.58);
  box-shadow: 0 0 46px rgba(255, 205, 115, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.paywall-primary.is-disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.paywall-primary svg,
.paywall-input-row button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paywall-store-note {
  margin: 10px 0 0;
  color: rgba(223, 234, 247, 0.3);
  font-size: 7px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.paywall-store-note.is-warning {
  color: rgba(255, 194, 142, 0.58);
}

.paywall-linktools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
  color: rgba(247, 210, 139, 0.28);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.paywall-linktools[hidden] {
  display: none;
}

.paywall-linktools button,
.paywall-linktools a {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 226, 162, 0.62);
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s;
}

.paywall-linktools button:hover,
.paywall-linktools a:hover {
  color: rgba(255, 241, 206, 0.96);
}

.paywall-linktools button.is-copied {
  color: var(--gold-bright);
}

.paywall-browser-help {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 215, 150, 0.12);
  border-radius: 12px;
  background: rgba(255, 223, 168, 0.035);
}

.paywall-browser-help[hidden] {
  display: none;
}

.paywall-browser-help p {
  margin: 0;
  color: rgba(223, 234, 247, 0.42);
  font-size: 7px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.paywall-browser-help p strong {
  color: rgba(255, 230, 176, 0.74);
  font-weight: 500;
}

.paywall-browser-help p b {
  color: rgba(255, 240, 204, 0.66);
  font-weight: 500;
}

.paywall-browser-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
  color: rgba(247, 210, 139, 0.24);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paywall-browser-actions button,
.paywall-browser-actions a {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 226, 162, 0.58);
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  cursor: pointer;
}

.paywall-browser-actions button:hover,
.paywall-browser-actions a:hover {
  color: rgba(255, 241, 206, 0.95);
}

.paywall-raw-link {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 221, 160, 0.08);
  color: rgba(255, 231, 184, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

.paywall-raw-link[hidden] {
  display: none;
}

.wechat-sheet {
  position: fixed;
  inset: 0;
  z-index: 620;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(1, 5, 11, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.26s var(--ease);
}

.wechat-sheet[hidden] {
  display: none;
}

.wechat-sheet.is-open {
  opacity: 1;
}

.wechat-sheet-card {
  position: relative;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 34px 32px 28px;
  border: 1px solid rgba(255, 226, 168, 0.24);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 218, 139, 0.14), transparent 38%),
    linear-gradient(152deg, rgba(16, 29, 44, 0.99), rgba(3, 9, 18, 0.995));
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.32s var(--ease);
}

.wechat-sheet.is-open .wechat-sheet-card {
  transform: translateY(0) scale(1);
}

.wechat-sheet-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 232, 188, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 242, 214, 0.62);
  font: 300 20px/1 var(--sans);
  cursor: pointer;
}

.wechat-sheet-kicker {
  margin: 0 0 10px;
  color: rgba(247, 210, 139, 0.58);
  font-size: 7px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
}

.wechat-sheet-card h3 {
  max-width: 390px;
  margin: 0;
  color: #fff5dd;
  font-family: var(--serif);
  font-size: clamp(28px, 6vw, 39px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.wechat-sheet-copy {
  margin: 13px 0 20px;
  color: rgba(226, 237, 248, 0.5);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.015em;
}

.wechat-route {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 228, 175, 0.09);
}

.wechat-route[hidden] {
  display: none;
}

.wechat-route-index {
  color: rgba(247, 210, 139, 0.46);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.35;
}

.wechat-route strong {
  display: block;
  color: rgba(255, 241, 211, 0.9);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wechat-route p {
  margin: 5px 0 9px;
  color: rgba(224, 235, 247, 0.44);
  font-size: 9px;
  line-height: 1.65;
}

.wechat-route p b {
  color: rgba(255, 231, 177, 0.78);
  font-weight: 500;
}

.wechat-route-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 225, 164, 0.24);
  border-radius: 999px;
  background: rgba(255, 220, 144, 0.055);
  color: rgba(255, 238, 198, 0.86);
  font: 8px/1 var(--sans);
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.wechat-route-action:hover {
  border-color: rgba(255, 238, 198, 0.52);
  background: rgba(255, 220, 144, 0.1);
  color: #fff4d8;
}

.wechat-raw-link {
  display: block;
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 222, 157, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 232, 184, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  line-height: 1.5;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

.wechat-raw-link[hidden] {
  display: none;
}

.wechat-sheet-back {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid rgba(255, 226, 168, 0.32);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 238, 196, 0.14), rgba(255, 221, 155, 0.045));
  color: #fff0ca;
  font: 8px/1 var(--sans);
  letter-spacing: 0.2em;
  cursor: pointer;
}

.paywall-claim[hidden],
.paywall-claim-result[hidden] {
  display: none;
}

.paywall-hint {
  margin: 8px 2px 0;
  color: rgba(223, 234, 247, 0.3);
  font-size: 7px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.paywall-claim-result {
  margin-top: 15px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 226, 162, 0.2);
  border-radius: 13px;
  background: rgba(255, 212, 124, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.paywall-claim-result-label {
  margin: 0 0 8px;
  color: rgba(255, 226, 162, 0.54);
  font-size: 6px;
  letter-spacing: 0.24em;
}

.paywall-claim-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.paywall-claim-code-row code {
  color: #fff0c8;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.14em;
  text-shadow: 0 0 18px rgba(255, 216, 138, 0.5);
}

.paywall-claim-code-row button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 226, 162, 0.24);
  border-radius: 9px;
  background: rgba(255, 226, 162, 0.06);
  color: rgba(255, 240, 200, 0.82);
  font-size: 7px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.paywall-claim-code-row button:hover {
  border-color: rgba(255, 226, 162, 0.5);
  background: rgba(255, 226, 162, 0.11);
}

.paywall-claim-done {
  width: 100%;
  height: 38px;
  margin-top: 13px;
  border: 1px solid rgba(255, 226, 162, 0.3);
  border-radius: 10px;
  background: rgba(255, 221, 150, 0.09);
  color: #fff0c8;
  font-size: 8px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.paywall-claim-done:hover {
  border-color: rgba(255, 238, 198, 0.56);
  background: rgba(255, 226, 162, 0.15);
}

.paywall-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 25px 0 17px;
  color: rgba(223, 234, 247, 0.28);
  font-size: 6px;
  letter-spacing: 0.26em;
  white-space: nowrap;
}

.paywall-divider::before,
.paywall-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 234, 255, 0.11));
}

.paywall-divider::after {
  transform: scaleX(-1);
}

.paywall-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(223, 234, 247, 0.34);
  font-size: 6px;
  letter-spacing: 0.25em;
}

.paywall-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.paywall-input-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(214, 234, 255, 0.13);
  border-radius: 13px;
  outline: none;
  background: rgba(2, 9, 20, 0.55);
  color: #fff4d9;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.1em;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.paywall-input-row input::placeholder {
  color: rgba(223, 234, 247, 0.2);
  letter-spacing: 0.12em;
}

.paywall-input-row input:focus {
  border-color: rgba(247, 210, 139, 0.42);
  background: rgba(8, 22, 42, 0.65);
  box-shadow: 0 0 0 3px rgba(247, 210, 139, 0.05);
}

.paywall-input-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(214, 234, 255, 0.15);
  border-radius: 13px;
  background: rgba(14, 28, 48, 0.66);
  color: rgba(251, 243, 223, 0.78);
  font-size: 8px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.paywall-input-row button:hover {
  border-color: rgba(247, 210, 139, 0.34);
  background: rgba(29, 40, 54, 0.78);
  color: #fff4d9;
}

.paywall-input-row button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.paywall-status {
  min-height: 17px;
  margin: 9px 2px 0;
  color: rgba(255, 195, 143, 0.72);
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.paywall-status.is-success {
  color: rgba(255, 226, 162, 0.86);
}

.paywall-privacy {
  margin: 23px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(214, 234, 255, 0.065);
  color: rgba(223, 234, 247, 0.24);
  font-size: 7px;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

body.access-locked #stage,
body.access-locked .topbar,
body.access-locked .mode-pill,
body.access-locked .access-chip,
body.access-locked .growth-meter,
body.access-locked .formation-dock,
body.access-locked .gesture-dock,
body.access-locked .mouse-hints,
body.access-locked .scene-panel,
body.access-locked .wish-trigger,
body.access-locked .invite,
body.access-locked .camera-card {
  pointer-events: none !important;
}

@media (max-width: 900px) {
  .access-chip {
    top: 84px;
    right: 18px;
  }
}

@media (max-width: 560px) {
  .access-chip {
    top: calc(76px + env(safe-area-inset-top, 0px));
    right: 12px;
    min-height: 24px;
    padding: 0 8px;
    font-size: 6px;
  }

  .paywall {
    padding: 12px;
  }

  .paywall-card {
    width: min(100%, 430px);
    max-height: calc(100dvh - 24px);
    padding: 31px 23px 24px;
    border-radius: 23px;
  }

  .paywall-card h2 {
    font-size: clamp(29px, 10vw, 40px);
  }

  .paywall-copy {
    font-size: 10px;
  }

  .paywall-price {
    font-size: 31px;
  }

  .paywall-primary {
    min-height: 46px;
  }

  .paywall-store-note,
  .paywall-linktools,
  .paywall-browser-help p,
  .paywall-browser-actions,
  .paywall-raw-link {
    font-size: 8.5px;
    letter-spacing: 0.04em;
  }

  .paywall-input-row {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .paywall-input-row input {
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }

  .paywall-input-row button {
    height: 44px;
    padding: 0 12px;
  }
}

@media (max-height: 640px) {
  .paywall-card {
    padding-top: 27px;
    padding-bottom: 21px;
  }

  .paywall-card h2 {
    font-size: 30px;
  }

  .paywall-copy {
    margin-top: 13px;
    line-height: 1.55;
  }

  .paywall-price-row {
    margin-top: 16px;
  }

  .paywall-primary {
    margin-top: 15px;
  }

  .paywall-divider {
    margin: 18px 0 13px;
  }

  .paywall-privacy {
    margin-top: 16px;
    padding-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .paywall-orbit,
  .access-chip.is-low {
    animation: none;
  }
}

/* ── 2026-12-06 · phone parity pass ─────────────────────────────────── */

/* Touch gets its own quiet legend. It fades away after the first gesture so
   the phone view stays as clean as the desktop one. */
.touch-hints {
  display: none;
}

@media (pointer: coarse) {
  .touch-hints {
    position: fixed;
    left: 50%;
    bottom: calc(214px + env(safe-area-inset-bottom, 0px));
    z-index: 17;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 28px);
    padding: 7px 12px;
    border: 1px solid rgba(255, 242, 208, 0.1);
    border-radius: 999px;
    background: rgba(10, 14, 20, 0.55);
    color: rgba(251, 243, 223, 0.46);
    font-size: 7px;
    letter-spacing: 0.12em;
    white-space: nowrap;
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s var(--ease);
  }

  body.explore-ready .touch-hints {
    opacity: 1;
  }

  body.touch-used .touch-hints {
    opacity: 0;
  }

  .touch-hints b {
    color: rgba(255, 240, 204, 0.78);
    font-weight: 500;
  }

  .touch-hints .hint-separator {
    width: 1px;
    height: 9px;
    background: rgba(255, 245, 218, 0.12);
  }
}

@media (max-width: 660px) {
  /* Dialogs should measure the actually visible phone viewport, not the
     larger layout viewport Safari reports while the URL bar is showing. */
  .photo-card,
  .wish-card,
  .share-card-panel,
  .greeting-card,
  .paywall-card {
    max-height: calc(100dvh - 24px);
  }

  .touch-hints {
    gap: 5px;
    padding: 6px 10px;
    font-size: 6px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 560px) {
  /* One column of small status chips on the left, atmosphere on the right.
     The bottom is reserved for the three control rows. */
  .growth-meter {
    top: calc(58px + env(safe-area-inset-top, 0px));
    left: 12px;
    padding: 5px 9px 5px 8px;
    font-size: 6.5px;
  }

  .access-chip {
    top: calc(90px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: auto;
    min-height: 22px;
    padding: 0 8px;
  }

  .scene-panel {
    top: calc(88px + env(safe-area-inset-top, 0px));
    right: 10px;
    width: min(150px, calc(100vw - 160px));
  }

  /* The hand preview used to sit under the bottom docks and collide with
     them. On phones it lives under the status chips, above the tree crown. */
  .camera-card {
    top: calc(126px + env(safe-area-inset-top, 0px));
    left: 12px;
    bottom: auto;
    width: 136px;
    padding: 6px;
    border-radius: 14px;
    transform-origin: left top;
  }

  body.camera-on .camera-card {
    transform: translateY(0) scale(1);
  }

  .camera-info {
    padding: 6px 3px 1px;
  }

  .camera-copy strong {
    font-size: 7.5px;
  }

  .camera-copy span,
  .camera-card .signal {
    display: none;
  }

  .formation-dock {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    gap: 2px;
    padding: 5px 6px;
  }

  .formation-button {
    width: 31px;
    height: 34px;
    border-radius: 10px;
  }

  .formation-button svg {
    width: 15px;
    height: 15px;
  }

  .formation-divider,
  .mode-divider {
    height: 20px;
    margin: 0 2px;
  }

  .pattern-dock {
    bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  }

  .wish-trigger {
    bottom: calc(164px + env(safe-area-inset-bottom, 0px));
  }

  .touch-hints {
    bottom: calc(206px + env(safe-area-inset-bottom, 0px));
  }

  .intro-player {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 26px);
  }

  .intro-chapters {
    gap: 3px;
  }

  .intro-chapters button {
    padding: 4px 5px;
  }
}

@media (max-width: 560px) and (max-height: 620px) {
  /* Landscape phones: keep the preview from swallowing the tree. */
  .scene-panel {
    top: calc(78px + env(safe-area-inset-top, 0px));
  }

  .camera-card {
    top: calc(112px + env(safe-area-inset-top, 0px));
    width: 118px;
  }

  .touch-hints {
    display: none;
  }
}
