* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  background: #000;
  color: #f2f2f2;
  font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px 16px 40px;
}

header {
  width: 100%;
  max-width: 430px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 4px 20px;
}
.logo { font-weight: 700; font-size: 20px; letter-spacing: 0.5px; }
.tag { color: #6e6e73; font-size: 13px; }
.navlink { color: #34c759; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 16px; }
.nav a { color: #8e8e8e; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav a.on { color: #f2f2f2; }

main { width: 100%; max-width: 430px; display: flex; flex-direction: column; gap: 20px; }

.seg {
  display: inline-flex;
  background: #141416;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.seg.wide { width: 100%; }
.seg.wide button { flex: 1; }
.seg button {
  border: 0;
  background: transparent;
  color: #9a9aa0;
  font: inherit;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg button.on { background: #f2f2f2; color: #000; font-weight: 600; }

.phone {
  align-self: center;
  width: 240px;
  border: 7px solid #1d1d20;
  border-radius: 44px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.06);
}
.phone canvas { display: block; width: 100%; height: auto; }

.mini {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 92px;
  border: 3px solid #2a2a2e;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.mini.show { opacity: 1; transform: none; pointer-events: auto; }
.mini canvas { display: block; width: 100%; height: auto; }

.stats {
  display: flex;
  justify-content: space-evenly;
  gap: 12px;
  padding: 2px 0 6px;
}
.stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.stats b { font-size: clamp(24px, 8vw, 34px); font-weight: 800; letter-spacing: -0.5px; }
.stats span { color: #6e6e73; font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; text-align: center; }

.controls { display: flex; flex-direction: column; gap: 22px; }

.field.two { flex-direction: row; gap: 12px; }
.field.two label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field.two input { width: 100%; }

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #6e6e73;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.field input, .field textarea {
  background: #141416;
  border: 1px solid #232326;
  border-radius: 14px;
  color: #f2f2f2;
  font: inherit;
  font-size: 16px;
  letter-spacing: normal;
  text-transform: none;
  padding: 13px 16px;
  outline: none;
  color-scheme: dark;
  resize: none;
}
.field input:focus, .field textarea:focus { border-color: #4a4a50; }

.swatches { display: flex; gap: 14px; }
.swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.swatch.on { border-color: #f2f2f2; box-shadow: 0 0 0 3px #000, 0 0 14px rgba(255, 255, 255, 0.35); }
.swatch:disabled { opacity: 0.22; cursor: default; }
.swatches { flex-wrap: wrap; }

.primary, .secondary {
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 16px;
  cursor: pointer;
}
.primary { background: #f2f2f2; color: #000; margin-top: 6px; }
.primary:active { transform: scale(0.98); }
.secondary { background: #1a1a1d; color: #f2f2f2; border: 1px solid #2a2a2e; }
.secondary:disabled { opacity: 0.5; }

.linkbox {
  background: #101012;
  border: 1px solid #232326;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.linkbox code {
  font-size: 14px;
  color: #7fd4a3;
  word-break: break-all;
}
.linkbox button {
  align-self: flex-start;
  background: #232326;
  border: 0;
  border-radius: 10px;
  color: #f2f2f2;
  font: inherit;
  font-size: 14px;
  padding: 8px 14px;
  cursor: pointer;
}
.hint { color: #6e6e73; font-size: 13px; line-height: 1.5; }

.page-foot { color: #48484d; font-size: 13px; padding-top: 36px; }

/* --- модал предложки --- */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  overflow-y: auto;
  background: #101012;
  border: 1px solid #232326;
  border-radius: 24px 24px 0 0;
  padding: 26px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal h2 { font-size: 22px; font-weight: 800; }
.modal .sub { color: #9a9aa0; font-size: 14px; line-height: 1.5; }
.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #232326;
  border: 0;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: #9a9aa0;
  font-size: 14px;
  cursor: pointer;
}
.err { color: #ff6b81; font-size: 14px; }
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6e6e73;
  font-size: 13px;
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #232326; }
.tariffs { display: flex; gap: 10px; }
.tariff {
  flex: 1;
  background: #141416;
  border: 1px solid #232326;
  border-radius: 14px;
  color: #f2f2f2;
  font: inherit;
  padding: 13px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  opacity: 0.55;
}
.tariff b { font-size: 17px; }
.tariff span { color: #8e8e8e; font-size: 12px; }

.access { color: #7fd4a3; font-size: 14px; font-weight: 600; }
.access:empty { display: none; }

/* --- страница установки --- */
.setup { align-items: center; text-align: center; }
.setup h1 { font-size: 28px; font-weight: 800; }
.setup .sub { color: #9a9aa0; font-size: 15px; line-height: 1.5; max-width: 320px; }
.wp-preview {
  width: 132px;
  border-radius: 22px;
  border: 4px solid #1d1d20;
}
.step {
  display: flex;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #101012;
  border: 1px solid #1d1d20;
  border-radius: 18px;
  padding: 18px;
}
.step-n {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #000;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-body h3 { font-size: 17px; }
.step-body p { color: #9a9aa0; font-size: 14px; line-height: 1.55; }
.step-body b { color: #d9d9de; font-weight: 600; }
.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  padding: 15px;
}
.btn.primary { background: #f2f2f2; color: #000; }
.btn.secondary { background: #1a1a1d; color: #f2f2f2; border: 1px solid #2a2a2e; }
.btn.disabled { opacity: 0.45; pointer-events: none; }
.fallback { max-width: 340px; }
.fallback a { color: #7fd4a3; }

/* --- отзыв за вторую неделю --- */
.review {
  width: 100%;
  text-align: left;
  background: #0d1a12;
  border: 1px solid #1e3a2a;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review h3 { font-size: 17px; }
.review textarea {
  background: #0a120d;
  border: 1px solid #234;
  border-color: #234a35;
  border-radius: 14px;
  color: #f2f2f2;
  font: inherit;
  font-size: 16px;
  padding: 13px 16px;
  outline: none;
  resize: vertical;
  min-height: 96px;
  color-scheme: dark;
}
.review textarea:focus { border-color: #7fd4a3; }
.review .btn.primary { background: #7fd4a3; }
.review .err:empty { display: none; }
header .logo { color: inherit; text-decoration: none; }

/* --- трекер целей «тыкалка» --- */
.goal-title { color: #f2f2f2; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.goal-reward { color: #7fd4a3; font-size: 14px; }
.goal-reward b { color: #f2f2f2; font-weight: 600; }
.goal-reward:empty { display: none; }

.gbar { height: 8px; background: #232326; border-radius: 999px; overflow: hidden; }
.gbar > i { display: block; height: 100%; border-radius: 999px; background: #f2f2f2; transition: width 0.3s; }

.gt-grid { display: grid; gap: 7px; }
.gt-cell {
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}
.gt-cell:active { transform: scale(0.86); }
.gt-cell:disabled { cursor: default; opacity: 0.5; }
.gt-dot { display: block; width: 100%; height: 100%; border-radius: 50%; }
.gt-cell[data-shape="rounded"] .gt-dot { border-radius: 30%; }
.gt-cell[data-shape="square"] .gt-dot { border-radius: 0; }

.celebrate { background: #0d1a12; border: 1px solid #1e3a2a; border-radius: 18px; padding: 18px; text-align: center; }
.celebrate h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.celebrate p { color: #9a9aa0; font-size: 14px; line-height: 1.5; }
.celebrate b { color: #d9d9de; }

.actions { display: flex; gap: 10px; }
.actions .primary, .actions .btn { flex: 1; margin-top: 0; }
.btn.copied { background: #7fd4a3; color: #000; }

.screen { background: #101012; border: 1px solid #1d1d20; border-radius: 18px; overflow: hidden; }
.screen > summary { list-style: none; cursor: pointer; padding: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.screen > summary::-webkit-details-marker { display: none; }
.screen > summary::after { content: "＋"; color: #6e6e73; }
.screen[open] > summary::after { content: "－"; }
.screen-body { padding: 0 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.screen-body p { color: #9a9aa0; font-size: 14px; line-height: 1.5; }
.screen-body .mono { color: #7fd4a3; word-break: break-all; }

/* --- фокус-плеер YouTube --- */
.yt-wrap { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid #232326; border-radius: 16px; overflow: hidden; }
.yt-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.focus-row { display: flex; gap: 10px; }
.focus-row input { flex: 1; }
.focus-row .primary { margin-top: 0; flex: none; white-space: nowrap; }
