:root {
  --navy: #103c71;
  --deep: #092b52;
  --gold: #c89a3d;
  --ink: #17263a;
  --muted: #617083;
}


.backdrop { position: fixed; inset: 0; display: grid; place-items: center; z-index: 10; padding: 24px; background: rgb(5 23 43 / 72%); backdrop-filter: blur(5px); }
.backdrop[hidden] { display: none; }
.dialog { width: min(680px, 100%); overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 28px 80px rgb(0 17 38 / 34%); animation: enter .28s ease-out; }
.topline { height: 5px; background: linear-gradient(90deg, var(--navy) 0 72%, var(--gold) 72%); }
.dialog-header { display: flex; align-items: center; gap: 16px; padding: 28px 34px 20px; border-bottom: 1px solid #edf1f5; }
.icon { width: 44px; height: 44px; display: grid; place-items: center; flex: none; border: 1px solid #bed0e3; border-radius: 50%; background: #eef5fb; color: var(--navy); font: 700 26px/1 Georgia, serif; }
.dialog-header small { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.dialog-header h2 { margin: 3px 0 0; color: var(--deep); font: 800 25px/1.3 serif; }
.dialog-content { padding: 22px 34px 12px; color: #34465b; font-size: 15px; line-height: 1.95; }
.dialog-content p { margin: 0 0 12px; }
.dialog-content a { color: #1769aa; font-weight: 700; overflow-wrap: anywhere; text-decoration: none; }
.countdown { display: flex; align-items: center; gap: 8px; margin: 0 34px; padding: 13px 15px; border-radius: 4px; background: #f2f6fa; color: #53657a; font-size: 13px; }
.countdown strong { min-width: 26px; color: var(--navy); font: 700 24px/1 Georgia, serif; text-align: center; }
.progress { height: 3px; margin: 0 34px; overflow: hidden; background: #dfe8f1; }
.progress span { display: block; width: 100%; height: 100%; background: var(--gold); transform-origin: left; animation: progress 20s linear forwards; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 34px 30px; }
.actions button { min-height: 44px; padding: 0 22px; border: 1px solid #aebdcd; border-radius: 4px; background: #fff; color: var(--deep); cursor: pointer; font-weight: 700; }
.actions button:hover { border-color: var(--navy); background: #f6f9fc; }
.actions a { color: var(--navy); font-size: 14px; font-weight: 700; text-decoration: none; }

@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes progress { to { transform: scaleX(0); } }
@media (max-width: 640px) {
  .backdrop { align-items: end; padding: 12px; }
  .dialog { max-height: calc(100vh - 24px); overflow-y: auto; }
  .dialog-header { padding: 23px 22px 18px; }
  .dialog-content { padding: 18px 22px 8px; font-size: 14px; line-height: 1.8; }
  .countdown, .progress { margin-inline: 22px; }
  .actions { align-items: stretch; flex-direction: column; padding: 22px; }
  .actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dialog, .progress span { animation: none; } }
