:root {
    --bg: #05080c;
    --panel: #0b0f17;
    --panel-2: #0f1824;
    --line: #172236;

    --text: #eef7fb;
    --muted: #a8bdc9;

    --tw: #2993bd;
    --tw-hover: #30b4e0;
    --tw-ring: rgba(100, 173, 203, 0.18);

    --radius: 14px;

    --shadow-1: 0 8px 18px rgba(0, 0, 0, .35);
    --shadow-2: 0 14px 30px rgba(0, 0, 0, .42);


    --btn-h: 40px;
    --btn-pad-x: 14px;
    --radius: 12px;

    --fs-indicator-gap-from-pointer: 44px;
    --fs-indicator-stack-gap: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, Helvetica, Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
}

h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

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

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 {
    box-shadow: 0 0 0 2px var(--tw-ring) !important;
}

.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: var(--bg);
    border-top: 1px solid var(--line);
}

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

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

.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;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.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: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--tw);
    border: 1px solid var(--tw);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 6px 12px rgba(0, 0, 0, .25);
    cursor: pointer;
    user-select: none;
    transition: background .12s ease, transform .06s ease, box-shadow .12s ease;
    appearance: none;
    -webkit-appearance: none;
}

.btn:hover,
#settings .smallbtn:hover,
#settings .hdr .close:hover {
    background: var(--tw-hover);
}

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

.btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.btn.ghost,
#settings .smallbtn.ghost {
    background: var(--panel-2);
    color: #fff;
    border: 1px solid var(--line);
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.btn.ghost:hover,
#settings .smallbtn.ghost:hover {
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

.btn.ok,
.btn.warn {
    background: var(--tw);
    border-color: var(--tw);
    color: #fff;
}

.pill {
    white-space: nowrap;
    height: var(--btn-h);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    padding: 0 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #e8e8e8;
    font-weight: 600;
}

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

.pill,
.pill * {
    word-break: keep-all;
}

input[type=text],
input[type=number] {
    height: var(--btn-h);
    min-width: 80px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    font-size: 14px;
    outline: none;
    transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder {
    color: #8c8c95;
}

input:focus {
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

textarea {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: var(--panel-2);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    resize: none;
    line-height: 1.5;
    font-size: 14px;
    scrollbar-width: thin;
    scrollbar-color: #575766 var(--panel-2);
    outline: none;
    transition: border-color .12s ease, box-shadow .12s ease;
    appearance: none;
    -webkit-appearance: none;
}

textarea::placeholder {
    color: #8c8c95;
}

textarea:focus {
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

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

textarea::-webkit-scrollbar-track {
    background: var(--panel-2);
    border-radius: 10px;
}

textarea::-webkit-scrollbar-thumb {
    background: #575766;
    border-radius: 10px;
    border: 2px solid var(--panel-2);
}

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

.micro-link {
    all: unset;
    font: inherit;
    color: var(--muted);
    cursor: pointer;
    display: inline;
    -webkit-appearance: none;
    appearance: none;
}

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

.micro-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--tw-ring);
    border-radius: 4px;
}

.micro-link.disabled {
    opacity: 0.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: var(--muted);
}

.channel-error {
    animation: shake .36s ease, errGlow .9s ease-out;
    border-color: #ff5c5c !important;
    box-shadow: 0 0 0 2px rgba(255, 92, 92, .25) !important;
}

.wheel-wrap {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 10px 16px;
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

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

.pointer {
    position: absolute;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 32px solid var(--tw);
    filter: drop-shadow(0 2px 0 #07070a);
    z-index: 2;
}

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

.cfg-badge {
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: #f0f0f0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .28);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
}

.cfg-badge small {
    opacity: .85;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .18em;
}

.wheel-timer {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 140px;
    background: var(--panel-2);
    color: #fff;
    border: 1px solid var(--tw);
    padding: 12px 14px;
    font-weight: 700;
    font-size: 28px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--tw-ring);
    z-index: 3;
}

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

.wheel-timer.cte {
    cursor: pointer;
    background: var(--tw);
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 0 0 3px var(--tw-ring), 0 12px 22px rgba(0, 0, 0, .38);
    animation: ctePulse 1.2s ease-in-out infinite;
}

.wheel-timer.cte:hover {
    filter: brightness(1.05);
}

.wheel-timer.cte:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--tw-ring), 0 16px 28px rgba(0, 0, 0, .44);
}

.empty-state {
    position: absolute;
    inset: 10px;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: #b7b7c0;
    text-align: center;
    font-size: 14px;
}

.activity-feed {
    position: absolute;
    right: 12px;
    top: calc(12px + var(--timerHeight, 0px) + var(--timerGap, 0px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    z-index: 3;
    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: color-mix(in oklab, var(--panel-2) 88%, black 12%);
    border: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .38), 0 0 0 2px transparent inset;
    font-size: 17px;
    line-height: 1.3;
    color: #f8f8ff;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px) scale(.98);
    transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
    backdrop-filter: saturate(115%) blur(2.5px);
}

.activity-item::before {
    content: "";
    width: 8px;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--tw), #7c5cff);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset;
}

.activity-item>span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
    letter-spacing: .2px;
}

.activity-item b {
    color: #fff;
    font-weight: 900;
    border-bottom: 2px solid color-mix(in oklab, var(--tw) 60%, white 40%);
    padding-bottom: 1px;
}

.activity-item.enter {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .44), 0 0 0 2px var(--tw-ring) inset;
}

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

.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;
}

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

.modal.show {
    display: grid;
}

.modal-card {
    width: min(720px, 94%);
    max-height: min(78vh, 620px);
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
    text-align: center;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #575766 var(--panel-2);
}

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

.modal-card::-webkit-scrollbar-track {
    background: var(--panel-2);
    border-radius: 10px;
}

.modal-card::-webkit-scrollbar-thumb {
    background: #575766;
    border: 2px solid var(--panel-2);
    border-radius: 10px;
}

.modal-card h2 {
    margin: 2px 0 0;
    font-size: 12px;
    color: #dedee3;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 700;
}

.winner {
    font-size: clamp(26px, 6vw, 52px);
    margin: 6px 0 8px;
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.12;
}

.winner-sub {
    margin-top: 6px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    opacity: 0.9;
}

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

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    margin: 8px auto;
    background: var(--panel-2);
    border: 2px solid var(--line);
    display: grid;
    place-items: center;
    overflow: hidden;
}

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

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

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

.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 var(--line);
    background: var(--panel-2);
    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 var(--line);
}

.winner-chat-hdr {
    font-size: 12px;
    color: #cfcfe6;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 800;
}

.winner-chat-togglebtn {
    appearance: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.winner-chat-togglebtn:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.winner-chat-list {
    padding: 12px 14px;
    overflow: auto;
    max-height: 280px;
    scrollbar-width: thin;
    scrollbar-color: #575766 var(--panel-2);
    font-family: 'Nunito', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.45;
    color: #fff;
    font-weight: 600;
}

.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 0 2px rgba(0, 0, 0, .8);
}

.winner-chatmsg-user {
    font-weight: 800;
    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: 600;
    text-align: left;
}

.winner-chatmsg-ts {
    flex-shrink: 0;
    margin-left: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    font-weight: 500;
}

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

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

.winner-chatmsg--action .winner-chatmsg-body {
    font-style: italic;
    font-weight: 700;
    opacity: .9;
}

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

#settings .modal-card {
    width: min(620px, 96%);
    max-height: min(78vh, 640px);
    padding: 0;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    overflow: hidden;
}

#settings .hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
}

#settings .hdr .title {
    font-size: 13px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #e5e5e5;
    font-weight: 800;
}

#settings .tabs {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    overflow: auto;
}

#settings .tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
}

#settings .tab.active {
    background: var(--tw);
    color: #fff;
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

#settings .body {
    padding: 12px;
}

#settings .view {
    display: none;
}

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

#settings .card {
    border: 1px solid var(--line);
    background: var(--panel-2);
    border-radius: 10px;
    overflow: clip;
}

#settings .card-h {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    color: #e9e9e9;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}

#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: var(--text);
    font-weight: 800;
}

#settings .mutey {
    font-size: 12px;
    color: #c2c2c9;
}

#settings .switch {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #15151c;
    border: 1px solid var(--line);
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
}

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

#settings .switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #e6e6f0;
    transition: left .16s ease;
}

#settings .switch:has(input:checked) {
    background: var(--tw);
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

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

#settings .box {
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    padding: 0 12px;
    font-weight: 700;
    font-size: 14px;
    width: 130px;
    appearance: none;
    -webkit-appearance: none;
}

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

#settings .seg {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

#settings .seg button {
    height: 34px;
    padding: 0 12px;
    background: var(--panel-2);
    color: var(--text);
    border: none;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

#settings .seg button.active {
    background: var(--tw);
    color: #fff;
}

#paramsModal .params-card {
    width: min(760px, 96%);
    max-height: min(80vh, 640px);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--panel);
    border: 1px solid var(--line);
}

#paramsModal .params-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
}

#paramsModal .params-title {
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #e5e5e5;
    font-weight: 800;
}

#paramsModal .tabs {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    overflow: auto;
}

#paramsModal .tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

#paramsModal .tab.active {
    background: var(--tw);
    color: #fff;
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

#paramsModal .params-body {
    padding: 12px;
    background: var(--panel);
    display: block;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #575766 var(--panel-2);
    flex: 1;
}

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

#paramsModal .params-body::-webkit-scrollbar-track {
    background: var(--panel-2);
    border-radius: 10px;
}

#paramsModal .params-body::-webkit-scrollbar-thumb {
    background: #575766;
    border: 2px solid var(--panel-2);
    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 var(--line);
    background: var(--panel-2);
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    display: grid;
    gap: 6px;
}

#paramsModal code {
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: #eaeaff;
    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 var(--line);
    background: var(--panel);
}

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

#wheelBox.fs-page {
    position: fixed;
    inset: 0;
    z-index: 9998;
    padding: 0;
    border-radius: 0;
    border: none;
    background: var(--panel);
    display: grid;
    place-items: center;
}

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

#wheelBox.fs-page #fsControls {
    display: block;
}

.fs-controls .fs-row {
    position: absolute;
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    transform: none;
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: color-mix(in oklab, var(--panel-2) 82%, black 18%);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
    pointer-events: auto;
}

#wheelBox.fs-page .wheel-timer {
    top: calc(env(safe-area-inset-top, 0px) + 12px + var(--fsExitH, 36px) + 8px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    z-index: 5;
}

#wheelBox.fs-page .activity-feed {
    top: calc(env(safe-area-inset-top, 0px) + 12px + var(--fsExitH, 36px) + 8px + var(--timerHeight, 0px) + var(--timerGap, 0px));
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    z-index: 5;
}

#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;
}

#fsMenuToggle[aria-expanded="true"] {
    box-shadow: 0 0 0 2px var(--tw-ring);
}

.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);
}

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

.fs-toprow {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

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

#fsExit svg {
    width: 20px;
    height: 20px;
}

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

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

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

.fs-enter-btn {
    position: absolute;
    left: calc(env(safe-area-inset-left, 0px) + 12px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 6;
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--panel-2);
    color: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 18px rgba(0, 0, 0, .38);
    cursor: pointer;
    user-select: none;
}

.fs-enter-btn:hover {
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring), 0 12px 22px rgba(0, 0, 0, .44);
}

.fs-enter-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--tw-ring), 0 12px 22px rgba(0, 0, 0, .44);
}

#wheelBox.fs-page .fs-enter-btn {
    display: none !important;
}

.fs-conn-status {
    position: absolute;
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--panel-2) 82%, black 18%);
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .45);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .2px;
    color: #f0f0f5;
    z-index: 6;
    pointer-events: none;
}

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

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

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

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

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

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

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

.fs-page .fs-indicator {
    position: absolute;
    z-index: 6;
    left: var(--pointer-left, 50%);
    top: calc(var(--pointer-top, 80px) - 10px);
    transform: translate(-50%, -100%);
    pointer-events: none;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(12, 14, 34, 0.85);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.fs-page #fsEntryCount.fs-indicator {
    transform: translate(-50%, calc(-100% - var(--fs-indicator-gap-from-pointer) - var(--fs-indicator-stack-gap) - var(--fsStatusH, 0px)));
}

#fsIntakeStatus.fs-indicator {
    top: max(8px, calc(var(--pointer-top) + var(--fs-indicator-gap-from-pointer) + var(--fsStatusH, 0px) + var(--fs-indicator-stack-gap)));
}

.fs-page #fsIntakeStatus.fs-indicator {
    transform: translate(-50%, calc(-100% - var(--fs-indicator-gap-from-pointer)));
}

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

.fs-page .fs-indicator {
    font-size: 1rem;
    padding: 10px 14px;
}

.fs-page #fsEntryCount {
    background: rgba(20, 24, 60, 0.9);
    color: #fff;
}

.fs-page #fsIntakeStatus {
    background: rgba(230, 8, 8, 0.9);
    color: #fff;
}

.fs-page #fsIntakeStatus.paused {
    background: rgba(190, 140, 20, 0.9);
}

#btnFullWheel {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    white-space: nowrap;
    align-self: flex-start;
}

.mobile-fs-btn-wrap {
    display: none;
}

@media (min-width: 901px) {
    #fsTopRow {
        min-height: 56px;
    }
}

.bar-left .koth-btn {
    align-self: flex-start;
    height: 32px;
    line-height: 30px;
    font-size: 13px;
    border-radius: 8px;
    padding: 0 10px;
    display: inline-flex;
    gap: 6px;
    margin-top: 4px;
    text-decoration: none;
}

/* <= 900px */
@media (max-width: 900px) {
    .fs-enter-btn {
        left: calc(env(safe-area-inset-left, 0px) + 8px);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
        height: 36px;
        min-width: 36px;
        border-radius: 10px;
    }

    #fsTopRow #fsExit,
    #fsExit {
        font-size: 1.15rem;
        padding: 14px 20px;
        min-height: 38px;
    }
}

/* <= 700px */
@media (max-width: 700px) {
    .app {
        padding: 12px;
    }

    .bar {
        gap: 10px;
    }

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

    .bar-right {
        gap: 8px;
    }

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

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

    .wheel-wrap {
        padding: 8px;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    .entries-panel.panel {
        max-height: 44vh;
        overflow: auto;
    }

    .activity-feed {
        right: 8px;
        top: calc(8px + var(--timerHeight, 0px) + var(--timerGap, 0px));
        gap: 8px;
    }

    .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;
        bottom: 8px;
        top: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: calc(100% - 24px);
        padding: 8px 12px;
        border-radius: 999px;
        background: color-mix(in oklab, var(--panel-2) 86%, transparent);
        border: 1px solid var(--line);
        backdrop-filter: blur(3px) saturate(110%);
        font-size: 12px;
        line-height: 1.3;
        color: #cfcfe6;
    }

    .bar {
        align-items: stretch;
    }

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

    .bar-right .row,
    .bar-right .ctrlbar {
        justify-content: stretch;
    }

    .bar-right .row input[type=text] {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .bar-right .row .btn,
    .bar-right .pill {
        flex: 0 0 auto;
    }

    .wheel-wrap {
        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;
    }

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

    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 var(--line);
        margin-top: 8px;
        opacity: 1 !important;
        transform: none !important;
    }

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

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

    .winner-chat-togglebtn {
        font-size: 12px;
    }

    .fs-controls .fs-row {
        gap: 10px;
        padding: 10px;
    }

    .fs-menu .btn {
        height: 34px;
        font-size: 13px;
    }

    #wheelBox.fs-page {
        aspect-ratio: auto !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: fixed;
    }

    .bar-left #btnFullWheel {
        display: none;
    }

    .mobile-fs-btn-wrap {
        display: block;
    }

    .mobile-fs-btn-wrap .btn {
        height: 36px;
        line-height: 34px;
        padding: 0 12px;
        border-radius: 10px;
    }

    #wheelBox.fs-page canvas#wheel {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0 !important;
    }

    #wheelBox.fs-page .empty-state {
        position: absolute;
        top: calc(50% + (var(--wheelSize, 200px) / 2) + 12px);
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        bottom: auto;
        max-width: min(92vw, 560px);
        padding: 8px 12px;
        border-radius: 999px;
        background: color-mix(in oklab, var(--panel-2) 86%, transparent);
        border: 1px solid var(--line);
        backdrop-filter: blur(3px) saturate(110%);
        font-size: 12px;
        line-height: 1.3;
        color: #cfcfe6;
        pointer-events: none;
    }

    .fs-menu .btn {
        height: 34px;
        line-height: 32px;
        padding: 0 10px;
        border-radius: 10px;
        font-size: 13px;
    }

    .fs-conn-status {
        padding: 12px 8px;
        font-size: 11px;
        right: calc(env(safe-area-inset-right, 0px) + 8px);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    }

    #wheelBox.fs-page .fs-indicator {
        position: absolute !important;
        z-index: 6;
        left: var(--pointer-left, 50%) !important;
        top: var(--pointer-top, 80px) !important;
        transform: translate(-50%, calc(-100% - 8px)) !important;
        pointer-events: none;
        white-space: nowrap;
        padding: 10px 14px;
        border-radius: 999px;
        background: rgba(12, 14, 34, 0.9);
        color: #fff;
        font-weight: 800;
        font-size: 1rem;
        line-height: 1;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    }

    #wheelBox.fs-page #fsEntryCount.fs-indicator {
        transform: translate(-50%, calc(-100% - 8px - var(--fsStatusH, 0px) - 8px)) !important;
    }

    .bar-left .koth-btn {
        height: 30px;
        line-height: 28px;
        font-size: 12px;
        border-radius: 8px;
        padding: 0 9px;
        margin-top: 2px;
    }
}

/* <= 420px */
@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;
    }
}

/* <= 400px */
@media (max-width: 400px) {
    .pill {
        height: 30px;
        font-size: 10.5px;
    }

    .wheel-timer {
        min-width: 104px;
        font-size: 20px;
        padding: 8px 10px;
    }
}

/* >= 901px */
@media (min-width: 901px) {
    .fs-page .fs-indicator {
        position: static;
        transform: none !important;
        background: none;
        color: inherit;
        box-shadow: none;
        padding: 0;
    }

    .fs-page #fsEntryCount,
    .fs-page #fsIntakeStatus {
        font-size: 1.05rem;
        padding: 12px 16px;
    }
}


@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)
    }
}

@keyframes ctePulse {
    0% {
        transform: translateZ(0);
        box-shadow: 0 0 0 3px var(--tw-ring), 0 12px 22px rgba(0, 0, 0, .38);
    }

    50% {
        box-shadow: 0 0 0 6px var(--tw-ring), 0 18px 34px rgba(0, 0, 0, .50);
    }

    100% {
        box-shadow: 0 0 0 3px var(--tw-ring), 0 12px 22px rgba(0, 0, 0, .38);
    }
}

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

.help-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 6;
    height: 32px;
    padding: 0 10px;
    border-radius: 10px;

    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
}

.help-btn__label {
    display: inline;
}

.help-btn__icon {
    display: none;
    font-size: 14px;
    line-height: 1;
}

.help-btn:hover {
    color: #fff;
    border-color: var(--tw);
    box-shadow: 0 0 0 2px var(--tw-ring), 0 12px 24px rgba(0, 0, 0, .55);
}

.help-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--tw-ring), 0 12px 24px rgba(0, 0, 0, .55);
}

.help-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10020;
}

.help-modal.show {
    display: flex;
}

.help-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
}

.help-modal__dialog {
    position: relative;
    width: min(480px, 94%);
    max-height: min(78vh, 520px);

    padding: 12px 14px 14px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .5);

    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text);
    text-align: left;
    overflow: auto;

    scrollbar-width: thin;
    scrollbar-color: #575766 var(--panel-2);
    z-index: 1;
}

.help-modal__dialog::-webkit-scrollbar {
    width: 10px;
}

.help-modal__dialog::-webkit-scrollbar-track {
    background: var(--panel-2);
    border-radius: 10px;
}

.help-modal__dialog::-webkit-scrollbar-thumb {
    background: #575766;
    border-radius: 10px;
    border: 2px solid var(--panel-2);
}

.help-modal__dialog h2 {
    margin: 0;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #e5e5e5;
    font-weight: 800;
}

.help-modal__hint {
    margin: 2px 0 6px;
    font-size: 12px;
    color: var(--muted);
}

.help-modal__types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 4px;
}

.help-modal__types label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.help-modal__types input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 1px solid var(--muted);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .6) inset;
    position: relative;
}

.help-modal__types input[type="radio"]:checked {
    border-color: var(--tw);
    box-shadow: 0 0 0 1px var(--tw-ring);
}

.help-modal__types input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: var(--tw);
}

.help-modal__types label span {
    color: #e5e5e5;
}

.help-modal__label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    margin-bottom: 4px;
}

#helpMessage {
    min-height: 90px;
}

.help-modal__actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.help-modal__actions .btn {
    height: 32px;
    line-height: 30px;
    font-size: 12px;
    border-radius: 8px;
}

.help-modal__actions .btn.primary {
    background: var(--tw);
    border-color: var(--tw);
    color: #fff;
}

@media (max-width: 700px) {
    .help-modal__dialog {
        width: min(94vw, 440px);
        max-height: min(84vh, 540px);
        padding: 12px 12px 14px;
    }

    .help-btn {
        bottom: 10px;
        right: 10px;
        height: 30px;
        width: 30px;
        padding: 0;
        font-size: 14px;
        border-radius: 999px;
        justify-content: center;
    }

    .help-btn__label {
        display: none;
    }

    .help-btn__icon {
        display: inline-block;
    }
}

#settings .body>.view {
    display: none;
}

#settings .body>.view.active {
    display: block;
}

#settings .modal-card {
    display: flex;
    flex-direction: column;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

html,
body {
    background: var(--bg);
}

body {
    background:
        linear-gradient(180deg, #05080c 0%, #060b12 60%, #05080c 100%);
}

.app {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, .04);
}

.brand-logo {
    filter: none;
    opacity: .95;
}

.brand h1 {
    color: var(--text);
    background: none;
    text-shadow: none;
    letter-spacing: .2px;
}

.muted {
    color: var(--muted);
}

.panel,
.wheel-wrap,
.modal-card,
#settings .modal-card,
#paramsModal .params-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    backdrop-filter: none;
}

.wheel-wrap {
    background: linear-gradient(180deg, #0b0f17 0%, #0a0e15 100%);
    box-shadow: var(--shadow-2);
}

.btn,
#settings .smallbtn,
#settings .hdr .close {
    background: var(--tw);
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 18px rgba(0, 0, 0, .28);
    transition: transform .06s ease, background .12s ease, box-shadow .12s ease;
}

.btn:hover,
#settings .smallbtn:hover,
#settings .hdr .close:hover {
    background: var(--tw-hover);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 12px 22px rgba(0, 0, 0, .33);
}

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

.btn.ghost,
#settings .smallbtn.ghost {
    background: var(--panel-2);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn.ghost:hover,
#settings .smallbtn.ghost:hover {
    border-color: rgba(100, 173, 203, .55);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

.pill {
    background: var(--panel-2);
    border: 1px solid var(--line);
    box-shadow: none;
    color: rgba(238, 247, 251, .92);
}

input[type=text],
input[type=number],
textarea {
    background: #0d1520;
    border: 1px solid var(--line);
    box-shadow: none;
}

input:focus,
textarea:focus {
    border-color: rgba(100, 173, 203, .7);
    box-shadow: 0 0 0 2px var(--tw-ring);
}

.activity-item {
    background: var(--panel-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    backdrop-filter: none;
}

.activity-item::before {
    background: rgba(100, 173, 203, .75);
    box-shadow: none;
}

.pointer {
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55));
}

.pointer::after {
    display: none;
}

.wheel-timer {
    background: var(--panel-2);
    border: 1px solid rgba(100, 173, 203, .65);
    box-shadow: 0 0 0 2px rgba(100, 173, 203, .10);
}

#settings .tab.active,
#paramsModal .tab.active {
    background: rgba(100, 173, 203, .18);
    border-color: rgba(100, 173, 203, .45);
    box-shadow: none;
    color: var(--text);
}

.modal {
    background: rgba(0, 0, 0, .60);
    backdrop-filter: blur(3px);
}

.help-btn {
    background: var(--panel-2);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
}

.help-btn:hover {
    border-color: rgba(100, 173, 203, .55);
    box-shadow: 0 0 0 2px var(--tw-ring), var(--shadow-1);
}