/* =====================================================================
   THE SOCIAL MOMENTS (src/social.js, PLAN-social.md)
   · .so-stage      the 3D yacht, full-screen, over everything
   · .so-card-wrap  a card on the deck (quiet decisions; and everything
                    when the 3D is off)
   Gold leaf and foam turquoise, waves, soft motion. Phone first.
   ===================================================================== */

body.social-staged #app { visibility: hidden; }

/* ---------------------------------------------------------------- stage */
.so-stage {
    position: fixed; inset: 0; z-index: 8000; display: none;
    background: #02090f; overflow: hidden; user-select: none; -webkit-user-select: none;
    font-family: var(--font-prose, Georgia, serif); color: #f3efe6;
    touch-action: none;
}
.so-host, .so-host .sea3d-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the canvas never takes input: a tap is the moment's, not a free camera */
.so-host { transform-origin: 50% 50%; pointer-events: none; }
.so-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(130% 95% at 50% 45%, transparent 52%, rgba(1, 8, 14, 0.72) 100%),
        linear-gradient(180deg, rgba(2, 10, 16, 0.55) 0%, transparent 16%, transparent 78%, rgba(2, 10, 16, 0.6) 100%);
}
.so-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.so-faces, .so-hots { position: absolute; inset: 0; pointer-events: none; }
.so-hots { z-index: 3; }
.so-faces { z-index: 2; }

/* the title strip */
.so-top {
    position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 7;
    display: flex; align-items: center; gap: 10px; padding: 6px 16px 7px; border-radius: 999px;
    background: linear-gradient(180deg, rgba(8, 24, 33, 0.82), rgba(4, 14, 20, 0.82));
    border: 1px solid rgba(244, 199, 94, 0.38);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 241, 189, 0.18);
    font-family: var(--font-title, serif); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem;
    color: var(--gold-hi, #fff1bd); white-space: nowrap; animation: soDrop 0.6s cubic-bezier(.2, .9, .3, 1) both;
}
.so-icon { font-size: 1rem; letter-spacing: 0; }
.so-steps { color: var(--frost, #5fe0dc); font-family: var(--font-ui, sans-serif); letter-spacing: 0.06em; text-transform: none; font-size: 0.72rem; opacity: 0.85; }
.so-steps:empty { display: none; }
@keyframes soDrop { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }

.so-skip {
    position: absolute; right: 14px; top: 12px; z-index: 9;
    padding: 6px 14px; border-radius: 999px; cursor: pointer;
    background: rgba(4, 14, 20, 0.62); color: rgba(243, 239, 230, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16); font: 600 0.78rem var(--font-ui, sans-serif); letter-spacing: 0.04em;
    transition: background 0.2s, color 0.2s;
}
.so-skip:hover, .so-skip:focus-visible { background: rgba(244, 199, 94, 0.22); color: #fff; }

/* ---------------------------------------------------------------- faces */
.so-face {
    --c: #e9c47a;
    position: absolute; left: 0; top: 0; width: 48px; height: 48px; margin: -24px 0 0 -24px;
    border-radius: 50%; border: 2px solid var(--c); background: #0a1a24;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 14px color-mix(in srgb, var(--c) 45%, transparent);
    opacity: 0; transition: opacity 0.5s ease, scale 0.35s cubic-bezier(.2, 1.3, .4, 1), filter 0.4s; will-change: transform;
}
.so-face.is-big { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
.so-face.is-dim { filter: saturate(0.6) brightness(0.7); }
.so-face.is-in { opacity: 1; }
.so-face.is-off { opacity: 0 !important; }
.so-face img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; pointer-events: none; }
.so-face b { display: grid; place-items: center; width: 100%; height: 100%; color: var(--c); font-family: var(--font-title, serif); }
.so-face-ring { position: absolute; inset: -6px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); opacity: 0; }
.so-face.is-talking { scale: 1.16; }
.so-face.is-talking .so-face-ring { opacity: 1; animation: soRing 1.4s ease-out infinite; }
@keyframes soRing { from { transform: scale(0.9); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
.so-face-name {
    position: absolute; top: 100%; left: 50%; transform: translate(-50%, 4px); white-space: nowrap;
    font-family: var(--font-title, serif); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: #fff; text-shadow: 0 1px 4px #000, 0 0 8px #000;
}
.so-face-name em { color: var(--gold-hi, #ffe2a0); font-style: normal; }
.so-face.is-bump { animation: soBump 0.45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes soBump { 0% { scale: 1; } 40% { scale: 1.22; } 100% { scale: 1; } }
.so-face-fx, .so-cface-fx { position: absolute; left: 0; right: 0; bottom: 70%; height: 0; pointer-events: none; }
.so-ffx {
    position: absolute; bottom: 0; font-style: normal; font-size: 1.3rem; color: var(--gold, #f4c75e);
    text-shadow: 0 0 10px rgba(255, 210, 120, 0.8); animation: soFloat 1.4s ease-out forwards;
}
.so-ffx.is-heart { color: #ff8fb0; text-shadow: 0 0 12px rgba(255, 120, 160, 0.9); }
.so-ffx.is-miss { color: #cfe8ff; text-shadow: 0 0 8px rgba(160, 200, 255, 0.6); }
@keyframes soFloat { 0% { transform: translate(-50%, 10px) scale(0.6); opacity: 0; } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { transform: translate(-50%, -46px) scale(1); opacity: 0; } }

/* ---------------------------------------------------------------- talk */
.so-bubble {
    --c: #e9c47a; --tail: 0px;
    position: absolute; z-index: 8; max-width: min(440px, calc(100% - 28px));
    transform: translate(-50%, -100%) scale(0.92); opacity: 0; pointer-events: none;
    padding: 10px 16px 12px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(10, 28, 38, 0.95), rgba(5, 16, 24, 0.95));
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 18px color-mix(in srgb, var(--c) 25%, transparent);
    font-size: 1.04rem; line-height: 1.42;
    transition: opacity 0.22s ease, transform 0.26s cubic-bezier(.2, 1.3, .4, 1);
}
.so-bubble::after {
    content: ""; position: absolute; left: calc(50% + var(--tail)); bottom: -7px; width: 12px; height: 12px; margin-left: -6px;
    background: rgba(5, 16, 24, 0.95); border-right: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--c) 60%, transparent); transform: rotate(45deg);
}
.so-bubble.is-below { transform: translate(-50%, 0) scale(0.92); }
.so-bubble.is-below::after { bottom: auto; top: -7px; transform: rotate(225deg); }
.so-bubble.is-on { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.so-bubble.is-below.is-on { transform: translate(-50%, 0) scale(1); }
.so-bubble.is-free { left: 50% !important; top: auto !important; bottom: 120px; transform: translate(-50%, 0) scale(1); }
.so-bubble.is-free::after { display: none; }
.so-bubble-name { display: block; font-family: var(--font-title, serif); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); margin-bottom: 2px; }
.so-more { position: absolute; right: 10px; bottom: 4px; font-style: normal; font-size: 0.7rem; color: var(--gold, #f4c75e); animation: soNudge 1.2s ease-in-out infinite; }
@keyframes soNudge { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(3px); opacity: 1; } }
.so-cap {
    position: absolute; left: 50%; bottom: 28px; z-index: 5; width: min(680px, calc(100% - 28px));
    transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
    padding: 14px 22px 16px; border-radius: 14px; text-align: center;
    background: linear-gradient(180deg, rgba(4, 14, 20, 0.0), rgba(4, 14, 20, 0.86) 22%, rgba(4, 14, 20, 0.9));
    font-style: italic; font-size: 1.06rem; line-height: 1.5; color: #f1ead9; text-shadow: 0 1px 3px #000;
    transition: opacity 0.3s ease, transform 0.35s ease;
}
.so-cap::before { content: ""; display: block; height: 1px; margin: 0 auto 10px; width: 120px; background: linear-gradient(90deg, transparent, var(--gold, #f4c75e), transparent); }
.so-cap.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- choice */
.so-choice {
    position: absolute; left: 50%; bottom: 22px; z-index: 8; width: min(760px, calc(100% - 24px));
    transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(.2, .9, .3, 1);
}
.so-choice.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.so-choice-ask, .so-card-choice .so-choice-ask {
    text-align: center; margin-bottom: 10px; font-family: var(--font-title, serif); letter-spacing: 0.14em;
    text-transform: uppercase; font-size: 0.82rem; color: var(--gold-hi, #fff1bd); text-shadow: 0 1px 6px #000;
}
.so-choice-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.so-opt {
    position: relative; cursor: pointer; text-align: left; padding: 0; border: 0; background: none; color: inherit;
    border-radius: 14px; animation: soOptIn 0.5s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes soOptIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
.so-opt-face {
    display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 11px 14px 12px; border-radius: 14px;
    background: linear-gradient(170deg, rgba(14, 40, 52, 0.94), rgba(5, 18, 26, 0.94));
    border: 1px solid rgba(244, 199, 94, 0.32);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 241, 189, 0.12);
    transition: transform 0.18s ease, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.so-opt:hover .so-opt-face, .so-opt:focus-visible .so-opt-face {
    transform: translateY(-3px); border-color: var(--gold, #f4c75e);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(244, 199, 94, 0.28), inset 0 1px 0 rgba(255, 241, 189, 0.2);
}
.so-opt:focus-visible { outline: none; }
.so-opt:active .so-opt-face { transform: translateY(0) scale(0.98); }
.so-opt-icon { font-size: 1.25rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(255, 220, 140, 0.35)); }
.so-opt-lbl { font-family: var(--font-prose, serif); font-size: 1.02rem; line-height: 1.28; color: #fbf4e2; }
.so-opt-sub { font: 500 0.76rem var(--font-ui, sans-serif); color: var(--frost, #5fe0dc); opacity: 0.85; letter-spacing: 0.02em; }
.so-opt-lock { font: 600 0.72rem var(--font-ui, sans-serif); color: #e7b9a8; }
.so-opt.is-locked { cursor: not-allowed; }
.so-opt.is-locked .so-opt-face { filter: grayscale(0.7) brightness(0.65); }
.so-opt.is-risky .so-opt-face { border-color: rgba(255, 120, 140, 0.45); }
.so-opt.is-known .so-opt-face { border-color: var(--frost, #5fe0dc); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 14px rgba(95, 224, 220, 0.3); }
.so-opt.is-known .so-opt-sub::after { content: " ✓"; }
.so-opt.is-legend .so-opt-face { background: linear-gradient(170deg, rgba(52, 38, 14, 0.94), rgba(20, 14, 6, 0.94)); }
.so-opt.is-picked .so-opt-face { border-color: var(--gold-hi, #fff1bd); box-shadow: 0 0 0 2px rgba(255, 241, 189, 0.5), 0 0 30px rgba(244, 199, 94, 0.5); transform: scale(1.04); }

/* cards: face down first, they turn over when they arrive */
.is-cards .so-choice-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); perspective: 900px; }
.is-cards .so-opt { min-height: 168px; transform-style: preserve-3d; animation: soCardDeal 0.9s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * 120ms); }
.is-cards .so-opt-face, .is-cards .so-opt-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.is-cards .so-opt-face { justify-content: center; text-align: center; align-items: center; padding: 14px 10px; }
.is-cards .so-opt-icon { font-size: 1.6rem; }
.so-opt-back {
    display: grid; place-content: center; gap: 6px; text-align: center; border-radius: 14px; transform: rotateY(180deg);
    background:
        repeating-linear-gradient(135deg, rgba(244, 199, 94, 0.08) 0 6px, transparent 6px 12px),
        linear-gradient(160deg, #0d3a46, #062029);
    border: 1px solid rgba(244, 199, 94, 0.55); box-shadow: inset 0 0 0 4px rgba(4, 18, 24, 0.9), inset 0 0 0 5px rgba(244, 199, 94, 0.35);
}
.so-opt-back i { font-style: normal; font-size: 1.8rem; color: var(--gold, #f4c75e); }
.so-opt-back b { font: 700 0.72rem var(--font-title, serif); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-hi, #fff1bd); }
@keyframes soCardDeal {
    0% { opacity: 0; transform: translateY(60px) rotateY(180deg) rotateZ(-6deg); }
    45% { opacity: 1; transform: translateY(0) rotateY(180deg) rotateZ(0); }
    100% { opacity: 1; transform: rotateY(0); }
}
.is-cards .so-opt.is-light .so-opt-face { border-color: rgba(95, 224, 220, 0.5); }
.is-cards .so-opt.is-deep .so-opt-face { border-color: rgba(176, 140, 255, 0.5); }
.is-cards .so-opt.is-risky .so-opt-face { border-color: rgba(255, 120, 140, 0.6); }

/* the result banner */
.is-result { width: min(520px, calc(100% - 24px)); }
.so-res {
    display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 16px;
    background: linear-gradient(170deg, rgba(14, 40, 52, 0.95), rgba(5, 18, 26, 0.95));
    border: 1px solid rgba(244, 199, 94, 0.45); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
    animation: soOptIn 0.5s cubic-bezier(.2, .9, .3, 1) both;
}
.is-hit .so-res { border-color: var(--gold, #f4c75e); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 32px rgba(244, 199, 94, 0.3); }
.is-miss .so-res { border-color: rgba(160, 190, 220, 0.4); }
.so-res-face { --c: #e9c47a; flex: none; width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--c); overflow: hidden; box-shadow: 0 0 14px color-mix(in srgb, var(--c) 50%, transparent); }
.so-res-face img { width: 100%; height: 100%; object-fit: cover; }
.so-res-title { display: block; font: 700 0.92rem var(--font-title, serif); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-hi, #fff1bd); margin-bottom: 6px; }
.is-miss .so-res-title { color: #cfe0f0; }
.so-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.so-chip { padding: 3px 9px; border-radius: 999px; font: 600 0.74rem var(--font-ui, sans-serif); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); color: #e9e3d4; }
.so-chip.is-up { color: #ffe29a; border-color: rgba(244, 199, 94, 0.4); }
.so-chip.is-down { color: #ffb6b6; border-color: rgba(255, 130, 130, 0.35); }
.so-chip.is-disc { color: var(--frost, #5fe0dc); border-color: rgba(95, 224, 220, 0.5); background: rgba(95, 224, 220, 0.08); }
.so-chip.is-mem { color: #ffd2e2; border-color: rgba(255, 150, 190, 0.45); background: rgba(255, 150, 190, 0.08); }
.so-chip.is-meter { letter-spacing: 0.06em; }
.so-go {
    display: block; margin: 12px auto 0; padding: 10px 30px; border-radius: 999px; cursor: pointer;
    background: var(--gold-leaf, linear-gradient(180deg, #fff5cf, #fbd977 30%, #eab347 62%, #c88a26));
    color: #2a1a06; border: 0; font: 700 0.92rem var(--font-ui, sans-serif); letter-spacing: 0.06em;
    box-shadow: var(--shadow-btn, 0 6px 22px rgba(242, 184, 75, 0.28));
}
.so-go:hover, .so-go:focus-visible { filter: brightness(1.08); outline: 2px solid var(--frost, #5fe0dc); outline-offset: 2px; }

/* ---------------------------------------------------------------- pops */
.so-pops, .so-card-pops { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.so-pop {
    position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
    font: 700 1.9rem var(--font-title, serif); letter-spacing: 0.06em; color: #fff; white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 18px rgba(95, 224, 220, 0.6);
    animation: soPop 1.3s cubic-bezier(.2, 1.3, .4, 1) forwards;
}
.so-pop.is-at { top: 0; }
.so-pop.is-gold { color: var(--gold-hi, #fff1bd); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 22px rgba(244, 199, 94, 0.95); }
.so-pop.is-bad { color: #ffd0c8; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 120, 110, 0.7); font-size: 1.5rem; }
.so-pop.is-small { font-size: 1.15rem; top: 22%; }
@keyframes soPop {
    0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); }
    18% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
    30% { transform: translate(-50%, -50%) scale(1); }
    75% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -110%) scale(0.96); }
}

/* ---------------------------------------------------------------- games */
.so-game { position: absolute; inset: 0; z-index: 4; display: none; }
.so-game.is-on { display: block; }
.so-game.is-hintonly, .so-game.is-g-glint { pointer-events: none; }
.so-hint {
    position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2; pointer-events: none;
    padding: 8px 16px; border-radius: 999px; white-space: normal; text-align: center; max-width: calc(100% - 28px);
    background: rgba(4, 14, 20, 0.72); border: 1px solid rgba(95, 224, 220, 0.4);
    font: 500 0.86rem var(--font-ui, sans-serif); color: #e2fcf8; letter-spacing: 0.02em;
    animation: soOptIn 0.5s ease both; transition: opacity 0.6s ease;
}
.so-hint.is-top { top: 60px; bottom: auto; }
.so-hint.is-fade { opacity: 0.35; }
.so-hint.is-pulse { animation: soPulse 1s ease-in-out infinite; }
@keyframes soPulse { 50% { border-color: var(--gold, #f4c75e); box-shadow: 0 0 18px rgba(244, 199, 94, 0.45); } }
.so-combo { position: absolute; right: 22px; top: 58px; font: 800 1.6rem var(--font-title, serif); color: var(--gold-hi, #fff1bd); text-shadow: 0 0 14px rgba(244, 199, 94, 0.8); }

/* clink: a still gold ring and one that closes in on it */
.so-ring-target, .so-ring-moving, .so-beat-target, .so-beat-ring {
    position: absolute; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none;
}
.so-ring-target { border: 3px solid rgba(244, 199, 94, 0.85); box-shadow: 0 0 18px rgba(244, 199, 94, 0.45), inset 0 0 18px rgba(244, 199, 94, 0.25); transition: box-shadow 0.12s, border-color 0.12s; }
.so-ring-target.is-hot { border-color: #fff1bd; box-shadow: 0 0 34px rgba(255, 230, 160, 0.95), inset 0 0 26px rgba(255, 230, 160, 0.5); }
.so-ring-moving { --s: 2; border: 2px solid rgba(95, 224, 220, 0.9); box-shadow: 0 0 14px rgba(95, 224, 220, 0.55); }
.so-ring-moving { transform-origin: 50% 50%; }


/* pour: the gauge and the big hold button */
.so-gauge {
    position: absolute; right: max(18px, 6vw); top: 50%; transform: translateY(-50%); width: 26px; height: min(52vh, 300px);
    border-radius: 14px; background: rgba(4, 14, 20, 0.7); border: 1px solid rgba(244, 199, 94, 0.4); overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.so-gauge-band { position: absolute; left: 0; right: 0; background: rgba(244, 199, 94, 0.35); border-top: 2px solid #fff1bd; border-bottom: 2px solid #fff1bd; box-shadow: 0 0 14px rgba(244, 199, 94, 0.6); }
.so-gauge-fill { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 0; border-radius: 10px; background: linear-gradient(0deg, #8a3c0e, #d9822b 70%, #ffd28a); }
.so-gauge.is-in { border-color: #fff1bd; box-shadow: 0 0 22px rgba(244, 199, 94, 0.7); }
.so-holdbtn, .so-stroke {
    position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); width: 108px; height: 108px; border-radius: 50%;
    border: 2px solid rgba(244, 199, 94, 0.8); cursor: pointer; color: var(--gold-hi, #fff1bd);
    background: radial-gradient(circle at 50% 38%, rgba(30, 80, 92, 0.95), rgba(4, 20, 28, 0.95));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 22px rgba(244, 199, 94, 0.3);
    font: 700 0.86rem var(--font-ui, sans-serif); letter-spacing: 0.04em; touch-action: none;
    transition: transform 0.1s, box-shadow 0.15s;
}
.so-holdbtn.is-down { transform: translateX(-50%) scale(0.93); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 36px rgba(244, 199, 94, 0.7); }

/* rhythm */
.so-beat-target { border: 3px solid rgba(255, 158, 199, 0.85); box-shadow: 0 0 20px rgba(255, 140, 190, 0.5); width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.so-beat-target.is-hot { box-shadow: 0 0 36px rgba(255, 200, 230, 0.95); border-color: #fff; }
.so-beat-ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; border: 2px solid rgba(255, 210, 140, 0.95); box-shadow: 0 0 12px rgba(255, 210, 140, 0.6); }
.so-beat-ring.is-hit { border-color: #fff; animation: soBurst 0.3s ease-out forwards; }
.so-beat-ring.is-miss { border-color: rgba(160, 190, 220, 0.6); opacity: 0.4 !important; }
@keyframes soBurst { to { opacity: 0; } }

/* sway */
.so-sway { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(460px, calc(100% - 40px)); height: 64px; touch-action: none; }
.so-sway-arc { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: linear-gradient(90deg, transparent, rgba(244, 199, 94, 0.6), transparent); border-radius: 2px; }
.so-sway-theirs, .so-sway-mine { position: absolute; top: 31px; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; }
.so-sway-theirs { border: 2px dashed rgba(255, 158, 199, 0.85); background: rgba(255, 158, 199, 0.08); }
.so-sway-mine { width: 22px; height: 22px; margin: -11px 0 0 -11px; background: radial-gradient(circle, #fff1bd, #f4c75e 60%, #b97a1c); box-shadow: 0 0 14px rgba(244, 199, 94, 0.9); }
.so-sway.is-in .so-sway-theirs { border-style: solid; border-color: #ffc0d6; box-shadow: 0 0 20px rgba(255, 158, 199, 0.8); }
.so-sway-glow { position: absolute; inset: -30px -10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 170, 140, 0.25), transparent); opacity: 0; pointer-events: none; }

/* breath */
.so-breath { --s: 0.6; position: absolute; left: 50%; top: 50%; width: min(46vmin, 260px); height: min(46vmin, 260px); transform: translate(-50%, -50%) scale(var(--s)); border-radius: 50%; touch-action: none; cursor: pointer; }
.so-breath-guide { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 210, 160, 0.7); box-shadow: 0 0 24px rgba(255, 190, 130, 0.35), inset 0 0 30px rgba(255, 190, 130, 0.18); }
.so-breath-core { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 170, 0.55), rgba(255, 150, 120, 0.12) 70%, transparent); opacity: 0.3; transition: opacity 0.3s; }
.so-breath.is-sync .so-breath-guide { border-color: #ffe2c4; box-shadow: 0 0 40px rgba(255, 190, 130, 0.75), inset 0 0 40px rgba(255, 190, 130, 0.35); }
.so-breath:not(.is-sync) .so-breath-guide { border-color: rgba(150, 190, 230, 0.6); }
.so-breath.is-down .so-breath-core { background: radial-gradient(circle, rgba(255, 230, 190, 0.8), rgba(255, 160, 120, 0.2) 70%, transparent); }

/* hots: things you tap in the world */
.so-hot {
    position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; padding: 0; border: 0; background: none;
    cursor: pointer; pointer-events: auto; border-radius: 50%; transition: opacity 0.4s;
}
.so-hot.is-off { opacity: 0; pointer-events: none; }
.so-hot.is-done { opacity: 0; transform: scale(1.6) !important; transition: opacity 0.4s, transform 0.4s; }
.so-hot-glow { position: absolute; inset: 22px; border-radius: 50%; background: radial-gradient(circle, #fff, rgba(255, 240, 200, 0.9) 30%, rgba(255, 220, 140, 0) 70%); animation: soTwinkle 1.4s ease-in-out infinite; }
@keyframes soTwinkle { 0%, 100% { transform: scale(0.85); opacity: 0.8; } 50% { transform: scale(1.25); opacity: 1; } }
.so-hot.is-star .so-hot-glow { inset: 20px; box-shadow: 0 0 22px 8px rgba(207, 232, 255, 0.55); }
.so-hot.is-star.is-mine .so-hot-glow { background: radial-gradient(circle, #fff, #ffe29a 35%, rgba(244, 199, 94, 0) 72%); box-shadow: 0 0 34px 12px rgba(244, 199, 94, 0.7); }
.so-hot.is-star.is-theirs .so-hot-glow { background: radial-gradient(circle, #fff, #ffc0d6 35%, rgba(255, 158, 199, 0) 72%); box-shadow: 0 0 30px 10px rgba(255, 158, 199, 0.6); }
.so-hot.is-spawn { pointer-events: none; }
.so-hot.is-spawn.is-star .so-hot-glow { inset: 26px; box-shadow: -40px 10px 30px 2px rgba(220, 235, 255, 0.35), 0 0 18px 6px rgba(230, 240, 255, 0.8); }
.so-hot.is-spawn.is-dolphins .so-hot-glow { background: radial-gradient(circle, #e6ffff, rgba(85, 224, 216, 0.85) 35%, rgba(85, 224, 216, 0) 72%); box-shadow: 0 0 30px 12px rgba(85, 224, 216, 0.55); animation-duration: 0.6s; }
.so-hot.is-spawn.is-light .so-hot-glow { inset: 28px; background: radial-gradient(circle, #fff, #ffd28a 40%, transparent 72%); animation: soBlink 0.9s steps(2) infinite; }
@keyframes soBlink { 50% { opacity: 0.1; } }
.so-hot.is-glint { pointer-events: auto; }
.so-hot.is-glint .so-hot-glow { background: radial-gradient(circle, #fff, rgba(200, 250, 255, 0.95) 25%, rgba(120, 230, 240, 0) 70%); animation-duration: 0.5s; }
.so-hot.is-got .so-hot-glow { animation: none; transform: scale(2); opacity: 0; transition: all 0.4s; }
.so-constel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity 0.6s; }
.so-constel line { stroke: rgba(255, 230, 190, 0.75); stroke-width: 1.5; stroke-dasharray: 4 5; filter: drop-shadow(0 0 4px rgba(255, 220, 160, 0.9)); animation: soDash 2s linear infinite; }
@keyframes soDash { to { stroke-dashoffset: -18; } }

/* swim */
.so-race { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); width: min(420px, calc(100% - 40px)); height: 26px; border-radius: 13px; background: linear-gradient(90deg, rgba(25, 184, 191, 0.25), rgba(25, 184, 191, 0.08)); border: 1px solid rgba(95, 224, 220, 0.45); }
.so-race-me, .so-race-them { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 0; border-radius: 50%; }
.so-race-me { background: radial-gradient(circle, #fff1bd, #f4c75e); box-shadow: 0 0 10px rgba(244, 199, 94, 0.9); }
.so-race-them { background: radial-gradient(circle, #ffd6e6, #ff8fb0); box-shadow: 0 0 10px rgba(255, 143, 176, 0.9); margin-top: -2px; opacity: 0.9; }
.so-race-flag { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); font-style: normal; }
.so-stroke { left: auto; transform: none; bottom: 70px; width: 96px; height: 96px; font-size: 1.6rem; }
.so-stroke.is-l { left: max(16px, 8vw); }
.so-stroke.is-r { right: max(16px, 8vw); }
.so-stroke.is-hit { transform: scale(0.9); box-shadow: 0 0 34px rgba(95, 224, 220, 0.8); }

/* a screen spawn (games without a world point) */
.so-spawn { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; cursor: pointer;
    background: radial-gradient(circle, #fff, rgba(200, 250, 255, 0.9) 25%, transparent 70%); animation: soTwinkle 0.6s ease-in-out infinite; }
.so-spawn.is-star { background: radial-gradient(circle, #fff, rgba(230, 240, 255, 0.95) 30%, transparent 70%); }
.so-spawn.is-light { background: radial-gradient(circle, #fff, #ffd28a 40%, transparent 72%); animation: soBlink 0.9s steps(2) infinite; }
.so-spawn.is-got { transform: scale(2); opacity: 0; transition: all 0.4s; }
.so-spawn.is-gone { opacity: 0; transition: opacity 0.4s; }

/* ================================================================== CARD */
body.social-carded #arenaNav, body.social-carded #arenaActions { visibility: hidden; }
.so-card-wrap {
    position: fixed; inset: 0; z-index: 7900; display: none; align-items: center; justify-content: center; padding: 14px;
    background: radial-gradient(120% 90% at 50% 50%, rgba(2, 12, 19, 0.55), rgba(2, 10, 16, 0.88));
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; transition: opacity 0.35s ease;
}
html[data-perf="save"] .so-card-wrap { backdrop-filter: none; -webkit-backdrop-filter: none; }
.so-card-wrap.is-in { opacity: 1; }
.so-card {
    position: relative; width: min(560px, 100%); max-height: calc(100vh - 28px); overflow: hidden auto; border-radius: 22px;
    background: linear-gradient(180deg, rgba(8, 30, 41, 0.98), rgba(3, 14, 21, 0.98));
    border: 1px solid transparent; background-clip: padding-box;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(244, 199, 94, 0.35), 0 0 40px rgba(25, 184, 191, 0.12);
    transform: translateY(26px) scale(0.97); transition: transform 0.45s cubic-bezier(.2, .9, .3, 1);
    scrollbar-width: thin;
}
.so-card-wrap.is-in .so-card { transform: none; }
.so-card-img {
    position: relative; height: clamp(120px, 26vh, 210px); background-size: cover; background-position: center 55%;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent);
    animation: soKen 14s ease-in-out infinite alternate;
}
@keyframes soKen { from { background-position: center 50%; } to { background-position: center 62%; } }
.so-card-waves {
    position: absolute; left: 0; right: 0; bottom: 0; height: 40px; opacity: 0.55;
    background:
        radial-gradient(28px 10px at 14px 100%, rgba(95, 224, 220, 0.35) 98%, transparent) 0 0 / 28px 40px repeat-x;
    animation: soWaves 6s linear infinite;
}
@keyframes soWaves { to { background-position: 56px 0; } }
.so-card-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: -26px; position: relative; padding: 0 18px; }
.so-card-icon { font-size: 1.3rem; filter: drop-shadow(0 0 8px rgba(255, 220, 140, 0.6)); }
.so-card-title {
    margin: 0; font: 700 1.25rem var(--font-title, serif); letter-spacing: 0.12em; text-transform: uppercase;
    background: var(--gold-leaf, linear-gradient(180deg, #fff5cf, #eab347)); -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.so-card-steps { font: 500 0.74rem var(--font-ui, sans-serif); color: var(--frost, #5fe0dc); }
.so-card-steps:empty { display: none; }
.so-card-faces { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 14px 0 24px; }
.so-cface { --c: #e9c47a; position: relative; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent); transition: scale 0.3s cubic-bezier(.2, 1.3, .4, 1); }
.so-cface img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.so-cface b { display: grid; place-items: center; height: 100%; color: var(--c); font-family: var(--font-title, serif); }
.so-cface-name { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 4px); white-space: nowrap; font: 600 0.62rem var(--font-title, serif); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; }
.so-cface-name em { color: var(--gold-hi, #fff1bd); font-style: normal; }
.so-cface.is-talking { scale: 1.12; }
.so-cface.is-bump { animation: soBump 0.45s cubic-bezier(.2, 1.4, .4, 1); }
.so-cface-link { color: var(--gold, #f4c75e); opacity: 0.8; animation: soTwinkle 2s ease-in-out infinite; }
.so-card-stage { position: relative; min-height: 0; margin: 0 16px; }
.so-card-wrap.is-playing .so-card-stage { min-height: 240px; }
.so-card-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.so-card-game { position: relative; display: none; height: 240px; border-radius: 16px; overflow: hidden; touch-action: none;
    background: radial-gradient(120% 90% at 50% 30%, rgba(25, 184, 191, 0.18), rgba(3, 16, 24, 0.6)); border: 1px solid rgba(95, 224, 220, 0.2); }
.so-card-game.is-on { display: block; }
.so-card-game .so-hint { bottom: 8px; font-size: 0.78rem; padding: 5px 12px; }
.so-card-game .so-holdbtn { bottom: 34px; width: 84px; height: 84px; left: 28%; }
.so-card-game .so-gauge { right: 18%; height: 180px; }
.so-card-game .so-sway { bottom: 40px; }
.so-card-game .so-race { top: 12px; }
.so-card-game .so-stroke { bottom: 40px; width: 74px; height: 74px; }
.so-card-game .so-combo { top: 10px; right: 12px; }
.so-card-game.is-g-stars { background: radial-gradient(130% 100% at 50% 0%, #0d2a4a, #030a14); }
.so-card-game.is-g-stars::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 12% 30%, #fff, transparent), radial-gradient(1px 1px at 72% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 44% 62%, #cfe8ff, transparent), radial-gradient(1px 1px at 86% 70%, #fff, transparent), radial-gradient(1px 1px at 26% 80%, #fff, transparent), radial-gradient(1px 1px at 58% 42%, #fff, transparent); opacity: 0.8; }
.so-star { position: absolute; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 0; cursor: pointer;
    background: radial-gradient(circle, #fff, rgba(220, 235, 255, 0.9) 25%, transparent 70%); animation: soTwinkle 1.6s ease-in-out infinite; }
.so-star.is-mine { background: radial-gradient(circle, #fff, #ffe29a 35%, transparent 72%); transform: scale(1.4); }
/* the little props on the card */
.so-cg-clink { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; gap: 0; font-size: 3.4rem; }
.so-cg-clink i { font-style: normal; display: inline-block; transition: transform 0.05s linear; }
.so-cg-clink.is-hit { animation: soBump 0.4s ease; }
.so-cg-glass { position: absolute; left: 50%; top: 18%; width: 120px; height: 150px; transform: translateX(-50%); }
.so-cg-cup { position: absolute; left: 30px; bottom: 0; width: 60px; height: 76px; border: 2px solid rgba(230, 245, 255, 0.6); border-top: 0; border-radius: 0 0 12px 12px; overflow: hidden; background: rgba(230, 245, 255, 0.06); }
.so-cg-liq { position: absolute; left: 0; right: 0; bottom: 0; height: 0; opacity: 0.85; }
.so-cg-bottle { position: absolute; left: 66px; top: -6px; width: 22px; height: 58px; border-radius: 6px 6px 8px 8px; background: linear-gradient(90deg, #2a1608, #5a3416); transform-origin: 50% 80%; transform: rotate(10deg); transition: transform 0.25s; }
.so-cg-glass.is-pouring .so-cg-bottle { transform: rotate(118deg) translate(-6px, 4px); }
.so-cg-stream { position: absolute; left: 58px; top: 44px; width: 4px; height: 0; background: #b0601e; border-radius: 2px; transition: height 0.15s; }
.so-cg-glass.is-pouring .so-cg-stream { height: 70px; }
.so-cg-glass.is-spill .so-cg-cup { box-shadow: 0 8px 0 -2px rgba(176, 96, 30, 0.6); }
.so-cg-dancer, .so-cg-pair { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); }
.so-cg-dancer img, .so-cg-pair img { width: 70px; height: 70px; border-radius: 50%; border: 2px solid var(--gold, #f4c75e); object-fit: cover; }
.so-cg-dancer.is-bop { animation: soBump 0.3s ease; }
.so-cg-pair { display: flex; gap: 0; transition: transform 0.1s linear; }
.so-cg-pair span { display: block; margin: 0 -8px; }

.so-card-talk { min-height: 0; margin: 12px 18px 0; cursor: pointer; }
.so-card-talk:not(.is-on) { display: none; }
.so-ctalk { --c: #e9c47a; position: relative; margin: 0; padding: 12px 16px 14px; border-radius: 14px; font-family: var(--font-prose, Georgia, serif); font-size: 1.06rem; line-height: 1.45; color: #f6efdf;
    background: rgba(255, 255, 255, 0.04); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); animation: soOptIn 0.35s ease both; }
.so-ctalk b { display: block; font: 600 0.68rem var(--font-title, serif); letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); margin-bottom: 2px; }
.so-ctalk.is-prose { font-style: italic; text-align: center; border-color: rgba(244, 199, 94, 0.25); background: none; color: #efe6d2; }
.so-card-choice { margin: 12px 16px 16px; display: none; }
.so-card-choice.is-on { display: block; animation: soOptIn 0.4s ease both; }
.so-card-choice .so-choice-opts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.so-card-choice.is-cards .so-choice-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.so-card-choice.is-cards .so-opt { min-height: 150px; }
.so-card-choice.is-result .so-res { animation: none; }
.so-card-skip { position: absolute; right: 12px; top: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer; background: rgba(4, 14, 20, 0.6);
    color: rgba(243, 239, 230, 0.8); border: 1px solid rgba(255, 255, 255, 0.18); font: 600 0.74rem var(--font-ui, sans-serif); z-index: 3; }
.so-card-skip:hover { background: rgba(244, 199, 94, 0.25); color: #fff; }

/* ======================================================== the dossier */
.soc-dsr h4 { color: var(--gold-hi, #fff1bd); }
.soc-dsr-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.soc-dsr-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(244, 199, 94, 0.14); }
.soc-dsr-k { flex: none; min-width: 9.5em; font: 600 0.78rem var(--font-ui, sans-serif); color: var(--frost, #5fe0dc); }
.soc-dsr-v { color: #f3ead6; }
.soc-dsr-row.is-like .soc-dsr-k { color: #ff9ec7; }
.soc-dsr-row.is-hate .soc-dsr-k { color: #c9d6e2; }
.soc-dsr-row.is-star .soc-dsr-v { color: var(--gold-hi, #fff1bd); text-shadow: 0 0 10px rgba(244, 199, 94, 0.5); }
.soc-dsr-unknown { display: flex; gap: 8px; margin: 8px 0 0; }
.soc-dsr-unknown i { font-style: normal; padding: 2px 10px; border-radius: 999px; border: 1px dashed rgba(244, 199, 94, 0.35); color: rgba(244, 199, 94, 0.6); font: 600 0.74rem var(--font-ui, sans-serif); letter-spacing: 0.1em; }

/* ================================================================ phone */
@media (max-width: 640px) {
    .so-face { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
    .so-face.is-big { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
    .so-bubble { font-size: 0.96rem; padding: 9px 13px 11px; }
    .so-cap { font-size: 0.96rem; bottom: 16px; padding: 12px 14px 14px; }
    .so-choice { bottom: 12px; }
    .so-choice-opts { grid-template-columns: 1fr 1fr; gap: 8px; }
    .is-cards .so-choice-opts, .so-card-choice.is-cards .so-choice-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .is-cards .so-opt, .so-card-choice.is-cards .so-opt { min-height: 140px; }
    .is-cards .so-opt-lbl { font-size: 0.86rem; }
    .so-opt-lbl { font-size: 0.94rem; }
    .so-opt-face { padding: 9px 11px 10px; }
    .so-top { top: 10px; font-size: 0.64rem; padding: 5px 12px; }
    .so-skip { top: 50px; right: 10px; }
    .so-pop { font-size: 1.5rem; }
    .so-holdbtn { width: 92px; height: 92px; bottom: 60px; }
    .so-stroke { width: 84px; height: 84px; }
    .so-card { border-radius: 18px; }
    .so-card-title { font-size: 1.02rem; }
}
@media (max-height: 520px) {
    .so-card-img { height: 96px; }
    .so-choice-opts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .so-opt-sub { display: none; }
    .is-cards .so-opt { min-height: 118px; }
}
html[data-motion="none"] .so-stage *, html[data-motion="none"] .so-card-wrap * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
    .so-card-img, .so-card-waves, .so-hot-glow, .so-cface-link { animation: none; }
}

/* the pour on the yacht: the button to the side, the glass in the middle stays visible */
.so-game.is-g-pour .so-holdbtn { left: max(70px, 16%); }
.so-hot.is-glint .so-hot-glow { inset: 14px; box-shadow: 0 0 26px 8px rgba(200, 250, 255, 0.55); }

/* the speaker's face in the bubble, and the stem from its tail to their head */
.so-bubble-name { display: flex; align-items: center; gap: 6px; }
.so-bubble-face { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid var(--c); flex: none; }
.so-stem {
    position: absolute; z-index: 4; width: 2px; margin-left: -1px; height: 0; left: 0; top: 0;
    transform-origin: 50% 0; pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
    background: linear-gradient(180deg, color-mix(in srgb, var(--c, #e9c47a) 80%, transparent), color-mix(in srgb, var(--c, #e9c47a) 20%, transparent));
}
.so-stem.is-on { opacity: 0.9; }
