: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 {
  width: 36px;
  height: 29px;
  display: flex;
  align-items: center;
}
.top-brand .sy-logo {
  display: block;
  width: 36px;
  height: 29px;
  object-fit: contain;
}
.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;
}
.tabs .messages-tab { position: relative; flex: 0 0 40px; display: grid; place-items: center; padding: 8px 6px; }
.messages-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.messages-tab.active svg { color: var(--yellow); }
.inbox-count { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; background: var(--orange); color: #160d08; font-size: 9px; line-height: 1; font-weight: 850; }
.notification { position: relative; padding: 12px 38px 12px 0; border-bottom: 1px solid var(--line); }
.notification.unread { border-left: 2px solid var(--yellow); padding-left: 10px; }
.notification-delete { position: absolute; top: 8px; right: 0; width: 34px; height: 34px; border: 0; border-radius: 9px; background: #24211a; color: var(--muted); font-size: 23px; line-height: 1; display: grid; place-items: center; }
.notification-delete:active { color: var(--yellow); background: #352b17; }
.notification-delete:disabled { opacity: .4; }
.notification:last-child { border-bottom: 0; }
.notification h3 { margin: 0 0 3px; font-size: 14px; }
.notification p { margin: 0; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notification time { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.admin-grid .card { margin: 12px 0; }
.admin-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.admin-grid input,.admin-grid textarea,#checkout-promo { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0a0a0a; color: var(--text); }
.admin-grid textarea { min-height: 90px; resize: vertical; margin: 8px 0; }
.admin-item { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; overflow-wrap: anywhere; }
.admin-item small { display: block; color: var(--muted); margin: 3px 0; }
.admin-item button,.promo-row button { padding: 7px 10px; margin: 5px 5px 0 0; background: #24211a; color: var(--yellow); border: 1px solid #6a5426; border-radius: 8px; }
.promo-row { display: flex; align-items: center; gap: 8px; }
#promo-box { margin: 0 0 14px; }
#promo-box label,#promo-result { display: block; margin: 5px 0; color: var(--muted); }
.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 .icon { flex: 0 0 auto; box-sizing: border-box; }
.tier .tier-star { display: block; width: 19px; height: 19px; flex: none; }
.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; text-align: center; justify-content: center; align-items: center; }
.payment-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.payment-method {
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  font-size: 23px;
  line-height: 1;
  font-weight: 850;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.payment-rubles { width: auto; min-width: 92px; padding: 0 16px; border: 0; background: var(--accent); color: #181008; font-size: 13px; }
.payment-method:not(:disabled):active { transform: scale(.94); filter: brightness(.96); }
.payment-method:disabled { cursor: default; opacity: .46; }
.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; }
.trial-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 54px; margin: 12px 0 0; padding: 8px 14px; border: 1px solid #d8a744; border-radius: 12px; background: #221b0c; color: var(--yellow); font-weight: 800; font-size: 14px; transition: transform .18s ease, border-color .18s ease, background-color .18s ease; }
.trial-button small { font-size: 11px; font-weight: 600; color: #e9d9a0; }
.trial-button:not(:disabled):active { transform: scale(.985); background: #342710; }
.trial-button:disabled { border-color: var(--line); background: #111; color: var(--muted); cursor: default; }
.trial-button:disabled small { color: var(--muted); }
.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; }
.traffic-usage { margin: 16px 0 12px; }
.traffic-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; color: var(--muted); font-size: 12px; }
.traffic-label b { color: var(--text); font-size: 13px; font-weight: 750; text-align: right; }
.traffic-track { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #292929; }
.traffic-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--yellow),var(--orange)); transition: width .25s ease; }
.traffic-usage.unlimited { color: var(--muted); font-size: 12px; margin: 10px 0 12px; }
.incy-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 44px; margin-top: 9px; border: 1px solid #285b31; border-radius: 10px; background: #0d2115; color: #eaffeb !important; font-size: 13px; font-weight: 750; text-decoration: none; }
.incy-button img { width: 23px; height: 23px; display: block; border-radius: 6px; object-fit: cover; }
.incy-button:active { transform: scale(.985); }
.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: 14px 16px 20px; }
footer a { color: var(--yellow); text-decoration: none; }
.legal-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 7px; }
.legal-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal-links button { border: 0; padding: 0; background: transparent; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.support-line { line-height: 1.4; }
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); }
.instruction-steps { color: var(--muted); padding-left: 21px; margin: 12px 0 18px; }
.instruction-steps li { padding-left: 3px; margin: 0 0 10px; }
#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;
}
body.admin-scroll { touch-action: pan-y; }
.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;
  touch-action: pan-x;
}
#admin { overflow-x: hidden; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
#reviews-list, #notifications-list { max-height: 70%; overflow: auto; scrollbar-width: none; }
.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; }
.legal-links { gap: 3px 10px; margin-bottom: 3px; }

@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; }
}


/* Launch screen stays in place until Telegram state has loaded. */
#subscription { overflow-x: hidden; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.app-loading .top, .app-loading main { visibility: hidden; }
.startup {
  position: fixed;
  z-index: 1000;
  inset: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #050505;
  color: #f6f6f3;
  text-align: center;
  transition: opacity .3s ease, visibility .3s ease;
}
.startup.finished { opacity: 0; visibility: hidden; pointer-events: none; }
.startup-inner { width: min(100%, 290px); display: flex; flex-direction: column; align-items: center; }
.startup-brand {
  width: 112px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.startup-brand .sy-logo {
  display: block;
  width: 112px;
  height: 80px;
  object-fit: contain;
}
.startup-spinner {
  width: 36px;
  height: 36px;
  margin-top: 30px;
  border: 2px solid #332c1f;
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: startup-spin .8s linear infinite;
}
.startup p { margin: 15px 0 0; color: var(--muted); font-size: 13px; }
.startup button { margin-top: 16px; padding: 10px 16px; border: 1px solid #6a5426; border-radius: 10px; background: #24211a; color: var(--yellow); }
@keyframes startup-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .startup-spinner { animation-duration: 2s; } .startup { transition: none; } }

#bonuses { overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; }

/* syrax-bonuses-compact-v1 */

/* syrax-loyalty-purchase-fix-v1 */
.offer-prices { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; }
.offer-prices b.original-price { color:var(--muted); text-decoration:line-through; text-decoration-thickness:1px; font-size:13px; font-weight:600; }
.offer-prices b.discounted-price { color:var(--yellow); font-size:18px; }
.offer-prices b.discounted-price:empty { display:none; }

/* Subscription actions share one font scale and weight on phones. */
.card .subscription-actions button, .card button.incy-button, .card button.danger {
  font-family: inherit; font-size: 14px; font-weight: 750; line-height: 1.25;
}
.card button.incy-button { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; min-height:44px; margin-top:9px; background:#0d2115; color:#eaffeb; border:1px solid #285b31; }
.incy-help { max-width:min(90vw,420px); padding:22px; border:1px solid #514522; border-radius:16px; background:#111; color:#fff; }
.incy-help::backdrop { background:#000b; }
.incy-help h2 { margin:0 0 12px; font-size:20px; }
.incy-help p { line-height:1.5; }
.incy-help input { width:100%; box-sizing:border-box; padding:12px; margin:8px 0; border:1px solid #555; border-radius:8px; background:#222; color:#fff; }
.incy-help button { width:100%; margin-top:9px; padding:12px; border-radius:9px; border:1px solid #6e592b; background:#211d15; color:#ffe58c; font:inherit; font-size:14px; font-weight:750; }

.card .subscription-actions button, .card button.incy-button, .card button.danger { font-family:inherit; font-size:14px; font-weight:750; line-height:1.25; }
.card button.incy-button { display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:44px;margin-top:9px;background:#0d2115;color:#eaffeb;border:1px solid #285b31; }

/* Payment dialog: matched entry and exit with a soft backdrop fade. */
#checkout[open]:not(.checkout-closing) { animation: checkout-in .3s cubic-bezier(.16,1,.3,1) both; }
#checkout[open]:not(.checkout-closing)::backdrop { animation: checkout-backdrop-in .3s ease both; }
#checkout.checkout-closing { animation: checkout-out .2s ease-in both; }
#checkout.checkout-closing::backdrop { animation: checkout-backdrop-out .2s ease-in both; }
@keyframes checkout-in { from { opacity:0; transform:translateY(20px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes checkout-out { from { opacity:1; transform:translateY(0) scale(1); } to { opacity:0; transform:translateY(12px) scale(.985); } }
@keyframes checkout-backdrop-in { from { background:#0000; } to { background:#000c; } }
@keyframes checkout-backdrop-out { from { background:#000c; } to { background:#0000; } }
@media (prefers-reduced-motion: reduce) { #checkout[open], #checkout::backdrop { animation-duration:.01ms !important; } }

/* Syrax light interface — shares the website's paper, ink and acid accent. */
:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --line: #dedfd9;
  --text: #151613;
  --muted: #74776f;
  --yellow: #bcf53a;
  --orange: #5f7d25;
  --accent: #bcf53a;
}
body { background: var(--bg); color: var(--text); }
.top-brand .sy-logo, .startup-brand .sy-logo { filter: none; }
.secure i { background: #80d64e; box-shadow: 0 0 9px #80d64e66; }
.messages-tab.active svg, .sub-switch button.active, .text-button, .card a, footer a { color: #526b1d; }
.hero { background: #ffffff; border-color: var(--line); }
.hero::before { background: radial-gradient(ellipse, #bcf53a24 0%, transparent 70%); }
.hero-wordmark { background: none; color: var(--text); -webkit-text-fill-color: var(--text); }
.hero-tagline, .hero p { color: #5f635c; }
.locations span { background: #f7f7f3; border-color: var(--line); color: var(--text); }
.tabs, .sub-switch { background: #f0f1ec; border-color: var(--line); }
.tabs button.active, .sub-switch-indicator { background: #ffffff; color: var(--text); box-shadow: 0 1px 3px #15161312; }
.count { background: #dcecb8; color: #2d3d11; }
.eyebrow { color: #5f7d25; }
.tier, .period-options button, .offer, .card { background: #ffffff; border-color: var(--line); color: var(--text); }
.tier:hover { border-color: #a4c669; }
.tier .icon { border-color: #d8dbd2; color: #526b1d; }
.tier.selected { border-color: #9cc64a; background: #f4fae9; }
.tier {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.tier:active { transform: none; }
.tier.selected .check { background: var(--accent); box-shadow: inset 0 0 0 4px #f4fae9; }
.period-options button.selected { background: #f4fae9; border-color: #9cc64a; color: #354a11; }
.primary, .payment-rubles { background: var(--accent); color: #11140e; box-shadow: none; }
.primary:not(:disabled):hover { box-shadow: 0 5px 20px #bcf53a44; }
.trial-button { border-color: #a4c669; background: #f4fae9; color: #354a11; }
.trial-button small { color: #697951; }
.trial-button:not(:disabled):active { background: #e8f5cf; }
.trial-button:disabled { background: #f0f1ec; }
.card button, .admin-item button, .promo-row button { border-color: #cfd4c4; background: #f6f8f1; color: #405819; }
.subscription-actions button.review-done { background: #f0f1ec; }
.traffic-track { background: #e2e5dd; }
.traffic-fill { background: var(--accent); }
.incy-button, .card button.incy-button { background: #eff8e9; border-color: #b9d9a9; color: #245a31 !important; }
textarea, .admin-grid input, .admin-grid textarea, #checkout-promo, .incy-help input { background: #ffffff; color: var(--text); border-color: var(--line); }
#alert:not(:empty) { background: #fff0eb; border-color: #f0b9aa; color: #7f3120; }
dialog, .incy-help { background: #ffffff; color: var(--text); border-color: var(--line); box-shadow: 0 20px 65px #15161322; }
.dialog-head button { color: var(--text); }
.incy-help { color: var(--text); }
.danger { background: #fff0ed; border-color: #efb4a9; color: #9a3123; }
.startup { background: #f7f7f3; color: var(--text); }
.startup-spinner { border-color: #dfe4d6; border-top-color: var(--yellow); }
.startup button { border-color: #a4c669; background: #f4fae9; color: #354a11; }
