/* MemeWeft — built on ww2-tokens.css + the shared .btn/.input-field rules in style.css. */

body.mw {
    font-family: var(--ww-body);
    background: var(--ww-bg-0) var(--ww-surface-glow) no-repeat;
}

.mw-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: calc(16px + var(--safe-top)) 16px calc(32px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.mw-wrap-wide { max-width: 640px; }

.mw-topbar { display: flex; align-items: center; justify-content: space-between; }
.mw-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.mw-linkbtn { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }
.mw-icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
}

/* hero */
.mw-hero { text-align: center; padding: 18px 0 4px; }
.mw-hero-small { padding-top: 8px; }
.mw-logo { font-size: 64px; line-height: 1; filter: drop-shadow(0 8px 24px var(--ww-violet-glow)); }
.mw-wordmark {
    font-family: var(--ww-display);
    font-weight: 800;
    font-size: 44px;
    letter-spacing: -0.02em;
    margin-top: 8px;
}
.mw-wordmark span { color: var(--ww-gold); }
.mw-tagline { color: var(--text-secondary); margin-top: 4px; }

.mw-h2 { font-family: var(--ww-display); font-size: 26px; font-weight: 800; }
.mw-h3 { font-family: var(--ww-display); font-size: 17px; font-weight: 700; margin-top: 6px; }
.mw-sub, .mw-hint { color: var(--text-muted); font-size: 14px; }
.mw-dim { color: var(--text-muted); font-weight: 500; }
.mw-center { text-align: center; }
.mw-label { display: block; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.mw-error { color: var(--ww-coral); font-size: 13px; }
.mw-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
}
.mw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* profile chip + home actions */
.mw-profile-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
}
.mw-chip-avatar { font-size: 26px; }
.mw-chip-name { flex: 1; text-align: left; font-weight: 700; }
.mw-chip-edit { color: var(--text-muted); font-size: 13px; }
.mw-actions { display: flex; flex-direction: column; gap: 12px; }
.mw-join-row { display: flex; gap: 10px; }
.mw-code-input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--ww-mono);
    font-weight: 700;
}
.mw-join-btn { padding: 0 22px; height: 52px; }
.mw-watch-btn { padding: 0 12px; height: 52px; white-space: nowrap; }
.mw-watching { font-size: 13px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.mw-watching.hidden { display: none; }
.mw-spectate { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-secondary); border: 1px dashed var(--border); color: var(--text-secondary); }
.mw-card:disabled { cursor: default; opacity: 1; }
.mw-howto {
    margin-top: 8px;
    padding: 14px 16px 14px 34px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* avatar picker */
.mw-avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.mw-avatar {
    aspect-ratio: 1;
    font-size: 22px;
    border-radius: var(--radius-xs);
    border: 2px solid transparent;
    background: var(--bg-card);
    cursor: pointer;
}
.mw-avatar.on { border-color: var(--ww-violet-400); background: var(--bg-input); }

/* lobby */
.mw-code-card {
    text-align: center;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--ww-shadow-card);
}
.mw-code-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.mw-room-code {
    font-family: var(--ww-mono);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 4px 0 10px;
    color: var(--ww-gold-soft);
}
.mw-player-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mw-player {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}
.mw-player.mw-off { opacity: 0.45; }
.mw-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mw-av { font-size: 22px; }
.mw-pname { flex: 1; font-weight: 600; }
.mw-pname em { color: var(--text-muted); font-style: normal; font-weight: 500; }
.mw-tag { font-size: 11px; font-weight: 700; color: var(--ww-gold); text-transform: uppercase; }
.mw-settings { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.mw-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mw-seg { display: inline-flex; border-radius: var(--radius-xs); overflow: hidden; border: 1px solid var(--border); }
.mw-seg button {
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
}
.mw-seg button.on { background: var(--ww-violet-400); color: #fff; }

/* play */
.mw-play-head { display: flex; align-items: center; gap: 10px; }
.mw-phase { flex: 1; font-family: var(--ww-display); font-weight: 800; font-size: 18px; }
.mw-timer { font-family: var(--ww-mono); font-weight: 700; font-size: 18px; min-width: 3ch; text-align: right; }
.mw-timer.urgent { color: var(--ww-coral); }
.mw-timebar { height: 4px; border-radius: 4px; background: var(--bg-card); overflow: hidden; }
#mw-timebar-fill { height: 100%; width: 100%; background: var(--ww-violet-400); transition: width 0.4s linear; }

.mw-stage, .mw-gal-stage {
    position: relative;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--ww-shadow-raised);
}
.mw-stage img, .mw-gal-stage img {
    display: block;
    width: 100%;
    max-height: 46vh;
    object-fit: contain;
    background: #000;
}
.mw-gal-stage img { max-height: none; }
/* Classic meme lettering: white Impact with a black outline, bottom of frame. */
.mw-overlay {
    position: absolute;
    left: 4%; right: 4%; bottom: 4%;
    text-align: center;
    color: #fff;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Anton", sans-serif;
    font-size: clamp(18px, 5.2vw, 32px);
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
    -webkit-text-stroke: 1.5px #000;
    paint-order: stroke fill;
    text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000;
    pointer-events: none;
}
.mw-overlay.hidden { display: none; }

.mw-panel { display: flex; flex-direction: column; gap: 10px; }
.mw-panel.hidden { display: none; }
.mw-caption-input { resize: none; font-size: 17px; min-height: 64px; }
.mw-submit { height: 44px; padding: 0 24px; }
.mw-done { text-align: center; color: var(--ww-emerald); font-weight: 600; }

.mw-cards { display: flex; flex-direction: column; gap: 8px; }
.mw-card {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: left;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
}
.mw-card:hover:not(.own):not(.revealed) { border-color: var(--ww-violet-300); }
.mw-card:focus-visible { outline: 3px solid var(--ww-violet-200); outline-offset: 2px; }
.mw-card.own { opacity: 0.55; cursor: default; }
.mw-card.chosen { border-color: var(--ww-violet-400); background: var(--bg-input); }
.mw-card.revealed { flex-direction: column; align-items: flex-start; gap: 4px; cursor: default; }
.mw-card.winner { border-color: var(--ww-gold); box-shadow: 0 0 0 3px rgba(232,166,62,0.18); }
.mw-card-letter {
    flex: none;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--bg-input);
    font-weight: 800; font-size: 13px;
}
.mw-card-text { flex: 1; overflow-wrap: anywhere; }
.mw-card-tag { flex: none; font-size: 12px; color: var(--text-muted); font-weight: 700; }
.mw-card-by { font-size: 13px; color: var(--text-muted); }

.mw-status { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mw-status li {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 20px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    opacity: 0.6;
}
.mw-status li.done { opacity: 1; border-color: var(--ww-emerald); }
.mw-status li.off { opacity: 0.25; }
.mw-status li i {
    position: absolute; right: -4px; bottom: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--ww-emerald); color: #fff;
    font-size: 11px; font-style: normal; font-weight: 800;
    display: grid; place-items: center;
}
.mw-scores { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.mw-scores.hidden { display: none; }
.mw-scores li {
    display: flex; justify-content: space-between; gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    font-size: 14px;
}
.mw-scores b { color: var(--ww-gold-soft); }
.mw-leave-play { align-self: center; }

/* final */
.mw-board { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mw-board li {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}
.mw-board li.me { outline: 2px solid var(--ww-violet-400); }
.mw-board b { font-family: var(--ww-mono); font-size: 18px; color: var(--ww-gold-soft); }
.mw-rank { width: 28px; text-align: center; font-size: 20px; }
.mw-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mw-gal-item { margin: 0; }
.mw-gal-item .mw-overlay { font-size: 18px; -webkit-text-stroke: 1px #000; }
.mw-gal-by { color: var(--text-muted); font-size: 13px; margin-top: 6px; }

.mw-toast {
    position: fixed;
    left: 50%; bottom: calc(24px + var(--safe-bottom));
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: var(--ww-bg-3);
    color: var(--text-primary);
    box-shadow: var(--ww-shadow-raised);
    font-weight: 600;
    z-index: 50;
}
.mw-toast.hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
    #mw-timebar-fill { transition: none; }
}

.mw-paused {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(232,166,62,0.12);
    border: 1px solid var(--ww-gold);
    color: var(--ww-gold-soft);
    font-weight: 600;
    font-size: 14px;
}
.mw-paused.hidden { display: none; }
.mw-tie { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ww-gold); text-transform: uppercase; margin-left: 4px; }

/* ux slice 1: contrast, tap targets, disabled states */
.mw .btn-primary { background: var(--ww-violet-cta); }
.mw .btn:disabled { opacity: 0.55; }
.mw .input-field::placeholder { color: var(--ww-ink-1); }
.mw-join-row:has(.mw-code-input:not(:placeholder-shown)) .mw-join-btn {
    background: var(--ww-violet-cta); color: #fff; border-color: transparent;
}
.mw-icon-btn { width: 44px; height: 44px; }
.mw .btn-small { min-height: 44px; padding: 0 18px; font-size: 14px; }
.mw-seg button { min-height: 44px; min-width: 56px; padding: 0 14px; }
.mw-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.mw-avatar-grid { grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mw-card.own { opacity: 0.7; }
.mw-card-tag { color: var(--text-secondary); }
#mw-vote-hint, #mw-start-hint, #mw-lobby-wait, .mw-done p { font-size: 16px; color: var(--text-secondary); }
.mw-join-row { gap: 8px; }
.mw-watch-btn { padding: 0 10px; font-size: 15px; }

/* motion */
/* ux slice 2: reveal moment */
.mw-anim .mw-card.revealed {
    animation: mw-rise 350ms cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--i) * 450ms);
}
.mw-anim .mw-card.winner.revealed { animation-name: mw-rise-win; }
.mw-anim .mw-skulls {
    display: inline-block;
    animation: mw-pop 300ms ease-out both;
    animation-delay: calc(var(--i) * 450ms + 250ms);
}
#mw-reveal-title.mw-anim, #mw-scores.mw-anim {
    animation: mw-rise 350ms cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--n, 3) * 450ms);
}
.mw-card.winner {
    position: relative;
    transform: scale(1.02);
    border-color: var(--ww-gold);
    background: rgba(232,166,62,0.10);
    box-shadow: 0 0 0 3px rgba(232,166,62,0.25), 0 12px 32px rgba(232,166,62,0.18);
}
.mw-card.winner::before {
    content: "WINNER";
    position: absolute; top: -10px; right: 12px;
    padding: 2px 10px; border-radius: 999px;
    background: var(--ww-gold); color: #160B2E;
    font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
}
#mw-reveal-title { font-size: 24px; }
@keyframes mw-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes mw-rise-win { from { opacity: 0; transform: translateY(16px) scale(1.02); } to { opacity: 1; transform: scale(1.02); } }
@keyframes mw-pop  { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.25); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .mw *, .mw *::before, .mw *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .mw-confetti { display: none; }
    .mw .mw-stamp::after { animation: none; }
}

/* ux slice 3: lobby invite flow */
.mw-code-card { padding: 22px 18px 18px; border: 1px solid rgba(232,166,62,0.25); }
.mw-room-code { font-size: 44px; cursor: pointer; border-radius: 12px; padding: 2px 8px; transition: transform 120ms; }
.mw-room-code:active, .mw-room-code.mw-copied { transform: scale(0.97); background: rgba(232,166,62,0.12); }
.mw-code-url { color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; letter-spacing: 0.04em; }
#mw-invite { width: 100%; }
#mw-lobby:not(.mw-needs-players) #mw-invite { background: transparent; color: var(--ww-violet-200); border: 2px solid var(--ww-violet-400); height: 48px; font-size: 16px; }
.mw-player.mw-empty { border: 1px dashed var(--border); background: transparent; color: var(--text-muted); }
.mw-player.mw-empty .mw-av { opacity: 0.5; }

/* ux slice 4: caption feedback and waiting state */
.mw-stamp {
    position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.mw-stamp::after {
    content: "LOCKED IN";
    font-family: Impact, Haettenschweiler, "Anton", sans-serif;
    font-size: clamp(28px, 9vw, 56px); letter-spacing: 0.04em;
    color: var(--ww-gold-soft); border: 4px solid var(--ww-fuchsia);
    padding: 6px 18px; border-radius: 12px; transform: rotate(-8deg);
    background: rgba(22,11,46,0.55);
    animation: mw-stamp 1200ms ease-out both;
}
.mw-stamp.hidden { display: none; }
@keyframes mw-stamp { 0% { transform: rotate(-8deg) scale(1.6); opacity: 0; } 20% { transform: rotate(-8deg) scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.mw-status li.done span { animation: mw-pop 300ms ease-out; }
.mw-status-text { color: var(--text-secondary); font-size: 15px; margin-top: -4px; }
.mw-timer.warn { color: var(--ww-gold-soft); }
#mw-timebar-fill.warn { background-color: var(--ww-gold); }
#mw-timebar-fill.urgent { background-color: var(--ww-coral); }
.mw-timebar { height: 6px; }
#mw-play:has(#mw-caption-input:focus) .mw-stage img { max-height: 28vh; }
.mw-stage img { transition: max-height 200ms ease-in-out; }

/* ux slice 5: winner celebration on the final screen */
.mw-podium { text-align: center; padding: 8px 0 4px; }
.mw-champ-av {
    width: 88px; height: 88px; margin: 0 auto 10px; border-radius: 50%;
    display: grid; place-items: center; font-size: 52px;
    background: var(--ww-bg-2); border: 4px solid var(--ww-gold);
    box-shadow: 0 0 0 8px rgba(232,166,62,0.15), 0 12px 40px rgba(232,166,62,0.25);
    animation: mw-pop 600ms cubic-bezier(.2,.8,.2,1) both;
}
.mw-final-title { font-size: 34px; line-height: 1.1; animation: mw-rise 350ms 200ms both; }
.mw-board li:first-child { padding: 16px 14px; background: rgba(232,166,62,0.10); border: 1px solid rgba(232,166,62,0.35); }
.mw-board li:first-child .mw-pname { font-size: 20px; font-weight: 800; }
.mw-board li:first-child b { font-size: 26px; }
.mw-board li:first-child .mw-av { font-size: 30px; }
.mw-eyebrow-h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ww-violet-200); margin-top: 16px; }
.mw-gallery { grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .mw-gallery { grid-template-columns: repeat(2, 1fr); } }
.mw-gal-item .mw-overlay { font-size: clamp(18px, 5vw, 28px); }
.mw-final-actions {
    position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 8px;
    padding: 12px 0 calc(12px + var(--safe-bottom));
    background: linear-gradient(to bottom, transparent, var(--bg-primary) 24%);
}
/* Keep the last tile's share icon clear of the sticky action bar (about 140px tall). */
#mw-final .mw-gallery { padding-bottom: calc(140px + var(--safe-bottom)); }
#mw-final-share { box-shadow: var(--ww-shadow-violet); }
#mw-final-share[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.mw-gal-share {
    position: absolute; top: 4px; right: 4px; width: 44px; height: 44px;
    display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
    background: rgba(22,11,46,0.65); color: #fff; cursor: pointer;
}
.mw-gal-share svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mw-gal-share:hover, .mw-gal-share:focus-visible { background: var(--ww-violet-400); }
.mw-gal-share[aria-busy="true"] { opacity: 0.5; cursor: progress; }

.mw-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.mw-confetti i {
    position: absolute; top: -12px; left: calc(var(--x) * 1%);
    width: 10px; height: 14px; border-radius: 2px;
    background: var(--ww-gold);
    animation: mw-fall 2.8s cubic-bezier(.3,.6,.6,1) var(--d) 1 both;
}
.mw-confetti i:nth-child(3n) { background: var(--ww-fuchsia); }
.mw-confetti i:nth-child(4n) { background: var(--ww-violet-300); width: 8px; height: 8px; border-radius: 50%; }
@keyframes mw-fall { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(105vh) rotate(720deg); opacity: 0.6; } }
.mw-confetti i:nth-child(1) { --x: 4; --d: 0ms; }
.mw-confetti i:nth-child(2) { --x: 9; --d: 150ms; }
.mw-confetti i:nth-child(3) { --x: 13; --d: 300ms; }
.mw-confetti i:nth-child(4) { --x: 18; --d: 450ms; }
.mw-confetti i:nth-child(5) { --x: 22; --d: 600ms; }
.mw-confetti i:nth-child(6) { --x: 27; --d: 750ms; }
.mw-confetti i:nth-child(7) { --x: 31; --d: 0ms; }
.mw-confetti i:nth-child(8) { --x: 36; --d: 150ms; }
.mw-confetti i:nth-child(9) { --x: 40; --d: 300ms; }
.mw-confetti i:nth-child(10) { --x: 45; --d: 450ms; }
.mw-confetti i:nth-child(11) { --x: 49; --d: 600ms; }
.mw-confetti i:nth-child(12) { --x: 54; --d: 750ms; }
.mw-confetti i:nth-child(13) { --x: 58; --d: 0ms; }
.mw-confetti i:nth-child(14) { --x: 63; --d: 150ms; }
.mw-confetti i:nth-child(15) { --x: 67; --d: 300ms; }
.mw-confetti i:nth-child(16) { --x: 72; --d: 450ms; }
.mw-confetti i:nth-child(17) { --x: 76; --d: 600ms; }
.mw-confetti i:nth-child(18) { --x: 81; --d: 750ms; }
.mw-confetti i:nth-child(19) { --x: 85; --d: 0ms; }
.mw-confetti i:nth-child(20) { --x: 90; --d: 150ms; }
.mw-confetti i:nth-child(21) { --x: 94; --d: 300ms; }
.mw-confetti i:nth-child(22) { --x: 97; --d: 450ms; }
.mw-confetti i:nth-child(23) { --x: 50; --d: 600ms; }
.mw-confetti i:nth-child(24) { --x: 20; --d: 750ms; }

/* ux slice 6: home hierarchy and party tone */
.mw-logo { font-size: 72px; animation: mw-float 4s ease-in-out infinite; }
.mw-hero-small .mw-logo { animation: none; }
@keyframes mw-float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.mw-wordmark { font-size: 48px; }
.mw-tagline { font-size: 17px; color: var(--text-secondary); }
.mw-or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.mw-or::before, .mw-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.mw-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.mw-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: var(--radius-sm); background: var(--bg-secondary); text-align: center; font-size: 13px; font-weight: 600; color: var(--text-secondary); line-height: 1.3; }
.mw-step-ico { font-size: 26px; }
.mw-more summary { cursor: pointer; color: var(--text-muted); font-size: 14px; text-align: center; min-height: 44px; display: grid; place-items: center; }
.mw-more p { color: var(--text-secondary); font-size: 14px; text-align: center; }
.mw-profile-chip { min-height: 56px; }

@media (min-width: 900px) {
    body.mw { background:
        radial-gradient(ellipse at 15% 10%, rgba(154,135,242,0.22), transparent 45%),
        radial-gradient(ellipse at 85% 90%, rgba(232,166,62,0.14), transparent 45%),
        var(--ww-bg-0); }
    #mw-home .mw-wrap { max-width: 560px; padding-top: 48px; }
    .mw-logo { font-size: 104px; }
    .mw-wordmark { font-size: 68px; }
    .mw-tagline { font-size: 20px; }
}

/* ux slice 7: play header, phase word and timer pill */
.mw-head-left { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mw-eyebrow-round { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ww-violet-200); }
.mw-phase { font-size: 26px; line-height: 1.05; }
.mw-timer {
    font-size: 22px; min-width: 72px; height: 44px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border);
}
.mw-timer.warn { border-color: var(--ww-gold); }
.mw-timer.urgent { border-color: var(--ww-coral); animation: mw-pulse 1s ease-in-out infinite; }
@keyframes mw-pulse { 50% { transform: scale(1.08); } }

/* ux slice 8: vote cards */
.mw-card { min-height: 56px; padding: 14px 16px; font-size: 17px; line-height: 1.3; transition: transform 120ms, border-color 200ms, background 200ms; }
.mw-card:active:not(.own):not(.revealed) { transform: scale(0.98); }
.mw-card-letter { width: 36px; height: 36px; font-size: 15px; border: 2px solid var(--ww-gold); color: var(--ww-gold-soft); background: transparent; }
.mw-card.chosen { background: var(--ww-violet-600); border-color: var(--ww-violet-300); }
.mw-card.chosen .mw-card-letter { background: var(--ww-gold); color: #160B2E; }
.mw-card.chosen .mw-card-tag { color: var(--ww-gold-soft); }
#mw-vote-hint { font-weight: 600; }

/* ux slice 9: desktop play layout */
.mw-side { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) {
    #mw-play .mw-wrap-wide {
        max-width: 1100px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 400px;
        grid-template-areas: "head head" "bar bar" "paused paused" "stage side";
        column-gap: 24px; row-gap: 14px; align-items: start;
    }
    #mw-play .mw-play-head { grid-area: head; }
    #mw-play .mw-timebar { grid-area: bar; }
    #mw-play #mw-paused { grid-area: paused; }
    #mw-play .mw-stage { grid-area: stage; }
    #mw-play .mw-side { grid-area: side; position: sticky; top: 16px; }
    #mw-play .mw-stage img { max-height: 76vh; }
    .mw-overlay { font-size: clamp(22px, 2.6vw, 40px); }
    #mw-final .mw-wrap-wide { max-width: 760px; }
}
