
    /* Modal */
    /* ===  =========================== */
    #countryModal{position:fixed;inset:0;display:none}
    #countryModal.open{display:block}
    .modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
    .modal{
      position:absolute;
      left:50%;
      top:4%;
      transform:translateX(-50%);
      width:min(960px,92vw);

      /* NEW: keep the dialog inside the viewport */
      max-height:92vh;
      display:flex;
      flex-direction:column;

      background:var(--card);
      border:1px solid var(--border);
      border-radius:16px;
      box-shadow:var(--shadow);
      padding:16px 16px 20px;
    }
    #modalBody{
      margin-top:4px;
      overflow-y:auto;      /* show scrollbar when needed */
      padding-right:4px;    /* little space so the scrollbar doesn't sit on text */
    }

    .modal-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      margin-bottom:8px
    }
    .modal-close{
      background:transparent;
      color:var(--text);
      font-size:24px;
      border:0;
      cursor:pointer
    }
    
    /* WebKit — Chrome, Edge, Safari */
    #modalBody::-webkit-scrollbar {
      width: 8px;
    }

    #modalBody::-webkit-scrollbar-track {
      background: #0b0e13;         /* same as your --bg */
    }

    #modalBody::-webkit-scrollbar-thumb {
      background: #1e2533;         /* dark muted blue-grey */
      border-radius: 8px;
      border: 2px solid #0b0e13;   /* blends cleanly into track */
    }

    #modalBody::-webkit-scrollbar-thumb:hover {
      background: #2c3547;         /* slightly brighter on hover */
    }

    /* Firefox */
    #modalBody {
      scrollbar-width: thin;
      scrollbar-color: #1e2533 #0b0e13;
    }
