:root {
  --ink: #24214d;
  --muted: #747393;
  --muted-deep: #5a5875;
  --purple: #5b5bd6;
  --purple-dark: #4747b9;
  --purple-soft: #eeedff;
  --orange: #ff8f50;
  --orange-dark: #df6831;
  --orange-soft: #fff0e6;
  --teal: #52b8a8;
  --teal-soft: #e7f8f3;
  --yellow: #ffd968;
  --line: #ebe9f4;
  --paper: #fffdfb;
  --shadow: 0 18px 45px rgba(55, 49, 116, 0.08);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); background: #f7f6ff; background-image: radial-gradient(circle at 9% 10%, rgba(255,217,104,.17), transparent 19rem), radial-gradient(circle at 96% 22%, rgba(82,184,168,.13), transparent 22rem), linear-gradient(125deg, #f8f7ff 0%, #f9f8ff 44%, #fffaf6 100%); font-family: 'Google Sans Flex', 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.45; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(91,91,214,.3); outline-offset: 3px; }
.random-shell { position: relative; z-index: 1; width: min(100% - 52px, 1370px); margin: 0 auto; padding: 24px 0 18px; }
.random-topbar, .random-hero, .random-grid, .random-footer { display: flex; position: relative; z-index: 1; }
.random-topbar { align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 58px; height: 50px; color: #fff; background: var(--purple); border: 3px solid #fff; border-radius: 16px 16px 16px 5px; box-shadow: 0 6px 0 #4545ac; font-size: 22px; font-weight: 900; letter-spacing: -.06em; transform: rotate(-3deg); }
.brand-copy { display: flex; flex-direction: column; gap: 0; }.brand-copy strong { font-size: 16px; letter-spacing: .075em; line-height: 1; }.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }.sync-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--muted-deep); background: rgba(255,255,255,.65); border: 1px solid rgba(222,220,243,.9); border-radius: 100px; font-size: 12px; font-weight: 700; }.status-dot { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,217,104,.2); }.sync-status[data-state="ready"] .status-dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(82,184,168,.16); }.sync-status[data-state="offline"] .status-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(255,143,80,.16); }.sync-status[data-state="loading"] .status-dot { animation: blink 1s infinite; }@keyframes blink { 50% { opacity: .35; } }
.back-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; color: var(--purple-dark); background: rgba(255,255,255,.64); border: 1px solid var(--line); border-radius: 11px; font-size: 12px; font-weight: 700; text-decoration: none; transition: background .2s, border-color .2s; }.back-link:hover { background: var(--purple-soft); border-color: #c8c6ef; }.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.avatar { display: grid; place-items: center; width: 38px; height: 38px; color: var(--purple-dark); background: var(--yellow); border: 3px solid #fff; border-radius: 50%; font-size: 12px; font-weight: 900; box-shadow: 0 3px 0 #e6bd41; }
.random-hero { align-items: center; justify-content: space-between; min-height: 190px; padding: 37px 8% 21px 4%; }.random-hero > div:first-child { max-width: 700px; }.eyebrow, .section-kicker { color: var(--purple); font-size: 11px; font-weight: 900; letter-spacing: .14em; }.eyebrow { display: flex; align-items: center; gap: 8px; }.eyebrow i { display: inline-block; width: 25px; height: 3px; background: var(--orange); border-radius: 10px; }.random-hero h1 { margin: 9px 0 0; font-family: 'Lobster Two', Georgia, cursive; font-size: clamp(48px, 5vw, 72px); font-weight: 700; letter-spacing: -.04em; line-height: .95; }.random-hero h1 span { color: var(--orange); }.random-hero p { max-width: 590px; margin-top: 13px; color: var(--muted-deep); font-size: 15px; }.hero-badge { display: flex; align-items: baseline; justify-content: center; width: 154px; height: 92px; padding-top: 5px; color: #fff; background: var(--purple); border: 6px solid #fff; border-radius: 32px 32px 32px 8px; box-shadow: 0 9px 0 rgba(72,69,178,.2); transform: rotate(4deg); }.hero-badge span { font-size: 61px; font-weight: 900; line-height: 1; }.hero-badge small { font-size: 14px; font-weight: 900; letter-spacing: .08em; }
.random-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .7fr); align-items: start; gap: 18px; }.panel-card { background: rgba(255,255,255,.89); border: 1px solid rgba(232,230,244,.95); border-radius: 24px; box-shadow: var(--shadow); }.wheel-card { min-width: 0; padding: 24px 28px 20px; }.section-heading, .result-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.section-heading h2 { margin: 3px 0 0; font-size: 25px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }.people-count { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; color: var(--muted-deep); background: #faf9ff; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; white-space: nowrap; }.people-count svg { width: 16px; height: 16px; fill: none; stroke: var(--purple); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }.people-count strong { color: var(--purple-dark); font-size: 13px; }
.wheel-stage { position: relative; display: grid; place-items: center; width: min(100%, 590px); aspect-ratio: 1; margin: 21px auto 0; }.wheel-stage::before { position: absolute; inset: 3%; content: ''; background: #f4f2ff; border: 1px dashed #dedcf3; border-radius: 50%; }.wheel-stage canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; filter: drop-shadow(0 13px 9px rgba(69,64,137,.15)); transform: rotate(0deg); transform-origin: center; }.wheel-pointer { position: absolute; top: -1px; left: 50%; z-index: 4; width: 33px; height: 48px; background: var(--orange); border: 3px solid #fff; border-radius: 18px 18px 8px 8px; box-shadow: 0 5px 0 #d86731; transform: translateX(-50%); }.wheel-pointer::after { position: absolute; bottom: -13px; left: 50%; width: 19px; height: 19px; content: ''; background: var(--orange); border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: translateX(-50%) rotate(45deg); }.wheel-pointer span { position: absolute; top: 8px; left: 50%; width: 6px; height: 6px; background: #fff; border-radius: 50%; transform: translateX(-50%); }.wheel-center { position: absolute; top: 50%; left: 50%; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; height: 112px; color: #fff; background: var(--purple); border: 7px solid #fff; border-radius: 50%; box-shadow: 0 7px 0 #4545ac; transform: translate(-50%, -50%); pointer-events: none; }.center-star { margin-bottom: -3px; color: var(--yellow); font-size: 22px; line-height: 1; }.wheel-center strong { font-size: 22px; font-weight: 900; line-height: 1; }.wheel-center small { margin-top: 3px; color: #d9d9ff; font-size: 8px; font-weight: 900; letter-spacing: .12em; }.wheel-empty { position: absolute; inset: 18%; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: var(--muted-deep); background: rgba(255,255,255,.95); border: 1px dashed #cbcae9; border-radius: 50%; text-align: center; }.wheel-empty[hidden] { display: none; }.empty-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 7px; color: var(--orange-dark); background: var(--orange-soft); border-radius: 12px; }.empty-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.wheel-empty strong { font-size: 15px; font-weight: 900; }.wheel-empty span { max-width: 160px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.wheel-controls { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 9px; }.spin-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 190px; min-height: 52px; padding: 11px 20px; color: #fff; background: var(--orange); border: 0; border-radius: 15px; box-shadow: 0 6px 0 #dc6e34; font-size: 15px; font-weight: 900; transition: transform .2s, background .2s, box-shadow .2s; }.spin-button:hover:not(:disabled) { background: var(--orange-dark); box-shadow: 0 3px 0 #dc6e34; transform: translateY(3px); }.spin-button:disabled { cursor: not-allowed; opacity: .58; }.spin-icon { display: grid; place-items: center; width: 27px; height: 27px; background: rgba(255,255,255,.2); border-radius: 9px; }.spin-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }.refresh-button { display: inline-flex; align-items: center; gap: 6px; min-height: 39px; padding: 8px 11px; color: var(--purple-dark); background: var(--purple-soft); border: 1px solid #d9d8f5; border-radius: 12px; font-size: 11px; font-weight: 800; }.refresh-button:hover { background: #e2e1ff; }.refresh-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.wheel-hint { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; color: var(--muted); font-size: 11px; text-align: center; }.wheel-hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.side-stack { display: flex; flex-direction: column; gap: 15px; min-width: 0; }.result-card { position: relative; min-height: 204px; padding: 21px 22px; overflow: hidden; background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 12px 0 rgba(72,69,178,.18); }.result-topline .section-kicker { color: #d8d8ff; }.result-status { padding: 4px 7px; color: var(--purple-dark); background: var(--yellow); border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }.result-name { position: relative; z-index: 1; max-width: 86%; min-height: 55px; margin-top: 20px; overflow: hidden; font-family: 'Lobster Two', Georgia, cursive; font-size: clamp(35px, 3.3vw, 52px); font-weight: 700; line-height: 1.02; text-overflow: ellipsis; white-space: nowrap; }.result-card p { position: relative; z-index: 1; max-width: 77%; margin-top: 9px; color: #e3e2ff; font-size: 12px; line-height: 1.35; }.result-ribbon { position: absolute; right: -16px; bottom: -23px; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 103px; height: 103px; color: var(--purple-dark); background: var(--yellow); border: 6px solid rgba(255,255,255,.28); border-radius: 50%; transform: rotate(-12deg); }.result-ribbon span { font-size: 39px; font-weight: 900; line-height: .75; }.result-ribbon small { font-size: 13px; font-weight: 900; }.result-card[data-state="winner"] { background: #4f49bd; }.result-card[data-state="winner"] .result-status { background: var(--teal-soft); color: #207c70; }.result-card[data-state="spinning"] .result-name { animation: pulse-name 1s infinite alternate; }.result-card[data-state="spinning"] .result-status { color: #fff; background: var(--orange); }.result-card[data-state="spinning"] .result-ribbon { animation: float-ribbon .8s infinite alternate ease-in-out; }@keyframes pulse-name { to { opacity: .55; transform: translateY(-2px); } }@keyframes float-ribbon { to { transform: rotate(-8deg) translateY(-4px); } }
.roster-card { padding: 20px 18px 15px; }.roster-card h2 { margin: 3px 0 0; font-size: 23px; font-weight: 900; }.mini-pill { display: grid; place-items: center; min-width: 29px; height: 27px; padding: 0 9px; color: var(--purple); background: var(--purple-soft); border-radius: 99px; font-size: 13px; font-weight: 900; }.roster-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; max-height: 295px; margin-top: 15px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #d8d6ef transparent; }.roster-person { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 7px; background: #fbfaff; border: 1px solid #efedf6; border-radius: 11px; }.person-dot { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; color: var(--purple-dark); background: var(--purple-soft); border-radius: 8px; font-size: 10px; font-weight: 900; }.person-name { min-width: 0; overflow: hidden; color: var(--muted-deep); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.roster-person.is-winner { background: #fff8ee; border-color: #ffd5b3; }.roster-person.is-winner .person-dot { color: var(--orange-dark); background: #ffe1c6; }.list-loading, .list-empty { grid-column: 1 / -1; padding: 20px 8px; color: var(--muted); text-align: center; font-size: 12px; }.list-empty strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 14px; }
.tip-card { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; color: var(--muted-deep); background: #fff8ee; border: 1px dashed #ffd6ae; border-radius: 17px; }.tip-sticker { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; color: var(--orange-dark); background: #ffe4c8; border-radius: 10px; }.tip-sticker svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.tip-card strong { color: var(--ink); font-size: 13px; font-weight: 900; }.tip-card p { margin-top: 1px; font-size: 11px; line-height: 1.32; }
.random-footer { justify-content: space-between; gap: 18px; padding: 17px 5px 0; color: #aaa8bf; font-size: 11px; }
.result-name { overflow: visible; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.wheel-center { padding: 0; appearance: none; pointer-events: auto; cursor: pointer; }
.wheel-center:disabled { cursor: not-allowed; opacity: .68; }
.remove-toggle { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; min-height: 39px; margin: 12px auto 0; padding: 8px 11px; color: var(--purple-dark); background: #faf9ff; border: 1px solid var(--line); border-radius: 12px; font-size: 11px; font-weight: 800; cursor: pointer; user-select: none; }
.remove-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; flex: 0 0 34px; width: 34px; height: 20px; background: #d9d7ed; border-radius: 99px; transition: background .2s; }
.toggle-track::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; content: ''; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(55,49,116,.18); transition: transform .2s; }
.remove-toggle input:checked + .toggle-track { background: var(--teal); }
.remove-toggle input:checked + .toggle-track::after { transform: translateX(14px); }
.remove-toggle input:focus-visible + .toggle-track { outline: 3px solid rgba(91,91,214,.3); outline-offset: 3px; }
.random-doodle { position: fixed; z-index: 0; color: rgba(91,91,214,.12); font-weight: 900; pointer-events: none; user-select: none; }.doodle-sigma { top: 30%; left: 1.5%; font-size: 62px; transform: rotate(-17deg); }.doodle-pi { right: 1.4%; bottom: 9%; color: rgba(255,143,80,.14); font-size: 67px; transform: rotate(15deg); }.doodle-triangle { top: 4%; right: 21%; width: 37px; color: rgba(82,184,168,.23); transform: rotate(18deg); }.doodle-triangle svg, .doodle-flask svg { width: 100%; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }.doodle-flask { top: 52%; right: 3%; width: 37px; color: rgba(91,91,214,.14); transform: rotate(-13deg); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(360px, calc(100% - 48px)); padding: 12px 17px; color: #fff; background: #2f2b66; border-radius: 13px; box-shadow: 0 12px 35px rgba(45,42,100,.25); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .22s, transform .22s; }.toast.is-visible { opacity: 1; transform: translateY(0); }.toast[data-type="error"] { background: #be564c; }
@media (max-width: 980px) { .random-shell { width: min(100% - 32px, 850px); }.random-hero { padding-left: 1%; padding-right: 1%; }.random-grid { grid-template-columns: 1fr; }.side-stack { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }.tip-card { grid-column: span 2; }.roster-card { min-height: 255px; } }
@media (max-width: 620px) { .random-shell { width: min(100% - 22px, 560px); padding-top: 14px; }.brand-mark { width: 52px; height: 46px; font-size: 20px; }.brand-copy strong { font-size: 14px; }.brand-copy small, .sync-status { display: none; }.topbar-right { gap: 6px; }.back-link { padding: 7px 8px; }.back-link span { display: none; }.random-hero { min-height: 205px; padding: 45px 5px 16px; }.random-hero h1 { font-size: 49px; }.random-hero p { max-width: 84%; font-size: 13px; }.hero-badge { position: absolute; right: 6px; bottom: 14px; width: 107px; height: 66px; border-width: 4px; border-radius: 23px 23px 23px 6px; }.hero-badge span { font-size: 43px; }.hero-badge small { font-size: 10px; }.wheel-card { padding: 18px 11px 16px; border-radius: 20px; }.section-heading h2 { font-size: 22px; }.wheel-stage { margin-top: 18px; }.wheel-center { width: 80px; height: 80px; border-width: 5px; }.center-star { font-size: 16px; }.wheel-center strong { font-size: 16px; }.wheel-center small { font-size: 6px; }.wheel-pointer { width: 25px; height: 38px; border-width: 2px; }.wheel-pointer::after { width: 15px; height: 15px; bottom: -10px; border-width: 2px; }.wheel-controls { flex-direction: column; }.spin-button { width: 100%; }.refresh-button { width: 100%; }.wheel-hint { font-size: 10px; }.side-stack { display: flex; }.result-card { min-height: 185px; }.roster-list { max-height: 250px; }.random-footer { flex-direction: column; gap: 3px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
