/* TikTok-style phone mockups (2025-26 app layout). Shared by all redesign concepts.
   Size a phone with --w on .tt-phone; every inner size is in em, so it scales. */

.tt-phone {
  --w: 300px;
  --tt-red: #fe2c55;
  --tt-cyan: #25f4ee;
  width: var(--w);
  aspect-ratio: 9 / 19.5;
  font-size: calc(var(--w) * 0.04);
  font-family: "Inter", "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: relative;
  border-radius: 3.2em;
  padding: 0.55em;
  background: linear-gradient(145deg, #2b2b30, #0c0c0e 60%, #1d1d21);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 2.5em 5em -1.5em rgba(0, 0, 0, 0.55),
    0 1em 2em -1em rgba(0, 0, 0, 0.4);
  flex: none;
  user-select: none;
  -webkit-user-select: none;
}
.tt-screen {
  position: relative;
  height: 100%;
  border-radius: 2.7em;
  overflow: hidden;
  background: #000;
  color: #fff;
  isolation: isolate;
}
.tt-island {
  position: absolute;
  top: 0.75em;
  left: 50%;
  translate: -50% 0;
  width: 7.2em;
  height: 2.1em;
  border-radius: 2em;
  background: #000;
  z-index: 20;
}
.tt-status {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3.6em;
  padding: 1.25em 2.1em 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.95em;
  z-index: 15;
  pointer-events: none;
}
.tt-screen.light .tt-status { color: #161823; }
.tt-status-icons { display: flex; gap: 0.35em; align-items: center; }
.tt-status-icons svg { height: 0.95em; width: auto; fill: currentColor; }

/* ---------- For You feed ---------- */
.tt-top {
  position: absolute;
  top: 3.5em;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.1em;
  z-index: 12;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.tt-top > svg { width: 1.9em; height: 1.9em; flex: none; }
.tt-tabs { display: flex; gap: 1em; font-weight: 600; font-size: 1.02em; white-space: nowrap; }
.tt-tabs span { color: rgba(255, 255, 255, 0.62); position: relative; padding-bottom: 0.4em; }
.tt-tabs span.on { color: #fff; }
.tt-tabs span.on::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  width: 1.8em;
  height: 0.18em;
  border-radius: 1em;
  background: #fff;
}
.tt-feed {
  position: absolute;
  inset: 0 0 4.6em 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.tt-feed::-webkit-scrollbar { display: none; }
.tt-video {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}
.tt-media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 30% 20%, var(--v1, #3a1c71) 0%, transparent 60%),
    radial-gradient(90% 60% at 80% 85%, var(--v2, #d76d77) 0%, transparent 65%),
    var(--v3, #111);
}
.tt-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, transparent 22%, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}
/* In-video text overlay, TikTok "background" text style */
.tt-overlay {
  position: absolute;
  left: 8%;
  right: 22%;
  top: 30%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3em;
  z-index: 2;
}
.tt-overlay b {
  display: inline-block;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 1.15em;
  line-height: 1.25;
  padding: 0.2em 0.5em;
  border-radius: 0.35em;
}
.tt-overlay b.alt { background: var(--tt-red); color: #fff; }
.tt-overlay .tt-caption-classic {
  font-weight: 800;
  font-size: 1.5em;
  line-height: 1.1;
  color: #fff;
  -webkit-text-stroke: 0.06em #000;
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 #000;
}
.tt-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.tt-rail {
  position: absolute;
  right: 0.55em;
  bottom: 1.4em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.05em;
  z-index: 5;
}
.tt-rail button {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.tt-rail button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 0.4em; }
.tt-rail svg { width: 2.45em; height: 2.45em; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35)); transition: transform 0.2s ease; }
.tt-rail button:active svg { transform: scale(0.88); }
.tt-like.on svg { color: var(--tt-red); animation: tt-pop 0.35s ease; }
.tt-save.on svg { color: #facd00; animation: tt-pop 0.35s ease; }
@keyframes tt-pop { 40% { transform: scale(1.25); } }
.tt-avatar {
  position: relative;
  width: 3.1em;
  height: 3.1em;
  border-radius: 50%;
  border: 0.12em solid #fff;
  background: var(--av, linear-gradient(135deg, #fe2c55, #25f4ee));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1em;
  margin-bottom: 0.55em;
}
.tt-follow {
  all: unset;
  position: absolute;
  bottom: -0.65em;
  left: 50%;
  translate: -50% 0;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: var(--tt-red);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.tt-follow svg { width: 0.9em; height: 0.9em; filter: none; }
.tt-follow.on { background: #fff; color: var(--tt-red); }
.tt-disc {
  width: 2.7em;
  height: 2.7em;
  border-radius: 50%;
  background: radial-gradient(circle, var(--av-c, #fe2c55) 0 28%, #222 30% 100%);
  border: 0.55em solid #2a2a2a;
  animation: tt-spin 5s linear infinite;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }

.tt-meta {
  position: absolute;
  left: 0.9em;
  right: 4.4em;
  bottom: 1.2em;
  z-index: 5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.tt-user { font-weight: 700; font-size: 1.05em; display: flex; align-items: center; gap: 0.35em; }
.tt-user .tt-verified { width: 1em; height: 1em; color: #20d5ec; }
.tt-user small { font-weight: 500; opacity: 0.75; font-size: 0.85em; }
.tt-desc { font-size: 0.95em; line-height: 1.35; margin-top: 0.3em; }
.tt-desc b { font-weight: 700; }
.tt-sound {
  margin-top: 0.55em;
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9em;
  overflow: hidden;
  white-space: nowrap;
}
.tt-sound svg { width: 1em; height: 1em; flex: none; }
.tt-mq { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.tt-mq span { display: inline-block; animation: tt-marquee 9s linear infinite; padding-left: 0.2em; }
@keyframes tt-marquee { from { transform: translateX(30%); } to { transform: translateX(-100%); } }

.tt-heart-burst {
  position: absolute;
  width: 6em;
  height: 6em;
  color: var(--tt-red);
  pointer-events: none;
  z-index: 8;
  translate: -50% -50%;
  animation: tt-burst 0.8s ease-out forwards;
}
@keyframes tt-burst {
  0% { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  25% { opacity: 1; transform: scale(1.1) rotate(-12deg); }
  100% { opacity: 0; transform: scale(1.4) rotate(-12deg) translateY(-1.5em); }
}

.tt-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4.6em;
  height: 0.16em;
  background: rgba(255, 255, 255, 0.22);
  z-index: 11;
}
.tt-progress i { display: block; height: 100%; width: 0; background: #fff; }

.tt-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.6em;
  background: #000;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding-top: 0.55em;
  font-size: 0.78em;
  font-weight: 500;
  z-index: 12;
}
.tt-nav span { display: flex; flex-direction: column; align-items: center; gap: 0.2em; color: rgba(255, 255, 255, 0.7); }
.tt-nav span.on { color: #fff; font-weight: 700; }
.tt-nav svg { width: 2em; height: 2em; }
.tt-nav .tt-badge { position: relative; }
.tt-nav .tt-badge::after {
  content: attr(data-n);
  position: absolute;
  top: -0.2em;
  right: -0.9em;
  background: var(--tt-red);
  color: #fff;
  font-size: 0.8em;
  font-weight: 700;
  min-width: 1.5em;
  height: 1.5em;
  border-radius: 1em;
  display: grid;
  place-items: center;
  padding: 0 0.3em;
}
.tt-create {
  width: 3.4em;
  height: 2.2em;
  position: relative;
  margin-top: 0.15em;
}
.tt-create::before, .tt-create::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.6em;
}
.tt-create::before { background: var(--tt-cyan); translate: -0.22em 0; }
.tt-create::after { background: var(--tt-red); translate: 0.22em 0; }
.tt-create i {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: 0.6em;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #000;
}
.tt-create i svg { width: 1.3em; height: 1.3em; }

/* ---------- Comments sheet ---------- */
.tt-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64%;
  background: #fff;
  color: #161823;
  border-radius: 1.1em 1.1em 0 0;
  z-index: 14;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -1em 2em rgba(0, 0, 0, 0.25);
}
.tt-sheet header {
  text-align: center;
  font-weight: 700;
  font-size: 0.95em;
  padding: 1em 0 0.8em;
  position: relative;
}
.tt-sheet header svg { position: absolute; right: 1em; top: 0.9em; width: 1.3em; height: 1.3em; }
.tt-comments { flex: 1; overflow: hidden; padding: 0 1em; display: flex; flex-direction: column; gap: 1em; }
.tt-comment { display: grid; grid-template-columns: 2.6em 1fr 1.6em; gap: 0.7em; font-size: 0.9em; }
.tt-comment .tt-c-av { width: 2.6em; height: 2.6em; border-radius: 50%; background: var(--av, #ddd); }
.tt-comment small { color: #8a8b91; font-size: 0.9em; display: block; }
.tt-comment p { margin: 0.15em 0 0.25em; line-height: 1.35; }
.tt-comment .tt-c-like { text-align: center; color: #8a8b91; font-size: 0.85em; }
.tt-comment .tt-c-like svg { width: 1.3em; height: 1.3em; display: block; margin: 0 auto 0.1em; }
.tt-comment .tt-creator { color: var(--tt-red); font-weight: 600; }
.tt-sheet footer {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.7em 1em 1.4em;
  border-top: 1px solid #eee;
}
.tt-sheet footer .tt-c-av { width: 2.2em; height: 2.2em; border-radius: 50%; background: linear-gradient(135deg, #fe2c55, #ff9a8b); flex: none; }
.tt-sheet footer span { flex: 1; background: #f1f1f2; border-radius: 2em; padding: 0.65em 1em; color: #8a8b91; font-size: 0.9em; }

/* ---------- TikTok Studio analytics ---------- */
.tt-studio {
  position: absolute;
  inset: 0;
  background: #fff;
  color: #161823;
  padding: 4em 1.1em 1em;
  display: flex;
  flex-direction: column;
  gap: 0.9em;
  font-size: 0.95em;
}
.tt-studio-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 1.1em; }
.tt-studio-head svg { width: 1.4em; height: 1.4em; }
.tt-chips { display: flex; gap: 0.45em; }
.tt-chips span { padding: 0.4em 0.8em; border-radius: 0.5em; background: #f1f1f2; font-size: 0.85em; font-weight: 600; color: #57585f; }
.tt-chips span.on { background: #161823; color: #fff; }
.tt-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55em; }
.tt-kpi { background: #f8f8f8; border-radius: 0.7em; padding: 0.7em 0.8em; }
.tt-kpi small { display: block; color: #8a8b91; font-size: 0.8em; font-weight: 500; }
.tt-kpi strong { font-size: 1.35em; font-weight: 800; letter-spacing: -0.01em; }
.tt-kpi em { font-style: normal; color: #0bb07b; font-size: 0.78em; font-weight: 700; margin-left: 0.3em; }
.tt-chart { background: #f8f8f8; border-radius: 0.7em; padding: 0.8em; }
.tt-chart small { color: #8a8b91; font-size: 0.8em; font-weight: 500; }
.tt-chart svg { width: 100%; height: 6.5em; display: block; margin-top: 0.4em; }
.tt-chart .tt-line { fill: none; stroke: var(--tt-red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: tt-draw 1.6s 0.3s ease-out forwards; }
.tt-chart .tt-area { fill: url(#ttArea); opacity: 0; animation: tt-fade 0.8s 1.2s forwards; }
@keyframes tt-draw { to { stroke-dashoffset: 0; } }
@keyframes tt-fade { to { opacity: 1; } }
.tt-rows { display: flex; flex-direction: column; gap: 0.55em; }
.tt-row { display: grid; grid-template-columns: 2.6em 1fr auto; gap: 0.6em; align-items: center; font-size: 0.85em; }
.tt-row i { width: 2.6em; height: 3.4em; border-radius: 0.35em; background: var(--v, linear-gradient(160deg, #3a1c71, #d76d77)); }
.tt-row b { display: block; font-weight: 600; line-height: 1.25; }
.tt-row small { color: #8a8b91; }
.tt-row strong { font-weight: 700; }

/* ---------- Profile ---------- */
.tt-profile {
  position: absolute;
  inset: 0;
  background: #fff;
  color: #161823;
  padding: 4em 0 4.6em;
  text-align: center;
  font-size: 0.95em;
  overflow: hidden;
}
.tt-profile .tt-p-av { width: 5.6em; height: 5.6em; border-radius: 50%; margin: 0.6em auto 0.5em; background: var(--av, linear-gradient(135deg, #fe2c55, #25f4ee)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1em; }
.tt-profile h4 { margin: 0; font-size: 1.05em; font-weight: 700; }
.tt-p-stats { display: flex; justify-content: center; gap: 1.6em; margin: 0.8em 0; }
.tt-p-stats div { display: flex; flex-direction: column; }
.tt-p-stats strong { font-size: 1.1em; }
.tt-p-stats small { color: #8a8b91; font-size: 0.8em; }
.tt-p-btns { display: flex; justify-content: center; gap: 0.4em; }
.tt-p-btns span { padding: 0.65em 1.2em; border-radius: 0.4em; background: #f1f1f2; font-weight: 600; font-size: 0.85em; }
.tt-p-btns span.red { background: var(--tt-red); color: #fff; padding: 0.65em 2.4em; }
.tt-p-bio { font-size: 0.85em; margin: 0.7em 2em; line-height: 1.35; }
.tt-p-tabs { display: flex; justify-content: space-around; border-bottom: 1px solid #eee; margin-top: 0.4em; }
.tt-p-tabs span { padding: 0.6em 0; color: #8a8b91; }
.tt-p-tabs span.on { color: #161823; border-bottom: 0.14em solid #161823; }
.tt-p-tabs svg { width: 1.4em; height: 1.4em; }
.tt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.1em; }
.tt-grid div { aspect-ratio: 3 / 4; background: var(--v); position: relative; }
.tt-grid div::after { content: attr(data-v); position: absolute; left: 0.4em; bottom: 0.3em; color: #fff; font-size: 0.75em; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.tt-profile .tt-nav { background: #fff; color: #161823; border-top: 1px solid #eee; }
.tt-profile .tt-nav span { color: #8a8b91; }
.tt-profile .tt-nav span.on { color: #161823; }
.tt-profile .tt-create i { background: #161823; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .tt-disc, .tt-mq span { animation: none; }
  .tt-chart .tt-line { animation: none; stroke-dashoffset: 0; }
  .tt-chart .tt-area { animation: none; opacity: 1; }
}
