/* ==========================================================================
   Who's Your Angel? — Cozy Illustrated Christmas Design System
   Warm Ivory, Soft Mint/Sage, Cranberry-Coral CTAs & Honey-Gold Accents
   ========================================================================== */

:root {
  /* Cozy Warm Surfaces */
  --bg-ivory: #faf6ee;
  --bg-ivory-warm: #f3ede0;
  --bg-card: #ffffff;
  --bg-mint: #ebf5ef;
  --bg-mint-strong: #d9ece1;
  --bg-honey-soft: #fdf6e6;
  --bg-danger-soft: #fdf0f1;
  --bg-success-soft: #e7f6ed;

  /* High-Contrast Readable Ink */
  --text-main: #1d3128;
  --text-secondary: #465f54;
  --text-muted: #5d766b;

  /* Festive Accents */
  --cranberry: #d63846;
  --cranberry-hover: #be2b38;
  --cranberry-soft: #fcebed;
  --sage-accent: #2c6b50;
  --sage-deep: #184331;
  --honey-gold: #d4921c;
  --honey-gold-bright: #ecc05b;
  --honey-ink: #5f3d05;

  /* Borders & Soft Elevation */
  --border-card: #dce7e0;
  --border-sage: #c6dcd0;
  --border-honey: #ebd094;
  --border-input: #bfd2c7;
  --shadow-card: 0 10px 28px -10px rgba(24, 54, 40, 0.09), 0 2px 6px rgba(24, 54, 40, 0.04);
  --shadow-modal: 0 24px 60px -12px rgba(18, 40, 30, 0.32);

  /* Friendly Rounded Typography */
  --font-sans: 'Nunito', 'Quicksand', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Generous Rounded Radii */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-ivory);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 65% 26% at 50% 0%, rgba(236, 192, 91, 0.24) 0%, transparent 72%),
    radial-gradient(circle at 10% 14%, rgba(214, 56, 70, 0.07) 0%, transparent 36%),
    radial-gradient(circle at 90% 16%, rgba(198, 226, 210, 0.65) 0%, transparent 42%),
    radial-gradient(circle at 22% 78%, rgba(236, 192, 91, 0.12) 0%, transparent 40%),
    radial-gradient(rgba(212, 158, 53, 0.16) 1px, transparent 1.2px),
    radial-gradient(rgba(44, 107, 80, 0.1) 1px, transparent 1.2px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 54px 54px, 72px 72px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 26px 34px;
}

/* Purely decorative holiday illustrations */
.decor-art {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

/* Accessible Focus Ring */
:focus-visible {
  outline: 3px solid var(--cranberry);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Compact Cozy Header + Shallow Festive Pine Garland Trim
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 246, 238, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eadcc2;
  box-shadow: 0 4px 18px -8px rgba(180, 120, 30, 0.16);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.4rem clamp(0.75rem, 2.5vw, 1.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

@media (min-width: 640px) {
  .header-inner {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  min-height: 44px;
  min-width: 0;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--cranberry), #b52734);
  color: #fff8eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(214, 56, 70, 0.28);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-tagline {
  display: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .brand-tagline {
    display: block;
  }
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  #openAccountsHeaderBtn {
    display: none !important;
  }
  .brand-title {
    font-size: 0.96rem;
  }
  .header-meta .btn-sm {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
}

@media (min-width: 640px) {
  .header-meta {
    gap: 0.45rem;
    flex-wrap: wrap;
  }
}

#headerStatusPill {
  display: none;
}

@media (min-width: 640px) {
  #headerStatusPill {
    display: inline-flex;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.78rem;
  border-radius: var(--radius-pill);
  background: var(--bg-mint);
  border: 1px solid var(--border-sage);
  color: var(--sage-deep);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.is-paired {
  background: var(--bg-honey-soft);
  border-color: var(--border-honey);
  color: var(--honey-ink);
}

.status-pill.is-unlocked {
  background: var(--bg-success-soft);
  border-color: #a8dfc0;
  color: #165638;
}

.room-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-sage);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.room-code-pill code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--cranberry);
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Shallow Festive Pine Garland Top Trim + 3-Step Strip
   ========================================================================== */

.festive-garland-crown {
  position: relative;
  max-width: 1180px;
  margin: 0 auto -0.2rem;
  padding: 0.08rem clamp(0.5rem, 2vw, 1.5rem) 0;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.festive-garland-crown img {
  width: min(100%, 300px);
  height: 39px;
  object-fit: cover;
  object-position: center 44%;
  filter: drop-shadow(0 4px 10px rgba(212, 146, 28, 0.22));
}

@media (min-width: 768px) {
  .festive-garland-crown {
    margin-bottom: -0.3rem;
  }
  .festive-garland-crown img {
    width: min(100%, 515px);
    height: 68px;
    object-fit: cover;
    object-position: center 44%;
  }
}

.steps-strip-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.2rem clamp(0.85rem, 2.5vw, 1.75rem) 0.05rem;
}

.steps-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  background:
    radial-gradient(circle at 92% 20%, rgba(236, 192, 91, 0.16) 0%, transparent 45%),
    var(--bg-mint);
  border: 1px solid var(--border-sage);
  border-radius: var(--radius-md);
  padding: 0.42rem 0.65rem;
}

@media (max-width: 639px) {
  #stepIndicator1 .step-sub,
  #stepIndicator2 .step-sub {
    display: none;
  }
}

@media (min-width: 768px) {
  .steps-strip-wrap {
    padding-top: 0.55rem;
  }
  .steps-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.68rem 1rem;
  }
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.16rem 0.35rem;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.step-item.is-current {
  background: rgba(255, 255, 255, 0.82);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--sage-accent);
  color: var(--sage-deep);
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item.is-current .step-num {
  background: var(--cranberry);
  border-color: var(--cranberry);
  color: #ffffff;
}

.step-item.is-done .step-num {
  background: var(--sage-accent);
  border-color: var(--sage-accent);
  color: #ffffff;
}

.step-text {
  font-size: 0.83rem;
  color: var(--text-main);
  line-height: 1.26;
  min-width: 0;
}

.step-text strong {
  font-weight: 800;
}

.step-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Dedicated Single-Step Page Shell (Used by Page 1: Login & Page 2: Name Board)
   ========================================================================== */

.step-page-shell {
  max-width: 500px;
  margin: 0 auto;
  padding: 0.45rem clamp(0.85rem, 3vw, 1.5rem) 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .step-page-shell {
    padding-top: 1.1rem;
    gap: 1rem;
  }
}

/* ==========================================================================
   Page 3: Christmas Tree & Secret Santa Workspace Grid
   ========================================================================== */

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.45rem clamp(0.85rem, 2.5vw, 1.75rem) 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

@media (min-width: 640px) {
  .app-shell {
    padding-top: 0.8rem;
    gap: 1rem;
  }
}

.tree-stage-slot {
  order: 1;
}

.primary-action-slot {
  order: 2;
}

.secondary-cards-slot {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 440px);
    grid-template-rows: auto 1fr;
    column-gap: 1.35rem;
    row-gap: 1rem;
  }

  .tree-stage-slot {
    grid-column: 1;
    grid-row: 1 / span 2;
    order: 1;
    position: sticky;
    top: 74px;
  }

  .primary-action-slot {
    grid-column: 2;
    grid-row: 1;
    order: 2;
  }

  .secondary-cards-slot {
    grid-column: 2;
    grid-row: 2;
    order: 3;
  }
}

/* ==========================================================================
   Compact Cozy Winter-Forest Snowglobe Tree Stage & Bespoke Name Tags
   ========================================================================== */

.tree-stage-card {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 24% at 50% 4%, rgba(248, 206, 102, 0.24) 0%, transparent 70%),
    radial-gradient(circle at 50% 40%, #275b45 0%, #153b2c 58%, #0d271d 100%);
  border: 3px solid #fffdf8;
  outline: 1.5px solid #e2cda0;
  box-shadow:
    0 16px 36px -12px rgba(20, 52, 37, 0.2),
    0 0 30px -8px rgba(232, 182, 74, 0.26);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 365px;
  user-select: none;
}

@media (min-width: 640px) {
  .tree-stage-card {
    min-height: 445px;
  }
}

@media (min-width: 960px) {
  .tree-stage-card {
    min-height: 535px;
  }
}

/* Warm String Lights Draped Across Top of Tree Stage */
.tree-lights-drape {
  position: absolute;
  top: 0;
  left: -1%;
  width: 102%;
  z-index: 16;
  pointer-events: none;
  user-select: none;
}

.tree-lights-drape img {
  width: 100%;
  height: auto;
  max-height: 64px;
  object-fit: cover;
  object-position: center top;
  animation: warmLightsGlow 4.6s ease-in-out infinite;
}

@keyframes warmLightsGlow {
  0%, 100% {
    opacity: 0.92;
    filter: drop-shadow(0 2px 8px rgba(248, 204, 98, 0.32));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 3px 14px rgba(248, 204, 98, 0.56));
  }
}

.tree-stage-topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 2.25rem 1rem 0;
  pointer-events: none;
}

@media (min-width: 640px) {
  .tree-stage-topbar {
    padding: 3.35rem 1.2rem 0;
  }
}

/* Santa & Gifts Welcome Accent inside Join / Welcome Card */
.santa-welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 82% 50%, rgba(248, 214, 130, 0.38) 0%, transparent 62%),
    linear-gradient(135deg, #f2faf5 0%, #fdf5e4 100%);
  border: 1px solid #dfeadf;
}

.santa-welcome-copy {
  min-width: 0;
  flex: 1;
}

.santa-welcome-copy .card-heading {
  font-size: 1.15rem;
  line-height: 1.18;
}

.santa-welcome-copy .card-subtext {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.santa-welcome-art {
  width: 80px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 12px rgba(32, 58, 44, 0.12));
}

@media (min-width: 640px) {
  .santa-welcome-banner {
    padding: 0.65rem 0.85rem;
    gap: 0.8rem;
  }
  .santa-welcome-copy .card-heading {
    font-size: 1.26rem;
  }
  .santa-welcome-copy .card-subtext {
    font-size: 0.87rem;
  }
  .santa-welcome-art {
    width: 168px;
  }
}

/* Snowman & Gift Supporting Companion Accent (90-130px desktop) */
.snowman-companion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.snowman-companion-copy {
  min-width: 0;
  flex: 1;
}

.snowman-companion-art {
  width: 78px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 5px 10px rgba(28, 54, 40, 0.11));
}

@media (min-width: 640px) {
  .snowman-companion-art {
    width: 106px;
  }
}

.stage-room-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #fff9ed;
}

.stage-room-caption {
  margin: 0.18rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(232, 246, 238, 0.86);
}

.stage-counter-badge {
  pointer-events: auto;
  padding: 0.36rem 0.72rem;
  border-radius: var(--radius-pill);
  background: rgba(11, 34, 24, 0.65);
  border: 1px solid rgba(238, 214, 152, 0.35);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff8e8;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.stage-counter-badge strong {
  color: var(--honey-gold-bright);
  font-family: var(--font-mono);
}

.tree-viewport {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  width: 100%;
  min-height: 275px;
  cursor: grab;
  touch-action: pan-y;
}

@media (min-width: 640px) {
  .tree-viewport {
    min-height: 335px;
  }
}

@media (min-width: 960px) {
  .tree-viewport {
    min-height: 410px;
  }
}

.tree-viewport:active {
  cursor: grabbing;
}

#treeCanvas,
.tree-fg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#treeCanvas {
  z-index: 10;
}

.tree-fg-canvas {
  z-index: 100;
  pointer-events: none;
}

.tags-layer {
  display: contents;
}

/* Discoverable Tree Controls Footer (44px Touch Buttons + Hint) */
.tree-stage-controls {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem 0.75rem;
  background: linear-gradient(to top, rgba(9, 28, 20, 0.72), transparent);
}

.rotate-btn {
  appearance: none;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 248, 232, 0.28);
  background: rgba(14, 42, 31, 0.78);
  color: #fff9ed;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s ease, transform 0.12s ease;
}

.rotate-btn:hover {
  background: rgba(24, 68, 50, 0.92);
}

.rotate-btn:active {
  transform: scale(0.97);
}

.tree-stage-hint {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(232, 246, 238, 0.78);
  text-align: center;
  display: none;
}

@media (min-width: 520px) {
  .tree-stage-hint {
    display: block;
  }
}

/* ==========================================================================
   Luxury Bespoke Foil-Framed Holiday Gift Name Tags
   ========================================================================== */

.hanging-tag {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 0%;
  will-change: transform, opacity, filter;
  pointer-events: auto;
  cursor: pointer;
}

.hanging-tag-hanger {
  display: block;
  width: 34px;
  height: 26px;
  margin: 0 auto -5px;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.hanging-tag-shadow {
  filter:
    drop-shadow(0 8px 14px rgba(4, 18, 12, 0.55))
    drop-shadow(0 2px 4px rgba(15, 8, 4, 0.35));
  transition: filter 0.2s ease;
}

.hanging-tag:hover .hanging-tag-shadow {
  filter:
    drop-shadow(0 10px 20px rgba(236, 192, 91, 0.42))
    drop-shadow(0 4px 8px rgba(4, 18, 12, 0.6));
}

.hanging-tag.is-me .hanging-tag-shadow {
  filter:
    drop-shadow(0 0 14px rgba(242, 200, 98, 0.68))
    drop-shadow(0 9px 16px rgba(4, 18, 12, 0.6));
}

.hanging-tag-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  padding: 0.7rem 0.8rem 0.42rem 0.6rem;
  min-width: 96px;
  max-width: 168px;
  clip-path: polygon(
    11px 0%,
    calc(100% - 11px) 0%,
    100% 10px,
    100% calc(100% - 3px),
    calc(100% - 3px) 100%,
    3px 100%,
    0% calc(100% - 3px),
    0% 10px
  );
  background: linear-gradient(165deg, #fffdf8 0%, #f1e4c8 100%);
  color: #24160c;
}

.hanging-tag-card::before {
  content: '';
  position: absolute;
  inset: 3px;
  pointer-events: none;
  border: 1px solid rgba(186, 136, 48, 0.52);
  clip-path: polygon(
    9px 0%,
    calc(100% - 9px) 0%,
    100% 8px,
    100% 100%,
    0% 100%,
    0% 8px
  );
}

.hanging-tag-grommet {
  position: absolute;
  top: 3.5px;
  left: 50%;
  transform: translateX(-50%);
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #0d2219 34%, #ecc66f 42%, #9a6c1f 82%, #fdf0be 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  z-index: 2;
}

.hanging-tag-seal {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  background: radial-gradient(circle at 32% 30%, #d83645 0%, #8e1723 78%, #5e0d15 100%);
  color: #fff4d6;
  border: 1px solid rgba(245, 218, 158, 0.5);
}

.hanging-tag-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hanging-tag.tag-style-1 .hanging-tag-card {
  background: linear-gradient(155deg, #981f2d 0%, #63101a 100%);
  color: #fff8ea;
}
.hanging-tag.tag-style-1 .hanging-tag-card::before {
  border-color: rgba(240, 204, 124, 0.55);
}
.hanging-tag.tag-style-1 .hanging-tag-seal {
  background: radial-gradient(circle at 32% 30%, #f2d484 0%, #b17e25 82%);
  color: #2b1806;
}

.hanging-tag.tag-style-2 .hanging-tag-card {
  background: linear-gradient(160deg, #fffdf7 0%, #f3e7cf 100%);
  color: #871925;
}

.hanging-tag.tag-style-3 .hanging-tag-card {
  background: linear-gradient(155deg, #1b4b38 0%, #0f2d21 100%);
  color: #fcf4e1;
}
.hanging-tag.tag-style-3 .hanging-tag-card::before {
  border-color: rgba(232, 192, 104, 0.55);
}

.hanging-tag.tag-style-4 .hanging-tag-card {
  background: linear-gradient(160deg, #f8edd6 0%, #e5cfa3 100%);
  color: #26180c;
}

.hanging-tag-you {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.36rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #f7d67c, #cc9832);
  color: #231507;
  flex-shrink: 0;
}

/* Flying Dispensed Tag during Pump-Out */
.dispensed-flyer {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 320;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.15);
  opacity: 0;
}

.dispensed-flyer.is-flying {
  animation: pumpOutTag 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pumpOutTag {
  0% {
    transform: translate(-50%, -50%) scale(0.16) rotate(-14deg);
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  68% {
    transform: translate(-50%, -55%) scale(1.08) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.dispensed-envelope {
  padding: 1.1rem 1.6rem;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, #fffdf8 0%, #f1e3c6 100%);
  color: var(--text-main);
  border: 2px solid #deb458;
  box-shadow: 0 22px 50px rgba(8, 25, 18, 0.55);
  text-align: center;
  min-width: 220px;
}

.dispensed-wax {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin: 0 auto 0.35rem;
  background: radial-gradient(circle at 35% 35%, #df3a49, #8d1924);
  color: #fff4d4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.spin-status-banner {
  position: absolute;
  left: 50%;
  bottom: 4.1rem;
  transform: translateX(-50%);
  z-index: 310;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(12, 36, 26, 0.9);
  border: 1px solid rgba(240, 202, 118, 0.55);
  color: #ffe59e;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Cards, Forms, Buttons & Inline Validation
   ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .card {
    padding: 1.2rem 1.25rem;
  }
}

.card-host {
  background: linear-gradient(180deg, #fffcf5 0%, var(--bg-honey-soft) 100%);
  border-color: var(--border-honey);
}

.card-mint {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-mint) 100%);
  border-color: var(--border-sage);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.card-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.card-subtext {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .card-heading {
    font-size: 1.32rem;
  }
  .card-subtext {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
}

/* Mode Segmented Switch */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.28rem;
  border-radius: var(--radius-md);
  background: var(--bg-mint);
  border: 1px solid var(--border-sage);
  margin-bottom: 0.7rem;
}

@media (min-width: 640px) {
  .mode-tabs {
    margin-bottom: 1rem;
  }
}

.mode-tab {
  appearance: none;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mode-tab.is-active {
  background: var(--bg-card);
  color: var(--cranberry);
  box-shadow: 0 2px 8px rgba(24, 54, 40, 0.08);
}

/* Form Controls */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .form-stack {
    gap: 0.85rem;
  }
  .field {
    gap: 0.35rem;
  }
}

.field-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.field-error {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b91c2c;
}

.text-input {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-input);
  background: #ffffff;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.text-input::placeholder {
  color: #7b9187;
  font-weight: 500;
}

.text-input:focus {
  outline: none;
  border-color: var(--cranberry);
  box-shadow: 0 0 0 3px rgba(214, 56, 70, 0.16);
}

.text-input[aria-invalid="true"] {
  border-color: #c82838;
  background: #fffafb;
}

.text-input.code-input {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--cranberry);
  cursor: pointer;
  flex-shrink: 0;
}

/* 44px+ Tactile Buttons */
.btn {
  appearance: none;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.68rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--cranberry);
  color: #ffffff;
  box-shadow: 0 6px 16px -4px rgba(214, 56, 70, 0.42);
}

.btn-primary:hover:not(:disabled) {
  background: var(--cranberry-hover);
}

.btn-secondary {
  background: var(--bg-mint);
  color: var(--sage-deep);
  border-color: var(--border-sage);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-mint-strong);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-input);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-ivory);
  border-color: var(--sage-accent);
}

.btn-sm {
  width: auto;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Feedback & Cheerful Joined Success State */
.alert-msg {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--bg-danger-soft);
  border: 1px solid #f2b8be;
  color: #9e1c2a;
}

.joined-success-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: var(--bg-success-soft);
  border: 1.5px solid #aadfc0;
  color: #154d32;
}

.joined-success-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1rem;
}

/* ==========================================================================
   Friendly Participant Avatar Chips
   ========================================================================== */

.invite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-mint);
  border: 1px solid var(--border-sage);
  margin-bottom: 0.9rem;
}

.invite-code-val {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cranberry);
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.3rem 0.7rem 0.3rem 0.38rem;
  border-radius: var(--radius-pill);
  background: var(--bg-ivory);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 100%;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.member-chip.is-me {
  background: var(--cranberry-soft);
  border-color: #f1b3b9;
}

.member-chip-focus-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.15rem;
  min-height: 36px;
  cursor: pointer;
  min-width: 0;
}

.chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.avatar-color-0 { background: #d63846; }
.avatar-color-1 { background: #2c6b50; }
.avatar-color-2 { background: #c98619; }
.avatar-color-3 { background: #3b6e8c; }
.avatar-color-4 { background: #8c3f5d; }

.chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 135px;
}

.chip-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.42rem;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--cranberry);
  border: 1px solid rgba(214, 56, 70, 0.25);
}

.chip-badge.is-host {
  color: var(--honey-ink);
  background: #fff6de;
  border-color: var(--border-honey);
}

.chip-remove-btn {
  appearance: none;
  width: 32px;
  height: 32px;
  margin-left: 0.1rem;
  border-radius: 50%;
  border: none;
  background: rgba(29, 49, 40, 0.07);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.chip-remove-btn:hover {
  background: #f8d4d8;
  color: #a31926;
}

/* ==========================================================================
   Secret Gift Mission & 24/12 Locked Angel Card
   ========================================================================== */

.mission-box {
  padding: 1.1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #fffdf9 0%, #faefd8 100%);
  border: 1.5px solid var(--border-honey);
  text-align: center;
  margin-bottom: 0.85rem;
}

.mission-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cranberry);
}

.mission-recipient {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 700;
  color: var(--text-main);
  margin: 0.2rem 0 0.35rem;
  line-height: 1.15;
}

.mission-recipient.is-hidden-peek {
  filter: blur(11px);
  user-select: none;
}

.angel-lock-box {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-mint);
  border: 1px solid var(--border-sage);
}

.angel-countdown {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sage-deep);
  margin: 0.35rem 0 0.25rem;
}

.angel-revealed-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cranberry);
  margin: 0.2rem 0;
}

/* ==========================================================================
   Host State Callout & Separated Demo Testing Tools
   ========================================================================== */

.host-state-banner {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-honey);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--honey-ink);
  margin-bottom: 0.75rem;
}

.demo-tools-box {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-sage);
  background: rgba(255, 255, 255, 0.6);
}

.demo-tools-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  display: block;
}

/* Full Room Revealed Pairs */
.pairs-reveal-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pair-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-ivory);
  border: 1px solid var(--border-card);
  font-size: 0.88rem;
}

.pair-angel {
  font-weight: 800;
  color: var(--cranberry);
}

.pair-arrow {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.pair-giftee {
  font-weight: 800;
  color: var(--sage-deep);
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 42, 32, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.reveal-modal-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text-main);
  border: 2px solid var(--border-honey);
  padding: 1.65rem 1.5rem 1.45rem;
  text-align: center;
  box-shadow: var(--shadow-modal);
  transform: translateY(12px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.reveal-wax-emblem {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  background: radial-gradient(circle at 32% 30%, #e03c4b, #961925);
  color: #fff5d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(180, 35, 48, 0.28);
}

.reveal-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--cranberry);
}

.reveal-big-name {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-main);
  margin: 0.3rem 0 0.5rem;
  line-height: 1.12;
}

.reveal-desc {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.utility-link {
  appearance: none;
  background: none;
  border: none;
  min-height: 44px;
  padding: 0.35rem 0.5rem;
  color: var(--sage-accent);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.utility-link:hover {
  color: var(--cranberry);
}

/* ==========================================================================
   Cozy Christmas Game Boards, Ornament Name Board & Flying Tag Choreography
   ========================================================================== */

@keyframes boardPopIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.game-board-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fffcf6 100%);
  border: 2px solid #e7cf98;
  box-shadow:
    0 16px 36px -12px rgba(24, 54, 40, 0.14),
    0 4px 0 #ead5a4,
    0 0 28px -8px rgba(236, 192, 91, 0.28);
  padding: 2.15rem 1rem 1.05rem;
  animation: boardPopIn 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.game-board-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 5;
  background: repeating-linear-gradient(
    135deg,
    #d63846 0 12px,
    #fffaf0 12px 22px,
    #2c6b50 22px 34px,
    #fffaf0 34px 44px
  );
}

@media (min-width: 640px) {
  .game-board-card {
    padding: 2.55rem 1.35rem 1.3rem;
  }
}

.game-quest-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.68rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fff6df 0%, #fcebed 100%);
  border: 1px solid #ebd094;
  color: #9e1e2a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.game-cta-btn {
  min-height: 50px;
  font-size: 1rem;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #e04150 0%, #cc2d3b 100%);
  color: #ffffff;
  border: 1px solid #b52330;
  box-shadow: 0 5px 0 #961925, 0 12px 22px -6px rgba(214, 56, 70, 0.45);
}

.game-cta-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #e64958 0%, #be2634 100%);
}

.game-cta-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #961925, 0 6px 12px -4px rgba(214, 56, 70, 0.4);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .text-input {
  padding-right: 3.1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.pw-toggle-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pw-toggle-btn:hover {
  background: rgba(44, 107, 80, 0.08);
  color: var(--text-main);
}

/* Giant Cozy Ornament Name Board (Morphs & Flies onto the Tree!) */
.ornament-name-board {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(165deg, #fffdf9 0%, #faf0da 100%);
  border: 2.5px solid #dfc07c;
  box-shadow:
    0 18px 38px -12px rgba(34, 58, 44, 0.18),
    0 5px 0 #d5b268,
    inset 0 0 0 3px rgba(255, 255, 255, 0.72);
  padding: 1.35rem 1.05rem 1.15rem;
  animation: boardPopIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  .ornament-name-board {
    padding: 1.55rem 1.35rem 1.3rem;
  }
}

.ornament-board-top-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -0.35rem;
  margin-bottom: 0.45rem;
}

.ornament-grommet-medallion {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffe9a6 0%, #cf9833 68%, #8c5f14 100%);
  border: 2px solid #fff6d6;
  box-shadow: 0 4px 10px rgba(140, 95, 20, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.ornament-live-preview-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1.5px dashed #dfc07c;
  margin-bottom: 0.65rem;
}

.ornament-wax-seal-lg {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  background: radial-gradient(circle at 32% 30%, #e03c4b 0%, #991926 78%, #630d16 100%);
  color: #fff5d8;
  border: 1.5px solid rgba(248, 222, 162, 0.75);
  box-shadow: 0 3px 8px rgba(153, 25, 38, 0.28);
}

.ornament-name-input {
  width: 100%;
  min-height: 50px;
  padding: 0.65rem 0.95rem;
  border-radius: 15px;
  border: 2px solid #d4b675;
  background: #ffffff;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ornament-name-input::placeholder {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: #84968d;
}

.ornament-name-input:focus {
  outline: none;
  border-color: var(--cranberry);
  box-shadow: 0 0 0 3.5px rgba(214, 56, 70, 0.18);
}

.quick-name-chip {
  appearance: none;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid #ebd094;
  background: #fff8e7;
  color: #5f3d05;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, transform 0.12s ease;
}

.quick-name-chip:hover {
  background: #fdefcc;
}

/* Flying Ornament Name Tag Actor (Morphs from Name Board -> Flies onto Tree Branch) */
.flying-tag-actor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.5rem 1rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #fffdf8 0%, #f5e6c5 100%);
  border: 2px solid #e2bc6b;
  box-shadow:
    0 18px 40px rgba(18, 42, 30, 0.35),
    0 0 24px rgba(248, 206, 102, 0.72);
  color: #1d3128;
  transform-origin: center center;
  will-change: transform, width, height, opacity;
  overflow: hidden;
}

.flying-tag-actor-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes sparkleFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80%) scale(0.2);
  }
}

.flight-sparkle-dot {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 20%, #f5c451 70%, transparent 100%);
  box-shadow: 0 0 10px #f5c451;
  animation: sparkleFade 0.55s ease-out forwards;
}

.account-pill {
  display: none;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.72rem;
  border-radius: var(--radius-pill);
  background: var(--bg-honey-soft);
  border: 1px solid var(--border-honey);
  color: var(--honey-ink);
  font-size: 0.78rem;
  font-weight: 800;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .account-pill {
    display: inline-flex;
  }
}

.accounts-modal-card {
  width: 100%;
  max-width: 600px;
  max-height: min(88vh, 740px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text-main);
  border: 2px solid var(--border-honey);
  padding: 1.25rem 1.2rem;
  text-align: left;
  box-shadow: var(--shadow-modal);
}

.accounts-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-input);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-main);
  resize: vertical;
}

.accounts-textarea:focus {
  outline: none;
  border-color: var(--cranberry);
  box-shadow: 0 0 0 3px rgba(214, 56, 70, 0.15);
}

.accounts-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 280px;
  overflow-y: auto;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--bg-ivory);
  border: 1px solid var(--border-card);
  font-size: 0.84rem;
}

.account-row-email {
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.account-pw-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.5rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border-sage);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sage-deep);
}

.success-banner-msg {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-success-soft);
  border: 1px solid #a8dfc0;
  color: #154d32;
  font-size: 0.84rem;
  font-weight: 700;
}

.single-account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 560px) {
  .single-account-grid {
    grid-template-columns: 1.35fr 1fr 0.85fr auto;
    gap: 0.45rem;
    align-items: end;
  }
}

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