:root {
    --bg: #050407;
    --panel: #0f0f14;
    --panel-2: #15151e;
    --line: rgba(255, 179, 0, .22);
    --text: #f3f1ea;
    --muted: #b7b0a2;

    --tw: #ffb300;
    --tw-hover: #ff7a1a;
    --tw-ring: rgba(255, 179, 0, .35);

    --radius: 14px;

    --shadow-1: 0 10px 24px rgba(0, 0, 0, .55);
    --shadow-2: 0 18px 44px rgba(0, 0, 0, .70);

    --btn-h: 40px;
    --btn-pad-x: 14px;
    --wheel-empty-bg: radial-gradient(circle at 50% 50%,
            #0f1f2a 0%,
            #0d1a25 42%,
            #0a141d 74%,
            #09111b 100%);
    --fs-indicator-gap-from-pointer: 44px;
    --fs-indicator-stack-gap: 14px;

    --edge: clamp(12px, 2.2vw, 18px);
    --edge-tight: clamp(10px, 2vw, 14px);
    --safeL: max(var(--edge), env(safe-area-inset-left));
    --safeR: max(var(--edge), env(safe-area-inset-right));
    --safeT: max(var(--edge), env(safe-area-inset-top));
    --safeB: max(var(--edge), env(safe-area-inset-bottom));
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

html {
    min-height: calc(var(--vh, 1vh)*100);
    height: auto;
    overscroll-behavior-y: none;
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    color: var(--text);
    font-family: "Share Tech Mono", ui-sans-serif, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* background:
        radial-gradient(1200px 700px at 15% -10%, rgba(255, 179, 0, .12), transparent 62%),
        radial-gradient(900px 650px at 92% 8%, rgba(255, 122, 26, .10), transparent 65%),
        linear-gradient(180deg, #040308 0%, #070511 55%, #040308 100%);
    */
    position: relative;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .24;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 11px),
        radial-gradient(1px 1px at 18% 22%, rgba(255, 255, 255, .22), transparent 60%),
        radial-gradient(1px 1px at 76% 64%, rgba(255, 255, 255, .16), transparent 60%),
        radial-gradient(1px 1px at 92% 18%, rgba(255, 255, 255, .20), transparent 60%);
}

h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #ffbd3a;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, .85),
        2px 0 0 rgba(0, 0, 0, .85),
        -2px 0 0 rgba(0, 0, 0, .85),
        0 -2px 0 rgba(0, 0, 0, .85);
    transform: skewX(-8deg);
}

.muted {
    color: var(--muted);
    font-size: 12px
}

.muted b {
    color: #ffd15a
}

button,
.btn,
.smallbtn,
input,
textarea,
.tab,
.switch {
    outline: none
}

button:focus-visible,
.btn:focus-visible,
.smallbtn:focus-visible,
input:focus-visible,
textarea:focus-visible,
.tab:focus-visible {
    outline: 2px solid var(--tw-ring);
    outline-offset: 2px;
}

#celebration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
}

.app {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-height: 100vh;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-top: calc(16px + env(safe-area-inset-top));
    background: transparent;
}

.bar {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.bar-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 320px;
    margin-left: auto;
}

.bar-right .row {
    justify-content: flex-end
}

.bar-right .ctrlbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 34vw, 460px);
    flex: 1;
    min-height: 0;
}

.brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96)) padding-box,
        repeating-linear-gradient(135deg, rgba(255, 179, 0, .85) 0 10px, rgba(18, 14, 6, .85) 10px 20px) border-box;
    border: 2px solid transparent;
    box-shadow: var(--shadow-1);
    overflow: hidden;
}



.panel {
    position: relative;
    background: linear-gradient(180deg, rgba(15, 15, 20, .92), rgba(8, 8, 12, .96));
    border: 1px solid rgba(255, 179, 0, .18);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .10;
    background: repeating-linear-gradient(135deg, rgba(255, 179, 0, .18) 0 10px, transparent 10px 26px);
}

.pill {
    white-space: nowrap;
    height: var(--btn-h);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: rgba(243, 241, 234, .92);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    border: 1px solid rgba(255, 179, 0, .18);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .65);
}

.pill b#statusTxt {
    white-space: nowrap;
    display: inline-block;
    margin-left: 6px;
    color: #ffbd3a;
}

.btn,
#settings .smallbtn,
#settings .hdr .close {
    height: var(--btn-h);
    line-height: calc(var(--btn-h) - 2px);
    padding: 0 var(--btn-pad-x);
    border-radius: 12px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    appearance: none;
    -webkit-appearance: none;
    color: #1a0f03;
    border: 1px solid rgba(0, 0, 0, .75);
    background: linear-gradient(180deg, #ffd15a 0%, #ffb300 55%, #ff7a1a 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .75);
    transition: transform .06s ease, filter .12s ease;
}

.btn:hover,
#settings .smallbtn:hover,
#settings .hdr .close:hover {
    filter: brightness(1.03)
}

.btn:active,
#settings .smallbtn:active,
#settings .hdr .close:active {
    transform: translateY(1px)
}

.btn:disabled {
    opacity: .62;
    cursor: not-allowed;
    filter: saturate(.7)
}

.btn.ghost,
#settings .smallbtn.ghost {
    color: rgba(243, 241, 234, .92);
    border: 1px solid rgba(255, 179, 0, .18);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    box-shadow: 0 2px 0 rgba(0, 0, 0, .65);
}

.btn.ok,
.btn.warn {
    background: linear-gradient(180deg, #ffd15a 0%, #ffb300 55%, #ff7a1a 100%);
    border-color: rgba(0, 0, 0, .75);
    color: #1a0f03;
}

input[type=text],
input[type=number] {
    height: var(--btn-h);
    min-width: 80px;
    padding: 0 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(12, 12, 16, .94), rgba(7, 7, 10, .98));
    color: rgba(243, 241, 234, .95);
    border: 1px solid rgba(255, 179, 0, .18);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder {
    color: #9b9182
}

input:focus {
    border-color: rgba(255, 179, 0, .45)
}

textarea {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: black;
    color: rgba(243, 241, 234, .95);
    border-radius: 12px;
    padding: 5px 6px;
    border: 2px solid rgba(255, 179, 0, .18);
    resize: none;
    line-height: 1.55;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: #615a52 rgba(21, 21, 30, .9);
}

textarea::placeholder {
    color: #9b9182
}

textarea:focus {
    border-color: rgba(255, 179, 0, .45)
}

textarea::-webkit-scrollbar {
    width: 10px;
    height: 10px
}

textarea::-webkit-scrollbar-track {
    background: rgba(21, 21, 30, .9);
    border-radius: 10px
}

textarea::-webkit-scrollbar-thumb {
    background: #615a52;
    border-radius: 10px;
    border: 2px solid rgba(21, 21, 30, .9)
}

.entries-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.entries-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.entries-tools .left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.below-textarea {
    display: flex;
    width: 100%;
    margin-top: 6px;
    align-items: center;
    gap: 10px;
}

.micro-link {
    all: unset;
    font: inherit;
    color: rgba(183, 176, 162, .95);
    cursor: pointer;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.micro-link:hover {
    color: #ffbd3a;
    text-decoration: underline
}

.micro-link:focus-visible {
    outline: 2px solid var(--tw-ring);
    outline-offset: 2px;
    border-radius: 6px;
}

.micro-link.disabled {
    opacity: .6;
    pointer-events: none
}

.below-textarea .micro-group {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
}

.below-textarea .micro-group .micro-link+.micro-link {
    margin-left: 16px;
    position: relative;
}

.below-textarea .micro-group .micro-link+.micro-link::before {
    content: "·";
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(183, 176, 162, .95);
}

.channel-error {
    animation: shake .36s ease, errGlow .9s ease-out;
    border-color: #ff5c5c !important;
}

.wheel-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius);
    padding: calc(var(--edge) - 2px) calc(var(--edge) - 2px) calc(var(--edge) + 6px);
    border: 2px solid transparent;
    background:
        linear-gradient(180deg, rgba(18, 18, 24, .94), rgba(8, 8, 12, .98)) padding-box,
        repeating-linear-gradient(135deg, rgba(255, 179, 0, .90) 0 10px, rgba(18, 14, 6, .90) 10px 20px) border-box;
    box-shadow: var(--shadow-2);
}

.wheel-wrap::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 179, 0, .16);
    opacity: .95;
    pointer-events: none;
    z-index: 0;
}

.wheel-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .08;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 6px);
    z-index: 0;
}

.wheel-wrap>* {
    position: relative;
    z-index: 1
}

canvas#wheel {
    display: block;
    cursor: pointer;
    touch-action: manipulation;
    z-index: 2;
}

.pointer {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid #ffbd3a;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .85));
    z-index: 6;
}

.wheel-badges {
    position: absolute;
    top: var(--edge);
    left: var(--edge);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: min(60vw, 680px);
    z-index: 7;
    align-self: start;
    justify-self: start;
}

.cfg-badge {
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    border: 1px solid rgba(255, 179, 0, .18);
    color: rgba(243, 241, 234, .94);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .70);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.cfg-badge small {
    opacity: .85;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: .22em;
}

.wheel-timer {
    position: absolute;
    top: var(--edge);
    right: var(--edge);
    min-width: 140px;
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    color: rgba(243, 241, 234, .96);
    border: 1px solid rgba(255, 179, 0, .20);
    padding: 12px 14px;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: .12em;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .75);
    z-index: 7;
}

.wheel-timer.paused {
    opacity: .9
}

.wheel-timer.cte {
    cursor: pointer;
    background: linear-gradient(180deg, #ffd15a 0%, #ffb300 55%, #ff7a1a 100%);
    color: #1a0f03;
    text-transform: uppercase;
    border-color: rgba(0, 0, 0, .75);
}

.empty-state {
    position: absolute;
    inset: 10px;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: rgba(183, 176, 162, .95);
    text-align: center;
    font-size: 14px;
    z-index: 3;
}

.activity-feed {
    position: absolute;
    right: var(--edge);
    top: calc(var(--edge) + var(--timerHeight, 0px) + var(--timerGap, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    z-index: 7;
    pointer-events: none;
    max-width: min(70vw, 560px);
}

.activity-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    border: 1px solid rgba(255, 179, 0, .16);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .70);
    font-size: 16px;
    line-height: 1.3;
    color: rgba(243, 241, 234, .96);
    opacity: 0;
    transform: translateY(-6px) scale(.98);
    transition: opacity .2s ease, transform .2s ease;
}

.activity-item::before {
    content: "";
    width: 10px;
    height: 100%;
    border-radius: 10px;
    background: repeating-linear-gradient(135deg, rgba(255, 179, 0, .95) 0 8px, rgba(18, 14, 6, .95) 8px 16px);
}

.activity-item>span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.activity-item b {
    color: rgba(243, 241, 234, .98);
    font-weight: 900;
    border-bottom: 2px solid rgba(255, 179, 0, .45);
    padding-bottom: 1px;
}

.activity-item.enter {
    opacity: 1;
    transform: translateY(0) scale(1)
}

.activity-item.leave {
    opacity: 0;
    transform: translateY(-6px) scale(.98)
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(4px);
    z-index: 10020;
}

.modal.show {
    display: grid
}

.modal-card {
    width: min(720px, 94%);
    max-height: min(78vh, 620px);
    overflow: auto;
    background: linear-gradient(180deg, rgba(21, 21, 30, .94), rgba(10, 10, 14, .98));
    border: 1px solid rgba(255, 179, 0, .18);
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .70);
    text-align: center;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #615a52 rgba(21, 21, 30, .9);
}

.modal-card::-webkit-scrollbar {
    width: 10px
}

.modal-card::-webkit-scrollbar-track {
    background: rgba(21, 21, 30, .9);
    border-radius: 10px
}

.modal-card::-webkit-scrollbar-thumb {
    background: #615a52;
    border: 2px solid rgba(21, 21, 30, .9);
    border-radius: 10px
}

.modal-card h2 {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(243, 241, 234, .82);
    text-transform: uppercase;
    letter-spacing: .22em;
    font-weight: 900;
}

.winner {
    font-size: clamp(26px, 6vw, 52px);
    margin: 8px 0 10px;
    color: #ffbd3a;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.12;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, .85),
        2px 0 0 rgba(0, 0, 0, .85),
        -2px 0 0 rgba(0, 0, 0, .85),
        0 -2px 0 rgba(0, 0, 0, .85);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    margin: 8px auto;
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    border: 2px solid rgba(255, 179, 0, .18);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .75);
}

.avatar img[hidden] {
    display: none !important
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.foot {
    padding-bottom: 10px
}

.winner-card {
    --chatW: 0px;
    --modalW: min(720px, 94%);
    width: var(--modalW);
    max-width: none;
    display: grid;
    grid-template-columns: 1fr var(--chatW);
    gap: 0;
    overflow: hidden;
    transition: grid-template-columns .24s ease, width .24s ease;
    align-items: stretch;
}

.winner-card.show-chat {
    --chatW: clamp(300px, 34vw, 420px);
    --modalW: min(1100px, 96%);
}

.winner-main {
    min-width: 0
}

.winner-chat {
    border-left: 1px solid rgba(255, 179, 0, .14);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    opacity: var(--chat-op, 0);
    transform: translateX(8px);
    pointer-events: none;
    transition: opacity .24s ease, transform .24s ease;
}

.winner-card.show-chat .winner-chat {
    --chat-op: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.winner-chat-headrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 179, 0, .14);
}

.winner-chat-hdr {
    font-size: 12px;
    color: rgba(243, 241, 234, .82);
    letter-spacing: .22em;
    text-transform: uppercase;
    font-weight: 900;
}

.winner-chat-togglebtn {
    appearance: none;
    background: transparent;
    border: 1px solid rgba(255, 179, 0, .18);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(183, 176, 162, .95);
    cursor: pointer;
}

.winner-chat-togglebtn:hover {
    color: rgba(243, 241, 234, .95)
}

.winner-chat-list {
    padding: 12px 14px;
    overflow: auto;
    max-height: 280px;
    scrollbar-width: thin;
    scrollbar-color: #615a52 rgba(21, 21, 30, .9);
    font-size: 15px;
    line-height: 1.45;
    color: rgba(243, 241, 234, .95);
    font-weight: 800;
}

.winner-chatmsg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: .75px 0;
}

.winner-chatmsg:first-child {
    padding-top: 0
}

.winner-chatmsg-badges {
    display: inline-flex;
    gap: 4px;
    flex-shrink: 0
}

.chat-badge {
    height: 18px;
    width: auto;
    border-radius: 3px;
    background: rgba(0, 0, 0, .4);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .65);
}

.winner-chatmsg-user {
    font-weight: 900;
    white-space: nowrap;
    max-width: 140px;
    text-overflow: ellipsis;
    overflow: hidden;
    display: inline-block;
}

.winner-chatmsg-body {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    font-weight: 800;
    text-align: left;
}

.winner-chatmsg-ts {
    flex-shrink: 0;
    margin-left: 8px;
    color: rgba(183, 176, 162, .9);
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    font-weight: 800;
}

.chat-emote {
    height: 24px;
    width: auto;
    vertical-align: text-bottom
}

.chat-emote-link {
    display: inline-block;
    line-height: 0;
    vertical-align: text-bottom
}

.winner-chatmsg--action .winner-chatmsg-body {
    font-style: italic;
    font-weight: 900;
    opacity: .92
}

.winner-chatmsg--action .action-line {
    font-style: inherit;
    font-weight: inherit
}

.winner-chat[hidden] {
    display: none !important
}

#settings .modal-card {
    width: min(620px, 96%);
    max-height: min(78vh, 640px);
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#settings .hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 179, 0, .14);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
}

#settings .hdr .title {
    font-size: 13px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(243, 241, 234, .88);
    font-weight: 900;
}

#settings .tabs {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 179, 0, .14);
    background: rgba(10, 10, 14, .60);
    overflow: auto;
}

#settings .tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 179, 0, .18);
    background: rgba(21, 21, 30, .92);
    color: rgba(243, 241, 234, .92);
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    text-transform: uppercase;
    letter-spacing: .14em;
}

#settings .tab.active {
    background: repeating-linear-gradient(135deg, rgba(255, 179, 0, .22) 0 10px, rgba(21, 21, 30, .92) 10px 20px);
    border-color: rgba(255, 179, 0, .35);
}

#settings .body {
    padding: 12px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

#settings .view {
    display: none
}

#settings .view.active {
    display: grid;
    gap: 12px
}

#settings .card {
    border: 1px solid rgba(255, 179, 0, .18);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    border-radius: 12px;
    overflow: clip;
}

#settings .card-h {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 179, 0, .14);
    color: rgba(243, 241, 234, .90);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

#settings .card-b {
    padding: 12px;
    display: grid;
    gap: 12px
}

#settings .rowc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

#settings .label {
    font-size: 14px;
    color: rgba(243, 241, 234, .95);
    font-weight: 900;
    letter-spacing: .04em
}

#settings .mutey {
    font-size: 12px;
    color: rgba(183, 176, 162, .95)
}

#settings .switch {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: rgba(7, 7, 10, .92);
    border: 1px solid rgba(255, 179, 0, .18);
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
}

#settings .switch input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    margin: 0;
}

#settings .switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(243, 241, 234, .92);
    transition: left .16s ease;
}

#settings .switch:has(input:checked) {
    background: linear-gradient(180deg, #ffd15a 0%, #ffb300 55%, #ff7a1a 100%);
    border-color: rgba(0, 0, 0, .75);
}

#settings .switch:has(input:checked)::after {
    left: 24px;
    background: #fff
}

#settings .box {
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 179, 0, .18);
    background: rgba(21, 21, 30, .92);
    color: rgba(243, 241, 234, .95);
    padding: 0 12px;
    font-weight: 900;
    font-size: 14px;
    width: 130px;
    appearance: none;
    -webkit-appearance: none;
}

#settings .box.full {
    width: 100%
}

#settings .seg {
    display: inline-flex;
    border: 1px solid rgba(255, 179, 0, .18);
    border-radius: 12px;
    overflow: hidden;
}

#settings .seg button {
    height: 34px;
    padding: 0 12px;
    background: rgba(21, 21, 30, .92);
    color: rgba(243, 241, 234, .92);
    border: none;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-transform: uppercase;
    letter-spacing: .12em;
}

#settings .seg button.active {
    background: repeating-linear-gradient(135deg, rgba(255, 179, 0, .22) 0 10px, rgba(21, 21, 30, .92) 10px 20px);
    color: rgba(243, 241, 234, .98);
}

#paramsModal .params-card {
    width: min(760px, 96%);
    max-height: min(80vh, 640px);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: linear-gradient(180deg, rgba(21, 21, 30, .94), rgba(10, 10, 14, .98));
    border: 1px solid rgba(255, 179, 0, .18);
}

#paramsModal .params-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 179, 0, .14);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
}

#paramsModal .params-title {
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(243, 241, 234, .88);
    font-weight: 900;
}

#paramsModal .tabs {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 179, 0, .14);
    background: rgba(10, 10, 14, .60);
    overflow: auto;
}

#paramsModal .tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 179, 0, .18);
    background: rgba(21, 21, 30, .92);
    color: rgba(243, 241, 234, .92);
    font-weight: 900;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-transform: uppercase;
    letter-spacing: .14em;
}

#paramsModal .tab.active {
    background: repeating-linear-gradient(135deg, rgba(255, 179, 0, .22) 0 10px, rgba(21, 21, 30, .92) 10px 20px);
    border-color: rgba(255, 179, 0, .35);
}

#paramsModal .params-body {
    padding: 12px;
    background: rgba(10, 10, 14, .40);
    display: block;
    overflow: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #615a52 rgba(21, 21, 30, .9);
}

#paramsModal .params-body::-webkit-scrollbar {
    width: 10px
}

#paramsModal .params-body::-webkit-scrollbar-track {
    background: rgba(21, 21, 30, .9);
    border-radius: 10px
}

#paramsModal .params-body::-webkit-scrollbar-thumb {
    background: #615a52;
    border: 2px solid rgba(21, 21, 30, .9);
    border-radius: 10px
}

#paramsModal .view {
    display: none
}

#paramsModal .view.active {
    display: grid;
    gap: 10px
}

#paramsModal .param-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

@media (min-width:700px) {
    #paramsModal .param-grid {
        grid-template-columns: 1fr 1fr
    }
}

#paramsModal .param {
    border: 1px solid rgba(255, 179, 0, .18);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    padding: 10px;
    border-radius: 12px;
    font-size: 13px;
    display: grid;
    gap: 6px;
}

#paramsModal code {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 179, 0, .14);
    padding: 1px 6px;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: rgba(243, 241, 234, .92);
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: inline-block;
}

#paramsModal .params-foot {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 179, 0, .14);
    background: rgba(10, 10, 14, .60);
}

#paramsModal .params-foot .btn {
    height: 32px;
    line-height: 30px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
}

#wheelBox.fs-page {
    position: fixed;
    inset: 0;
    z-index: 9998;
    padding: 0;
    border-radius: 0;
    border: none;
    background:
        radial-gradient(1200px 700px at 25% 0%, rgba(255, 179, 0, .10), transparent 62%),
        radial-gradient(1100px 700px at 85% 25%, rgba(255, 122, 26, .08), transparent 66%),
        linear-gradient(180deg, rgba(12, 12, 16, .98), rgba(6, 6, 8, .98));
    display: grid;
    place-items: center;
    overflow: visible;
}

#wheelBox.fs-page .wheel-badges,
#wheelBox.fs-page .wheel-timer,
#wheelBox.fs-page .activity-feed,
#wheelBox.fs-page .pointer {
    z-index: 8
}

#wheelBox:not(.fs-page) .fs-controls,
.fs-controls[hidden] {
    display: none !important
}

body.fs-lock {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
}

.grid:has(#wheelBox.fs-page) .entries-panel {
    display: none
}

.grid:has(#wheelBox.fs-page)>*:not(#wheelBox) {
    pointer-events: none
}

body.fs-lock .entries-panel {
    display: none
}

#wheelBox.fs-page #fsControls {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
    display: block;
}

#wheelBox.fs-page .fs-toprow,
#wheelBox.fs-page .fs-controls .fs-row,
#wheelBox.fs-page .fs-menu {
    pointer-events: auto
}

#wheelBox.fs-page .fs-toprow {
    position: fixed !important;
    top: var(--safeT) !important;
    right: var(--safeR) !important;
    left: auto !important;
    bottom: auto !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    z-index: 10060;
}

#wheelBox.fs-page .fs-controls .fs-row {
    position: fixed !important;
    left: var(--safeL) !important;
    bottom: var(--safeB) !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 179, 0, .18);
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    box-shadow: 0 2px 0 rgba(0, 0, 0, .75);
    z-index: 10060;
}

#fsExit {
    font-size: 1.05rem;
    font-weight: 900;
    padding: 10px 16px;
    min-height: 38px;
    border-radius: 999px;
}

#fsIntakeStatus[hidden] {
    display: none !important
}

.hamburger-btn {
    width: var(--btn-h);
    padding: 0;
    justify-content: center
}

.hamburger {
    position: relative;
    width: 20px;
    height: 14px;
    display: inline-block;
}

.hamburger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}

.hamburger span:nth-child(1) {
    top: 0
}

.hamburger span:nth-child(2) {
    top: 6px
}

.hamburger span:nth-child(3) {
    top: 12px
}

#fsMenuToggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg)
}

#fsMenuToggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0
}

#fsMenuToggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg)
}

.fs-menu[hidden] {
    display: none !important
}

.fs-menu {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

#wheelBox.fs-page #fsConnStatus {
    position: fixed !important;
    right: var(--safeR) !important;
    bottom: var(--safeB) !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    z-index: 10060;
}

.fs-conn-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(21, 21, 30, .92), rgba(10, 10, 14, .96));
    border: 1px solid rgba(255, 179, 0, .18);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .75);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: rgba(243, 241, 234, .95);
    pointer-events: none;
}

.fs-conn-status .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.fs-conn-status.ok .dot {
    background: #2ecc71
}

.fs-conn-status.bad .dot {
    background: #ff5c5c
}

.fs-conn-status.compact {
    gap: 0;
    padding: 6px
}

.fs-conn-status.compact .label {
    display: none
}

.fs-conn-status.compact .dot {
    width: 12px;
    height: 12px
}

.fs-indicator {
    position: absolute;
    left: var(--pointer-left, 50%);
    transform: translateX(-50%);
    z-index: 8;
    top: max(8px, calc(var(--pointer-top, 10px) + var(--fs-indicator-gap-from-pointer)));
}

.fs-page .fs-indicator {
    position: fixed !important;
    z-index: 10060;
    top: calc(var(--pointer-top, 80px) - 10px);
    left: var(--pointer-left, 50%);
    transform: translate(-50%, -100%);
    pointer-events: none;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(12, 12, 16, .86);
    color: rgba(243, 241, 234, .95);
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .10em;
    text-transform: uppercase;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .75);
}

#fsEntryCount,
#fsIntakeStatus {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    padding: 10px 14px;
    border-radius: 999px;
}

#wheelBox.fs-page #fsMenuPanel {
    position: fixed;
    left: var(--safeL);
    bottom: calc(var(--safeB) + 58px);
    width: min(92vw, 560px);
    max-height: min(55vh, 420px);
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background:
        radial-gradient(700px 260px at 18% 0%, rgba(247, 182, 61, .10), transparent 62%),
        linear-gradient(180deg, rgba(18, 17, 26, .96), rgba(12, 11, 16, .98));
    border: 1px solid rgba(247, 182, 61, .25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .65);
}

#wheelBox.fs-page #fsMenuPanel .btn {
    width: 100%
}

@media (max-width:520px) {
    #wheelBox.fs-page #fsMenuPanel {
        grid-template-columns: 1fr
    }
}

@media (prefers-reduced-motion:reduce) {
    .hamburger span {
        transition: none
    }

    .activity-item {
        transition: none
    }

    .winner-card {
        transition: none
    }

    .winner-chat {
        transition: none
    }

    .btn {
        transition: none
    }
}

@media (max-width:700px) {
    .app {
        padding: 12px
    }

    .bar {
        gap: 10px
    }

    .bar-left .muted {
        font-size: 11px
    }

    .bar-right {
        gap: 8px;
        width: 100%;
        min-width: 0;
        align-items: stretch;
        margin-left: 0;
    }

    .pill {
        height: 32px;
        font-size: 11px
    }

    .grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .wheel-wrap {
        padding: 10px;
        aspect-ratio: 1/1;
        max-height: calc(78vh - 140px);
    }

    .entries-panel.panel {
        max-height: 48vh;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    textarea {
        min-height: 200px;
        max-height: 38vh;
    }

    .activity-feed {
        right: 8px;
        left: 8px;
        align-items: stretch;
        gap: 8px;
    }

    .activity-item {
        font-size: 14px;
        padding: 10px 12px
    }

    .wheel-timer {
        top: 8px;
        right: 8px;
        min-width: 120px;
        padding: 10px 12px;
        font-size: 24px;
    }

    .wheel-badges {
        top: 8px;
        left: 8px;
        gap: 8px;
        max-width: min(80vw, 520px);
    }

    .pointer {
        border-left-width: 14px;
        border-right-width: 14px;
        border-top-width: 26px;
    }

    .empty-state {
        position: absolute;
        inset: auto;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: auto;
        max-width: calc(100% - 24px);
        padding: 8px 12px;
        border-radius: 999px;
        background: rgba(12, 12, 16, .86);
        border: 1px solid rgba(255, 179, 0, .18);
        font-size: 12px;
        line-height: 1.3;
    }

    input[type=text],
    input[type=number],
    .btn {
        font-size: 16px
    }

    .winner-card {
        --chatW: 100%;
        --modalW: min(720px, 96%);
        display: block;
        width: var(--modalW);
    }

    .winner-main {
        padding: 12px 12px 14px
    }

    .winner-chat {
        border-left: none;
        border-top: 1px solid rgba(255, 179, 0, .14);
        margin-top: 8px;
        opacity: 1 !important;
        transform: none !important;
    }

    .winner-chat-list {
        max-height: 240px
    }

    .winner-card.show-chat {
        --modalW: min(720px, 96%)
    }
}

@media (max-width:420px) {
    h1 {
        font-size: 18px
    }

    .bar-right .row {
        gap: 6px
    }

    input[type=text] {
        width: min(68vw, 280px)
    }

    .wheel-timer {
        min-width: 108px;
        font-size: 22px
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    20% {
        transform: translateX(-6px)
    }

    40% {
        transform: translateX(5px)
    }

    60% {
        transform: translateX(-4px)
    }

    80% {
        transform: translateX(3px)
    }
}

@keyframes errGlow {
    from {
        box-shadow: 0 0 0 6px rgba(255, 92, 92, .18)
    }

    to {
        box-shadow: 0 0 0 0 rgba(255, 92, 92, 0)
    }
}

.empty-state {
    text-shadow: 0 2px 0 rgba(0, 0, 0, .85);
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}