/* Fortune Teller player and ideas page. */

.fortune {
  --ft-bg: #100818;
  --ft-deep: #07040c;
  --ft-ink: #f4ead8;
  --ft-muted: #c9b89a;
  --ft-gold: #d4a84b;
  --ft-gold-hot: #e8c56a;
  --ft-card: #1a1024;
  --ft-paper: #f3e6c8;
  --ft-paper-lite: #faf2df;
  --ft-fill: #160c20;
  --ft-line: rgba(212, 168, 75, 0.38);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--ft-ink);
  font-family: "Open Sans", sans-serif;
}

:where(.fortune *, .fortune *::before, .fortune *::after) {
  box-sizing: border-box;
}

.fortune button {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fortune button:hover,
.fortune button:disabled {
  background: transparent;
  background-color: transparent;
  color: inherit;
  box-shadow: none;
  transform: none;
}

:where(.fortune button:focus) {
  outline: none;
}

:where(.fortune button:focus-visible) {
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.6);
}

html:has(body.page-fortune),
body.page-fortune {
  background: var(--ft-deep, #07040c);
  color: #f4ead8;
  overflow-x: hidden;
}

body.page-fortune,
body.page-fortune .grid,
body.page-fortune .mainCenter,
body.page-fortune main.mainCenter {
  box-sizing: border-box;
  max-width: 100%;
}

body.page-fortune {
  background:
    radial-gradient(ellipse 70% 46% at 50% 28%, rgba(90, 42, 28, 0.42) 0%, rgba(48, 18, 72, 0.22) 42%, transparent 72%),
    radial-gradient(ellipse 100% 80% at 50% 100%, #140a1c 0%, #07040c 70%);
}

body.page-fortune .grid {
  min-height: 0;
  background: transparent;
}

body.page-fortune .topnav {
  background: #0a0610;
  line-height: 1;
}

body.page-fortune .topnav a.logo,
body.page-fortune .topnav a.logo:hover {
  background: #0a0610;
  color: #d4a84b;
  font-size: 28px;
  padding: 4px 16px 4px 20px;
  line-height: 1;
}

body.page-fortune .topnav:has(.header-links) a.logo,
body.page-fortune .topnav:has(.header-links) a.logo:hover {
  font-size: 32px;
  padding: 10px 16px 10px 20px;
}

body.page-fortune .topnav .header-links {
  height: 52px;
}

body.page-fortune .topnav a.header-tools,
body.page-fortune .topnav a.header-tools:hover,
body.page-fortune .topnav a.header-tools:focus {
  color: #f4ead8;
}

body.page-fortune .topnav a.header-tools:focus-visible {
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.6);
}

body.page-fortune .mainCenter,
body.page-fortune main.mainCenter {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0 16px 24px;
  border: 0;
  overflow-x: hidden;
  overflow-y: visible;
  background: transparent;
}

body.page-fortune footer,
body.page-fortune .footer {
  background: #0a0610;
  color: #8a7a68;
}

body.page-fortune footer a,
body.page-fortune .footer a {
  color: #8a7a68;
}

.fortune-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fortune-head {
  width: 100%;
  padding: 0;
  text-align: center;
}

.fortune-head h1 {
  margin: 0 0 8px;
  padding: 0;
  color: var(--ft-gold);
  font-family: "Cinzel Decorative", Cinzel, serif;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(212, 168, 75, 0.55), 0 0 28px rgba(212, 168, 75, 0.28);
  background: none;
  box-shadow: none;
}

.fortune-tagline {
  margin: 0 0 28px;
  color: var(--ft-ink);
  font-family: Cinzel, "Open Sans", serif;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-align: center;
}

.fortune-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}

.fortune-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 118px;
  z-index: 0;
  width: min(320px, 70vw);
  height: min(320px, 70vw);
  transform: translate(-50%, -36%);
  background: radial-gradient(circle, rgba(120, 70, 180, 0.2) 0%, rgba(80, 30, 90, 0.12) 40%, transparent 70%);
  pointer-events: none;
}

.fortune-stage-title {
  display: none;
  margin: 0 0 8px;
  color: var(--ft-gold);
  font-family: "Cinzel Decorative", Cinzel, serif;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  text-shadow: 0 0 12px rgba(212, 168, 75, 0.5);
}

.fortune-exitfull,
.fortune button.fortune-exitfull {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  margin: 0;
}

.fortune-spreads {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 32px;
  padding: 0;
  background: none;
  box-shadow: none;
}

.fortune-spread,
.fortune button.fortune-spread {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: auto;
  padding: 6px 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(212, 168, 75, 0.6);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.fortune button.fortune-spread:hover {
  color: var(--ft-gold);
  background: transparent;
}

.fortune button.fortune-spread[aria-checked="true"],
.fortune button.fortune-spread[aria-checked="true"]:hover {
  background: transparent;
  color: var(--ft-gold);
  box-shadow: none;
}

.fortune button.fortune-spread[aria-checked="true"]::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 0;
  height: 2px;
  background: var(--ft-gold);
}

.fortune-ball-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 14px;
}

.fortune-ball,
.fortune button.fortune-ball {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 150px;
  height: 178px;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  cursor: pointer;
  transition: transform 0.22s ease, width 0.45s ease, height 0.45s ease;
}

.fortune-ball-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 0;
  width: 130%;
  height: 110%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 110, 220, 0.38) 0%, rgba(80, 30, 90, 0.18) 42%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.75;
}

.fortune-ball.is-idle .fortune-ball-glow {
  animation: fortune-pulse 3.2s ease-in-out infinite;
}

.fortune-ball.is-drawing .fortune-ball-glow {
  animation: fortune-draw-glow 1.2s ease-in-out;
}

.fortune-ball.is-maxpulse .fortune-ball-sphere {
  animation: fortune-maxpulse 0.2s ease;
}

.fortune-ball-ring {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 100%;
  aspect-ratio: 1;
  pointer-events: none;
  overflow: visible;
}

.fortune-ball-ring-inner {
  display: block;
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(212, 168, 75, 0.32);
  border-radius: 50%;
  opacity: 0;
  box-sizing: border-box;
}

.fortune-ball.is-idle .fortune-ball-ring-inner {
  animation: fortune-ripple 3s ease-out infinite;
}

.fortune-ball-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 16px;
  margin: 18px 0 0;
  color: var(--ft-gold);
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
  visibility: visible;
  opacity: 0.7;
  pointer-events: none;
  animation: fortune-hint-pulse 2.5s ease-in-out infinite;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.fortune-ball-hint-click {
  display: none;
}

.fortune.is-hint-done .fortune-ball-hint {
  animation: none;
  opacity: 0;
  visibility: hidden;
}

.fortune.is-hint-done .fortune-ball-ring-inner {
  animation: none;
  opacity: 0;
}

.fortune-ball-sphere {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 50%;
  transition: width 0.45s ease, height 0.45s ease;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.92) 0 2.6%, rgba(255, 255, 255, 0.28) 5%, transparent 11%),
    radial-gradient(circle at 50% 46%, rgba(176, 154, 204, 0.38) 0%, rgba(72, 42, 110, 0.5) 42%, #2a1640 100%);
  box-shadow:
    inset 6px 8px 14px rgba(255, 255, 255, 0.1),
    inset -10px -14px 20px rgba(12, 4, 24, 0.55),
    0 0 18px rgba(90, 50, 130, 0.35);
}

.fortune-ball-mist {
  position: absolute;
  inset: -24%;
  pointer-events: none;
  animation: fortune-mist 12s linear infinite;
}

.fortune-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.85;
}

.fortune-blob-a {
  left: 16%;
  top: 26%;
  width: 48%;
  height: 40%;
  background: rgba(210, 188, 238, 0.85);
}

.fortune-blob-b {
  right: 10%;
  bottom: 16%;
  width: 42%;
  height: 36%;
  background: rgba(212, 168, 75, 0.58);
}

.fortune-blob-c {
  left: 38%;
  top: 46%;
  width: 32%;
  height: 28%;
  background: rgba(168, 140, 214, 0.7);
}

.fortune-ball.is-drawing .fortune-ball-mist {
  animation-duration: 0.9s;
}

.fortune-ball.is-drawing .fortune-blob {
  opacity: 0.95;
}

.fortune-ball-shine {
  position: absolute;
  left: 18%;
  top: 14%;
  z-index: 2;
  width: 16%;
  height: 11%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0.15) 58%, transparent 72%);
}

.fortune-ball-gleam {
  position: absolute;
  right: 16%;
  bottom: 18%;
  z-index: 2;
  width: 36%;
  height: 18%;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  transform: rotate(22deg);
}

.fortune-ball-stand {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 auto;
  width: 118%;
  height: auto;
  margin-top: -18px;
}

.fortune-ball.is-spent {
  cursor: default;
}

.fortune-table {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
}

.fortune-slot {
  display: flex;
  flex: 0 1 144px;
  flex-direction: column;
  align-items: center;
  width: 144px;
  max-width: calc(33.333% - 8px);
}

.fortune-slot[hidden] {
  display: none !important;
}

.fortune-card {
  width: 100%;
  aspect-ratio: 2 / 3;
  perspective: 1000px;
}

.fortune-card.is-rising {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.fortune-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1.5px dashed rgba(212, 168, 75, 0.35);
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.fortune-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.4, 0.1, 0.2, 1);
}

.fortune-card.is-flipped .fortune-card-inner {
  transform: rotateY(180deg);
}

.fortune-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid var(--ft-gold);
  border-radius: 12px;
  background: var(--ft-card);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 168, 75, 0.18);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.fortune-card-back {
  background-color: #1a1024;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(212, 168, 75, 0.16) 0 20%, transparent 21%),
    repeating-linear-gradient(45deg, rgba(212, 168, 75, 0.14) 0 1.5px, transparent 1.5px 11px),
    repeating-linear-gradient(-45deg, rgba(212, 168, 75, 0.08) 0 1.5px, transparent 1.5px 11px);
}

.fortune-star {
  width: 38%;
  aspect-ratio: 1;
  background: var(--ft-gold);
  opacity: 0.88;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.fortune-card-front {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 42%, var(--ft-paper-lite) 0%, var(--ft-paper) 58%, #e8d5a8 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 168, 75, 0.18),
    inset 0 0 20px rgba(120, 80, 30, 0.14);
}

.fortune-card-front img {
  display: block;
  width: auto;
  height: auto;
  max-width: 75%;
  max-height: 72%;
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.fortune-card-label {
  min-height: 1.35em;
  margin-top: 8px;
  color: var(--ft-gold);
  font-family: Cinzel, "Open Sans", serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.fortune-card-label:empty {
  min-height: 0;
  margin-top: 0;
}

.fortune-controls {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.fortune-textbtn,
.fortune button.fortune-textbtn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--ft-gold);
  border-radius: 999px;
  background: transparent;
  color: var(--ft-gold);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.fortune button.fortune-textbtn:hover,
.fortune-textbtn:hover {
  background: rgba(212, 168, 75, 0.12);
  color: var(--ft-gold-hot);
  border-color: var(--ft-gold-hot);
}

.fortune button.fortune-textbtn:disabled,
.fortune button.fortune-textbtn:disabled:hover,
.fortune-textbtn:disabled,
.fortune-textbtn:disabled:hover {
  opacity: 0.38;
  cursor: default;
  background: transparent;
  color: var(--ft-gold);
  border-color: var(--ft-gold);
  box-shadow: none;
}

.fortune-textbtn[hidden] {
  display: none;
}

.fortune-textbtn:not([hidden]),
.fortune button.fortune-textbtn:not([hidden]) {
  display: inline-flex;
}

.fortune-exitfull[hidden],
.fortune button.fortune-exitfull[hidden] {
  display: none !important;
}

.fortune-full,
.fortune button.fortune-full {
  display: none;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ft-gold);
  color: #1a1024;
  font-size: 0.95rem;
  font-weight: 800;
}

.fortune button.fortune-full:hover,
.fortune .fortune-full:hover {
  background: var(--ft-gold-hot);
  color: #1a1024;
}

.fortune-full:not([hidden]),
.fortune button.fortune-full:not([hidden]) {
  display: inline-flex;
}

.fortune-full svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fortune-keys {
  margin: 8px 0 0;
  color: rgba(201, 184, 154, 0.75);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  border: 0;
}

.fortune-ideas {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 36px;
  text-align: left;
}

.fortune-ideas .fortune-head {
  text-align: center;
}

.fortune-ideas-cta {
  display: flex;
  justify-content: center;
  margin: 0 0 36px;
}

.fortune-open,
.fortune a.fortune-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ft-gold);
  color: #1a1024;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.fortune a.fortune-open:hover,
.fortune-open:hover {
  background: var(--ft-gold-hot);
  color: #1a1024;
  text-decoration: none;
}

.fortune-ideas h2 {
  margin: 28px 0 10px;
  color: var(--ft-gold);
  font-family: Cinzel, "Open Sans", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fortune-ideas h3 {
  margin: 16px 0 6px;
  color: var(--ft-gold);
  font-family: Cinzel, "Open Sans", serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fortune-ideas p {
  margin: 0 0 10px;
  color: var(--ft-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.fortune-ideas i,
.fortune-ideas em,
.fortune-ideas strong {
  color: var(--ft-ink);
  font-weight: 700;
}

.fortune-ideas ul {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.fortune-ideas li {
  position: relative;
  margin: 0;
  padding: 0 0 12px 1.15em;
  color: var(--ft-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.fortune-ideas li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ft-gold);
}

.fortune-ideas-lang {
  margin: 0 0 8px;
  padding: 12px 16px 8px;
  border-radius: 12px;
  background: var(--ft-fill);
  box-shadow: 0 0 0 1px var(--ft-line);
}

.fortune-ideas-lang ul {
  margin: 0;
}

.fortune-ideas-hedge {
  margin: 8px 0 4px;
  color: var(--ft-ink);
}

@keyframes fortune-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes fortune-maxpulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(0.45);
  }
}

@keyframes fortune-draw-glow {
  0% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes fortune-mist {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fortune-ripple {
  0% {
    transform: scale(0.94);
    opacity: 0.38;
  }
  100% {
    transform: scale(1.48);
    opacity: 0;
  }
}

@keyframes fortune-hint-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
}

.fortune-stage:fullscreen,
.fortune-stage:-webkit-full-screen,
.fortune-stage.is-fs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 32px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(90, 42, 28, 0.4) 0%, rgba(48, 18, 72, 0.2) 46%, transparent 72%),
    #07040c;
  overflow: hidden;
}

.fortune-stage:fullscreen::before,
.fortune-stage:-webkit-full-screen::before,
.fortune-stage.is-fs::before {
  top: 36%;
  width: min(480px, 55vw);
  height: min(480px, 55vw);
}

.fortune-stage:fullscreen .fortune-stage-title,
.fortune-stage:-webkit-full-screen .fortune-stage-title,
.fortune-stage.is-fs .fortune-stage-title {
  display: block;
  flex-shrink: 0;
  margin-bottom: 24px;
  line-height: 1.1;
}

.fortune-stage:fullscreen .fortune-exitfull,
.fortune-stage:-webkit-full-screen .fortune-exitfull,
.fortune-stage.is-fs .fortune-exitfull,
.fortune-stage:fullscreen button.fortune-exitfull,
.fortune-stage:-webkit-full-screen button.fortune-exitfull,
.fortune-stage.is-fs button.fortune-exitfull {
  display: inline-flex;
}

.fortune-stage:fullscreen .fortune-spreads,
.fortune-stage:-webkit-full-screen .fortune-spreads,
.fortune-stage.is-fs .fortune-spreads {
  flex-shrink: 0;
  margin-bottom: 20px;
}

.fortune-stage:fullscreen .fortune-ball-wrap,
.fortune-stage:-webkit-full-screen .fortune-ball-wrap,
.fortune-stage.is-fs .fortune-ball-wrap {
  flex-shrink: 0;
  margin-bottom: 14px;
}

.fortune-stage:fullscreen .fortune-controls,
.fortune-stage:-webkit-full-screen .fortune-controls,
.fortune-stage.is-fs .fortune-controls {
  flex-shrink: 0;
}

body.page-fortune .fortune-stage:fullscreen .fortune-ball,
body.page-fortune .fortune-stage:-webkit-full-screen .fortune-ball,
body.page-fortune .fortune-stage.is-fs .fortune-ball {
  width: 220px;
  height: 262px;
}

body.page-fortune .fortune-stage:fullscreen .fortune-ball-sphere,
body.page-fortune .fortune-stage:-webkit-full-screen .fortune-ball-sphere,
body.page-fortune .fortune-stage.is-fs .fortune-ball-sphere {
  width: 220px;
  height: 220px;
}

body.page-fortune .fortune-stage:fullscreen .fortune-ball-stand,
body.page-fortune .fortune-stage:-webkit-full-screen .fortune-ball-stand,
body.page-fortune .fortune-stage.is-fs .fortune-ball-stand {
  margin-top: -26px;
}

body.page-fortune .fortune.is-dealt .fortune-stage:fullscreen .fortune-ball,
body.page-fortune .fortune.is-dealt .fortune-stage:-webkit-full-screen .fortune-ball,
body.page-fortune .fortune.is-dealt .fortune-stage.is-fs .fortune-ball {
  width: 120px;
  height: 144px;
}

body.page-fortune .fortune.is-dealt .fortune-stage:fullscreen .fortune-ball-sphere,
body.page-fortune .fortune.is-dealt .fortune-stage:-webkit-full-screen .fortune-ball-sphere,
body.page-fortune .fortune.is-dealt .fortune-stage.is-fs .fortune-ball-sphere {
  width: 120px;
  height: 120px;
}

body.page-fortune .fortune.is-dealt .fortune-stage:fullscreen .fortune-ball-stand,
body.page-fortune .fortune.is-dealt .fortune-stage:-webkit-full-screen .fortune-ball-stand,
body.page-fortune .fortune.is-dealt .fortune-stage.is-fs .fortune-ball-stand {
  margin-top: -14px;
}

.fortune.is-dealt .fortune-stage:fullscreen .fortune-ball-wrap,
.fortune.is-dealt .fortune-stage:-webkit-full-screen .fortune-ball-wrap,
.fortune.is-dealt .fortune-stage.is-fs .fortune-ball-wrap {
  margin-bottom: 8px;
}

.fortune-stage:fullscreen .fortune-table,
.fortune-stage:-webkit-full-screen .fortune-table,
.fortune-stage.is-fs .fortune-table {
  flex: 1 1 auto;
  min-height: 0;
  align-items: flex-start;
}

.fortune-stage:fullscreen .fortune-slot,
.fortune-stage:-webkit-full-screen .fortune-slot,
.fortune-stage.is-fs .fortune-slot {
  flex: 0 1 auto;
  width: min(180px, 20vw, calc(24vh * 2 / 3));
  max-width: none;
  min-width: 0;
  height: auto;
}

.fortune.is-dealt .fortune-stage:fullscreen .fortune-slot,
.fortune.is-dealt .fortune-stage:-webkit-full-screen .fortune-slot,
.fortune.is-dealt .fortune-stage.is-fs .fortune-slot {
  width: min(210px, 22vw, calc(32vh * 2 / 3), calc((100vh - 26rem) * 2 / 3));
}

.fortune-stage:fullscreen .fortune-card,
.fortune-stage:-webkit-full-screen .fortune-card,
.fortune-stage.is-fs .fortune-card,
.fortune-stage:fullscreen .fortune-placeholder,
.fortune-stage:-webkit-full-screen .fortune-placeholder,
.fortune-stage.is-fs .fortune-placeholder {
  flex: none;
  width: 100%;
  height: auto;
  max-height: none;
  max-width: none;
  min-height: 0;
  aspect-ratio: 2 / 3;
}

.fortune-stage:fullscreen .fortune-card-label,
.fortune-stage:-webkit-full-screen .fortune-card-label,
.fortune-stage.is-fs .fortune-card-label {
  flex-shrink: 0;
  font-size: 20px;
  letter-spacing: 0.12em;
}

@media (max-height: 800px) {
  .fortune-stage:fullscreen,
  .fortune-stage:-webkit-full-screen,
  .fortune-stage.is-fs {
    padding: 10px 24px;
  }

  body.page-fortune .fortune-stage:fullscreen .fortune-ball,
  body.page-fortune .fortune-stage:-webkit-full-screen .fortune-ball,
  body.page-fortune .fortune-stage.is-fs .fortune-ball {
    width: 150px;
    height: 178px;
  }

  body.page-fortune .fortune-stage:fullscreen .fortune-ball-sphere,
  body.page-fortune .fortune-stage:-webkit-full-screen .fortune-ball-sphere,
  body.page-fortune .fortune-stage.is-fs .fortune-ball-sphere {
    width: 150px;
    height: 150px;
  }

  body.page-fortune .fortune-stage:fullscreen .fortune-ball-stand,
  body.page-fortune .fortune-stage:-webkit-full-screen .fortune-ball-stand,
  body.page-fortune .fortune-stage.is-fs .fortune-ball-stand {
    margin-top: -18px;
  }

  .fortune-stage:fullscreen .fortune-ball-wrap,
  .fortune-stage:-webkit-full-screen .fortune-ball-wrap,
  .fortune-stage.is-fs .fortune-ball-wrap {
    margin-bottom: 8px;
  }

  .fortune-stage:fullscreen .fortune-ball-hint,
  .fortune-stage:-webkit-full-screen .fortune-ball-hint,
  .fortune-stage.is-fs .fortune-ball-hint {
    margin-top: 10px;
  }

  .fortune-stage:fullscreen .fortune-table,
  .fortune-stage:-webkit-full-screen .fortune-table,
  .fortune-stage.is-fs .fortune-table {
    margin-bottom: 10px;
  }
}

.fortune-stage:fullscreen .fortune-spread,
.fortune-stage:-webkit-full-screen .fortune-spread,
.fortune-stage.is-fs .fortune-spread {
  font-size: 18px;
  min-height: 44px;
}

.fortune-stage:fullscreen .fortune-full,
.fortune-stage:-webkit-full-screen .fortune-full,
.fortune-stage.is-fs .fortune-full {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .fortune-ball-mist {
    animation: none;
  }

  .fortune-ball.is-idle .fortune-ball-glow,
  .fortune-ball.is-drawing .fortune-ball-glow {
    animation: none;
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.05);
  }

  .fortune-ball,
  .fortune button.fortune-ball,
  .fortune-ball-sphere {
    transition: none;
  }

  .fortune-ball.is-idle .fortune-ball-ring-inner,
  .fortune-ball-hint {
    animation: none;
  }

  .fortune-ball-hint {
    opacity: 0.7;
  }

  .fortune.is-hint-done .fortune-ball-hint {
    opacity: 0;
    visibility: hidden;
  }

  .fortune-card-inner {
    transition: none;
  }

  .fortune-card.is-rising {
    transition: opacity 0.3s ease;
  }
}

@media (hover: hover) and (pointer: fine) {
  .fortune-ball-hint-tap {
    display: none;
  }

  .fortune-ball-hint-click {
    display: inline;
  }

  .fortune button.fortune-ball:hover {
    transform: translateY(-2px);
  }

  .fortune button.fortune-ball:hover .fortune-ball-glow {
    filter: brightness(1.35);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .fortune button.fortune-ball:hover {
    transform: none;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
  .fortune-keys {
    display: none;
  }
}

@media (max-width: 599px) {
  .fortune-tagline {
    margin-bottom: 20px;
  }

  .fortune-spreads {
    margin-bottom: 24px;
  }

  .fortune-spread {
    font-size: 13px;
    padding: 8px 4px 10px;
    min-height: 44px;
  }

  .fortune-ball-wrap {
    margin-bottom: 8px;
  }

  .fortune-ball-hint {
    margin-top: 12px;
  }

  .fortune-ball,
  .fortune button.fortune-ball {
    width: 120px;
    height: 144px;
  }

  .fortune-ball-sphere {
    width: 120px;
    height: 120px;
  }

  .fortune-ball-stand {
    margin-top: -14px;
  }

  .fortune-slot {
    flex: 1 1 30%;
    width: 30%;
    max-width: 30%;
    min-width: 0;
  }

  .fortune-card-label {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .fortune-table {
    gap: 8px;
  }

  .fortune-textbtn,
  .fortune button.fortune-textbtn {
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .fortune.is-dealt .fortune-textbtn:not([hidden]),
  .fortune.is-dealt button.fortune-textbtn:not([hidden]),
  .fortune.is-dealt .fortune-full:not([hidden]),
  .fortune.is-dealt button.fortune-full:not([hidden]) {
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
  }
}
