:root{
  --bg: #f6f8ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15,23,42,.10);
  --accent: #2b6cff;
  --accent2: #7c3aed;
  --shadow: 0 14px 34px rgba(15,23,42,.10);
  --shadow2: 0 10px 24px rgba(15,23,42,.08);
  --radius: 18px;

  /* ustawiane w index.php */
  --hero-bg: none;

  /* ✅ wysokość obszaru “hero background” – tu kończy się obrazek i zaczyna fade */
  --hero-h: clamp(900px, 120vh, 1500px);
}

*{box-sizing:border-box}
html,body{height:100%}

/* ✅ twarde odcięcie scrolla w poziomie (prawdziwą przyczynę też naprawiamy niżej) */
html, body{overflow-x:hidden}

body{
  margin:0;
  /* ✅ minimalnie “ciaśniejszy” look bez zmiany fontu: mniejsze tracking + optycznie mniej bulky */
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: -0.01em;
  color:var(--text);
  background: var(--bg);
  position:relative;
}

/* =========================================================
   HERO BACKGROUND LAYER (obrazek tylko na górze strony)
   - NIE zależy od wysokości ekranu
   - fade jest na końcu obrazka (hero area)
   ========================================================= */

/* obrazek */
body::before{
  content:"";
  position:absolute;
  left:0; top:0;
  width:100%;
  height: max(var(--hero-h), 100vh);
  z-index:-2;
  pointer-events:none;

  background-image: var(--hero-bg);
  background-repeat:no-repeat;
  background-position: top center;
  background-size: cover; /* ✅ na mobile obcina boki => wyższy “kadr” */
}

/* overlay + fade do bieli na końcu obrazka */
body::after{
  content:"";
  position:absolute;
  left:0; top:0;
  width:100%;
  height: max(var(--hero-h), 100vh);
  z-index:-1;
  pointer-events:none;

  background:
    radial-gradient(900px 520px at 14% -12%, rgba(43,108,255,.10), transparent 62%),
    radial-gradient(900px 520px at 94% -10%, rgba(124,58,237,.09), transparent 58%),

    /* ✅ fade dopiero w ostatnich ~15% wysokości obrazka */
    linear-gradient(
      180deg,
      rgba(246,248,255,0.00) 0%,
      rgba(246,248,255,0.00) 90%,
      rgba(246,248,255,0.85) 98%,
      rgba(246,248,255,1.00) 100%
    );
}

/* ========================================================= */

.container{
  max-width: 820px;            /* ✅ ciaśniej niż było */
  margin:0 auto;
  padding:16px;
}

.topbar{
  position:sticky;top:0;z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(246,248,255,.82);
  border-bottom: 1px solid var(--line);
}

.topbar__inner{
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:space-between;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;                /* ✅ nie wypycha */
  flex: 1 1 auto;
}

.brand__mark{
  width:38px;height:38px;border-radius:14px;
  display:grid;place-items:center;
  background: linear-gradient(135deg, rgba(43,108,255,.95), rgba(124,58,237,.95));
  color:#fff;font-weight:900;
  box-shadow: 0 14px 26px rgba(43,108,255,.22);
  flex: 0 0 auto;
}

.brand__name{font-weight:900}
.brand__tag{color:var(--muted);font-size:12px;margin-top:2px}

.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  flex: 0 0 auto;
}

.tab{
  border:1px solid var(--line);
  background:rgba(255,255,255,.68);
  padding:10px 12px;border-radius:999px;
  font-weight:800;color:var(--muted);
  cursor:pointer;
  transition: transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.tab:hover{transform: translateY(-1px); color: var(--text); background:#fff}

.tab.is-active, .tab.is-active:visited{
  background:#fff;color:var(--text);
  border-color: rgba(43,108,255,.40);
  box-shadow: var(--shadow2);
}

/* ✅ status nie wypycha layoutu */
.status{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 0;              /* było 220px – to robiło overflow */
  justify-content:flex-end;
  flex: 0 1 auto;
}

.status__text{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  max-width: 220px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.spinner{
  width:16px;height:16px;border-radius:50%;
  border:2px solid rgba(15,23,42,.18);
  border-top-color: rgba(43,108,255,.9);
  opacity:.25;
  flex: 0 0 auto;
}

.spinner.is-on{opacity:1;animation: spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

.panel{
  margin-top:16px;
  background: rgba(255,255,255,.55);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panel.is-hidden{display:none}

.panel__head{
  padding:18px 18px 10px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
}

/* ✅ bardziej kompaktowy nagłówek */
.panel__head h1{margin:0;font-size:20px}

.panel__meta{display:flex;gap:8px;flex-wrap:wrap}

.pill{
  font-size:12px;padding:6px 10px;border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.86);
  color: var(--muted);
}

/* ✅ bardziej kompaktowy hint */
.hint{margin-top:6px;color:var(--muted);font-size:12px}

.gifts{padding: 6px 12px 14px}

.day{padding:10px 4px 2px}

/* ✅ data bliżej giftów + mniejsza czcionka */
.day__header{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  padding:6px 8px 8px; /* było 10/12 */
}

.day__date{
  font-weight:900;
  font-size:16px;      /* było 20 */
}

.empty{padding:26px 18px 30px;text-align:center}
.empty__title{font-weight:900;font-size:16px}
.empty__sub{color:var(--muted);margin-top:6px}

.placeholder{padding:18px;color:var(--muted)}

/* ✅ stary footer (już nieużywany) */
.footer{padding:20px 0}
.footer__inner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.muted{color:var(--muted)}

/* gift row */
.gift{
  display:grid;
  grid-template-columns: 192px 1fr; /* ✅ ciaśniej niż 216 */
  gap:12px;                         /* było 14 */
  align-items:center;

  border-radius: 16px;
  padding:10px 12px;                /* ✅ mniejszy wewnętrzny padding */
  margin-bottom:10px;               /* było 12 */

  background:
    linear-gradient(rgba(255,255,255,.96), rgba(255,255,255,.96)) padding-box,
    linear-gradient(135deg, rgba(43,108,255,.95), rgba(124,58,237,.95)) border-box;
  border: 2px solid transparent;

  box-shadow: 0 14px 26px rgba(15,23,42,.06);
  transition: transform .10s ease, box-shadow .20s ease, filter .20s ease;
  min-height: 88px;                 /* ✅ było 104 */
  text-decoration:none;
  color: inherit;
}

.gift.is-live:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15,23,42,.10);
  filter:saturate(1.03);
}

.gift.is-live:active{transform: translateY(0px)}

.gift.is-expired{
  background: rgba(255,255,255,.92);
  border:1px solid rgba(15,23,42,.10);
  cursor: default;
  filter:none;
}

.gift.is-expired:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15,23,42,.10);
}

.gift.is-expired:active{transform: translateY(0px)}

.gift__icons{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding-right: 4px; /* było 6 */
}

.icon-stack{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;            /* było 10 */
  width: 176px;       /* było 196 */
  min-height: 56px;   /* było 72 */
}

.icon{
  width: 44px;        /* ✅ było 56 */
  height: 44px;       /* ✅ było 56 */
  border-radius: 7px;
  background:#fff;
  border:2px solid rgba(15,23,42,.14); /* ✅ trochę grubsza obramówka */

  /* ✅ CHANGE: full-bleed image inside the rounded square */
  object-fit: cover;
  padding: 0;

  box-shadow: 0 10px 18px rgba(15,23,42,.08);
}

.more{
  position:absolute;
  right:-8px;
  bottom:-8px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(43,108,255,.12);
  color: rgba(43,108,255,.95);
  font-weight:900;
  font-size:12px;
  border: 1px solid rgba(43,108,255,.20);
  box-shadow: 0 10px 18px rgba(15,23,42,.10);
}

.gift__content{min-width:0}

.gift__title{
  font-weight:900;
  font-size:16px;   /* ✅ było 18 */
  line-height:1.15;
  word-break: break-word;
  margin:0;
}

.gift__meta{
  margin-top:8px;   /* ✅ było 10 */
  font-size:11px;   /* ✅ było 12 */
  color: var(--muted);
}

.expires{
  display:inline-flex;
  padding:5px 9px;  /* ✅ delikatnie mniejsze */
  border-radius:999px;
  background: rgba(43,108,255,.10);
  border:1px solid rgba(43,108,255,.18);
  color: rgba(43,108,255,.95);
  font-weight:900;
  font-size:11px;   /* ✅ bardziej kompaktowo */
}

.expired{
  display:inline-flex;
  padding:5px 9px;  /* ✅ delikatnie mniejsze */
  border-radius:999px;
  background: rgba(15,23,42,.06);
  border:1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.70);
  font-weight:900;
  font-size:11px;   /* ✅ bardziej kompaktowo */
}

.status{ display:none; }

/* =========================
   MOBILE FIXES
   ========================= */
@media (max-width: 780px){
  :root{
    --hero-h: 860px; /* ✅ mobile: wyższy kadr, obcina boki */
  }

  .container{max-width: 660px; padding:14px}

  .topbar__inner{
    flex-wrap:wrap;           /* ✅ topbar przestaje się rozwalać */
    gap:12px;
  }

  .brand{
    flex: 1 1 100%;
  }

  .tabs{
    width:100%;
    justify-content:center;
    gap:10px;
  }
  .tab{
    padding:8px 12px;
    font-size:14px;
  }

  .panel__head{
    flex-direction:column;
    align-items:flex-start;
  }

  .gifts{padding: 6px 10px 14px}

  /* ✅ mobile: data też bardziej kompaktowo */
  .day__date{font-size:15px}

  .gift{
    grid-template-columns: 1fr;
    gap:10px;          /* było 12 */
    min-height:auto;
    padding:10px 12px; /* zachowujemy kompakt */
  }

  .gift__icons{
    justify-content:flex-start;
    padding-right:0;
  }

  .icon-stack{
    width:auto;
    justify-content:flex-start;
  }

  /* ✅ status całkiem wyłączamy na mobile */
  .status{ display:none; }
}

@media (max-width: 780px){
  .gift{ position: relative; }

  /* badge wyrównany dokładnie do startu ikon (górny padding karty) */
  .expires, .expired{
    position: absolute;
    top: 21px;          /* ✅ minimalnie wyżej dla mniejszego paddingu karty */
    right: 16px;

    margin: 0;
    z-index: 2;
  }

  .gift__title{
    padding-right: 0 !important;
  }

  .gift__icons{
    align-self: flex-start;
  }
}

/* =========================================================
   ✅ NEW: Consistent footer + contact
   ========================================================= */

.site-footer{
  margin-top:22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  backdrop-filter: blur(10px);
}

.site-footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.site-footer__muted{
  color: var(--muted);
  font-size: 12px;
}

.site-footer__right{
  display:flex;
  align-items:center;
  gap:10px;
}

.site-footer__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
  color: var(--text);
  font-weight:800;
  font-size:12px;
  text-decoration:none;
  transition: transform .08s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.site-footer__link:hover{
  transform: translateY(-1px);
  background:#fff;
  box-shadow: var(--shadow2);
}

.site-footer__link.is-active{
  border-color: rgba(43,108,255,.40);
  box-shadow: var(--shadow2);
}

/* Contact form */
.contact{
  padding: 2px;
}

.contact__row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

@media(max-width: 720px){
  .contact__row{ grid-template-columns: 1fr; }
}

.contact__field{min-width:0}

.contact__label{
  display:block;
  font-weight:900;
  font-size:12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.contact__input, .contact__textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.contact__textarea{
  min-height: 140px;
  resize: vertical;
}

.contact__input:focus, .contact__textarea:focus{
  background:#fff;
  border-color: rgba(43,108,255,.35);
  box-shadow: 0 0 0 4px rgba(43,108,255,.12);
}

.contact__fineprint{
  margin-top:8px;
  font-size:12px;
  color: var(--muted);
}

.contact__actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:12px;
}

.contact__cancel{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
  color: var(--text);
  font-weight:900;
  font-size:13px;
  text-decoration:none;
}

.contact__send{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(43,108,255,.28);
  background: rgba(43,108,255,.12);
  color: rgba(43,108,255,.95);
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  transition: transform .08s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.contact__send:hover{
  transform: translateY(-1px);
  background: rgba(43,108,255,.16);
  box-shadow: var(--shadow2);
}

.contact__send:active{transform: translateY(0px)}

.contact-err{
  border:1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
  color: rgba(15,23,42,.92);
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 12px;
  font-weight: 800;
}

.contact-ok{
  border:1px solid rgba(43,108,255,.22);
  background: rgba(255,255,255,.70);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: var(--shadow2);
}

.contact-ok__title{
  font-weight: 900;
  font-size: 16px;
  margin: 0 0 6px;
}

.contact-ok__sub{
  color: var(--muted);
  font-size: 13px;
}

/* honeypot hidden */
.hp{
  position:absolute !important;
  left:-10000px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
}


/* =========================================================
   ✅ Layout: sticky footer
   ========================================================= */
body.layout{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.layout__main{ flex: 1 0 auto; }
.layout__footer{ flex: 0 0 auto; }

/* =========================================================
   ✅ Contact form tweaks (fonts less “spread out”)
   ========================================================= */
.contact__input, .contact__textarea{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: 0;      /* ✅ zero rozjeżdżania */
  line-height: 1.35;      /* ✅ normalniej */
}

.contact__textarea{
  font-size: 14px;
}

/* (opcjonalnie) żeby placeholder też był normalny */
.contact__textarea::placeholder,
.contact__input::placeholder{
  letter-spacing: 0;
}
