:root {
  --sky-top: #bfe4f0;
  --sky-mid: #ddeef3;
  --pink: #f6c1d6;
  --pink-deep: #e98bb3;
  --pink-accent: #d9568a;
  --plum: #b34a86;
  --ground: #5a3f2e;
  --ink: #514149;
  --ink-soft: #8a7a82;
  --card: rgba(255, 252, 250, 0.97);
  --card-line: rgba(217, 86, 138, 0.16);
  --paper: #fbf3ee;
  --serif: "Hina Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--round);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 78% 6%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(60% 38% at 50% 102%, rgba(217,86,138,0.10) 0%, rgba(217,86,138,0) 70%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, #f7e6ee 78%, #fbeaf1 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

/* Jemné „slunce" / měsíc v rohu — zen klid */
body::before {
  content: "";
  position: fixed;
  top: calc(var(--safe-top) + 8%);
  right: 12%;
  width: 86px; height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.9), rgba(255,247,250,0.35) 60%, rgba(255,247,250,0) 72%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Layout ---------- */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 18px 4px;
  z-index: 3;
}
.topbar .mute-btn { justify-self: start; }
.topbar #settingsBtn { justify-self: end; }

.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  animation: brandIn 1s cubic-bezier(.2,.8,.25,1) both;
}

/* Mute tlačítko — přepínání ikony */
.mute-btn .ico-muted { display: none; }
.mute-btn.muted { color: var(--ink-soft); }
.mute-btn.muted .ico-sound { display: none; }
.mute-btn.muted .ico-muted { display: block; }
@keyframes brandIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.logo-img {
  height: 58px;
  width: auto;
  max-width: 62vw;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(179,74,134,0.20));
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Úvodní splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 50% at 50% 42%, rgba(255,255,255,0.9), rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #fdf4f8 0%, #f7e3ec 100%);
  animation: splashOut 0.7s ease 1.15s forwards;
}
.splash img {
  width: min(70vw, 320px);
  height: auto;
  animation: splashLogo 1.2s cubic-bezier(.2,.8,.25,1) both;
}
.splash.gone { display: none; }
@keyframes splashLogo {
  0%   { opacity: 0; transform: scale(0.86); }
  55%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes splashOut {
  to { opacity: 0; visibility: hidden; }
}

.icon-btn {
  border: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,250,252,0.8));
  color: var(--plum);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 12px rgba(179,74,134,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.5s cubic-bezier(.2,.8,.25,1), box-shadow 0.3s ease;
}
.icon-btn:hover { box-shadow: 0 5px 16px rgba(179,74,134,0.26), inset 0 1px 0 rgba(255,255,255,0.9); }
.icon-btn:active { transform: scale(0.9); }
/* Otočení jen u ozubeného kolečka (ne u mute — tam se to zasekávalo). */
#settingsBtn { transition: transform 0.5s cubic-bezier(.2,.8,.25,1), box-shadow 0.3s ease; }
#settingsBtn:active { transform: rotate(90deg) scale(0.9); }
.mute-btn { transition: transform 0.15s ease, box-shadow 0.3s ease; }
.icon-btn svg { display: block; }

/* ---------- Scene ---------- */
.scene {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 42vh;
  padding: 8px 0;
}

.stage-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  max-height: 100%;
  animation: floatCard 7s ease-in-out infinite;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-9px) rotate(0.4deg); }
}

.tree {
  width: auto;
  height: auto;
  max-height: min(47vh, 440px);
  max-width: 84vw;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 14px 22px rgba(90, 63, 46, 0.30));
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.tree.swap { opacity: 0; transform: scale(0.97); }

.stage-fallback {
  position: absolute;
  bottom: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px dashed var(--card-line);
  border-radius: 16px;
  text-align: center;
}
.stage-fallback span { font-size: 2rem; font-weight: 700; color: var(--pink-accent); }
.stage-fallback small { color: var(--ink-soft); font-size: 0.7rem; }

.ground {
  position: absolute;
  bottom: -2%;
  left: 50%;
  transform: translateX(-50%);
  width: min(96%, 460px);
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.12));
}

/* ---------- Planting overlay ---------- */
.plant-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 234, 241, 0.65);
  backdrop-filter: blur(2px);
}
.plant-overlay video {
  width: min(92%, 460px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(90,63,46,0.25);
}
.skip-btn {
  position: absolute;
  bottom: calc(24px + var(--safe-bottom));
  right: 24px;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--plum);
  padding: 11px 18px;
  border-radius: 999px;
  font-family: var(--round);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 3px 14px rgba(179,74,134,0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.skip-btn:active { transform: scale(0.94); }

/* ---------- HUD ---------- */
.hud {
  position: relative;
  z-index: 3;
  padding: 12px 16px calc(16px + var(--safe-bottom));
}

.card {
  position: relative;
  z-index: 2;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-line);
  border-radius: 22px;
  padding: 18px 18px 20px;
  box-shadow: 0 8px 28px rgba(124, 60, 90, 0.14);
  text-align: center;
}

.lead {
  margin: 2px 0 8px;
  font-family: var(--serif);
  font-size: 1.46rem;
  font-weight: 400;
  letter-spacing: 0.4px;
  color: var(--plum);
}
.sub { margin: 0 0 16px; font-size: 0.86rem; line-height: 1.5; color: var(--ink-soft); }

.primary {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 16px;
  font-family: var(--round);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, #f49ec0 0%, var(--pink-accent) 55%, var(--plum) 100%);
  box-shadow: 0 8px 20px rgba(179,74,134,0.38), inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform 0.18s cubic-bezier(.2,.8,.25,1), box-shadow 0.25s ease;
  animation: breathe 6s ease-in-out infinite;
}
.primary .btn-ico { position: relative; z-index: 1; transition: transform 0.3s ease; }
.primary span:last-child { position: relative; z-index: 1; }
.primary:hover { box-shadow: 0 10px 26px rgba(179,74,134,0.46), inset 0 1px 0 rgba(255,255,255,0.5); }
.primary:hover .btn-ico { transform: translateY(-2px) rotate(-6deg); }
.primary:active { transform: scale(0.96) translateY(1px); box-shadow: 0 4px 12px rgba(179,74,134,0.4); }

/* Projíždějící lesk */
.primary .sheen {
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg);
  animation: sheen 8s ease-in-out infinite;
  z-index: 0;
}
@keyframes sheen {
  0%, 70% { left: -60%; }
  88%, 100% { left: 130%; }
}
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pct {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--plum);
  line-height: 1;
  letter-spacing: 0.5px;
}
.state-chip {
  font-family: var(--round);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8f7ec;
  color: #3a8a52;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(58,138,82,0.12);
  transition: background 0.3s ease, color 0.3s ease;
}
.state-chip::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulseDot 2s ease-in-out infinite;
}
.state-chip.paused { background: #fdeede; color: #c2772a; box-shadow: inset 0 0 0 1px rgba(194,119,42,0.14); }
.state-chip.bloomed { background: #fde4ee; color: var(--pink-accent); box-shadow: inset 0 0 0 1px rgba(217,86,138,0.16); }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.bar {
  position: relative;
  height: 13px;
  border-radius: 999px;
  background: rgba(217,86,138,0.12);
  box-shadow: inset 0 1px 3px rgba(179,74,134,0.14);
  overflow: hidden;
}
.bar-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  overflow: hidden;                 /* ořízne odlesk na tvar výplně */
  background: linear-gradient(90deg, #f2a9c6, var(--pink-accent) 70%, var(--plum));
  box-shadow: 0 0 10px rgba(217,86,138,0.4);
  transition: width 0.7s cubic-bezier(.2,.8,.25,1);
}
.bar-fill::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 55%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  transform: translateX(-200%);
  animation: shimmer 6s ease-in-out infinite;
}
/* Odlesk je na obou koncích úplně mimo výplň → smyčka je beze švu, mezi přejezdy je pauza. */
@keyframes shimmer {
  0%   { transform: translateX(-200%); }
  55%  { transform: translateX(320%); }
  100% { transform: translateX(320%); }
}

.eta { margin: 13px 0 2px; font-size: 0.94rem; font-weight: 600; color: var(--ink); }
.eta strong { color: var(--plum); }
.hint { margin: 5px 0 0; font-size: 0.78rem; color: var(--ink-soft); line-height: 1.45; }

.share-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--card-line);
  background: linear-gradient(180deg, #ffffff, #fdeef4);
  color: var(--pink-accent);
  font-family: var(--round);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(179,74,134,0.14);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.share-btn:active { transform: scale(0.96); }

/* ---------- Settings sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(40, 25, 35, 0.4);
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  animation: sheetUp 0.28s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle {
  width: 42px; height: 5px;
  background: #e3d3da;
  border-radius: 999px;
  margin: 4px auto 12px;
}
.sheet h2 { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.4px; color: var(--plum); }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9rem;
}
.row small { color: var(--ink-soft); font-weight: 400; }
.row select {
  font-family: var(--round);
  font-size: 0.85rem;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid #ecd9e2;
  background: #fbf3f6;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.row select:focus { outline: none; border-color: var(--pink-deep); box-shadow: 0 0 0 3px rgba(217,86,138,0.14); }

/* ---------- Vlastní doba růstu (stepper) ---------- */
.set-block { padding: 12px 0; }
/* Výběr doby na úvodní kartě (nad tlačítkem Zasadit) */
#emptyCard .duration-control {
  margin: 0 0 12px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(217,86,138,0.12);
  text-align: left;
}
#emptyCard .sub { margin-bottom: 12px; }
.set-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
  font-size: 0.9rem;
}
.set-head small { color: var(--ink-soft); font-weight: 400; }
.set-head strong {
  font-family: var(--round);
  font-weight: 700;
  color: var(--plum);
  font-size: 0.96rem;
  white-space: nowrap;
}
.steppers { display: flex; gap: 10px; }
.stepper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px;
  border-radius: 15px;
  background: #fbf3f6;
  box-shadow: inset 0 0 0 1px #ecd9e2;
}
.step-btn {
  flex: none;
  width: 36px; height: 36px;
  border: none;
  border-radius: 11px;
  background: #fff;
  color: var(--plum);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(179,74,134,0.16);
  transition: transform 0.12s ease, background 0.2s ease;
}
.step-btn:active { transform: scale(0.88); background: #fde7f0; }
.step-btn:disabled { opacity: 0.32; box-shadow: none; }
.step-val { text-align: center; line-height: 1.05; min-width: 0; }
.step-val b {
  display: block;
  font-family: var(--round);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink);
}
.step-val i { font-style: normal; font-size: 0.68rem; color: var(--ink-soft); }
.ghost {
  position: relative;
  width: 100%;
  margin-top: 11px;
  border: 1px solid #ecd9e2;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  border-radius: 15px;
  font-family: var(--round);
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ghost:hover { background: #fdf6f9; border-color: #e6c4d4; box-shadow: 0 4px 14px rgba(179,74,134,0.12); }
.ghost:active { transform: scale(0.98); }
.ghost.on { background: #fef0f6; border-color: #f3c6da; color: var(--pink-accent); }
.ghost.close { background: linear-gradient(180deg, #fde7f0, #fbeef4); border-color: transparent; color: var(--pink-accent); font-weight: 700; }
.ghost.close:hover { background: linear-gradient(180deg, #fcdcea, #f9e6f0); }
.fineprint { margin: 16px 0 0; font-size: 0.72rem; line-height: 1.45; color: var(--ink-soft); }

/* Počítadlo v tlačítku (háj) */
.ghost-count {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fbe1ec;
  color: var(--pink-accent);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---------- Háj (sbírka rozkvetlých stromů) ---------- */
.garden-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,0.6), rgba(255,255,255,0) 55%),
    linear-gradient(180deg, var(--sky-top) 0%, #f1e3ec 55%, #fbeaf1 100%);
  animation: fadeIn 0.3s ease;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}
.garden {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.garden-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex: none;
}
.garden-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: var(--plum);
}
.garden-count {
  font-family: var(--round);
  font-size: 0.9rem;
  color: var(--pink-accent);
  font-weight: 700;
}
.garden-close {
  flex: none;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--plum);
  font-size: 1rem;
  box-shadow: 0 3px 12px rgba(179,74,134,0.18);
}
.garden-close:active { transform: scale(0.9); }
.garden-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 6px 18px calc(24px + var(--safe-bottom));
  align-content: start;
}
.garden-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: onboardUp 0.4s cubic-bezier(.2,.8,.25,1) both;
}
.garden-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 6px 12px rgba(124,60,90,0.18));
}
.garden-date {
  font-family: var(--round);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.garden-date b { color: var(--plum); font-weight: 700; }
.garden-empty {
  margin: auto;
  max-width: 280px;
  padding: 0 24px 40px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- Petals ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.petal {
  position: absolute;
  top: -10%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  will-change: top, transform;
  filter: drop-shadow(0 2px 3px rgba(179,74,134,0.12));
  animation-name: drop, sway;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-direction: normal, alternate;
  animation-fill-mode: forwards, none;
}
@keyframes drop {
  0%   { top: -10%; opacity: 0; }
  8%   { opacity: 0.92; }
  92%  { opacity: 0.92; }
  100% { top: 110%; opacity: 0; }
}
@keyframes sway {
  from { transform: translateX(-16px) rotate(-22deg); }
  to   { transform: translateX(16px) rotate(34deg); }
}

@media (prefers-reduced-motion: reduce) {
  .petal { display: none; }
  .tree, .bar-fill { transition: none; }
  .stage-wrap, .blossom, .primary, .primary .sheen, .bar-fill::after, .state-chip::before { animation: none !important; }
  .recap { transition: none; }
}

/* Bloom celebration pulse */
.scene.bloom .stage-wrap { animation: bloomPulse 1.6s ease; }
@keyframes bloomPulse {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(-6px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

/* ---------- Recap toast ---------- */
/* ---------- Recap „roletka" (vyjede zpoza karty) ---------- */
.recap {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 100%;
  margin-bottom: -26px;          /* spodní okraj se schová za horní hranu karty */
  z-index: 1;                    /* ZA kartou (.card má z-index 2) */
  padding: 12px 20px 32px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #e1f2f9 0%, var(--sky-top) 70%, #aed9ea 100%);
  color: #4a7a8c;
  font-family: var(--round);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 -8px 22px rgba(90,140,165,0.22), inset 0 1px 0 rgba(255,255,255,0.85);
  transform: translateY(100%);   /* schováno za kartou */
  transition: transform 0.55s cubic-bezier(.25,.9,.3,1);
  pointer-events: none;
}
.recap.show { transform: translateY(0); }
.recap b { color: var(--pink-accent); font-size: 1.18em; font-weight: 800; }
.recap-sub {
  display: block;
  margin-top: 1px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(74,122,140,0.78);
}

/* ---------- Onboarding ---------- */
.onboard-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
  background: rgba(40,25,35,0.42);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.onboard {
  position: relative;
  width: min(92vw, 380px);
  border-radius: 26px;
  padding: 26px 24px 24px;
  text-align: center;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(246,193,214,0.35) 0%, rgba(246,193,214,0) 60%),
    linear-gradient(168deg, #fffdfb 0%, var(--paper) 46%, #fbe8f0 100%);
  box-shadow:
    0 22px 60px rgba(124,60,90,0.30),
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 0 0 1px rgba(217,86,138,0.10);
  animation: onboardUp 0.45s cubic-bezier(.2,.8,.25,1) both;
  max-height: 100%;
  overflow: hidden auto;          /* pojistka pro nízké displeje */
}
/* Jemný akcentní proužek nahoře */
.onboard::before {
  content: "";
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--pink-deep), var(--plum), transparent);
  opacity: 0.7;
}
@keyframes onboardUp { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
.onboard-logo img { width: 168px; height: auto; margin-bottom: 8px; }
.onboard-steps {
  list-style: none;
  margin: 6px 0 22px;
  padding: 0;
  text-align: left;
}
.onboard-steps li {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 4px;
  font-size: 0.96rem;
  line-height: 1.4;
  color: var(--ink);
  border-bottom: 1px solid rgba(217,86,138,0.1);
}
.onboard-steps li:last-child { border-bottom: none; }
.onboard-steps li > span:first-child {
  flex: none;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, rgba(246,193,214,0.4));
  box-shadow: inset 0 0 0 1px rgba(217,86,138,0.14);
}
.onboard-steps strong { color: var(--plum); }

/* ---------- Add to Home Screen hint ---------- */
.a2hs {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 8px 24px rgba(179,74,134,0.22), inset 0 0 0 1px rgba(217,86,138,0.12);
  animation: onboardUp 0.4s cubic-bezier(.2,.8,.25,1) both;
}
.a2hs-txt { font-size: 0.82rem; line-height: 1.35; color: var(--ink); }
.a2hs-txt strong { color: var(--plum); }
.a2hs-ico { color: var(--pink-accent); }
.a2hs-close {
  margin-left: auto;
  flex: none;
  width: 28px; height: 28px;
  border: none;
  border-radius: 50%;
  background: #f7e3ec;
  color: var(--plum);
  font-size: 0.8rem;
}
