:root {
  --bg: #08131d;
  --glass: rgba(13, 25, 36, 0.74);
  --glass-strong: rgba(14, 24, 34, 0.92);
  --border: rgba(236, 198, 126, 0.34);
  --border-bright: rgba(247, 217, 152, 0.68);
  --gold: #f0c97a;
  --gold-deep: #c9943e;
  --cream: #fcf3df;
  --muted: #b6c5d0;
  --wine: #7d2232;
  --wine-dark: #4f1621;
  --shadow: 0 18px 46px rgba(3, 8, 15, 0.52);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--cream);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

#world-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#world-canvas:active { cursor: grabbing; }

/* Loading */
.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, rgba(16, 33, 48, 0.92), rgba(7, 15, 24, 0.98));
  transition: opacity 380ms ease;
}
.loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 34px;
  border-radius: 16px;
  background: rgba(16, 30, 42, 0.85);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.loading-star {
  font-size: 32px;
  color: var(--gold);
  animation: pulse-star 1.5s ease-in-out infinite;
}
@keyframes pulse-star {
  0%, 100% { transform: scale(0.92) rotate(0deg); opacity: 0.72; }
  50% { transform: scale(1.16) rotate(18deg); opacity: 1; }
}
.loading-card p { margin: 0; font-size: 14px; color: var(--cream); letter-spacing: 0.02em; }

/* Glass primitives */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(3, 9, 16, 0.42), inset 0 1px 0 rgba(255, 244, 214, 0.12);
}

.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--cream);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, transform 110ms ease;
}
.glass-btn:hover { background: rgba(34, 54, 70, 0.85); border-color: var(--border-bright); }
.glass-btn:active { transform: scale(0.96); }
.glass-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.glass-btn.icon-only { width: 38px; padding: 0; font-size: 12px; font-weight: 700; }
.glass-btn[aria-pressed="true"] {
  background: rgba(240, 201, 122, 0.22);
  border-color: var(--gold);
  color: #ffe8b0;
}
.glass-btn .icon-on { display: none; }
.glass-btn[aria-pressed="true"] .icon-on { display: block; }
.glass-btn[aria-pressed="true"] .icon-off { display: none; }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #241507;
  font-size: 11px;
  font-weight: 750;
}

/* Top HUD */
.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 8px calc(16px + env(safe-area-inset-left));
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-text h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}
.brand-text p {
  margin: 1px 0 0;
  font-size: 11px;
  color: rgba(240, 217, 168, 0.82);
  white-space: nowrap;
}

/* Progress Pill */
.progress-pill {
  border-radius: 14px;
  padding: 8px 16px 9px;
  min-width: 248px;
}
.progress-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
}
.progress-row .spark { color: var(--gold); }
.progress-row strong {
  font-variant-numeric: tabular-nums;
  color: #fff6de;
  letter-spacing: 0.01em;
}
.progress-sub {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.progress-track {
  margin-top: 6px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d89b42, #ffe298, #f2b955);
  box-shadow: 0 0 12px rgba(255, 216, 128, 0.65);
  transition: width 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Top Right Actions */
.hud-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.jump-form {
  display: flex;
  align-items: center;
  height: 38px;
  border-radius: 10px;
  padding: 0 4px 0 10px;
  gap: 4px;
}
.jump-form .hash { color: var(--gold); font-weight: 700; font-size: 13px; }
.jump-form input {
  width: 96px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 12px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.jump-form input::placeholder { color: rgba(210, 224, 234, 0.56); }
.jump-form input::-webkit-inner-spin-button,
.jump-form input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.jump-form button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: rgba(240, 201, 122, 0.22);
  color: #ffe8b0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.jump-form button:hover { background: rgba(240, 201, 122, 0.36); }

/* Right Elevation Slider */
.elevation-rail {
  position: absolute;
  right: calc(14px + env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 7px;
  border-radius: 999px;
}
.rail-icon { font-size: 13px; color: var(--gold); line-height: 1; user-select: none; }
#height-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 24px;
  height: 156px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Live Ticker */
.live-ticker {
  position: absolute;
  left: calc(16px + env(safe-area-inset-left));
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 88px));
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--cream);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}
.live-ticker:hover { border-color: var(--border-bright); transform: translateY(-1px); }
.ticker-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 8px #6ee7b7;
}
#ticker-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inspect Popover Card */
.inspect-card {
  position: absolute;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 15;
  width: min(410px, calc(100vw - 28px));
  border-radius: 16px;
  padding: 14px 16px;
  animation: card-rise 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes card-rise {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.inspect-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.inspect-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 245, 220, 0.08);
  border: 1px solid rgba(240, 201, 122, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.inspect-icon svg { width: 32px; height: 32px; }
.inspect-meta { flex: 1; min-width: 0; }
.inspect-slot-row { display: flex; align-items: center; gap: 7px; }
.slot-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(240, 201, 122, 0.2);
  border: 1px solid rgba(240, 201, 122, 0.5);
  color: #ffe7ac;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.orn-type { font-size: 12px; color: var(--muted); }
.inspect-author {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.inspect-time { margin-left: auto; font-size: 11px; color: var(--muted); }
.inspect-wish {
  margin: 10px 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 248, 232, 0.07);
  border-left: 3px solid var(--gold);
  font-size: 13.5px;
  line-height: 1.5;
  color: #fff6e2;
}
.inspect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pill-action {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 35px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pill-action:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--border-bright); }
.pill-action.is-liked {
  background: rgba(196, 46, 68, 0.34);
  border-color: #f38ba0;
  color: #ffd9e1;
}
.pill-action .heart { color: #ff7c93; font-size: 14px; }
.pill-action.accent {
  background: rgba(240, 201, 122, 0.18);
  border-color: rgba(240, 201, 122, 0.55);
  color: #ffe8b2;
}

.close-x {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.close-x:hover { background: rgba(255, 255, 255, 0.1); color: var(--cream); }

/* Bottom HUD Dock */
.hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}
.hud-bottom > * { pointer-events: auto; }

.hint-banner {
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(7, 15, 24, 0.55);
  color: rgba(235, 227, 208, 0.88);
  font-size: 12px;
  text-align: center;
  max-width: min(680px, 94vw);
}

.action-dock {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border-radius: 15px;
  max-width: 100%;
  overflow-x: auto;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid #ffe4a1;
  background: linear-gradient(180deg, #f3ce7e, #cf963d);
  color: #241304;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(230, 174, 78, 0.38);
  transition: transform 120ms ease, filter 150ms ease;
}
.primary-cta:hover:not(:disabled) { filter: brightness(1.06); }
.primary-cta:active:not(:disabled) { transform: scale(0.97); }
.primary-cta:disabled { opacity: 0.55; cursor: not-allowed; }
.primary-cta.small { height: 36px; padding: 0 15px; font-size: 13px; }

.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid var(--border-bright);
  background: rgba(240, 201, 122, 0.16);
  color: #ffe8b0;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
}
.secondary-cta:hover { background: rgba(240, 201, 122, 0.28); }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ghost-btn:hover { color: var(--cream); background: rgba(255, 255, 255, 0.08); }

.dock-divider {
  width: 1px;
  height: 24px;
  background: rgba(240, 201, 122, 0.25);
  margin: 0 2px;
  flex-shrink: 0;
}
.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cream);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.dock-btn:hover { background: rgba(255, 255, 255, 0.1); }
.dock-btn[aria-pressed="true"] {
  background: rgba(240, 201, 122, 0.2);
  color: #ffe8b2;
}

/* Toast */
.toast {
  position: absolute;
  top: calc(74px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(20, 38, 52, 0.94);
  border: 1px solid var(--gold);
  color: #fff6df;
  font-size: 13px;
  font-weight: 550;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* Dialog Modals */
.modal-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(88dvh, 760px);
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border-bright);
  background: var(--glass-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--cream);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.68);
  overflow-y: auto;
}
.modal-dialog::backdrop {
  background: rgba(4, 10, 18, 0.65);
  backdrop-filter: blur(4px);
}
.modal-dialog.compact { width: min(440px, calc(100vw - 24px)); }
.modal-dialog.card-modal { width: min(640px, calc(100vw - 24px)); }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-head h2 { margin: 0; font-size: 18px; color: #fff5dc; }
.modal-slot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.link-btn:hover { background: rgba(240, 201, 122, 0.14); }

.hang-form { display: flex; flex-direction: column; gap: 15px; }
.form-section { display: flex; flex-direction: column; gap: 7px; }
.section-label { font-size: 13px; font-weight: 650; color: #f6dcb0; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.char-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.ornament-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.orn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 7px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 110ms ease;
}
.orn-card:hover { background: rgba(255, 255, 255, 0.1); }
.orn-card[aria-checked="true"] {
  border-color: var(--gold);
  background: rgba(240, 201, 122, 0.18);
  box-shadow: 0 0 0 1px rgba(240, 201, 122, 0.45);
}
.orn-card svg { width: 32px; height: 32px; }
.orn-card span { font-size: 11px; text-align: center; line-height: 1.2; }

#nickname-input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(7, 15, 24, 0.72);
  color: var(--cream);
  font: inherit;
  font-size: 14px;
  outline: none;
}
#nickname-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240, 201, 122, 0.22); }

.wish-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 4px;
}
.wish-option {
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.wish-option:hover { background: rgba(255, 255, 255, 0.09); }
.wish-option[aria-checked="true"] {
  border-color: var(--gold);
  background: rgba(240, 201, 122, 0.18);
  color: #fff8e6;
}

.form-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(185, 38, 56, 0.25);
  border: 1px solid rgba(244, 114, 130, 0.55);
  color: #ffd5dc;
  font-size: 12.5px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* Celebrate Modal */
.celebrate-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 4px;
}
.celebrate-medal {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 201, 122, 0.28), rgba(240, 201, 122, 0.06));
  border: 1.5px solid var(--gold);
  display: grid;
  place-items: center;
}
.celebrate-medal svg { width: 44px; height: 44px; }
.celebrate-body h2 { margin: 4px 0 0; font-size: 20px; color: #fff5da; }
.celebrate-sub { margin: 0; font-size: 14px; color: var(--gold); font-weight: 600; }
.celebrate-quote {
  margin: 2px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 13.5px;
  line-height: 1.5;
  width: 100%;
}
.celebrate-quota { margin: 0; font-size: 12px; color: var(--muted); }
.celebrate-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

/* Holiday Card Modal */
.card-preview-box {
  display: grid;
  place-items: center;
  background: rgba(4, 10, 16, 0.6);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#card-canvas {
  max-width: 100%;
  max-height: 52dvh;
  border-radius: 8px;
}
.card-controls {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.segmented-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
}
.segmented-group button {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.segmented-group button[aria-pressed="true"] {
  background: var(--gold);
  color: #241304;
}
#card-greeting-input {
  flex: 1 1 180px;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(7, 15, 24, 0.72);
  color: var(--cream);
  font: inherit;
  font-size: 13px;
}

/* My Ornaments list */
.my-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.my-empty {
  margin: 14px 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.my-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
  cursor: pointer;
  text-align: left;
}
.my-row:hover { border-color: var(--border-bright); background: rgba(240, 201, 122, 0.12); }
.my-row svg { width: 32px; height: 32px; flex-shrink: 0; }
.my-row-info { flex: 1; min-width: 0; }
.my-row-title { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.my-row-wish { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.my-row-likes { font-size: 12px; color: #ff8ea2; font-weight: 650; flex-shrink: 0; }

/* Responsive mobile polish */
@media (max-width: 980px) {
  .hud-top {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .progress-pill {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
    padding: 7px 12px;
  }
  .brand-text p { display: none; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .back-link span { display: none; }
  .back-link { width: 36px; padding: 0; }
  .brand-text h1 { font-size: 14.5px; }
  .jump-form input { width: 70px; font-size: 11.5px; }
  .glass-btn { height: 34px; padding: 0 9px; font-size: 12px; }
  .glass-btn.icon-only { width: 34px; }
  .jump-form { height: 34px; }
  .elevation-rail { right: 8px; padding: 8px 5px; }
  #height-slider { height: 124px; }
  .live-ticker { bottom: calc(92px + env(safe-area-inset-bottom)); left: 10px; max-width: calc(100vw - 64px); }
  .hint-banner { display: none; }
  .primary-cta { height: 40px; padding: 0 15px; font-size: 13px; }
  .dock-btn { height: 36px; padding: 0 9px; font-size: 12px; }
  .ornament-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .orn-card svg { width: 28px; height: 28px; }
}

/* Embedded iframe compact mode (maximizes 3D canvas area inside christmastree.fun stage frame!) */
html.is-embedded .hud-top {
  padding-top: 8px;
  gap: 8px;
}
html.is-embedded .brand-text p,
html.is-embedded .hint-banner { display: none; }
html.is-embedded .brand-text h1 { font-size: 14.5px; }
html.is-embedded .progress-pill { padding: 6px 12px 7px; min-width: 210px; }
html.is-embedded .glass-btn { height: 34px; padding: 0 10px; font-size: 12px; }
html.is-embedded .glass-btn.icon-only { width: 34px; padding: 0; }
html.is-embedded .jump-form { height: 34px; }
html.is-embedded .hud-bottom { bottom: 10px; }
html.is-embedded .live-ticker { bottom: 72px; }
html.is-embedded .inspect-card { bottom: 76px; }

.copy-desc { margin: 0 0 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.copy-url-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: rgba(7, 15, 24, 0.8);
  color: #fff6de;
  font: inherit;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .loading-star, .inspect-card { animation: none; }
}
