.nanopolix-page, .nanopolix-page * { box-sizing: border-box; }
    body.nanopolix-page { --ink: #102a36; --muted: #52646d; --brand: #164f69; --accent: #187ba3; --accent-dark: #105d7d; min-height: 100vh; min-height: 100svh; margin: 0; background: #eaf2f5; color: var(--ink); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
    .nanopolix-backdrop { position: fixed; inset: 0; pointer-events: none; overflow: hidden; background: linear-gradient(135deg, #f7fafb 0%, #dce9ee 55%, #b7ced8 100%); }
    .nanopolix-backdrop picture, .nanopolix-backdrop img { display: block; width: 100%; height: 100%; }
    .nanopolix-backdrop img { object-fit: cover; object-position: center top; }
    .nanopolix-page .country-modal { position: fixed; inset: 0; z-index: 1000; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 1rem; border: 0; background: rgba(7, 32, 43, .74); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }
    .nanopolix-page .country-modal[open] { display: grid; place-items: center; }
    .nanopolix-page .country-modal__dialog { width: min(100%, 620px); max-width: 620px; max-height: calc(100vh - 2rem); overflow-y: auto; padding: clamp(1.5rem, 5vw, 2.4rem); border: 1px solid #d8e6ec; border-radius: 22px; background: #f8fcfe; color: var(--ink); text-align: center; box-shadow: 0 28px 80px rgba(0,0,0,.46); }
    .nanopolix-page .country-modal__eyebrow { margin: 0 0 .45rem; color: var(--accent-dark); font-size: .75rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
    .nanopolix-page .country-modal__dialog h1 { margin: 0 0 .8rem; color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.45rem); line-height: 1.14; letter-spacing: -.03em; }
    .nanopolix-page .country-modal__dialog > p:not(.country-modal__eyebrow) { max-width: 470px; margin: 0 auto 1.3rem; color: var(--muted); font-size: 1rem; }
    .nanopolix-page .country-modal__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .nanopolix-page .country-modal__option { display: flex; min-width: 0; min-height: 154px; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; padding: 1rem .65rem; border: 2px solid #cbdfe8; border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-weight: 800; line-height: 1.25; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
    .nanopolix-page .country-modal__option img { display: block; width: 96px; height: 60px; max-width: 100%; object-fit: contain; background: #fff; border: 1px solid rgba(0,0,0,.15); border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
    .nanopolix-page .country-modal__option:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(16,93,125,.14); }
    .nanopolix-page .country-modal__option:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
    .nanopolix-page .country-modal__option:disabled { opacity: .6; cursor: wait; transform: none; }
    .nanopolix-page .country-modal__status { display: inline-block; margin: 1rem auto 0 !important; padding: .45rem .85rem; border-radius: 999px; background: #e3f1f6; color: var(--accent-dark) !important; font-size: .9rem !important; font-weight: 800; }
    .nanopolix-page .country-modal__status[hidden] { display: none; }
    @media (max-width: 560px) {
      .nanopolix-page .country-modal__eyebrow, .nanopolix-page .selection-heading { display: none; }
      .nanopolix-page .country-modal__dialog h1 { margin-bottom: .6rem; font-size: 1.25rem; }
      .nanopolix-page .country-modal__dialog > p:not(.country-modal__eyebrow) { margin-bottom: .875rem; font-size: .8125rem; }
      .nanopolix-page .country-modal__option small { font-size: .625rem; }
      .nanopolix-page .country-modal { padding: .65rem; }
      .nanopolix-page .country-modal__dialog { width: min(100%, 340px); max-height: calc(100vh - 1.3rem); padding: 1.1rem; border-radius: 16px; }
      .nanopolix-page .country-modal__options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
      .nanopolix-page .country-modal__option { min-height: 96px; gap: .5rem; padding: .65rem .4rem; font-size: .875rem; }
      .nanopolix-page .country-modal__option img { width: 56px; height: 35px; flex: none; }
    }

.country-selector-root { height: 100%; overflow: hidden; scroll-behavior: auto; }
body.nanopolix-page { position: fixed; inset: 0; overflow: hidden; }
.error-selector { display: grid; place-items: center; height: 100svh; padding: 1rem; overflow: auto; }
.nanopolix-page .country-modal { overscroll-behavior: contain; }
.nanopolix-page .country-modal[open] { align-items: safe center; }
.nanopolix-page .country-modal:focus { outline: none; }
.selection-heading { margin: 0 0 .5rem; font-size: 1rem; }
.country-modal__option small { display: block; margin-top: .35rem; font-size: .75rem; font-weight: 500; }
:where(a, button, summary):focus-visible { outline: 3px solid #105d7d; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .nanopolix-page .country-modal__option { transition: none; } .nanopolix-page .country-modal__option:hover { transform: none; } }

.country-modal__dialog { position: relative; }
.country-modal__loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 1rem; border-radius: inherit; background: rgba(248, 252, 254, .94); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: wait; }
.country-modal__loading[hidden] { display: none; }
.country-modal__loading p { margin: 0; font-size: 1.2rem; font-weight: 800; }
.country-modal__loading span { font-size: 1rem; font-weight: 500; color: #52646d; }
.country-modal__loading p::before { content: ""; display: block; width: 2rem; height: 2rem; margin: 0 auto 1rem; border: 3px solid #d8e6ec; border-top-color: #105d7d; border-radius: 50%; animation: country-loading-spin .8s linear infinite; }
@keyframes country-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .country-modal__loading p::before { animation: none; } }

.nanopolix-backdrop { z-index: 1; background: #eaf2f5; }

