/* modal scrim + dialog */
.scrim { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(2,6,12,0.55); transition: opacity 160ms ease; }
.scrim.scrim-full { background: rgba(2,6,12,0.78); }
.scrim.is-peeking { opacity: 0.06; }
.scrim.is-peeking .peek-btn, .scrim.is-peeking .peek-inline { opacity: 1; }
.peek-btn { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 8px 16px; border-radius: 18px; border: 1px solid var(--panel-edge); background: rgba(6,14,24,0.9); font-weight: 700; font-size: 13px; }
.dialog { min-width: 420px; max-width: 760px; padding: 22px 26px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-edge); box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.dialog-head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.dialog-source { flex: 0 0 auto; width: 120px; height: 168px; }
.dialog-msg { font-size: 20px; font-weight: 700; line-height: 1.3; }
.dialog-hint { color: var(--ink-dim); font-size: 13px; margin: 6px 0 10px; }
.dialog-buttons { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; }
.dbtn { min-width: 120px; padding: 11px 22px; border-radius: 22px; border: 1.5px solid rgba(200,230,250,0.4); background: rgba(20,40,60,0.9); font-weight: 800; font-size: 16px; transition: transform 140ms var(--ease-out), filter 150ms ease; }
.dbtn.is-primary { background: linear-gradient(180deg, #ffd27a, #e79a2d); color: #2a1600; border-color: transparent; }
.dbtn:active:not(:disabled) { transform: scale(0.97); }
.dbtn:disabled { filter: grayscale(0.8) brightness(0.6); }
@media (hover: hover) and (pointer: fine) { .dbtn:hover:not(:disabled), .option:hover, .chip:hover, .name-item:hover { filter: brightness(1.15); } }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option { text-align: left; padding: 11px 16px; border-radius: 10px; border: 1px solid rgba(200,230,250,0.25); background: rgba(255,255,255,0.05); font-size: 15px; transition: background-color 150ms ease, border-color 150ms ease; }
.option.is-selected { border-color: var(--gold); background: rgba(241,196,107,0.16); }
/* number */
.num-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px 0; }
.num-value { font-size: 48px; font-weight: 900; min-width: 80px; text-align: center; }
.num-step { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(200,230,250,0.4); background: rgba(20,40,60,0.9); font-size: 22px; font-weight: 800; }
.num-range { width: 100%; }
/* name */
.name-input { width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--panel-edge); background: #07111c; color: var(--ink); font-size: 16px; }
.name-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow: auto; margin-top: 10px; }
.name-item { padding: 6px 12px; border-radius: 14px; border: 1px solid rgba(200,230,250,0.2); background: rgba(255,255,255,0.04); font-size: 13px; }
.name-item.is-deck { border-color: rgba(126,240,255,0.45); background: rgba(89,183,255,0.1); }
.name-item.is-selected { border-color: var(--gold); background: rgba(241,196,107,0.25); }
.name-item.is-free { font-style: italic; }
/* land type / color two-step */
.two-step-path { display: flex; align-items: center; gap: 12px; justify-content: center; font-size: 22px; margin: 4px 0 8px; }
.chip-preview { min-width: 110px; text-align: center; padding: 8px 14px; border-radius: 10px; border: 1.5px dashed rgba(200,230,250,0.35); font-weight: 800; }
.chip-preview.is-set { border-style: solid; background: var(--chip); color: #0c1620; }
.chip-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip { padding: 12px 18px; border-radius: 12px; border: 0; background: var(--chip); color: #0c1620; font-weight: 800; font-size: 16px; min-width: 100px; transition: transform 140ms var(--ease-out); }
.chip:active { transform: scale(0.97); }
/* mulligan */
.dialog-mulligan { background: transparent; border: 0; box-shadow: none; max-width: 1400px; text-align: center; }
.mull-title { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: #fff4d6; }
.mull-sub { color: var(--ink-dim); margin: 4px 0 20px; font-size: 16px; }
.mull-hand { display: flex; gap: 14px; justify-content: center; }
.mull-card { width: 165px; height: 231px; }
.mull-free { margin-top: 16px; color: var(--cyan); font-size: 14px; }
.dialog-mulligan .dialog-buttons { justify-content: center; }
/* game over */
.dialog-gameOver { text-align: center; min-width: 520px; background: transparent; border: 0; box-shadow: none; }
.go-title { font-family: var(--font-display); font-size: 92px; font-weight: 700; }
.dialog-gameOver.is-win .go-title { color: #ffe3a1; text-shadow: 0 0 40px rgba(241,196,107,0.8); }
.dialog-gameOver.is-loss .go-title { color: #c9b8f0; text-shadow: 0 0 40px rgba(130,100,220,0.7); }
.go-reason { color: var(--ink-dim); font-size: 18px; }
.dialog-gameOver .dialog-buttons { justify-content: center; }
/* action menu (several abilities on one card) */
.action-menu { position: absolute; transform: translate(-50%, -110%); display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--panel-edge); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.action-item { padding: 8px 14px; border-radius: 7px; border: 0; background: rgba(89,183,255,0.14); text-align: left; font-weight: 700; font-size: 14px; white-space: nowrap; }
.action-item.is-cancel { background: transparent; color: var(--ink-dim); }
/* zoom + examine + viewer */
.zoom-roll { position: absolute; pointer-events: none; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.7)); }
.zoom-roll > * { width: 100%; height: 100%; }
.examine-scrim { position: absolute; inset: 0; background: rgba(2,6,12,0.8); display: flex; align-items: center; justify-content: center; gap: 30px; }
.examine-card { width: 400px; height: 560px; }
.examine-card > * { width: 100%; height: 100%; }
.examine-info { max-width: 300px; color: var(--ink-dim); display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.examine-close { font-size: 12px; opacity: 0.7; }
.viewer { width: 1180px; max-height: 760px; display: flex; flex-direction: column; padding: 20px 24px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-edge); }
.viewer-grid { display: flex; flex-wrap: wrap; gap: 12px; overflow: auto; padding: 6px; }
.viewer-card { width: 120px; height: 168px; flex: 0 0 auto; }
.viewer-card > *, .mull-card > *, .dialog-source > *, .reveal-card > * { width: 100%; height: 100%; }
