:root {
  color-scheme: light;
  --bg: #fbfdff;
  --surface: rgba(255, 255, 255, 0.74);
  --ink: #171922;
  --muted: #687082;
  --line: rgba(76, 86, 107, 0.14);
  --blue: #4ea7ff;
  --tg-blue: #229ed9;
  --tg-blue-dark: #1a8fd1;
  --shadow: 0 24px 70px rgba(40, 67, 110, 0.14);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(126, 214, 255, 0.34), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(255, 153, 205, 0.34), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(146, 125, 255, 0.22), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 58%, #fff7fb 100%);
}

button, a, input { font: inherit; }
button { appearance: none; }
h1, h2, h3, p { margin-top: 0; }

.tiktok-only { display: none; }
.is-tiktok-webview .tiktok-only { display: block; }

.page-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.page-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.5), transparent 42%),
    radial-gradient(circle at 78% 34%, rgba(112, 226, 194, 0.2), transparent 20%);
}

.profile-panel,
.browser-note,
.quick-card,
.card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.profile-panel {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
}

.brand-logo {
  width: 82px;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  box-shadow: 0 14px 32px rgba(36, 45, 66, 0.22);
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.28rem, 5.4vw, 1.9rem);
  line-height: 1;
  font-weight: 800;
}

.profile-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.3;
  font-weight: 700;
}

.browser-note {
  position: relative;
  min-height: 148px;
  margin-top: 14px;
  padding: 20px 126px 20px 18px;
  border-radius: 24px;
  overflow: visible;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 94% 8%, rgba(78, 167, 255, 0.32), transparent 30%),
    radial-gradient(circle at 78% 34%, rgba(255, 140, 199, 0.2), transparent 28%),
    linear-gradient(135deg, #050608 0%, #171a23 48%, #050608 100%);
  box-shadow: 0 28px 72px rgba(7, 10, 18, 0.28);
}

.note-copy { position: relative; z-index: 2; }

.note-title {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.82rem, 9vw, 2.7rem);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
}

.browser-note p:not(.note-title) {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  line-height: 1.42;
  font-weight: 800;
}

.browser-note strong { color: #fff; }

.arrow-anchor {
  position: absolute;
  top: max(6px, env(safe-area-inset-top));
  right: 0;
  width: min(56vw, 240px);
  height: 270px;
  pointer-events: none;
  z-index: 4;
  transform: translate(5px, -12px);
}

.corner-arrow {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(255, 55, 61, 0.22));
}

.corner-arrow-line,
.corner-arrow-head {
  fill: none;
  stroke: #ff373d;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-panel {
  padding: 26px 2px 18px;
  text-align: center;
}

.quick-kicker {
  margin-bottom: 5px;
  color: #3c4354;
  font-size: 1.14rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-panel h2 {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.2;
  font-weight: 700;
}

.quick-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 86px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 20px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.quick-card::before {
  position: absolute;
  inset: -45% -30%;
  z-index: -1;
  content: "";
  background: linear-gradient(115deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.18) 46%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.18) 54%, transparent 61%, transparent 100%);
  transform: translateX(-82%) skewX(-16deg);
  animation: quick-shine 3.8s ease-in-out infinite;
}

.quick-card > * { position: relative; z-index: 1; }

.quick-card strong {
  display: block;
  font-size: 1.03rem;
  line-height: 1.22;
  font-weight: 800;
}

.quick-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.32;
  font-weight: 700;
}

.quick-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.86), 0 8px 20px rgba(40,67,110,0.08);
}

.telegram-icon {
  width: 31px;
  height: 31px;
  display: block;
  color: var(--tg-blue);
  fill: var(--tg-blue);
}

.telegram-card {
  border-color: rgba(34, 158, 217, 0.62);
  background: linear-gradient(135deg, #229ed9 0%, #1a8fd1 100%);
  box-shadow: 0 18px 44px rgba(34, 158, 217, 0.28), inset 0 0 0 1px rgba(255,255,255,0.2);
  color: #fff;
}

.telegram-card small { color: rgba(255,255,255,0.84); }

.assortment-card {
  border-color: rgba(34, 158, 217, 0.48);
  background: linear-gradient(135deg, rgba(255,255,255,0.94) 0%, rgba(231,247,255,0.9) 54%, rgba(213,239,255,0.82) 100%);
  box-shadow: 0 18px 44px rgba(34, 158, 217, 0.14), inset 0 0 0 1px rgba(255,255,255,0.68);
  color: var(--ink);
}

.assortment-card::before { animation-delay: 0.85s; }
.telegram-icon path { fill: currentColor; }

.card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 24px;
}

.section-kicker {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.line {
  width: 28px;
  height: 1px;
  background: rgba(23, 25, 34, 0.45);
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 7.4vw, 2rem);
  line-height: 1.08;
  font-weight: 800;
}

.section-copy {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 650;
}

.details-list { display: grid; gap: 8px; margin: 0 0 16px; }

.detail-row {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

dt { color: var(--muted); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }
dd { margin: 0; font-size: 0.98rem; font-weight: 800; line-height: 1.35; }

.copy-stack { display: grid; gap: 12px; }

.copy-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 34px rgba(54, 72, 104, 0.1);
}

.copy-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.copy-value {
  display: block;
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  margin: 7px 0 0;
  font-size: clamp(0.82rem, 3.55vw, 0.96rem);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.copy-value:focus {
  outline: 2px solid rgba(78, 167, 255, 0.34);
  outline-offset: 4px;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  font-weight: 800;
  background: #171922;
  box-shadow: 0 12px 26px rgba(23, 25, 34, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.copy-button.is-copied { background: #168a57; }

.copy-button.needs-manual {
  color: #171922;
  background: #ffd36d;
}

.terms-card { margin-bottom: 4px; }
.terms-grid { display: grid; gap: 0; }

.term-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.term-item:last-child { border-bottom: 0; }

.term-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  font-size: 1.22rem;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.term-item h3 { margin-bottom: 5px; font-size: 1rem; line-height: 1.2; font-weight: 800; }

.term-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
  font-weight: 650;
}

.thanks {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.4;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 5;
  padding: 12px 16px;
  border-radius: 18px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(23, 25, 34, 0.9);
  box-shadow: 0 12px 30px rgba(36, 45, 66, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.quick-card:active,
.copy-button:active {
  transform: translateY(1px) scale(0.99);
}

@media (max-width: 360px) {
  .page-shell { padding-right: 12px; padding-left: 12px; }
  .profile-panel { grid-template-columns: 72px 1fr; gap: 14px; padding: 16px; }
  .brand-logo { width: 72px; }
  .browser-note { min-height: 154px; padding-right: 108px; }
}

@media (min-width: 640px) {
  .page-shell { padding-top: 28px; padding-bottom: 28px; }
}

@media (hover: hover) {
  .quick-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 28px 74px rgba(40, 67, 110, 0.16);
  }
  .copy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 28px 74px rgba(40, 67, 110, 0.18);
  }
}

@keyframes quick-shine {
  0%, 42% { transform: translateX(-82%) skewX(-16deg); }
  68%, 100% { transform: translateX(82%) skewX(-16deg); }
}

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