:root {
  --cobalt: #2336d9;
  --ink: #151a4a;
  --paper: #ffffff;
  --tint: #f3f4ff;
  --coral: #ff5b4a;
  --mustard: #ffc233;
  --mint: #2fd3a0;
  --muted: #4b4f7a;
  --danger: #b3261e;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;

  --gutter: 16px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.hero :focus-visible,
.top :focus-visible,
.foot :focus-visible {
  outline-color: #fff;
}

.hero .sheet :focus-visible {
  outline-color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  border: 2px solid var(--ink);
}

.skip:focus {
  top: var(--gutter);
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Pasek i hero ---------- */

.top {
  background: var(--cobalt);
  padding: 14px var(--gutter) 0;
}

.brand {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--cobalt);
  color: #fff;
  padding: 28px var(--gutter) 56px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.1rem, 8vw, 3.75rem);
  max-width: 14ch;
}

.lead {
  margin-top: 16px;
  font-size: 1.15rem;
  max-width: 34ch;
}

.confetti {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.c1 {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mustard);
  top: 22px;
  right: -14px;
}

.c2 {
  width: 54px;
  height: 54px;
  background: var(--coral);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  top: 150px;
  right: 34px;
  transform: rotate(14deg);
}

.c3 {
  width: 38px;
  height: 18px;
  background: var(--mint);
  top: 96px;
  right: 92px;
  transform: rotate(-24deg);
}

.c4 {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--coral);
  bottom: 24px;
  left: 18px;
}

/* ---------- Formularz ---------- */

.sheet {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--coral);
  padding: 20px 18px 22px;
  display: grid;
  gap: 18px;
}

.anchor {
  position: absolute;
  top: -80px;
}

.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

label,
legend {
  font-weight: 700;
  padding: 0;
}

.opt {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 48px;
}

textarea {
  resize: vertical;
  min-height: 84px;
}

::placeholder {
  color: #6b6f95;
  opacity: 1;
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
}

.error {
  min-height: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--danger);
}

.error:empty {
  display: none;
}

.form-error {
  padding: 10px 12px;
  border: 2px solid var(--danger);
  border-radius: 8px;
  background: #fff4f2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 9px 14px;
  min-height: 44px;
  line-height: 1.7;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  background: var(--paper);
}

.chip input:checked + span {
  background: var(--ink);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.row {
  display: grid;
  gap: 14px;
  align-items: end;
}

.age input {
  max-width: 140px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-weight: 600;
  cursor: pointer;
}

.check input {
  width: 24px;
  height: 24px;
  accent-color: var(--ink);
  flex: none;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  font: inherit;
  cursor: pointer;
}

.primary {
  min-height: 54px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--mustard);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.primary:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.primary[disabled] {
  cursor: progress;
  opacity: 0.75;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.secondary {
  min-height: 46px;
  padding: 9px 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.secondary:hover {
  background: var(--tint);
}

/* ---------- Wyniki ---------- */

.results {
  padding: 48px 0 20px;
  background: var(--paper);
}

.results h2,
.guide h2,
.faq h2 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.results h2:focus {
  outline: none;
}

.results-note {
  margin-top: 8px;
  color: var(--muted);
}

.wishes {
  display: grid;
  gap: 26px;
  margin-top: 26px;
}

.wish {
  --shadow: var(--mustard);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 7px 7px 0 var(--shadow);
  padding: 20px 18px 16px;
}

.wish:nth-child(2) {
  --shadow: var(--mint);
}

.wish:nth-child(3) {
  --shadow: var(--coral);
}

.wish-text {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 62ch;
  white-space: pre-line;
}

.wish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.fresh .wish {
  animation: drop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-14px) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Treść ---------- */

.guide,
.faq {
  padding: 56px 0;
}

.guide {
  background: var(--tint);
  margin-top: 28px;
}

.prose {
  max-width: 720px;
  display: grid;
  gap: 16px;
}

.prose p {
  max-width: 62ch;
}

.faq details {
  border-top: 2px solid var(--ink);
  padding: 4px 0;
}

.faq details:last-of-type {
  border-bottom: 2px solid var(--ink);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  min-height: 48px;
}

.faq details p {
  padding-bottom: 14px;
}

.foot {
  background: var(--ink);
  color: #fff;
  padding: 28px 0 36px;
  font-size: 0.95rem;
}

.foot .wrap {
  display: grid;
  gap: 8px;
}

.noscript {
  padding: 16px;
  text-align: center;
  background: var(--mustard);
  color: var(--ink);
  font-weight: 700;
}

.demo-banner {
  background: var(--mustard);
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  padding: 8px var(--gutter);
  font-size: 0.95rem;
}

/* ---------- Okno kartki ---------- */

.card-dialog {
  width: min(94vw, 520px);
  max-height: 96vh;
  overflow: auto;
  padding: 14px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--coral);
}

.card-dialog::backdrop {
  background: rgba(21, 26, 74, 0.7);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head h2 {
  font-size: 1.3rem;
}

.close {
  min-height: 44px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
}

#card-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.themes {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.theme {
  position: relative;
  width: 48px;
  height: 48px;
}

.theme input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.theme span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--swatch);
}

.theme input:checked + span {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink);
}

.theme input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 6px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Szersze ekrany ---------- */

@media (min-width: 760px) {
  :root {
    --gutter: 28px;
  }

  .hero {
    padding: 56px var(--gutter) 84px;
  }

  .hero-inner {
    grid-template-columns: 5fr 6fr;
    gap: 56px;
    align-items: start;
  }

  .hero h1 {
    margin-top: 24px;
  }

  .sheet {
    padding: 26px 26px 28px;
    box-shadow: 10px 10px 0 var(--coral);
  }

  .row {
    grid-template-columns: auto 1fr;
    gap: 22px;
  }

  .c1 {
    width: 110px;
    height: 110px;
    top: 36px;
    right: 8%;
  }

  .c2 {
    width: 80px;
    height: 80px;
    top: auto;
    bottom: 40px;
    right: 3%;
  }

  .c3 {
    top: 190px;
    right: 44%;
  }

  .c4 {
    bottom: 60px;
    left: 40%;
  }

  .wishes {
    gap: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fresh .wish {
    animation: none;
  }

  .primary {
    transition: none;
  }
}
.legal{margin-top:0}

/* ---------- Podstrony i linki ---------- */

.occasions {
  padding: 48px 0 8px;
}

.occasions h2 {
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
}

.occasion-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.occasion-links a {
  display: inline-block;
  padding: 9px 16px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.occasion-links a:hover {
  background: var(--mustard);
}

.examples {
  padding: 48px 0 24px;
}

.examples h2 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.examples .prose {
  margin-bottom: 30px;
}

.example-list {
  display: grid;
  gap: 26px;
}

@media (min-width: 760px) {
  .example-list {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}
