:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #101010;
  --surface-raised: #171717;
  --line: #292929;
  --text: #f6f6f3;
  --muted: #929292;
  --yellow: #ffe45c;
  --orange: #ff7845;
  --accent: linear-gradient(100deg, #ffe45c 0%, #ffbd42 48%, #ff7845 100%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  animation: page-in .45s ease-out both;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
main, .top { width: min(100%, 680px); margin: auto; }
.top {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 21px 8px;
}
.top-brand {
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -.045em;
  color: #fff;
}
.top-brand span {
  background: var(--accent);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}
.secure {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .15em;
  font-weight: 700;
}
.secure i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px #ffe45c88;
}
.hero {
  margin: 4px 16px 21px;
  min-height: 284px;
  padding: 64px 22px 26px;
  border-radius: 20px;
  background: #050505;
  border: 1px solid #171717;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  animation: hero-in .65s cubic-bezier(.2,.75,.25,1) both;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 230px;
  height: 130px;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, #ffbe4220 0%, #ff784510 42%, transparent 72%);
  filter: blur(12px);
  animation: glow-drift 7s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero-wordmark {
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(43px, 11vw, 76px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.085em;
  padding-right: .08em;
  background: var(--accent);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-size: 180% 100%;
  animation: wordmark-in .8s .12s cubic-bezier(.2,.75,.25,1) both, gradient-flow 9s 1s ease-in-out infinite alternate;
}
.hero-tagline {
  margin: 17px 0 20px;
  color: #d8d8d8;
  font-size: 9px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .08em;
}
.hero p {
  max-width: 320px;
  color: #c4c4c4;
  margin: 0 0 16px;
  font-size: 13px;
}
.locations { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.locations span {
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 99px;
  background: #111;
  border: 1px solid #292929;
  color: #dedede;
}
.tabs {
  display: flex;
  gap: 5px;
  margin: 0 16px;
  padding: 5px;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.tabs button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  flex: 1;
  padding: 10px 3px;
  font-weight: 700;
  font-size: 12px;
  transition: color .2s ease, background-color .2s ease, transform .18s ease;
}
.tabs button:active { transform: scale(.97); }
.tabs button.active { background: #24211a; color: var(--yellow); }
.sub-switch {
  position: relative;
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #101010;
  isolation: isolate;
}
.sub-switch button {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding: 9px 5px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  transition: color .2s ease, transform .18s ease;
}
.sub-switch button.active { color: var(--yellow); }
.sub-switch button:active { transform: scale(.97); }
.sub-switch-indicator {
  position: absolute;
  z-index: 0;
  inset: 4px auto 4px 4px;
  width: calc(50% - 2px);
  border-radius: 9px;
  background: #24211a;
  transition: transform .28s cubic-bezier(.2,.75,.25,1);
}
.sub-switch[data-active="pending"] .sub-switch-indicator { transform: translateX(100%); }
.count {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 5px;
  border-radius: 99px;
  background: #42351a;
  color: var(--yellow);
  font-size: 10px;
}
.sub-panel[hidden] { display: none !important; }
.sub-panel.panel-enter { animation: panel-enter .26s cubic-bezier(.2,.7,.25,1) both; }
.view { padding: 25px 20px 10px; }
.view-enter { animation: view-in .32s cubic-bezier(.2,.7,.25,1) both; }
.hidden { display: none !important; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin: 0 0 18px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--orange); }
.section-head h2, dialog h2 { font: 650 29px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 4px 0; letter-spacing: -.035em; }
.hint { font-size: 12px; color: var(--muted); }
.tiers { display: grid; gap: 10px; }
.tier {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color .24s ease, background-color .24s ease, transform .18s ease;
}
.tier:active, .period-options button:active, .card button:active, .danger:active { transform: scale(.98); }
.tier:hover { border-color: #65512c; }
.tier b { display: block; font-size: 16px; }
.tier small { color: var(--muted); display: block; }
.tier .icon {
  width: 38px;
  height: 38px;
  margin-right: 13px;
  display: grid;
  place-items: center;
  border: 1px solid #36312a;
  border-radius: 11px;
  color: var(--yellow);
}
.tier .row { display: flex; align-items: center; }
.tier.selected { border-color: #d7a849; background: #191610; }
.tier .check { width: 18px; height: 18px; border: 1px solid #626262; border-radius: 50%; transition: background-color .24s ease, border-color .24s ease, box-shadow .24s ease; }
.tier.selected .check { background: var(--accent); border-color: transparent; box-shadow: inset 0 0 0 4px #191610; }
.periods {
  display: grid;
  grid-template-rows: 1fr;
  margin: 16px 0 0;
  opacity: 1;
  transform: translateY(0);
  transition: grid-template-rows .32s cubic-bezier(.2,.75,.25,1),
    opacity .2s ease, transform .32s cubic-bezier(.2,.75,.25,1), margin .32s ease;
}
.periods.collapsed {
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transform: translateY(-7px);
  pointer-events: none;
}
.period-content { min-height: 0; overflow: hidden; }
.period-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 10px; }
.period-options button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 3px;
  color: var(--muted);
  font-size: 12px;
  transition: transform .18s ease, border-color .24s ease, background-color .24s ease, color .24s ease;
}
.period-options button.selected { background: #211d15; border-color: #d7a849; color: var(--yellow); }
.offer, .card { border: 1px solid var(--line); background: var(--surface); border-radius: 15px; padding: 18px; margin-bottom: 13px; }
.card { animation: item-in .34s cubic-bezier(.2,.7,.25,1) both; }
.offer { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.offer-summary { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.offer .primary { width: auto; flex: 0 0 auto; min-width: 104px; padding: 10px 13px; font-size: 13px; }
.offer b { font-size: 23px; letter-spacing: -.04em; }
.offer small { display: block; color: var(--muted); }
.primary {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #15110a;
  font-weight: 850;
  padding: 15px 18px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  transition: filter .2s ease, transform .18s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 0 #ffbd4200;
}
.primary:not(:disabled):hover { filter: brightness(1.06); box-shadow: 0 5px 24px #ffbd4218; }
.primary:not(:disabled):active { transform: scale(.985); filter: brightness(.96); }
.primary:disabled { opacity: .46; cursor: default; }
.text-button { display: block; border: 0; background: none; color: var(--yellow); padding: 17px; margin: auto; font-size: 13px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--muted); margin: 4px 0 14px; }
.card a { color: var(--yellow); overflow-wrap: anywhere; }
.card button { border: 1px solid #63502c; background: #211d15; color: #ffe58c; border-radius: 10px; padding: 9px 12px; }
.subscription-actions { display: flex; gap: 8px; margin-top: 10px; }
.subscription-actions button { flex: 1; min-width: 0; font-size: 12px; }
.subscription-actions button.review-done { border-color: var(--line); background: #151515; color: var(--muted); }
.subscription-actions button:disabled { cursor: default; opacity: .85; }
.status { font-size: 11px; color: var(--orange); text-transform: uppercase; letter-spacing: .1em; }
.quote { font-size: 14px; white-space: pre-wrap; }
.empty { color: var(--muted); padding: 28px 0; }
textarea { width: 100%; resize: vertical; min-height: 95px; background: #101010; color: white; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; }
.review { padding: 15px 0; border-bottom: 1px solid var(--line); }
.review:first-child { padding-top: 0; }
.review-stars { color: var(--yellow); font-size: 13px; letter-spacing: 2px; margin-bottom: 4px; }
.rating-picker { display: flex; gap: 6px; margin: 6px 0 10px; }
.rating-star { border: 0; padding: 0; background: transparent; color: #777; font-size: 30px; line-height: 1; }
.rating-star.selected { color: var(--yellow); }
#alert:not(:empty) { margin: 16px 20px 0; padding: 12px 14px; background: #211311; border: 1px solid #683a30; border-radius: 11px; color: #ffd5cc; font-size: 13px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 23px 16px 42px; }
footer a { color: var(--yellow); text-decoration: none; }
dialog { width: min(420px, calc(100% - 26px)); max-height: 90vh; overflow: auto; background: #111; border: 1px solid #3a3120; border-radius: 18px; color: var(--text); padding: 20px; box-shadow: 0 20px 90px #000d; }
dialog[open] { animation: dialog-in .24s cubic-bezier(.2,.75,.25,1) both; }
dialog::backdrop { background: #000c; animation: backdrop-in .2s ease-out both; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head button { border: 0; background: transparent; color: white; font-size: 27px; }
dialog p { color: var(--muted); }
#checkout-details { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 0 22px; color: var(--text); }
@media (max-width: 380px) {
  .hero { min-height: 260px; padding-inline: 14px; }
  .hero-wordmark { font-size: clamp(37px, 10.5vw, 46px); }
}
@media (min-width: 600px) {
  .hero { min-height: 320px; }
  .view { padding-left: 28px; padding-right: 28px; }
}
.danger { width:100%; border:1px solid #70392f; border-radius:12px; background:#21110f; color:#ffb2a4; font-weight:750; padding:13px 16px; margin-top:14px; }

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes wordmark-in { from { opacity: 0; transform: translateY(8px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes gradient-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes glow-drift { from { opacity: .45; transform: translate(-58%, -44%) scale(.9); } to { opacity: .85; transform: translate(-42%, -56%) scale(1.12); } }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes item-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panel-enter { from { opacity: 0; transform: translateX(9px); } to { opacity: 1; transform: translateX(0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

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

/* Keep the Mini App shell inside Telegram's visible viewport. */
html, body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
body {
  height: 100vh;
  height: 100dvh;
  position: fixed;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  overscroll-behavior: none;
  touch-action: pan-x;
}
.top { width: min(100%, 680px); flex: 0 0 48px; min-height: 48px; padding: 7px 18px 5px; }
main {
  width: min(100%, 680px);
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.hero {
  flex: 0 0 auto;
  height: clamp(72px, 9dvh, 86px);
  min-height: 0;
  margin: 3px 12px 8px;
  padding: 5px 12px;
  border-radius: 16px;
}
.hero-wordmark { font-size: clamp(36px, 9vw, 58px); }
.hero-tagline { margin: 5px 0 6px; font-size: 8px; }
.hero p { margin: 0 0 6px; font-size: 11px; line-height: 1.25; }
.locations { gap: 10px; }
.locations span { padding: 4px 10px; font-size: 25px; line-height: 1; }
.tabs { flex: 0 0 auto; margin: 0 12px; padding: 4px; }
.tabs button { padding: 8px 3px; }
#alert:not(:empty) { flex: 0 0 auto; margin: 7px 16px 0; padding: 7px 10px; }
.view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 12px 16px 4px;
}
#reviews-list { max-height: 42%; overflow: hidden; }
.review { padding: 7px 0; font-size: 12px; line-height: 1.35; }
.review-user-id { margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .02em; }
.review:nth-child(n+4) { display: none; }
.review-stars { margin-bottom: 2px; }
.review > div:last-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#reviews-list .empty { padding: 8px 0; }
#review-form .card { padding: 10px; }
#review-form h3 { font-size: 15px; margin-bottom: 4px; }
#review-form textarea { min-height: 58px; max-height: 84px; margin: 4px 0 7px; padding: 8px; font-size: 13px; }
#review-form .rating-picker { margin: 3px 0 5px; }
#review-form .rating-star { font-size: 25px; }
.danger { padding: 9px 12px; margin-top: 8px; }
.section-head { margin-bottom: 10px; }
.section-head h2 { font-size: 23px; }
.tiers { gap: 6px; }
.tier { min-height: 52px; padding: 7px 11px; border-radius: 12px; }
.tier .icon { width: 31px; height: 31px; margin-right: 9px; border-radius: 9px; }
.tier b { font-size: 14px; }
.tier small { font-size: 11px; }
.periods { margin-top: 12px; }
.period-options { gap: 5px; margin-top: 6px; }
.period-options button { min-height: 34px; padding: 6px 2px; font-size: 11px; }
.offer, .card { padding: 12px; margin-bottom: 8px; border-radius: 12px; }
.offer { margin-top: 12px; }
.offer b { font-size: 20px; }
.primary { min-height: 44px; padding: 11px 14px; }
.text-button { padding: 9px 12px; }
footer { flex: 0 0 auto; padding: 5px 12px 7px; font-size: 10px; }

@media (max-height: 700px) {
  .top { flex-basis: 40px; min-height: 40px; padding-top: 4px; padding-bottom: 3px; }
  .hero { height: clamp(62px, 8dvh, 72px); margin-bottom: 6px; }
  .hero-tagline, .hero p { display: none; }
  .locations span { padding: 3px 8px; font-size: 22px; }
  .view { padding-top: 8px; }
  .section-head { margin-bottom: 7px; }
  .periods { margin-top: 8px; }
  .offer, .card { padding: 9px 11px; margin-bottom: 6px; }
  .text-button { padding: 6px 10px; }
}
