/* Хроника · стили, нужные только анкете (поверх chronica.css) */

/* ---------- бегущие подсказки ---------- */
.marq { overflow: hidden; padding-block: 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marq + .marq { margin-top: 12px; }
.marq__track { display: flex; gap: 12px; width: max-content; will-change: transform; }
.prompt {
  flex: none; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 18px; border-radius: var(--pill);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 500 16px/1 var(--sans); letter-spacing: -.015em; color: var(--ink);
  transition: background .18s, box-shadow .18s, transform .18s var(--e);
}
.prompt::before { content: "+"; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--accent); font-weight: 500; transition: background .18s, color .18s, transform .38s var(--e); }
.prompt:hover { box-shadow: inset 0 0 0 1px rgba(168,82,46,.4); }
.prompt:hover::before { background: var(--accent); color: #fff; transform: rotate(90deg); }
.prompt.is-picked::before { content: "✓"; background: var(--accent); color: #fff; }

/* ---------- стопка карточек «как это будет» ---------- */
.stack { display: flex; flex-direction: column; gap: 0; }
.stack__item { position: sticky; top: calc(var(--topbar) + 92px + var(--k) * 14px); height: min(560px, calc(100svh - 150px)); margin-bottom: 26px; }
.stack__card {
  height: 100%; border-radius: var(--r-xxl); overflow: hidden; display: grid; grid-template-columns: 1fr 1.05fr; gap: 0;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -40px rgba(60,40,20,.35);
  transform-origin: 50% 0; transform: scale(calc(1 - var(--cover, 0) * .08));
  will-change: transform; position: relative;
}
/* накрытая карточка не просвечивает, а тонет в бумаге */
.stack__card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--bg); opacity: calc(var(--cover, 0) * var(--cover, 0) * .92); pointer-events: none; }
.stack__txt { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.stack__no { font: 400 15px/1 var(--serif); font-style: italic; color: var(--accent); }
.stack__txt h3 { margin-top: 14px; font: 400 clamp(28px, 3.2vw, 44px)/1.08 var(--serif); letter-spacing: -.02em; }
.stack__txt p { margin-top: 16px; font: 400 16.5px/1.55 var(--sans); color: var(--ink-2); max-width: 420px; }
.stack__list { display: grid; gap: 10px; }
.stack__list li { display: flex; gap: 10px; font: 500 14.5px/1.4 var(--sans); }
.stack__list li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.stack__vis { position: relative; margin: 12px; border-radius: calc(var(--r-xxl) - 10px); overflow: hidden; background: linear-gradient(150deg, var(--sand), var(--peach) 55%, var(--rose)); }
@media (max-width: 820px) {
  .stack__item { height: auto; min-height: 0; top: calc(var(--topbar) + 76px + var(--k) * 10px); }
  .stack__card { grid-template-columns: 1fr; border-radius: var(--r-xl); }
  .stack__vis { height: 220px; order: -1; border-radius: calc(var(--r-xl) - 8px); }
  .stack__txt { padding: 24px 22px 26px; }
}
/* наполнение визуалов */
.v-center { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.v-paper { width: min(78%, 360px); background: #FFFCF6; border-radius: 14px; padding: 22px 22px 26px; box-shadow: 0 30px 60px -30px rgba(80,40,10,.45); transform: rotate(-2deg); }
.v-paper .h { font: 400 20px/1.2 var(--serif); }
.v-paper .h em { font-size: inherit; }
.v-paper .ln { height: 7px; border-radius: 4px; background: rgba(31,26,21,.08); margin-top: 11px; }
.v-paper .ln.typing { position: relative; overflow: hidden; background: none; height: auto; font: 400 14px/1.5 var(--sans); color: var(--ink-2); }
.caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -2px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.v-chapters { width: min(82%, 380px); display: grid; gap: 8px; }
.v-chapters div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,252,246,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 500 14px/1.2 var(--sans); box-shadow: 0 10px 30px -20px rgba(80,40,10,.4); }
.v-chapters b { font: 400 16px/1 var(--serif); font-style: italic; color: var(--accent); width: 26px; }
.v-chapters .ok { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 11px; }
.v-book { width: 170px; height: 230px; border-radius: 6px 14px 14px 6px; background: linear-gradient(120deg, #6B3A23, #A8522E 45%, #8C4426); box-shadow: inset 8px 0 0 rgba(0,0,0,.18), 0 40px 60px -30px rgba(60,25,10,.65); transform: rotate(-6deg) translateY(-6px); color: #F6E9D9; padding: 26px 20px 20px 28px; display: flex; flex-direction: column; justify-content: space-between; }
.v-book .t { font: 400 22px/1.12 var(--serif); }
.v-book .t em { color: #F6D2B5; }
.v-book .s { font: 500 10px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.v-voice { display: flex; align-items: center; gap: 4px; height: 70px; }
.v-voice span { width: 5px; border-radius: 3px; background: var(--ink); opacity: .82; animation: vbar 1.2s var(--e) infinite alternate; animation-delay: calc(var(--i) * -90ms); height: calc(14px + var(--h) * 1px); }
@keyframes vbar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.v-pill { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: var(--pill); background: rgba(255,252,246,.8); font: 500 14px/1 var(--sans); box-shadow: 0 10px 30px -18px rgba(80,40,10,.5); }
.v-pill i { width: 10px; height: 10px; border-radius: 50%; background: #C8462D; animation: pulse 1.6s infinite; }

/* ---------- закреплённый список «о чём мы спросим» ---------- */
.pin { position: relative; }
.pin__sticky { position: sticky; top: calc(var(--topbar) + 70px); height: calc(100svh - var(--topbar) - 90px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.pin__art { position: relative; height: min(520px, 100%); border-radius: var(--r-xxl); overflow: hidden; background: linear-gradient(160deg, var(--sand) 0%, var(--peach) 45%, var(--rose) 75%, var(--accent-2) 120%); }
.pin__art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 30% 20%, rgba(255,255,255,.55), transparent 70%); }
.pin__ask { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 20px; }
.pin__input { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 10px 10px 18px; border-radius: 26px; background: rgba(255,252,246,.86); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 16px 40px -22px rgba(80,40,10,.55); font: 500 15px/1.4 var(--sans); }
.pin__input .txt { flex: 1; min-width: 0; }
.pin__input .go { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 15px; }
.pin__meta { margin-top: 10px; display: flex; gap: 16px; padding-left: 8px; font: 500 12.5px/1 var(--sans); color: rgba(31,26,21,.62); }
.pin__q { position: absolute; z-index: 1; left: 26px; top: 26px; right: 26px; font: 400 clamp(20px, 2vw, 26px)/1.25 var(--serif); color: var(--ink); max-width: 420px; transition: opacity .3s; }
.pin__list li { font: 400 clamp(26px, 3.4vw, 46px)/1.22 var(--serif); letter-spacing: -.02em; color: var(--pale); transition: color .4s var(--e), transform .4s var(--e); transform-origin: 0 50%; display: flex; align-items: center; gap: 14px; cursor: default; }
.pin__list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .4s var(--e); flex: none; margin-left: -24px; }
.pin__list li.is-on { color: var(--ink); }
.pin__list li.is-on::before { transform: scale(1); }
.pin__list { padding-left: 24px; }
.pin__desc { margin-top: 26px; max-width: 440px; font: 400 16px/1.55 var(--sans); color: var(--ink-2); min-height: 4.7em; transition: opacity .3s; }
@media (max-width: 820px) {
  .pin__sticky { grid-template-columns: 1fr; align-content: start; gap: 18px; height: calc(100svh - var(--topbar) - 80px); padding-top: 6px; }
  .pin__art { height: 240px; order: 2; border-radius: var(--r-xl); }
  .pin__list li { font-size: 25px; }
  .pin__desc { margin-top: 12px; min-height: 5em; font-size: 15px; }
}

/* ---------- карусель правил ---------- */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rule { border-radius: var(--r-xl); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 28px 26px 30px; min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .45s var(--e), box-shadow .45s var(--e); }
.rule:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--line), 0 30px 50px -36px rgba(60,40,20,.45); }
.rule .ico { font: 400 40px/1 var(--serif); color: var(--accent); font-style: italic; }
.rule h3 { font: 500 21px/1.2 var(--sans); letter-spacing: -.02em; }
.rule p { margin-top: 10px; font: 400 15px/1.55 var(--sans); color: var(--ink-2); }
.rule .ex { margin-top: 14px; font: 400 15px/1.45 var(--serif); font-style: italic; color: var(--ink); padding-left: 12px; border-left: 2px solid var(--accent-2); }
.carousel-bar { display: none; height: 2px; border-radius: 2px; background: var(--line); margin-top: 18px; overflow: hidden; }
.carousel-bar i { display: block; height: 100%; width: 33%; background: var(--ink); border-radius: 2px; transition: transform .2s; transform-origin: 0 0; }
@media (max-width: 820px) {
  .rules { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: none; scroll-padding-inline: var(--gut); }
  .rules::-webkit-scrollbar { display: none; }
  .rule { flex: none; width: 82%; scroll-snap-align: start; min-height: 260px; }
  .carousel-bar { display: block; }
}

/* ---------- шаг «Моменты»: живая лента времени ---------- */
.tl { position: relative; margin-top: clamp(30px, 5vh, 52px); padding: 0 0 6px; }
.tl__scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gut), #000 calc(100% - var(--gut)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--gut), #000 calc(100% - var(--gut)), transparent); }
.tl__scroll::-webkit-scrollbar { display: none; }
.tl__rail { position: relative; display: flex; align-items: flex-end; min-width: 100%; width: max-content; height: 176px; padding: 0 30px; }
.tl__line { position: absolute; left: 0; right: 0; bottom: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--line-2) 6%, var(--line-2) 94%, transparent); }
.tl__line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--accent) 10%, var(--accent-2) 90%, transparent); transform-origin: 0 50%; transform: scaleX(var(--fill, 0)); transition: transform .8s var(--e); border-radius: 2px; opacity: .7; }
.tl__node { position: relative; flex: none; width: 168px; display: flex; flex-direction: column; align-items: center; transition: width .55s var(--e), opacity .4s; }
.tl__node.is-new { width: 0; opacity: 0; }
.tl__node.is-gone { width: 0 !important; opacity: 0; }
.tl__stem { width: 2px; height: 46px; background: var(--accent); border-radius: 2px; transform-origin: 50% 100%; transform: scaleY(1); transition: transform .5s var(--e) .12s; margin-bottom: 0; }
.tl__dot { position: relative; z-index: 1; width: 14px; height: 14px; margin-bottom: 12px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 3px var(--accent); transition: transform .45s var(--e) .05s; }
.tl__card { width: 152px; margin-bottom: 0; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -22px rgba(60,40,20,.45); text-align: left; transform-origin: 50% 100%; transition: transform .5s var(--e) .2s, opacity .4s .2s, box-shadow .2s; }
.tl__card .w { font: 500 11.5px/1 var(--sans); color: var(--accent); }
.tl__card .t { margin-top: 5px; font: 400 15px/1.25 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 1.25em; }
.tl__card .t.empty { color: var(--pale); font-style: italic; }
.tl__node.is-new .tl__stem, .tl__node.is-gone .tl__stem { transform: scaleY(0); }
.tl__node.is-new .tl__dot, .tl__node.is-gone .tl__dot { transform: scale(0); }
.tl__node.is-new .tl__card, .tl__node.is-gone .tl__card { transform: translateY(20px) scale(.6); opacity: 0; }
.tl__node.is-focus .tl__card { box-shadow: inset 0 0 0 1.5px var(--accent), 0 14px 30px -22px rgba(60,40,20,.45); }
.tl__node:nth-child(even) .tl__stem { height: 22px; }
.tl__empty { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); font: 400 18px/1.3 var(--serif); font-style: italic; color: var(--mute); white-space: nowrap; transition: opacity .3s; }
.tl__count { display: flex; justify-content: space-between; align-items: baseline; font: 500 13px/1 var(--sans); color: var(--mute); margin-top: 6px; }
.tl__count b { font: 400 22px/1 var(--serif); color: var(--ink); margin-right: 6px; }
.tl__goal { display: flex; gap: 3px; }
.tl__goal i { width: 14px; height: 4px; border-radius: 2px; background: var(--line-2); transition: background .3s; }
.tl__goal i.on { background: var(--accent); }

.moments { margin-top: 24px; display: grid; gap: 10px; }
.mo { display: grid; grid-template-columns: 44px 1fr 200px 40px; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; border-radius: var(--r-l); background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .25s, opacity .35s, transform .45s var(--e), max-height .45s var(--e), margin .45s var(--e), padding .45s var(--e); max-height: 120px; }
.mo:focus-within { box-shadow: inset 0 0 0 1px rgba(168,82,46,.45); }
.mo.is-new { opacity: 0; transform: translateY(-10px) scale(.98); }
.mo.is-gone { opacity: 0; transform: scale(.96); max-height: 0; padding-block: 0; margin-top: -10px; }
.mo__no { font: 400 20px/1 var(--serif); font-style: italic; color: var(--accent); }
.mo .in { margin: 0; background: transparent; box-shadow: none; padding: 10px 6px; font-size: 16.5px; }
.mo .in:focus { background: var(--bg); box-shadow: none; }
.mo .in.when { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 10px 12px; font-size: 15px; }
.mo .in.when:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mo__x { width: 36px; height: 36px; border-radius: 50%; color: var(--mute); display: grid; place-items: center; font-size: 18px; transition: background .18s, color .18s; }
.mo__x:hover { background: rgba(168,82,46,.1); color: var(--accent); }
@media (max-width: 640px) {
  .mo { grid-template-columns: 30px 1fr 36px; grid-template-areas: "n t x" "n w x"; row-gap: 4px; max-height: 160px; }
  .mo__no { grid-area: n; align-self: start; padding-top: 12px; }
  .mo .in.title { grid-area: t; }
  .mo .in.when { grid-area: w; margin-bottom: 4px; }
  .mo__x { grid-area: x; align-self: start; }
}
.add {
  margin-top: 12px; width: 100%; height: 58px; border-radius: var(--r-l); display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; font: 500 15px/1 var(--sans); color: var(--accent);
  background-image: linear-gradient(90deg, var(--line-2) 50%, transparent 0); background-size: 0 0; transition: background .18s, box-shadow .18s;
}
.add:hover { background-color: rgba(168,82,46,.06); box-shadow: inset 0 0 0 1px rgba(168,82,46,.4); }
.add .plus { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .38s var(--e); }
.add:hover .plus { transform: rotate(90deg); }
.add--sm { height: 46px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { height: 36px; padding: 0 14px; border-radius: var(--pill); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 13.5px/1 var(--sans); color: var(--ink-2); transition: all .18s; }
.chip:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip.is-used { opacity: .4; text-decoration: line-through; pointer-events: none; }

/* ---------- люди / места / даты ---------- */
.trio { margin-top: clamp(30px, 5vh, 52px); display: grid; gap: 14px; }
.group { padding: clamp(20px, 2.4vw, 30px); border-radius: var(--r-xl); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.group__h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.group__h h3 { font: 400 26px/1.1 var(--serif); letter-spacing: -.015em; }
.group__h span { font: 400 14px/1.3 var(--sans); color: var(--mute); }
.suggest { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.suggest .lb { font: 500 12.5px/1 var(--sans); color: var(--mute); margin-right: 4px; }
.suggest button { height: 28px; padding: 0 11px; border-radius: var(--pill); background: rgba(168,82,46,.1); color: var(--accent); font: 500 13px/1 var(--sans); transition: background .18s, color .18s; animation: tagin .4s var(--e) both; }
.suggest button:hover { background: var(--accent); color: #fff; }
.rows { margin-top: 12px; display: grid; gap: 8px; }
.row { display: grid; gap: 8px; align-items: center; animation: tagin .4s var(--e) both; }
.row.people { grid-template-columns: 1fr 1fr 1.3fr 36px; }
.row.places, .row.dates { grid-template-columns: 1fr 1.6fr 36px; }
.row .in { margin: 0; padding: 12px 14px; font-size: 15.5px; }
@media (max-width: 640px) {
  .row.people, .row.places, .row.dates { grid-template-columns: 1fr 36px; padding: 10px; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--line); }
  .row .in:first-child { grid-column: 1; }
  .row .in:not(:first-child) { grid-column: 1; }
  .row .mo__x { grid-column: 2; grid-row: 1; }
}


/* пока сверяемся с сервером — тихая пауза вместо мигания чужого черновика */
html.is-loading main, html.is-loading .fbar, html.is-loading .note { opacity: 0; }
html.is-loading body::after { content: "✶"; position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); font: 400 32px/1 var(--serif); color: var(--accent); animation: pulse 1.2s infinite; }
