/* Corporate Treasure Hunt — shared styles (banner, pages, eggs, award helpers) */

/* =====================================================
   CORPORATE TREASURE HUNT
   ===================================================== */
.hunt-banner {
  background: color-mix(in oklab, var(--color-yellow) 12%, var(--color-surface));
  border-bottom: 1px solid color-mix(in oklab, var(--color-yellow) 35%, var(--color-border));
  padding: var(--space-3, 0.75rem) 0;
}
[data-theme='light'] .hunt-banner {
  background: color-mix(in oklab, var(--color-yellow) 18%, #fff);
}
.hunt-banner__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 0.75rem);
}
.hunt-banner__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3, 0.75rem);
}
@media (max-width: 520px) {
  .hunt-banner__metrics { grid-template-columns: 1fr; }
}
.hunt-banner__metric {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  border-radius: var(--radius-lg, 0.75rem);
  border: 1.5px solid var(--hunt-metric-border, color-mix(in oklab, var(--color-yellow) 45%, var(--color-border)));
  background: color-mix(in oklab, var(--color-surface) 70%, transparent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--hunt-metric-glow, var(--color-yellow)) 0%, transparent);
  animation: hunt-metric-pulse 2.4s ease-in-out infinite;
}
.hunt-banner__metric:nth-child(1) {
  --hunt-metric-border: color-mix(in oklab, var(--color-yellow) 70%, var(--color-border));
  --hunt-metric-glow: var(--color-yellow);
}
.hunt-banner__metric:nth-child(2) {
  --hunt-metric-border: color-mix(in oklab, var(--color-aqua) 65%, var(--color-border));
  --hunt-metric-glow: var(--color-aqua);
  animation-delay: 1.2s;
}
[data-theme='light'] .hunt-banner__metric {
  background: rgba(255, 255, 255, 0.65);
}
@keyframes hunt-metric-pulse {
  0%, 100% {
    border-color: color-mix(in oklab, var(--hunt-metric-glow, var(--color-yellow)) 45%, var(--color-border));
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--hunt-metric-glow, var(--color-yellow)) 0%, transparent);
  }
  50% {
    border-color: color-mix(in oklab, var(--hunt-metric-glow, var(--color-yellow)) 90%, white 10%);
    box-shadow:
      0 0 0 1px color-mix(in oklab, var(--hunt-metric-glow, var(--color-yellow)) 35%, transparent),
      0 0 14px color-mix(in oklab, var(--hunt-metric-glow, var(--color-yellow)) 28%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hunt-banner__metric {
    animation: none;
    box-shadow: none;
  }
}
.hunt-banner__metric-label {
  font-family: var(--font-display);
  font-size: var(--figma-11, 0.7rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hunt-banner__metric-value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 900;
  color: var(--color-yellow);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
[data-theme='light'] .hunt-banner__metric-value { color: #9a7400; }
.hunt-banner__metric-sub {
  margin: 0.15rem 0 0;
  font-family: var(--font-body);
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted);
  line-height: 1.4;
  max-width: 36ch;
}

.page-hunt {
  position: relative;
}
.page-hunt::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, color-mix(in oklab, var(--color-magenta) 18%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 35% at 90% 10%, color-mix(in oklab, var(--color-aqua) 12%, transparent), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 100%, color-mix(in oklab, var(--color-orange) 10%, transparent), transparent 60%);
}
.page-hunt .hunt-main {
  padding-block: var(--space-10) var(--space-16);
  min-height: 60vh;
}
.page-hunt .hunt-panel {
  background: color-mix(in oklab, var(--color-surface) 92%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  overflow: visible;
}
.page-hunt .hunt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: var(--figma-12);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-magenta);
  margin: 0 0 var(--space-3);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-magenta-dim);
  border: 1px solid color-mix(in oklab, var(--color-magenta) 35%, transparent);
}
.page-hunt .hunt-title {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 900;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}
.page-hunt .hunt-lead,
.page-hunt .hunt-copy {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
  max-width: 66ch;
}
.page-hunt .hunt-copy--tight { margin-bottom: var(--space-2); }
.page-hunt .hunt-copy--callout {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md, 0.5rem);
  border: 1px solid color-mix(in oklab, var(--color-aqua) 45%, var(--color-border));
  background: color-mix(in oklab, var(--color-aqua) 12%, var(--color-surface));
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.5;
}
.page-hunt .hunt-copy--callout strong {
  color: var(--color-aqua);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.page-hunt .hunt-code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.35rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-aqua-dim));
  border: 1px dashed color-mix(in oklab, var(--color-aqua) 50%, var(--color-border));
  border-radius: var(--radius-md);
  padding: var(--space-5);
  color: var(--color-aqua);
  margin: var(--space-4) 0;
  letter-spacing: 0.04em;
  text-align: center;
}
.page-hunt .hunt-form-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--figma-12);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.page-hunt .hunt-input {
  width: 100%;
  max-width: 360px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.page-hunt .hunt-input:focus {
  border-color: var(--color-magenta);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-magenta-glow);
}
.page-hunt .hunt-helper {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin: 0 0 var(--space-4);
}
.page-hunt .hunt-error { color: #ff6b7a; font-size: var(--text-sm); margin: var(--space-3) 0 0; }
.page-hunt .hunt-success { color: var(--color-aqua); font-size: var(--text-sm); margin: var(--space-3) 0 0; }
.page-hunt .hidden { display: none !important; }

.hunt-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  background: var(--color-surface-2);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
  cursor: pointer;
}
.hunt-item:hover { transform: translateY(-1px); }
.hunt-item.is-active {
  border-color: var(--color-yellow);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-yellow) 45%, transparent);
}
.hunt-item.is-correct {
  border-color: var(--color-aqua);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-aqua) 40%, transparent);
}
.hunt-item.is-incorrect {
  border-color: #ff6b7a;
  box-shadow: 0 0 0 1px color-mix(in oklab, #ff6b7a 35%, transparent);
}
.hunt-item__meta {
  font-family: var(--font-display);
  font-size: var(--figma-12);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin: 0 0 var(--space-2);
}
.hunt-item__desc {
  font-family: var(--font-body);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}
.hunt-item__assign {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  background: color-mix(in oklab, var(--color-surface) 80%, transparent);
}
.hunt-item.is-active .hunt-item__assign {
  border-style: solid;
  border-color: color-mix(in oklab, var(--color-yellow) 55%, var(--color-border));
}
.hunt-item__assign-placeholder {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}
.hunt-item__assignee {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.hunt-item__assignee img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
.hunt-item__assignee-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}
.hunt-item__feedback {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  line-height: 1.45;
}
.hunt-item.is-correct .hunt-item__feedback { color: var(--color-aqua); }
.hunt-item.is-incorrect .hunt-item__feedback { color: #ff6b7a; }

/* Suspect lineup — portraits shown once */
.hunt-lineup {
  margin: 0 0 var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  position: sticky;
  top: var(--space-3);
  z-index: 5;
}
.hunt-lineup__label {
  font-family: var(--font-display);
  font-size: var(--figma-12);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-magenta);
  margin: 0 0 var(--space-2);
}
.hunt-lineup__hint {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}
.hunt-lineup__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.hunt-suspect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  text-align: center;
  transition: border-color var(--transition-interactive), background var(--transition-interactive), color var(--transition-interactive), transform var(--transition-interactive);
}
.hunt-suspect:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
  transform: translateY(-1px);
}
.hunt-suspect:focus-visible {
  outline: 2px solid var(--color-magenta);
  outline-offset: 2px;
}
.hunt-suspect.is-picked {
  border-color: var(--color-magenta);
  background: var(--color-magenta-dim);
  color: var(--color-text);
}
.hunt-suspect img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.hunt-suspect__name {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 0.55rem + 0.4vw, 0.85rem);
  font-weight: 700;
  line-height: 1.25;
}
@media (max-width: 720px) {
  .hunt-lineup {
    top: var(--space-2);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
  }
  .hunt-lineup__hint {
    margin-top: var(--space-2);
    font-size: var(--text-xs, 0.75rem);
  }
  .hunt-lineup__grid {
    --hunt-suspect-gap: var(--space-2);
    display: flex;
    gap: var(--hunt-suspect-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: var(--space-1);
    -webkit-overflow-scrolling: touch;
    /* Soft edge cues when more suspects are off-screen */
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      #000 1.75rem,
      #000 calc(100% - 1.75rem),
      transparent 100%
    );
  }
  .hunt-lineup__grid.is-scroll-start {
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 1.75rem), transparent 100%);
  }
  .hunt-lineup__grid.is-scroll-end {
    mask-image: linear-gradient(to right, transparent 0%, #000 1.75rem, #000 100%);
  }
  .hunt-lineup__grid.is-scroll-start.is-scroll-end {
    mask-image: none;
  }
  .hunt-suspect {
    /* ~2.5 cards in view: full, full, half — signals scrollability */
    flex: 0 0 calc((100% - (var(--hunt-suspect-gap) * 2)) / 2.5);
    width: auto;
    min-width: 0;
    max-width: none;
    padding: var(--space-2);
    scroll-snap-align: start;
  }
  .hunt-suspect img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: top center;
  }
  .hunt-suspect__name {
    font-size: 0.68rem;
  }
}

.hunt-item__bosses { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hunt-boss-btn {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  transition: background var(--transition-interactive), border-color var(--transition-interactive), color var(--transition-interactive);
}
.hunt-boss-btn:hover { color: var(--color-text); border-color: var(--color-text-faint); }
.hunt-boss-btn.is-selected {
  border-color: var(--color-magenta);
  color: var(--color-text);
  background: var(--color-magenta-dim);
}

/* Sacrificial Hours */
.hunt-hours-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-3);
  padding: 4px 2px 16px;
  overflow: visible;
}
@media (max-width: 640px) {
  .hunt-hours-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.hunt-hour-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  min-width: 0;
  min-height: 0;
  border-radius: var(--radius-lg);
  border: 2px solid color-mix(in oklab, var(--color-yellow) 40%, var(--color-border));
  background: var(--color-surface-2);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  /* Stable paint layer — avoids “blank until hover” compositing bugs */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease, filter 280ms ease, box-shadow 280ms ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.hunt-hour-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.hunt-hour-card:hover:not(.is-sacrificed),
.hunt-hour-card:focus-visible:not(.is-sacrificed) {
  transform: translateZ(0) translateY(-4px) rotate(-1deg);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}
.hunt-hour-card.is-sacrificed {
  opacity: 0.35;
  filter: grayscale(0.55) brightness(0.85);
  transform: translateZ(0) translateY(12px) rotate(8deg) scale(0.92);
  pointer-events: none;
  cursor: default;
}
.hunt-hour-card__num { display: none; }
.hunt-hours-progress {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hunt-hours-caption {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-style: italic;
  font-weight: 500;
  color: var(--color-text-muted);
  margin: var(--space-2) auto var(--space-6);
  text-align: center;
  max-width: 46ch;
  line-height: 1.55;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--color-yellow) 8%, var(--color-surface-2));
  border: 1px solid color-mix(in oklab, var(--color-yellow) 28%, var(--color-border));
}

/* Office door */
.hunt-door-stage {
  position: relative;
  width: min(280px, 70vw);
  margin: var(--space-5) auto;
  perspective: 900px;
}
.hunt-door-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 10px solid #3a2f28;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #1a1210, #0e0a08);
  box-shadow:
    inset 0 0 0 2px #5a4a3c,
    0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.hunt-door-frame::before {
  content: "AUTHORIZED PERSONNEL";
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 208, 18, 0.55);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.hunt-door-stage.is-open .hunt-door-frame::before { opacity: 0; }
.hunt-door-leaf {
  position: absolute;
  inset: 0;
  width: 50%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.06), transparent 30%),
    repeating-linear-gradient(
      90deg,
      #6b4a32 0px,
      #6b4a32 14px,
      #5a3d29 14px,
      #5a3d29 16px
    );
  transform-origin: left center;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: inset -2px 0 0 rgba(0,0,0,0.35);
}
.hunt-door-leaf--right {
  left: 50%;
  transform-origin: right center;
  box-shadow: inset 2px 0 0 rgba(0,0,0,0.35);
}
.hunt-door-knob {
  position: absolute;
  top: 52%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe08a, #c9892a 60%, #7a5010);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.hunt-door-leaf--left .hunt-door-knob { right: 10px; }
.hunt-door-leaf--right .hunt-door-knob { left: 10px; }
.hunt-door-stage.is-open .hunt-door-leaf--left {
  transform: rotateY(-78deg);
}
.hunt-door-stage.is-open .hunt-door-leaf--right {
  transform: rotateY(78deg);
}
.hunt-door-glow {
  position: absolute;
  inset: 12% 18%;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--color-aqua) 55%, #fff), transparent 70%);
  opacity: 0;
  transition: opacity 700ms ease 200ms;
  pointer-events: none;
}
.hunt-door-stage.is-open .hunt-door-glow { opacity: 0.85; }
.hunt-door-label {
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--figma-12);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin: var(--space-3) 0 0;
}
.hunt-door-stage.is-open .hunt-door-label { color: var(--color-aqua); }

.hunt-easter-egg {
  margin: var(--space-8) 0 0;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-bg);
  user-select: text;
}
[data-theme='light'] .hunt-easter-egg { color: #f7f4fb; }
.hunt-easter-egg::selection {
  background: var(--color-magenta);
  color: #fff;
}

.hunt-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  align-items: stretch;
}
.hunt-choice-row .btn {
  width: 100%;
  min-height: 4.25rem;
  height: 100%;
  padding-inline: var(--space-4);
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  text-wrap: balance;
}
@media (max-width: 560px) {
  .hunt-choice-row { grid-template-columns: 1fr; }
  .hunt-choice-row .btn { min-height: 3.5rem; }
}
.hunt-metrics { display: grid; gap: var(--space-4); margin: var(--space-5) 0; }
.hunt-metric-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.hunt-metric-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-yellow);
  margin-bottom: var(--space-2);
}
.hunt-docs { display: grid; gap: var(--space-4); }
.hunt-doc {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: var(--color-surface-2);
}
.hunt-doc h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.hunt-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.hunt-flavor {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
  border-left: 3px solid color-mix(in oklab, var(--color-magenta) 55%, transparent);
  background: color-mix(in oklab, var(--color-surface-2) 80%, transparent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.hunt-flavor p {
  margin: 0 0 var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 52ch;
}
.hunt-flavor p:last-child { margin-bottom: 0; }
.hunt-card-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
@media (max-width: 520px) {
  .hunt-card-samples { grid-template-columns: 1fr; max-width: 220px; margin-inline: auto; }
}
.hunt-card-sample {
  border: none;
  background: transparent;
  overflow: visible;
}
.hunt-card-sample__frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.hunt-card-sample__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 700ms ease;
}
.hunt-card-sample__frame img.is-active {
  opacity: 1;
}
.hunt-card-sample span {
  display: block;
  padding: var(--space-2);
  font-size: var(--figma-11);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-muted);
}
.page-hunt .hunt-choice-row .btn:disabled,
.page-hunt .hunt-choice-row .btn.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.hunt-metric-card .hunt-metric-label {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Slack-style toast */
.hunt-slack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  width: min(360px, calc(100vw - 2rem));
  background: #1a1d21;
  border: 1px solid #35373b;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.04);
  padding: 12px 12px 14px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #d1d2d3;
}
.hunt-slack.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.hunt-slack__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.hunt-slack__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hunt-slack__avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e01e5a, #36c5f0);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.hunt-slack__names { min-width: 0; }
.hunt-slack__app {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
.hunt-slack__channel {
  margin: 0;
  font-size: 12px;
  color: #ababad;
}
.hunt-slack__time {
  margin: 0 0 0 6px;
  font-size: 12px;
  color: #ababad;
  font-weight: 400;
}
.hunt-slack__close {
  color: #ababad;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.hunt-slack__close:hover {
  background: #222529;
  color: #fff;
}
.hunt-slack__body {
  margin: 0 0 0 44px;
  font-size: 14px;
  color: #d1d2d3;
  line-height: 1.45;
}
.hunt-slack__body em {
  font-style: normal;
  color: #fff;
  font-weight: 700;
}

.hunt-inline-clue {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}
.hunt-inline-clue a {
  color: inherit;
  text-decoration: none;
  cursor: text;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}
.hunt-inline-clue a:hover {
  color: inherit;
  text-decoration: none;
}
.hunt-inline-clue a:focus-visible {
  outline: 2px solid var(--color-magenta);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.result-hunt {
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-lg, 0.75rem);
  border: 2px solid color-mix(in oklab, var(--color-orange) 75%, var(--color-border));
  background:
    linear-gradient(
      145deg,
      color-mix(in oklab, var(--color-orange) 14%, var(--color-surface-2, var(--color-surface))) 0%,
      color-mix(in oklab, var(--color-magenta) 10%, var(--color-surface-2, var(--color-surface))) 100%
    );
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--color-orange) 20%, transparent),
    0 8px 24px color-mix(in oklab, var(--color-orange) 12%, transparent);
}
[data-theme='light'] .result-hunt {
  background:
    linear-gradient(
      145deg,
      color-mix(in oklab, var(--color-orange) 12%, #fff) 0%,
      color-mix(in oklab, var(--color-magenta) 8%, #fff) 100%
    );
  border-color: color-mix(in oklab, var(--color-orange) 55%, var(--color-border));
}
.result-hunt__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin: 0 0 0.5rem;
}
.result-hunt p {
  margin: 0;
  color: var(--color-text);
}
.result-hunt p.result-hunt__flag {
  margin: 0 0 0.85rem;
}
.result-hunt__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  color: var(--color-aqua);
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md, 0.5rem);
  border: 1px dashed color-mix(in oklab, var(--color-aqua) 45%, var(--color-border));
  background: color-mix(in oklab, var(--color-aqua) 10%, transparent);
}
.result-hunt__code strong {
  color: var(--color-aqua);
  font-weight: 800;
}
.result-hunt__bonus {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed color-mix(in oklab, var(--color-orange) 35%, var(--color-border));
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}
.result-hunt__bonus strong {
  color: var(--color-yellow);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Share-arrival hunt nudge */
.hunt-share-nudge {
  background: color-mix(in oklab, var(--color-aqua) 12%, var(--color-surface));
  border-bottom: 1px solid color-mix(in oklab, var(--color-aqua) 35%, var(--color-border));
  padding: var(--space-3) 0;
}
.hunt-share-nudge.hidden,
.hunt-share-nudge[hidden] {
  display: none !important;
}
.hunt-share-nudge__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.hunt-share-nudge__text {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
  max-width: 62ch;
}
.hunt-share-nudge__text a {
  color: var(--color-aqua);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hunt-share-nudge__close {
  color: var(--color-text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.hunt-share-nudge__close:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
