/* ── overlays + modals ── */
.overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1.2rem;
  background: radial-gradient(ellipse at 50% 40%, rgba(30, 12, 4, .72), rgba(0, 0, 0, .9));
  backdrop-filter: blur(5px); animation: fadeUp .25s var(--ease) both;
}
.modal {
  position: relative; width: min(560px, 100%); padding: 1.8rem; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: linear-gradient(180deg, #1a1611, #0d0a07);
  box-shadow: var(--shadow-lg); animation: fadeUp .3s var(--ease) both;
}
.modal-title { font-family: var(--font-display); font-size: 1.65rem; color: var(--gold-2); text-align: center; margin-bottom: .5rem; }
.modal-note { color: var(--muted); font-family: var(--font-body); font-size: .92rem; text-align: center; }
.modal-close {
  position: absolute; inset-inline-end: .7rem; top: .7rem; width: 34px; height: 34px;
  display: grid; place-items: center; cursor: pointer; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border); color: var(--text-2);
}
.modal-close:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.modal-close svg { width: 17px; height: 17px; }
.modal-actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }

/* ── promotion ── */
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1.2rem; }
.promo-choice {
  display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .4rem;
  cursor: pointer; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  transition: transform .18s var(--ease), border-color .18s, background .18s;
}
.promo-choice:hover { transform: translateY(-4px); border-color: var(--gold); background: rgba(200, 168, 75, .12); }
.promo-choice .pg { font-size: 2.4rem; line-height: 1; font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', serif; }
.promo-choice.w .pg { color: #f2e6c8; text-shadow: 0 0 12px rgba(47, 95, 179, .8); }
.promo-choice.b .pg { color: #17130f; text-shadow: 0 0 12px rgba(176, 42, 42, .9); }
.promo-choice span { font-family: var(--font-head); font-size: .78rem; color: var(--text-2); }

/* ── settings rows ── */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .2rem; border-bottom: 1px solid rgba(200, 168, 75, .1);
}
.setting-row:last-of-type { border-bottom: none; }
.setting-label { font-family: var(--font-head); font-size: .92rem; color: var(--text-2); }

/* ── parchment result scroll ── */
.modal-parchment, .modal-scroll {
  background:
    linear-gradient(180deg, rgba(231, 216, 182, .97), rgba(201, 182, 140, .97)) var(--noise);
  background-blend-mode: normal, overlay;
  border: 1px solid #8f7743; color: var(--ink);
  box-shadow: var(--shadow-lg), inset 0 0 60px rgba(120, 90, 40, .35);
}
.modal-parchment .modal-title, .modal-scroll .modal-title { color: #4a2f10; }
.modal-parchment .modal-note, .modal-scroll .result-sub { color: #5c4726; }
.modal-scroll { border-radius: 4px 4px 22px 22px; padding: 1.6rem 1.6rem 1.4rem; }
.modal-scroll::before, .modal-scroll::after {
  content: ''; position: absolute; left: -4%; right: -4%; height: 22px;
  background: linear-gradient(180deg, #b89b61, #6f5727); border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .6);
}
.modal-scroll::before { top: -12px; }
.modal-scroll::after { bottom: -12px; }
.result-sub { text-align: center; font-family: var(--font-body); font-size: 1rem; margin-bottom: .9rem; }
.result-stats { display: grid; gap: .3rem; margin-top: .6rem; }
.stat-row {
  display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .5rem;
  border-bottom: 1px dashed rgba(90, 66, 30, .3); font-family: var(--font-head); font-size: .9rem;
}
.stat-row b { font-family: var(--font-latin); color: #6a1f0c; }
.modal-scroll .btn-ghost { color: #3f2d12; border-color: #8f7743; background: rgba(255, 255, 255, .25); }
.modal-scroll .btn-ghost:hover { background: rgba(255, 255, 255, .5); }

/* ── toasts ── */
.toast-wrap {
  position: fixed; bottom: 1.4rem; inset-inline-start: 1.4rem; z-index: 90;
  display: flex; flex-direction: column; gap: .5rem; pointer-events: none;
}
.toast {
  padding: .6rem 1rem; border-radius: var(--radius-sm); font-family: var(--font-head); font-size: .88rem;
  background: rgba(12, 10, 8, .94); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow); display: flex; align-items: center; gap: .5rem;
  animation: fadeUp .28s var(--ease) both;
}
.toast svg { width: 16px; height: 16px; color: var(--gold-2); }
.toast.danger { border-color: var(--danger); color: #ffd9d4; }
.toast.success { border-color: var(--success); color: #dcffd3; }
