:root {
    color-scheme: light;
    --lw-brand: #1d4ed8;
    --lw-brand-dark: #0f2f6e;
    --lw-accent: #16a34a;
    --lw-ink: #0f172a;
    --lw-muted: #64748b;
    --lw-border: #dbe4f0;
    --lw-surface: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #eef4ff;
}

body.lw-page {
    min-height: 100dvh;
    margin: 0;
    color: var(--lw-ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, .14), transparent 30rem),
        radial-gradient(circle at 90% 85%, rgba(22, 163, 74, .1), transparent 28rem),
        linear-gradient(145deg, #f8fbff 0%, #edf4ff 52%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.lw-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding: 12px clamp(16px, 4vw, 56px);
    color: #fff;
    background: linear-gradient(105deg, #0b2559 0%, var(--lw-brand-dark) 55%, #143d87 100%);
    border-bottom: 4px solid var(--lw-accent);
    box-shadow: 0 8px 30px rgba(15, 47, 110, .18);
}

.lw-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.lw-brand img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 3px;
    object-fit: contain;
    background: #fff;
    border-radius: 11px;
}

.lw-brand span {
    display: grid;
    min-width: 0;
}

.lw-brand strong {
    overflow: hidden;
    font-size: .98rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lw-brand small {
    margin-top: 3px;
    color: #c7d2fe;
    font-size: .76rem;
}

.lw-header__actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.lw-icon-button,
.lw-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.lw-icon-button:hover,
.lw-back-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .55);
}

.lw-icon-button:active,
.lw-back-link:active {
    transform: translateY(1px);
}

.lw-main {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 48px) 48px;
}

.lw-intro {
    max-width: 720px;
    margin: 0 auto clamp(20px, 3vw, 34px);
    text-align: center;
}

.lw-eyebrow,
.lw-panel-kicker,
.lw-result-kicker {
    margin: 0 0 7px;
    color: var(--lw-brand);
    font-size: .73rem;
    font-weight: 850;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.lw-intro h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.lw-intro > p:last-child {
    margin: 12px 0 0;
    color: var(--lw-muted);
    font-size: clamp(.9rem, 2vw, 1rem);
}

.lw-storage-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 820px;
    margin: 0 auto 18px;
    padding: 11px 14px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    font-size: .84rem;
}

.lw-storage-warning[hidden] {
    display: none;
}

.lw-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: center;
}

.lw-wheel-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.lw-wheel-wrap {
    position: relative;
    width: min(100%, 620px);
    aspect-ratio: 1;
    isolation: isolate;
    filter: drop-shadow(0 22px 30px rgba(15, 23, 42, .18));
}

.lw-wheel-button {
    position: absolute;
    inset: 3.5%;
    display: block;
    width: 93%;
    height: 93%;
    padding: 0;
    overflow: hidden;
    background: #dce7f5;
    border: clamp(6px, 1.2vw, 11px) solid #fff;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px rgba(29, 78, 216, .17),
        inset 0 0 0 1px rgba(15, 23, 42, .08);
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.lw-wheel-button:not(:disabled):hover {
    transform: scale(1.008);
    filter: brightness(1.025);
}

.lw-wheel-button:not(:disabled):active {
    transform: scale(.994);
}

.lw-wheel-button:disabled {
    cursor: not-allowed;
}

.lw-wheel-button:focus-visible,
.lw-spin-button:focus-visible,
.lw-secondary-button:focus-visible,
.lw-danger-button:focus-visible,
.lw-icon-button:focus-visible,
.lw-back-link:focus-visible,
.lw-remove-winner:focus-visible,
.lw-keep-winner:focus-visible,
textarea:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}

#wheelCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.lw-wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: clamp(74px, 17%, 106px);
    aspect-ratio: 1;
    color: #fff;
    background: linear-gradient(145deg, #2563eb, #123a85);
    border: clamp(5px, .8vw, 8px) solid #fff;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(15, 47, 110, .35);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.lw-wheel-hub i {
    margin-bottom: -9px;
    font-size: clamp(1.2rem, 3vw, 1.7rem);
}

.lw-wheel-hub strong {
    font-size: clamp(.64rem, 1.7vw, .88rem);
    letter-spacing: .08em;
}

.lw-pointer {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 0;
    width: clamp(38px, 9%, 58px);
    height: clamp(46px, 11%, 70px);
    background: linear-gradient(145deg, #f97316, #dc2626);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
    filter: drop-shadow(0 5px 5px rgba(127, 29, 29, .32));
    pointer-events: none;
    transform: translateY(-50%);
}

.lw-wheel-hint {
    min-height: 22px;
    margin: 2px 0 13px;
    color: var(--lw-muted);
    font-size: .84rem;
    text-align: center;
}

.lw-spin-button,
.lw-secondary-button,
.lw-danger-button,
.lw-remove-winner,
.lw-keep-winner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
    border-radius: 11px;
    font-weight: 780;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.lw-spin-button {
    min-width: 190px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1747a6);
    border: 0;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .28);
}

.lw-spin-button:not(:disabled):hover {
    box-shadow: 0 13px 26px rgba(37, 99, 235, .36);
    transform: translateY(-1px);
}

.lw-spin-button:disabled,
.lw-secondary-button:disabled,
.lw-danger-button:disabled {
    opacity: .48;
    cursor: not-allowed;
    box-shadow: none;
}

.lw-entry-panel {
    padding: clamp(19px, 3vw, 28px);
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(203, 213, 225, .78);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(30, 64, 175, .1);
    backdrop-filter: blur(10px);
}

.lw-entry-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.lw-entry-panel h2 {
    margin: 0;
    font-size: clamp(1.18rem, 2.4vw, 1.48rem);
    line-height: 1.2;
}

.lw-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: #1e40af;
    background: #eaf1ff;
    border: 1px solid #c7d8ff;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
}

.lw-entry-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: .78rem;
    font-weight: 750;
}

.lw-entry-label span {
    color: var(--lw-muted);
    font-weight: 550;
}

.lw-content-input {
    display: block;
    width: 100%;
    min-height: 43px;
    padding: 9px 12px;
    color: var(--lw-ink);
    background: #fbfdff;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    font-size: .9rem;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.lw-content-input:hover {
    border-color: #94a3b8;
}

.lw-content-input:focus {
    outline: 0;
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

.lw-content-input:disabled {
    color: #64748b;
    background: #f1f5f9;
}

.lw-mode-fieldset {
    padding: 0;
    margin: 16px 0;
    border: 0;
}

.lw-mode-fieldset legend {
    display: block;
    width: auto;
    padding: 0;
    margin: 0 0 7px;
    color: #334155;
    font-size: .78rem;
    font-weight: 750;
}

.lw-mode-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    background: #eef2f7;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
}

.lw-mode-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 9px;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: .8rem;
    font-weight: 780;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}

.lw-pair-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 16px;
}

.lw-pair-lists[hidden] {
    display: none;
}

.lw-pair-list-option {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 7px 10px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    font-size: .76rem;
    font-weight: 760;
    text-align: left;
    cursor: pointer;
}

.lw-pair-list-option > span {
    grid-column: 1 / -1;
    color: #94a3b8;
    font-size: .6rem;
    font-weight: 850;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.lw-pair-list-option.is-active {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .08);
}

.lw-pair-list-option:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.lw-pair-list-option:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

.lw-mode-option:hover:not(:disabled) {
    color: #1e40af;
}

.lw-mode-option.is-active {
    color: #1d4ed8;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .1);
}

.lw-mode-option:disabled {
    cursor: not-allowed;
    opacity: .68;
}

.lw-mode-option:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

.lw-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 7px;
}

.lw-list-heading .lw-panel-kicker {
    margin: 0;
}

.lw-entry-label[hidden],
#entriesInput[hidden],
.lw-gift-editor[hidden],
.lw-remove-winner[hidden] {
    display: none !important;
}

#entriesInput {
    display: block;
    width: 100%;
    min-height: 210px;
    resize: vertical;
    padding: 13px 14px;
    color: var(--lw-ink);
    background: #fbfdff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: .94rem;
    line-height: 1.62;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

#entriesInput:hover {
    border-color: #94a3b8;
}

#entriesInput:focus {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

#entriesInput[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .09);
}

#entriesInput:disabled {
    color: #64748b;
    background: #f1f5f9;
}

.lw-gift-editor {
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 13px;
}

.lw-gift-editor__columns,
.lw-gift-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 36px;
    gap: 8px;
    align-items: center;
}

.lw-gift-editor__columns {
    padding: 0 3px 7px;
    color: #475569;
    font-size: .7rem;
    font-weight: 800;
}

.lw-gift-rows {
    display: grid;
    gap: 8px;
    max-height: 274px;
    padding: 1px 3px 3px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.lw-gift-row input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 11px;
    color: var(--lw-ink);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: .86rem;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.lw-gift-row input:hover:not(:disabled) {
    border-color: #94a3b8;
}

.lw-gift-row input:focus {
    z-index: 1;
    outline: 0;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.lw-gift-row input[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .08);
}

.lw-gift-row input:disabled {
    color: #64748b;
    background: #eef2f7;
}

.lw-gift-quantity {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.lw-remove-gift {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #94a3b8;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.lw-remove-gift:hover:not(:disabled) {
    color: #dc2626;
    background: #fee2e2;
}

.lw-remove-gift:focus-visible,
.lw-add-gift:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

.lw-remove-gift:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.lw-gift-editor__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 3px 1px;
    border-top: 1px solid #e2e8f0;
    margin-top: 9px;
}

.lw-add-gift {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    font-size: .76rem;
    font-weight: 800;
    cursor: pointer;
}

.lw-add-gift:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #93c5fd;
}

.lw-add-gift:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.lw-gift-editor__footer p {
    margin: 0;
    color: var(--lw-muted);
    font-size: .66rem;
    line-height: 1.4;
    text-align: right;
}

.lw-validation {
    min-height: 20px;
    margin: 7px 0 14px;
    color: var(--lw-muted);
    font-size: .78rem;
}

.lw-validation.is-error {
    color: #b91c1c;
    font-weight: 650;
}

.lw-validation.is-valid {
    color: #15803d;
}

.lw-entry-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.lw-secondary-button,
.lw-danger-button {
    min-height: 41px;
    padding: 8px 11px;
    background: #fff;
    font-size: .8rem;
}

.lw-secondary-button {
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.lw-secondary-button:not(:disabled):hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.lw-danger-button {
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.lw-danger-button:not(:disabled):hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.lw-storage-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 17px 0 0;
    color: var(--lw-muted);
    font-size: .73rem;
    line-height: 1.45;
}

.lw-storage-note i {
    margin-top: 1px;
    color: var(--lw-accent);
}

.lw-history {
    margin-top: clamp(24px, 4vw, 40px);
    padding: clamp(19px, 3vw, 28px);
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(203, 213, 225, .78);
    border-radius: 20px;
    box-shadow: 0 16px 42px rgba(30, 64, 175, .08);
    backdrop-filter: blur(10px);
}

.lw-history__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.lw-history h2 {
    margin: 0;
    font-size: clamp(1.18rem, 2.4vw, 1.48rem);
    line-height: 1.2;
}

.lw-history__note {
    margin: 7px 0 0;
    color: var(--lw-muted);
    font-size: .79rem;
}

.lw-history__actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.lw-history-clear {
    min-height: 38px;
    white-space: nowrap;
}

.lw-history__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 86px;
    padding: 18px;
    color: var(--lw-muted);
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 13px;
    font-size: .84rem;
    text-align: center;
}

.lw-history__empty[hidden],
.lw-history__list[hidden] {
    display: none;
}

.lw-history__empty i {
    color: #94a3b8;
    font-size: 1.1rem;
}

.lw-history__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.lw-history__item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 11px 13px;
    background: #fbfdff;
    border: 1px solid #dbe7f5;
    border-radius: 12px;
}

.lw-history__order {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 31px;
    height: 31px;
    color: #1d4ed8;
    background: #eaf1ff;
    border-radius: 50%;
    font-size: .74rem;
    font-weight: 850;
}

.lw-history__content {
    display: grid;
    min-width: 0;
}

.lw-history__content strong {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: #1e293b;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lw-history__content strong i {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: .8rem;
}

.lw-history__content strong span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lw-history__purpose {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 3px;
    color: #475569;
    font-size: .75rem;
    line-height: 1.35;
}

.lw-history__gift {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    color: #7c3aed;
    font-size: .78rem;
    font-weight: 750;
}

.lw-history__purpose i {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #f97316;
}

.lw-history__content time {
    margin-top: 2px;
    color: var(--lw-muted);
    font-size: .72rem;
}

.lw-result-dialog {
    width: min(470px, calc(100% - 28px));
    padding: 0;
    overflow: visible;
    color: var(--lw-ink);
    background: transparent;
    border: 0;
}

.lw-result-dialog::backdrop {
    background: rgba(8, 20, 46, .62);
    backdrop-filter: blur(5px);
}

.lw-result-dialog__content {
    position: relative;
    padding: 62px clamp(20px, 6vw, 38px) 28px;
    overflow: visible;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(2, 6, 23, .28);
    text-align: center;
}

.lw-result-dialog__content::before {
    position: absolute;
    top: -120px;
    left: 50%;
    width: 340px;
    height: 240px;
    content: "";
    background: radial-gradient(circle, rgba(250, 204, 21, .3), rgba(37, 99, 235, .06) 55%, transparent 72%);
    transform: translateX(-50%);
}

.lw-result-icon {
    position: absolute;
    top: -43px;
    left: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    color: #fff;
    background: linear-gradient(145deg, #facc15, #f97316);
    border: 7px solid #fff;
    border-radius: 50%;
    box-shadow: 0 12px 28px rgba(194, 65, 12, .3);
    font-size: 2rem;
    transform: translateX(-50%);
}

.lw-result-kicker {
    position: relative;
    color: #c2410c;
}

.lw-result-dialog h2 {
    position: relative;
    margin: 0;
    color: #475569;
    font-size: .95rem;
}

.lw-winner-name {
    position: relative;
    margin: 13px 0 25px;
    overflow-wrap: anywhere;
    color: #1d4ed8;
    font-size: clamp(1.9rem, 8vw, 3rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.lw-pair-recipient {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    padding: 6px 11px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: .76rem;
}

.lw-pair-recipient[hidden] {
    display: none;
}

.lw-pair-recipient strong {
    color: #1d4ed8;
}

.lw-pair-recipient + .lw-winner-name {
    margin-top: 9px;
}

.lw-result-actions {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lw-remove-winner,
.lw-keep-winner {
    min-height: 46px;
    font-size: .82rem;
}

.lw-remove-winner {
    color: #b91c1c;
    background: #fff;
    border: 1px solid #fecaca;
}

.lw-remove-winner:hover {
    background: #fef2f2;
}

.lw-keep-winner {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1747a6);
    border: 0;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}

.lw-keep-winner:hover {
    box-shadow: 0 10px 22px rgba(37, 99, 235, .32);
}

.lw-keep-winner.is-full {
    grid-column: 1 / -1;
}

.lw-confetti {
    position: fixed;
    z-index: 10000;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.lw-confetti-piece {
    position: absolute;
    top: -22px;
    left: var(--x);
    width: var(--size);
    height: calc(var(--size) * .48);
    background: var(--color);
    border-radius: 2px;
    opacity: 0;
    animation: lw-confetti-fall var(--duration) cubic-bezier(.15, .72, .42, 1) var(--delay) forwards;
}

@keyframes lw-confetti-fall {
    0% {
        opacity: 1;
        transform: translate3d(0, -20px, 0) rotate(0deg);
    }
    100% {
        opacity: .9;
        transform: translate3d(var(--drift), 105vh, 0) rotate(var(--turn));
    }
}

.lw-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 880px) {
    .lw-workspace {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .lw-wheel-wrap {
        width: min(100%, 540px);
    }

    .lw-entry-panel {
        width: min(620px, 100%);
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .lw-header {
        min-height: 68px;
        padding: 10px 13px;
    }

    .lw-brand img {
        width: 40px;
        height: 40px;
    }

    .lw-brand strong {
        font-size: .86rem;
    }

    .lw-icon-button__label,
    .lw-back-link__label {
        display: none;
    }

    .lw-icon-button,
    .lw-back-link {
        width: 40px;
        height: 40px;
        padding: 0;
        font-size: 1rem;
    }

    .lw-main {
        padding-top: 25px;
    }

    .lw-intro {
        margin-bottom: 16px;
    }

    .lw-intro > p:last-child {
        margin-top: 8px;
    }

    .lw-wheel-wrap {
        width: min(100%, 420px);
    }

    .lw-wheel-hint {
        margin-top: 4px;
    }

    #entriesInput {
        min-height: 230px;
    }

    .lw-gift-editor {
        padding: 10px 8px;
    }

    .lw-gift-editor__columns,
    .lw-gift-row {
        grid-template-columns: minmax(0, 1fr) 76px 34px;
        gap: 6px;
    }

    .lw-gift-row input {
        min-height: 40px;
        padding-inline: 9px;
        font-size: .8rem;
    }

    .lw-remove-gift {
        width: 34px;
        height: 34px;
    }

    .lw-gift-editor__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .lw-gift-editor__footer p {
        text-align: left;
    }

    .lw-result-actions,
    .lw-entry-actions {
        grid-template-columns: 1fr;
    }

    .lw-history__header {
        align-items: stretch;
        flex-direction: column;
    }

    .lw-history__actions {
        justify-content: space-between;
    }

    .lw-history__list {
        grid-template-columns: 1fr;
    }

    .lw-mode-option {
        gap: 4px;
        padding-inline: 5px;
        font-size: .69rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
