/* Личный кабинет. Цвета и шрифты — из ../styles.css (:root). Мобильная версия — основная.
   Тона услуг: разбор — изумруд, гайд по стране — лёд, гайд по поступлению — янтарь, консультация — коралл.
   Производительность (CLAUDE.md, «Движение и стекло»): blur только у шапки, меню и карточки входа;
   анимации — opacity/transform; бесконечных перерисовок нет. */

.acc {
  --amber: #F2C14E; --amber-bg: rgba(242,193,78,.14);
  --coral: #F59A7E; --coral-bg: rgba(245,154,126,.14);
  --ice-bg: rgba(141,187,250,.14);
  --em-bg: rgba(15,164,122,.17);
  --tg: #2AABEE;
  --out: cubic-bezier(.16, 1, .3, 1);
  min-height: 100dvh;
  scrollbar-color: var(--surface-2) transparent;
}
.acc ::selection { background: rgba(15,164,122,.45); color: #fff; }
.acc input, .acc textarea { caret-color: var(--accent-hover); }

/* ---------- фон ---------- */
.acc-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.acc-shot {
  position: absolute; inset: -4%; background: var(--img) center / cover no-repeat;
  opacity: 0; transform: scale(1.06); filter: saturate(.85);
  transition: opacity 1.1s var(--out), transform 6s var(--out);
}
.acc-shot.on { opacity: .34; transform: scale(1); }
.acc-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(55% 45% at 88% 4%, rgba(15,164,122,.32), transparent 70%),
    radial-gradient(45% 40% at 4% 96%, rgba(141,187,250,.22), transparent 70%),
    radial-gradient(40% 30% at 0% 30%, rgba(245,154,126,.12), transparent 70%),
    linear-gradient(180deg, rgba(18,22,58,.5) 0%, rgba(18,22,58,.86) 40%, var(--bg) 80%);
}
.acc-routes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.acc-routes path { fill: none; stroke: rgba(141,187,250,.22); stroke-width: 1.4; stroke-dasharray: 2 9; stroke-linecap: round; }
.acc-routes .r2 { stroke: rgba(15,164,122,.32); }
.acc-routes circle { fill: var(--accent); opacity: .7; }

.acc-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 17px/1 var(--font-d); }
.acc-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-fill) 70%); color: #fff; font: 700 16px/1 var(--font-d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 18px -8px rgba(4,5,22,.75);
}

.muted { color: var(--muted-2); margin: 6px 0 0; }
.tiny { font-size: 13px; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.link.danger { color: var(--coral); }

/* метки */
.acc-chip, .stamp {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 9px; border-radius: 999px;
  font: 700 12.5px/1 var(--font); background: var(--em-bg); color: var(--ok);
}
.acc-chip svg, .stamp svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-chip.ice { background: var(--ice-bg); color: var(--accent-ink); }
.stamp { background: rgba(14,17,48,.6); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.stamp.em { background: var(--em-bg); color: var(--ok); border-color: rgba(15,164,122,.35); }

/* кнопки */
.btn-a, .btn-g, .btn-tg {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0; cursor: pointer;
  font: 700 15px/1 var(--font); text-decoration: none; transition: transform .2s var(--out), box-shadow .2s, background .2s;
}
.btn-a { background: linear-gradient(140deg, #12b386, var(--accent-fill)); color: #fff; box-shadow: 0 10px 22px -10px rgba(4,5,22,.75), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-a:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(4,5,22,.75), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-a::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transition: transform .7s var(--out);
}
.btn-a:hover::after { transform: translateX(120%); }
.btn-a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-g { background: rgba(238,240,250,.07); color: var(--text); border: 1px solid var(--line-strong); }
.btn-g:hover { background: rgba(238,240,250,.13); transform: translateY(-1px); }
.btn-tg { width: 100%; background: linear-gradient(140deg, #3fbaf5, #1e93d4); color: #fff; box-shadow: 0 10px 22px -12px rgba(4,5,22,.75); }
.btn-tg svg { width: 20px; height: 20px; fill: currentColor; }
.btn-a:active, .btn-g:active, .btn-tg:active { transform: scale(.97); }

/* ---------- вход ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; }
.login-stack { position: relative; width: 100%; max-width: 420px; padding-top: 128px; }
.postcards { position: absolute; top: 0; left: 0; right: 0; height: 150px; }
.pc {
  position: absolute; top: 0; width: 116px; height: 146px; margin: 0; border-radius: 16px; overflow: hidden;
  background: var(--img) center / cover; border: 3px solid #EEF0FA; box-shadow: 0 18px 30px -14px rgba(4,5,22,.9);
  transform: rotate(var(--r)); animation: deal .9s var(--out) both;
}
.pc span {
  position: absolute; left: 6px; bottom: 6px; padding: 4px 8px; border-radius: 8px;
  background: rgba(14,17,48,.78); font: 700 11px/1 var(--font); color: #fff;
}
.pc1 { left: 6%; --r: -11deg; animation-delay: .05s; }
.pc2 { left: 50%; margin-left: -58px; top: -14px; --r: 2deg; animation-delay: .15s; z-index: 1; }
.pc3 { right: 6%; --r: 10deg; animation-delay: .25s; }
@keyframes deal { from { opacity: 0; transform: translateY(40px) rotate(0); } to { opacity: 1; transform: rotate(var(--r)); } }
.login-card {
  position: relative; z-index: 2;
  width: 100%; padding: 28px 22px; border-radius: var(--r-xl);
  background: var(--glass-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: rise .7s var(--out) .2s both;
}
.login-card h1 { font: 600 24px/1.2 var(--font-d); }
.sub { color: var(--muted-2); margin: 10px 0 22px; }
.field { display: grid; gap: 8px; margin-bottom: 14px; font-weight: 600; font-size: 14px; color: var(--muted-2); }
.field input, .send input, .acc-q textarea, .acc-q input {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(14,17,48,.6); color: var(--text); font: 500 16px/1.4 var(--font);
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .send input::placeholder, .acc-q textarea::placeholder { color: #8C92BE; }
.field input:focus, .send input:focus, .acc-q textarea:focus, .acc-q input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,164,122,.25); }
.login-card .btn-a { width: 100%; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.fine { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.back { background: none; border: 0; color: var(--muted-2); padding: 0; margin-bottom: 16px; cursor: pointer; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code input {
  height: 58px; text-align: center; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(14,17,48,.6); color: var(--text); font: 600 24px/1 var(--font-d); transition: border-color .2s, transform .2s var(--out);
}
.code input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,164,122,.25); transform: translateY(-2px); }
.code.ok input { border-color: var(--ok); background: var(--em-bg); }

/* ---------- кабинет ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; background: rgba(18,22,58,.78); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.tabs { display: none; }
.me {
  margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; padding: 2px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-ink), var(--coral), var(--accent));
}
.me span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--bg-2); font: 700 15px/1 var(--font-d); }
.acc-main { padding-top: 18px; padding-bottom: 110px; }
.h-sec { margin: 34px 0 12px; font: 600 18px/1.2 var(--font-d); }
.v-head { margin: 8px 0 20px; }
.v-head h1 { font: 600 clamp(26px, 6vw, 36px)/1.15 var(--font-d); }
.v-head .stamp + h1 { margin-top: 12px; }

/* появление раздела: одна волна снизу по очереди (--i) */
.rise { animation: rise .6s var(--out) both; animation-delay: calc(var(--i, 0) * 80ms + 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

.card {
  position: relative; padding: 20px; border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(34,40,88,.8), rgba(22,26,66,.86)); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .3s var(--out), border-color .3s;
}
.card h2 { font: 600 19px/1.25 var(--font-d); margin-top: 12px; }
.card .btn-a, .card .btn-g { margin-top: 16px; }
.grid-2 { display: grid; gap: 14px; }
.acc-next { overflow: hidden; border-color: rgba(15,164,122,.45); background: linear-gradient(160deg, rgba(8,122,88,.45), rgba(22,26,66,.88) 62%); }
.acc-next::before, .acc-next::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.acc-next::before { right: -44px; top: -44px; width: 170px; height: 170px; border: 1.5px dashed rgba(95,211,168,.35); }
.acc-next::after { right: 10px; top: 10px; width: 62px; height: 62px; border: 1.5px solid rgba(95,211,168,.25); }
.bar { height: 7px; margin: 16px 0 8px; border-radius: 7px; background: rgba(238,240,250,.08); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-fill), var(--accent-hover)); transition: width 1.2s var(--out) .3s;
}
.bar.ice i { background: linear-gradient(90deg, #4a78c9, var(--accent-ink)); }

/* первый экран кабинета: фото цели, приветствие, маршрут */
.hero-card {
  position: relative; overflow: hidden; margin-bottom: 14px; border-radius: var(--r-xl);
  border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow); animation: rise .7s var(--out) both;
}
.hero-photo { position: absolute; inset: 0; background: var(--img) center 40% / cover; transform: scale(1.12); animation: settle 2.4s var(--out) both; }
@keyframes settle { to { transform: scale(1); } }
.hero-card::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(14,17,48,.2) 0%, rgba(14,17,48,.5) 40%, rgba(14,17,48,.95) 100%);
}
.acc-hin { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 320px; padding: 20px; }
.acc-hin .stamp { align-self: flex-start; }
.acc-hin h1 { margin-top: auto; padding-top: 64px; font: 600 clamp(30px, 8vw, 46px)/1.05 var(--font-d); letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0,0,0,.45); }
.acc-hin p { margin: 10px 0 0; max-width: 46ch; color: #DDE1F5; }
.acc-hin p b { color: #fff; font-family: var(--font-d); font-size: 1.12em; }
.trip { display: flex; align-items: center; margin-top: 22px; }
.t-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.35); }
.t-dot.done { background: var(--accent); border-color: var(--accent); }
.t-dot.cur { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 5px rgba(15,164,122,.35); }
.t-dot.flag { display: grid; place-items: center; width: 26px; height: 26px; background: var(--amber); border-color: var(--amber); }
.t-dot.flag svg { width: 15px; height: 15px; fill: none; stroke: #3a2a05; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.t-line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 4px, transparent 4px 9px); transform-origin: left; animation: draw .8s var(--out) both; }
.t-line:nth-child(2) { animation-delay: .5s; } .t-line:nth-child(4) { animation-delay: .65s; } .t-line:nth-child(6) { animation-delay: .8s; } .t-line:nth-child(8) { animation-delay: .95s; }
@keyframes draw { from { transform: scaleX(0); } }
.t-line.done { background: var(--accent); }
.t-line.half { background: linear-gradient(90deg, var(--accent) 50%, rgba(255,255,255,.3) 50%); }
.trip-l { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted-2); }

/* Telegram-связка */
.tg-card {
  --i: 1;
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 16px;
  border-radius: var(--r-md); border: 1px solid rgba(42,171,238,.38);
  background: linear-gradient(120deg, rgba(42,171,238,.22), rgba(42,171,238,.06));
}
.tg-card .ic { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--tg); box-shadow: 0 8px 16px -8px rgba(4,5,22,.75); }
.tg-card .ic svg { width: 22px; height: 22px; fill: #fff; }
.tg-card p { margin: 2px 0 0; font-size: 14px; color: var(--muted-2); }
.tg-card .grow { flex: 1; min-width: 0; }
.tg-card .btn-tg { width: auto; min-height: 40px; padding: 0 14px; font-size: 14px; }
.tg-card.on { border-color: rgba(95,211,168,.38); background: linear-gradient(120deg, rgba(95,211,168,.17), rgba(95,211,168,.04)); }
.tg-card.on .ic { background: var(--accent-fill); box-shadow: 0 8px 16px -8px rgba(4,5,22,.75); }
.tg-card.on .ic::after { content: ''; position: absolute; inset: -4px; border-radius: 16px; border: 2px solid var(--ok); animation: ping .9s var(--out) both; }
@keyframes ping { from { opacity: 1; transform: scale(.8); } to { opacity: 0; transform: scale(1.5); } }

/* читаешь сейчас */
.read-card { padding: 0; overflow: hidden; display: grid; grid-template-columns: 96px 1fr; }
.read-photo { position: relative; background: var(--img) center / cover; }
.read-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, rgba(22,26,66,.92)); }
.read-in { padding: 20px 20px 20px 16px; }

/* покупки: тон по услуге */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: var(--r-md);
  background: rgba(26,31,74,.72); border: 1px solid var(--line); transition: transform .25s var(--out), background .25s;
}
.item:hover { transform: translateX(3px); background: rgba(34,40,88,.88); }
.thumb { position: relative; flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--tone-bg); }
.thumb.photo { background: var(--img) center / cover; }
.thumb > svg { width: 24px; height: 24px; fill: none; stroke: var(--tone); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.thumb .badge { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; background: var(--tone); border: 2px solid var(--bg-2); }
.thumb .badge svg { width: 12px; height: 12px; fill: none; stroke: #10151F; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.item .grow { flex: 1; min-width: 0; }
.item b { display: block; font-size: 15px; }
.item .tiny { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.item .tiny .pill { margin-right: 2px; }
.src svg { width: 13px; height: 13px; fill: currentColor; vertical-align: -2px; margin-right: 3px; }
.pill { flex: none; padding: 6px 10px; border-radius: 999px; font: 700 12px/1 var(--font); white-space: nowrap; color: var(--tone); background: var(--tone-bg); }
.pill::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.t-em { --tone: var(--ok); --tone-bg: var(--em-bg); }
.t-ice { --tone: var(--accent-ink); --tone-bg: var(--ice-bg); }
.t-amber { --tone: var(--amber); --tone-bg: var(--amber-bg); }
.t-coral { --tone: var(--coral); --tone-bg: var(--coral-bg); }

/* докупить: открытки */
.shop { display: grid; gap: 12px; }
.acc-offer {
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; gap: 12px; min-height: 128px; padding: 16px;
  border-radius: var(--r-lg); text-decoration: none; color: #fff; border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-lift);
}
.offer-bg { position: absolute; inset: 0; z-index: -2; background: var(--img) center / cover; transition: transform .8s var(--out); }
.acc-offer::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,17,48,.15), rgba(14,17,48,.92)); }
.acc-offer:hover .offer-bg { transform: scale(1.07); }
.acc-offer .grow { flex: 1; }
.acc-offer b { display: block; font: 600 16px/1.2 var(--font-d); }
.acc-offer .tiny { color: #CFD3EC; }
.acc-offer .price { padding: 7px 11px; border-radius: 12px; font: 600 15px/1 var(--font-d); white-space: nowrap; background: var(--tone); color: #0E1130; }

/* библиотека */
.books { display: grid; gap: 14px; }
.book { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: start; }
.book:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.cover {
  position: relative; overflow: hidden; aspect-ratio: 3/4; border-radius: 6px 14px 14px 6px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 10px 10px 10px 16px;
  background: var(--img) center / cover; box-shadow: 0 16px 24px -12px rgba(4,5,22,.9), inset 0 1px 0 rgba(255,255,255,.2);
  transform: perspective(500px) rotateY(-9deg); transition: transform .5s var(--out);
}
.book:hover .cover { transform: perspective(500px) rotateY(0); }
.cover::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,17,48,.05), rgba(14,17,48,.9)); }
.cover::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(255,255,255,.12)); }
.cover > * { position: relative; }
.cover span { align-self: flex-start; padding: 3px 6px; border-radius: 6px; font: 700 9.5px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: #10151F; background: var(--tone); }
.cover b { font: 600 13px/1.15 var(--font-d); }
.book h2 { margin-top: 2px; }
.book-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.book-acts .btn-a, .book-acts .btn-g { margin: 0; min-height: 42px; padding: 0 14px; font-size: 14px; }

/* разбор */
.orders-grid { display: grid; gap: 16px; align-items: start; }
.acc-steps { list-style: none; margin: 0; padding: 18px 18px 2px; border-radius: var(--r-lg); background: rgba(26,31,74,.6); border: 1px solid var(--line); }
.acc-steps li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding-bottom: 18px; }
.acc-steps li::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: repeating-linear-gradient(180deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.acc-steps li.done::before { background: var(--accent); }
.acc-steps li:last-child::before { display: none; }
.acc-steps .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--bg); color: var(--muted); }
.acc-steps .n svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-steps .done .n { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.acc-steps .cur .n { border-color: var(--accent); color: var(--ok); background: var(--em-bg); box-shadow: 0 0 0 5px rgba(15,164,122,.16); }
.acc-steps b { display: block; padding-top: 4px; }
.acc-steps .cur b { color: var(--ok); }
.acc-steps .tiny { display: block; }
.form-h, .form-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-h h2 { margin-top: 0; }
.form .bar { margin: 14px 0 4px; }
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ok); }
.saved i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.form-f { margin-top: 8px; flex-wrap: wrap; }
.form-f .btn-a { margin-top: 0; }
.acc-q { padding: 16px 0; border-top: 1px solid var(--line); }
.acc-q:first-child { border-top: 0; }
.acc-q label { display: block; font-weight: 700; margin-bottom: 10px; }
.acc-q label .tiny { display: block; font-weight: 500; margin-top: 2px; }
.acc-q textarea { min-height: 88px; padding: 12px 16px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(14,17,48,.4); cursor: pointer; font-weight: 600; font-size: 14px; transition: background .2s, border-color .2s; }
.chips button:hover { border-color: rgba(15,164,122,.6); }
.chips button[aria-pressed="true"] { background: linear-gradient(140deg, rgba(18,179,134,.38), rgba(8,122,88,.38)); border-color: var(--accent); color: #fff; }
.chips button.pop { animation: pop .35s var(--out); }
@keyframes pop { 40% { transform: scale(1.08); } }

/* чат */
.chat { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 60dvh; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(8,122,88,.24), transparent); }
.chat-h .tiny { display: block; }
.ava { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 14px/1 var(--font-d); background: var(--surface-2); }
.ava.ex { background: linear-gradient(140deg, var(--accent), var(--accent-fill)); }
.ava .on { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg-2); }
.msgs {
  flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 60dvh;
  background-image: radial-gradient(rgba(141,187,250,.09) 1px, transparent 1px); background-size: 18px 18px;
}
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; animation: bubble .45s var(--out) both; }
@keyframes bubble { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.msg .tiny { display: block; margin-top: 4px; font-size: 11px; }
.msg.in { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; transform-origin: left bottom; }
.msg.out { align-self: flex-end; background: linear-gradient(140deg, #10a57b, var(--accent-fill)); border-bottom-right-radius: 6px; transform-origin: right bottom; }
.msg.out .tiny { color: rgba(255,255,255,.78); }
.msg.fresh { box-shadow: 0 0 0 1px rgba(141,187,250,.45); }
.day { align-self: center; font-size: 12px; color: var(--muted-2); padding: 4px 10px; border-radius: 999px; background: rgba(14,17,48,.75); }
.send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.send .btn-a { width: 50px; padding: 0; flex: none; }

/* профиль */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 20px; }
.profile-head h1 { font: 600 30px/1.1 var(--font-d); }
.profile-head .muted { margin-top: 4px; }
.ava-xl {
  flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; font: 700 28px/1 var(--font-d);
  background: conic-gradient(from 210deg, var(--accent), var(--accent-ink), var(--coral), var(--amber), var(--accent));
  color: #0E1130; box-shadow: 0 14px 28px -14px rgba(4,5,22,.75); transform: rotate(-4deg);
}
.rows { padding: 4px 20px; --i: 1; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.row:first-child { border-top: 0; }
.row > span:first-child { color: var(--muted); }
.row b, .row a { text-align: right; }
.mini-flags { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
.mini-flags i { width: 24px; height: 24px; border-radius: 50%; background: var(--img) center / cover; border: 2px solid var(--bg-2); margin-left: -7px; }
.mini-flags i:first-child { margin-left: 0; }
.mini-flags a { margin-left: 8px; }
.prof-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.prof-actions .link { font-size: 14px; }

/* нижнее меню (телефон) */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 22px;
  background: rgba(14,17,48,.88); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.dock a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 0; border-radius: 16px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; transition: color .2s, background .3s var(--out); }
.dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--out); }
.dock a.is-on { color: #fff; background: linear-gradient(140deg, rgba(18,179,134,.32), rgba(8,122,88,.22)); }
.dock a.is-on svg { transform: translateY(-1px) scale(1.08); stroke: var(--ok); }
.dock .dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px rgba(14,17,48,.9); }

.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; background: #fff; color: #10151F; font-weight: 700; font-size: 14px;
  transition: opacity .25s, transform .35s var(--out); box-shadow: 0 16px 30px -12px rgba(4,5,22,.8);
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* пустые состояния и выбор страны */
.empty-card { text-align: left; }
.empty-card h2 { margin-top: 0; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pick button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(14,17,48,.5); cursor: pointer; font-weight: 600; }
.pick button:hover { border-color: var(--accent); }
.acc-offer { cursor: pointer; }

/* ---------- телефон ---------- */
@media (max-width: 767px) {
  .tg-card { flex-wrap: wrap; }
  .tg-card .btn-tg { width: 100%; }
}

/* ---------- планшет и компьютер ---------- */
@media (min-width: 768px) {
  .top { padding: 14px 32px; }
  .tabs { display: flex; gap: 4px; margin-left: 28px; }
  .tabs a { position: relative; padding: 10px 14px; border-radius: 12px; color: var(--muted-2); text-decoration: none; font-weight: 700; font-size: 15px; transition: color .2s, background .2s; }
  .tabs a:hover { color: #fff; background: rgba(238,240,250,.05); }
  .tabs a.is-on { color: #fff; }
  .tabs a.is-on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); animation: grow .4s var(--out); }
  .dock { display: none; }
  .acc-main { max-width: 1080px; padding: 32px 32px 64px; }
  .acc-hin { min-height: 360px; padding: 32px; }
  .grid-2 { grid-template-columns: 1.1fr 1fr; }
  .read-card { grid-template-columns: 130px 1fr; }
  .shop { grid-template-columns: repeat(3, 1fr); }
  .acc-offer { min-height: 180px; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .books { grid-template-columns: 1fr 1fr; }
  .book { grid-template-columns: 120px 1fr; }
  .card { padding: 24px; }
  .read-card { padding: 0; }
  .orders-grid { grid-template-columns: 300px 1fr; }
  .acc-steps { position: sticky; top: 90px; }
  .toast { bottom: 32px; }
}
@keyframes grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .rise, .hero-card, .hero-photo, .login-card, .pc, .msg, .t-line, .tg-card.on .ic::after, .chips button.pop, .tabs a.is-on::after { animation: none; }
  .hero-photo { transform: none; }
  .acc-shot, .bar i, .btn-a::after, .cover, .offer-bg { transition: none; }
}
