/* ───────────── Reset & base ───────────── */
[v-cloak] {
    display: none
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --bg: #1a1c17;
    --surface: #272a22;
    --surface2: #383b31;
    --primary: #d6bdae;
    --secondary: #6b705c;
    --gold: #d6bdae;
    --text: #f0ebe3;
    --text-dim: #a5a58c;
    --success: #7a8a68;
    --danger: #c4756a;
    --radius: 10px;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh
}

a {
    color: var(--secondary)
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: .95rem;
    font-weight: 600;
    transition: all .15s
}

button:active {
    transform: scale(.97)
}

input, select {
    font-family: inherit;
    border: 2px solid var(--surface2);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    outline: none
}

input:focus {
    border-color: var(--secondary)
}

h1, h2, h3 {
    font-weight: 700
}

h1 {
    font-family: 'Antic Didone', serif;
    font-style: normal;
    text-transform: uppercase
}

.btn-primary {
    background: var(--primary);
    color: #1a1c17
}

.btn-primary:hover {
    background: #c4a999
}

.btn-secondary {
    background: var(--secondary);
    color: #f0ebe3
}

.btn-secondary:hover {
    background: #5a5e4c
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger)
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 2px solid var(--surface2)
}

.btn-ghost:hover {
    border-color: var(--text-dim)
}

.btn-sm {
    padding: 6px 12px;
    font-size: .82rem
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.15rem
}

/* ───────────── Layout helpers ───────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px
}

.flex {
    display: flex;
    align-items: center;
    gap: 12px
}

.flex-wrap {
    flex-wrap: wrap
}

.gap-sm {
    gap: 8px
}

.gap-lg {
    gap: 20px
}

.mt {
    margin-top: 16px
}

.mb {
    margin-bottom: 16px
}

.text-center {
    text-align: center
}

/* ───────────── Toast notification ───────────── */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    z-index: 1000;
    animation: slideIn .3s ease;
    max-width: 380px
}

.toast-success {
    background: var(--success);
    color: #f0ebe3
}

.toast-error {
    background: var(--danger);
    color: #f0ebe3
}

.toast-info {
    background: var(--secondary);
    color: #f0ebe3
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px)
    }
    to {
        opacity: 1;
        transform: translateX(0)
    }
}

/* ───────────── Home view ───────────── */
.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    gap: 40px
}

.home-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px
}

.home-logo {
    display: block;
    width: min(240px, 70vw);
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .35))
}

.home h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--text-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.home-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center
}

.home-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 36px 32px;
    width: 320px;
    text-align: center;
    border: 2px solid var(--surface2);
    transition: border-color .2s
}

.home-card:hover {
    border-color: var(--secondary)
}

.home-card h2 {
    margin-bottom: 8px;
    font-size: 1.3rem
}

.home-card p {
    color: var(--text-dim);
    font-size: .9rem;
    margin-bottom: 20px
}

.home-card .field {
    display: flex;
    gap: 8px;
    margin-bottom: 12px
}

.home-card .field input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    font-size: 1.1rem
}

.home-admin {
    margin-top: 8px;
    opacity: .5;
    transition: opacity .2s
}

.home-admin:hover {
    opacity: 1
}

/* ───────────── Header bar ───────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--surface2)
}

.topbar h2 {
    font-size: 1.15rem
}

/* ───────────── Bingo board ───────────── */
.board-wrap {
    background: linear-gradient(145deg, #2f3328, #272a22);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
    display: inline-block
}

.board-header {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 5px;
    margin-bottom: 5px
}

.board-header span {
    text-align: center;
    font-family: 'Antic Didone', serif;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 6px 0;
    color: var(--gold);
    letter-spacing: 2px
}

.board-grid {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 5px
}

.board-cell {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0ebe3;
    border-radius: 8px;
    font-family: 'Antic Didone', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1c17;
    cursor: pointer;
    user-select: none;
    transition: all .12s
}

.board-cell:hover {
    background: #e5ded4
}

.board-cell.free {
    background: #d6bdae;
    cursor: pointer
}

.board-cell.stamped .stamp-mark {
    display: flex
}

.stamp-mark {
    display: none;
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 2.6rem;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .3))
}

.board-cell.stamped .cell-num {
    opacity: .45
}

/* ── Stamp shape picker ── */
.stamp-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap
}

.stamp-picker span.label {
    font-size: .85rem;
    color: var(--text-dim);
    margin-right: 2px
}

.stamp-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    background: var(--surface2);
    border: 2px solid transparent;
    transition: all .15s
}

.stamp-option:hover {
    border-color: var(--text-dim)
}

.stamp-option.active {
    border-color: var(--gold);
    background: var(--surface)
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all .15s
}

.color-swatch:hover {
    transform: scale(1.15)
}

.color-swatch.active {
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(214, 189, 174, .5)
}

/* ── Stamp opacity slider ── */
.opacity-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center
}

.opacity-slider span.label {
    font-size: .85rem;
    color: var(--text-dim)
}

.opacity-slider input[type=range] {
    width: 120px;
    accent-color: var(--gold);
    cursor: pointer
}

.opacity-slider .opacity-val {
    font-size: .8rem;
    color: var(--text-dim);
    min-width: 32px;
    text-align: center
}

/* ───────────── Player layout ───────────── */
.player-body {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding: 24px;
    justify-content: center
}

.player-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px
}

.player-right {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px
}

/* ───────────── Called numbers grid ───────────── */
.numbers-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px
}

.numbers-panel h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-dim)
}

.numbers-cols {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 4px
}

.numbers-col-header {
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    padding: 4px 0;
    color: var(--gold)
}

.num-cell {
    text-align: center;
    padding: 4px 0;
    font-size: .85rem;
    border-radius: 4px;
    color: var(--text-dim)
}

.num-cell.called {
    background: var(--gold);
    color: #1a1c17;
    font-weight: 700
}

/* ───────────── Pattern display (mini) ───────────── */
.patterns-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px
}

.patterns-panel h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-dim)
}

.pattern-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.pattern-card {
    text-align: center;
    width: 100px
}

.pattern-card span {
    display: block;
    font-size: .8rem;
    margin-bottom: 4px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.pattern-mini {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 2px
}

.pattern-mini-cell {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: var(--surface2)
}

.pattern-mini-cell.on {
    background: var(--gold)
}

/* ───────────── Winner banner ───────────── */
.winner-banner {
    background: linear-gradient(135deg, var(--gold), #a5a58c);
    color: #1a1c17;
    text-align: center;
    padding: 20px;
    border-radius: var(--radius);
    font-size: 1.6rem;
    font-weight: 800;
    animation: pulse 1s infinite alternate
}

@keyframes pulse {
    from {
        transform: scale(1)
    }
    to {
        transform: scale(1.03)
    }
}

/* ───────────── Admin login ───────────── */
.admin-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 16px
}

.admin-login .box {
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    width: 360px;
    border: 2px solid var(--surface2)
}

.admin-login .box h2 {
    margin-bottom: 6px
}

.admin-login .box p {
    color: var(--text-dim);
    margin-bottom: 20px;
    font-size: .9rem
}

.admin-login .box input {
    width: 100%;
    margin-bottom: 12px
}

.admin-login .box .btns {
    display: flex;
    gap: 8px;
    justify-content: center
}

.error-msg {
    color: var(--danger);
    font-size: .85rem;
    margin-top: 8px
}

/* ───────────── Admin dashboard ───────────── */
.admin-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 6px;
    border-radius: var(--radius);
    margin: 20px 24px 0
}

.admin-tabs button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: transparent;
    color: var(--text-dim);
    font-weight: 600
}

.admin-tabs button.active {
    background: var(--secondary);
    color: #fff
}

.tab-body {
    padding: 24px
}

/* Admin cards */
.cards-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px
}

.cards-toolbar input[type=number] {
    width: 80px
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.card-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface2);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: .95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s
}

.card-chip:hover {
    border-color: var(--secondary)
}

.card-chip .del {
    color: var(--danger);
    font-weight: 700;
    cursor: pointer;
    margin-left: 4px;
    font-size: 1.1rem
}

.card-chip .del:hover {
    color: #fff
}

/* Card preview modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500
}

.modal-box {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    max-width: 440px;
    width: 90%
}

.modal-box h3 {
    margin-bottom: 12px
}

/* Admin patterns */
.pattern-editor {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px
}

.pattern-editor-grid {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 4px;
    width: fit-content;
    margin: 12px auto
}

.pattern-editor-cell {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--surface2);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .12s
}

.pattern-editor-cell.on {
    background: var(--gold);
    border-color: var(--gold)
}

.pattern-editor-cell:hover {
    border-color: var(--text-dim)
}

.pattern-editor .field {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center
}

.pattern-editor .btns {
    text-align: center;
    margin-top: 12px
}

.saved-patterns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.saved-pattern {
    background: var(--surface);
    border: 2px solid var(--surface2);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    position: relative;
    width: 120px
}

.saved-pattern span {
    display: block;
    font-size: .85rem;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.saved-pattern .del {
    position: absolute;
    top: 4px;
    right: 8px;
    color: var(--danger);
    cursor: pointer;
    font-weight: 700
}

.saved-pattern .pattern-name {
    cursor: pointer
}

.saved-pattern .pattern-name:hover {
    color: var(--gold)
}

.pattern-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px
}

.sort-btn {
    background: var(--surface2);
    color: var(--text-dim);
    border: none;
    border-radius: 4px;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s
}

.sort-btn:hover:not(:disabled) {
    background: var(--secondary);
    color: #fff
}

.sort-btn:disabled {
    opacity: .3;
    cursor: default
}

.sort-btn:active:not(:disabled) {
    transform: scale(.9)
}

/* Admin game */
.game-setup {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px
}

.game-setup h3 {
    margin-bottom: 12px
}

/* Draw controls */
.draw-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap
}

.draw-delay-picker {
    display: flex;
    align-items: center;
    gap: 6px
}

.draw-delay-label {
    font-size: .85rem;
    color: var(--text-dim);
    white-space: nowrap
}

.draw-delay-select {
    padding: 8px 12px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--surface2);
    font-size: .9rem;
    cursor: pointer
}

.draw-delay-select:focus {
    border-color: var(--secondary)
}

/* Countdown indicator */
.draw-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    animation: fadeIn .3s ease
}

.countdown-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: countdownPulse 1s infinite
}

.countdown-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold)
}

.countdown-label {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 600
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); opacity: 1 }
    50% { transform: scale(1.08); opacity: .85 }
}

/* Sent indicator */
.draw-sent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    animation: fadeIn .3s ease
}

.sent-icon {
    font-size: 1.4rem
}

.sent-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--success)
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px) }
    to { opacity: 1; transform: translateY(0) }
}

.pattern-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px
}

.pattern-check {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s
}

.pattern-check.selected {
    border-color: var(--gold)
}

.pattern-check input {
    display: none
}

.pattern-check .dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-dim)
}

.pattern-check.selected .dot {
    background: var(--gold);
    border-color: var(--gold)
}

.game-active {
    display: flex;
    flex-direction: column;
    gap: 20px
}

/* Two-column layout for active game info */
.game-active-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.game-active-left {
    display: flex;
    flex-direction: column;
    gap: 20px
}

.game-active-right {
    display: flex;
    flex-direction: column;
    gap: 20px
}

@media (max-width: 800px) {
    .game-active-columns {
        grid-template-columns: 1fr
    }
}

.draw-area {
    text-align: center
}

.last-drawn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border-radius: 16px;
    padding: 20px 36px;
    margin-top: 12px;
    margin-left: 16px;
    border: 3px solid var(--gold)
}

.last-drawn .letter {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold)
}

.last-drawn .number {
    font-size: 3rem;
    font-weight: 800
}

.winners-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px
}

.winners-panel h3 {
    color: var(--gold);
    margin-bottom: 8px
}

.winner-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.winner-chip {
    background: linear-gradient(135deg, var(--gold), #a5a58c);
    color: #1a1c17;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-family: monospace
}

.winner-chip-btn {
    cursor: pointer;
    transition: transform .12s, box-shadow .12s
}

.winner-chip-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(214, 189, 174, .5)
}

.winner-chip-btn:active {
    transform: scale(.97)
}

/* Pattern-hit highlight on winner verification board */
.board-cell.pattern-hit {
    background: var(--gold);
    color: #1a1c17;
    box-shadow: 0 0 10px rgba(214, 189, 174, .6);
    border: 2px solid #a5a58c
}

.board-cell.pattern-hit.free {
    background: var(--gold)
}

.no-game-msg {
    text-align: center;
    color: var(--text-dim);
    padding: 40px
}

/* ───────────── Game details ───────────── */
.game-details {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--text);
    font-size: .92rem;
    line-height: 1.6;
    max-width: 380px;
    width: 100%;
    word-wrap: break-word
}

.game-details h1,
.game-details h2,
.game-details h3 {
    margin: 8px 0 4px;
    color: var(--gold)
}

.game-details p {
    margin: 6px 0
}

.game-details ul,
.game-details ol {
    padding-left: 20px;
    margin: 6px 0
}

.game-details a {
    color: var(--primary)
}

.game-details strong {
    color: var(--text)
}

.game-details code {
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .85em
}

.game-details-editor {
    margin-bottom: 16px
}

.game-details-editor textarea {
    width: 100%;
    font-family: inherit;
    font-size: .92rem;
    background: var(--surface2);
    color: var(--text);
    border: 2px solid var(--surface2);
    border-radius: var(--radius);
    padding: 10px 14px;
    resize: vertical;
    outline: none;
    line-height: 1.5
}

.game-details-editor textarea:focus {
    border-color: var(--primary)
}

/* ───────────── Styles editor ───────────── */
.styles-layout {
    display: flex;
    gap: 20px;
    min-height: 500px
}

.styles-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px
}

.styles-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 350px;
    overflow-y: auto
}

.style-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    background: var(--surface2);
    transition: all .12s;
    gap: 8px
}

.style-item:hover {
    background: var(--primary);
    color: var(--bg)
}

.style-item.selected {
    border: 2px solid var(--primary);
    background: var(--surface2)
}

.style-name {
    font-size: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.style-active-badge {
    font-size: .7rem;
    font-weight: 700;
    background: var(--success);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap
}

.styles-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px
}

.style-css-editor {
    width: 100%;
    flex: 1;
    min-height: 400px;
    border: 2px solid var(--surface2);
    border-radius: var(--radius);
    overflow: hidden
}

.style-css-editor:focus-within {
    border-color: var(--primary)
}

/* CodeMirror dark theme overrides */
.style-css-editor .CodeMirror {
    height: 100%;
    min-height: 400px;
    background: var(--surface);
    color: var(--text);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: .85rem;
    line-height: 1.5
}

.style-css-editor .CodeMirror-gutters {
    background: var(--surface2);
    border-right: 1px solid var(--surface2)
}

.style-css-editor .CodeMirror-linenumber {
    color: var(--text-dim)
}

.style-css-editor .CodeMirror-cursor {
    border-left-color: var(--text)
}

.style-css-editor .CodeMirror-selected {
    background: rgba(107, 112, 92, .35)
}

.style-css-editor .CodeMirror-focused .CodeMirror-selected {
    background: rgba(107, 112, 92, .5)
}

.style-css-editor .CodeMirror-activeline-background {
    background: rgba(255, 255, 255, .04)
}

.style-css-editor .CodeMirror-matchingbracket {
    color: var(--gold) !important;
    font-weight: 700
}

/* CSS syntax colors */
.style-css-editor .cm-keyword { color: #c792ea }
.style-css-editor .cm-atom { color: #f78c6c }
.style-css-editor .cm-number { color: #f78c6c }
.style-css-editor .cm-def { color: #82aaff }
.style-css-editor .cm-variable { color: var(--text) }
.style-css-editor .cm-variable-2 { color: #82aaff }
.style-css-editor .cm-property { color: #c3e88d }
.style-css-editor .cm-qualifier { color: #ffcb6b }
.style-css-editor .cm-tag { color: #f07178 }
.style-css-editor .cm-builtin { color: #ffcb6b }
.style-css-editor .cm-string { color: #c3e88d }
.style-css-editor .cm-string-2 { color: #c3e88d }
.style-css-editor .cm-comment { color: #676e95; font-style: italic }
.style-css-editor .cm-meta { color: #ffcb6b }
.style-css-editor .cm-attribute { color: #c792ea }
.style-css-editor .cm-error { color: #ff5370 }

@media (max-width: 700px) {
    .styles-layout {
        flex-direction: column
    }
    .styles-sidebar {
        width: 100%
    }
    .styles-list {
        max-height: 200px
    }
}

/* ───────────── Raffles ───────────── */
.raffle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px
}

.raffle-card {
    background: var(--surface);
    border: 2px solid var(--surface2);
    border-radius: 12px;
    width: 280px;
    cursor: pointer;
    transition: border-color .2s, transform .12s;
    overflow: hidden
}

.raffle-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px)
}

.raffle-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block
}

.raffle-card-body {
    padding: 16px
}

.raffle-card-body h3 {
    font-size: 1.05rem;
    margin-bottom: 6px
}

.raffle-cost {
    color: var(--gold);
    font-weight: 600;
    font-size: .9rem
}

.raffle-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 6px;
    text-transform: uppercase
}

.raffle-badge-open {
    background: var(--success);
    color: #fff
}

.raffle-badge-closed {
    background: var(--danger);
    color: #fff
}

.raffle-signup-form {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 16px
}

.raffle-signup-form input,
.raffle-signup-form select {
    width: 100%
}

.raffle-signup-result {
    background: var(--surface);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 16px
}

.raffle-form-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 700px
}

.raffle-admin-detail {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px
}

.raffle-winner-panel {
    background: linear-gradient(135deg, rgba(214,189,174,.15), rgba(122,138,104,.15));
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    text-align: center
}

.raffle-entries-table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow-x: auto
}

.raffle-entries-table th {
    font-weight: 600
}

.raffle-entries-table td,
.raffle-entries-table th {
    white-space: nowrap
}

.raffle-card-closed {
    opacity: .75
}

.raffle-card-closed:hover {
    opacity: 1
}

.raffle-closed-msg {
    background: var(--surface);
    border-radius: var(--radius);
    margin-top: 16px
}

