/* ===== Pollie Skin Club — стиль «Ривьера / old money» =====
   Цвета и шрифты — в :root, меняются в одном месте. */
:root {
  --navy: #1c3554;
  --navy-2: #2a4a70;
  --sea: #3f6688;
  --sky: #dfe6ec;
  --sand: #e9e0d1;
  --cream: #f7f3ec;
  --paper: #fbf9f4;
  --rose: #c98f7f;
  --rose-soft: #f3e2da;
  --line: #e3dccf;
  --ink: #1d2a3a;
  --muted: #7a7f86;
  --on-dark: #fbf8f2;
  --ok: #5f8a73;
  --warn: #b58149;
  --bad: #b25a55;
  --bg: var(--cream);
  --script: "Great Vibes", "Snell Roundhand", cursive;
  --serif: "Cormorant Garamond", "Didot", Georgia, serif;
  --sans: "Manrope", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(28, 53, 84, .04), 0 10px 30px rgba(28, 53, 84, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* paper grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .3; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .22 0 0 0 0 .26 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- typography ---------- */
.eyebrow { font: 600 10.5px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.eyebrow.starred::before { content: ""; display: inline-block; width: 26px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 12px; opacity: .6; }
.display { font-family: var(--serif); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; line-height: .95; margin: 0; }
.script { font-family: var(--script); font-weight: 400; text-transform: none; letter-spacing: 0; }
.serif { font-family: var(--serif); font-weight: 500; }
.muted { color: var(--muted); }

/* title = script word + spaced capitals, as in the references */
.page-title { margin: 6px 0 12px; display: flex; flex-direction: column; align-items: flex-start; }
.page-title .script { font-size: clamp(44px, 6vw, 72px); line-height: .9; color: var(--rose); margin-bottom: -.12em; padding-left: .1em; position: relative; z-index: 1; }
.page-title .caps { font-size: clamp(38px, 6vw, 76px); letter-spacing: .1em; color: var(--navy); }
.page-lead { max-width: 560px; color: var(--muted); margin: 0; font: italic 400 20px/1.45 var(--serif); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 1px;
  padding: 14px 24px; font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  background: transparent; transition: background .25s, color .25s, border-color .25s; white-space: nowrap;
}
.btn-sm { padding: 11px 17px; }
.btn-dark { background: var(--navy); color: var(--on-dark); }
.btn-dark:hover { background: var(--navy-2); }
.btn-line { border-color: currentColor; }
.btn-line:hover { background: rgba(28, 53, 84, .05); }
.btn-ghost { padding: 0 0 6px; border-bottom: 1px solid currentColor; border-radius: 0; }
.btn-danger { color: var(--bad); border-color: currentColor; }
.btn .arr { font-size: 14px; letter-spacing: 0; }
.btn-white { background: var(--on-dark); color: var(--navy); }
.btn-white:hover { background: #fff; }
.btn-outline-white { border-color: rgba(255, 255, 255, .8); color: #fff; }
.btn-outline-white:hover { background: rgba(255, 255, 255, .12); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  font: 600 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
}
button.chip:hover { border-color: var(--navy); }
.chip.on { background: var(--navy); border-color: var(--navy); color: var(--on-dark); }
.chip .cnt { opacity: .6; margin-left: 2px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--paper); border: 1px solid var(--line); font-size: 14px; line-height: 1; }
.icon-btn:hover { background: var(--sand); }

/* ---------- top bar with awning ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 14px max(28px, calc((100vw - 1240px) / 2)) 16px;
  background: rgba(247, 243, 236, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 19px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--navy) 0 18px, var(--sand) 18px 36px);
  -webkit-mask: linear-gradient(#000, #000) 0 0 / 100% 10px no-repeat, radial-gradient(circle at 9px 10px, #000 8.6px, transparent 9px) 0 0 / 18px 19px repeat-x;
          mask: linear-gradient(#000, #000) 0 0 / 100% 10px no-repeat, radial-gradient(circle at 9px 10px, #000 8.6px, transparent 9px) 0 0 / 18px 19px repeat-x;
  filter: drop-shadow(0 3px 3px rgba(28, 53, 84, .12));
}
.brand { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--navy); }
.brand-name { font: 400 34px/.8 var(--script); }
.brand-sub { font: 600 7.5px/1 var(--sans); letter-spacing: .5em; margin-top: 4px; padding-left: .5em; }
.topnav { display: flex; gap: 30px; margin-left: auto; }
.topnav a { font: 600 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid transparent; color: var(--muted); }
.topnav a:hover { color: var(--navy); }
.topnav a.on { color: var(--navy); border-color: var(--navy); }
.tabbar { display: none; }

/* ---------- layout ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 52px 28px 90px; }
.section { margin-top: 64px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 6px 0 0; }
.view { animation: viewIn .7s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.ornament { display: flex; align-items: center; gap: 14px; margin: 26px 0 0; max-width: 340px; color: var(--sea); }
.ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(28, 53, 84, .35)); }
.ornament i:last-child { transform: scaleX(-1); }
.ornament .waves { width: 70px; height: 12px; }
.section-head + .ornament { margin: -2px 0 28px; }

/* ---------- sea scene ---------- */
.sea { position: absolute; inset: 0; overflow: hidden; --horizon: 44%; }
.sea .sky {
  position: absolute; left: 0; right: 0; top: 0; height: var(--horizon);
  background:
    radial-gradient(60% 120% at 72% 100%, rgba(250, 226, 205, .9), transparent 60%),
    linear-gradient(180deg, #c9d6e1 0%, #e3e4e2 60%, #f1e6da 100%);
}
.sea .isle { position: absolute; right: 0; width: 38%; height: 26px; top: calc(var(--horizon) - 25px); fill: #6d8296; opacity: .75; }
.sea .water {
  position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0;
  background:
    radial-gradient(9% 90% at 70% 0%, rgba(255, 236, 214, .38), transparent 75%),
    radial-gradient(30% 22% at 70% 0%, rgba(255, 236, 214, .35), transparent 80%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #7391ab 0%, #3a5c7e 14%, #22405f 55%, #152d47 100%);
}
.sea .glitter {
  position: absolute; left: 50%; right: 10%; top: 0; bottom: 30%;
  background-image:
    radial-gradient(1.4px 1px at 30% 40%, rgba(255, 246, 232, .95), transparent),
    radial-gradient(1px 1px at 70% 70%, rgba(255, 246, 232, .8), transparent),
    radial-gradient(2px 1px at 50% 20%, rgba(255, 246, 232, .9), transparent);
  background-size: 23px 9px, 17px 13px, 31px 11px;
  -webkit-mask: radial-gradient(22% 100% at 50% 0%, #000 20%, transparent 75%);
          mask: radial-gradient(22% 100% at 50% 0%, #000 20%, transparent 75%);
  animation: glitter 5s ease-in-out infinite alternate;
}
@keyframes glitter { from { background-position: 0 0, 0 0, 0 0; opacity: .45; } to { background-position: 6px 1px, -5px 2px, 9px 0; opacity: .9; } }
.sea .boat { position: absolute; width: 22px; height: 26px; left: 24%; top: calc(var(--horizon) - 22px); animation: sail 80s linear infinite alternate; }
@keyframes sail { to { transform: translateX(140px); } }

/* ---------- stamp ---------- */
.stamp { display: block; width: 150px; height: auto; color: var(--navy); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 2px;
  min-height: 600px; padding: 48px 40px 36px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
  color: var(--on-dark);
}
.hero::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255, 255, 255, .35); pointer-events: none; z-index: 2; }
.hero .sea { --horizon: 30%; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 30, 48, .15) 0%, rgba(15, 30, 48, .1) 40%, rgba(15, 30, 48, .55) 100%); }
.hero > *:not(.sea):not(.hero-photo) { position: relative; z-index: 3; }
.hero .stamp { position: absolute !important; top: 34px; right: 40px; width: 170px; color: var(--navy); opacity: .85; transform: rotate(-8deg); }
.hero.has-photo .stamp { color: #fff; }
.hero .eyebrow { color: rgba(255, 255, 255, .85); }
.hero h1 { margin: 14px 0 10px; display: flex; flex-direction: column; align-items: center; }
.hero h1 .script { font-size: clamp(64px, 9vw, 120px); line-height: .8; color: var(--on-dark); text-shadow: 0 2px 30px rgba(10, 25, 45, .35); }
.hero h1 .caps { font-size: clamp(30px, 4.2vw, 54px); letter-spacing: .32em; padding-left: .32em; margin-top: 6px; }
.hero-lead { font: italic 400 22px/1.4 var(--serif); margin: 4px 0 6px; }
.hero-sub { font: 600 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; opacity: .8; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.hero-foot { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.glass-pill {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 9px 15px; border-radius: 1px;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06);
  font: 600 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark);
}
.glass-pill b { font: italic 500 18px/1 var(--serif); letter-spacing: 0; }
.hero-photo-btn { position: absolute !important; top: 30px; left: 34px; opacity: 0; transition: opacity .2s; }
.hero:hover .hero-photo-btn { opacity: 1; }

/* ---------- day picker ---------- */
.today-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.today-head h2 { font: 500 clamp(28px, 3.4vw, 42px)/1 var(--serif); text-transform: uppercase; letter-spacing: .08em; margin: 8px 0 0; color: var(--navy); }
.weeks { display: flex; gap: 8px; flex-wrap: wrap; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 26px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.day { border: 0; background: transparent; padding: 10px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 1px; }
.day:hover { background: var(--paper); }
.day .dw { font: 600 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.day .dn { font: 500 26px/1.1 var(--serif); margin-top: 4px; }
.day .dot { width: 4px; height: 4px; border-radius: 50%; margin-top: 3px; }
.day.is-today .dot { background: var(--rose); }
.day.done .dot { background: var(--ok); }
.day.on { background: var(--navy); color: var(--on-dark); }
.day.on .dw { color: rgba(251, 248, 242, .7); }

.day-title { font: 400 clamp(30px, 3.6vw, 44px)/1.1 var(--script); color: var(--rose); margin: 0 0 22px; }
.day-field { margin: -6px 0 20px; }
.routine + .day-field { margin: 20px 0 0; }

/* ---------- routine ---------- */
.routine { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.slot { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.slot-head { position: relative; padding: 28px 28px 24px; color: var(--on-dark); min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.slot-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .9) 0 14px, transparent 14px 28px); opacity: .5; }
.slot-head.am { background: linear-gradient(160deg, #a9bfd3 0%, #6f92b4 100%); }
.slot-head.pm { background: linear-gradient(160deg, #2a4a70 0%, #152b45 100%); }
.slot-head h3 { font: 400 54px/.8 var(--script); margin: 4px 0 0; }
.slot-head .eyebrow { color: rgba(251, 248, 242, .85); }
.slot-icon { position: absolute; right: 22px; top: 22px; width: 64px; height: 64px; color: #fff; opacity: .6; }
.slot-head .progress { position: absolute; right: 24px; bottom: 26px; font: 600 10px/1 var(--sans); letter-spacing: .16em; border: 1px solid rgba(255, 255, 255, .5); padding: 7px 10px; }
.steps { list-style: none; margin: 0; padding: 6px 0; }
.step { display: grid; grid-template-columns: 26px 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step .num { font: italic 500 16px/1 var(--serif); color: var(--rose); }
.step .thumb { width: 64px; height: 64px; border-radius: 2px; }
.step .info { min-width: 0; cursor: pointer; }
.step .name { font: 500 19px/1.2 var(--serif); color: var(--ink); }
.step .pbrand { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.step .note { font: italic 400 15.5px/1.35 var(--serif); margin-top: 4px; color: var(--sea); }
.step.is-done .name, .step.is-done .thumb { opacity: .45; }
.step.is-done .name { text-decoration: line-through; text-decoration-color: var(--line); }
.check { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; color: transparent; font-size: 13px; }
.check:hover { border-color: var(--navy); }
.check.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.check.ro { cursor: default; }
.check.ro:not(.on) { border-style: dashed; }
.step-ctrl { display: flex; gap: 4px; }
.step-ctrl .icon-btn { width: 30px; height: 30px; font-size: 12px; }
.note-input { width: 100%; margin-top: 6px; padding: 7px 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 2px; background: var(--cream); }
.empty-slot { padding: 34px 26px; text-align: center; color: var(--muted); }
.empty-slot .serif { font-size: 21px; color: var(--ink); margin-bottom: 4px; }
.slot-foot { padding: 4px 22px 22px; }
.add-step { width: 100%; padding: 15px; border: 1px dashed var(--line); background: transparent; font: 600 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.add-step:hover { border-color: var(--navy); color: var(--navy); }
.day-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; justify-content: flex-end; }
.step-icon { color: var(--sea); font-size: 16px; background: var(--sky); }

.tip { position: relative; margin-top: 22px; padding: 28px 32px; background: var(--paper); border: 1px solid var(--line); }
.tip::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.tip p { margin: 10px 0 0; font: italic 400 21px/1.45 var(--serif); color: var(--ink); }

/* product placeholder (no photo) */
.ph { background: var(--sand); display: grid; place-items: center; overflow: hidden; font: 400 26px/1 var(--script); color: var(--muted); }
.ph img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.ph:has(img) { background: #fff; }
.minis .ph img, .step .thumb img { padding: 2px; }
.ph.loading { opacity: .5; }

/* ---------- program ---------- */
.program { display: flex; flex-direction: column; gap: 26px; }
.week-row { background: var(--paper); border: 1px solid var(--line); padding: 24px; }
.week-row h3 { font: 500 26px/1 var(--serif); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 18px; display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; color: var(--navy); }
.week-sub { font: 400 30px/1 var(--script); text-transform: none; letter-spacing: 0; color: var(--rose); }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.pday { text-align: left; border: 1px solid var(--line); background: var(--cream); padding: 12px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s; }
.pday:hover { border-color: var(--navy); }
.pday.is-today { background: var(--navy); color: var(--on-dark); border-color: var(--navy); }
.pday.is-today .eyebrow, .pday.is-today .muted { color: rgba(251, 248, 242, .75); }
.pday-top { display: flex; justify-content: space-between; align-items: baseline; }
.pday-top .serif { font-size: 24px; }
.pday-title { font: italic 500 15px/1.25 var(--serif); }
.pday-slot { display: flex; align-items: center; gap: 6px; }
.pday-slot .lbl { font: 600 9px/1 var(--sans); letter-spacing: .14em; width: 14px; opacity: .7; }
.minis { display: flex; flex-wrap: wrap; gap: 3px; }
.minis .ph { width: 22px; height: 22px; border-radius: 1px; font-size: 11px; }
.pday .count { font-size: 11px; margin-top: auto; }

.rules { list-style: none; counter-reset: r; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.rules li { counter-increment: r; position: relative; background: var(--paper); border: 1px solid var(--line); padding: 20px 22px 20px 64px; }
.rules li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 22px; top: 18px; font: italic 500 22px/1 var(--serif); color: var(--rose); }
.rules .serif { font-size: 21px; color: var(--navy); }
.rules p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.modal .rules { grid-template-columns: 1fr; }

/* ---------- cards ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.toolbar.sub { margin-top: -10px; }
.toolbar.sub .chip { border-style: dashed; }
.toolbar.sub .chip.on { border-style: solid; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card { position: relative; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; cursor: pointer; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ph { aspect-ratio: 4 / 5; font-size: 54px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body .name { font: 500 21px/1.15 var(--serif); color: var(--ink); }
.card-body .meta { font-size: 12.5px; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; gap: 8px; }
.price { font: italic 500 22px/1 var(--serif); color: var(--navy); }
.pill { font: 600 9.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 6px 9px; border: 1px solid var(--line); background: var(--cream); }
.pill.ok { color: var(--ok); border-color: #cddcd2; background: #eef3ee; }
.pill.warn { color: var(--warn); border-color: #ead8c2; background: #f8efe4; }
.pill.bad { color: var(--bad); border-color: #ebcfcc; background: #f8eae8; }
.card .tag { position: absolute; top: 12px; left: 12px; }
.card-media { position: relative; }
.heart { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(251, 249, 244, .95); display: grid; place-items: center; font-size: 15px; color: var(--rose); }
span.heart { pointer-events: none; }
.card.bought { opacity: .6; }
.add-card { border: 1px dashed var(--line); background: transparent; min-height: 300px; display: grid; place-items: center; color: var(--muted); font: 600 10px/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.add-card:hover { border-color: var(--navy); color: var(--navy); }
.add-card .plus { font: 400 46px/1 var(--script); display: block; margin-bottom: 4px; letter-spacing: 0; color: var(--rose); }

.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 26px; }
.stat { background: var(--paper); border: 1px solid var(--line); padding: 16px 20px; min-width: 150px; }
.stat .v { font: italic 500 30px/1.1 var(--serif); margin-top: 4px; color: var(--navy); }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(20, 38, 60, .4); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--cream); border-radius: 2px; padding: 30px; box-shadow: 0 30px 80px rgba(10, 25, 45, .3); animation: rise .25s; }
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.modal-head h3 { font: 500 30px/1.05 var(--serif); margin: 6px 0 0; color: var(--navy); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }

.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font: 600 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border-radius: 2px; border: 1px solid var(--line); background: var(--paper); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); }
.field textarea { min-height: 70px; resize: vertical; }
.form-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; }
.form-actions .right { display: flex; gap: 10px; margin-left: auto; }
.photo-drop { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; }
.photo-drop .ph { width: 110px; height: 136px; font-size: 32px; cursor: pointer; }
.photo-drop small { color: var(--muted); display: block; margin-top: 6px; font-size: 12.5px; }
.detail { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.detail .ph { width: 100%; aspect-ratio: 4 / 5; font-size: 48px; border: 1px solid var(--line); }
.detail dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.detail .howto { margin-top: 16px; white-space: pre-wrap; background: var(--paper); padding: 14px; font: italic 400 17px/1.45 var(--serif); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 24px; }
.info-sec { padding: 16px 0; border-top: 1px solid var(--line); }
.info-sec p { margin: 8px 0 0; font: 400 17px/1.5 var(--serif); color: var(--ink); }
.info-sec.warn .eyebrow { color: var(--rose); }
.picker-search { margin-bottom: 12px; }
.picker-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.picker-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--paper); padding: 8px 12px 8px 8px; text-align: left; }
.picker-item:hover { border-color: var(--navy); }
.picker-item .ph { width: 48px; height: 48px; font-size: 18px; }
.picker-item .name { font: 500 17px/1.2 var(--serif); }
.copy-grid { display: grid; grid-template-columns: auto repeat(7, 1fr); gap: 6px; align-items: center; font-size: 12px; }
.copy-grid label { display: grid; place-items: center; padding: 8px 0; background: var(--paper); border: 1px solid var(--line); cursor: pointer; }
.copy-grid label:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.copy-grid label.self { opacity: .35; pointer-events: none; }
.copy-grid input { display: none; }
.copy-grid .wk { font: 600 10px/1 var(--sans); letter-spacing: .12em; color: var(--muted); padding-right: 6px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label { cursor: pointer; }
.radio-row input { display: none; }
.radio-row input:checked + .chip { background: var(--navy); color: var(--on-dark); border-color: var(--navy); }

#toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--navy); color: var(--on-dark); padding: 12px 22px; border-radius: 1px; font-size: 13px; letter-spacing: .04em; opacity: 0; pointer-events: none; transition: .25s; z-index: 95; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   Экран входа
   ===================================================================== */
#gate { position: fixed; inset: 0; z-index: 90; overflow: auto; color: var(--on-dark); background: var(--navy); }
#gate[hidden] { display: none; }
body.gate-open { overflow: hidden; }
body.gate-open .tabbar, body.gate-open .topbar { visibility: hidden; }
.gate-bg { position: fixed; inset: 0; }
.gate-bg .sea { --horizon: 30%; }
.gate-bg::after { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(255, 255, 255, .35); pointer-events: none; }
.gate-card {
  position: relative; z-index: 1; min-height: 100%; width: min(420px, 100%); margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
  padding: calc(40px + env(safe-area-inset-top)) 24px calc(48px + env(safe-area-inset-bottom));
  animation: viewIn .8s ease both;
}
.gate-card .stamp { position: absolute; top: calc(34px + env(safe-area-inset-top)); left: 50%; width: 170px; margin-left: -85px; transform: rotate(-6deg); color: var(--navy); opacity: .85; }
.gate-brand { display: flex; flex-direction: column; align-items: center; }
.gate-brand .script { font-size: clamp(84px, 22vw, 120px); line-height: .8; text-shadow: 0 2px 30px rgba(10, 25, 45, .35); }
.gate-brand .caps { font: 500 22px/1 var(--serif); letter-spacing: .5em; padding-left: .5em; margin-top: 8px; }
.gate-lead { font: italic 400 21px/1.4 var(--serif); margin: 18px 0 28px; opacity: .9; }
.gate-actions { display: grid; gap: 12px; width: 100%; }
.gate-actions .btn { justify-content: center; padding: 17px 22px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 4px 0 8px; min-height: 14px; }
.pin-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #fff; transition: background .15s; }
.pin-dots i.on { background: #fff; }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-msg { min-height: 20px; margin: 0 0 12px; font-size: 13px; color: #ffd9cf; }
.keypad { display: grid; grid-template-columns: repeat(3, 70px); gap: 14px 24px; justify-content: center; }
.keypad button { width: 70px; height: 70px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); color: #fff; font: 500 30px/1 var(--serif); transition: background .15s; }
.keypad button:active { background: rgba(255, 255, 255, .25); }
.keypad .ok { background: var(--on-dark); color: var(--navy); border-color: var(--on-dark); font: 400 22px/1 var(--sans); }
.gate-back { margin-top: 20px; color: #fff; }

/* ---------- guest ---------- */
.is-guest .card { cursor: pointer; }

/* =====================================================================
   Телефон
   ===================================================================== */
@media (max-width: 900px) {
  .routine { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .topbar { padding: calc(10px + env(safe-area-inset-top)) 16px 12px; }
  .topnav, .topbar .btn { display: none; }
  .brand { align-items: flex-start; }
  .brand-name { font-size: 30px; }
  main { padding: 38px 16px calc(100px + env(safe-area-inset-bottom)); }
  .field input, .field select, .field textarea, .note-input, .picker-search input { font-size: 16px; }

  .hero { min-height: calc(100svh - 150px); padding: 30px 20px 28px; margin: 0 -16px; }
  .hero::before { inset: 10px; }
  .hero .stamp { width: 124px; top: 26px; right: 22px; }
  .hero h1 .script { font-size: 72px; }
  .hero h1 .caps { font-size: 30px; }
  .hero-lead { font-size: 20px; }
  .hero-actions { flex-direction: column; width: 100%; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-foot { gap: 6px; flex-wrap: nowrap; margin-top: 24px; }
  .glass-pill { padding: 8px 9px; font-size: 8px; letter-spacing: .1em; gap: 4px; white-space: nowrap; }
  .glass-pill b { font-size: 15px; }
  .hero-photo-btn { display: none; }

  .section { margin-top: 44px; }
  .page-title .script { font-size: 50px; }
  .page-title .caps { font-size: 36px; }
  .days { gap: 2px; }
  .day .dn { font-size: 22px; }
  .slot-head h3 { font-size: 46px; }
  .slot-icon { width: 50px; height: 50px; }
  .step { grid-template-columns: 20px 54px 1fr auto; gap: 10px; padding: 12px 16px; }
  .step .thumb { width: 54px; height: 54px; }
  .check { width: 34px; height: 34px; }
  .tip { padding: 22px 20px; }
  .tip p { font-size: 19px; }
  .week-row { padding: 18px 14px; }
  .week-row h3 { flex-direction: column; gap: 6px; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .pday { min-height: 130px; }
  .weeks .chip { padding: 7px 10px; font-size: 9px; letter-spacing: .1em; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .rules { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .card-body .name { font-size: 17px; }
  .add-card { min-height: 220px; }
  .stat-row { gap: 8px; }
  .stat { flex: 1; min-width: 0; padding: 12px 14px; }
  .stat .v { font-size: 22px; white-space: nowrap; }
  .stat .eyebrow { font-size: 9px; letter-spacing: .14em; }
  .form .row, .info-grid,   .detail { grid-template-columns: 1fr; }
  .detail .ph { max-width: 220px; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal { max-height: 92vh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .modal::before { content: ""; display: block; width: 40px; height: 3px; background: var(--line); margin: -8px auto 14px; }
  .keypad { grid-template-columns: repeat(3, 66px); gap: 12px 22px; }
  .keypad button { width: 66px; height: 66px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(251, 249, 244, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; letter-spacing: .04em; color: var(--muted); }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
  .tabbar a.on { color: var(--navy); font-weight: 600; }
  .tabbar a.on svg { stroke-width: 1.8; }
  #toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Фото атмосферы
   ===================================================================== */
picture.hero-photo, picture.bg-photo { position: absolute; inset: 0; display: block; }
picture.hero-photo img, picture.bg-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero.has-photo::after { background: linear-gradient(180deg, rgba(15, 30, 48, .08) 0%, rgba(15, 30, 48, .05) 35%, rgba(15, 30, 48, .62) 100%); }
.hero.has-photo .stamp { color: #fff; opacity: .9; }
.hero h1 .script { text-shadow: 0 2px 30px rgba(10, 25, 45, .45); }

/* login over a photo */
.gate-bg picture.bg-photo img { animation: slowzoom 30s ease-in-out infinite alternate; }
.gate-bg::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(15, 30, 48, .05) 0%, rgba(15, 30, 48, .2) 45%, rgba(15, 30, 48, .7) 100%); }
.gate-bg::after { z-index: 2; }
.gate-card .stamp { color: #fff; }
@keyframes slowzoom { to { transform: scale(1.08); } }

/* morning / evening cards: photo under a translucent tint */
.slot-head.am { background:
    linear-gradient(160deg, rgba(169, 191, 211, .72) 0%, rgba(96, 132, 168, .86) 100%),
    url(../images/mood/window-sea.jpg) center 62% / cover; }
.slot-head.pm { background:
    linear-gradient(160deg, rgba(42, 74, 112, .78) 0%, rgba(21, 43, 69, .92) 100%),
    url(../images/mood/bar-arch.jpg) center 40% / cover; }

/* cosmetologist note on a faded photo */
.tip { background:
    linear-gradient(90deg, rgba(251, 249, 244, .97) 0%, rgba(251, 249, 244, .9) 55%, rgba(251, 249, 244, .55) 100%),
    url(../images/mood/surfers-haze.jpg) center / cover; }

/* rules on a hazy Rio band */
.rules-section { position: relative; padding: 46px 40px 40px; margin-left: -12px; margin-right: -12px; }
.rules-section::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(247, 243, 236, .55), rgba(247, 243, 236, .88)), url(../images/mood/rio-haze.jpg) center 30% / cover; }
.rules-section .rules li { background: rgba(251, 249, 244, .88); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }


/* page header with a postcard */
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.postcard {
  position: relative; margin: 0; width: 280px; padding: 12px 12px 46px; background: #fffdf9;
  box-shadow: 0 2px 4px rgba(28, 53, 84, .06), 0 20px 40px rgba(28, 53, 84, .14);
  transform: rotate(3deg); transition: transform .5s ease;
}
.postcard:hover { transform: rotate(0deg) translateY(-4px); }
.postcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.postcard figcaption { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 30px; color: var(--navy); }
.postcard-stamp { position: absolute !important; right: -46px; top: -30px; width: 120px !important; color: var(--rose); opacity: .9; transform: rotate(-12deg); }

@media (max-width: 720px) {
  .page-head { grid-template-columns: 1fr; gap: 18px; }
  .page-head .postcard { order: -1; width: 200px; padding: 8px 8px 34px; justify-self: end; margin-right: 18px; }
  .postcard figcaption { font-size: 24px; bottom: 5px; }
  .postcard-stamp { width: 92px !important; right: -30px; top: -22px; }
  .rules-section { padding: 30px 16px; margin-left: -16px; margin-right: -16px; }
}
.hero .eyebrow, .hero-lead, .hero-sub, .hero h1 .caps { text-shadow: 0 1px 14px rgba(10, 25, 45, .55); }
.hero.has-photo::after { background:
    radial-gradient(45% 55% at 50% 52%, rgba(12, 24, 38, .38), transparent 75%),
    linear-gradient(180deg, rgba(15, 30, 48, .08) 0%, rgba(15, 30, 48, .05) 35%, rgba(15, 30, 48, .62) 100%); }

/* ---------- о неделе ---------- */
.week-info .page-title .caps { font-size: clamp(26px, 3.4vw, 44px); letter-spacing: .08em; }
.week-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wk-card { position: relative; background: var(--paper); border: 1px solid var(--line); padding: 26px 28px; }
.wk-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.wk-card p { margin: 10px 0 0; font: italic 400 19px/1.5 var(--serif); color: var(--ink); }
.wk-tip { background:
    linear-gradient(90deg, rgba(251, 249, 244, .96), rgba(251, 249, 244, .82)),
    url(../images/mood/surfers-haze.jpg) center / cover; }
.wk-card ul { list-style: none; margin: 12px 0 0; padding: 0; position: relative; }
.wk-keys li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
.wk-keys li:first-child { border-top: 0; }
.wk-keys .thumb { width: 52px; height: 52px; }
.wk-keys .name { display: block; font: 500 17px/1.2 var(--serif); }
.wk-keys .pbrand { font-size: 12px; color: var(--muted); }
.wk-keys li:hover .name { color: var(--sea); }
.wk-food li { display: flex; flex-direction: column; padding: 9px 0; border-top: 1px solid var(--line); }
.wk-food li:first-child { border-top: 0; }
.wk-food .serif { font-size: 19px; color: var(--navy); }
.wk-food .muted { font-size: 13.5px; }
@media (max-width: 720px) {
  .week-cards { grid-template-columns: 1fr; gap: 12px; }
  .wk-card { padding: 22px 20px; }
  .wk-card p { font-size: 18px; }
}

/* ---------- телефон: компактнее шрифты ---------- */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .eyebrow { font-size: 9.5px; letter-spacing: .2em; }
  .brand-name { font-size: 26px; }
  .brand-sub { font-size: 6.5px; }
  .btn { padding: 12px 18px; font-size: 9.5px; letter-spacing: .18em; }
  .btn-sm { padding: 9px 14px; }
  .chip { padding: 7px 12px; font-size: 9px; letter-spacing: .12em; }

  .hero h1 .script { font-size: 54px; }
  .hero h1 .caps { font-size: 22px; }
  .hero-lead { font-size: 17px; }
  .hero-sub { font-size: 9px; margin-bottom: 20px; }
  .hero .stamp { width: 100px; }
  .glass-pill { font-size: 7.5px; }
  .glass-pill b { font-size: 13px; }

  .page-title .script { font-size: 38px; }
  .page-title .caps { font-size: 27px; }
  .page-lead { font-size: 16px; }
  .week-info .page-title .caps { font-size: 21px; }
  .today-head h2 { font-size: 22px; }
  .day .dn { font-size: 18px; }
  .day .dw { font-size: 8.5px; }
  .day-title { font-size: 28px; margin-bottom: 16px; }

  .slot-head { min-height: 118px; padding: 22px 20px 18px; }
  .slot-head h3 { font-size: 38px; }
  .slot-icon { width: 42px; height: 42px; right: 16px; top: 16px; }
  .step .name { font-size: 16px; }
  .step .pbrand { font-size: 11px; }
  .step .note { font-size: 14px; }
  .step .num { font-size: 13px; }
  .step .thumb { width: 46px; height: 46px; }
  .step { grid-template-columns: 18px 46px 1fr auto; }
  .check { width: 30px; height: 30px; }
  .tip p { font-size: 16px; }

  .wk-card p { font-size: 15.5px; }
  .wk-keys .name { font-size: 15px; }
  .wk-food .serif { font-size: 16px; }
  .wk-food .muted { font-size: 12.5px; }

  .week-row h3 { font-size: 20px; }
  .week-sub { font-size: 24px; }
  .pday-top .serif { font-size: 19px; }
  .pday-title { font-size: 13px; }
  .rules .serif { font-size: 17px; }
  .rules p { font-size: 13px; }
  .rules li { padding: 16px 16px 16px 52px; }
  .rules li::before { font-size: 18px; left: 16px; top: 16px; }

  .card-body .name { font-size: 15px; }
  .card-body .meta { font-size: 11.5px; }
  .price { font-size: 18px; }
  .stat .v { font-size: 19px; }
  .modal-head h3 { font-size: 24px; }
  .info-sec p { font-size: 15.5px; }
  .postcard figcaption { font-size: 20px; }
  .tabbar a { font-size: 9.5px; }
}

/* лёгкое размытие фото на главной — чтобы текст читался */
.hero-photo img, img.hero-photo { filter: blur(1.6px); transform: scale(1.03); }
@media (max-width: 720px) {
  .hero-photo img { object-position: 62% center; }
}

/* ---------- исправления: экран входа и дата на главной ---------- */
.gate-card { justify-content: center; padding-top: calc(32px + env(safe-area-inset-top)); padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.gate-card .stamp { position: static !important; margin: 0 auto 10px; width: 130px; }
.gate-card.is-pin .stamp { display: none; }
.gate-card.is-pin .gate-brand .script { font-size: clamp(56px, 12vw, 76px); }
.gate-card.is-pin .gate-brand .caps { font-size: 16px; }
.gate-card.is-pin .gate-lead { margin: 10px 0 16px; }
.keypad { gap: 12px 22px; }
.keypad button { width: 64px; height: 64px; font-size: 27px; }

.hero .eyebrow { margin-bottom: 14px; }
.hero h1 .script { line-height: 1.05; padding-top: .06em; }
.hero h1 .caps { margin-top: 0; }
@media (max-height: 700px) {
  .gate-card .stamp { display: none; }
  .gate-brand .script { font-size: 64px; }
  .keypad button { width: 56px; height: 56px; font-size: 24px; }
}

/* =====================================================================
   Морские эффекты
   ===================================================================== */
/* фото «дышит» — медленно приближается и отдаляется */
.hero-photo img { animation: kenburns 38s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1.03) translate(0, 0); }
  to { transform: scale(1.11) translate(-1.2%, -1%); }
}

/* волны у кромки */
.hero { padding-bottom: 64px; }
.hero-waves { position: absolute !important; left: 0; right: 0; bottom: -1px; height: 54px; z-index: 2 !important; pointer-events: none; overflow: hidden; }
.hero-waves .wv { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.hero-waves .wv path { fill: var(--cream); }
.hero-waves .back { opacity: .45; animation: tide 22s linear infinite; }
.hero-waves .front { height: 70%; animation: tide 14s linear infinite reverse; }
@keyframes tide { to { transform: translateX(-50%); } }
.hero::before { bottom: 40px; }

/* солнечные блики на воде */
.hero-glitter { position: absolute !important; left: 0; right: 0; bottom: 40px; height: 42%; z-index: 1 !important; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: radial-gradient(60% 90% at 55% 100%, #000 30%, transparent 75%);
          mask: radial-gradient(60% 90% at 55% 100%, #000 30%, transparent 75%); }
.hero-glitter i { position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1px at 20% 30%, rgba(255, 246, 228, .95), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255, 246, 228, .85), transparent),
    radial-gradient(2.2px 1.2px at 45% 80%, rgba(255, 246, 228, .9), transparent);
  background-size: 37px 17px, 23px 13px, 53px 21px;
  animation: sparkle 3.2s ease-in-out infinite alternate; }
.hero-glitter i + i { background-position: 11px 6px, 7px 3px, 19px 9px; animation-delay: -1.6s; animation-duration: 2.6s; }
@keyframes sparkle { from { opacity: .1; } to { opacity: .8; } }

/* штамп «прихлопывается» */
.hero .stamp { animation: stampIn .9s cubic-bezier(.2, 1.5, .4, 1) .5s both; }
@keyframes stampIn {
  from { opacity: 0; transform: scale(1.7) rotate(-24deg); }
  to { opacity: .9; transform: scale(1) rotate(-8deg); }
}

/* волнистая линия-разделитель чуть покачивается */
.ornament .waves g { animation: drift 4s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(-5px); } }

/* круги на воде от галочки */
.ripple { position: fixed; z-index: 96; pointer-events: none; width: 0; height: 0; }
.ripple i { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--sea); animation: ring 1.2s ease-out forwards; }
.ripple i:nth-child(2) { animation-delay: .18s; }
.ripple i:nth-child(3) { animation-delay: .36s; }
@keyframes ring { from { transform: scale(.6); opacity: .8; } to { transform: scale(3.4); opacity: 0; } }

/* парусник, когда день выполнен */
.sail-away { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); height: 70px; z-index: 94; pointer-events: none; overflow: hidden;
  animation: fadeInOut 7s ease both; }
.sa-boat { position: absolute; bottom: 14px; left: -60px; width: 40px; height: 48px; animation: sailAcross 7s cubic-bezier(.4, 0, .6, 1) forwards, bob 1.6s ease-in-out infinite; }
.sa-sea { position: absolute; left: 0; bottom: 0; width: 200%; height: 22px; fill: rgba(63, 102, 136, .35); animation: tide 6s linear infinite; }
@keyframes sailAcross { to { left: calc(100% + 60px); } }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes fadeInOut { 0%, 100% { opacity: 0; } 12%, 85% { opacity: 1; } }
@media (max-width: 720px) { .sail-away { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* плавное появление при прокрутке */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease var(--d, 0ms), transform .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.postcard.reveal.in { transform: rotate(3deg); }
.postcard.reveal.in:hover { transform: rotate(0deg) translateY(-4px); }
.card.reveal.in:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
