/* Shared finishing layer for the existing retro UI. */
:root { color-scheme: light; }
body { min-width: 320px; }
button, input, select, textarea { max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid #155eaa;
  outline-offset: 3px;
}
nav {
  padding: 0 16px 15px;
  align-items: flex-start;
  gap: 16px;
}
nav h1 {
  flex: 0 0 calc(100% + 32px);
  width: calc(100% + 32px);
  margin: 0 -16px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 3px solid var(--ui-black);
  box-shadow: none;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
nav > div, nav > .nav-links { align-self: center; }
.brand-nav { padding: 0; gap: 0; }
.brand-nav h1 { flex-basis: 100%; width: 100%; margin: 0; border-bottom: 0; }
.card > h2:first-child, .info-section > h2:first-child {
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.btn, button { line-height: 1.65; text-align: center; }
input, select, textarea { line-height: 1.6; }
.pricing { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: stretch; }
.price-card { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.price-card h3 { font-size: 11px; line-height: 1.7; }
.price-card .dur { margin: 0; line-height: 1.6; }
.price-card .price { margin: 2px 0 0; }
.price-card .price-now { line-height: 1.65; font-size: clamp(12px, 2vw, 17px); overflow-wrap: anywhere; }
.price-card .price-was { line-height: 1.6; }
.price-card .price-tag { text-shadow: none; }
.price-card .price-container, .price-card .price-now-row { width: 100%; min-width: 0; max-width: 100%; }
.price-card .price-now-row { flex-direction: column; flex-wrap: nowrap; gap: 7px; }
.price-card .price-now { display: block; max-width: 100%; margin: 0; text-align: center; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
.price-card .price-tag { margin: 0; max-width: 100%; line-height: 1.6; }
#discount-banner { min-width: 0; line-height: 1.8; overflow-wrap: anywhere; }
#discount-banner > span { min-width: 0; }
#discount-countdown { max-width: 100%; overflow-wrap: anywhere; line-height: 1.7; }
.stepper { flex-wrap: wrap; }
.stepper .step-btn { width: 44px; min-width: 44px; height: 44px; padding: 4px; }
.stepper .step-val { min-width: 56px; text-align: center; }
.step-hint { line-height: 1.8; }
#buyer-email { margin-bottom: 10px; }
#btn-send-otp { margin-bottom: 20px; }
.total { line-height: 1.8; overflow-wrap: anywhere; }
.info-section { scroll-margin-top: 16px; }
.info-steps li { align-items: center; }
.info-step-text, .popup-text, .warning-box, .step, #pay-hint, #paycheck-msg,
#device-hint, .security-box, .modal-body, .form-group label {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.65;
  font-weight: 600;
}
.info-step-text strong { font-family: 'Press Start 2P', system-ui, sans-serif; font-size: 9px; line-height: 1.8; }
.info-action { margin-top: 18px; font-size: 9px; }
.faq-section details { border-bottom: 2px dashed rgba(30, 30, 30, .3); }
.faq-section details:last-child { border-bottom: 0; }
.faq-section summary { padding: 15px 24px 15px 0; cursor: pointer; font: 700 12px/1.7 'Press Start 2P', system-ui, sans-serif; overflow-wrap: anywhere; }
.faq-section summary::marker { color: var(--ui-red); }
.faq-section details[open] summary { color: #074d75; }
.faq-section details p { padding: 0 0 16px 18px; font: 600 13px/1.7 system-ui, sans-serif; }
.faq-section details p a { color: #074d75; font-weight: 800; }
.faq-group-title { margin: 22px 0 4px; padding: 10px 12px; border: 2px solid var(--ui-black); background: var(--ui-blue); font: 700 10px/1.7 'Press Start 2P', system-ui, sans-serif; overflow-wrap: anywhere; }
.faq-group-title:first-of-type { margin-top: 14px; }
.public-footer {
  max-width: 800px;
  margin: 8px auto 24px;
  padding: 16px 20px;
  border-top: 2px dashed var(--ui-black);
  font: 600 12px/1.7 system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.public-footer a { color: var(--ui-black); background: var(--ui-blue); border: 3px solid var(--ui-black); box-shadow: 3px 3px 0 var(--ui-black); padding: 8px 10px; font: 700 8px/1.7 'Press Start 2P', system-ui, sans-serif; text-decoration: none; }
.footer-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.popup-overlay, .modal-overlay, .mobile-logout-modal {
  padding: 16px;
  overflow-y: auto;
}
.popup-content, .modal-dialog, .mobile-logout-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
}
.popup-content { max-width: 620px; }
.popup-title, .modal-header {
  margin: 0;
  padding: 12px 16px;
  box-shadow: none;
  border: 0;
  border-bottom: 3px solid var(--ui-black);
  line-height: 1.7;
}
.popup-body-inner, .modal-body { padding: 20px; }
.popup-text { overflow-wrap: anywhere; }
.popup-btn { width: 100%; }
.device-option { min-width: 0; }
.device-option[role="button"] { user-select: none; }
.device-option span { line-height: 1.7; }
.security-box { min-width: 0; }
.mobile-logout-dialog h2, .redeem-disabled-dialog h2 { line-height: 1.7; }
.mobile-logout-dialog p, .redeem-disabled-dialog p { font: 700 13px/1.7 system-ui, sans-serif; }
.alert, #status { overflow-wrap: anywhere; }
.alert-success, #status.success { background: #b0ffb0; color: var(--ui-black); }
.alert-error, #status.error { background: var(--ui-red); color: var(--ui-black); }
.table-container { max-width: 100%; scrollbar-gutter: stable; }
table { min-width: 620px; }
td, th { line-height: 1.7; vertical-align: top; overflow-wrap: anywhere; }
td .btn, td button { font-size: 8px; margin: 2px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.stat-card h3 { line-height: 1.4; overflow-wrap: anywhere; }
.modal-header { align-items: center; gap: 12px; }
.modal-header h3 { line-height: 1.7; overflow-wrap: anywhere; }
.modal-header button { flex: 0 0 auto; }
.modal-actions { justify-content: flex-end; flex-wrap: wrap; }
.modal-body input, .modal-body select, .modal-body textarea { font: 600 13px/1.5 system-ui, sans-serif; }
.admin-footer { max-width: 800px; margin: 20px auto 24px; }
.settings-feature { padding: 16px; background: #fffdf5; border: 3px solid var(--ui-black); box-shadow: 4px 4px 0 var(--ui-black); }
.settings-feature-title { margin: -16px -16px 16px; padding: 10px 12px; border-bottom: 3px solid var(--ui-black); font-size: 10px; line-height: 1.7; }
.settings-maintenance .settings-feature-title { background: var(--ui-red); }
.settings-discount .settings-feature-title { background: var(--ui-yellow); }
.settings-feature > div:has(> .btn) { align-items: stretch; }
.settings-feature > div > .btn { flex: 1 1 180px; min-width: 0; white-space: normal; }
.settings-feature #maintenance-status, .settings-feature #discount-status { padding: 10px; background: #fff; border: 2px solid var(--ui-black); overflow-wrap: anywhere; }
#vc-custom-message { font: 600 13px/1.6 system-ui, sans-serif; resize: vertical; }
.email-feedback-dialog { max-width: 520px; }
#email-feedback-header { background: #b0ffb0; }
#email-feedback-header.email-feedback-error { background: var(--ui-red); }
#email-feedback-title { font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
#email-feedback-message { font: 700 13px/1.7 system-ui, sans-serif; overflow-wrap: anywhere; }
.maintenance-overlay { overflow-y: auto; }
.maintenance-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; }
.maintenance-dialog h2 { line-height: 1.7; overflow-wrap: anywhere; }
.maintenance-dialog p { font: 700 13px/1.7 system-ui, sans-serif; overflow-wrap: anywhere; }
.maintenance-dialog .btn { flex: 1 1 190px; max-width: 100%; }
.maintenance-countdown { max-width: 100%; min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .container { padding: 12px 14px 20px; overflow-x: visible; }
  nav { padding: 0 12px 14px; text-align: left; flex-direction: column; }
  nav h1 { flex-basis: auto; width: calc(100% + 24px); margin: 0 -12px; padding: 11px 12px; font-size: 10px; }
  .brand-nav { padding: 0; }
  .brand-nav h1 { width: 100%; margin: 0; }
  nav > div, nav > .nav-links { width: 100%; align-self: stretch; }
  nav > div .btn, nav > .btn, .nav-links .btn, .nav-links a { flex: 1 1 auto; }
  .card, .info-section { padding: 15px; }
  .card > h2:first-child, .info-section > h2:first-child {
    width: auto;
    margin: -15px -15px 18px;
    padding: 10px 12px;
    font-size: 10px;
  }
  .pricing { grid-template-columns: 1fr; gap: 14px; }
  .price-card { gap: 4px; }
  #discount-banner { gap: 6px 10px; padding: 10px; font-size: 9px; }
  #discount-banner .discount-label { width: 100%; font-size: 10px; }
  #discount-countdown { font-size: 10px; }
  .faq-section summary { font-size: 9px; }
  .btn, button { width: auto; }
  #btn-pay, #check-voucher-btn, #open-netflix-btn { width: 100%; }
  .stepper { gap: 10px; }
  .stepper .step-btn { margin-top: 0; }
  .step-hint { flex-basis: 100%; }
  .device-options { flex-direction: row; gap: 10px; }
  .device-option { flex: 1 1 100px; width: auto; margin-bottom: 0; padding: 10px 5px; }
  .pico { width: 42px; height: 42px; }
  .popup-content, .modal-dialog { width: 100%; }
  .popup-title, .modal-header { width: auto; margin: 0; font-size: 10px; }
  .popup-body-inner, .modal-body { padding: 16px; }
  .modal-actions .btn { flex: 1 1 120px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card h3 { font-size: 18px; }
  .stat-card p { font-size: 7px; line-height: 1.8; }
  .admin-footer { margin: 20px 14px; }
  .settings-feature { padding: 12px; }
  .settings-feature-title { margin: -12px -12px 14px; }
  .maintenance-dialog { padding: 18px; }
  .maintenance-dialog h2 { margin: -18px -18px 18px; font-size: 11px; }
  .maintenance-countdown { font-size: 13px; }
}
@media (max-width: 390px) {
  .stats-grid { grid-template-columns: 1fr; }
  .device-option { flex-basis: 80px; }
}
