/* Halloween palette. All visual changes stay behind html.halloween. */
html.halloween {
  --bg: #F5EEF9;
  --bg-deeper: #EADFF3;
  --bg-sky: #D9C6EC;
  --navy: #2A1240;
  --navy-soft: #3D1E5C;
  --blue: #7B3FBF;
  --blue-deep: #5B2A86;
  --gold: #F07820;
  --orange: #F07820;
  --border: #E4D6ED;
  --border-strong: #CDB7DD;
  --cyan: #F07820;
  --cyan-soft: #FFD2B2;
  --shadow-sm: 0 2px 8px rgba(61, 30, 92, 0.08);
  --shadow-md: 0 4px 16px rgba(61, 30, 92, 0.12);
  --shadow-lg: 0 16px 40px rgba(42, 18, 64, 0.22);
}

html.halloween body {
  background: radial-gradient(circle at 82% 4%, rgba(123, 63, 191, 0.08), transparent 28rem), var(--bg);
}

html.halloween .sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 198, 236, 0.72) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(240, 120, 32, 0.09) 0%, transparent 48%),
    linear-gradient(180deg, #FFFFFF 0%, #F8F2FB 100%);
}

html.halloween .mobile-bar { background: rgba(245, 238, 249, 0.96); }

html.halloween .brand img {
  filter: drop-shadow(0 0 7px rgba(123, 63, 191, 0.38)) drop-shadow(0 0 18px rgba(240, 120, 32, 0.2));
  animation: none;
}

html.halloween .search-wrap:focus-within,
html.halloween .dept-filter:focus,
html.halloween .dept-filter:focus-visible,
html.halloween .clear-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(123, 63, 191, 0.18);
}

html.halloween .remote-toggle input:focus-visible ~ .remote-toggle-track {
  box-shadow: 0 0 0 3px rgba(123, 63, 191, 0.24);
}

html.halloween .halloween-toggle {
  margin-top: -0.15rem;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(123, 63, 191, 0.08), rgba(240, 120, 32, 0.08));
  border: 1px solid rgba(123, 63, 191, 0.14);
}

/* Pumpkin art in the sidebar switch label (replaces an emoji that rendered
   differently per OS). Shown whenever the switch is, so not halloween-scoped;
   the class only exists while the toggle window is open. */
.halloween-toggle-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 0.35rem;
  vertical-align: -4px;
}

/* Phone menu-bar pumpkin chip: same state as the sidebar switch. Matches the
   Menu button (36px tall, same border and radius) so the bar keeps its
   height; ::before widens the tap target to 44px. On = orange halo + border. */
.mobile-bar .halloween-chip {
  position: relative;
  margin-left: auto;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, transform 120ms ease;
}
.mobile-bar .halloween-chip::before {
  content: "";
  position: absolute;
  inset: -4px;
}
.mobile-bar .halloween-chip img { display: block; width: 24px; height: 24px; pointer-events: none; }
.mobile-bar .halloween-chip + .menu-btn { margin-left: 0; }
.mobile-bar .halloween-chip:active { transform: scale(0.94); }
.mobile-bar .halloween-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mobile-bar .halloween-chip[aria-pressed="true"] {
  background: #FFF4EA;
  border-color: #F07820;
  box-shadow: 0 0 0 3px rgba(240, 120, 32, 0.22);
}

/* One trophy moves between the sidebar row and the phone bar. */
html.halloween .halloween-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -0.15rem;
}
html.halloween .halloween-row label.halloween-toggle {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}
html.halloween .halloween-row .witch-board-btn { margin-left: 0; }
html.halloween .witch-board-how {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.88;
}
html.halloween .witch-board-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin-left: 8px;
  vertical-align: middle;
  flex-shrink: 0;
  border: 1px solid #F07820;
  border-radius: 50%;
  background: #FFF4EA;
  cursor: pointer;
  font-size: 17px;
}
html.halloween .mobile-bar .witch-board-btn {
  position: relative;
  width: 36px;
  height: 36px;
  margin-left: 0;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 980px) {
}
.mobile-bar .witch-board-btn::before { content: ""; position: absolute; inset: -4px; }
.mobile-bar .witch-board-btn + .menu-btn { margin-left: 0; }
html.halloween .witch-board-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

html.halloween .witch-board {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  background: rgba(31, 14, 47, 0.6);
}
html.halloween .witch-board-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 340px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px;
  border: 1.5px solid #F07820;
  border-radius: 18px;
  background: #301744;
  color: #F5EEF9;
  box-shadow: 0 12px 48px rgba(31, 14, 47, 0.4);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
}
/* r12d: the corner X. Selector includes `button` so it beats the general
   `.witch-board button` rule below (orange fill + padding squeezed the icon
   to nothing). Light gray on the purple card, 36px hit area. */
html.halloween .witch-board button.witch-board-x {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; min-height: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #CDBFD9; cursor: pointer;
}
html.halloween .witch-board button.witch-board-x svg { width: 20px; height: 20px; display: block; }
html.halloween .witch-board button.witch-board-x:hover { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }
html.halloween .witch-board h2 { padding-right: 36px; }
html.halloween .witch-board h2 { margin: 0 0 12px; color: #FFAB66; font-size: 20px; font-weight: 900; }
html.halloween .witch-board p { margin: 0 0 14px; }
html.halloween .witch-board input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #F07820;
  border-radius: 8px;
  background: #F5EEF9;
  color: #301744;
  font: inherit;
  font-size: 16px;
}
html.halloween .witch-board button {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid #F07820;
  border-radius: 8px;
  background: #FFAB66;
  color: #301744;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
html.halloween .witch-board button:disabled { opacity: 0.55; cursor: wait; }
html.halloween .witch-board .witch-board-again { flex: 1; background: #F07820; border-color: #F07820; color: #1F0E2F; }
html.halloween .witch-board .witch-board-again:hover { background: #FF8A33; }
html.halloween .witch-board :is(input, button):focus-visible { outline: 2px solid #FFAB66; outline-offset: 3px; }
html.halloween .witch-board-actions { display: flex; gap: 10px; }
html.halloween .witch-board .witch-board-error { margin: 10px 0; color: #FFAB66; }
html.halloween .witch-board ol { list-style: none; margin: 0 0 16px; padding: 0; }
html.halloween .witch-leaderboard-card { display: flex; flex-direction: column; }
html.halloween .witch-leaderboard-card > :not(.witch-player-list) { flex-shrink: 0; }
html.halloween .witch-board ol.witch-player-list {
  min-height: calc(1.4em + 14px);
  max-height: calc(10 * (1.4em + 14px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
html.halloween .witch-board ol.witch-player-list:focus-visible { outline: 2px solid #FFAB66; outline-offset: 2px; }
html.halloween .witch-board li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
}
html.halloween .witch-board li span:nth-child(2) { overflow-wrap: anywhere; }
html.halloween .witch-board li b { color: #FFAB66; font-weight: 900; }
html.halloween .witch-board li.is-you { background: #543065; box-shadow: inset 0 0 0 1px #F07820; }
html.halloween .witch-board .witch-board-best { color: #FFAB66; font-weight: 700; }
/* r10 name picker: faces + names from the cards on this page */
html.halloween .witch-pick-box { position: relative; margin-bottom: 4px; }
/* r13: in normal flow (not absolute), so the card grows with the list instead
   of clipping it at its own overflow edge (only the first option showed). */
html.halloween .witch-pick-list {
  position: relative;
  max-height: 232px; overflow-y: auto; margin: 4px 0 0; padding: 4px; list-style: none;
  border: 1.5px solid #F07820; border-radius: 10px; background: #3D1F55;
  box-shadow: 0 10px 28px rgba(31, 14, 47, 0.55);
}
html.halloween .witch-pick-list li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 6px 8px; border-radius: 7px; cursor: pointer; color: #F5EEF9;
}
html.halloween .witch-pick-list li.is-active, html.halloween .witch-pick-list li:hover { background: #543065; box-shadow: inset 0 0 0 1px #F07820; }
html.halloween .witch-pick-face {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  background: #7B3FBF; color: #FFF4EA; font-size: 12px; font-weight: 800; border: 1.5px solid #F07820;
}

html.halloween .update-notice {
  background: linear-gradient(135deg, rgba(123, 63, 191, 0.08), rgba(240, 120, 32, 0.08));
  border-color: rgba(123, 63, 191, 0.22);
}

html.halloween .update-notice .update-dot {
  box-shadow: 0 0 0 4px rgba(123, 63, 191, 0.18);
  animation: none;
}

html.halloween .hero-btn-primary {
  box-shadow: 0 4px 14px rgba(42, 18, 64, 0.26);
  border-color: rgba(240, 120, 32, 0.5);
}

html.halloween .hero-btn-primary:hover { box-shadow: 0 8px 20px rgba(42, 18, 64, 0.36); }

html.halloween .hero-mosaic .tile {
  box-shadow: 0 6px 18px rgba(61, 30, 92, 0.13), 0 1px 0 rgba(61, 30, 92, 0.05) inset;
  border-color: rgba(61, 30, 92, 0.12);
}

html.halloween .hero-mosaic .tile:hover { box-shadow: 0 14px 28px rgba(61, 30, 92, 0.25); }

html.halloween .hero-mosaic .tile-meta {
  background: linear-gradient(to top, rgba(42, 18, 64, 0.94) 0%, rgba(61, 30, 92, 0.8) 60%, rgba(42, 18, 64, 0) 100%);
}

html.halloween .hero-mosaic .tile.tier-manager,
html.halloween .hero-mosaic .tile.tier-exec,
html.halloween .hero-mosaic .tile.tier-sales-lead {
  border-color: rgba(240, 120, 32, 0.7);
}

html.halloween .hero-mosaic .tile.tier-boss {
  box-shadow:
    0 0 0 2px #FFE3B3,
    0 0 0 4px #F07820,
    0 0 0 5px #7A2E05,
    0 0 36px rgba(240, 120, 32, 0.48),
    0 14px 38px rgba(42, 18, 64, 0.42);
}

html.halloween.halloween-photos .hero-mosaic .tile.tier-boss::after {
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 217, 168, 0.22) 0%, rgba(255, 217, 168, 0) 60%);
}

html.halloween .hero-mosaic .tile.tier-boss .tile-meta {
  background: linear-gradient(to top, rgba(180, 80, 15, 0.97) 0%, rgba(240, 120, 32, 0.82) 60%, rgba(240, 120, 32, 0) 100%);
  color: #2A1240;
}

html.halloween .hero-mosaic .tile.tier-boss .tile-meta .tile-role { color: rgba(42, 18, 64, 0.8); }

/* Exact Halloween cutout gradients for cards, popouts, and hero tiles. Public
   mode puts every photo on these: photos/halloween-bg/ holds each real photo
   with its backdrop cut away (halloween.js swaps them in). fb-photo-wait (set
   by the early script in index.html) paints the same backdrops behind the
   still-hidden originals, so the blue/gold ones never flash on load. */
html.halloween.halloween-photos .card-flip[data-portal-cutout="1"] .avatar,
html.halloween.halloween-photos .hero-mosaic .tile[data-portal-cutout="1"],
html.halloween.fb-photo-wait .card-flip .avatar,
html.halloween.fb-photo-wait .hero-mosaic .tile {
  background: radial-gradient(circle at 50% 32%, #E9D8FD 0%, #9B5DE5 40%, #5B2A86 80%, #2A0F45 100%);
}

html.halloween.halloween-photos .card-flip[data-portal-cutout="1"] .popout-photo {
  background: radial-gradient(ellipse at 50% 30%, #E9D8FD 0%, #9B5DE5 40%, #5B2A86 80%, #2A0F45 100%);
}

html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-manager .avatar,
html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-exec .avatar,
html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-sales-lead .avatar,
html.halloween.halloween-photos .hero-mosaic .tile[data-portal-cutout="1"].tier-manager,
html.halloween.halloween-photos .hero-mosaic .tile[data-portal-cutout="1"].tier-exec,
html.halloween.halloween-photos .hero-mosaic .tile[data-portal-cutout="1"].tier-sales-lead,
html.halloween.fb-photo-wait .card-flip.tier-manager .avatar,
html.halloween.fb-photo-wait .card-flip.tier-exec .avatar,
html.halloween.fb-photo-wait .card-flip.tier-sales-lead .avatar,
html.halloween.fb-photo-wait .hero-mosaic .tile.tier-manager,
html.halloween.fb-photo-wait .hero-mosaic .tile.tier-exec,
html.halloween.fb-photo-wait .hero-mosaic .tile.tier-sales-lead {
  background: radial-gradient(circle at 50% 32%, #FFD9A8 0%, #F28C28 40%, #B4500F 80%, #5A2306 100%);
}

html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-manager .popout-photo,
html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-exec .popout-photo,
html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-sales-lead .popout-photo {
  background: radial-gradient(ellipse at 50% 30%, #FFD9A8 0%, #F28C28 40%, #B4500F 80%, #5A2306 100%);
}

html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-boss .avatar,
html.halloween.halloween-photos .hero-mosaic .tile[data-portal-cutout="1"].tier-boss,
html.halloween.fb-photo-wait .card-flip.tier-boss .avatar,
html.halloween.fb-photo-wait .hero-mosaic .tile.tier-boss {
  background: radial-gradient(circle at 50% 32%, #FFE3B3 0%, #F07820 40%, #7A2E05 80%, #140802 100%);
}

html.halloween.halloween-photos .card-flip[data-portal-cutout="1"].tier-boss .popout-photo {
  background: radial-gradient(ellipse at 50% 30%, #FFE3B3 0%, #F07820 40%, #7A2E05 80%, #140802 100%);
}

/* Originals stay invisible until halloween.js has swapped in the cutouts and
   they decoded. The animation is a safety net: they show after 3s anyway. */
html.halloween.fb-photo-wait .hero-mosaic .tile img,
html.halloween.fb-photo-wait .card-flip .avatar img {
  animation: fb-photo-reveal 0s linear 3s both;
}

@keyframes fb-photo-reveal { from { opacity: 0; } to { opacity: 1; } }

html.halloween.halloween-photos .card-flip.tier-member:not([data-portal-cutout="1"]) .avatar,
html.halloween.halloween-photos .card-flip.tier-member .popout-photo .initials { background: #6B35A3; }

html.halloween.halloween-photos .card-flip.tier-manager:not([data-portal-cutout="1"]) .avatar,
html.halloween.halloween-photos .card-flip.tier-exec:not([data-portal-cutout="1"]) .avatar,
html.halloween.halloween-photos .card-flip.tier-sales-lead:not([data-portal-cutout="1"]) .avatar,
html.halloween.halloween-photos .card-flip.tier-manager .popout-photo .initials,
html.halloween.halloween-photos .card-flip.tier-exec .popout-photo .initials,
html.halloween.halloween-photos .card-flip.tier-sales-lead .popout-photo .initials {
  background: linear-gradient(135deg, #F28C28 0%, #9E3F0B 100%);
}

html.halloween .floor-badge {
  background: rgba(123, 63, 191, 0.1);
  color: #5B2A86;
  border-color: rgba(123, 63, 191, 0.28);
}

html.halloween .popout-scrim { background: rgba(42, 18, 64, 0.6); }
html.halloween .card-face.card-back { box-shadow: 0 30px 80px rgba(42, 18, 64, 0.38); }

html.halloween.halloween-photos .popout-photo::after {
  background: linear-gradient(180deg, transparent 0%, transparent 78%, rgba(42, 18, 64, 0.28) 100%);
}

html.halloween .state-chip,
html.halloween .lang-chip {
  color: #5B2A86;
  background: rgba(123, 63, 191, 0.09);
  border-color: rgba(123, 63, 191, 0.24);
}

html.halloween .state-chip:hover,
html.halloween .lang-chip:hover {
  background: rgba(123, 63, 191, 0.18);
  border-color: rgba(123, 63, 191, 0.58);
  color: #2A1240;
}

html.halloween .back-quote {
  border-left-color: #F07820;
  background: linear-gradient(90deg, rgba(240, 120, 32, 0.12), rgba(240, 120, 32, 0));
}

html.halloween .back-row[data-row="snack"] {
  background: linear-gradient(135deg, rgba(240, 120, 32, 0.1), rgba(123, 63, 191, 0.05));
  border-color: rgba(240, 120, 32, 0.3);
}

html.halloween .back-row[data-row="snack"] .back-label { color: #B4500F; }
html.halloween .back-row[data-row="snack"] .back-value { color: #633010; }

/* Boss cards keep dark prestige treatment, recolored deep purple and orange. */
html.halloween .card-flip.tier-boss .card-front,
html.halloween .card-flip.tier-boss .card-back {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(240, 120, 32, 0.3) 0%, transparent 55%),
    linear-gradient(180deg, #210C35 0%, #2A1240 60%, #3D1E5C 100%);
  border-color: rgba(240, 120, 32, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 217, 168, 0.26),
    0 0 0 1px rgba(240, 120, 32, 0.42),
    0 0 24px rgba(240, 120, 32, 0.28),
    0 0 48px rgba(123, 63, 191, 0.32),
    0 18px 44px rgba(42, 18, 64, 0.4);
}

html.halloween .card-flip.tier-boss.popped .card-back {
  box-shadow:
    inset 0 1px 0 rgba(255, 217, 168, 0.3),
    0 0 0 1px rgba(240, 120, 32, 0.6),
    0 0 38px rgba(240, 120, 32, 0.5),
    0 0 90px rgba(123, 63, 191, 0.46),
    0 30px 80px rgba(42, 18, 64, 0.55);
}

html.halloween .card-flip.tier-boss .card-front::before,
html.halloween .card-flip.tier-boss .card-back::before {
  background: linear-gradient(90deg, #7A2E05 0%, #B4500F 14%, #F07820 32%, #FFE3B3 50%, #F07820 68%, #B4500F 86%, #7A2E05 100%);
}

html.halloween .card-flip.tier-boss .card-front::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 217, 168, 0.7) 50%, transparent 100%);
}

html.halloween .card-flip.tier-boss .avatar {
  box-shadow:
    0 0 0 2px #FFE3B3,
    0 0 0 4px #F07820,
    0 0 0 5px #7A2E05,
    0 0 30px rgba(240, 120, 32, 0.46),
    0 12px 36px rgba(20, 8, 2, 0.42);
}

html.halloween.halloween-photos .card-flip.tier-boss .avatar {
  background: linear-gradient(135deg, #F07820 0%, #7A2E05 100%);
}

html.halloween.halloween-photos .card-flip.tier-boss .avatar::after {
  background: radial-gradient(circle at 50% 35%, transparent 50%, rgba(42, 18, 64, 0.18) 80%, rgba(20, 8, 2, 0.46) 100%);
}

html.halloween .card-flip.tier-boss .name,
html.halloween .card-flip.tier-boss .back-name,
html.halloween .card-flip.tier-boss .back-value,
html.halloween .card-flip.tier-boss .back-link:hover { color: #FFE3B3; }

html.halloween .card-flip.tier-boss .title,
html.halloween .card-flip.tier-boss .back-title,
html.halloween .card-flip.tier-boss .back-label,
html.halloween .card-flip.tier-boss .tree-label { color: rgba(255, 217, 168, 0.82); }

html.halloween .card-flip.tier-boss .back-link,
html.halloween .card-flip.tier-boss .back-quote .back-quote-mark { color: #FFB15C; }

html.halloween .card-flip.tier-boss .ext-pill,
html.halloween .card-flip.tier-boss .email-link,
html.halloween .card-flip.tier-boss .cell-link,
html.halloween .card-flip.tier-boss .state-chip,
html.halloween .card-flip.tier-boss .lang-chip,
html.halloween .card-flip.tier-boss .tree-link,
html.halloween .card-flip.tier-boss .tree-chip,
html.halloween .card-flip.tier-boss .card-close-btn {
  color: #FFE3B3;
  border-color: rgba(240, 120, 32, 0.58);
  background: rgba(240, 120, 32, 0.12);
}

html.halloween .card-flip.tier-boss .email-link:hover,
html.halloween .card-flip.tier-boss .cell-link:hover,
html.halloween .card-flip.tier-boss .tree-chip:hover,
html.halloween .card-flip.tier-boss .card-close-btn:hover {
  background: linear-gradient(135deg, #F28C28 0%, #B4500F 100%);
  color: #210C35;
  border-color: #FFE3B3;
}

html.halloween.halloween-photos .card-flip.tier-boss .popout-photo::after {
  background:
    radial-gradient(ellipse at 50% 35%, transparent 38%, rgba(42, 18, 64, 0.2) 70%, rgba(20, 8, 2, 0.58) 100%),
    linear-gradient(180deg, transparent 0%, transparent 78%, rgba(20, 8, 2, 0.58) 100%);
}

/* Birthday and anniversary gold accents become pumpkin orange. */
html.halloween .anniv-ribbon,
html.halloween .bday-gift .bday-ribbon-h,
html.halloween .bday-gift .bday-ribbon-v {
  background: linear-gradient(135deg, #7A2E05 0%, #F07820 38%, #FFE3B3 54%, #F07820 70%, #7A2E05 100%);
}

html.halloween .anniv-badge,
html.halloween .bday-badge {
  color: #7A2E05;
  background: linear-gradient(135deg, rgba(240, 120, 32, 0.18), rgba(255, 217, 168, 0.34));
  border-color: rgba(240, 120, 32, 0.5);
}

html.halloween .anniv-cheer,
html.halloween .bday-cheer {
  background: radial-gradient(125% 150% at 50% 0%, rgba(255, 217, 168, 0.64) 0%, rgba(240, 120, 32, 0.18) 58%, rgba(123, 63, 191, 0.05) 100%);
  border-color: rgba(240, 120, 32, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 22px rgba(123, 63, 191, 0.16);
}

html.halloween .anniv-cheer-star,
html.halloween .anniv-cheer-eyebrow,
html.halloween .bday-cheer-eyebrow { color: #D85E13; }

html.halloween .bday-bow-svg .bday-loop path,
html.halloween .bday-bow-svg .bday-tail path { fill: #F07820; }
html.halloween .bday-bow-svg .bday-loop-r path { fill: #B4500F; }
html.halloween .bday-bow-svg .bday-knot { fill: #FFE3B3; }

html.halloween .card-flip.has-birthday .card-face.card-front {
  border-color: rgba(240, 120, 32, 0.62);
  box-shadow: 0 10px 30px rgba(61, 30, 92, 0.12), 0 0 0 1px rgba(240, 120, 32, 0.3), 0 0 26px rgba(240, 120, 32, 0.34);
}

html.halloween .firstsight-cta:hover {
  box-shadow: 0 1px 0 rgba(240, 120, 32, 0.08), 0 12px 28px rgba(123, 63, 191, 0.16);
}

html.halloween .firstsight-banner {
  background:
    radial-gradient(circle at 18% 0%, rgba(123, 63, 191, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 92% 110%, rgba(240, 120, 32, 0.16) 0%, transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, #F8F2FB 100%);
  box-shadow: 0 24px 56px rgba(61, 30, 92, 0.12);
}

html.halloween .firstsight-preview-card.after {
  background: radial-gradient(circle at 50% 30%, #FFD9A8 0%, #F28C28 55%, #7A2E05 100%);
  border-color: rgba(240, 120, 32, 0.58);
}

html.halloween .firstsight-preview-card.after .label {
  background: rgba(42, 18, 64, 0.94);
  color: #FFE3B3;
}

html.halloween .firstsight-preview-card.after .silhouette { color: #2A1240; }

/* ===== Fearbook decor. Art lives in assets/halloween/ (Higgsfield, cut out). ===== */
html.halloween .hero-cover { position: relative; }

/* Moving decor never blocks clicks and sits below scrims, popouts, and modals. */
html.halloween .halloween-cobweb,
html.halloween .halloween-bat-flock,
html.halloween .halloween-drop-spider,
html.halloween .halloween-witch {
  position: fixed;
  pointer-events: none;
  user-select: none;
  z-index: 20;
}
html.halloween .halloween-cobweb img,
html.halloween .halloween-spider img,
html.halloween .halloween-drop-spider img,
html.halloween .halloween-witch img,
html.halloween .halloween-bat img { display: block; -webkit-user-drag: none; }

/* Cobweb: pinned to the page's top-right corner (scrolls away, never rides
   over cards) and painted under all page content (z-index -1), so the banner
   button and the photo tiles sit on top of it. Fades out toward bottom-left. */
html.halloween .halloween-cobweb {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(110px, 11vw, 170px);
  opacity: 0.55;
  z-index: -1;
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 0%, #000 34%, rgba(0, 0, 0, 0.55) 56%, transparent 82%);
  mask-image: radial-gradient(circle at 100% 0%, #000 0%, #000 34%, rgba(0, 0, 0, 0.55) 56%, transparent 82%);
}
html.halloween .halloween-cobweb img { width: 100%; height: auto; }

/* Spider hanging in the hero's empty gap (scrolls away with the hero).
   halloween.js measures the gap and sets left + --hs-w; right: 4% is only the
   no-JS-measure fallback. */
html.halloween .halloween-spider {
  position: absolute;
  /* --hs-lift (set by JS) raises the anchor to the purple banner's bottom edge. */
  top: calc(-1 * var(--hs-lift, 0px));
  right: 4%;
  width: var(--hs-w, 60px);
  height: calc(230px + var(--hs-lift, 0px));
  z-index: 2;
  pointer-events: none;
}
html.halloween .halloween-silk {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  margin-left: -0.5px;
  background: rgba(61, 30, 92, 0.42);
  transform-origin: top center;
}
html.halloween .halloween-spider .spider-pendulum {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  will-change: transform;
  /* Clip only above the knot, so the over-long thread never pokes past it;
     legs and shadow keep room on the other three sides. */
  clip-path: inset(0 -60px -60px -60px);
}
/* Thread + spider are ONE rigid unit: .spider-bob carries the body, and the
   thread hangs off its top edge (2px tucked under the body), so the thread end
   stays on the body's top-center at rest and at any swing angle. The thread
   reaches far above the knot and the pendulum clip trims it there. */
html.halloween .halloween-spider {
  --hs-body: 156px;
}
html.halloween .halloween-spider .spider-bob {
  position: absolute;
  left: 0;
  width: 100%;
  top: calc(var(--hs-body) + var(--hs-lift, 0px));
  animation: halloween-spider-bob 6s ease-in-out infinite;
}
html.halloween .halloween-spider .halloween-silk {
  top: auto;
  bottom: calc(100% - 2px);
  height: calc(var(--hs-body) + var(--hs-lift, 0px) + 40px);
}
/* Little web knot where the thread is tied to the banner. */
html.halloween .spider-knot {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #5B2A86;
  /* Hairline lift off the banner edge, not a halo. */
  box-shadow: 0 0 0 1px rgba(250, 244, 255, 0.4);
  z-index: 1;
}
html.halloween .spider-knot::before,
html.halloween .spider-knot::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 14px;
  height: 1px;
  background: rgba(61, 30, 92, 0.45);
}
html.halloween .spider-knot::before { right: 4px; transform: rotate(-24deg); transform-origin: right center; }
html.halloween .spider-knot::after { left: 4px; transform: rotate(24deg); transform-origin: left center; }
html.halloween .halloween-spider img {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 8px rgba(42, 18, 64, 0.22));
}

/* The Games button is styled inline, so it needs !important to recolor. */
html.halloween #ofm-games-fab {
  background: #2A1240 !important;
  border-color: rgba(240, 120, 32, 0.7) !important;
  box-shadow: 0 8px 22px rgba(42, 18, 64, 0.3) !important;
}

/* The horror "F" over the Y of "Yearbook.". Pure CSS, keyed on two html
   classes the inline script at the top of index.html sets (same on/off rule
   as halloween.js, before first paint, so the blue hero never flashes):
   - fearbook-wait: page load only, while the F art or Geist is still
     loading: line 2 stays hidden (never a blue Y). Max 2.5s, then it shows.
   - fearbook-in: art ready. The real "Yearbook." goes transparent (it keeps
     the layout, so the hero proportions never move), ::after paints
     "earbook." at 0.554em, exactly where a typed "Fearbook." puts its e
     (Geist 900, -0.04em tracking, same in Chromium and WebKit; the real
     "Yearbook." puts it at 0.5578em, under 0.3px away), and ::before paints
     the F art.
   f-horror.webp is pre-clipped: the Geist 900 F, drips off both bars and the
   stem, dark outline plus a thin light-orange rim (keeps it off the purple
   "e"). Its box is font units x -40..640, y -40..990 (baseline 710), so
   0.68em x 1.03em, left -0.04em, top 0.08em. The URL must match the preload
   in index.html exactly (swap the art there and here together).
   r8 (Sunny): the F is SLAPPED on, not typeset: bigger than the cap height
   and tilted about its baseline (the vars below), clear of "The OFM",
   "2026" and the "e". r9: 10% bigger, -7deg, lifted so the drip tips clear
   "2026" by 11px (desktop and phone) with ~5.5px under "The OFM" (measured
   on renders, ink to ink). Entrance (1.4s): the purple Y (.fb-yfx, drawn by
   the head script) holds for 300ms, the F drops in from above spinning,
   slams at --fb-impact (560ms) with a squash and a hero-line shake, the Y
   breaks into shards and dust that are gone 500ms after impact (r9). Phones
   fall slower (see the max-width 600px block). */
html.halloween {
  --fb-f-scale: 1.1;
  --fb-f-tilt: -7deg;
  --fb-f-dx: -0.04em;
  --fb-f-dy: calc(0.387rem - 0.138em); /* -3.5px at 70.4px, +0.5px at 41.6px */
  --fb-impact: 0.56s;
}
html.halloween.fearbook-wait h1.hero-title .hero-line-2 { visibility: hidden; }
html.halloween.fearbook-in h1.hero-title .hero-line-2 {
  position: relative;
  color: transparent;
  animation: fearbook-line-shake 0.32s linear var(--fb-impact);
}
html.halloween.fearbook-in h1.hero-title .hero-line-2::after {
  content: 'earbook.';
  content: 'earbook.' / '';
  position: absolute;
  left: 0.554em;
  top: 0;
  color: var(--blue);
  white-space: nowrap;
  pointer-events: none;
}
html.halloween.fearbook-in h1.hero-title .hero-line-2::before {
  content: '';
  content: '' / '';
  position: absolute;
  z-index: 2;
  left: -0.04em;
  top: 0.08em;
  width: 0.68em;
  height: 1.03em;
  background: url(halloween/f-horror.webp?v=6) 0 0 / 100% 100% no-repeat;
  pointer-events: none;
  /* hot red-orange horror glow, tight then wide */
  filter: drop-shadow(0 0 0.02em rgba(255, 120, 40, 0.7)) drop-shadow(0 0 0.08em rgba(225, 45, 20, 0.5));
  transform-origin: 53% 73%;
  transform: translate(var(--fb-f-dx), var(--fb-f-dy)) rotate(var(--fb-f-tilt)) scale(var(--fb-f-scale));
  animation: fearbook-f-drop 1.4s linear both;
}
/* Drop and slap. Hidden while the Y holds (0-300ms), materialises as it
   falls through "The OFM" (accelerating, spinning from -30deg), slams at
   560ms with a squash, rebounds once and is settled by ~780ms. Every
   transform keeps the same translate() rotate() scale() list. */
@keyframes fearbook-f-drop {
  0%, 21% {
    opacity: 0;
    transform: translate(var(--fb-f-dx), -1.9em) rotate(-30deg) scale(var(--fb-f-scale));
    animation-timing-function: cubic-bezier(0.5, 0, 0.95, 0.55);
  }
  29% { opacity: 1; }
  40% {
    transform: translate(var(--fb-f-dx), calc(var(--fb-f-dy) + 0.035em)) rotate(var(--fb-f-tilt)) scale(calc(var(--fb-f-scale) * 1.14), calc(var(--fb-f-scale) * 0.8));
    animation-timing-function: ease-out;
  }
  45% {
    transform: translate(var(--fb-f-dx), calc(var(--fb-f-dy) - 0.03em)) rotate(calc(var(--fb-f-tilt) - 2.5deg)) scale(calc(var(--fb-f-scale) * 0.95), calc(var(--fb-f-scale) * 1.07));
    animation-timing-function: ease-in-out;
  }
  50% { transform: translate(var(--fb-f-dx), var(--fb-f-dy)) rotate(calc(var(--fb-f-tilt) + 1deg)) scale(calc(var(--fb-f-scale) * 1.02), calc(var(--fb-f-scale) * 0.98)); }
  56%, 100% { opacity: 1; transform: translate(var(--fb-f-dx), var(--fb-f-dy)) rotate(var(--fb-f-tilt)) scale(var(--fb-f-scale)); }
}
/* Phones (r9): the same drop, but it falls for 410ms (1.5x) from a little
   closer on a gentler curve, so the F visibly crosses "The OFM" instead of
   jumping it in a frame. Impact at 680ms, settled by ~900ms, the debris
   gone by ~1.2s. The impact effects follow --fb-impact. */
@media (max-width: 600px) {
  html.halloween { --fb-impact: 0.68s; }
  html.halloween.fearbook-in h1.hero-title .hero-line-2::before {
    animation-name: fearbook-f-drop-m;
    animation-duration: 1.5s;
  }
}
@keyframes fearbook-f-drop-m {
  0%, 18% {
    opacity: 0;
    transform: translate(var(--fb-f-dx), -1.8em) rotate(-30deg) scale(var(--fb-f-scale));
    animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6);
  }
  25% { opacity: 1; }
  45.33% {
    transform: translate(var(--fb-f-dx), calc(var(--fb-f-dy) + 0.035em)) rotate(var(--fb-f-tilt)) scale(calc(var(--fb-f-scale) * 1.14), calc(var(--fb-f-scale) * 0.8));
    animation-timing-function: ease-out;
  }
  50% {
    transform: translate(var(--fb-f-dx), calc(var(--fb-f-dy) - 0.03em)) rotate(calc(var(--fb-f-tilt) - 2.5deg)) scale(calc(var(--fb-f-scale) * 0.95), calc(var(--fb-f-scale) * 1.07));
    animation-timing-function: ease-in-out;
  }
  54.67% { transform: translate(var(--fb-f-dx), var(--fb-f-dy)) rotate(calc(var(--fb-f-tilt) + 1deg)) scale(calc(var(--fb-f-scale) * 1.02), calc(var(--fb-f-scale) * 0.98)); }
  60.33%, 100% { opacity: 1; transform: translate(var(--fb-f-dx), var(--fb-f-dy)) rotate(var(--fb-f-tilt)) scale(var(--fb-f-scale)); }
}
/* Impact shake, hero line 2 only (no fill: no transform once it is over). */
@keyframes fearbook-line-shake {
  0% { transform: translate(0, 0); }
  14% { transform: translate(0.012em, 0.045em); }
  30% { transform: translate(-0.016em, -0.014em); }
  46% { transform: translate(0.011em, 0.016em); }
  62% { transform: translate(-0.006em, -0.006em); }
  80% { transform: translate(0.003em, 0.002em); }
  100% { transform: translate(0, 0); }
}
/* The Y and its breakup (injected by the head script, removed after 1.8s).
   .fb-y is the whole Y until impact; each .fb-shard is the same glyph
   clipped to one cell of a jittered grid (the cells tile the Y), shown at
   impact and thrown out and down under gravity (--dx/--dy/--up/--r, in em)
   while it spins and fades. .fb-dust specks add a little crumble. */
html.halloween h1.hero-title .fb-yfx { display: none; }
html.halloween.fearbook-in h1.hero-title .fb-yfx {
  display: block;
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 0.62em;
  height: 0.95em;
  color: var(--blue);
  pointer-events: none;
}
html.halloween.fearbook-in h1.hero-title .fb-yfx i {
  position: absolute;
  inset: 0;
  font-style: normal;
  white-space: nowrap;
}
html.halloween.fearbook-in h1.hero-title .fb-yfx i::before { content: 'Y'; content: 'Y' / ''; }
html.halloween.fearbook-in h1.hero-title .fb-y { animation: fearbook-y-out var(--fb-impact) step-end forwards; }
html.halloween.fearbook-in h1.hero-title .fb-shard,
html.halloween.fearbook-in h1.hero-title .fb-dust {
  opacity: 0;
  animation: fearbook-shard 0.5s linear var(--fb-impact) forwards;
}
html.halloween.fearbook-in h1.hero-title .fb-dust {
  position: absolute;
  border-radius: 1px;
  background: currentColor;
  animation-duration: 0.42s;
}
@keyframes fearbook-y-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
/* Ballistic arc sampled at fifths: x eases out, y = dy*t^2 - 4*up*t*(1-t).
   r9: 500ms (dust 420ms) and fading from 40%, so no shard is still in the
   air near the F once it has settled: the hero ends clean. */
@keyframes fearbook-shard {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  20% { transform: translate(calc(var(--dx) * 0.36), calc(var(--dy) * 0.04 - var(--up) * 0.64)) rotate(calc(var(--r) * 0.2)) scale(0.98); }
  40% { opacity: 1; transform: translate(calc(var(--dx) * 0.64), calc(var(--dy) * 0.16 - var(--up) * 0.96)) rotate(calc(var(--r) * 0.4)) scale(0.95); }
  60% { opacity: 0.7; transform: translate(calc(var(--dx) * 0.84), calc(var(--dy) * 0.36 - var(--up) * 0.96)) rotate(calc(var(--r) * 0.6)) scale(0.92); }
  80% { opacity: 0.3; transform: translate(calc(var(--dx) * 0.96), calc(var(--dy) * 0.64 - var(--up) * 0.64)) rotate(calc(var(--r) * 0.8)) scale(0.88); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(0.85); }
}

/* Bats: one drawing, flapped with a squash-and-stretch wing beat. 3-5 per
   flock, 28-36px each (size set inline), each with a gentle rotate wobble. */
html.halloween .halloween-bat-flock {
  left: -230px;
  width: 210px;
  height: 80px;
  animation: fearbook-flock-right var(--fearbook-flight-time) linear both;
}
/* The lane is viewport-fixed (r8: bats stay on screen while the page
   scrolls; halloween.js picks the band) and clips the flock so its
   off-screen start and finish never add a scrollbar. */
html.halloween .halloween-bat-lane {
  position: fixed;
  left: 0;
  width: 100%;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 20;
}
html.halloween .halloween-bat-lane .halloween-bat-flock { position: absolute; top: 22px; }
html.halloween .halloween-bat-flock.is-reverse {
  left: auto;
  right: -230px;
  animation-name: fearbook-flock-left;
}
html.halloween .halloween-bat {
  position: absolute;
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 3px 5px rgba(42, 18, 64, 0.22));
  animation: fearbook-bat-wobble var(--fearbook-wobble-time, 1.4s) ease-in-out infinite alternate;
}
html.halloween .halloween-bat img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 62%;
  animation: fearbook-bat-flap var(--fearbook-flap-time) ease-in-out infinite alternate;
}
@keyframes fearbook-bat-flap {
  from { transform: scale(1, 1); }
  to { transform: scale(1.12, 0.5); }
}
@keyframes fearbook-bat-wobble {
  from { transform: rotate(-9deg) translateY(-2px); }
  to { transform: rotate(9deg) translateY(2px); }
}

/* Spiders that drop in from the top edge of the screen (or from under the
   phone menu bar), dangle a short way down, and climb back up. Viewport-fixed,
   so a scroll never carries them off. */
html.halloween .halloween-drop-spider {
  top: var(--drop-top, 0px);
  width: var(--drop-w, 32px);
  height: calc(var(--drop-silk, 44px) + var(--drop-w, 32px));
  animation: fearbook-spider-drop var(--fearbook-drop-time) ease-in-out both;
}
html.halloween .halloween-drop-spider .halloween-silk { height: calc(var(--drop-silk, 44px) + 4px); }
html.halloween .halloween-drop-spider img { position: absolute; top: var(--drop-silk, 44px); left: 0; width: 100%; height: auto; }

/* Witch flyover. halloween.js flies her by rAF (a mini-game: touch her and
   she gets spooked, flips and flies back): it sets the outer transform
   (position, bob, tilt) and .witch-body's transform (facing, spook shake,
   flip). The art faces left; JS mirrors .witch-body when she flies right.
   halloween.js picks a top in the open band above the hero headline. */
html.halloween .halloween-witch {
  --witch-w: 165px;
  left: 0;
  width: var(--witch-w);
  will-change: transform;
}
html.halloween .halloween-witch .witch-body { transform-origin: 50% 55%; will-change: transform; }
/* witch.webp is exactly 2x the desktop width, so she stays crisp on retina. */
html.halloween .halloween-witch img { width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(150, 96, 214, 0.38)); }

/* Spook counter (r8): a small pill riding with the witch (a child of her
   outer box, so it never mirrors with her and always stays next to her, not
   left behind on names or text). Hit 1 says "Spooked!", later hits just the
   combo ("x2", "x3"). Light purple fill, thin orange rim, purple type with
   an orange count. Sits above her hat, or under her broom (.is-below) when
   she flies too close to the top of the screen. Each hit restarts the pop. */
html.halloween .witch-combo {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  padding: 4px 10px 5px;
  border-radius: 999px;
  background: rgba(245, 238, 249, 0.94);
  border: 1.5px solid rgba(240, 120, 32, 0.7);
  box-shadow: 0 2px 8px rgba(61, 30, 92, 0.16);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  color: var(--blue-deep);
  transform-origin: 50% 100%;
  animation: witch-combo-pop 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
html.halloween .witch-combo.is-below { bottom: auto; top: calc(100% - 4px); transform-origin: 50% 0; }
html.halloween .witch-combo b { color: var(--orange); font-weight: 900; font-size: 14px; }
@keyframes witch-combo-pop {
  0% { opacity: 0; transform: translateX(-50%) scale(0.55); }
  14% { opacity: 1; transform: translateX(-50%) scale(1.12); }
  28% { transform: translateX(-50%) scale(1); }
  78% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.92); }
}

/* Card-open treat burst (spawned by halloween.js, removed when it finishes). */
.fearbook-burst {
  position: fixed;
  z-index: 10050;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  /* Tight contact shadow + soft lift so sprites stay crisp over photos and
     over the blurred page behind the popout. */
  filter: drop-shadow(0 1px 1px rgba(42, 18, 64, 0.4)) drop-shadow(0 4px 7px rgba(42, 18, 64, 0.32));
}
.fearbook-burst img { display: block; width: 100%; height: auto; }

@keyframes halloween-spider-bob {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(7px); }
}
@keyframes fearbook-flock-right {
  0% { transform: translate3d(0, 12px, 0) rotate(-4deg); opacity: 0; }
  8% { opacity: 1; }
  28% { transform: translate3d(28vw, -18px, 0) rotate(3deg); }
  55% { transform: translate3d(58vw, 16px, 0) rotate(-2deg); }
  78% { transform: translate3d(82vw, -12px, 0) rotate(2deg); }
  100% { transform: translate3d(calc(100vw + 460px), 8px, 0); opacity: 0.9; }
}
@keyframes fearbook-flock-left {
  0% { transform: translate3d(0, 10px, 0) rotate(4deg); opacity: 0; }
  8% { opacity: 1; }
  28% { transform: translate3d(-28vw, -16px, 0) rotate(-3deg); }
  55% { transform: translate3d(-58vw, 18px, 0) rotate(2deg); }
  78% { transform: translate3d(-82vw, -10px, 0) rotate(-2deg); }
  100% { transform: translate3d(calc(-100vw - 460px), 8px, 0); opacity: 0.9; }
}
@keyframes fearbook-spider-drop {
  0%, 100% { transform: translateY(calc(-100% - var(--drop-top, 0px))); opacity: 0; }
  18% { opacity: 1; }
  32%, 66% { transform: translateY(0); opacity: 1; }
  49% { transform: translateY(9px); }
  82% { opacity: 1; }
}
@media (max-width: 480px) {
  /* Two-up cards are ~170px wide here, so the "Cell" label pushed the number
     onto three lines. Drop the label (the aria-label still says Cell) and keep
     the full number on one line. */
  html.halloween .cell-link.cell-pill-row {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
    gap: 0.35rem;
  }
  html.halloween .cell-link.cell-pill-row::before { display: none; }
  html.halloween .halloween-spider { --hs-body: 112px; right: 3vw; width: var(--hs-w, 44px); height: calc(170px + var(--hs-lift, 0px)); }
  html.halloween .halloween-witch { --witch-w: 104px; }
  html.halloween .witch-combo { font-size: 12px; padding: 3px 8px 4px; }
  html.halloween .witch-combo b { font-size: 13px; }
}

@media (max-width: 380px) {
  html.halloween .cell-link.cell-pill-row { font-size: 0.74rem; padding: 0.6rem 0.55rem; gap: 0.25rem; }
  html.halloween .cell-link.cell-pill-row svg { width: 13px; height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html.halloween .halloween-silk,
  html.halloween .halloween-spider .spider-bob,
  html.halloween.fearbook-in h1.hero-title .hero-line-2,
  html.halloween.fearbook-in h1.hero-title .hero-line-2::before { animation: none; }
  html.halloween.fearbook-in h1.hero-title .fb-yfx { display: none; }
  html.halloween .halloween-bat-flock,
  html.halloween .halloween-drop-spider,
  html.halloween .halloween-witch,
  html.halloween .witch-combo { display: none; }
}

@media print {
  html.halloween .halloween-bat-lane,
  html.halloween .halloween-spider,
  html.halloween .halloween-cobweb,
  html.halloween .halloween-bat-flock,
  html.halloween .halloween-drop-spider,
  html.halloween .halloween-witch,
  html.halloween .witch-combo { display: none; }
}

/* Party sign-up notice (Oct 19-30, both modes), sits above the Email Sunny bar.
   Standalone .party-notice, NOT .update-notice: an invitation card, not a second
   copy of the Email Sunny bar. Orange is the party accent in both modes. Button
   fill is #D45F0E (not #F07820) so white 14px type clears 3.8:1; the brand orange
   stays on the medallion, border and halo where it is decorative. */
.party-notice { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; margin: 0 0 1rem; background: rgba(240, 120, 32, 0.08); border: 1px solid rgba(240, 120, 32, 0.42); box-shadow: 0 0 0 4px rgba(240, 120, 32, 0.08); border-radius: 12px; color: var(--navy, #0D1F35); }
.party-notice .party-mark { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(240, 120, 32, 0.16); font-size: 22px; line-height: 1; }
.party-notice .party-body { flex: 1; min-width: 0; }
.party-notice .party-body p { margin: 0; }
.party-notice .party-title { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; text-wrap: balance; }
.party-notice .party-when { margin-top: 4px; font-size: 0.92rem; font-weight: 500; line-height: 1.4; }
.party-notice .party-when b { font-weight: 800; color: #B44E08; }
.party-notice .party-where { white-space: nowrap; }
.party-notice .party-detail { margin-top: 4px; font-size: 0.84rem; color: var(--text, #374151); line-height: 1.45; }
.party-notice .party-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.party-notice .party-flyer, .party-notice .party-cta { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 40px; padding: 0 1.1rem; border-radius: 999px; font-size: 0.88rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background 140ms ease, transform 140ms ease, border-color 140ms ease; }
.party-notice .party-flyer { color: #B44E08; border: 1px solid rgba(240, 120, 32, 0.55); background: transparent; }
.party-notice .party-flyer:hover { background: rgba(240, 120, 32, 0.12); border-color: #F07820; }
.party-notice .party-flyer svg { width: 15px; height: 15px; flex-shrink: 0; }
.party-notice .party-flyer:focus-visible, .party-notice .party-cta:focus-visible { outline: 2px solid #D45F0E; outline-offset: 3px; }
.party-notice .party-cta { color: white; background: #D45F0E; border: 1px solid #D45F0E; }
.party-notice .party-cta:hover { background: #B44E08; border-color: #B44E08; transform: translateY(-1px); }
html.halloween .party-notice { background: rgba(240, 120, 32, 0.12); border-color: rgba(240, 120, 32, 0.55); color: #3D1E5C; }
html.halloween .party-notice .party-mark { background: rgba(240, 120, 32, 0.24); }
html.halloween .party-notice .party-detail { color: #5B2A86; }
body.is-searching .party-notice { display: none; }
@media (max-width: 600px) {
  .party-notice { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .party-notice .party-mark { width: 38px; height: 38px; font-size: 19px; }
  .party-notice .party-body { flex: 1 1 calc(100% - 50px); }
  .party-notice .party-actions { flex-basis: 100%; }
  .party-notice .party-flyer, .party-notice .party-cta { min-height: 44px; }
  .party-notice .party-cta { flex: 1; }
}

.fearbook-countdown { display:flex; flex-wrap:wrap; gap:6px 12px; width:fit-content; max-width:100%; box-sizing:border-box; margin:18px 0 0; padding:8px 13px; border:1px solid var(--blue,#3575a9); border-radius:20px; background:var(--blue-soft,#edf5fc); color:var(--blue-deep,#214a70); font-size:12px; font-weight:700; line-height:1.5; }
.fearbook-countdown a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
html.halloween .fearbook-countdown { color:#5B2A86; background:#F5EEF9; border-color:#F07820; }
.costume-board-btn { text-decoration:none; flex-shrink:0; }
.fearbook-leftovers { display:flex; align-items:flex-end; gap:12px; height:86px; max-width:100%; overflow:hidden; pointer-events:none; user-select:none; }
.fearbook-leftovers > img { width:34px; height:34px; object-fit:contain; transform:rotate(-18deg); }
.sleeping-witch { position:relative; width:96px; height:70px; margin-left:auto; }
.sleeping-witch img { width:82px; height:auto; transform:rotate(18deg); opacity:.65; }
.sleeping-witch small { position:absolute; top:0; right:0; color:#6d7390; }
.dropped-broom { width:36px; height:4px; background:#b28a48; border-radius:3px; transform:rotate(-12deg); margin-bottom:12px; }
.dropped-broom::before { content:""; display:block; width:12px; height:14px; background:repeating-linear-gradient(90deg,#e5c578 0 2px,#b28a48 2px 3px); border-radius:2px 8px 8px 2px; transform:translate(-6px,-5px); }
.fearbook-thanks { padding:16px; border:1px solid #ccd8e5; border-radius:16px; margin:10px 0; background:#f5f8fc; font-size:13px; }
.fearbook-thanks h2 { font-size:18px; margin:0 0 8px; }
.fearbook-thanks button { min-height:44px; padding:8px 16px; border-radius:10px; border:1px solid #ccd8e5; background:white; color:inherit; cursor:pointer; }
.spooky-title-note { margin:6px 0; font-size:12px; color:#5B2A86; }
.witch-board [hidden] { display:none!important; }
/* r15 Witch War: Players / Teams tabs and the team list. Selectors start with
   html.halloween .witch-board so they beat the general board button + li grid. */
html.halloween .witch-board .witch-war-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
html.halloween .witch-board .witch-war-tabs button { flex: 1; min-height: 40px; padding: 8px 12px; border: 1px solid #6E4A86; border-radius: 999px; background: transparent; color: #F5EEF9; }
html.halloween .witch-board .witch-war-tabs button[aria-selected="true"] { border-color: #F07820; background: #FFAB66; color: #301744; }
html.halloween .witch-board .witch-war-panel > p:first-child { margin: 0 0 10px; color: #CDBFD9; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
html.halloween .witch-board ol.witch-team-list li { display: block; margin: 0 0 6px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
html.halloween .witch-board ol.witch-team-list li:first-child { box-shadow: inset 0 0 0 1px #F07820; }
html.halloween .witch-board ol.witch-team-list li strong { display: block; color: #FFAB66; font-size: 15px; font-weight: 900; }
html.halloween .witch-board ol.witch-team-list li p { margin: 2px 0 0; color: #E6DAF0; font-size: 12px; overflow-wrap: anywhere; }
html.halloween .witch-board-actions { flex-wrap: wrap; }
html.halloween .witch-board .witch-board-actions .witch-team-join { flex-basis: 100%; background: transparent; color: #FFAB66; }
