/* Thrill Mini App — светлая палитра: мягкий белый, бордо, пыльная роза.
 *
 * Фон #FBF9F9, поверхности #FFFFFF, акцент #6B1D2F, тёмный текст
 * #2E1A1E, подсказки #8C7A7A, линии #EAD8DA. Тени только мягкие,
 * с бордовым оттенком. Без золота, неона и цветных градиентов.
 */

:root {
  /* Холст — пастельный бордовый, поверхности — молочно-белые */
  --bg-canvas: #6e2337;
  --bg-surface: #fffdfb;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 253, 251, 0.8);

  /* Якоря бренда */
  --brand-maroon: #6b1d2f;
  --brand-maroon-hover: #7c2338;
  --brand-maroon-pressed: #571625;
  --brand-umber: #ddbec4;
  --brand-parchment: #ffffff;

  /* Текст */
  --text-primary: #2e1a1e;
  --text-secondary: #8c7a7a;
  --text-muted: #6f4e55;

  /* Линии */
  --border-subtle: #ddbec4;
  --border-focus: #6b1d2f;
  --border-maroon: #6b1d2f;

  /* Тени: только мягкие, с бордовым оттенком */
  --shadow-soft: 0 2px 12px rgba(107, 29, 47, 0.1);

  /* Статусы */
  --status-online: #4a9e6d;
  --status-busy: #b85d3b;
  --status-danger: #b32626;

  --radius-card: 20px;
  --radius-control: 14px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --ease-enter: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-exit: cubic-bezier(0.55, 0.06, 0.68, 0.19);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  padding: calc(var(--safe-top) + 10px) 0
    calc(var(--safe-bottom) + 96px);
  max-width: 560px;
  margin: 0 auto;
  /* Колода выходит за поля экрана, чтобы карточки «подглядывали» по
     краям. Без этого страница получает горизонтальный скролл. */
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-canvas);
}

/* --------------------------------------------------------- верхняя панель */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  margin-bottom: 10px;
}

.brand {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fffdfb;
  text-align: center;
}

.top-spacer {
  min-width: 82px;
}

.age-mark {
  justify-self: end;
  padding: 4px 10px;
  border: 1px solid rgba(255, 253, 251, 0.25);
  border-radius: 999px;
  color: rgba(255, 253, 251, 0.62);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* Язык: сегментированная капсула. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-self: start;
  padding: 2px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
}

.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 200ms var(--ease-enter),
    color 200ms var(--ease-enter);
}

.lang-switch button.active {
  background: var(--brand-maroon);
  color: #ffffff;
}

/* --------------------------------------------------------------- экраны */
.screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px;
  animation: screen-in 350ms var(--ease-enter) both;
}

.screen.hidden {
  display: none;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------- горизонтальная колода */
.deck {
  --card-w: min(76vw, 320px);
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Отступы ровно такие, чтобы активная карточка стояла по центру. */
  padding: 4px calc((100% - var(--card-w)) / 2);
  scrollbar-width: none;
  scroll-padding-inline: calc((100% - var(--card-w)) / 2);
}

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

.card {
  position: relative;
  flex: 0 0 var(--card-w);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform: scale(0.92) translateY(8px);
  opacity: 0.45;
  filter: blur(1.5px);
  transition: transform 350ms var(--ease-enter),
    opacity 350ms var(--ease-enter), filter 350ms var(--ease-enter),
    border-color 350ms var(--ease-enter);
}

.card.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  filter: blur(0);
  border-color: var(--brand-maroon);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 500ms var(--ease-enter);
}

.card img.loaded {
  opacity: 1;
}

.card-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Затемняющий скрим снизу: имя и цена читаются на любом кадре. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #fffdfb 0%,
    rgba(255, 253, 251, 0.9) 16%,
    rgba(255, 253, 251, 0) 48%
  );
  pointer-events: none;
}

.card-info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-rating {
  appearance: none;
  align-self: flex-start;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.card-rating:hover {
  color: var(--brand-maroon);
}

.card-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

.card-price {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ------------------------------------------------------------ индикаторы */
.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 4px;
}

.dot {
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 253, 251, 0.28);
  transition: width 300ms var(--ease-enter),
    background-color 300ms var(--ease-enter);
}

.dot.active {
  width: 16px;
  background: #fffdfb;
}

/* ------------------------------------------------- параметры (bento) */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bento.swap {
  animation: bento-swap 260ms var(--ease-enter) both;
}

@keyframes bento-swap {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  45% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.param-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.param-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
}

.param-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------ главная CTA */
.cta {
  appearance: none;
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-control);
  background: var(--brand-maroon);
  color: var(--brand-parchment);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background-color 250ms var(--ease-enter),
    transform 200ms var(--ease-enter), opacity 250ms var(--ease-enter);
}

.cta:hover {
  background: var(--brand-maroon-hover);
}

.cta:active {
  background: var(--brand-maroon-pressed);
  transform: scale(0.97);
}

.cta[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* CTA на витрине — «жидкое стекло»: сквозь молочно-кремовую поверхность
   чуть виден бордовый холст, по кнопке медленно идёт широкий блик.
   Внутри блика стекло почти белое, вне его — прозрачнее и розовее:
   кнопка переливается, а не выглядит белой плашкой. */
#screen-showcase .cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--brand-maroon);
  border: 1px solid rgba(255, 253, 251, 0.55);
  background-color: rgba(255, 253, 251, 0.68);
  background-image: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 249, 242, 0.55) 22%,
    rgba(255, 253, 251, 0.25) 46%,
    rgba(255, 255, 255, 0.65) 68%,
    rgba(255, 249, 242, 0.5) 100%
  );
  background-size: 240% 100%;
  background-repeat: no-repeat;
  background-position: 0% 50%;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(46, 26, 30, 0.08),
    0 12px 26px rgba(46, 26, 30, 0.22);
  animation:
    cta-drift 7s ease-in-out infinite alternate,
    cta-breathe 9s ease-in-out infinite alternate;
}

/* Блик: широкий белый свет идёт по стеклу, а перед ним и за ним —
   прозрачные участки, где виден бордовый холст. Это и есть «перелив». */
#screen-showcase .cta::before {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 58%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 26%,
    rgba(255, 255, 255, 0.92) 44%,
    rgba(255, 253, 251, 0.6) 52%,
    rgba(107, 29, 47, 0.2) 58%,
    rgba(255, 255, 255, 0.35) 66%,
    rgba(255, 255, 255, 0) 84%
  );
  transform: translateX(-165%) skewX(-12deg);
  animation: cta-sheen 6.4s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}

#screen-showcase .cta:hover {
  filter: brightness(1.04);
}

#screen-showcase .cta:active {
  transform: scale(0.97);
  filter: brightness(0.98);
}

#screen-showcase .cta[disabled] {
  color: var(--brand-maroon);
  opacity: 0.55;
  animation: none;
}

#screen-showcase .cta[disabled]::before {
  animation: none;
  opacity: 0;
}

@keyframes cta-drift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

/* Дыхание прозрачности: стекло то плотнее, то прозрачнее. */
@keyframes cta-breathe {
  from {
    background-color: rgba(255, 253, 251, 0.64);
  }
  to {
    background-color: rgba(255, 253, 251, 0.88);
  }
}

@keyframes cta-sheen {
  0% {
    transform: translateX(-160%) skewX(-12deg);
  }
  42%,
  100% {
    transform: translateX(360%) skewX(-12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #screen-showcase .cta {
    animation: none;
  }

  #screen-showcase .cta::before {
    animation: none;
    opacity: 0;
  }
}

.cta:focus-visible,
.ghost:focus-visible,
.danger:focus-visible,
.tab:focus-visible,
.lang-switch button:focus-visible,
.pay-value:focus-visible,
.pay-amount:focus-visible,
.order-again:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* --------------------------------------------------------- вторичные кнопки */
.ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--brand-umber);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 250ms var(--ease-enter),
    border-color 250ms var(--ease-enter), transform 200ms var(--ease-enter);
}

.ghost:hover {
  background: rgba(107, 29, 47, 0.05);
}

.ghost:active {
  transform: scale(0.97);
}

.ghost.wide {
  width: 100%;
}

/* Вторичные кнопки на бордовом холсте: тёмный текст там не виден. */
#screen-showcase .ghost,
#screen-empty .ghost {
  color: #fffdfb;
  border-color: rgba(255, 253, 251, 0.35);
}

#screen-showcase .ghost:hover,
#screen-empty .ghost:hover {
  background: rgba(255, 253, 251, 0.1);
}

.danger {
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(179, 38, 38, 0.55);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--status-danger);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 250ms var(--ease-enter),
    transform 200ms var(--ease-enter);
}

.danger:hover {
  background: rgba(179, 38, 38, 0.08);
}

.danger:active {
  transform: scale(0.97);
}

.danger[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* --------------------------------------------------------- нижняя навигация */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px calc(var(--safe-bottom) + 8px);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
}

.tab {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 132px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: color 200ms var(--ease-enter);
}

.tab::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background-color 200ms var(--ease-enter);
}

.tab.active {
  color: var(--brand-maroon);
}

.tab.active::after {
  background: var(--brand-maroon);
}

/* --------------------------------------------------------------- покупки */
.title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Заголовок «Моих покупок» лежит на бордовом фоне, а не на карточке. */
#screen-my .title {
  color: #fffdfb;
}

.orders {
  display: flex;
  flex-direction: column;
}

.order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  margin-bottom: 8px;
}

.order-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.order-alias {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-date {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid var(--brand-umber);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.order-again {
  flex: 0 0 auto;
  appearance: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--brand-umber);
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 250ms var(--ease-enter),
    transform 200ms var(--ease-enter);
}

.order-again:hover {
  background: rgba(107, 29, 47, 0.05);
}

.order-again:active {
  transform: scale(0.97);
}

.row-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

/* ---------------------------------------------------------------- пусто */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 64px 16px 32px;
  text-align: center;
}

.empty-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 253, 251, 0.45);
}

.empty h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fffdfb;
}

.empty p {
  margin: 0 0 12px;
  max-width: 30ch;
  font-size: 14px;
  color: rgba(255, 253, 251, 0.65);
}

/* ------------------------------------------------------- подтверждение */
.confirm-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.confirm-ornament {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-muted);
}

.confirm-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.confirm-warn {
  margin: 0;
  padding: 12px 14px;
  border-left: 2px solid var(--status-danger);
  border-radius: 0 8px 8px 0;
  background: rgba(179, 38, 38, 0.08);
  font-size: 13px;
  color: var(--status-danger);
}

.confirm-warn.hidden {
  display: none;
}

/* --------------------------------------------------------------- тост */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + 12px);
  transform: translate(-50%, -10px);
  max-width: min(88vw, 400px);
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-soft);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-enter),
    transform 300ms var(--ease-enter);
  z-index: 30;
}

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

/* --------------------------------------------------------- экран оплаты */
.pay-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.pay-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pay-asset {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.pay-network {
  padding: 3px 8px;
  border: 1px solid var(--brand-umber);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 400;
}

.pay-amount {
  width: 100%;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: left;
  cursor: pointer;
  transition: transform 200ms var(--ease-enter);
}

.pay-amount:active {
  transform: scale(0.97);
}

.pay-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pay-row.hidden {
  display: none;
}

.pay-label {
  color: var(--text-secondary);
  font-size: 12px;
}

.pay-value {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  word-break: break-all;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: border-color 250ms var(--ease-enter),
    transform 200ms var(--ease-enter);
}

.pay-value:hover {
  border-color: var(--border-focus);
}

.pay-value:active {
  transform: scale(0.97);
}

.pay-hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 253, 251, 0.65);
}

.kicker-rule {
  flex: 1;
  height: 1px;
  background: rgba(255, 253, 251, 0.2);
}

/* ------------------------------------------------ отзывы о модели */
/* Шторку можно тянуть за шапку: от компактной до почти всего экрана,
   а смахивание вниз до конца закрывает её. */
.reviews-card {
  height: 62vh;
  max-height: calc(100dvh - 12px);
  transition: height 260ms var(--ease-enter);
}

.reviews-card.full {
  height: calc(100dvh - 12px);
}

.reviews-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 6px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.reviews-head:active {
  cursor: grabbing;
}

.reviews-score {
  color: var(--text-secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.review-item {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
}

.review-item.own {
  border-color: var(--brand-maroon);
}

.review-own {
  margin-bottom: 4px;
  color: var(--brand-maroon);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.review-stars {
  color: var(--brand-maroon);
  font-size: 13px;
  letter-spacing: 2px;
}

.review-item-text {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.review-item-date {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.review-empty {
  margin: 0;
  padding: 14px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.review-hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.review-hint.hidden {
  display: none;
}

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

.review-form.hidden {
  display: none;
}

.rating-picker {
  display: flex;
  gap: 6px;
}

.rating-picker button {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--brand-maroon);
  font-size: 17px;
  cursor: pointer;
  transition: background-color 200ms var(--ease-enter),
    color 200ms var(--ease-enter), border-color 200ms var(--ease-enter);
}

.rating-picker button.active {
  background: var(--brand-maroon);
  border-color: var(--brand-maroon);
  color: #ffffff;
}

.review-input {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

.review-input::placeholder {
  color: var(--text-muted);
}

.review-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ------------------------------------------------ нижняя шторка */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 0 0;
  background: rgba(46, 26, 30, 0.35);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: sheet-backdrop 300ms var(--ease-enter) both;
}

.sheet.hidden {
  display: none;
}

@keyframes sheet-backdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  padding: 26px 18px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--brand-umber);
  border-radius: 24px 24px 0 0;
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-soft);
  animation: sheet-up 350ms var(--ease-enter) both;
}

/* Ручка для закрытия сверху. */
.sheet-card::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 999px;
  background: var(--text-muted);
}

@keyframes sheet-up {
  from {
    transform: translateY(28px);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.sheet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: border-color 250ms var(--ease-enter),
    background-color 250ms var(--ease-enter), transform 200ms var(--ease-enter);
}

.sheet-option:hover {
  border-color: var(--border-focus);
}

.sheet-option:active {
  transform: scale(0.97);
}

.sheet-option .sheet-note {
  color: var(--text-muted);
  font-size: 12px;
}

/* Витрина занимает экран между шапкой и таб-баром: CTA прижата к низу,
   чтобы до неё доставал большой палец. */
#screen-showcase {
  min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 158px);
}

#screen-showcase .cta {
  margin-top: auto;
}

/* --------------------------------------------------------- узкие экраны */
@media (max-width: 360px) {
  .deck {
    --card-w: min(80vw, 300px);
  }

  .bento {
    gap: 6px;
  }

  .param-card {
    padding: 8px 10px;
  }
}

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