/* dlaciebie.podreka.com — trzy wyglądy: róże, nocne niebo, słoneczny */
:root {
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "DejaVu Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
body.t-roze {
  --bg1: #ffe3ec; --bg2: #ffd8cc; --bg3: #f1dcff;
  --ink: #5c1733; --accent: #d93a6f; --accent-hover: #c22c5e; --soft: #f5b8cb;
  --card: rgba(255, 255, 255, 0.62); --card-line: rgba(255, 255, 255, 0.9); --btn-bg: #fff; --glow: rgba(217, 58, 111, 0.28);
}
body.t-noc {
  --bg1: #0b1433; --bg2: #1c2b5e; --bg3: #2a1d4e;
  --ink: #efe6d4; --accent: #f2c46d; --accent-hover: #ffd88f; --soft: #5a6aa0;
  --card: rgba(14, 22, 52, 0.62); --card-line: rgba(242, 196, 109, 0.25); --btn-bg: transparent; --glow: rgba(242, 196, 109, 0.3);
}
body.t-slonce {
  --bg1: #fff3c4; --bg2: #ffd2a8; --bg3: #c9f2e0;
  --ink: #4a2a10; --accent: #e8590c; --accent-hover: #cc4a05; --soft: #ffc28f;
  --card: rgba(255, 255, 255, 0.66); --card-line: rgba(255, 255, 255, 0.95); --btn-bg: #fff; --glow: rgba(232, 89, 12, 0.25);
}

* { box-sizing: border-box; }
html { background: #ffe3ec; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 18px/1.65 var(--sans);
  background: linear-gradient(130deg, var(--bg1), var(--bg2), var(--bg3), var(--bg1));
  background-size: 300% 300%;
  animation: drift 24s ease-in-out infinite;
  overflow-x: hidden;
  transition: color 0.4s;
}
body.t-noc { background-image: linear-gradient(160deg, var(--bg1), var(--bg2), var(--bg3), var(--bg1)); }
@keyframes drift { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: 24px 22px 70px; }
#gift { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 28px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 50px rgba(60, 10, 40, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--btn-bg);
  border: 2px solid var(--soft);
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { border-color: var(--accent); }
.btn-main { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 20px var(--glow); }
.btn-main:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.t-noc .btn-main { color: #1a1430; }
.btn[aria-pressed="true"] { border-color: var(--accent); }
.btn-wide { width: 100%; margin-top: 6px; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Tworzenie ---------- */
.m-title { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(2.3rem, 9vw, 3.6rem); line-height: 1.08; margin: 24px 0 12px; color: var(--accent); }
.m-lead { margin: 0 0 26px; max-width: 32em; }
.m-form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.lbl { font-weight: 700; padding: 0; }
.lbl em { font-weight: 400; font-style: normal; opacity: 0.7; }
.field input[type="text"] {
  font: inherit;
  color: #2a1020;
  background: #fff;
  border: 2px solid var(--soft);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 50px;
  width: 100%;
}
.field input[type="text"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--glow); }
.help { font-size: 0.85rem; opacity: 0.75; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip input, .theme input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--soft);
  background: var(--btn-bg);
  cursor: pointer;
  font-weight: 600;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.t-noc .chip input:checked + span { color: #1a1430; }
.chip input:focus-visible + span, .theme input:focus-visible ~ .sw { outline: 3px solid var(--ink); outline-offset: 2px; }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme { min-width: 0; display: grid; align-content: start; gap: 2px; cursor: pointer; text-align: center; padding: 8px; border-radius: 18px; border: 2px solid transparent; }
.theme:has(input:checked) { border-color: var(--accent); background: rgba(255, 255, 255, 0.18); }
.sw { display: block; aspect-ratio: 1.3; border-radius: 14px; margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.sw-roze { background: radial-gradient(circle at 50% 45%, #e2457a 0 18%, #ff9fbe 19% 30%, transparent 31%), linear-gradient(135deg, #ffe3ec, #f1dcff); }
.sw-noc { background: radial-gradient(circle at 62% 38%, #fff6d8 0 11%, transparent 12%), radial-gradient(circle at 56% 34%, #1c2b5e 0 11%, transparent 12%), radial-gradient(circle at 20% 30%, #fff 0 2%, transparent 3%), radial-gradient(circle at 80% 75%, #fff 0 2%, transparent 3%), linear-gradient(160deg, #0b1433, #2a1d4e); }
.sw-slonce { background: radial-gradient(circle at 50% 50%, #ffc21a 0 20%, #ffde7a 21% 28%, transparent 29%), linear-gradient(135deg, #fff3c4, #c9f2e0); }
.tn { font-weight: 700; }
.td { font-size: 0.78rem; opacity: 0.75; line-height: 1.3; }
.err { color: #b3123f; font-weight: 600; margin: 0; min-height: 0; }
.err:empty { display: none; }
.t-noc .err { color: #ff9db0; }
.m-result { margin-top: 18px; text-align: center; }
.m-result h2 { margin: 0 0 12px; font-size: 1.25rem; }
.r-link { width: 100%; font: inherit; font-size: 0.95rem; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--soft); background: #fff; color: #2a1020; margin-bottom: 14px; }
.r-msg { margin: 12px 0 0; font-weight: 600; min-height: 1.4em; }
.m-foot { font-size: 0.85rem; opacity: 0.75; text-align: center; margin: 22px 0 0; }

/* ---------- Prezent ---------- */
.hero-wrap { width: min(62vw, 250px); margin: 8px auto 0; filter: drop-shadow(0 14px 22px var(--glow)); }
.hero { width: 100%; height: auto; overflow: visible; display: block; }
.hero .petal { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0.05); opacity: 0; }
.hero.bloom .petal { animation: open 1.4s cubic-bezier(.2, .8, .3, 1.15) forwards; }
.hero .leaf, .hero .stem, .hero .appear { opacity: 0; }
.hero.bloom .leaf, .hero.bloom .stem, .hero.bloom .appear { animation: fade 1.2s ease-out forwards; }
.hero .line { stroke-dasharray: 200; stroke-dashoffset: 200; }
.hero.bloom .line { animation: draw 1.6s ease-out forwards; }
.hero .rays { transform-origin: 0 0; }
.hero.bloom .rays { animation: spin 40s linear infinite; }
@keyframes open { to { transform: scale(1); opacity: 1; } }
@keyframes fade { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.hero.sway { animation: sway 7s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }

.hello {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, 14vw, 5.2rem);
  line-height: 1.05;
  margin: 6px 0 10px;
  color: var(--accent);
  word-break: break-word;
  text-shadow: 0 10px 30px var(--glow);
}
.t-roze .hello, .t-slonce .hello { text-shadow: 0 2px 0 #fff, 0 10px 30px var(--glow); }
.lead { font-size: 1.15rem; margin: 0 auto 30px; max-width: 28em; }
.note {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.4;
  min-height: 3.6em;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.note.out { opacity: 0; transform: translateY(8px); }
.hint { font-size: 0.85rem; opacity: 0.7; margin: 16px 0 0; }
.today { margin: 38px auto 0; max-width: 30em; }
.today h2 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1.7rem; margin: 0 0 10px; color: var(--accent); }
.today ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.today li::before { content: "♥ "; color: var(--accent); }
.t-noc .today li::before { content: "✦ "; }
.t-slonce .today li::before { content: "☀ "; }
.support { margin: 40px auto 0; max-width: 30em; font-size: 0.95rem; opacity: 0.85; }
.support a { font-weight: 700; }
.sign { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: 26px 0 0; color: var(--accent); }
.again { margin: 30px 0 0; font-size: 0.9rem; }

[hidden] { display: none !important; }

@media (max-width: 420px) {
  .themes { gap: 6px; }
  .theme { padding: 5px; }
  .tn { font-size: 0.82rem; line-height: 1.25; }
  .td { display: none; }
  .card { padding: 22px 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; transition: none; }
  .hero .petal, .hero .leaf, .hero .stem, .hero .appear { transform: none; opacity: 1; animation: none !important; }
  .hero .line { stroke-dashoffset: 0; animation: none !important; }
  .hero.sway, .hero.bloom .rays { animation: none; }
  .note { transition: none; }
}
