  .modal[hidden] { display: none; }
  .modal {
    position: fixed; inset: 0; z-index: 90;
    display: flex; align-items: center; justify-content: center;
    height: 100vh; height: 100dvh;
    padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  .modal-bd { position: absolute; inset: 0; background: rgba(3,5,8,0.78);  animation: fade .2s ease; }
  @keyframes fade { from { opacity: 0 } to { opacity: 1 } }
  @keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985) } to { opacity: 1; transform: none } }
  .modal-dlg {
    position: relative; width: 100%; max-width: 560px;
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    background: var(--navy-1);
    border: 1px solid rgba(198,161,91,0.32); border-radius: 2px;
    padding: clamp(26px, 3.4vw, 38px); animation: pop .26s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 40px 90px -30px rgba(0,0,0,0.85);
  }
  .modal-x {
    position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 2px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(246,242,234,0.75);
    font-size: 20px; line-height: 1; cursor: pointer; transition: .15s;
  }
  .modal-x:hover { background: rgba(255,255,255,0.12); color: var(--cream); }
  .modal-dlg h3 { color: var(--cream); font-size: clamp(24px, 3.2vw, 31px); margin-top: 4px; }
  .modal-dlg .msub { margin-top: 10px; font-size: 15px; color: rgba(246,242,234,0.72); line-height: 1.55; }

  .frm { margin-top: 24px; display: flex; flex-direction: column; gap: 15px; }
  .fld label { display: block; font-size: 13px; font-weight: 600; color: rgba(246,242,234,0.8); margin-bottom: 7px; }
  .fld label .opt { font-weight: 400; color: rgba(246,242,234,0.5); }
  .fld input, .fld textarea, .fld select {
    width: 100%; font-family: inherit; font-size: 15px; color: var(--cream);
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
    border-radius: 2px; padding: 12px 14px; transition: border-color .15s, background .15s;
  }
  .fld textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
  .fld select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c6a15b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; background-size: 15px; padding-right: 38px; }
  .fld select option { background: var(--navy-2); color: var(--cream); }
  .fld input::placeholder, .fld textarea::placeholder { color: rgba(246,242,234,0.35); }
  .fld input:focus, .fld textarea:focus, .fld select:focus {
    outline: none; border-color: var(--gold); background: rgba(255,255,255,0.08);
  }
  .fld input:focus-visible, .fld textarea:focus-visible, .fld select:focus-visible { outline: none; }
  .fld.bad input, .fld.bad textarea { border-color: #c9705a; }
  .fld .err { display: none; margin-top: 6px; font-size: 12.5px; color: #e0917c; }
  .fld.bad .err { display: block; }
  .f2 { display: grid; gap: 15px; grid-template-columns: 1fr; }
  @media (min-width: 520px) { .f2 { grid-template-columns: 1fr 1fr; } }

  .radios { display: flex; gap: 8px; flex-wrap: wrap; }
  .rd { flex: 1 1 auto; min-width: 92px; cursor: pointer; }
  .rd input { position: absolute; opacity: 0; width: 0; height: 0; }
  .rd span {
    display: block; text-align: center; font-size: 14px; font-weight: 500;
    padding: 11px 10px; border-radius: 2px; color: rgba(246,242,234,0.72);
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
    transition: all .15s ease;
  }
  .rd:hover span { border-color: rgba(198,161,91,0.5); color: var(--cream); }
  .rd input:checked + span {
    background: rgba(198,161,91,0.18); border-color: var(--gold);
    color: var(--gold-lt); font-weight: 600;
  }
  .rd input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
  .fld.dim { opacity: .42; pointer-events: none; }

  .consent { display: flex; gap: 11px; align-items: flex-start; }
  .consent input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--gold); cursor: pointer; }
  .consent span { font-size: 12.8px; color: rgba(246,242,234,0.68); line-height: 1.5; }
  .consent.bad span { color: #e0917c; }
  .hp { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 0 !important; }

  .frm .btn { width: 100%; margin-top: 4px; }
  .frm .btn[disabled] { opacity: .6; pointer-events: none; }
  .falt { text-align: center; font-size: 13.5px; color: rgba(246,242,234,0.6); }
  .falt a { color: var(--gold-lt); font-weight: 600; }
  .fmsg { display: none; padding: 12px 14px; border-radius: 2px; font-size: 13.8px; line-height: 1.5;
    background: rgba(201,112,90,0.14); border: 1px solid rgba(201,112,90,0.4); color: #edb2a0; }
  .fmsg.on { display: block; }

  .done { text-align: center; padding: 12px 0 4px; }
  .done .tick {
    width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 20px;
    background: rgba(47,111,79,0.2); border: 1.5px solid rgba(127,207,166,0.5);
    display: flex; align-items: center; justify-content: center;
  }
  .done .tick svg { width: 28px; height: 28px; color: #7fcfa6; }
  .done h3 { color: var(--cream); }
  .done p { margin-top: 12px; font-size: 15px; color: rgba(246,242,234,0.75); line-height: 1.6; }
  .done .btn { margin-top: 24px; }
  body.locked { overflow: hidden; }
  body.locked .mbar { display: none; }

  /* przycisk wysyłki zawsze pod ręką na telefonie */
  @media (max-width: 720px) {
    #fSend {
      position: sticky; bottom: 6px; z-index: 4;
      box-shadow: 0 12px 30px -8px rgba(3,5,8,0.92), 0 -8px 26px 14px rgba(9,13,20,0.72);
    }
  }

