/* The Wheel of Boredom. Every rule is scoped under .spin so the same styles work on the /spin/ page and inside the home page's popup
   without touching anything else. Everything else lives in /app.css and /style.css. No inline styles: the CSP forbids them. */
.spin { max-width: 760px; margin: 14px auto 40px; padding: 10px 18px 34px; text-align: center; color: var(--ink); background: #18102f; border: 3px solid #fff4dc; border-radius: 12px; box-shadow: 7px 7px 0 rgba(0, 0, 0, .45); }
@media (max-width: 800px) { .spin { margin-left: 12px; margin-right: 12px; } }
/* the home page styles every h2 as a pixel-type section heading; inside the wheel they are plain headings */
.spin h1, .spin h2 { margin: 0; text-align: inherit; font: 800 20px/1.2 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 0; text-transform: none; text-shadow: none; color: var(--ink); }
.spin h2::before, .spin h2::after { content: none; }
.spin h1, .spin .wd-title { margin: 12px 0 0; font-size: clamp(30px, 6vw, 48px); line-height: 1.1; }
.spin .promise { margin: 6px 0 0; font-size: clamp(18px, 3.4vw, 24px); font-weight: 700; color: var(--yellow); }
.spin .meta { max-width: 520px; margin: 10px auto 0; font-size: 16px; opacity: 1; color: var(--soft); }

.spin .sale { display: inline-block; max-width: 520px; margin: 16px 0 0; padding: 7px 18px; border-radius: 999px; font-weight: 800; color: #1a1020; background-color: #ffb83d; }
.spin .sale[hidden] { display: none; }
.spin .badge2.sale { background: #ffb83d; }
.spin .stage { position: relative; width: min(88vw, 520px); margin: 22px auto 0; }
.spin .wheelbtn { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .55)); }
.spin .wheelbtn:disabled { cursor: progress; }
.spin .wheelbtn canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
.spin .pointer { position: absolute; z-index: 2; left: 50%; top: -6px; width: 0; height: 0; transform: translateX(-50%); border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 34px solid var(--yellow); filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .45)); }

.spin .actions { margin: 24px 0 0; }
.spin .cta { display: inline-block; font: inherit; font-weight: 800; font-size: 20px; padding: 14px 30px; border: 0; border-radius: 999px; color: #1a1020; background-color: #ffb83d; background-image: linear-gradient(135deg, var(--yellow), #ff9a3d); box-shadow: 0 6px 0 #a24b13, 0 12px 24px rgba(0, 0, 0, .4); cursor: pointer; text-decoration: none; transition: transform .08s; }
.spin .cta:hover { transform: translateY(-1px); }
.spin .cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #a24b13; }
.spin .cta:disabled { opacity: .6; cursor: progress; }
.spin .say { min-height: 1.6em; margin: 14px 0 0; font-size: 16px; color: var(--soft); }

/* the result is a section of the panel, not a card inside a card: a divider rule, no box */
.spin .card { max-width: 560px; margin: 26px auto 0; padding: 22px 0 0; text-align: left; border-top: 2px solid var(--pink); }
.spin .card[hidden], .spin .recent[hidden] { display: none; }
.spin .card:focus { outline: none; }
.spin .cat { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: var(--pink); }
.spin .who { display: flex; gap: 16px; align-items: flex-start; }
.spin .who img { flex: none; border-radius: 20px; background: rgba(255, 255, 255, .06); }
.spin .who h2 { font-size: 28px; line-height: 1.15; }
.spin .who h2:focus { outline: none; }
.spin .hook { margin: 6px 0 0; font-size: 16px; }
.spin .badge2 { display: inline-block; margin: 10px 0 0; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #1a1020; background: var(--yellow); }
.spin .badge2.review { background: #ffb3d1; }
.spin .badge2.free { background: #9af0cf; }
.spin .count { margin: 14px 0 0; min-height: 1.5em; font-size: 16px; color: var(--soft); }
.spin .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 0; }
.spin .row .go { font-size: 17px; padding: 11px 22px; }
.spin .ghost { font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .45); color: var(--ink); background: transparent; cursor: pointer; }
.spin .ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.spin .ghost[hidden] { display: none; }

.spin .recent { max-width: 560px; margin: 26px auto 0; text-align: left; }
.spin .recent h2 { margin: 0 0 6px; font-size: 18px; }
.spin .recent ul { list-style: none; margin: 0; padding: 0; }
.spin .recent li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.spin .linkish { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px 0 0; font: inherit; border: 0; background: none; color: var(--yellow); text-decoration: underline; cursor: pointer; }
.spin .soft { color: var(--soft); font-size: 14px; }
.spin .opts { margin: 18px 0 0; }
.spin .opts label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.spin .opts input { width: 20px; height: 20px; accent-color: var(--yellow); }
.spin .fine { max-width: 520px; margin: 14px auto 0; font-size: 14px; line-height: 1.6; text-align: center; color: var(--soft); text-shadow: none; }
.spin .plain { text-align: left; max-width: 520px; margin: 0 auto; }

/* the popup on the home page */
dialog.wheel-dialog { position: fixed; inset: 0; width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; padding-top: 18px; overflow: auto; overscroll-behavior: contain; }
/* in the popup the wheel shrinks to the window height, so the title, the wheel and the button are on screen together */
dialog.wheel-dialog .stage { width: min(100%, 520px, max(240px, calc(100vh - 430px))); width: min(100%, 520px, max(240px, calc(100dvh - 430px))); margin-top: 18px; }
dialog.wheel-dialog .actions { margin-top: 18px; }
dialog.wheel-dialog::backdrop { background: rgba(10, 4, 30, .8); }
.wd-close { position: absolute; top: 8px; right: 8px; z-index: 3; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; font: 400 28px/1 system-ui, sans-serif; color: var(--ink); background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .45); border-radius: 50%; cursor: pointer; }
.wd-close:hover { border-color: var(--yellow); color: var(--yellow); }

@media (prefers-reduced-motion: reduce) { .spin .cta { transition: none; } }
html[data-motion="off"] .spin .cta { transition: none; }
@media (max-width: 480px) { .spin .who { flex-direction: column; } .spin .who img { width: 64px; height: 64px; } dialog.wheel-dialog { padding: 56px 12px 24px; } }
