/* =====================================================================
   wish.petin.pro · список желаний
   Одна страница из той же семьи, что petin.pro: бумага топокарты,
   чернильные подписи, красная тропа. Карты тут нет - только маленький мотив
   в шапке и тропа-разделитель, чтобы страница оставалась быстрой.
   ===================================================================== */

:root {
  --serif: "Alegreya", "PT Serif", Georgia, serif;
  --sans: "Alegreya Sans", "PT Sans", "Segoe UI", sans-serif;
  --caps: "IBM Plex Sans Condensed", "Arial Narrow", "Segoe UI", sans-serif;

  --paper: #f4f0e6;
  --paper-2: #ece6d5;
  --card: #fbf9f3;
  --land: #f4f0e6;
  --contour: #b3c4a3;
  --ink: #1e3a5f;
  --ink-2: #3a5575;
  --text: #22292d;
  --muted: #566068;
  --rule: #d6ceb9;
  --rule-2: #bfb49b;
  --trail: #b53a20;
  --trail-soft: rgba(181, 58, 32, .1);
  --focus: #1e3a5f;
  --on-ink: #f7f3ea;
  --mark-bg: rgba(181, 58, 32, .14);
  --shade: rgba(20, 30, 40, .1);
  --shade-2: rgba(20, 30, 40, .16);
  --veil: rgba(18, 28, 34, .5);

  --wrap: 1000px;
  --gutter: clamp(16px, 4vw, 44px);
  --radius: 6px;
  --ease: cubic-bezier(.22, .7, .2, 1);

  --fs-body: clamp(1.0625rem, 1rem + .2vw, 1.14rem);
  --fs-lead: clamp(1.16rem, 1.05rem + .5vw, 1.4rem);
  --fs-h1: clamp(2.5rem, 1.8rem + 2.9vw, 4.1rem);
  --fs-h2: clamp(1.62rem, 1.35rem + 1vw, 2.05rem);
  --fs-caps: .78rem;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0b1d20;
  --paper-2: #0f262a;
  --card: #112a2e;
  --land: #0d2326;
  --contour: #22524a;
  --ink: #d9ece5;
  --ink-2: #b3cdc5;
  --text: #dbe8e3;
  --muted: #9ab2ab;
  --rule: #214147;
  --rule-2: #2f5a5e;
  --trail: #ff8a66;
  --trail-soft: rgba(255, 138, 102, .12);
  --focus: #ffc98a;
  --on-ink: #0b1d20;
  --mark-bg: rgba(255, 138, 102, .2);
  --shade: rgba(0, 0, 0, .3);
  --shade-2: rgba(0, 0, 0, .42);
  --veil: rgba(3, 12, 14, .62);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #0b1d20; --paper-2: #0f262a; --card: #112a2e; --land: #0d2326; --contour: #22524a;
    --ink: #d9ece5; --ink-2: #b3cdc5; --text: #dbe8e3; --muted: #9ab2ab; --rule: #214147; --rule-2: #2f5a5e;
    --trail: #ff8a66; --trail-soft: rgba(255, 138, 102, .12); --focus: #ffc98a; --on-ink: #0b1d20;
    --mark-bg: rgba(255, 138, 102, .2); --shade: rgba(0, 0, 0, .3); --shade-2: rgba(0, 0, 0, .42);
    --veil: rgba(3, 12, 14, .62); color-scheme: dark;
  }
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.22, .7, .2, 1); }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 500; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, dt { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
b, strong { font-weight: 700; color: var(--ink); }
[hidden] { display: none !important; }
::selection { background: var(--mark-bg); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: var(--radius); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.sym {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.18em; overflow: visible;
}
.sym-trail { color: var(--trail); }
.ic-dash { stroke-dasharray: 3.2 3.6; }
.ic-cloth { fill: currentColor; }

.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--caps); font-size: var(--fs-caps); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); line-height: 1.3;
}
.kicker .sym { width: 1.4em; height: 1.4em; }
.stub { font-style: italic; color: var(--muted); }

/* тропа-разделитель: красный пунктир, как на карте */
.trail-rule { height: 3px; background: repeating-linear-gradient(90deg, var(--trail) 0 10px, transparent 10px 17px); opacity: .75; }

/* ---------- кнопки ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .5em 1.15em;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-family: var(--sans); font-size: 1.02rem; font-weight: 500; line-height: 1.1;
  color: var(--ink); background: transparent; text-decoration: none; text-align: center;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost:hover { background: var(--trail-soft); }
.btn-quiet { border-color: color-mix(in srgb, var(--ink-2) 45%, transparent); color: var(--ink-2); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); background: var(--trail-soft); }
.btn-sm { min-height: 44px; padding: .35em .9em; font-size: .97rem; }

/* ---------- капсулы-фильтры ---------- */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: 0 17px; border-radius: 999px;
  font-family: var(--sans); font-size: 1.01rem; font-weight: 500; line-height: 1; color: var(--ink); white-space: nowrap;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-2) 30%, transparent);
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.chip:hover { color: var(--trail); box-shadow: inset 0 0 0 1.5px var(--ink); }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: inset 0 0 0 1px var(--ink), 0 4px 12px -6px var(--shade-2); }
.chip[aria-pressed="true"]:hover { color: var(--on-ink); }
.chip:focus-visible { outline-offset: 3px; border-radius: 999px; }
.chip-free .sym { width: 1em; height: 1em; opacity: 0; transition: opacity .2s var(--ease); }
.chip-free[aria-pressed="true"] .sym { opacity: 1; }

/* =====================================================================
   ШАПКА
   ===================================================================== */
.top { position: relative; overflow: hidden; }
.top-in { position: relative; display: grid; gap: 16px; justify-items: start; padding-block: clamp(26px, 4vw, 58px) clamp(22px, 2.8vw, 32px); }
.top-art {
  position: absolute; right: calc(var(--gutter) * -1 + 4px); top: -14px;
  width: clamp(190px, 34vw, 330px); height: auto; aspect-ratio: 264 / 208;
  opacity: .62; pointer-events: none; user-select: none;
}
.ta-c { fill: none; stroke: var(--contour); stroke-width: 1.6; stroke-linecap: round; }
.ta-t { fill: none; stroke: var(--trail); stroke-width: 2.6; stroke-dasharray: 9 7; stroke-linecap: round; opacity: .85; }
.ta-pk { fill: var(--land); stroke: var(--ink-2); stroke-width: 1.7; stroke-linejoin: round; }
.ta-pkh { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-linecap: round; opacity: .75; }
.ta-fl { fill: none; stroke: var(--trail); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ta-cloth { fill: var(--trail); }

.top-h { font-family: var(--serif); font-size: var(--fs-h1); line-height: .98; letter-spacing: -.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--text); max-width: 34em; }
.draft {
  display: flex; align-items: flex-start; gap: .6em; max-width: 42em; margin-top: 2px;
  padding: 10px 14px; border-left: 2px dashed var(--rule-2); border-radius: 0 var(--radius) var(--radius) 0;
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
  font-size: .94rem; font-style: italic; color: var(--muted); line-height: 1.45;
}
.draft .sym { width: 1.1em; height: 1.1em; margin-top: .25em; }

/* =====================================================================
   КАК ЭТО РАБОТАЕТ
   ===================================================================== */
.sec-h { font-family: var(--serif); font-size: var(--fs-h2); line-height: 1.08; }
.sec-h::before {
  content: ""; display: block; width: 58px; height: 3px; margin-bottom: 16px;
  background: repeating-linear-gradient(90deg, var(--trail) 0 10px, transparent 10px 17px);
}

.how { padding-block: clamp(26px, 3.8vw, 46px) 0; }
.how-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 20px; border-top: 1px solid var(--rule-2); }
.how-list li { display: grid; align-content: start; gap: 8px; padding: 18px 22px 8px 0; }
.how-list li + li { padding-left: 22px; border-left: 1px dashed var(--rule-2); }
.how-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink-2); color: var(--ink); }
.how-ico .sym { width: 18px; height: 18px; }
.how-list h3 { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.how-list p { font-size: 1.02rem; line-height: 1.5; color: var(--text); }
.how-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 1rem; color: var(--muted); max-width: 46em; }

@media (max-width: 800px) {
  .how-list { grid-template-columns: 1fr; }
  .how-list li, .how-list li + li { padding: 18px 0 16px; border-left: 0; border-bottom: 1px dashed var(--rule-2); }
  .how-list li:last-child { border-bottom: 0; padding-bottom: 6px; }
}

/* =====================================================================
   ФИЛЬТРЫ И СЧЕТЧИК
   ===================================================================== */
main { display: block; outline: none; padding-block: clamp(26px, 3.6vw, 44px) 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 18px; padding-bottom: 22px; border-bottom: 1px solid var(--rule-2); }
.tools-2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.count { font-family: var(--caps); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.count b { color: var(--ink); font-weight: 600; }

/* =====================================================================
   ГРУППЫ И КАРТОЧКИ
   ===================================================================== */
.group { padding-block: clamp(24px, 3.4vw, 38px) 0; }
.group-head { display: grid; gap: 4px; margin-bottom: 18px; }
.group-h { font-family: var(--serif); font-size: clamp(1.5rem, 1.25rem + .8vw, 1.95rem); line-height: 1.1; }
.group-note { font-size: .99rem; color: var(--muted); }
.group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }

.wish {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 12px;
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-2) 28%, transparent), 0 4px 14px -8px var(--shade);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), background-color .25s var(--ease);
}
.wish:hover { box-shadow: inset 0 0 0 1.5px var(--ink), 0 10px 22px -12px var(--shade-2); transform: translateY(-2px); }
.wish.is-taken {
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--rule-2) 26%, transparent) 8px 9px),
    color-mix(in srgb, var(--paper-2) 70%, var(--card));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-2) 20%, transparent);
}
.wish.is-taken:hover { transform: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-2) 30%, transparent); }
.wish.is-mine { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--trail) 55%, transparent), 0 4px 14px -8px var(--shade); }

.wish-top { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: start; }
.wish-art {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px;
  border: 1.5px solid var(--ink-2); border-radius: 3px; background: var(--land); color: var(--ink);
}
.wish-art::after { content: ""; position: absolute; inset: 3px; border: 1px solid color-mix(in srgb, var(--ink-2) 32%, transparent); border-radius: 1px; pointer-events: none; }
.wish-art .sym { width: 22px; height: 22px; stroke-width: 1.9; }
.is-taken .wish-art { color: var(--muted); border-color: color-mix(in srgb, var(--ink-2) 55%, transparent); }

.wish-t { font-family: var(--serif); font-size: 1.24rem; line-height: 1.2; }
.wish-price { margin-top: 3px; font-family: var(--caps); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--trail); font-variant-numeric: tabular-nums; }
.is-taken .wish-price { color: var(--muted); }
.wish-mid { display: grid; gap: 3px; align-content: start; }
.wish-why { margin-top: 5px; font-size: 1rem; line-height: 1.45; color: var(--text); }
.is-taken .wish-why, .is-taken .wish-t { color: var(--muted); }
.wish-link {
  display: inline-flex; align-items: center; gap: .45em; align-self: start; min-height: 44px;
  font-size: .97rem; color: var(--ink); text-decoration: underline dashed 1px; text-underline-offset: .28em;
  transition: color .25s var(--ease);
}
.wish-link .sym { width: .85em; height: .85em; }
.wish-link:hover { color: var(--trail); }

.wish-foot { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--rule); }
.state { display: inline-flex; align-items: center; justify-self: start; gap: .5em; font-family: var(--caps); font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.is-taken .state { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); background: color-mix(in srgb, var(--rule-2) 34%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-2) 28%, transparent); }
/* пятно у своей брони - непрозрачное: поверх штриховки занятой карточки красному не хватало контраста */
.is-mine .state { color: var(--trail); background: color-mix(in srgb, var(--card) 92%, var(--trail)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--trail) 40%, transparent); }
.state .sym { width: 1em; height: 1em; }
.state-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.state-free { color: var(--ink-2); }
.state-mine { color: var(--trail); }
.state-date { font-weight: 500; letter-spacing: .06em; color: var(--muted); text-transform: none; }
.wish-act { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-act .btn { flex: 1 1 auto; }

/* код отмены */
.code-box { display: grid; gap: 6px; padding: 10px 13px; border-radius: var(--radius); background: var(--trail-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--trail) 34%, transparent); }
.code-lbl { font-family: var(--caps); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.code { font-family: var(--caps); font-size: 1.26rem; font-weight: 600; letter-spacing: .22em; color: var(--ink); user-select: all; }
.code-hint { font-size: .87rem; line-height: 1.35; color: var(--muted); }

/* поле «снять бронь» */
.free-form { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--paper-2) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rule-2) 85%, transparent); }
.free-row { display: flex; flex-wrap: wrap; gap: 8px; }
.free-row .btn { flex: 1 1 calc(50% - 4px); }
.free-form input {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1.5px solid color-mix(in srgb, var(--ink-2) 50%, transparent); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  font-family: var(--caps); font-size: 1.05rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.free-form input::placeholder { letter-spacing: .12em; color: var(--muted); font-weight: 500; text-transform: none; }
.free-form input:focus-visible { outline-offset: 1px; border-color: var(--ink); }
.free-msg { font-size: .92rem; line-height: 1.4; color: var(--trail); }
.free-msg:empty { display: none; }

.empty { padding: 44px 0 8px; font-family: var(--serif); font-size: 1.25rem; color: var(--muted); }

/* показ карточки после смены фильтра - только прозрачность и сдвиг */
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wish.just-in { animation: cardIn .28s var(--ease) both; }

/* =====================================================================
   ЛУЧШЕ НЕ ДАРИТЬ · РАЗМЕРЫ
   ===================================================================== */
.band { padding-block: clamp(42px, 6vw, 72px) 0; }
.band-tight { padding-block: clamp(30px, 4vw, 46px) 0; }
.panel {
  position: relative; padding: clamp(22px, 3vw, 32px);
  background: var(--paper-2); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rule-2) 90%, transparent);
}
.panel-lead { margin-top: 12px; font-size: 1.06rem; color: var(--text); max-width: 44em; }
.plain { display: grid; gap: 10px; margin-top: 18px; }
.plain li { position: relative; padding-left: 18px; font-size: 1.02rem; line-height: 1.5; color: var(--text); }
.plain li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 2px; background: var(--trail); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 28px; margin-top: 22px; }
.facts > div { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--rule-2); }
.facts dt { font-family: var(--caps); font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }

/* =====================================================================
   ПОДВАЛ
   ===================================================================== */
.foot { margin-top: clamp(48px, 7vw, 86px); padding-bottom: clamp(28px, 4vw, 44px); }
.foot .trail-rule { margin-bottom: clamp(24px, 3vw, 34px); }
.foot-in { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 32px; }
.foot-h { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 12px; }
.foot-side { display: grid; justify-items: start; gap: 14px; }
.foot-site {
  display: inline-flex; align-items: center; gap: .5em; min-height: 44px;
  font-weight: 500; color: var(--ink); text-decoration: underline dashed 1px; text-underline-offset: .3em;
  transition: color .25s var(--ease);
}
.foot-site:hover { color: var(--trail); }
.foot-caps { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--caps); font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.theme-switch { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 999px; background: color-mix(in srgb, var(--paper-2) 80%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rule-2) 70%, transparent); }
.theme-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 16px; border-radius: 999px;
  font-family: var(--caps); font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.theme-switch .sym { width: 14px; height: 14px; }
.theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink-2) 35%, transparent), 0 1px 3px var(--shade); }
.theme-switch button[aria-pressed="false"]:hover { color: var(--trail); }
.theme-switch button:focus-visible { outline-offset: 1px; border-radius: 999px; }

/* =====================================================================
   ДИАЛОГ И ТОСТ
   ===================================================================== */
.ask { width: min(460px, calc(100% - 28px)); padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); overflow: visible; }
.ask::backdrop { background: var(--veil); }
.ask-in {
  position: relative; display: grid; gap: 12px; padding: clamp(22px, 4vw, 30px);
  background: var(--card); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-2) 40%, transparent), 0 20px 50px -18px var(--shade-2);
}
.ask[open] .ask-in { animation: askIn .28s var(--ease) both; }
@keyframes askIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ask-x { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--muted); transition: color .25s var(--ease), background-color .25s var(--ease); }
.ask-x:hover { color: var(--trail); background: var(--trail-soft); }
.ask-x .sym { width: 15px; height: 15px; }
.ask-h { font-family: var(--serif); font-size: clamp(1.5rem, 1.3rem + .8vw, 1.9rem); line-height: 1.12; padding-right: 36px; }
.ask-what { font-family: var(--serif); font-size: 1.1rem; font-style: italic; color: var(--ink-2); padding: 10px 14px; border-left: 2px solid var(--trail); background: var(--trail-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.ask-p { font-size: 1rem; line-height: 1.5; color: var(--text); }
.ask-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ask-btns .btn { flex: 1 1 auto; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: var(--radius);
  background: var(--ink); color: var(--on-ink); font-weight: 500; text-align: center;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   УЗКИЙ ЭКРАН, СНИМКИ, МЕНЬШЕ ДВИЖЕНИЯ
   ===================================================================== */
/* Пока окно уже макета, уголок выходил за край окна: вершина резалась пополам,
   флажок пропадал совсем. Здесь держим его внутри экрана. */
@media (max-width: 1180px) {
  .top-art { right: 4px; top: -4px; width: clamp(180px, 25vw, 270px); }
}

@media (max-width: 620px) {
  .top-art { display: none; }
  .top-in { padding-block: 28px 22px; }
  .group-list { grid-template-columns: minmax(0, 1fr); }
  .tools { flex-direction: column; align-items: flex-start; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .wish-act .btn { flex: 1 1 100%; }
}
@media (max-width: 380px) {
  .chip { padding: 0 14px; font-size: .96rem; }
}

html.shot-y { height: 100%; overflow: hidden; }
html.shot-y body { height: 100%; overflow-y: auto; }
html.shot-y .wish.just-in, html.shot-y .ask[open] .ask-in { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wish:hover { transform: none; }
}
