.pred-root {
  --pred-bg: #121217;
  --pred-brand: #bd0c1e;
  --pred-ink: #121217;
  --pred-white: #ffffff;
  --pred-secondary: #f2f2f2;
  --pred-tertiary: #9d9d9d;

  --pred-header-h: 81px;

  --pred-move: 0.6s;

  --pred-card-w: 366px;
  --pred-card-ratio: 366 / 439;
  --pred-sign: 56%;

  font-family: 'Factor A', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  color: var(--pred-white);
  background: var(--pred-bg);
  -webkit-font-smoothing: antialiased;
}

.pred-root *,
.pred-root *::before,
.pred-root *::after { box-sizing: border-box; }

.pred-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--pred-header-h));
  min-height: calc(100svh - var(--pred-header-h));
  padding: 40px 24px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.pred-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(900px, 75vw, 1200px);
  height: clamp(900px, 75vw, 1200px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    50% 50% at 50% 50%,
    rgba(78, 78, 97, 0.55) 0%,
    rgba(78, 78, 97, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.pred-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pred-title-top,
.pred-title-bottom {
  position: relative;
  z-index: 1;
  display: block;
  font-family: 'Factor A Display', 'Factor A', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 5.3vw, 68px);
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  margin: 0;
  color: var(--pred-white);
  transition: transform var(--pred-move) cubic-bezier(0.22, 1, 0.36, 1);
}

.pred-deck:hover ~ .pred-title-bottom,
.pred-deck:focus-visible ~ .pred-title-bottom { transform: translateY(20px); }

.pred-deck {
  position: relative;
  z-index: 1;
  width: var(--pred-card-w);
  aspect-ratio: var(--pred-card-ratio);
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform var(--pred-move) cubic-bezier(0.22, 1, 0.36, 1);
}

.pred-deck:hover,
.pred-deck:focus-visible { transform: scale(1.089); }
.pred-deck:active { transform: scale(1.04); }

.pred-deck:focus-visible {
  outline: 2px solid var(--pred-white);
  outline-offset: 8px;
  border-radius: 24px;
}

.pred-deck-back,
.pred-deck-face {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow: 0 0 75px 0 rgba(0, 0, 0, 0.45);
}

.pred-deck-back {
  background: radial-gradient(
    ellipse at 50% 50%,
    #ffffff 35%,
    #efc2c7 51%,
    #de868f 68%,
    #ce4956 84%,
    #c52a3a 92%,
    #bd0c1e 100%
  );
  transition: transform var(--pred-move) cubic-bezier(0.22, 1, 0.36, 1);
}

.pred-deck-back--left { transform: rotate(-17deg); }
.pred-deck-back--right { transform: rotate(12deg); }

.pred-deck:hover .pred-deck-back--left,
.pred-deck:focus-visible .pred-deck-back--left { transform: rotate(12deg); }

.pred-deck:hover .pred-deck-back--right,
.pred-deck:focus-visible .pred-deck-back--right { transform: rotate(-17deg); }

.pred-deck-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px 24px 26px;
  background: var(--pred-white);
  color: var(--pred-ink);
  overflow: hidden;
}

.pred-deck-lead {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.pred-deck-sign {
  width: var(--pred-sign);
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: visible;
}

.pred-deck-star {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--pred-move) cubic-bezier(0.22, 1, 0.36, 1);
}

.pred-deck:hover .pred-deck-star,
.pred-deck:focus-visible .pred-deck-star { transform: rotate(90deg); }

.pred-deck-hint {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--pred-ink);
  transition: color var(--pred-move) ease;
}

.pred-deck:hover .pred-deck-hint,
.pred-deck:focus-visible .pred-deck-hint { color: var(--pred-brand); }

.pred-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 10, 14, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  align-items: safe center;
  padding: 24px 16px;
  overflow-y: auto;
  animation: pred-fade 0.2s ease;
}

.pred-overlay[hidden] { display: none; }

@keyframes pred-fade { from { opacity: 0; } to { opacity: 1; } }

.pred-modal {
  width: 506px;
  max-width: 100%;
  flex: 0 0 auto;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: var(--pred-white);
  color: var(--pred-ink);
  box-shadow: 0 0 45px 0 rgba(255, 255, 255, 0.23);
}

.pred-grabber {
  display: none;
  width: 60px;
  height: 4px;
  flex: 0 0 auto;
  align-self: center;
  border-radius: 800px;
  background: var(--pred-tertiary);
}

.pred-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pred-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pred-tertiary);
  font-family: inherit;
  font-size: 16px;
  line-height: 16px;
  cursor: pointer;
}

.pred-copy-clip,
.pred-copy-check { width: 16px; height: 16px; flex: 0 0 auto; }
.pred-copy-check { display: none; }
.pred-copy:hover { color: var(--pred-ink); }
.pred-copy.is-done .pred-copy-clip { display: none; }
.pred-copy.is-done .pred-copy-check { display: block; }

.pred-close {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pred-tertiary);
  cursor: pointer;
}

.pred-close svg { width: 24px; height: 24px; display: block; }
.pred-close:hover { color: var(--pred-ink); }

.pred-copy:focus-visible,
.pred-close:focus-visible {
  outline: 2px solid var(--pred-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.pred-modal-media {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border: 1px solid var(--pred-secondary);
  border-radius: 16px;
  overflow: hidden;
  background: var(--pred-secondary);
}

.pred-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pred-card-stub {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--pred-tertiary);
}

.pred-modal.is-stub .pred-card-img { display: none; }
.pred-modal.is-stub .pred-card-stub { display: flex; }

.pred-modal-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 60px;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.pred-card-text {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pred-modal-actions { display: flex; gap: 8px; margin-top: 8px; }

.pred-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: 0;
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease;
}

.pred-btn:hover { filter: brightness(0.96); }

.pred-btn--secondary { background: var(--pred-secondary); color: var(--pred-ink); }
.pred-btn--primary { background: var(--pred-brand); color: var(--pred-white); }
.pred-btn--primary:hover {
  filter: none;
  background: #900513;
}

.pred-btn:focus-visible {
  outline: 3px solid var(--pred-ink);
  outline-offset: 2px;
}

@media (max-width: 992px) {
  .pred-root { --pred-card-w: 320px; }
}

@media (max-width: 767px) {
  .pred-hero { padding: 32px 20px 44px; gap: 18px; }
  .pred-root { --pred-card-w: clamp(232px, 70vw, 276px); --pred-sign: 58%; }
  .pred-title-top,
  .pred-title-bottom { font-size: clamp(28px, 9.2vw, 36px); }
  .pred-deck-lead { font-size: 13px; }
}

@media (max-width: 600px) {
  .pred-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .pred-modal {
    width: 100%;
    max-width: 100%;
    gap: 24px;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
    margin: 0;
    box-shadow: 0 0 45px 0 rgba(0, 0, 0, 0.35);
    max-height: 100%;
    overflow-y: auto;
  }

  .pred-grabber { display: block; }
  .pred-close { display: none; }
  .pred-modal-top { justify-content: flex-end; }

  .pred-modal-actions { flex-direction: column; gap: 8px; margin-top: 0; }
  .pred-btn { width: 100%; flex: 0 0 auto; }
}

@media (max-width: 480px) {
  .pred-hero { padding: 24px 16px 36px; gap: 14px; }
  .pred-deck-lead, .pred-deck-hint { font-size: 12px; }
}

@keyframes pred-idle-left {
  0%, 8% { transform: rotate(-17deg); }
  18%, 30% { transform: rotate(12deg); }
  40%, 100% { transform: rotate(-17deg); }
}

@keyframes pred-idle-right {
  0%, 8% { transform: rotate(12deg); }
  18%, 30% { transform: rotate(-17deg); }
  40%, 100% { transform: rotate(12deg); }
}

@keyframes pred-idle-sign {
  0%, 8% { transform: rotate(0deg); }
  40%, 100% { transform: rotate(360deg); }
}

@keyframes pred-idle-hint {
  0%, 8% { color: var(--pred-ink); }
  18%, 30% { color: var(--pred-brand); }
  40%, 100% { color: var(--pred-ink); }
}

@media (hover: none) {
  .pred-deck:not(.is-touched) .pred-deck-back--left {
    animation: pred-idle-left 5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
  .pred-deck:not(.is-touched) .pred-deck-back--right {
    animation: pred-idle-right 5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
  .pred-deck:not(.is-touched) .pred-deck-star {
    animation: pred-idle-sign 5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
  .pred-deck:not(.is-touched) .pred-deck-hint {
    animation: pred-idle-hint 5s ease infinite;
  }

  .pred-deck:hover,
  .pred-deck:focus-visible { transform: none; }
  .pred-deck:hover .pred-deck-star,
  .pred-deck:focus-visible .pred-deck-star { transform: none; }
  .pred-deck:hover ~ .pred-title-bottom,
  .pred-deck:focus-visible ~ .pred-title-bottom { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pred-root *,
  .pred-root *::before,
  .pred-root *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.page:has(.pred-root) {
  background: #121217;
}
