/* ==========================================================
   Азовская Ривьера — мобильное приложение
   Дизайн-система: море, песок, закат
   ========================================================== */

:root {
  --bg: #f2f8f9;
  --surface: #ffffff;
  --surface-2: #f7fbfc;
  --ink: #0b2b33;
  --ink-soft: #2c4a52;
  --muted: #5b747c;
  --line: rgba(11, 43, 51, 0.08);
  --line-strong: rgba(11, 43, 51, 0.14);
  --sea-deep: #083e4a;
  --sea: #0e6e82;
  --azure: #17a2b8;
  --azure-soft: #e2f4f7;
  --sun: #ff8a3d;
  --sun-soft: #fff0e2;
  --gold: #e8a33d;
  --sand: #f4e4c4;
  --ok: #2e9e6b;
  --ok-soft: #e4f5ec;
  --danger: #c23b3b;
  --danger-soft: #fdeaea;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(8, 62, 74, 0.06);
  --shadow: 0 10px 30px rgba(8, 62, 74, 0.1);
  --shadow-lg: 0 22px 60px rgba(8, 62, 74, 0.18);
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 15% -10%, #dff1f4 0%, rgba(223, 241, 244, 0) 60%),
    radial-gradient(900px 500px at 100% 0%, #fff0dd 0%, rgba(255, 240, 221, 0) 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: var(--sea);
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Линейные иконки из SVG-спрайта */
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

/* ---------- Каркас ---------- */
#app {
  position: relative;
  min-height: 100vh;
}

.shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
}

@media (min-width: 560px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
      radial-gradient(circle at 20% 30%, rgba(23, 162, 184, 0.06) 0 2px, transparent 2px),
      radial-gradient(circle at 70% 70%, rgba(255, 138, 61, 0.05) 0 2px, transparent 2px);
    background-size: 46px 46px, 62px 62px;
  }
  .shell,
  .auth {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 30px 80px rgba(8, 62, 74, 0.08);
  }
}

/* ---------- Верхняя панель ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 12px) 18px 12px;
  background: linear-gradient(180deg, rgba(242, 248, 249, 0.96), rgba(242, 248, 249, 0.78));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

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

.appbar__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.appbar__h {
  margin: 2px 0 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appbar__back {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.15s ease;
}

.appbar__back:active {
  transform: scale(0.94);
}

.points-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff6e8, #ffe9cf);
  border: 1px solid rgba(232, 163, 61, 0.28);
  color: #8a5a12;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.points-chip:active {
  transform: scale(0.95);
}

.points-chip svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

/* ---------- Основной контент ---------- */
.view {
  padding: 0 18px 8px;
  animation: viewIn 0.28s ease both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section {
  margin: 26px 0 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section__link {
  font-size: 13px;
  font-weight: 700;
  color: var(--sea);
  padding: 2px;
}

/* ---------- Заголовок-герой ---------- */
.hero {
  position: relative;
  margin-top: 4px;
  border-radius: var(--radius-lg);
  padding: 22px 20px 20px;
  color: #fff;
  background:
    radial-gradient(120% 110% at 100% 0%, rgba(255, 196, 107, 0.55) 0%, rgba(255, 196, 107, 0) 48%),
    linear-gradient(135deg, #0a4453 0%, #0e6e82 52%, #1395a9 100%);
  box-shadow: 0 18px 44px rgba(8, 62, 74, 0.28);
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -46% -12%;
  height: 70%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.05), 0 0 0 58px rgba(255, 255, 255, 0.035);
  z-index: -1;
}

.hero__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero__logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.hero__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.hero__name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.hero__greet {
  margin: 16px 0 4px;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__sub {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.86);
  max-width: 30ch;
}

.hero__stats {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.hero__level {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero__level-name {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
}

.hero__level-title {
  margin: 1px 0 0;
  font-size: 18px;
  font-weight: 800;
}

.hero__points {
  text-align: right;
}

.hero__points b {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  color: #ffe1b5;
}

.hero__points span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.hero__bar {
  margin-top: 16px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.hero__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd08a, #ff8a3d);
  box-shadow: 0 0 12px rgba(255, 160, 80, 0.7);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero__bar-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.82);
}

.hero .ring__label {
  color: #ffe9cf;
}

/* ---------- Быстрые действия ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 4px 11px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick:active {
  transform: scale(0.96);
}

.quick__ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
}

.quick__ic svg {
  width: 20px;
  height: 20px;
}

.quick--sun .quick__ic {
  background: var(--sun-soft);
  color: #d76a1e;
}

.quick--sand .quick__ic {
  background: #fdf3df;
  color: #a97a20;
}

.quick--ok .quick__ic {
  background: var(--ok-soft);
  color: var(--ok);
}

.quick--plum .quick__ic {
  background: #efeaf9;
  color: #6b57a8;
}

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card--pad {
  padding: 16px;
}

/* Карточка предложения / услуги */
.offer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.offer:active {
  transform: scale(0.985);
}

.offer__ic {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #148094, #0b5f70);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.offer__ic--sun {
  background: linear-gradient(140deg, #ffab5c, #ed6f28);
}
.offer__ic--sand {
  background: linear-gradient(140deg, #d8a95c, #b07a24);
}
.offer__ic--ok {
  background: linear-gradient(140deg, #48b784, #22855b);
}
.offer__ic--plum {
  background: linear-gradient(140deg, #7b6bb3, #55478a);
}

.offer__ic svg {
  width: 26px;
  height: 26px;
}

.offer__media {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--sea-deep);
  box-shadow: 0 6px 16px rgba(8, 62, 74, 0.16);
}

.offer__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer__badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(5, 35, 43, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(4px);
}

.offer__badge svg {
  width: 15px;
  height: 15px;
}

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

.offer__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer__meta {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer__price {
  flex: 0 0 auto;
  text-align: right;
  font-weight: 800;
  font-size: 15px;
  min-width: 64px;
}

.offer__price small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1px;
}

.offers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Горизонтальная лента */
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.promo {
  position: relative;
  width: 240px;
  min-height: 132px;
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(140deg, #0c5a6a, #148fa3);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.promo--sun {
  background: linear-gradient(140deg, #ee7a2c, #f7ac4d);
}

.promo--sand {
  background: linear-gradient(140deg, #8d6a2f, #c39a51);
}

.promo--plum {
  background: linear-gradient(140deg, #54457f, #8272b8);
}

.promo::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 16px solid rgba(255, 255, 255, 0.12);
}

.promo__tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
}

.promo__title {
  margin: 10px 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  max-width: 16ch;
}

.promo__text {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 20ch;
}

/* ---------- Уровень ---------- */
.level-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffdf8, #fdf4e4);
  border: 1px solid rgba(232, 163, 61, 0.22);
}

.ring {
  position: relative;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
}

.ring svg {
  width: 74px;
  height: 74px;
  transform: rotate(-90deg);
}

.ring__bg {
  fill: none;
  stroke: rgba(232, 163, 61, 0.2);
  stroke-width: 7;
}

.ring__fg {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 11px;
  color: #8a5a12;
  line-height: 1.1;
}

.ring__label b {
  font-size: 16px;
}

.level-card__body {
  flex: 1;
  min-width: 0;
}

.level-card__kicker {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #8a5a12;
}

.level-card__title {
  margin: 3px 0 2px;
  font-size: 19px;
  font-weight: 800;
}

.level-card__text {
  margin: 0;
  font-size: 12.5px;
  color: #7c6537;
}

/* ---------- Значки ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  background: var(--azure-soft);
  color: var(--sea);
  white-space: nowrap;
}

.badge--sun {
  background: var(--sun-soft);
  color: #a94e10;
}
.badge--sand {
  background: #fbf1dc;
  color: #7f5a12;
}
.badge--ok {
  background: var(--ok-soft);
  color: #1f7a50;
}
.badge--muted {
  background: #eef3f4;
  color: #4f686f;
}
.badge--danger {
  background: var(--danger-soft);
  color: #a92c2c;
}
.badge svg {
  width: 13px;
  height: 13px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.975);
}

.btn svg {
  width: 19px;
  height: 19px;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #0d6c80, #148fa3);
  box-shadow: 0 10px 24px rgba(13, 108, 128, 0.3);
}

.btn--sun {
  color: #fff;
  background: linear-gradient(135deg, #f0782a, #ffa450);
  box-shadow: 0 10px 24px rgba(240, 120, 42, 0.3);
}

.btn--ghost {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
}

.btn--soft {
  background: var(--azure-soft);
  color: var(--sea);
}

.btn--danger-ghost {
  background: var(--danger-soft);
  color: #b33636;
}

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

.btn--sm {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn__row {
  display: flex;
  gap: 10px;
}

.btn__row > * {
  flex: 1;
}

/* ---------- Формы ---------- */
.field {
  display: block;
  margin-top: 14px;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field__label span {
  color: var(--muted);
  font-weight: 600;
}

.input,
.select,
textarea.input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-size: 15px;
}

textarea.input {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.input:focus,
.select:focus,
textarea.input:focus {
  border-color: var(--azure);
  box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.12);
}

.input::placeholder {
  color: #9bb0b6;
}

.input--error {
  border-color: #e18b8b;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.08);
}

.field__hint {
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
}

.field__error {
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--danger);
  font-weight: 600;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-icon {
  position: relative;
}

.input-icon .input {
  padding-left: 44px;
}

.input-icon > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}

.input-icon .input--pw {
  padding-right: 48px;
}

.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  opacity: 0.7;
  cursor: pointer;
}

.pw-toggle svg {
  width: 19px;
  height: 19px;
}

.pw-toggle.is-on {
  opacity: 1;
  color: var(--sea);
}

.auth__forgot {
  margin: 14px 0 0;
  text-align: center;
}

.auth__forgot button {
  padding: 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.auth__hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Сегменты */
.segmented {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: #e9f1f3;
}

.segmented button {
  flex: 1;
  height: 38px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(8, 62, 74, 0.1);
}

.segmented svg {
  width: 15px;
  height: 15px;
}

/* Чипы */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.chip.is-active {
  background: var(--sea-deep);
  border-color: var(--sea-deep);
  color: #fff;
}

.chip svg {
  width: 15px;
  height: 15px;
}

/* Счётчик */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 4px;
}

.stepper button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--sea);
}

.stepper button:active {
  background: var(--azure-soft);
}

.stepper button svg {
  width: 16px;
  height: 16px;
}

.stepper output {
  min-width: 34px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
}

/* Роль при регистрации */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role {
  position: relative;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  text-align: left;
  transition: all 0.16s ease;
}

.role.is-active {
  border-color: var(--azure);
  background: #f2fbfc;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.role__ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
  margin-bottom: 8px;
}

.role--sun .role__ic {
  background: var(--sun-soft);
  color: #c4601b;
}

.role__t {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.role__d {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}

.role__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: transparent;
  background: #fff;
}

.role.is-active .role__check {
  background: var(--azure);
  border-color: var(--azure);
  color: #fff;
}

.role__check svg {
  width: 11px;
  height: 11px;
}

/* ---------- Экран входа ---------- */
.auth {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(var(--safe-top) + 28px) 22px calc(var(--safe-bottom) + 28px);
  display: flex;
  flex-direction: column;
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth__logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.auth__brand-name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth__brand-sub {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth__hero {
  margin: 26px 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth__title {
  margin: 20px 0 6px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth__lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 34ch;
}

.auth__art {
  margin-top: 22px;
  border-radius: var(--radius-lg);
  padding: 18px;
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(255, 196, 107, 0.5), rgba(255, 196, 107, 0) 55%),
    linear-gradient(140deg, #0a4453, #0f7a8f);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.auth__art::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, 0.1);
}

.auth__art-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth__art-row + .auth__art-row {
  margin-top: 12px;
}

.auth__art-ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.auth__art-ic svg {
  width: 19px;
  height: 19px;
}

.auth__art-t {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.auth__art-d {
  margin: 1px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

.auth__form {
  margin-top: 22px;
}

.auth__switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth__switch button {
  color: var(--sea);
  font-weight: 800;
  padding: 4px;
}

.auth__legal {
  margin: 18px 0 0;
  font-size: 10.5px;
  color: #93a9af;
  text-align: center;
  line-height: 1.5;
}

.auth__download {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.auth__download-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.auth__download-ic {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--sun-soft);
  color: #c4601b;
}

.auth__download-ic svg {
  width: 19px;
  height: 19px;
}

.auth__download-head b {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
}

.auth__download-head small {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
}

/* ---------- Нижняя навигация ---------- */
.tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(8, 62, 74, 0.06);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 0 6px;
  border-radius: 12px;
  color: #5b747c;
  font-size: 10px;
  font-weight: 700;
  transition: color 0.18s ease;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.is-active {
  color: var(--sea);
}

.tab.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--azure);
}

.tab__dot {
  position: absolute;
  top: 6px;
  right: 50%;
  margin-right: -17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
  border: 1.5px solid #fff;
}

/* ---------- Нижний лист ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 32, 39, 0.44);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.24s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  transform: translateY(24px);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -20px 60px rgba(5, 32, 39, 0.25);
  overscroll-behavior: contain;
}

.sheet-backdrop.is-open .sheet {
  transform: none;
}

.sheet__grip {
  width: 44px;
  height: 4px;
  border-radius: 99px;
  background: #dbe6e8;
  margin: 4px auto 14px;
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.sheet__title {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef4f5;
  color: var(--muted);
  flex: 0 0 34px;
}

.sheet__close svg {
  width: 17px;
  height: 17px;
}

.sheet__text {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Итог / строки ---------- */
.summary {
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  padding: 14px;
  margin-top: 14px;
}

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 5px 0;
  color: var(--ink-soft);
}

.summary__row span:last-child {
  font-weight: 700;
  text-align: right;
}

.summary__row--total {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.summary__row--total span:last-child {
  font-size: 18px;
}

.summary__bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: #fff8ec;
  border: 1px solid rgba(232, 163, 61, 0.24);
  font-size: 12px;
  font-weight: 700;
  color: #8a5a12;
}

.summary__bonus svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
}

/* Контакты */
.contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.contact:last-child {
  border-bottom: 0;
}

.contact__ic {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
}

.contact__ic svg {
  width: 18px;
  height: 18px;
}

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

.contact__label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact__value {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
  word-break: break-word;
}

.contact__end {
  color: var(--muted);
  flex: 0 0 auto;
}

.contact__end svg {
  width: 16px;
  height: 16px;
}

.summary__row svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

/* ---------- Списки ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
}

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

.row__title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.row__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.row__end {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.row__end svg {
  width: 18px;
  height: 18px;
}

/* ---------- Уровни ---------- */
.level-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.level-item.is-current {
  border-color: rgba(23, 162, 184, 0.5);
  background: linear-gradient(135deg, #f4fcfd, #ecf8fa);
  box-shadow: 0 8px 26px rgba(8, 100, 118, 0.12);
}

.level-item.is-locked {
  background: #fbfcfc;
}

.level-item__medal {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ffe3b8, #f5b95c);
  color: #8a5a12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.level-item__medal svg {
  width: 24px;
  height: 24px;
}

.level-item:nth-child(2n) .level-item__medal {
  background: linear-gradient(140deg, #d7f1f5, #88cfdc);
  color: #0b6577;
}
.level-item:nth-child(3n) .level-item__medal {
  background: linear-gradient(140deg, #e3def7, #a99bdc);
  color: #4c3d85;
}
.level-item:nth-child(5n) .level-item__medal {
  background: linear-gradient(140deg, #f9d9d9, #e89999);
  color: #8d2c2c;
}

.level-item__body {
  flex: 1;
  min-width: 0;
}

.level-item__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.level-item__t {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.level-item__p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.level-item__perks {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.level-item__perks li {
  display: flex;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.level-item__perks svg {
  width: 13px;
  height: 13px;
  color: var(--ok);
  flex: 0 0 13px;
  margin-top: 2px;
}

.level-item__need {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 800;
  color: #8a5a12;
}

/* Задания */
.task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.task__check {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef4f5;
  color: #9db0b5;
}

.task__check.is-done {
  background: var(--ok-soft);
  color: var(--ok);
}

.task__check svg {
  width: 16px;
  height: 16px;
}

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

.task__t {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.task__d {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.task__pts {
  font-size: 12px;
  font-weight: 800;
  color: #8a5a12;
  white-space: nowrap;
}

.task__pts.is-done {
  color: #1f7a50;
}

/* ---------- Награды ---------- */
.reward {
  display: flex;
  gap: 13px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.reward__ic {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #fff1de, #ffd9ad);
  color: #b06c1c;
}

.reward__ic svg {
  width: 25px;
  height: 25px;
}

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

.reward__t {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
}

.reward__d {
  margin: 2px 0 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.reward__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reward__cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #8a5a12;
}

.reward__cost svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

.reward__cost.is-short {
  color: var(--muted);
}

/* ---------- Брони ---------- */
.booking {
  padding: 15px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.booking__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.booking__ic {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
}

.booking__ic--sun {
  background: var(--sun-soft);
  color: #c4601b;
}

.booking__ic svg {
  width: 21px;
  height: 21px;
}

.booking__title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.booking__sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.booking__price {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.booking__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line-strong);
}

.booking__code {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.booking__code b {
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}

.booking__actions {
  display: flex;
  gap: 6px;
}

.link-btn {
  font-size: 12px;
  font-weight: 800;
  color: var(--sea);
  padding: 6px 8px;
  border-radius: 8px;
}

.link-btn--danger {
  color: var(--danger);
}

/* ---------- Профиль ---------- */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(140deg, #effafb, #fdf6ea);
  border: 1px solid var(--line);
}

.avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, #0e6e82, #17a2b8);
  box-shadow: 0 8px 20px rgba(13, 108, 128, 0.25);
  letter-spacing: -0.02em;
}

.profile-head__name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.profile-head__meta {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.profile-head__badges {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.stat {
  padding: 13px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}

.stat b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-top: 2px;
}

.menu {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
}

.menu__item:last-child {
  border-bottom: 0;
}

.menu__item:active {
  background: var(--surface-2);
}

.menu__ic {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
}

.menu__ic svg {
  width: 17px;
  height: 17px;
}

.menu__text {
  flex: 1;
}

.menu__text small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1px;
}

.menu__end {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu__end svg {
  width: 16px;
  height: 16px;
}

.menu--danger .menu__item {
  color: var(--danger);
}

.menu--danger .menu__ic {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Переключатель */
.switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
  border-radius: 99px;
  background: #d7e3e6;
  transition: background 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch.is-on {
  background: var(--azure);
}

.switch.is-on::after {
  transform: translateX(18px);
}

/* ---------- Пустое состояние ---------- */
.empty {
  text-align: center;
  padding: 34px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
}

.empty__ic {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
}

.empty__ic svg {
  width: 27px;
  height: 27px;
}

.empty__t {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.empty__d {
  margin: 5px 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Детали услуги ---------- */
.detail-hero {
  position: relative;
  border-radius: var(--radius-lg);
  min-height: 190px;
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: linear-gradient(140deg, #0c5a6a, #148fa3);
  box-shadow: var(--shadow);
}

.detail-hero--sun {
  background: linear-gradient(140deg, #d9661f, #f7a24a);
}
.detail-hero--sand {
  background: linear-gradient(140deg, #7c5c27, #bf9550);
}
.detail-hero--ok {
  background: linear-gradient(140deg, #1f6b4c, #3fa87a);
}
.detail-hero--plum {
  background: linear-gradient(140deg, #4c3f78, #8272b8);
}

.detail-hero::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 24px solid rgba(255, 255, 255, 0.1);
}

.detail-hero--art {
  background-size: cover;
  background-position: center;
  text-shadow: 0 1px 14px rgba(4, 25, 31, 0.45);
}

.detail-hero--art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 25, 31, 0.06) 0%, rgba(4, 25, 31, 0.72) 100%);
  pointer-events: none;
}

.detail-hero--art > * {
  position: relative;
  z-index: 2;
}

.detail-hero__ic {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

.detail-hero__ic svg {
  width: 24px;
  height: 24px;
}

.detail-hero__tag {
  align-self: flex-start;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 8px;
}

.detail-hero__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
  position: relative;
}

.detail-hero__meta {
  margin: 8px 0 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.detail-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-hero__meta svg {
  width: 14px;
  height: 14px;
}

.detail-block {
  margin-top: 18px;
}

.detail-block__t {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.detail-block__p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-list li {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.feature-list svg {
  width: 16px;
  height: 16px;
  color: var(--ok);
  flex: 0 0 16px;
  margin-top: 1px;
}

.note {
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #fff8ec;
  border: 1px solid rgba(232, 163, 61, 0.22);
  font-size: 11.5px;
  color: #7c5a20;
  line-height: 1.4;
  margin-top: 12px;
}

.note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--gold);
  margin-top: 1px;
}

/* ---------- Тост ---------- */
.toast-root {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(8, 46, 56, 0.95);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.24s ease both;
}

.toast svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #7fe0c3;
}

.toast--error svg {
  color: #ff9c9c;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Успех ---------- */
.success {
  text-align: center;
  padding: 8px 4px 4px;
}

.success__ic {
  width: 76px;
  height: 76px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #b8f0d6, #34a878);
  color: #fff;
  box-shadow: 0 14px 30px rgba(46, 158, 107, 0.3);
  animation: pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.success__ic svg {
  width: 34px;
  height: 34px;
}

@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success__title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
}

.success__text {
  margin: 6px auto 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 30ch;
}

.code-box {
  margin: 18px 0 0;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px dashed rgba(232, 163, 61, 0.5);
  background: #fffbf3;
}

.code-box span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a5a12;
  font-weight: 800;
}

.code-box b {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  letter-spacing: 0.14em;
  color: var(--ink);
}

/* ---------- Мелкие утилиты ---------- */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ico-lg { width: 26px; height: 26px; }

/* Скелетоны */
.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, #eef4f5 25%, #f7fbfc 37%, #eef4f5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Доступность */
:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Скачать приложение ---------- */
.download-banner {
  margin-top: 18px;
  padding: 15px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7ea, #fdf1de);
  border: 1px solid rgba(232, 163, 61, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-banner__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-banner__ic {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #c4601b;
  box-shadow: 0 4px 12px rgba(232, 163, 61, 0.18);
}

.download-banner__ic svg {
  width: 22px;
  height: 22px;
}

.download-banner__body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.download-banner__body p {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #7c6537;
}

.download-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.download-banner__actions .btn {
  flex: 1 1 130px;
}

.download-banner__note {
  flex: 1 0 100%;
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.download-hero {
  border-radius: var(--radius-lg);
  padding: 24px;
  background:
    radial-gradient(110% 100% at 100% 0%, rgba(255, 196, 107, 0.45), rgba(255, 196, 107, 0) 55%),
    linear-gradient(135deg, #0a4453, #0f7a8f 60%, #17a2b8);
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.download-hero img {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  margin: 0 auto 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.download-hero h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.download-hero p {
  margin: 8px auto 0;
  max-width: 38ch;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.download-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.download-card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.download-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.download-card__ic {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--azure-soft);
  color: var(--sea);
}

.download-card__ic--sun {
  background: var(--sun-soft);
  color: #c4601b;
}

.download-card__ic svg {
  width: 24px;
  height: 24px;
}

.download-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.download-card__meta {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.download-card p {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 12px;
}

.download-steps {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.ios-how {
  margin: 2px 0 12px;
}

.ios-how summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--sea);
}

.ios-how summary::marker {
  color: var(--azure);
}

.ios-how .download-steps {
  margin-top: 10px;
}

@media (min-width: 760px) {
  .download-card--wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 600px) {
  .download-banner {
    flex-direction: row;
    align-items: center;
    padding: 16px 18px;
  }
  .download-banner__top {
    flex: 1;
  }
  .download-banner__actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
  }
  .download-banner__actions .btn {
    flex: 0 0 auto;
  }
  .download-options {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Планшет / десктоп ---------- */
@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }
  .shell {
    border-radius: 32px;
    overflow: hidden;
    min-height: calc(100vh - 48px);
  }
  .tabbar {
    bottom: 24px;
    border-radius: 22px;
    max-width: 512px;
    border: 1px solid var(--line);
  }
  .toast-root {
    bottom: 108px;
  }
}
