/* ════════════════════════════════════════════════════════════
   «Линочке» — маленький сайт с воспоминаниями
   Палитра: тёплый крем, пыльная роза, тёмный какао.
   ════════════════════════════════════════════════════════════ */

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

:root {
  --cream: #fbf5ef;
  --cream-2: #f4e9e1;
  --paper: #fffdfb;
  --ink: #3b2a30;
  --ink-2: #6d565e;
  --ink-3: #8b737c;
  --rose: #bc4f68;
  --rose-deep: #8f3449;
  --rose-soft: #e9a8b6;
  --rose-tint: #f8e4e8;
  --gold: #c2a05e;
  --line: rgba(59, 42, 48, .12);
  --line-soft: rgba(59, 42, 48, .07);

  --radius: 24px;
  --shadow-sm: 0 1px 2px rgba(59, 42, 48, .05), 0 10px 24px -18px rgba(59, 42, 48, .5);
  --shadow-md: 0 2px 4px rgba(59, 42, 48, .04), 0 24px 48px -28px rgba(59, 42, 48, .55);
  --shadow-lg: 0 40px 80px -44px rgba(59, 42, 48, .65);

  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .26, 1);
}

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

html.is-locked,
html.is-locked body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 620px at 8% -12%, #fbe4e4 0%, rgba(251, 228, 228, 0) 62%),
    radial-gradient(900px 560px at 96% -6%, #f8e8d6 0%, rgba(248, 232, 214, 0) 58%),
    radial-gradient(1000px 800px at 50% 112%, #f4dfe6 0%, rgba(244, 223, 230, 0) 62%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

::selection { background: rgba(188, 79, 104, .2); }

:focus-visible {
  outline: 2px solid rgba(188, 79, 104, .6);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
img { max-width: 100%; }

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend { padding: 0; }

svg { display: block; }

/* ─────────────────────────  ТИПОГРАФИКА  ───────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 .55rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rose);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.eyebrow--center {
  justify-content: center;
  margin-bottom: .9rem;
}

.eyebrow--center::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.7vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -.015em;
}

/* ─────────────────────────  ЛЕПЕСТКИ  ───────────────────────── */

.petals {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -10vh;
  width: 9px;
  height: 9px;
  border-radius: 62% 38% 58% 42% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 32% 28%, #f7cdd4, #d98c9e);
  opacity: 0;
  animation: petal-fall linear infinite;
  will-change: transform;
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  8% { opacity: var(--petal-opacity, .5); }
  50% { transform: translate3d(var(--drift, 20px), 55vh, 0) rotate(260deg); }
  92% { opacity: var(--petal-opacity, .5); }
  100% { transform: translate3d(calc(var(--drift, 20px) * -1), 112vh, 0) rotate(560deg); opacity: 0; }
}

/* ─────────────────────────  КНОПКИ И ПОЛЯ  ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .74rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  color: #fff8f7;
  background: linear-gradient(180deg, #c95d76, #a53e57);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 22px -14px rgba(143, 52, 73, .9);
}

.btn--primary:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 16px 26px -14px rgba(143, 52, 73, .95);
}

.btn--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, .66);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover { background: #fff; border-color: rgba(188, 79, 104, .35); }

.btn--soft {
  color: var(--rose-deep);
  background: var(--rose-tint);
  border-color: rgba(188, 79, 104, .12);
}

.btn--soft:hover { background: #f6dbe1; }

.btn--danger { color: #9a2f42; }
.btn--danger:hover { background: rgba(154, 47, 66, .08); }

.btn--danger-solid {
  color: #fff8f7;
  background: linear-gradient(180deg, #ae4054, #8e2b3d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 22px -14px rgba(142, 43, 61, .9);
}

.btn--sm { padding: .52rem .95rem; font-size: .86rem; gap: .4rem; }

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn--wide { width: 100%; }

.linklike {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .85rem;
  color: var(--ink-3);
  text-decoration: underline;
  text-decoration-color: rgba(155, 133, 141, .45);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .2s;
}

.linklike:hover { color: var(--rose); }
.linklike--danger:hover { color: #9a2f42; }

.iconbtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}

.iconbtn:hover { background: var(--rose-tint); color: var(--rose-deep); }
.iconbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.field { display: grid; gap: .45rem; position: relative; }
.field__label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field__hint, .field__count { font-size: .76rem; color: var(--ink-3); }
.field__count { position: absolute; right: .8rem; bottom: .6rem; pointer-events: none; }

.input {
  width: 100%;
  padding: .72rem .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
  color-scheme: light;
}

.input::placeholder { color: #bba9ae; }

.input:hover { border-color: rgba(59, 42, 48, .22); }

.input:focus {
  outline: none;
  border-color: rgba(188, 79, 104, .55);
  box-shadow: 0 0 0 4px rgba(188, 79, 104, .1);
}

.input--area {
  min-height: 136px;
  resize: vertical;
  line-height: 1.65;
  padding-bottom: 1.9rem;
}

.field--lock .input {
  padding: .95rem 1.1rem;
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-align: center;
  background: rgba(255, 255, 255, .8);
}

.moods { display: flex; flex-wrap: wrap; gap: .45rem; }

.mood {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .2s, background-color .2s, box-shadow .2s;
}

.mood:hover { transform: translateY(-2px) scale(1.04); }

.mood[aria-checked="true"] {
  border-color: rgba(188, 79, 104, .55);
  background: var(--rose-tint);
  box-shadow: 0 0 0 3px rgba(188, 79, 104, .12);
}

.form-error {
  margin: .2rem 0 0;
  padding: .65rem .9rem;
  border-radius: 12px;
  background: #fdeef0;
  color: #8e2b3d;
  font-size: .86rem;
}

.spacer { flex: 1; }

/* ─────────────────────────  ЭКРАН ВХОДА  ───────────────────────── */

.lock {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow-y: auto;
  background:
    radial-gradient(760px 520px at 50% 18%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%),
    radial-gradient(600px 420px at 50% 100%, rgba(233, 168, 182, .42), rgba(233, 168, 182, 0) 70%);
}

html.is-unlocked .lock { display: none; }
html.is-locked .app { display: none; }

.lock__inner { width: 100%; max-width: 470px; }

.lock__card {
  position: relative;
  padding: clamp(1.7rem, 5vw, 2.6rem);
  border: 1px solid rgba(188, 79, 104, .16);
  border-radius: 30px;
  background: linear-gradient(180deg, #fffdfb, #fff9f6);
  box-shadow: var(--shadow-lg), inset 0 1px 0 #fff;
  text-align: center;
  animation: lock-in .8s var(--ease) both;
}

@keyframes lock-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.lock__heart {
  width: 34px;
  height: 34px;
  margin: 0 auto 1.1rem;
  fill: var(--rose);
  filter: drop-shadow(0 6px 10px rgba(188, 79, 104, .28));
  animation: heart-beat 2.8s ease-in-out infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.13); }
  24% { transform: scale(1); }
  36% { transform: scale(1.07); }
  48% { transform: scale(1); }
}

.lock__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}

.lock__title em { font-style: italic; color: var(--rose-deep); }

.lock__text {
  margin: 1rem auto 1.7rem;
  max-width: 33ch;
  font-size: .93rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.lock__form { display: grid; gap: .9rem; }
.lock__form .field__label { text-align: center; }

.lock__error {
  min-height: 1.3rem;
  margin-top: .9rem;
  font-size: .84rem;
  color: #9a2f42;
}

.lock__card.is-shaking { animation: shake .5s var(--ease); }

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.lock__hint {
  margin-top: .8rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  background: var(--rose-tint);
  font-size: .84rem;
  color: var(--rose-deep);
}

.lock__foot {
  margin-top: 1.4rem;
  text-align: center;
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--ink-3);
}

/* ─────────────────────────  ВЕРХНЯЯ ПАНЕЛЬ  ───────────────────────── */

.app { position: relative; z-index: 2; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(251, 245, 239, .78);
  backdrop-filter: blur(16px) saturate(1.25);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding-top: 2px;
  border-radius: 50%;
  background: linear-gradient(160deg, #cf6b82, #96354b);
  color: #fff6f5;
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 16px -10px rgba(143, 52, 73, .9);
}

.brand__text {
  font-family: var(--font-display);
  font-size: .98rem;
  letter-spacing: .02em;
  color: var(--ink-2);
}

.topbar__actions { display: flex; align-items: center; gap: .5rem; }

/* ─────────────────────────  HERO  ───────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.6rem, 8vw, 6rem) clamp(1.1rem, 4vw, 2rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
}

/* декоративный скетч-фон за текстом в первом экране (не влияет на разметку текста) */
.hero__art {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 1400px);
  height: auto;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* плавный фейд низа скетча в фон сайта */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 320px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(251, 245, 239, 0) 0%, rgba(251, 245, 239, .55) 45%, rgba(251, 245, 239, .9) 78%, var(--cream) 100%);
}

.hero__inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  padding: 1rem .5rem;
}

.hero__name {
  margin: .1em 0 .12em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.9rem, 16vw, 9.9rem);
  line-height: .95;
  letter-spacing: -.03em;
  color: #6f2739;
  padding-bottom: .06em;
  text-shadow: 0 1px 2px rgba(255, 250, 246, .95);
}

.hero__name {
  position: relative;
}

.hero__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin: .1rem auto 1.15rem;
}

.hero__ornament span {
  width: clamp(28px, 8vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, rgba(188, 79, 104, 0), rgba(188, 79, 104, .45));
}

.hero__ornament span:last-child {
  background: linear-gradient(90deg, rgba(188, 79, 104, .45), rgba(188, 79, 104, 0));
}

.hero__ornament svg {
  width: 11px;
  height: 11px;
  fill: var(--rose-soft);
}

.hero__sub {
  max-width: 44ch;
  margin: 0 auto;
  font-size: clamp(.95rem, 2.4vw, 1.05rem);
  line-height: 1.7;
  color: #4a3a40;
  font-weight: 500;
  background: rgba(255, 251, 248, .96);
  border-radius: 14px;
  padding: .4rem .9rem;
}

.hero__note {
  margin-top: clamp(1.8rem, 5vw, 2.6rem);
  background: rgba(255, 250, 246, .86);
  border-radius: 16px;
  padding: .7rem 1.1rem;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.hero__counter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(.7rem, 3vw, 1.5rem);
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
  background: rgba(255, 250, 246, .86);
  border-radius: 16px;
  padding: .7rem 1.1rem;
  position: relative;
}

.counter { display: grid; gap: .3rem; justify-items: center; min-width: 5.5rem; }

.counter__num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.counter__label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.counter__sep { color: var(--rose-soft); font-size: 1.5rem; line-height: 1.5; }

.note {
  max-width: 36ch;
  min-height: 2.9em;
  margin: 0 auto;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.02rem, 2.6vw, 1.18rem);
  line-height: 1.55;
  color: var(--rose-deep);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, .8);
  transition: opacity .35s var(--ease);
}

.note.is-swapping { opacity: 0; }

/* ─────────────────────────  ЕГЭ БАЗА 2027  ───────────────────────── */

.hero__ege {
  margin: 1.2rem auto 0;
  max-width: 700px;
  text-align: left;
  background: rgba(255, 250, 246, .92);
  border: 1px solid rgba(188, 79, 104, .16);
  border-radius: 18px;
  padding: 1rem 1.2rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.ege__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: .55rem;
}

.ege__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rose-deep);
  white-space: nowrap;
}

.ege__type {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .98rem;
  color: var(--ink-2);
}

.ege__task {
  font-size: .96rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: .85rem;
}

.ege__form { margin-bottom: .7rem; }

.ege__row { display: flex; gap: .55rem; }

.ege__input { flex: 1; min-width: 0; }

.ege__input:disabled {
  background: var(--cream-2);
  color: var(--ink-3);
  cursor: not-allowed;
}

.ege__row .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ege__msg {
  min-height: 1.4em;
  font-size: .88rem;
  line-height: 1.5;
}

.ege__msg.is-right { color: #2e7d4f; }

.ege__msg.is-wrong { color: #9a2f42; }

.ege__days {
  display: flex;
  gap: .4rem;
  margin-top: .6rem;
}

.ege__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cream-2);
  border: 1px solid rgba(188, 79, 104, .35);
}

.ege__dot.is-done {
  background: var(--rose);
  border-color: var(--rose);
}

/* ─────────────────────────  СЕКЦИИ  ───────────────────────── */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.6rem) clamp(1.1rem, 4vw, 2rem);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: clamp(1.3rem, 4vw, 2rem);
}

.section__head--center { justify-content: center; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__head--center .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.section__hint { font-size: .82rem; color: var(--ink-2); }

.section > .section__hint { margin: 0 0 1rem; }

/* ─────────────────────────  ХРОНИКА  ───────────────────────── */

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: .7rem;
  bottom: .7rem;
  width: 1px;
  background: linear-gradient(180deg,
      rgba(188, 79, 104, 0) 0%,
      rgba(188, 79, 104, .3) 8%,
      rgba(188, 79, 104, .3) 92%,
      rgba(188, 79, 104, 0) 100%);
}

.entry {
  position: relative;
  padding-left: 2.3rem;
  margin-bottom: 1.1rem;
}

.entry__dot {
  position: absolute;
  left: 1px;
  top: 1.65rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(188, 79, 104, .5);
  box-shadow: 0 0 0 5px rgba(251, 245, 239, .9);
}

.entry__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--rose-soft);
}

.entry.is-fresh .entry__dot { animation: dot-pop .9s var(--ease); }

@keyframes dot-pop {
  0% { transform: scale(.4); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(188, 79, 104, .18); }

.card--nophoto { grid-template-columns: minmax(0, 1fr); }

.card__photo {
  position: relative;
  display: block;
  min-height: 230px;
  padding: 0;
  border: 0;
  background: var(--cream-2);
  cursor: zoom-in;
  overflow: hidden;
}

.card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), filter .4s;
}

.card__photo:hover img { transform: scale(1.035); }

.card__photo-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.8rem .9rem .7rem;
  background: linear-gradient(180deg, rgba(30, 20, 24, 0), rgba(30, 20, 24, .55));
  color: #fff;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s;
}

.card__photo:hover .card__photo-hint,
.card__photo:focus-visible .card__photo-hint { opacity: 1; }

.card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  min-width: 0;
}

.card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  padding-right: 1.7rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rose);
}

.card__place {
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: .06em;
}

.card__place::before {
  content: "·";
  margin-right: .45em;
  color: var(--rose-soft);
  font-weight: 600;
}

.card__mood {
  position: absolute;
  top: clamp(1rem, 2.4vw, 1.45rem);
  right: clamp(1.1rem, 3vw, 1.6rem);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0;
}

.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.36rem, 3.3vw, 1.62rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.card__text {
  max-width: 70ch;
  font-size: .94rem;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.card__actions {
  position: absolute;
  right: clamp(1rem, 3vw, 1.55rem);
  bottom: clamp(.65rem, 2vw, .95rem);
  display: flex;
  gap: .85rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: rgba(255, 253, 251, .95);
  box-shadow: 0 6px 16px -12px rgba(59, 42, 48, .7);
  opacity: 0;
  transition: opacity .25s var(--ease);
}

.card:hover .card__actions,
.card:focus-within .card__actions { opacity: 1; }

/* ─────────────────────────  ПУСТОЕ СОСТОЯНИЕ  ───────────────────────── */

.empty {
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.2rem) clamp(1.2rem, 4vw, 2rem);
  border: 1px dashed rgba(188, 79, 104, .3);
  border-radius: 28px;
  background: rgba(255, 253, 251, .6);
  text-align: center;
}

.empty__heart {
  width: 46px;
  height: 46px;
  margin: 0 auto 1rem;
  fill: rgba(188, 79, 104, .18);
  stroke: rgba(188, 79, 104, .5);
  stroke-width: .8;
}

.empty__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  margin-bottom: .6rem;
}

.empty__text {
  max-width: 42ch;
  margin: 0 auto 1.6rem;
  font-size: .92rem;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ─────────────────────────  АЛЬБОМ  ───────────────────────── */

.album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .65rem;
}

.album__item {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream-2);
  overflow: hidden;
  cursor: zoom-in;
}

.album__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.album__item:hover img { transform: scale(1.05); }

.album__item:first-child { grid-column: span 2; grid-row: span 2; }

@media (max-width: 520px) {
  .album { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .album__item:first-child { grid-column: span 2; grid-row: span 2; }
}

/* ─────────────────────────  ПИСЬМО  ───────────────────────── */

.envelope { max-width: 620px; margin: 0 auto; }

.envelope__btn {
  display: grid;
  justify-items: center;
  gap: .55rem;
  width: 100%;
  padding: clamp(2rem, 7vw, 3rem) 1.5rem;
  border: 1px solid rgba(188, 79, 104, .22);
  border-radius: 28px;
  background:
    linear-gradient(160deg, #fff8f6 0%, #fae7e4 55%, #f7ddd9 100%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .8);
  color: var(--rose-deep);
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.envelope__btn:hover {
  transform: translateY(-3px) rotate(-.3deg);
  box-shadow: var(--shadow-md);
}

.envelope__icon {
  width: 54px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: .85;
}

.envelope__label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
}

.envelope__hint { font-size: .78rem; color: var(--ink-3); }

.paper {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(1.7rem, 6vw, 3.4rem);
  border: 1px solid rgba(188, 79, 104, .16);
  border-radius: 8px 8px 22px 22px;
  background: linear-gradient(180deg, #fffdfb 0%, #fffaf5 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 #fff;
  transform: rotate(-.35deg);
  animation: paper-in .7s var(--ease) both;
}

@keyframes paper-in {
  from { opacity: 0; transform: translateY(16px) rotate(-1deg) scale(.99); }
  to { opacity: 1; transform: rotate(-.35deg); }
}

.paper::before {
  content: "";
  position: absolute;
  inset: .65rem;
  border: 1px solid rgba(188, 79, 104, .13);
  border-radius: 4px;
  pointer-events: none;
}

.paper__inner { position: relative; }

.paper__body p {
  margin: 0 0 1em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.9;
  color: #46333b;
}

.paper__body p:last-child { margin-bottom: 0; }

.paper__body p:first-child::first-letter {
  float: left;
  padding: .06em .1em 0 0;
  font-size: 3em;
  line-height: .86;
  color: var(--rose);
}

.paper__sign {
  margin-top: 1.6rem;
  text-align: right;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--rose-deep);
}

.paper__sign::after {
  content: " ♡";
  font-style: normal;
  font-size: .9em;
  color: var(--rose-soft);
}

/* ─────────────────────────  ПОДВАЛ  ───────────────────────── */

.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) 1.2rem 2.4rem;
  text-align: center;
  border-top: 1px solid var(--line-soft);
}

.footer__heart {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--rose-soft);
  margin-bottom: .7rem;
}

.footer__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-2);
}

.footer__mini { margin-top: .6rem; font-size: .78rem; color: var(--ink-3); }

/* ─────────────────────────  ДИАЛОГИ  ───────────────────────── */

.modal {
  width: 100%;
  max-width: min(660px, calc(100vw - 1.6rem));
  max-height: calc(100dvh - 1.6rem);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.modal::backdrop {
  background: rgba(48, 33, 38, .42);
  backdrop-filter: blur(7px);
}

.modal[open] { animation: modal-in .34s var(--ease); }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to { opacity: 1; transform: none; }
}

.modal__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 1.6rem);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow-lg), inset 0 1px 0 #fff;
  overflow: hidden;
}

.modal--narrow { max-width: min(540px, calc(100vw - 1.6rem)); }
.modal--tiny { max-width: min(420px, calc(100vw - 1.6rem)); }

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem .9rem;
}

.modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  line-height: 1.15;
}

.modal__body {
  display: grid;
  gap: 1rem;
  padding: .4rem 1.5rem 1.4rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(188, 79, 104, .25) transparent;
}

.modal__body::-webkit-scrollbar { width: 8px; }
.modal__body::-webkit-scrollbar-thumb {
  background: rgba(188, 79, 104, .22);
  border-radius: 99px;
}

.modal__foot {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.5rem 1.2rem;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 253, 251, .4), rgba(255, 253, 251, .9));
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }

/* фото в форме */

.photo-field { position: relative; display: grid; gap: .5rem; }

.photo-field__drop {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 1.5px dashed rgba(188, 79, 104, .32);
  border-radius: 18px;
  background: rgba(248, 228, 232, .35);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, background-color .2s;
}

.photo-field__drop:hover,
.photo-field__drop.is-over {
  border-color: rgba(188, 79, 104, .7);
  background: rgba(248, 228, 232, .65);
}

.photo-field__drop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-field__placeholder {
  display: grid;
  justify-items: center;
  gap: .5rem;
  padding: 1rem;
  font-size: .84rem;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-3);
}

.photo-field__placeholder svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: rgba(188, 79, 104, .6);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-field__placeholder small { font-size: .76rem; }

.photo-field__clear {
  position: absolute;
  top: .6rem;
  right: .6rem;
  padding: .35rem .7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #8e2b3d;
  font: inherit;
  font-size: .74rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .5);
}

.photo-field__foot { display: flex; justify-content: center; }

.photo-field__hint { font-size: .74rem; color: var(--ink-3); text-align: center; }

/* настройки */

.settings-group {
  margin-top: .4rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: .6rem;
}

.settings-group__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.settings-group__text {
  font-size: .86rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.settings-group__text code {
  padding: .08em .35em;
  border-radius: 6px;
  background: var(--rose-tint);
  font-size: .92em;
  color: var(--rose-deep);
}

.settings-group__meta { font-size: .76rem; color: var(--ink-3); }

.sync-status { margin: 0; }

.sync-status.is-error { color: #9a2f42; }

.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .2rem; }

.confirm__text {
  margin-top: .5rem;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* просмотр фото */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(26, 17, 21, .95);
  color: #fff;
}

.lightbox[open] { display: grid; place-items: center; }

.lightbox::backdrop { background: rgba(26, 17, 21, .95); }

.lightbox__figure {
  display: grid;
  gap: .8rem;
  justify-items: center;
  margin: 0;
  padding: 3.2rem 3.4rem;
  max-width: 100%;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: 78dvh;
  border-radius: 10px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
  animation: lb-in .3s var(--ease);
}

@keyframes lb-in {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: none; }
}

.lightbox__cap {
  font-size: .86rem;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .78);
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color .2s, transform .2s;
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.lightbox__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.lightbox__nav {
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.7rem;
  line-height: 1;
  padding-bottom: .2rem;
  transform: translateY(-50%);
}

.lightbox__nav:hover,
.lightbox__close:hover { background: rgba(255, 255, 255, .2); }

.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

/* ─────────────────────────  ТОСТ  ───────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 100;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  background: rgba(59, 42, 48, .94);
  color: #fff8f5;
  font-size: .86rem;
  letter-spacing: .01em;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ─────────────────────────  СЕРДЕЧКИ ПРИ СОХРАНЕНИИ  ───────────────────────── */

.burst {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  will-change: transform, opacity;
}

.counter[hidden] + .counter__sep { display: none; }

/* ─────────────────────────  ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ  ───────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ─────────────────────────  КИНО  ───────────────────────── */

.cinema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: .9rem;
}

.film {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}

.film:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(188, 79, 104, .2); }

.film__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

.film__platform {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose);
}

.film__delete {
  padding: 0 .2rem;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
  transition: opacity .2s, color .2s;
}

.film__delete:hover { opacity: 1; color: #9a2f42; }

.film__title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.film__meta { font-size: .78rem; color: var(--ink-3); }

.film__progress {
  height: 4px;
  border-radius: 99px;
  background: var(--rose-tint);
  overflow: hidden;
}

.film__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c95d76, #8f3449);
}

.film__actions { margin-top: auto; padding-top: .5rem; display: flex; gap: .5rem; align-items: center; }

.film__resume { font-size: .74rem; color: var(--ink-3); margin-left: auto; }

.film__rating {
  display: flex;
  gap: .15rem;
  margin-top: .4rem;
}

.star {
  padding: 0;
  border: 0;
  background: none;
  color: #cbb4bd;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, transform .15s;
}

.star:hover { color: #d9a441; transform: scale(1.12); }

.star[aria-pressed="true"] { color: #e0a93e; }

/* совместный просмотр */

.watch {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #171114;
  color: #fff;
}

.watch[open] { display: block; }
.watch::backdrop { background: #171114; }

.watch__panel { display: flex; flex-direction: column; height: 100%; }

.watch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 3vw, 1.6rem);
  background: linear-gradient(180deg, #1f171a, #171114);
}

.watch__titles { min-width: 0; }

.watch__platform {
  margin: 0 0 .2rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #e9a8b6;
}

.watch__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 78vw;
}

.watch .iconbtn {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.watch .iconbtn:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.watch__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.watch__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.watch__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .85rem;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .55);
}

.watch__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding: .75rem clamp(1rem, 3vw, 1.6rem);
  background: #1f171a;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.watch__controls { display: flex; gap: .45rem; }

.watch .btn--soft {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}

.watch .btn--soft:hover { background: rgba(255, 255, 255, .18); }

.watch__status {
  margin-left: auto;
  font-size: .74rem;
  color: #c9b6bd;
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch__status.is-error { color: #f0a8b4; }

.watch__time {
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  color: #e9a8b6;
}

@media (max-width: 640px) {
  .watch__bar { gap: .45rem; }
  .watch__status { order: 3; width: 100%; max-width: none; margin-left: 0; }
  .watch__time { margin-left: auto; }
}

/* ─────────────────────────  АДАПТИВ  ───────────────────────── */

@media (max-width: 720px) {
  .card { grid-template-columns: minmax(0, 1fr); }
  .card--nophoto { grid-template-columns: minmax(0, 1fr); }
  .card__photo { min-height: 0; aspect-ratio: 16 / 10; }
  .entry { padding-left: 1.9rem; }
  .card__actions {
    position: static;
    margin-top: auto;
    padding: .7rem 0 0;
    background: none;
    box-shadow: none;
  }
  .card__actions { opacity: 1; }
  .brand__text { display: none; }
  .modal { max-width: 100vw; width: 100%; margin: auto 0 0; }
  .modal__panel { border-radius: 24px 24px 0 0; max-height: 94dvh; }
  .modal__head, .modal__body, .modal__foot { padding-left: 1.15rem; padding-right: 1.15rem; }
  .grid2 { grid-template-columns: 1fr; }
  .counter { min-width: 4.6rem; }
  .star { font-size: 1.5rem; padding: .4rem .25rem; }
  .film__rating { gap: .3rem; margin-left: -.25rem; }
  .lightbox__nav--prev { left: .5rem; }
  .lightbox__nav--next { right: .5rem; }
  .lightbox__figure { padding: 3rem .6rem; }
}

@media (max-width: 560px) {
  .hero__counter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: .5rem;
    align-items: start;
  }
  .ege__row { flex-direction: column; }
  .ege__row .btn { width: 100%; }
  .ege__task { font-size: .93rem; }
  .counter { min-width: 0; gap: .25rem; }
  .counter__num { font-size: 1.8rem; }
  .counter__label { font-size: .6rem; letter-spacing: .1em; }
  .counter__sep { display: none; }
  .eyebrow { font-size: .62rem; letter-spacing: .13em; gap: .45rem; }
  .eyebrow::before, .eyebrow--center::after { width: 14px; }
  .hero__sub { font-size: .93rem; }
  .paper { transform: none; }
  .paper__body p:first-child::first-letter { font-size: 2.5em; }
  .album__item:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 1; }
}

@media (max-width: 420px) {
  .section__head { gap: .6rem; }
  .section__title { font-size: 1.72rem; }
  .section__head .btn { padding: .58rem .85rem; font-size: .8rem; }
  .topbar { padding: .6rem .8rem; gap: .5rem; }
  .topbar__actions { gap: .4rem; }
  .btn--sm { padding: .5rem .8rem; font-size: .8rem; }
}

@media (hover: none) {
  .card__actions { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .petals { display: none; }
  .reveal { opacity: 1; transform: none; }
}
