:root {
    --bg: #0f172a;
    --fg: #e2e8f0;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --ok: #22c55e;
    --bad: #ef4444;
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto
}

.wrap {
    max-width: 900px;
    margin: auto;
    padding: 20px
}

h1 {
    font-size: 20px;
    margin: 0 0 10px
}

h2 {
    font-size: 16px;
    margin: 20px 0 10px
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

input[type=text] {
    flex: 1;
    min-width: 220px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0b1222;
    color: var(--fg)
}

button {
    padding: 10px 14px;
    border: 1px solid #334155;
    background: #0b1222;
    color: var(--fg);
    border-radius: 8px;
    cursor: pointer
}

button.primary {
    background: var(--accent);
    color: #002a3a;
    border: none
}

button:disabled {
    opacity: .5;
    cursor: not-allowed
}

.list {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center
}

.pill {
    padding: 8px 10px;
    background: #0b1222;
    border: 1px solid #1f2a44;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px
}

.toggle {
    appearance: none;
    width: 44px;
    height: 24px;
    background: #1f2937;
    border-radius: 999px;
    position: relative;
    outline: none;
    cursor: pointer;
    border: 1px solid #374151
}

.toggle:checked {
    background: #065f46;
    border-color: #065f46
}

.toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: transform .18s
}

.toggle:checked::after {
    transform: translateX(20px)
}

.slot {
    margin-top: 18px;
    height: 68px;
    border: 2px dashed #334155;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    letter-spacing: .5px
}

.tray {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #334155;
    background: #0b1222;
    color: var(--muted);
    font-size: 12px
}

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

.result {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted)
}

.danger {
    color: var(--bad)
}

.ok {
    color: var(--ok)
}

/* 追加: リールと抽選ボタン横並び */
.monitor {
    display: flex;
    align-items: center;
    gap: 24px;
}

.monitor .slot {
    flex: 1;
    height: 80px;
    margin: 0;
}

.monitor #drawBtn {
    height: 80px;
    padding: 0 28px;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .monitor {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .monitor #drawBtn {
        width: 100%;
        height: 56px;
    }
}