.elg-jeopardy {
    max-width: 1100px;
    margin: 24px auto;
    padding: 20px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    color: #172033;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-shadow: 0 18px 44px rgba(30, 41, 59, .12);
    box-sizing: border-box;
    position: relative;
}
.elg-jeopardy *, .elg-jeopardy *::before, .elg-jeopardy *::after { box-sizing: border-box; }
.elg-jeopardy [hidden] { display: none !important; }
.elg-jp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.elg-jp-kicker {
    color: #0ea5e9;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}
.elg-jp-title {
    margin: 2px 0 0;
    color: #312e81;
    font-size: 1.35rem;
    font-weight: 900;
}
.elg-jp-pill {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-weight: 900;
}
.elg-jp-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.elg-jp-fullscreen-btn {
     
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #fff;
    color: #4338ca;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}
.elg-jp-fullscreen-btn:hover,
.elg-jp-fullscreen-btn:focus-visible {
    background: #eff6ff;
    outline: none;
}
.elg-jp-fullscreen-btn:active {
    transform: scale(.96);
}
.elg-jp-fullscreen-btn svg,
.elg-jp-fullscreen-btn svg path,
.elg-jp-fullscreen-btn svg line,
.elg-jp-fullscreen-btn svg circle {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.elg-jp-setup,
.elg-jp-play {
    padding: 18px;
    border: 1px solid rgba(199, 210, 254, .9);
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 26px rgba(79, 70, 229, .08);
}
.elg-jp-label {
    display: block;
    margin-bottom: 8px;
    color: #312e81;
    font-weight: 900;
}
.elg-jp-input {
    width: 100%;
    min-height: 240px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-weight: 700;
    line-height: 1.55;
    resize: vertical;
    outline: none;
}
.elg-jp-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.elg-jp-input:focus,
.elg-jp-options input:focus,
.elg-jp-modal-controls select:focus,
.elg-jp-card input:focus,
.elg-jp-card textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.17);
}
.elg-jp-help {
    margin-top: 8px;
    color: #64748b;
    font-size: .9rem;
    font-weight: 700;
}
.elg-jp-options {
    display: grid;
    grid-template-columns: minmax(150px, 220px);
    margin-top: 14px;
}
.elg-jp-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.elg-jp-editor-head strong {
    display: block;
    color: #312e81;
    font-size: 1.08rem;
    font-weight: 900;
}
.elg-jp-editor-head span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: .9rem;
    font-weight: 700;
}
.elg-jp-category-editor {
    display: grid;
    gap: 14px;
}
.elg-jp-category-card {
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
}
.elg-jp-category-top {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
}
.elg-jp-card label {
    display: grid;
    gap: 6px;
    color: #1e3a8a;
    font-size: .88rem;
    font-weight: 900;
}
.elg-jp-card input,
.elg-jp-card textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-weight: 800;
    outline: none;
}
.elg-jp-card textarea {
    min-height: 70px;
    resize: vertical;
}
.elg-jp-questions {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.elg-jp-question-row {
    display: grid;
    grid-template-columns: 92px minmax(170px, 1fr) minmax(170px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dbeafe;
}
.elg-jp-small-btn {
    min-height: 40px;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: #dbeafe;
    color: #1d4ed8;
    font: inherit;
    font-size: .88rem;
    font-weight: 900;
    cursor: pointer;
}
.elg-jp-danger {
    background: #fee2e2;
    color: #dc2626;
}
.elg-jp-muted-note {
    margin-top: 10px;
    color: #64748b;
    font-size: .85rem;
    font-weight: 700;
}
.elg-jp-options label,
.elg-jp-modal-controls label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: .9rem;
    font-weight: 900;
}
.elg-jp-options input,
.elg-jp-modal-controls select {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-weight: 800;
    outline: none;
}
.elg-jp-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}
.elg-jp-btn,
.elg-jp-icon-btn {
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    background: #e2e8f0;
    color: #334155;
    font: inherit;
    font-size: .95rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .1s ease, filter .2s ease, background .2s ease;
}
.elg-jp-btn-primary {
    background: #4f46e5;
    color: #fff;
}
.elg-jp-btn-good {
    background: #22c55e;
    color: #fff;
}
.elg-jp-btn-bad {
    background: #ef4444;
    color: #fff;
}
.elg-jp-btn:hover:not(:disabled),
.elg-jp-icon-btn:hover:not(:disabled) { filter: brightness(.98); }
.elg-jp-btn:active:not(:disabled),
.elg-jp-icon-btn:active:not(:disabled) { transform: scale(.96); }
.elg-jp-message {
    min-height: 28px;
    margin-top: 12px;
    color: #475569;
    font-weight: 800;
    text-align: center;
}
.elg-jeopardy .js-setup-message { color: #dc2626; }
.elg-jp-scorebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}
.elg-jp-teams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.elg-jp-team {
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
}
.elg-jp-team strong {
    display: block;
    color: #1d4ed8;
    font-size: .95rem;
    font-weight: 900;
}
.elg-jp-team b {
    display: block;
    margin-top: 4px;
    color: #172033;
    font-size: 1.3rem;
    font-weight: 900;
}
.elg-jp-team-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.elg-jp-team-buttons button,
.elg-jp-icon-btn {
     
    min-height: 36px;
    padding: 0;
    border-radius: 10px;
}
.elg-jp-team-actions {
    display: flex;
    gap: 6px;
}
.elg-jp-board-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
}
.elg-jp-board {
    --jp-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--jp-cols), minmax(140px, 1fr));
    min-width: calc(var(--jp-cols) * 140px);
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: #1e1b4b;
}
.elg-jp-cell {
    min-height: 84px;
    display: grid;
    place-items: center;
    border: 2px solid #4338ca;
    border-radius: 10px;
    background: #1d4ed8;
    color: #facc15;
    text-align: center;
    font: inherit;
    font-size: clamp(1.1rem, 2.4vw, 1.7rem);
    font-weight: 900;
    cursor: pointer;
}
.elg-jp-cell.category {
    min-height: 64px;
    background: #312e81;
    color: #fff;
    font-size: .98rem;
    text-transform: uppercase;
    cursor: default;
}
.elg-jp-cell.played {
    background: #475569;
    border-color: #64748b;
    color: #cbd5e1;
    cursor: default;
    opacity: .78;
}
.elg-jp-cell.blank {
    background: #334155;
    cursor: default;
}
.elg-jp-modal {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    border-radius: 18px;
    background: rgba(15, 23, 42, .58);
}
.elg-jp-modal-card {
    width: min(760px, 100%);
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .32);
    animation: elg-jp-pop .2s ease both;
}
.elg-jp-question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.elg-jp-question-meta span {
    color: #1d4ed8;
    font-size: .9rem;
    font-weight: 900;
    text-transform: uppercase;
}
.elg-jp-question-meta strong {
    color: #f59e0b;
    font-size: 1.2rem;
    font-weight: 900;
}
.elg-jp-question {
    min-height: 120px;
    display: grid;
    place-items: center;
    padding: 18px;
    border-radius: 14px;
    background: #eef2ff;
    color: #172033;
    text-align: center;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.25;
}
.elg-jp-answer {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #dcfce7;
    color: #166534;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 900;
}
.elg-jp-modal-controls {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}
@media (max-width: 680px) {
    .elg-jeopardy { padding: 14px; }
    .elg-jp-header,
    .elg-jp-scorebar { align-items: flex-start; grid-template-columns: 1fr; flex-direction: column; }
    .elg-jp-status { justify-content: flex-start; }
    .elg-jp-editor-head,
    .elg-jp-category-top,
    .elg-jp-question-row { grid-template-columns: 1fr; }
    .elg-jp-modal-controls { grid-template-columns: 1fr; }
    .elg-jp-cell { min-height: 72px; }
}
.elg-jeopardy:fullscreen,
.elg-jeopardy.is-fullscreen {
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    border: 0;
    border-radius: 0;
    overflow: auto;
}
.elg-jeopardy:fullscreen .elg-jp-play,
.elg-jeopardy.is-fullscreen .elg-jp-play {
    min-height: calc(100vh - 130px);
}
@keyframes elg-jp-pop {
    from { opacity: 0; transform: translateY(8px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
