/* TikTok-inspired web UI — visual only */
:root,
html.dark {
  --tt-bg: #000;
  --tt-bg-elevated: #121212;
  --tt-bg-hover: rgba(255, 255, 255, 0.08);
  --tt-bg-input: rgba(255, 255, 255, 0.12);
  --tt-border: rgba(255, 255, 255, 0.12);
  --tt-text: rgba(255, 255, 255, 0.9);
  --tt-text-primary: #fff;
  --tt-text-secondary: rgba(255, 255, 255, 0.75);
  --tt-text-tertiary: rgba(255, 255, 255, 0.5);
  --tt-pink: #fe2c55;
  --tt-pink-hover: #e01e45;
  --tt-cyan: #25f4ee;
  --tt-sidebar: 240px;
  --tt-radius: 8px;
  --tt-font: "ProximaNova", "TikTokFont", "Segoe UI", "San Francisco", Arial, sans-serif;
  --tt-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

html.light {
  --tt-bg: #fff;
  --tt-bg-elevated: #fff;
  --tt-bg-hover: rgba(22, 24, 35, 0.06);
  --tt-bg-input: rgba(22, 24, 35, 0.06);
  --tt-border: rgba(22, 24, 35, 0.12);
  --tt-text: rgba(22, 24, 35, 0.75);
  --tt-text-primary: #161823;
  --tt-text-secondary: rgba(22, 24, 35, 0.75);
  --tt-text-tertiary: rgba(22, 24, 35, 0.5);
  --tt-pink: #fe2c55;
  --tt-pink-hover: #e01e45;
  --tt-cyan: #00f2ea;
  --tt-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--tt-bg);
  color: var(--tt-text-primary);
  font-family: var(--tt-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }

/* ——— Shell ——— */
.tt-app {
  min-height: 100vh;
  display: flex;
  background: var(--tt-bg);
}

.tt-sidebar {
  display: none;
  width: var(--tt-sidebar);
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 20px 8px 24px;
  border-right: 1px solid var(--tt-border);
  flex-direction: column;
  background: var(--tt-bg);
  z-index: 100;
  overflow-y: auto;
}

.tt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tt-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 18px;
  color: var(--tt-text-primary);
}
.tt-logo-img {
  display: block;
  width: 100%;
  max-width: 208px;
  height: auto;
  object-fit: contain;
}
.tt-logo-img--light {
  display: none;
}
html.light .tt-logo-img--dark {
  display: none;
}
html.light .tt-logo-img--light {
  display: block;
}
.tt-logo-img--mark {
  width: 34px;
  height: 34px;
  max-width: none;
  flex-shrink: 0;
}
.tt-logo--compact {
  display: inline-flex;
  align-items: center;
  padding: 0;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.tt-topbar .tt-logo--compact .tt-logo-img--mark {
  width: 36px;
  height: 36px;
}
.tt-logo--auth {
  justify-content: center;
  padding: 0 0 12px;
}
.tt-logo--auth .tt-logo-img {
  max-width: 260px;
}

.tt-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.tt-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 12px;
  border-radius: var(--tt-radius);
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: var(--tt-text-primary);
  font-size: 17px;
  font-weight: 700;
  transition: background 0.15s ease;
}
.tt-nav-link:hover { background: var(--tt-bg-hover); }
.tt-nav-link.active { color: var(--tt-pink); }
.tt-nav-link i { font-size: 26px; width: 28px; text-align: center; }
.tt-nav-link.muted {
  font-weight: 600;
  font-size: 15px;
  color: var(--tt-text-secondary);
}

.tt-sidebar-footer {
  padding: 16px 8px 0;
  border-top: 1px solid var(--tt-border);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tt-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: var(--tt-radius);
  background: var(--tt-pink);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease;
}
.tt-login-btn:hover { background: var(--tt-pink-hover); }

.tt-prefs {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--tt-border);
}
.tt-prefs-theme {
  width: 44px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  color: var(--tt-text-primary);
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.tt-prefs-theme:hover {
  background: var(--tt-bg-hover);
  border-color: var(--tt-text-tertiary);
}
.tt-prefs-locale {
  margin: 0;
  min-width: 0;
}
.tt-prefs-locale-label {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  color: var(--tt-text-secondary);
  cursor: pointer;
}
.tt-prefs-locale-label i {
  font-size: 16px;
  flex-shrink: 0;
}
.tt-prefs-locale select {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--tt-text-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}
.tt-footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 4px 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--tt-text-tertiary);
}
.tt-footer-legal a {
  color: var(--tt-text-tertiary);
  text-decoration: none;
  font-weight: 500;
}
.tt-footer-legal a:hover {
  color: var(--tt-text-secondary, var(--tt-pink));
  text-decoration: underline;
}
.tt-footer-meta {
  font-size: 12px;
  color: var(--tt-text-tertiary);
  line-height: 1.4;
  padding: 0 4px;
}

.tt-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  z-index: 1;
}
html.tt-drawer-open {
  overflow: hidden;
}
.tt-topbar-locale {
  margin: 0;
}
.tt-topbar-locale select {
  height: 36px;
  min-width: 52px;
  padding: 0 22px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--tt-border);
  background-color: var(--tt-bg-input);
  color: var(--tt-text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Mobile header / bottom */
.tt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 10px;
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--tt-bg);
  border-bottom: 1px solid transparent;
}
.tt-topbar-left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  z-index: 1;
}
.tt-topbar.is-feed .tt-logo--compact { display: none; }
.tt-topbar-tabs {
  display: flex;
  gap: 18px;
  font-weight: 700;
  font-size: 17px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.tt-topbar-tabs a {
  color: var(--tt-text-tertiary);
  position: relative;
  padding-bottom: 6px;
}
.tt-topbar-tabs a.active {
  color: var(--tt-text-primary);
}
.tt-topbar-tabs a.active::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 2px;
  background: var(--tt-text-primary);
  border-radius: 2px;
}

/* Mobile drawer (hamburger) */
.tt-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.45);
}
.tt-drawer-backdrop.open { display: block; }
.tt-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(82vw, 320px);
  z-index: 160;
  background: var(--tt-bg-elevated);
  border-right: 1px solid var(--tt-border);
  transform: translateX(-105%);
  transition: transform 0.22s ease;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.tt-drawer.open { transform: translateX(0); }
.tt-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.tt-logo--drawer {
  display: inline-flex;
  align-items: center;
  padding: 0;
  min-width: 0;
}
.tt-logo--drawer .tt-logo-img {
  width: auto;
  height: 28px;
  max-width: 150px;
}
.tt-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--tt-text-primary);
  font-weight: 600;
  font-size: 15px;
}
.tt-drawer-link:hover { background: var(--tt-bg-hover); }
.tt-drawer-link i { font-size: 22px; }
.tt-drawer-prefs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 4px;
  border-top: 1px solid var(--tt-border);
  padding-top: 14px;
}
@media (min-width: 1070px) {
  .tt-drawer-backdrop,
  .tt-drawer,
  .tt-menu-btn { display: none !important; }
}
.tt-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--tt-text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
}
.tt-icon-btn:hover { background: var(--tt-bg-hover); }

.tt-bottom {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(49px + env(safe-area-inset-bottom, 0px));
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--tt-bg);
  border-top: 1px solid var(--tt-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tt-bottom a,
.tt-bottom button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  background: none;
  color: var(--tt-text-tertiary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.tt-bottom a.active { color: var(--tt-text-primary); }
.tt-bottom i { font-size: 24px; }
.tt-create-btn {
  width: 44px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--tt-cyan) 0%, #fff 45%, #fff 55%, var(--tt-pink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tt-create-btn::before {
  content: "";
  position: absolute;
  inset: 2px 3px;
  background: #fff;
  border-radius: 6px;
}
html.dark .tt-create-btn::before { background: #000; }
.tt-create-btn i {
  position: relative;
  z-index: 1;
  color: var(--tt-text-primary);
  font-size: 22px;
  font-weight: 700;
}

@media (min-width: 1070px) {
  .tt-sidebar { display: flex; }
  .tt-topbar { display: none; }
  .tt-bottom { display: none; }
  .tt-page { padding-bottom: 0 !important; }
}

/* ——— Feed (For You) ——— */
.tt-feed-page {
  height: calc(100dvh - 60px - 49px - env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
@media (min-width: 1070px) {
  .tt-feed-page {
    height: 100vh;
    padding: 0;
  }
}
/* Mobile TikTok-style: full-bleed feed under translucent chrome */
@media (max-width: 1069px) {
  body:has(.tt-feed-page) .tt-topbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: transparent;
    border-bottom: 0;
    color: #fff;
  }
  body:has(.tt-feed-page) .tt-topbar-tabs a {
    color: rgba(255, 255, 255, 0.55);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  }
  body:has(.tt-feed-page) .tt-topbar-tabs a.active {
    color: #fff;
  }
  body:has(.tt-feed-page) .tt-topbar-tabs a.active::after {
    background: #fff;
  }
  body:has(.tt-feed-page) .tt-icon-btn {
    color: #fff;
  }
  body:has(.tt-feed-page) .tt-bottom {
    background: rgba(0, 0, 0, 0.72);
    border-top-color: rgba(255, 255, 255, 0.08);
  }
  .tt-feed-page {
    height: 100dvh;
    position: relative;
  }
  .tt-feed-page .tt-feed {
    max-width: none;
    height: 100%;
  }
}

.tt-feed {
  width: 100%;
  max-width: 692px;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

#pp-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 2000;
  background: var(--tt-pink);
  pointer-events: none;
  opacity: 0;
}
#pp-nav-progress.is-on {
  opacity: 1;
  width: 72%;
  transition: width 0.45s ease;
}

.tt-shimmer {
  background: linear-gradient(100deg, #161616 30%, #2a2a2a 50%, #161616 70%);
  background-size: 200% 100%;
  animation: ttShimmer 1.1s ease-in-out infinite;
}
html.light .tt-shimmer {
  background: linear-gradient(100deg, #ececec 30%, #f7f7f7 50%, #ececec 70%);
  background-size: 200% 100%;
}
@keyframes ttShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.tt-skel-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.tt-heart-burst {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 6;
  font-size: 92px;
  color: var(--tt-pink);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
  animation: ttHeart 0.65s ease forwards;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}
@keyframes ttHeart {
  40% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -58%) scale(1.35); opacity: 0; }
}
.tt-feed::-webkit-scrollbar { display: none; }

.tt-feed-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 12px;
  position: relative;
  flex-shrink: 0;
}

/* Marco tipo móvil 9:16 — altura manda, ancho se deriva (evita achatar) */
.tt-video-wrap {
  position: relative;
  height: min(calc(100% - 24px), 85vh);
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: min(390px, calc(100% - 80px));
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--tt-shadow);
  flex-shrink: 0;
}
@media (max-width: 1069px) {
  .tt-feed-card {
    padding: 0;
    gap: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .tt-video-wrap {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    flex: 1 1 auto;
  }
  .tt-video-wrap video,
  .tt-video-wrap > img.tt-media {
    object-fit: cover;
  }
  .tt-video-meta {
    left: 12px;
    right: 68px;
    bottom: calc(49px + env(safe-area-inset-bottom, 0px) + 10px);
  }
  .tt-meta-user {
    gap: 8px;
    margin-bottom: 6px;
  }
  .tt-meta-user .name {
    font-size: 15px;
  }
  .tt-meta-desc {
    font-size: 13px;
    margin: 0 0 6px;
  }
  .tt-follow-chip {
    height: 26px;
    padding: 0 10px;
    font-size: 13px;
  }
}

.tt-video-wrap video,
.tt-video-wrap > img.tt-media {
  width: 100%;
  height: 100%;
  object-fit: contain; /* desktop: vídeo completo */
  object-position: center;
  background: #000;
  display: block;
}

.tt-video-meta {
  position: absolute;
  left: 12px;
  right: 72px;
  bottom: 20px;
  z-index: 3;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.tt-video-meta a,
.tt-video-meta button { pointer-events: auto; }
.tt-meta-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tt-meta-user .name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.tt-meta-handle {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}
.tt-follow-chip {
  height: 28px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.tt-follow-chip.is-following {
  border-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.85);
}
.tt-meta-desc {
  font-size: 14px;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tt-meta-music {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  max-width: 240px;
}
.tt-meta-music span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 4;
  padding-bottom: 24px;
  align-self: flex-end;
  margin-bottom: 40px;
}
@media (max-width: 1069px) {
  .tt-rail {
    position: absolute;
    right: 6px;
    bottom: calc(49px + env(safe-area-inset-bottom, 0px) + 10px);
    margin: 0;
    padding: 0;
    gap: 9px;
  }
  .tt-avatar-wrap {
    margin-bottom: 2px;
  }
  .tt-avatar-wrap img {
    width: 40px;
    height: 40px;
  }
  .tt-avatar-plus {
    width: 18px;
    height: 18px;
    font-size: 12px;
    bottom: -6px;
  }
  .tt-action {
    gap: 2px;
  }
  .tt-action i {
    font-size: 28px;
  }
  .tt-action span {
    font-size: 10px;
  }
  .tt-gift-action span {
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.tt-avatar-wrap {
  position: relative;
  margin-bottom: 6px;
}
.tt-avatar-wrap img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #fff;
  object-fit: cover;
  background: #333;
}
.tt-avatar-plus {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tt-pink);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.tt-avatar-plus.hidden { display: none; }

.tt-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.tt-action i {
  font-size: 36px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.tt-action span {
  font-size: 12px;
  font-weight: 600;
}
.tt-action.liked i { color: var(--tt-pink); }
.tt-action.saved i { color: #fff; }

.tt-mute {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 1069px) {
  .tt-mute {
    /* Debajo del topbar (lupa) para que no quede tapado */
    top: calc(52px + env(safe-area-inset-top, 0px) + 8px);
    right: 12px;
  }
}

.tt-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--tt-text-tertiary);
  text-align: center;
  padding: 40px;
}

/* ——— Page content ——— */
.tt-page {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
@media (max-width: 1069px) {
  .tt-page { padding: 16px 12px 80px; }
}

.tt-page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--tt-text-primary);
}

.tt-inbox-sub {
  margin: -8px 0 16px;
  color: var(--tt-text-tertiary);
  font-size: 14px;
}
.tt-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tt-inbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 12px;
  color: var(--tt-text-primary);
}
.tt-inbox-item:hover { background: var(--tt-bg-hover); }
.tt-inbox-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--tt-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tt-text-tertiary);
  font-size: 22px;
}
.tt-inbox-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tt-inbox-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tt-inbox-text {
  font-size: 14px;
  line-height: 1.35;
}
.tt-inbox-time {
  font-size: 12px;
  color: var(--tt-text-tertiary);
}
.tt-inbox-chevron {
  color: var(--tt-text-tertiary);
  font-size: 20px;
  flex-shrink: 0;
}
.tt-inbox-empty {
  margin: 32px 0;
  text-align: center;
  color: var(--tt-text-tertiary);
  font-size: 15px;
}

.tt-search-bar {
  display: flex;
  align-items: center;
  height: 46px;
  background: var(--tt-bg-input);
  border-radius: 92px;
  padding: 0 16px;
  gap: 10px;
  margin-bottom: 24px;
  border: 1.5px solid transparent;
}
.tt-search-bar:focus-within { border-color: var(--tt-border); }
.tt-search-bar i { color: var(--tt-text-tertiary); font-size: 20px; }
.tt-search-bar input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  color: var(--tt-text-primary);
}
.tt-search-bar input::placeholder { color: var(--tt-text-tertiary); }

.tt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.tt-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--tt-bg-input);
  border: 1px solid var(--tt-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--tt-text-primary);
  transition: background 0.15s ease;
}
.tt-chip:hover { background: var(--tt-bg-hover); }
.tt-chip i { color: var(--tt-pink); }

.tt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 640px) {
  .tt-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (min-width: 900px) {
  .tt-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .tt-grid { grid-template-columns: repeat(5, 1fr); }
}

.tt-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: #161823;
}
.tt-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.tt-card:hover img { transform: scale(1.04); }
.tt-card-meta {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Profile */
.tt-profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  text-align: center;
}
@media (min-width: 700px) {
  .tt-profile-head {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 28px;
  }
}
.tt-profile-avatar-wrap {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  line-height: 0;
}
.tt-profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #333;
}
.tt-profile-avatar-edit {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tt-pink, #FE2C55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid var(--tt-bg, #000);
}
@media (min-width: 700px) {
  .tt-profile-avatar { width: 116px; height: 116px; }
}
.tt-profile-info { flex: 1; min-width: 0; width: 100%; }
.pp-emblem {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  vertical-align: -3px;
  object-fit: contain;
  display: inline-block;
}
.tt-profile-handle .pp-emblem {
  width: 18px;
  height: 18px;
}
.tt-profile-handle {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.3px;
}
.tt-profile-username {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tt-text-tertiary);
}
.tt-edit-photo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.tt-edit-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
  flex-shrink: 0;
}
.tt-profile-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
@media (min-width: 700px) {
  .tt-profile-actions { justify-content: flex-start; }
}
.tt-btn {
  height: 36px;
  padding: 0 18px;
  border-radius: 4px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tt-btn-primary { background: var(--tt-pink); color: #fff; }
.tt-btn-primary:hover { background: var(--tt-pink-hover); }
.tt-btn-secondary {
  background: var(--tt-bg-input);
  color: var(--tt-text-primary);
  border: 1px solid var(--tt-border);
}
.tt-btn-secondary.is-following,
.tt-follow-chip.is-following,
.pp-follow-btn.is-following {
  background: var(--tt-bg-input);
  color: var(--tt-text-primary);
}
.tt-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
@media (min-width: 700px) {
  .tt-stats { justify-content: flex-start; }
}
.tt-stat {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
}
.tt-stat strong {
  font-weight: 700;
  margin-right: 4px;
  color: var(--tt-text-primary);
}
.tt-stat span { color: var(--tt-text-tertiary); font-size: 15px; }
.tt-stat--clickable {
  cursor: pointer;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
.tt-stat--clickable:hover { opacity: 0.75; }

.tt-follow-modal {
  width: min(100%, 480px);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
}
.tt-follow-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-follow-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--tt-text-primary);
}
.tt-follow-modal-close {
  background: none;
  border: 0;
  color: var(--tt-text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.tt-follow-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--tt-border);
}
.tt-follow-modal-tab {
  flex: 1;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--tt-text-tertiary);
  cursor: pointer;
}
.tt-follow-modal-tab.active {
  color: var(--tt-text-primary);
  border-bottom-color: var(--tt-pink);
}
.tt-follow-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 240px;
  max-height: 52vh;
  padding: 8px 0;
}
.tt-follow-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tt-follow-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}
.tt-follow-list-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.tt-follow-list-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--tt-bg-input);
}
.tt-follow-list-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tt-follow-list-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--tt-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-follow-list-handle {
  font-size: 13px;
  color: var(--tt-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-follow-list-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  min-width: 88px;
}
.tt-follow-list-state {
  padding: 32px 20px;
  text-align: center;
  color: var(--tt-text-tertiary);
  font-size: 14px;
}
.tt-bio {
  margin: 0;
  white-space: pre-wrap;
  color: var(--tt-text-secondary);
  font-size: 15px;
}
.tt-tabs {
  display: flex;
  border-top: 1px solid var(--tt-border);
  margin-bottom: 8px;
}
.tt-tab {
  flex: 1;
  max-width: 180px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--tt-text-tertiary);
  border-bottom: 2px solid transparent;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  cursor: pointer;
}
.tt-tab.active {
  color: var(--tt-text-primary);
  border-bottom-color: var(--tt-text-primary);
}
.tt-tab-panel[hidden] { display: none; }
.tt-subtabs {
  display: inline-flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  margin: 8px auto 12px;
  padding: 3px;
  width: min(220px, 100%);
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.12);
}
.tt-subtab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--tt-text-tertiary);
  font-weight: 500;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.tt-subtab.active {
  background: var(--tt-bg-elevated, #fff);
  color: var(--tt-text-primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.tt-subpanel[hidden] { display: none; }
.tt-card { position: relative; }
.tt-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 12px;
  z-index: 1;
}
.tt-card-badge--lock { left: auto; right: 6px; }

/* Watch */
.tt-watch {
  display: grid;
  min-height: calc(100dvh - 60px - 49px);
  background: #000;
}
@media (min-width: 1070px) {
  .tt-watch {
    min-height: 100vh;
    grid-template-columns: 1fr 400px;
    gap: 0;
  }
}
.tt-watch-player {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  min-height: 55vh;
  padding: 16px 0;
}
.tt-watch-player video,
.tt-watch-player img {
  width: auto;
  height: min(85vh, 100%);
  max-width: min(390px, 100%);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}
@media (max-width: 1069px) {
  .tt-watch-player {
    padding: 0;
    min-height: 55dvh;
  }
  .tt-watch-player video,
  .tt-watch-player img {
    width: 100%;
    height: auto;
    max-height: 70dvh;
    max-width: 100%;
    border-radius: 0;
  }
}
.tt-watch-panel {
  background: var(--tt-bg-elevated);
  border-left: 1px solid var(--tt-border);
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  color: var(--tt-text-primary);
}
.tt-watch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-watch-head img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.tt-watch-body {
  padding: 16px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-watch-actions {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  align-items: center;
}
.tt-watch-actions button,
.tt-watch-actions .tt-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--tt-text-primary);
}
.tt-watch-actions i { font-size: 22px; }
.tt-watch-actions .liked { color: var(--tt-pink); }
.tt-watch-actions .saved { color: var(--tt-text-primary); }
.tt-comments {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  min-height: 160px;
}
.tt-comment {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--tt-border);
}
.tt-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.tt-comment-text {
  margin: 4px 0 0;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.tt-comment-gif {
  display: block;
  margin-top: 8px;
  max-width: min(220px, 100%);
  max-height: 220px;
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  background: var(--tt-bg-elevated, rgba(0, 0, 0, 0.04));
}
.tt-comment-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--tt-border);
}
.tt-comment-form input {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  padding: 0 12px;
  outline: 0;
}
.tt-comment-form button {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--tt-pink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Auth */
.tt-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--tt-bg);
}
.tt-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--tt-bg-elevated);
  border: 1px solid var(--tt-border);
  border-radius: 8px;
  padding: 36px 32px 28px;
  box-shadow: var(--tt-shadow);
}
.tt-auth-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
}
.tt-auth-sub {
  text-align: center;
  color: var(--tt-text-tertiary);
  margin: 0 0 28px;
  font-size: 14px;
}
.tt-oauth {
  width: 100%;
  height: 44px;
  border-radius: 4px;
  border: 1px solid var(--tt-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
}
.tt-oauth:hover { background: var(--tt-bg-hover); }
.tt-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--tt-text-tertiary);
  font-size: 13px;
}
.tt-divider::before,
.tt-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tt-border);
}
.tt-field { margin-bottom: 14px; }
.tt-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--tt-text-secondary);
}
.tt-field input,
.tt-field textarea,
.tt-field select {
  width: 100%;
  height: 44px;
  border-radius: 4px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  color: var(--tt-text-primary);
  padding: 0 12px;
  outline: 0;
  color-scheme: dark;
}
html.light .tt-field input,
html.light .tt-field textarea,
html.light .tt-field select {
  color-scheme: light;
}
.tt-field textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}
.tt-field input:focus,
.tt-field textarea:focus,
.tt-field select:focus { border-color: var(--tt-text-tertiary); }
.tt-field input:disabled,
.tt-field input[readonly] {
  opacity: 0.75;
  cursor: not-allowed;
}
.tt-field .tt-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--tt-text-tertiary);
}
.tt-phone-row {
  display: flex;
  gap: 8px;
}
.tt-phone-country {
  flex: 0 0 42%;
  max-width: 180px;
}
.tt-phone-row input {
  flex: 1;
  min-width: 0;
}
.tt-phone-actions,
.tt-phone-otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.tt-phone-otp-step {
  margin-top: 6px;
}
.tt-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tt-text-tertiary);
}
.tt-phone-badge.is-verified {
  color: #2ecc71;
  font-weight: 600;
}
.tt-phone-badge.is-verified::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
}
.tt-otp-boxes {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
}
.tt-otp-box {
  width: 44px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 10px;
  border: 1px solid var(--tt-border);
  background: var(--tt-surface, transparent);
  color: var(--tt-text);
  padding: 0;
}
.tt-otp-box:focus {
  outline: none;
  border-color: var(--tt-accent, #fe2c55);
  box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.2);
}
.tt-link-btn {
  background: none;
  border: none;
  color: var(--tt-text-tertiary);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 4px;
  text-decoration: underline;
}
.tt-link-btn:hover {
  color: var(--tt-text);
}
@media (max-width: 480px) {
  .tt-otp-box {
    width: 40px;
    height: 44px;
    font-size: 18px;
  }
  .tt-otp-boxes {
    gap: 6px;
  }
}
.tt-profile-edit-form {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 0 40px;
}
.tt-profile-edit-form .tt-login-btn {
  width: 100%;
  margin-top: 8px;
}
.tt-auth-legal {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--tt-text-tertiary);
}
.tt-auth-legal a {
  color: var(--tt-text-secondary);
  font-weight: 600;
  text-decoration: underline;
}
.tt-auth-foot {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--tt-text-tertiary);
}
.tt-auth-foot a { color: var(--tt-pink); font-weight: 600; }
.tt-error {
  background: rgba(254, 44, 85, 0.1);
  border: 1px solid rgba(254, 44, 85, 0.35);
  color: var(--tt-pink);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* Modal download */
.pp-modal-backdrop,
.tt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pp-modal-backdrop.open,
.tt-modal-backdrop.open { display: flex; }
.pp-modal,
.tt-modal {
  width: min(100%, 420px);
  background: var(--tt-bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--tt-border);
  overflow: hidden;
  animation: ttPop 0.2s ease;
}
@keyframes ttPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.pp-download-card,
.tt-modal-body { padding: 24px; }
.pp-store-btn,
.tt-store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  font-weight: 700;
  margin-top: 10px;
  transition: background 0.15s ease;
}
.pp-store-btn:hover,
.tt-store-btn:hover { background: var(--tt-bg-hover); }
.pp-store-btn.disabled,
.tt-store-btn.disabled { opacity: 0.5; pointer-events: none; }
.pp-store-btn i,
.tt-store-btn i { font-size: 26px; }

.pp-toast,
.tt-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(84, 84, 84, 0.92);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pp-toast.show,
.tt-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (min-width: 1070px) {
  .pp-toast, .tt-toast { bottom: 32px; }
}

/* Compat aliases used by older markup / JS */
.pp-follow-btn { /* mapped via JS classes too */
  height: 28px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: var(--tt-pink);
  border-color: var(--tt-pink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pp-follow-btn.is-following {
  background: var(--tt-bg-input);
  border-color: var(--tt-border);
  color: var(--tt-text-primary);
}
.pp-action-btn.liked i,
.tt-action.liked i { color: var(--tt-pink); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.safe-area-pb { padding-bottom: env(safe-area-inset-bottom, 0); }

/* Tiny helpers still referenced in blades */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.hidden { display: none !important; }

/* Coin wallet chip (sidebar) */
.tt-coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--tt-bg-input);
  border: 1px solid var(--tt-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-text-primary);
  text-decoration: none;
  cursor: pointer;
}
.tt-coin-chip:hover { border-color: var(--tt-pink); }
.tt-coin-chip i { color: #f5c518; font-size: 16px; }
.tt-coin-chip--topbar {
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  max-width: 120px;
}
.tt-coin-chip--topbar .pp-coin-icon {
  width: 14px;
  height: 14px;
}
@media (min-width: 1070px) {
  .tt-coin-chip--topbar { display: none; }
}
.pp-coin-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.pp-coin-icon--sm {
  width: 14px;
  height: 14px;
}
.pp-coin-icon--lg {
  width: 22px;
  height: 22px;
}
.pp-gift-price .pp-coin-icon {
  width: 14px;
  height: 14px;
}

/* Gift sheet */
body.pp-gift-open { overflow: hidden; }
.pp-gift-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.pp-gift-backdrop.open { display: flex; }
.pp-gift-sheet {
  width: min(100%, 480px);
  max-height: min(78vh, 640px);
  background: var(--tt-bg-elevated);
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--tt-border);
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0));
  animation: ppGiftSlide 0.22s ease;
}
@keyframes ppGiftSlide {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.pp-gift-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--tt-border);
  margin: 4px auto 10px;
}
.pp-gift-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pp-gift-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.pp-gift-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-text-secondary);
}
.pp-gift-wallet i { color: #f5c518; }
.pp-gift-wallet .pp-coin-icon { width: 16px; height: 16px; }
.pp-gift-wallet-label {
  font-weight: 500;
  color: var(--tt-text-tertiary);
}
.pp-gift-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.pp-gift-tab {
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  color: var(--tt-text-secondary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.pp-gift-tab.active {
  background: var(--tt-pink);
  border-color: var(--tt-pink);
  color: #fff;
}
.pp-gift-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  overflow-y: auto;
  min-height: 160px;
  padding-bottom: 4px;
}
.pp-gift-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--tt-text-tertiary);
  font-size: 14px;
  padding: 28px 8px;
  margin: 0;
}
.pp-gift-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  cursor: pointer;
  color: var(--tt-text-primary);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.pp-gift-item:hover { border-color: var(--tt-pink); transform: translateY(-1px); }
.pp-gift-item.is-sending { opacity: 0.55; pointer-events: none; }
.pp-gift-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.pp-gift-price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
}
.pp-gift-price i { color: #f5c518; font-size: 13px; }
.pp-gift-send-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--tt-pink);
}
.pp-gift-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(254, 44, 85, 0.15);
  color: var(--tt-pink);
}
.pp-gift-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--tt-text-tertiary);
}
.pp-gift-hint a {
  color: var(--tt-pink);
  font-weight: 700;
  text-decoration: none;
}
.pp-gift-hint a:hover { text-decoration: underline; }
@media (max-width: 420px) {
  .pp-gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Buy coins page */
.pp-coins-page {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
.pp-coins-page.is-busy { opacity: 0.7; pointer-events: none; }
.pp-coins-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 8px;
}
.pp-coins-title {
  margin-bottom: 4px;
}
.pp-coins-sub {
  margin: 0 0 4px;
  color: var(--tt-text-secondary);
  font-size: 14px;
}
.pp-coins-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--tt-bg-input);
  border: 1px solid var(--tt-border);
  font-weight: 700;
  flex-shrink: 0;
}
.pp-coins-wallet i { color: #f5c518; }
.pp-coins-wallet .pp-coin-icon,
.pp-coins-card-amount .pp-coin-icon { width: 22px; height: 22px; }
.pp-coins-wallet-label {
  font-weight: 500;
  color: var(--tt-text-tertiary);
}
.pp-coins-section-title {
  margin: 12px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--tt-text-primary);
}
.pp-coins-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pp-coins-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 92px;
  padding: 14px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--tt-border);
  background: var(--tt-bg-elevated);
  color: inherit;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
button.pp-coins-card:hover {
  border-color: rgba(254, 44, 85, 0.45);
}
.pp-coins-card.is-selected {
  border-color: var(--tt-pink);
  background: rgba(254, 44, 85, 0.06);
  box-shadow: inset 0 0 0 1px var(--tt-pink);
}
.pp-coins-card-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}
.pp-coins-card-amount strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pp-coins-card-amount i { color: #f5c518; font-size: 20px; }
.pp-coins-card--custom .pp-coins-card-amount {
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.25;
}
.pp-coins-card--custom .pp-coins-card-amount .pp-coin-icon {
  width: 20px;
  height: 20px;
}
.pp-coins-card-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--tt-text-secondary);
}
.pp-coins-card.is-selected .pp-coins-card-price {
  color: var(--tt-pink);
}
.pp-coins-custom-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-coins-custom-panel[hidden] { display: none !important; }
.pp-coins-custom-label {
  font-size: 12px;
  color: var(--tt-text-tertiary);
}
.pp-coins-custom-input {
  width: 100%;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-input);
  color: var(--tt-text-primary);
  font-size: 16px;
  font-weight: 700;
}
.pp-coins-sticky {
  position: sticky;
  bottom: calc(49px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  margin: 24px -4px 0;
  padding: 12px 4px 8px;
  background: linear-gradient(180deg, transparent 0%, var(--tt-bg) 28%);
}
.pp-coins-sticky-btn {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--tt-pink);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.pp-coins-sticky-btn:hover:not(:disabled) {
  background: var(--tt-pink-hover);
}
.pp-coins-sticky-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (min-width: 700px) {
  .pp-coins-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 560px;
  }
  .pp-coins-card {
    min-height: 104px;
    padding: 18px 14px;
  }
  .pp-coins-card-amount { font-size: 20px; }
  .pp-coins-card--custom .pp-coins-card-amount { font-size: 13px; }
  .pp-coins-card-price { font-size: 14px; }
}
@media (min-width: 1070px) {
  .tt-page.pp-coins-page {
    padding-bottom: 48px !important;
  }
  .pp-coins-sticky {
    bottom: 0;
    max-width: 560px;
    margin-left: 0;
    margin-right: 0;
  }
}
.pp-coins-history {
  margin-top: 36px;
  padding-top: 4px;
}
.pp-coins-history-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}
.pp-coins-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pp-coins-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-elevated);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pp-coins-history-row:hover {
  border-color: rgba(254, 44, 85, 0.35);
  background: var(--tt-bg-hover);
}
.pp-coins-history-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--tt-bg-input);
  color: var(--tt-text-secondary);
  font-size: 18px;
}
.pp-coins-history-badge.is-credit { color: #1aa05a; }
.pp-coins-history-badge.is-debit { color: var(--tt-pink); }
.pp-coins-history-main {
  min-width: 0;
  flex: 1;
}
.pp-coins-history-type {
  font-size: 14px;
  font-weight: 650;
  color: var(--tt-text-primary);
  line-height: 1.3;
}
.pp-coins-history-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--tt-text-tertiary);
  line-height: 1.3;
}
.pp-coins-history-side {
  text-align: right;
  flex-shrink: 0;
  max-width: 46%;
}
.pp-coins-history-amount {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--tt-text-primary);
  line-height: 1.2;
}
.pp-coins-history-amount .pp-coin-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.pp-coins-history-amount.is-credit { color: #1aa05a; }
.pp-coins-history-amount.is-debit { color: var(--tt-pink); }
.pp-coins-history-balance {
  margin-top: 4px;
  font-size: 11px;
  color: var(--tt-text-tertiary);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.pp-coins-history-empty {
  margin: 8px 0 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--tt-text-secondary);
  border-radius: 14px;
  border: 1px dashed var(--tt-border);
  background: var(--tt-bg-elevated);
}
.pp-coins-history-more {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-elevated);
  color: var(--tt-text-primary);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.pp-coins-history-more:hover {
  border-color: var(--tt-pink);
}
@media (max-width: 520px) {
  .pp-coins-history-more {
    width: 100%;
  }
  .pp-coins-history-side {
    max-width: 42%;
  }
}
/* Gift effects */
.pp-gift-effect {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.pp-gift-effect.open { display: flex; }
.pp-gift-effect.is-classic {
  background: rgba(0, 0, 0, 0.35);
}
.pp-gift-classic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 28px;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.88);
  color: #fff;
  animation: ppGiftClassic 0.35s ease;
  pointer-events: none;
}
.pp-gift-classic-card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
.pp-gift-classic-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
@keyframes ppGiftClassic {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pp-gift-effect.is-exclusive {
  background: transparent;
  pointer-events: none;
}
/* Marco del reel activo (mismo tamaño que .tt-video-wrap) */
.pp-gift-exclusive-stage {
  position: fixed;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  border-radius: 12px;
  background: transparent;
}
@media (max-width: 1069px) {
  .pp-gift-exclusive-stage { border-radius: 0; }
}
/*
 * Exclusive gift: same stage + vertical mask as Flutter.
 * Green removal is done per-pixel on the canvas (not SVG filter on <video>).
 */
.pp-gift-exclusive-video-src {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.pp-gift-exclusive-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 30%,
    #000 35%,
    #000 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 30%,
    #000 35%,
    #000 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: ppGiftExclusiveIn 0.25s ease;
}
@keyframes ppGiftExclusiveIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tt-action.tt-gift-action i { color: #ffd666; }

/* ===== LIVE tab ===== */
.tt-live-page { padding-bottom: 88px; }
.tt-live-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tt-live-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(254, 44, 85, 0.18);
  color: #fe2c55;
  font-size: 0.78rem;
  font-weight: 700;
}
.tt-live-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--tt-text-tertiary);
}
.tt-live-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.45;
}
.tt-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}
@media (min-width: 900px) {
  .tt-live-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tt-live-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tt-surface, #121212);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tt-live-card:hover {
  transform: translateY(-2px);
  border-color: rgba(254, 44, 85, 0.45);
}
.tt-live-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0a0a0a;
}
.tt-live-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tt-live-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #fe2c55;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  z-index: 1;
}
.tt-live-viewers {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.65);
}
.tt-live-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.65rem;
}
.tt-live-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.tt-live-card__text {
  min-width: 0;
  line-height: 1.2;
}
.tt-live-card__text strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-live-card__text span {
  display: block;
  font-size: 0.72rem;
  color: var(--tt-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== LIVE room (phone-frame 9:16) ===== */
.tt-live-room {
  position: relative;
  height: calc(100dvh - var(--tt-topbar-h, 52px) - var(--tt-bottom-h, 56px));
  max-height: calc(100dvh - var(--tt-topbar-h, 52px) - var(--tt-bottom-h, 56px));
  background: #000;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 960px) {
  .tt-live-room {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
    margin: 12px;
  }
}
.tt-live-room__stage {
  position: relative;
  /* Mobile 9:16 frame — full stream visible, letterbox on wide screens */
  height: min(100%, 92dvh);
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: min(100%, 420px);
  background: #0a0a0a;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 0;
}
@media (min-width: 960px) {
  .tt-live-room__stage {
    height: min(100%, calc(100dvh - 48px));
    max-width: min(420px, calc((100dvh - 48px) * 9 / 16));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  }
}
@media (max-width: 719px) {
  .tt-live-room__stage {
    width: min(100%, calc((100dvh - var(--tt-topbar-h, 52px) - var(--tt-bottom-h, 56px)) * 9 / 16));
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}
.tt-live-room__poster,
.tt-live-room__stage > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* cover within 9:16 frame only */
}
.tt-live-room__stage > video { z-index: 1; }
.tt-live-room__status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  pointer-events: none;
  text-align: center;
  padding: 1rem;
}
.tt-live-room__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
}
.tt-live-room__back,
.tt-live-room__mute {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.tt-live-room__host {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: #fff;
}
.tt-live-room__host img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.35);
}
.tt-live-room__host strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.15;
}
.tt-live-room__host span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
}
.tt-live-room__ended {
  position: absolute;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(254, 44, 85, 0.2);
  color: #ff8aa0;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}
.tt-live-room__chat {
  position: absolute;
  left: 0.65rem;
  right: 4.5rem;
  bottom: 4.2rem;
  z-index: 4;
  max-height: 38%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 18%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%);
}
.tt-live-room__row {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  pointer-events: auto;
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  padding: 0.35rem 0.5rem;
  max-width: 100%;
}
.tt-live-room__row img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.tt-live-room__row div {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.92);
  word-break: break-word;
}
.tt-live-room__row strong {
  color: #fff;
  margin-right: 0.2rem;
}
.tt-live-room__row .is-gift { color: #ffd666; }
.tt-live-room__row .is-meta { color: rgba(255,255,255,0.55); font-style: italic; }
.tt-live-room__composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent);
}
.tt-live-room__form {
  flex: 1;
  display: flex;
  gap: 0.35rem;
  min-width: 0;
}
.tt-live-room__form input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  outline: none;
}
.tt-live-room__form input::placeholder { color: rgba(255,255,255,0.45); }
.tt-live-room__send {
  border: 0;
  border-radius: 999px;
  background: #fe2c55;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}
.tt-live-room__gift {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 214, 102, 0.18);
  color: #ffd666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* ===== Feed nav chevrons (desktop only; column right of video, never overlay) ===== */
.tt-feed-shell {
  width: 100%;
  height: 100%;
  display: block;
}
.tt-feed-nav {
  display: none !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .tt-feed-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 692px) 56px minmax(24px, 1fr);
    align-items: stretch;
    column-gap: 0;
  }
  .tt-feed-shell > .tt-feed {
    grid-column: 2;
    width: 100%;
    max-width: 692px;
    justify-self: center;
  }
  .tt-feed-nav {
    grid-column: 3;
    display: flex !important;
    pointer-events: auto;
    align-self: center;
    justify-self: center;
    z-index: 5;
  }
}
.tt-feed-nav button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  font-size: 1.35rem;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.tt-feed-nav button:hover { background: rgba(255,255,255,0.22); }
.tt-feed-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
html.light .tt-feed-nav button {
  background: rgba(22, 24, 35, 0.08);
  color: var(--tt-text-primary);
}
html.light .tt-feed-nav button:hover {
  background: rgba(22, 24, 35, 0.14);
}

/* ===== 404 error page ===== */
.tt-error-page {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(254, 44, 85, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(37, 244, 238, 0.08), transparent 50%),
    var(--tt-bg);
  color: var(--tt-text-primary);
  padding: 2rem 1.25rem;
}
.tt-error-page__inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.tt-error-page__brand {
  display: inline-flex;
  margin-bottom: 1.75rem;
}
.tt-error-page__brand .tt-logo-img {
  width: auto;
  height: 44px;
  max-width: 180px;
}
.tt-error-page__code {
  margin: 0;
  font-size: clamp(4.5rem, 18vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  background: linear-gradient(135deg, var(--tt-pink) 0%, #ff6b8a 45%, var(--tt-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tt-error-page__title {
  margin: 0.85rem 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--tt-text-primary);
}
.tt-error-page__hint {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--tt-text-tertiary);
}
.tt-error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.tt-error-page__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.tt-error-page__btn--primary {
  background: var(--tt-pink);
  color: #fff;
}
.tt-error-page__btn--primary:hover {
  background: var(--tt-pink-hover);
  transform: translateY(-1px);
}
.tt-error-page__btn--ghost {
  background: var(--tt-bg-hover);
  color: var(--tt-text-primary);
  border: 1px solid var(--tt-border);
}
.tt-error-page__btn--ghost:hover {
  background: var(--tt-bg-input);
}

/* Creator monthly subscription panel */
.pp-creator-sub-page { max-width: 720px; }
.pp-creator-sub-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tt-text-secondary);
}
.pp-creator-sub-lead,
.pp-creator-sub-note,
.pp-creator-sub-hint,
.pp-creator-sub-empty,
.pp-creator-sub-status {
  color: var(--tt-text-secondary);
  font-size: 0.9rem;
}
.pp-creator-sub-card {
  margin: 1.25rem 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--tt-border);
}
.pp-creator-sub-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
}
.pp-creator-sub-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  color: var(--tt-text-secondary);
}
.pp-creator-sub-label input,
.pp-creator-sub-label textarea,
.pp-creator-sub-label select {
  background: var(--tt-bg-input);
  border: 1px solid var(--tt-border);
  border-radius: 10px;
  color: var(--tt-text-primary);
  padding: 0.65rem 0.75rem;
}
.pp-creator-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.pp-creator-sub-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}
.pp-creator-sub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}
.pp-creator-sub-stats div {
  padding: 0.75rem 0;
}
.pp-creator-sub-stats span {
  display: block;
  font-size: 0.75rem;
  color: var(--tt-text-secondary);
}
.pp-creator-sub-stats strong {
  font-size: 1.05rem;
}
.pp-creator-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pp-creator-sub-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--tt-border);
  font-size: 0.88rem;
}
.pp-creator-sub-preview {
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 0.75rem;
}
.pp-creator-sub-msg { margin-top: 0.75rem; font-size: 0.9rem; }
.pp-creator-sub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.pp-creator-sub-card-head h2 { margin: 0; }
.pp-creator-sub-interval {
  border: 0;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}
.pp-creator-sub-interval legend {
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  color: var(--tt-text-secondary);
}
.pp-creator-sub-interval label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}
.pp-creator-sub-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.pp-creator-sub-plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pp-creator-sub-plan-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--tt-border);
}
.pp-creator-sub-plan-item strong { display: block; }
.pp-creator-sub-plan-item span,
.pp-creator-sub-plan-item em {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--tt-text-secondary);
  font-style: normal;
}
.pp-creator-sub-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
}
.pp-plan-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.45);
}
.pp-plan-picker[hidden] { display: none; }
.pp-plan-picker-sheet {
  width: min(480px, 100%);
  max-height: 70vh;
  overflow: auto;
  background: var(--tt-bg, #111);
  border-radius: 16px 16px 0 0;
  padding: 1rem 1rem 1.5rem;
}
.pp-plan-picker-sheet h3 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.pp-plan-picker-list { list-style: none; margin: 0; padding: 0; }
.pp-plan-picker-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--tt-border);
}
.pp-plan-picker-list strong { display: block; }
.pp-plan-picker-list span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--tt-text-secondary);
}
@media (max-width: 640px) {
  .pp-creator-sub-row { grid-template-columns: 1fr; }
  .pp-creator-sub-plan-item { flex-direction: column; }
}
