/* ==========================================================================
   UG IN THE BOX · Customer Home Layout
   Design Language: Ref 1 (T-P67) + Apple Inc. Design Standards
   Characteristics: Pure Symmetry, Obsidian Glass, Scaled Typography (+20-30%),
                    Generous Breathing Room, Grounded CTAs, Zero Neon
   Scope: Scoped strictly to .ah-home.tp-home-sanctuary and child components
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System Tokens & Base Container
   -------------------------------------------------------------------------- */
.ah-home.tp-home-sanctuary {
  --tp-max-w: 1180px;
  --tp-radius-card: 20px;
  --tp-radius-subcard: 12px;
  --tp-radius-pill: 980px;

  /* Frosted Glass & Surface Materials (Apple Tactical Titanium, Zero Neon) */
  --tp-glass-bg: linear-gradient(180deg, rgba(28, 31, 40, 0.94) 0%, rgba(20, 22, 28, 0.96) 100%);
  --tp-glass-bg-hover: linear-gradient(180deg, rgba(34, 38, 48, 0.98) 0%, rgba(24, 27, 35, 0.98) 100%);
  --tp-glass-border: rgba(255, 255, 255, 0.16);
  --tp-glass-border-hover: rgba(255, 255, 255, 0.32);
  --tp-blur: blur(24px) saturate(140%);

  /* Authentic Post-Apocalyptic Tactile Palette */
  --tp-chalk: #f2f0e8;
  --tp-muted: #9c9a92;
  --tp-dim: #686660;
  --tp-surface: #121317;
  --tp-surface-card: #15161b;
  --tp-accent: #d4a373;
  --tp-success: #7A9374;

  width: min(var(--tp-max-w), 100%);
  margin-inline: auto;
  padding: 20px var(--tp-gutter, 16px) 64px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .ah-home.tp-home-sanctuary {
    padding: 24px var(--tp-gutter, 20px) 72px;
  }
}

@media (min-width: 768px) {
  .ah-home.tp-home-sanctuary {
    padding: 28px var(--tp-gutter, 24px) 80px;
  }
}

@media (min-width: 1024px) {
  .ah-home.tp-home-sanctuary {
    padding: 36px var(--tp-gutter, 32px) 96px;
  }
}

@media (min-width: 1280px) {
  .ah-home.tp-home-sanctuary {
    padding: 40px var(--tp-gutter, 40px) 112px;
  }
}

/* --------------------------------------------------------------------------
   2. Apple Pure Panoramic Hero Frame & Ref 1 (T-P67) Corner Capsule
   -------------------------------------------------------------------------- */
.tp-hero-section {
  width: 100%;
  margin-bottom: clamp(64px, 8vw, 96px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tp-hero-image-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tp-hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--tp-radius-card);
  border: 1px solid rgba(229, 227, 218, 0.16);
  background: #08090c;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (max-width: 767px) {
  .tp-hero-frame {
    aspect-ratio: 16 / 9;
    min-height: unset;
    border-radius: 18px;
  }
}

.tp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.92) contrast(1.06);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease, filter 0.18s ease;
}

.tp-hero-frame.is-switching .tp-hero-img {
  filter: brightness(1.35) contrast(1.35) saturate(0.4);
}

/* Camera status and switcher live in one card below the unobstructed image. */
.tp-hero-control-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(229, 227, 218, 0.2);
  border-radius: var(--tp-radius-pill);
  background: rgba(10, 11, 14, 0.88);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
  .tp-hero-control-card {
    gap: 8px;
  }
}

.tp-hero-cctv-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--ah-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.tp-hud-left,
.tp-hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--tp-radius-pill);
  border: 1px solid rgba(229, 227, 218, 0.16);
  background: rgba(10, 10, 12, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--tp-chalk);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tp-hud-left {
  min-width: 0;
}

.tp-hud-right {
  flex-shrink: 0;
}

.tp-hud-cam-tag {
  line-height: 1.45;
  padding-block: 1px;
}

.tp-hud-rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d9625b;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tp-hud-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b84a39;
  box-shadow: none;
  animation: tp-blink 1.8s infinite;
}

.tp-radar-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tp-status-success, #7a9374);
  box-shadow: none;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes tp-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Compact segmented camera selector contained by the control card. */
.tp-hero-corner-capsule {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  background: rgba(4, 5, 7, 0.72);
  border: 1px solid rgba(229, 227, 218, 0.18);
  border-radius: var(--tp-radius-pill);
  padding: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tp-cctv-segmented-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.015) 0px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 3px
    ),
    rgba(4, 5, 7, 0.72);
  padding: 3px;
  border-radius: var(--tp-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
}

.ah-customer-system.ah-body .tp-cctv-seg-btn,
.tp-cctv-seg-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 15px;
  border-radius: 980px !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #e5e3da;
  font-family: var(--ah-text, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.16s ease,
              color 0.16s ease,
              border-color 0.16s ease,
              box-shadow 0.16s ease;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Tactical Signal LED Indicator before "กล้อง 0X" */
.ah-customer-system.ah-body .tp-cctv-seg-btn::before,
.tp-cctv-seg-btn::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ah-customer-system.ah-body .tp-cctv-seg-btn:hover,
.tp-cctv-seg-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ah-customer-system.ah-body .tp-cctv-seg-btn:hover::before,
.tp-cctv-seg-btn:hover::before {
  background: rgba(212, 163, 115, 0.85);
  border-color: var(--tp-accent);
  box-shadow: none;
}

.ah-customer-system.ah-body .tp-cctv-seg-btn:active,
.tp-cctv-seg-btn:active {
  transform: scale(0.96);
  transition: transform 0.08s ease-out;
}

.ah-customer-system.ah-body .tp-cctv-seg-btn.is-active,
.tp-cctv-seg-btn.is-active {
  background: linear-gradient(180deg, rgba(52, 56, 68, 0.98) 0%, rgba(28, 30, 38, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 980px !important;
  color: #ffffff !important;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1.5px 0 rgba(212, 163, 115, 0.85) !important;
  font-weight: 600 !important;
}

.ah-customer-system.ah-body .tp-cctv-seg-btn.is-active::before,
.tp-cctv-seg-btn.is-active::before {
  background: var(--tp-status-success, #7a9374);
  border-color: #a9bc9a;
  box-shadow: none;
  animation: tp-blink 1.8s infinite;
}

.tp-corner-capsule-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

.tp-audio-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: var(--tp-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tp-chalk);
  font-family: var(--ah-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
  white-space: nowrap;
}

.tp-audio-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.tp-audio-toggle-btn.is-playing {
  background: rgba(212, 163, 115, 0.2);
  border-color: var(--tp-accent);
  color: var(--tp-accent);
}

/* Keep camera status and all three controls balanced on narrow screens. */
@media (max-width: 767px) {
  .tp-hero-control-card {
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
  }
  .tp-hero-cctv-hud {
    justify-content: space-between;
    gap: 6px;
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }
  .tp-hud-left,
  .tp-hud-right {
    padding: 4px 10px;
    gap: 6px;
  }
  .tp-hud-cam-tag {
    max-width: min(48vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tp-hero-corner-capsule {
    display: flex;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 4px;
    border-radius: 980px !important;
  }
  .tp-cctv-segmented-ctrl {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border-radius: 980px !important;
    box-sizing: border-box;
  }
  .ah-customer-system.ah-body .tp-cctv-seg-btn,
  .tp-cctv-seg-btn {
    flex: 1 1 0 !important;
    width: 33.333% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 4px 6px !important;
    gap: 5px !important;
    border-radius: 980px !important;
    font-family: var(--ah-text, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: -0.01em !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .tp-corner-capsule-divider {
    display: none;
  }
  .tp-audio-toggle-btn {
    display: none;
  }
}

@media (max-width: 360px) {
  .tp-hero-control-card {
    padding: 8px 6px;
    gap: 8px;
    border-radius: 16px;
  }
  .tp-hud-left,
  .tp-hud-right {
    padding: 3px 6px;
    gap: 4px;
    font-size: 9.5px;
  }
  .tp-hud-cam-tag {
    max-width: 100px;
  }
  .ah-customer-system.ah-body .tp-cctv-seg-btn,
  .tp-cctv-seg-btn {
    font-size: 11px !important;
    padding: 4px 2px !important;
    gap: 3px !important;
  }
  .ah-customer-system.ah-body .tp-cctv-seg-btn::before,
  .tp-cctv-seg-btn::before {
    width: 5px;
    height: 5px;
  }
}

/* --------------------------------------------------------------------------
   3. Symmetrical Apple Metrics Ribbon (Ref 2/3: 3 Balanced Columns)
   -------------------------------------------------------------------------- */
.tp-metrics-ribbon {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  background: var(--tp-glass-bg);
  backdrop-filter: var(--tp-blur);
  border: 1px solid var(--tp-glass-border);
  border-radius: var(--tp-radius-card);
  padding: clamp(24px, 3.5vw, 36px) clamp(20px, 4vw, 48px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.tp-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.tp-metric-num {
  font-family: var(--ah-display);
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tp-chalk);
}

.tp-metric-plus {
  color: var(--tp-accent);
  font-size: 0.85em;
  margin-left: 2px;
}

.tp-metric-label {
  font-family: var(--ah-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--tp-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.tp-metric-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 640px) {
  .tp-metrics-ribbon {
    padding: 18px 12px;
    gap: 2px;
  }
  .tp-metric-num {
    font-size: clamp(22px, 6vw, 26px);
  }
  .tp-metric-label {
    font-size: 10.5px;
    letter-spacing: 0.01em;
    line-height: 1.45;
  }
  .tp-metric-divider {
    height: 28px;
  }
}

/* --------------------------------------------------------------------------
   4. Symmetrical Editorial Story & Manifesto
   -------------------------------------------------------------------------- */
.tp-story-section {
  width: 100%;
  margin-bottom: clamp(64px, 8vw, 96px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 36px);
}

.tp-story-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  background: var(--tp-glass-bg);
  backdrop-filter: var(--tp-blur);
  border: 1px solid var(--tp-glass-border);
  border-radius: var(--tp-radius-card);
  padding: clamp(32px, 5vw, 52px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

/* Card 2: Reversed sequence on Desktop (Visual Left, Content Right) */
.tp-story-card.tp-story-card--reversed {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

@media (max-width: 767px) {
  .tp-story-card,
  .tp-story-card.tp-story-card--reversed {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px;
  }
}

@media (max-width: 639px) {
  .tp-story-card,
  .tp-story-card.tp-story-card--reversed {
    padding: 16px 14px 20px;
    gap: 16px;
  }
}

.tp-story-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 640px) {
  .tp-story-content {
    gap: 16px;
  }
}

.tp-story-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ah-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--tp-muted);
  text-transform: uppercase;
}

.tp-story-title {
  margin: 0;
  font-family: var(--ah-display);
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--tp-chalk);
  text-wrap: balance;
}

.tp-story-desc {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 17.5px);
  line-height: 1.72;
  color: var(--tp-muted);
}

.tp-story-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 8px;
}

.tp-story-note {
  font-family: var(--ah-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--tp-dim);
  letter-spacing: 0.01em;
}

@media (max-width: 640px) {
  .tp-story-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
  }
  .tp-story-note {
    text-align: center;
    font-size: 11.5px;
  }
}

.tp-story-visual {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tp-story-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--tp-radius-subcard);
  overflow: hidden;
  border: 1px solid var(--tp-glass-border);
  background: #08090c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
  .tp-story-visual {
    order: -1;
    width: 100%;
  }

  .tp-story-image-frame {
    border-radius: var(--tp-radius-subcard, 14px);
  }
}

.tp-story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.96) contrast(1.05);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.tp-story-card:hover .tp-story-img {
  transform: scale(1.02);
  filter: brightness(1.02) contrast(1.08);
}

.tp-story-caption {
  position: static;
  display: inline-flex;
  max-width: 100%;
  padding: 5px 12px;
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(12px);
  border-radius: var(--tp-radius-pill);
  border: 1px solid rgba(229, 227, 218, 0.16);
  font-family: var(--ah-mono);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--tp-chalk);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.tp-story-caption[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .tp-story-caption {
    padding: 4px 10px;
    font-size: 10.5px;
  }
}

/* --------------------------------------------------------------------------
   5. Section Headers & Universal Grounded Buttons
   -------------------------------------------------------------------------- */
.tp-hero-section,
.tp-story-section,
.tp-content-section {
  width: 100%;
  margin-bottom: clamp(64px, 8vw, 96px);
  scroll-margin-top: 88px;
}

.tp-section-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--tp-glass-border);
  gap: 16px;
}

/* Cyberpunk Tactical Telemetry Rule Node */
.tp-section-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 42px;
  height: 2px;
  background: var(--tp-accent);
  opacity: 0.75;
}

.tp-section-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tp-section-eyebrow {
  font-family: var(--ah-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--tp-muted);
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.tp-section-title {
  margin: 0;
  font-family: var(--ah-display);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tp-chalk);
  line-height: 1.35;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
  text-wrap: balance;
}

.tp-cta-btn,
.tp-section-link,
.tp-cctv-seg-btn,
.tp-dock-cta-btn,
.tp-card-variant-pill,
.tp-catalogue-heart {
  touch-action: manipulation;
}

.tp-cta-btn:focus-visible,
.tp-section-link:focus-visible,
.tp-cctv-seg-btn:focus-visible,
.tp-dock-cta-btn:focus-visible,
.tp-card-variant-pill:focus-visible,
.tp-catalogue-heart:focus-visible,
.tp-stacked-event-title a:focus-visible,
.tp-dispatch-link:focus-visible,
.tp-artist-bento-link:focus-visible {
  outline: 2px solid var(--tp-chalk, #f2f0e8);
  outline-offset: 3px;
}

.tp-section-title--brand {
  font-size: clamp(16px, 3vw, 36px);
  white-space: nowrap;
}

.tp-section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ah-text, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--tp-chalk, #f2f0e8);
  text-decoration: none;
  padding: 8px 18px;
  min-height: 44px;
  border-radius: var(--tp-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.18s ease,
              color 0.18s ease,
              border-color 0.18s ease,
              box-shadow 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.tp-section-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.40);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.tp-section-link:active {
  transform: scale(0.97);
  transition: transform 0.08s ease-out;
}

/* Universal Grounded CTA Buttons (Tactile Apple Capsule) */
.tp-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 28px;
  border-radius: var(--tp-radius-pill);
  font-family: var(--ah-text, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  background: #f2f0e8;
  color: #08090c;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.18s ease,
              color 0.18s ease,
              box-shadow 0.18s ease,
              border-color 0.18s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.tp-cta-btn:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-1.5px) scale(1.015);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 16px 36px rgba(242, 240, 232, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.tp-cta-btn:active {
  transform: scale(0.97);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.08s ease-out;
}

/* Explicit Primary Variant */
.tp-cta-btn--primary {
  background: #f2f0e8;
  color: #08090c;
}

/* Secondary CTA (Apple Frosted Glass Capsule) */
.tp-cta-btn--secondary {
  background: rgba(255, 255, 255, 0.10);
  color: #f2f0e8;
  border: 1px solid rgba(255, 255, 255, 0.26);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.tp-cta-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1.5px) scale(1.015);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.tp-cta-btn--secondary:active {
  transform: scale(0.97);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s ease-out;
}

.tp-btn-arrow {
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.tp-cta-btn:hover .tp-btn-arrow,
.tp-section-link:hover .tp-btn-arrow {
  transform: translate(2px, -2px);
}

@media (max-width: 640px) {
  .tp-section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .tp-section-header-left {
    width: 100%;
  }

  .tp-section-title--brand {
    font-size: clamp(16px, 5.5vw, 24px);
  }

  .tp-section-link {
    align-self: flex-start;
  }

  .tp-cta-btn {
    width: 100%;
    min-height: 48px;
  }
}

/* --------------------------------------------------------------------------
   6. Events Transmissions: Stacked Horizontal Layers (Apple Split Architecture)
   -------------------------------------------------------------------------- */
.tp-events-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.tp-stacked-event-card {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  background: linear-gradient(180deg, #1e212b 0%, #14161e 100%);
  backdrop-filter: var(--tp-blur);
  -webkit-backdrop-filter: var(--tp-blur);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--tp-radius-card);
  padding: clamp(20px, 2.5vw, 28px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.24s ease,
              box-shadow 0.28s ease;
  position: relative;
  overflow: hidden;
}

.tp-stacked-event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.tp-stacked-event-card.is-lead-event {
  border-color: rgba(212, 163, 115, 0.45);
  background: linear-gradient(135deg, #222633 0%, #151720 100%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tp-stacked-event-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 372.67 / 208.75;
  border-radius: var(--tp-radius-subcard);
  overflow: hidden;
  border: 1px solid var(--tp-glass-border);
  background: #0a0b0e;
}

.tp-stacked-event-visual.has-homepage-image {
  border-color: rgba(229, 227, 218, 0.18);
  border-radius: clamp(14px, 1.5vw, 20px);
  background: #0a0b0e;
}

.tp-stacked-event-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  overflow: hidden;
}

.tp-stacked-event-backdrop-blur {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(28px) brightness(0.38) saturate(140%);
  transform: scale(1.08);
  pointer-events: none;
  z-index: 1;
}

.tp-stacked-event-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.6) 100%);
  box-sizing: border-box;
  padding: 8px;
}

.tp-stacked-event-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tp-stacked-event-stage.is-homepage-image { padding: 0; background: #0a0b0e; }
.tp-stacked-event-stage.is-homepage-image .tp-stacked-event-img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

.tp-stacked-event-card.has-homepage-image::after,
.tp-stacked-event-visual.has-homepage-image .tp-stacked-event-backdrop-blur,
.tp-stacked-event-visual.has-homepage-image .ah-cctv-noise {
  display: none;
}

.tp-stacked-event-card.has-homepage-image .tp-stacked-event-link:focus-visible {
  outline: 3px solid var(--tp-accent);
  outline-offset: -4px;
  border-radius: clamp(14px, 1.5vw, 20px);
}

.tp-stacked-event-card:hover .tp-stacked-event-img {
  transform: scale(1.03);
}

.tp-stacked-event-card.has-homepage-image:hover .tp-stacked-event-img {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .tp-stacked-event-card.has-homepage-image,
  .tp-stacked-event-card.has-homepage-image .tp-stacked-event-img {
    transition: none;
  }

  .tp-stacked-event-card.has-homepage-image:hover {
    transform: none;
  }
}

.tp-poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #14151a;
  color: var(--tp-muted);
  font-family: var(--ah-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tp-stacked-date-capsule {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--tp-chalk);
  font-family: var(--ah-mono);
  line-height: 1.1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.tp-stacked-date-day {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.tp-stacked-date-month {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tp-accent);
}

.tp-stacked-badge-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--tp-radius-pill);
  font-family: var(--ah-mono);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  background: rgba(10, 10, 12, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--tp-chalk);
  pointer-events: none;
}

.tp-stacked-event-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

body.ah-customer-system .ah-main .ah-home.tp-home-sanctuary .tp-stacked-event-body {
  background: rgba(18, 19, 23, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-color: rgba(229, 227, 218, 0.12);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tp-stacked-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tp-stacked-tag-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tp-stacked-type-tag {
  font-family: var(--ah-mono);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--tp-muted);
  text-transform: uppercase;
}

.tp-stacked-lead-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--tp-radius-pill);
  font-family: var(--ah-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  background: rgba(212, 163, 115, 0.16);
  color: var(--tp-accent);
  border: 1px solid rgba(212, 163, 115, 0.35);
}

.tp-stacked-status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--tp-radius-pill);
  font-family: var(--ah-mono);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  background: rgba(96, 179, 120, 0.15);
  color: var(--tp-success);
  border: 1px solid rgba(96, 179, 120, 0.3);
  font-weight: 600;
}

.tp-stacked-event-title {
  margin: 0;
  font-family: var(--ah-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.01em;
}

.tp-stacked-event-title a {
  color: var(--tp-chalk);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tp-stacked-event-title a:hover {
  color: #ffffff;
}

.tp-stacked-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--tp-glass-border);
  border-radius: 16px;
}

.tp-fact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tp-fact-label {
  font-family: var(--ah-mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--tp-dim);
  text-transform: uppercase;
}

.tp-fact-val {
  font-family: var(--ah-mono);
  font-size: 13.5px;
  line-height: 1.45;
  padding-block: 2px;
  color: var(--tp-chalk);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-fact-val--price {
  color: var(--tp-accent);
  font-variant-numeric: tabular-nums;
}

.tp-lineup-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tp-lineup-label {
  font-family: var(--ah-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--tp-dim);
}

.tp-lineup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tp-lineup-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--tp-radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tp-glass-border);
  font-family: var(--ah-mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--tp-muted);
}

.tp-lineup-tag.is-more {
  color: var(--tp-accent);
  border-color: rgba(212, 163, 115, 0.3);
}

.tp-stacked-event-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tp-stacked-event-actions .tp-cta-btn {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 767px) {
  .tp-stacked-event-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 16px;
    border-radius: var(--tp-radius-card, 20px);
  }
  .tp-stacked-event-visual {
    aspect-ratio: 16 / 9;
  }
  .tp-stacked-facts-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .tp-fact-val {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 639px) {
  .tp-stacked-event-card {
    padding: 14px;
    border-radius: var(--tp-radius-subcard, 14px);
  }
  .tp-stacked-event-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .tp-stacked-event-actions .tp-cta-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: var(--tp-tap-target, 44px) !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 12px 14px !important;
    font-size: 13.5px !important;
    box-sizing: border-box !important;
  }
}

/* --------------------------------------------------------------------------
   7. Physical Drops / Shop Showcase (Symmetrical Apple Cards)
   -------------------------------------------------------------------------- */
.tp-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.tp-shop-empty-state {
  grid-column: 1 / -1;
}

@media (max-width: 1279px) {
  .tp-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 1023px) {
  .tp-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 639px) {
  .tp-shop-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

/* Product grid: consistent card rhythm with a compact, responsive storefront. */
.ah-home.tp-home-sanctuary .tp-shop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(14px, 2vw, 22px);
}



.tp-shop-card {
  position: relative;
  background: linear-gradient(180deg, #1e212b 0%, #14161e 100%);
  backdrop-filter: var(--tp-blur);
  -webkit-backdrop-filter: var(--tp-blur);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--tp-radius-card);
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}

.ah-home.tp-home-sanctuary .tp-shop-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: var(--tp-radius-card);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}

.tp-shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.ah-home.tp-home-sanctuary .tp-shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.75),
    0 6px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ah-home.tp-home-sanctuary .tp-shop-card:focus-within {
  border-color: var(--tp-glass-border-hover);
  outline: 2px solid var(--tp-chalk);
  outline-offset: 3px;
}

.tp-shop-link-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.ah-home.tp-home-sanctuary .tp-shop-link-wrap {
  flex: 1;
  min-width: 0;
}

.tp-shop-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0d0e12;
}

.ah-home.tp-home-sanctuary .tp-shop-image-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.16));
  box-shadow: inset 0 0 34px 4px rgba(0, 0, 0, 0.52);
}

.tp-shop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tp-shop-card:hover .tp-shop-img {
  transform: scale(1.04);
}

.tp-shop-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0;
  border: 0;
  font-family: var(--ah-mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--tp-chalk);
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.tp-shop-body {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.ah-home.tp-home-sanctuary .tp-shop-body {
  min-height: 124px;
  align-items: stretch;
  padding: 16px 20px 18px;
}

.tp-shop-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ah-home.tp-home-sanctuary .tp-shop-meta {
  width: 100%;
}

.tp-shop-cat {
  font-family: var(--ah-mono);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--tp-dim);
  text-transform: uppercase;
}

.tp-shop-title {
  margin: 0;
  font-family: var(--ah-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.42;
  padding-block: 2px;
  color: var(--tp-chalk);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ah-home.tp-home-sanctuary .tp-shop-title {
  display: -webkit-box;
  min-height: calc(1.42em * 2);
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.tp-shop-price {
  font-family: var(--ah-mono);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--tp-accent);
}

.ah-home.tp-home-sanctuary .tp-shop-price {
  margin-top: auto;
  padding-top: 4px;
}

/* Grounded Symmetrical RE4 Quick-Add Action Dock */
.tp-shop-card-dock {
  padding: 0 16px 16px;
  margin-top: -4px;
}

.ah-home.tp-home-sanctuary .tp-shop-card-dock {
  margin-top: auto;
  padding: 0;
  border-top: 1px solid var(--tp-glass-border);
}

.tp-shop-quick-add-form {
  width: 100%;
}

.tp-shop-quick-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--tp-radius-subcard, 16px);
  background: linear-gradient(180deg, #2a2d39 0%, #1c1e27 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--tp-chalk, #f2f0e8);
  font-family: var(--ah-display, "Anuphan", sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.tp-shop-quick-add-btn:hover {
  background: linear-gradient(180deg, #363a49 0%, #242732 100%);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tp-shop-quick-add-btn:active {
  transform: scale(0.97);
}

.tp-shop-quick-add-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.tp-shop-quick-add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn {
  min-height: 52px;
  border: 0;
  border-radius: 0;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn:not(.tp-shop-quick-add-btn--link) {
  color: var(--tp-chalk);
  background: var(--tp-surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn:not(.tp-shop-quick-add-btn--link):hover:not(:disabled) {
  color: var(--tp-chalk);
  background: var(--tp-glass-bg-hover);
  box-shadow: inset 0 1px 0 rgba(212, 163, 115, 0.28);
  transform: none;
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn--link {
  color: var(--tp-muted);
  background: transparent;
  box-shadow: none;
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn--link:hover {
  color: var(--tp-chalk);
  background: var(--tp-glass-bg-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: none;
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn:active {
  transform: none;
}

.ah-home.tp-home-sanctuary .tp-shop-quick-add-btn:focus-visible,
.ah-home.tp-home-sanctuary .tp-shop-link-wrap:focus-visible {
  outline: 2px solid var(--tp-chalk, #f2f0e8);
  outline-offset: -2px;
}

@media (max-width: 1279px) {
  .ah-home.tp-home-sanctuary :is(.tp-shop-grid, .tp-merch-grid) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .ah-home.tp-home-sanctuary :is(.tp-shop-grid, .tp-merch-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .ah-home.tp-home-sanctuary :is(.tp-shop-grid, .tp-merch-grid) {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .ah-home.tp-home-sanctuary .tp-shop-body {
    min-height: 118px;
    padding: 14px;
  }

  .ah-home.tp-home-sanctuary .tp-shop-quick-add-btn {
    gap: 6px;
    padding: 12px 14px;
    min-height: var(--tp-tap-target, 44px);
    font-size: 13px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ah-home.tp-home-sanctuary .tp-shop-card,
  .ah-home.tp-home-sanctuary .tp-shop-img,
  .ah-home.tp-home-sanctuary .tp-shop-quick-add-btn {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   8. Visual Archive / Portfolio Grid with Lightbox
   -------------------------------------------------------------------------- */
.tp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1023px) {
  .tp-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 639px) {
  .tp-gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .tp-gallery-viewport {
    aspect-ratio: 16 / 10;
  }
}

.tp-gallery-card {
  margin: 0;
  background: var(--tp-glass-bg);
  backdrop-filter: var(--tp-blur);
  border: 1px solid var(--tp-glass-border);
  border-radius: var(--tp-radius-card);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.24s ease;
}

.tp-gallery-card:hover {
  transform: translateY(-3px);
  border-color: var(--tp-glass-border-hover);
}

.tp-gallery-open {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tp-gallery-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0d0e12;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ambient Blurred Backdrop Layer (Apple TV / Digital Luxury Frame) */
.tp-gallery-backdrop-blur {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(28px) brightness(0.55) saturate(140%);
  opacity: 0.8;
  transform: scale(1.1);
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

/* Centered Stage for Main Image */
.tp-gallery-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.tp-gallery-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tp-gallery-card:hover .tp-gallery-img {
  transform: scale(1.03);
}

.tp-gallery-card:hover .tp-gallery-backdrop-blur {
  opacity: 0.95;
  filter: blur(22px) brightness(0.65) saturate(160%);
}

.tp-gallery-reticle {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 3;
}

.tp-reticle-tl,
.tp-reticle-br {
  position: absolute;
  font-family: var(--ah-mono);
  font-size: 15px;
  color: var(--tp-muted);
}

.tp-reticle-tl { top: 0; left: 0; }
.tp-reticle-br { bottom: 0; right: 0; }

.tp-gallery-footer {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tp-gallery-title {
  margin: 0;
  font-family: var(--ah-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--tp-chalk);
}

.tp-gallery-desc {
  margin: 0;
  font-size: 14px;
  color: var(--tp-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   9. The Dispatch / Articles Grid
   -------------------------------------------------------------------------- */
.tp-dispatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 767px) {
  .tp-dispatch-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.tp-dispatch-card {
  position: relative;
  overflow: hidden;
  background: var(--tp-glass-bg);
  backdrop-filter: var(--tp-blur);
  border: 1px solid var(--tp-glass-border);
  border-radius: var(--tp-radius-subcard);
  transition: background-color 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

.tp-dispatch-card:hover {
  background: var(--tp-glass-bg-hover);
  border-color: var(--tp-glass-border-hover);
  transform: translateY(-2px);
}

.tp-dispatch-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
}

.tp-dispatch-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ah-mono);
  font-size: 12px;
  line-height: 1.45;
}

.tp-dispatch-date {
  color: var(--tp-dim);
}

.tp-dispatch-tag {
  color: var(--tp-muted);
  letter-spacing: 0.02em;
}

.tp-dispatch-title {
  margin: 0;
  font-family: var(--ah-display);
  font-size: 17.5px;
  font-weight: 700;
  color: var(--tp-chalk);
  line-height: 1.42;
  letter-spacing: -0.005em;
}

.tp-dispatch-arrow {
  font-family: var(--ah-text, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--tp-accent, #d4a373);
  align-self: flex-start;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  -webkit-font-smoothing: antialiased;
}

.tp-dispatch-link:hover .tp-dispatch-arrow {
  transform: translate(2px, -2px);
  color: #f2f0e8;
}

/* --------------------------------------------------------------------------
   10. Bunker Intelligence / Club Operations Card
   -------------------------------------------------------------------------- */
.tp-intel-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  background: var(--tp-glass-bg);
  backdrop-filter: var(--tp-blur);
  border: 1px solid var(--tp-glass-border);
  border-radius: var(--tp-radius-card);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1023px) {
  .tp-intel-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .tp-intel-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .tp-intel-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px;
  }
  .tp-intel-col:last-child {
    grid-column: auto;
  }
}

.tp-intel-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tp-intel-tag {
  font-family: var(--ah-mono);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--tp-muted);
  text-transform: uppercase;
}

.tp-intel-heading {
  margin: 0;
  font-family: var(--ah-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.005em;
  color: var(--tp-chalk);
}

.tp-intel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--ah-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tp-muted);
}

.tp-intel-list.is-rules li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tp-intel-bullet {
  color: var(--tp-accent);
}

.tp-intel-geo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--ah-mono);
  font-size: 13.5px;
  line-height: 1.5;
}

.tp-intel-geo-addr {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
  color: var(--tp-chalk);
}

.tp-intel-geo-coord {
  margin: 0;
  color: var(--tp-dim);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.tp-intel-geo-badge {
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: var(--tp-radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tp-glass-border);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--tp-muted);
}

.tp-intel-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--tp-radius-pill);
  border: 1px solid rgba(212, 163, 115, 0.35);
  background: rgba(212, 163, 115, 0.08);
  font-family: var(--ah-mono, "JetBrains Mono", monospace);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tp-accent);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
}

.tp-intel-map-link:hover {
  background: rgba(212, 163, 115, 0.2);
  border-color: rgba(212, 163, 115, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   10b. Cyberpunk Bunker HUD Corner L-Brackets (Zero-DOM Hardware Framing)
   -------------------------------------------------------------------------- */
.tp-metrics-ribbon::after,
.tp-story-card::after,
.tp-stacked-event-card::after,
.tp-intel-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  z-index: 4;
  background:
    linear-gradient(to right, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 0 0 / 12px 12px no-repeat,
    linear-gradient(to bottom, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 0 0 / 12px 12px no-repeat,
    linear-gradient(to left, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 100% 0 / 12px 12px no-repeat,
    linear-gradient(to bottom, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 100% 0 / 12px 12px no-repeat,
    linear-gradient(to right, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 0 100% / 12px 12px no-repeat,
    linear-gradient(to top, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 0 100% / 12px 12px no-repeat,
    linear-gradient(to left, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 100% 100% / 12px 12px no-repeat,
    linear-gradient(to top, rgba(229, 227, 218, 0.22) 1.5px, transparent 1.5px) 100% 100% / 12px 12px no-repeat;
  opacity: 0.72;
  transition: opacity 0.28s ease;
}

.tp-stacked-event-card:hover::after,
.tp-story-card:hover::after,
.tp-intel-card:hover::after {
  opacity: 1;
  background:
    linear-gradient(to right, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 0 0 / 12px 12px no-repeat,
    linear-gradient(to bottom, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 0 0 / 12px 12px no-repeat,
    linear-gradient(to left, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 100% 0 / 12px 12px no-repeat,
    linear-gradient(to bottom, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 100% 0 / 12px 12px no-repeat,
    linear-gradient(to right, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 0 100% / 12px 12px no-repeat,
    linear-gradient(to top, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 0 100% / 12px 12px no-repeat,
    linear-gradient(to left, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 100% 100% / 12px 12px no-repeat,
    linear-gradient(to top, rgba(212, 163, 115, 0.5) 1.5px, transparent 1.5px) 100% 100% / 12px 12px no-repeat;
}

/* --------------------------------------------------------------------------
   11. Closing Sign-Off & Empty State
   -------------------------------------------------------------------------- */
.ah-closing {
  text-align: center;
  font-family: var(--ah-mono);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--tp-dim);
  text-transform: uppercase;
  margin: 64px 0 32px;
}

/* Sponsor banner inside the shared footer. */
.ah-footer-sponsor-strip {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 4px;
  padding: 0 0 clamp(20px, 3vw, 28px);
  box-sizing: border-box;
}

.ah-footer-sponsor-panel {
  width: min(855px, 100%);
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

.ah-footer-sponsor-panel h2 { display: none; }

.ah-footer-sponsor-panel img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

@media (max-width: 767px) {
  .ah-footer-sponsor-strip { padding-bottom: 18px; }
}

.tp-empty-box {
  padding: 36px 24px;
  text-align: center;
  background: var(--tp-glass-bg);
  backdrop-filter: var(--tp-blur);
  border: 1px solid var(--tp-glass-border);
  border-radius: var(--tp-radius-card);
  color: var(--tp-muted);
  font-family: var(--ah-mono);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* --------------------------------------------------------------------------
   12. Original Full Footer Polishing (.ah-footer)
   Full-Bleed 100% Solid Pitch Black Edge-to-Edge
   -------------------------------------------------------------------------- */
.ah-customer-system .ah-footer {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: clamp(64px, 8vw, 96px) 0 0 !important;
  box-sizing: border-box !important;
  padding: clamp(48px, 6vw, 64px) 0 clamp(48px, 6vw, 64px) !important;
  border-radius: 0 !important;
  background: #000000 !important;
  border-top: 1px solid rgba(229, 227, 218, 0.12) !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
}

.ah-customer-system .ah-footer:hover {
  border-top-color: rgba(229, 227, 218, 0.22) !important;
  box-shadow: none !important;
}

.ah-customer-system .ah-footer-container {
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
  box-sizing: border-box;
}

@media (max-width: 1023px) {
  .ah-customer-system .ah-footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 16px)) !important;
  }
}

@media (max-width: 767px) {
  .ah-customer-system .ah-footer {
    width: 100% !important;
    padding: 36px 0 calc(96px + env(safe-area-inset-bottom, 16px)) !important;
    border-radius: 0 !important;
    margin-top: 48px !important;
    margin-bottom: 0 !important;
  }

  .ah-customer-system .ah-footer-container {
    width: calc(100% - 32px);
  }
}

/* ==========================================================================
   RESIDENT EVIL EASTER EGG: 67 CLICKS JUMPSCARE & 10-SEC HORROR THEME
   100% Procedural & Commercial-Safe Tactical Biohazard Distortion
   ========================================================================== */

/* 1. Tension Build-up Jitters (Clicks 60-66) */
.re-tension-stage-1 {
  animation: reTensionShake1 0.22s infinite ease-in-out !important;
}

.re-tension-stage-2 {
  animation: reTensionShake2 0.12s infinite ease-in-out !important;
  filter: contrast(120%) sepia(35%) hue-rotate(-30deg) !important;
}

@keyframes reTensionShake1 {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

@keyframes reTensionShake2 {
  0% { transform: translate(0, 0) scale(1); }
  20% { transform: translate(-3px, 2px) scale(1.006); }
  40% { transform: translate(2.5px, -2px) scale(0.998); }
  60% { transform: translate(-2px, -2.5px) scale(1.004); }
  80% { transform: translate(3px, 1.5px) scale(1); }
  100% { transform: translate(0, 0) scale(1); }
}

/* 2. JumpScare Fullscreen Overlay (#re-jumpscare-overlay) */
.re-jumpscare-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.08s linear;
}

.re-jumpscare-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.re-jumpscare-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(230, 20, 20, 0.32) 0%, rgba(8, 1, 1, 0.98) 78%);
  z-index: 1;
}

.re-jumpscare-noise {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0px, rgba(0, 0, 0, 0.35) 2px, transparent 2px, transparent 4px);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
  animation: reScanlineScroll 0.25s steps(4) infinite;
}

@keyframes reScanlineScroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 8px; }
}

.re-jumpscare-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}

.re-jumpscare-overlay.is-active .re-jumpscare-flash {
  animation: reFlashStrobe 1.2s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes reFlashStrobe {
  0% { opacity: 0.95; background: #ffffff; }
  10% { opacity: 0.7; background: #ff0000; }
  25% { opacity: 0.85; background: #ffffff; }
  40% { opacity: 0.4; background: #aa0000; }
  60% { opacity: 0.6; background: #000000; }
  85% { opacity: 0.2; background: #ff2200; }
  100% { opacity: 0; }
}

/* 3. Bio-Weapon Entity Artwork Wrap */
.re-jumpscare-entity-wrap {
  position: relative;
  z-index: 4;
  width: min(720px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}

.re-jumpscare-overlay.is-active .re-jumpscare-entity-wrap {
  animation: reEntityJump 1.2s cubic-bezier(0.12, 0.95, 0.2, 1) forwards;
}

.re-jumpscare-overlay.is-settled .re-jumpscare-entity-wrap {
  opacity: 0.16;
  transform: scale(0.92);
  filter: blur(4px);
  transition: opacity 1.2s ease, transform 1.2s ease, filter 1.2s ease;
}

@keyframes reEntityJump {
  0% {
    transform: scale(0.3) rotate(-4deg);
    filter: invert(1) contrast(300%) drop-shadow(0 0 40px #ff0000);
    opacity: 0;
  }
  15% {
    transform: scale(1.22) rotate(2deg);
    filter: invert(0) contrast(200%) drop-shadow(0 0 60px #ff0000);
    opacity: 1;
  }
  28% {
    transform: scale(1.08) translate(-6px, 4px) rotate(-1deg);
    filter: invert(1) contrast(280%);
  }
  42% {
    transform: scale(1.15) translate(5px, -3px) rotate(1deg);
    filter: invert(0) contrast(190%) drop-shadow(0 0 50px #880000);
  }
  65% {
    transform: scale(1.04) translate(-3px, -2px) rotate(0deg);
    filter: invert(0) contrast(150%);
  }
  85% {
    transform: scale(1.02) translate(2px, 1px);
    filter: invert(0) contrast(120%);
  }
  100% {
    transform: scale(1) translate(0, 0);
    filter: invert(0) contrast(100%);
    opacity: 1;
  }
}

.re-jumpscare-entity-svg {
  width: 100%;
  height: auto;
  max-height: 65vh;
  filter: drop-shadow(0 0 35px rgba(255, 0, 0, 0.65));
}

.re-jumpscare-telemetry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  text-align: center;
}

.re-telemetry-alert {
  font-family: var(--ah-mono);
  font-size: clamp(14px, 2.2vw, 19px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ff2222;
  text-shadow: 0 0 16px rgba(255, 0, 0, 0.85), 2px 2px 0px rgba(0, 0, 0, 0.95);
  animation: reTextFlicker 0.3s infinite alternate;
}

.re-telemetry-sub {
  font-family: var(--ah-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #d1b8b8;
  opacity: 0.85;
}

@keyframes reTextFlicker {
  0% { opacity: 0.75; transform: scale(0.995); }
  100% { opacity: 1; transform: scale(1.005); }
}

/* 4. Fullscreen 10-Second Horror Theme (.re-horror-active) */
body.re-horror-active {
  background-color: #0c0202 !important;
  transition: background-color 0.4s ease;
}

/* Redout & CRT static pseudo-overlay */
body.re-horror-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(160, 10, 10, 0.18) 0%, rgba(10, 2, 2, 0.94) 85%),
              repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0px, rgba(0, 0, 0, 0.28) 2px, transparent 2px, transparent 4px);
  mix-blend-mode: multiply;
  animation: reGlitchJitter 0.16s infinite;
}

@keyframes reGlitchJitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1.5px, -0.5px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

/* Blood-Rust Border Shifts */
.re-horror-active .tp-hero-section,
.re-horror-active .tp-story-card,
.re-horror-active .tp-hero-control-card,
.re-horror-active .ah-header,
.re-horror-active .ah-footer,
.re-horror-active .ah-owned-ticket {
  border-color: rgba(220, 38, 38, 0.5) !important;
  box-shadow: 0 0 28px rgba(180, 20, 20, 0.35) !important;
}

/* REC Badge switches to Urgent Crimson Alarm */
.re-horror-active .tp-hud-rec-badge {
  background: #ff0000 !important;
  color: #ffffff !important;
  animation: reRecAlarm 0.35s infinite alternate !important;
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.9) !important;
}

@keyframes reRecAlarm {
  0% { opacity: 0.6; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1.04); }
}

.re-horror-active .tp-hud-rec-dot {
  background: #ffffff !important;
  box-shadow: 0 0 8px #ffffff !important;
}

/* Radar pulse dot turns red */
.re-horror-active .tp-radar-dot-pulse {
  background: #ff0000 !important;
  box-shadow: 0 0 12px #ff0000 !important;
}

.re-horror-active .tp-radar-dot-pulse::after {
  border-color: rgba(255, 0, 0, 0.8) !important;
}

/* HUD Timecode & Camera Tag turn Blood Red */
.re-horror-active .tp-hud-timecode {
  color: #ff3333 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(255, 51, 51, 0.8) !important;
}

.re-horror-active .tp-hud-cam-tag {
  color: #ff4d4d !important;
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.7) !important;
}

/* 5. Smooth Degauss Recovery (.re-horror-restoring) */
body.re-horror-restoring::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: #ffffff;
  animation: reDegaussFlash 0.55s ease-out forwards;
}

@keyframes reDegaussFlash {
  0% { opacity: 0.85; filter: contrast(300%); }
  40% { opacity: 0.4; }
  100% { opacity: 0; }
}

/* 6. Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .tp-cctv-seg-btn.is-active::before,
  .tp-radar-dot-pulse,
  .tp-radar-dot-pulse::after,
  .tp-hud-rec-dot {
    animation: none !important;
  }
  .re-tension-stage-1,
  .re-tension-stage-2 {
    animation: none !important;
    filter: sepia(30%) !important;
  }
  .re-jumpscare-overlay.is-active .re-jumpscare-flash {
    animation: none !important;
    opacity: 0.2;
    background: #000000;
  }
  .re-jumpscare-overlay.is-active .re-jumpscare-entity-wrap {
    animation: none !important;
    transform: scale(1) !important;
    opacity: 1 !important;
  }
  body.re-horror-active::before {
    animation: none !important;
  }
  body.re-horror-restoring::before {
    animation: none !important;
  }
}

/* ==========================================================================
   9. Featured Artists Roster (Apple Symmetrical Bento Grid)
   ========================================================================== */
.tp-artist-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  align-items: stretch;
}

.tp-artist-bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1e212b 0%, #14161e 100%);
  backdrop-filter: var(--tp-blur, blur(24px));
  -webkit-backdrop-filter: var(--tp-blur, blur(24px));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--tp-radius-card, 20px);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.24s ease,
              box-shadow 0.24s ease;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.tp-artist-bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.tp-artist-bento-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.tp-artist-bento-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0d0e12;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-artist-bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.tp-artist-bento-card:hover .tp-artist-bento-img {
  transform: scale(1.04);
}

.tp-artist-bento-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ah-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(242, 240, 232, 0.28);
  background: radial-gradient(circle at center, rgba(30, 32, 40, 0.92), #0a0b0e);
}

.tp-artist-telemetry {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--ah-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(242, 240, 232, 0.72);
  background: rgba(8, 9, 12, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: var(--tp-radius-pill, 980px);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.tp-artist-bento-info {
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.2vw, 24px);
  gap: 8px;
  flex: 1;
  background: rgba(14, 16, 22, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tp-artist-bento-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tp-artist-band {
  font-family: var(--ah-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--tp-muted, #9c9a92);
}

.tp-artist-bento-name {
  margin: 4px 0 14px;
  font-family: var(--ah-display, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tp-chalk, #f2f0e8);
  line-height: 1.35;
}

.tp-artist-bento-action {
  margin-top: auto;
  font-family: var(--ah-text, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--tp-accent, #d4a373);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  -webkit-font-smoothing: antialiased;
}

.tp-artist-bento-card:hover .tp-artist-bento-action {
  transform: translateX(4px);
  color: #f2f0e8;
}

@media (max-width: 1279px) {
  .tp-artist-bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .tp-artist-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 639px) {
  .tp-artist-bento-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .tp-artist-bento-thumb {
    aspect-ratio: 16 / 10;
  }
}
