@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {

  --bg: #0B1416;
  --surface: #121F22;
  --surface-raised: #17262A;
  --surface-hover: #1C2D31;
  --border: #1E3033;
  --text: #EAF2F0;
  --text-muted: #7C9490;
  --text-faint: #4E6360;

  --accent: #1FA97C;
  --accent-hover: #24C48F;
  --accent-dim: rgba(31, 169, 124, 0.14);
  --gold: #D4AF6A;
  --gold-dim: rgba(212, 175, 106, 0.14);
  --danger: #E0654F;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.32);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.44);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-h: 62px;
  --header-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F6FAF8;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-hover: #EEF5F2;
  --border: #E1EAE6;
  --text: #0E1B1A;
  --text-muted: #5C726E;
  --text-faint: #93A6A2;

  --accent: #1B8F68;
  --accent-hover: #17754F;
  --accent-dim: rgba(27, 143, 104, 0.10);
  --gold: #A9803E;
  --gold-dim: rgba(169, 128, 62, 0.10);
  --danger: #C94A34;

  --shadow-sm: 0 1px 2px rgba(16,32,28,0.06);
  --shadow-md: 0 8px 24px rgba(16,32,28,0.08);
  --shadow-lg: 0 16px 48px rgba(16,32,28,0.12);

  color-scheme: light;
}

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

html {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100%;
  overscroll-behavior-y: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;

  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}

body.booting > *:not(.boot-screen) {
  opacity: 0 !important;
}
body:not(.booting) > *:not(.boot-screen) {
  animation: app-ready-fade 0.25s ease;
}
@keyframes app-ready-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Boot screen: shown instantly on load (pure HTML/CSS, no JS/network wait),
   matches the native Android splash screen so there is zero visible gap
   between "logo disappears" and "app content appears". */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0B1416;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.boot-logo {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.boot-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body:not(.booting) .boot-screen {
  opacity: 0;
}

/* Subtle pulsing dot below the logo, appears only if loading runs long,
   so the boot screen never looks frozen while waiting near the safety timeout. */
.boot-dot {
  position: absolute;
  bottom: calc(50% - 76px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #1FA97C);
  opacity: 0;
  animation: boot-dot-pulse 1.1s ease-in-out infinite;
  animation-delay: 1.4s;
}
@keyframes boot-dot-pulse {
  0%, 100% { opacity: 0; transform: scale(0.85); }
  50% { opacity: 0.85; transform: scale(1.15); }
}

* {
  -webkit-tap-highlight-color: transparent;
}

* {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, select,
input *, textarea *, select * {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

img, video {
  display: block;
  max-width: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }

input, textarea, select { font-family: inherit; }

* { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.app-header,
.subview-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.app-header {
  z-index: 40;
  padding-top: var(--safe-top);
  justify-content: space-between;
  padding-inline: 16px;
  transform: translateY(0);
  transition: transform 0.25s ease;
}

.app-header.header-hidden {
  transform: translateY(-100%);
}

body:has(#view-player.active) .app-header.header-hidden {
  height: 0;
  min-height: 0;
  border-bottom: none;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #132427, #0B1416);
  overflow: hidden;
}

.brand-mark img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--surface-hover); }
.icon-btn .material-symbols-rounded { font-size: 22px; }

.view { display: none; min-height: calc(100vh - var(--header-h)); }
.view.active { display: block; }

.category-rail {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-rail::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.video-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 16px 24px;
}

.feed-load-more-spinner {
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
  color: var(--text-muted);
}
.feed-load-more-spinner .spin {
  font-size: 22px;
  animation: feed-spin 0.8s linear infinite;
}
@keyframes feed-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-raised);
}
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }

.thumb-fade {
  opacity: 0;
  transition: opacity 0.25s ease;
}
.thumb-fade.thumb-loaded {
  opacity: 1;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 5px;
}

.reel-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.reel-strip {
  display: flex;
  gap: 8px;
  margin: -4px 0 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.reel-strip::-webkit-scrollbar { display: none; }

.reel-strip-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: calc((100% - 16px) / 3);
}
.reel-strip-card .thumb-wrap {
  aspect-ratio: 9/14;
  border-radius: var(--radius-sm);
}
.reel-strip-card .reel-badge {
  font-size: 9px;
  padding: 2px 6px;
  top: 6px;
  left: 6px;
}
.reel-strip-card .duration-badge {
  font-size: 9.5px;
  padding: 1px 5px;
  bottom: 6px;
  right: 6px;
}
.reel-strip-card .video-title {
  font-size: 11.5px;
  -webkit-line-clamp: 2;
  margin-bottom: 0;
}
.reel-strip-card .video-sub { font-size: 10px; }

.following-avatars {
  display: flex;
  gap: 16px;
  padding: 16px 16px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.following-avatars::-webkit-scrollbar { display: none; }

.following-avatar-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 60px;
  cursor: pointer;
}
.following-avatar-item .avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color 0.15s ease;
}
.following-avatar-item:active .avatar-circle { border-color: var(--accent); }
.following-avatar-item .avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.following-avatar-item .avatar-name {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.following-avatar-more .avatar-circle {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.following-avatar-more .avatar-name { color: var(--accent); font-weight: 600; }

.subview-header {
  z-index: 30;
  gap: 4px;
  padding-inline: 8px 16px;
}
.subview-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}

.following-list {
  display: flex;
  flex-direction: column;
  padding: 4px 16px 24px;
}

.following-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.following-list-row:last-child { border-bottom: none; }

.following-list-row .avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.following-list-row .avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.following-list-row .creator-info { flex: 1; min-width: 0; }
.following-list-row .creator-name {
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.following-list-row .creator-followers { font-size: 12px; color: var(--text-muted); }

.video-meta {
  display: flex;
  gap: 10px;
}

.meta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  overflow: hidden;
}
.meta-avatar img { width: 100%; height: 100%; object-fit: cover; }

.meta-text { flex: 1; min-width: 0; }

.video-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}

.video-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.verified-tick {
  color: var(--accent);
  font-size: 14px !important;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  gap: 10px;

  grid-column: 1 / -1;
}
.empty-state .material-symbols-rounded { font-size: 38px; color: var(--text-faint); }
.empty-state h3 { font-family: var(--font-display); font-size: 17px; color: var(--text); font-weight: 600; }
.empty-state p { font-size: 13.5px; max-width: 260px; }

.empty-state-retry { margin-top: 6px; }

body.immersive-view {
  padding-bottom: 0;
}
body.immersive-view .app-header,
body.immersive-view .bottom-nav {
  display: none;
}

body.immersive-view .view.active {
  min-height: 100vh;
  min-height: 100dvh;
}

.reels-view {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.reels-view::-webkit-scrollbar { display: none; }
.reels-view .empty-state { height: 100%; color: #fff; }
.reels-view .empty-state .material-symbols-rounded { color: rgba(255,255,255,0.5); }

.reel-slide {
  height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel-slide video {
  width: 100%;
  height: 100%;

  object-fit: cover;
  background: #000;

  opacity: 0;
  transition: opacity 0.15s ease;
  position: relative;
  z-index: 1;
}
.reel-slide video.ready { opacity: 1; }

.reel-slide-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.reel-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.75);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.32s cubic-bezier(.4,0,.2,1), transform 0.32s cubic-bezier(.34,1.4,.64,1);
  z-index: 4;
}
.reel-center-icon.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.reel-center-icon:active { transform: translate(-50%, -50%) scale(0.88); }
.reel-center-icon svg { width: 36px; height: 36px; transition: opacity 0.15s ease, transform 0.15s ease; pointer-events: none; }
.reel-center-icon:active svg { opacity: 0.75; }
.reel-center-icon svg.icon-swap { opacity: 0; transform: scale(0.7); }

.reel-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  z-index: 4;
  display: none;
}
.reel-spinner.show { display: block; }
.reel-spinner svg { width: 100%; height: 100%; animation: cvp-spin 0.9s linear infinite; }
.reel-spinner circle {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 110;
  stroke-dashoffset: 70;
  opacity: 0.9;
}

.reel-seek-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--safe-bottom, 0px);
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  z-index: 5;
  cursor: pointer;
  touch-action: none;
}
.reel-seek-bg {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  transition: height 0.15s ease;
}
.reel-seek-track.dragging .reel-seek-bg { height: 5px; }
.reel-seek-buffered {
  position: absolute;
  top: 0; left: 0; height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.4);
  border-radius: 999px;
}
.reel-seek-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  width: 0%;
  background: #FF3B30;
  border-radius: 999px;
}
.reel-seek-thumb {
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #FF3B30;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%) scale(0.6);
  left: 0%;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.reel-seek-track.dragging .reel-seek-thumb { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.reel-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 72px 32px 16px;
  padding-bottom: calc(32px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

.reel-info { pointer-events: auto; color: #fff; }

.reel-creator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}
.reel-creator-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.reel-creator-avatar .material-symbols-rounded { font-size: 21px; }
.reel-creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.reel-creator-name {
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Follow button now lives in .reel-actions alongside like/save/share,
   so it inherits the same base look (see .reel-action-btn) and only
   needs the bits specific to its two-icon swap animation + active color. */
.reel-follow-btn {
  position: relative;
  cursor: pointer;
}
/* The add/check icons overlap in the same grid cell so one can fade
   out while the other pops in — that grid needs to be the icon row's
   own wrapper, not every .material-symbols-rounded in the button
   (which would also catch the icon and break .reel-action-btn's
   column layout of icon-over-count). */
.reel-follow-btn .reel-follow-icons {
  display: grid;
}
.reel-follow-icon-add,
.reel-follow-icon-check {
  grid-area: 1 / 1;
}
.reel-follow-btn .reel-follow-icon-check {
  display: none;
  transform: scale(0.4);
  opacity: 0;
}
.reel-follow-btn .reel-follow-icon-add {
  transform: scale(1);
  opacity: 1;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}
.reel-follow-btn:active {
  transform: scale(0.9);
}
/* Followed state: same accent color used for liked/saved, so all
   "active" action states read consistently. */
.reel-follow-btn.following .reel-follow-icon-add {
  display: none;
}
.reel-follow-btn.following .reel-follow-icon-check {
  display: block;
  animation: reel-follow-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 1;
  transform: scale(1);
}
.reel-follow-btn.following .reel-follow-icons {
  color: var(--accent);
  font-variation-settings: 'FILL' 1;
}
@keyframes reel-follow-pop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.reel-desc {
  font-size: 13.5px;
  opacity: 0.94;
  line-height: 1.4;
  max-width: 82%;
  cursor: pointer;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.reel-desc[data-expanded="true"] {
  -webkit-line-clamp: unset;
  max-width: 90%;
}

.reel-actions {
  position: absolute;
  right: 10px;
  bottom: calc(40px + var(--safe-bottom));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}

.reels-exit-btn {
  position: absolute;
  top: calc(14px + var(--safe-top));
  left: 14px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reels-exit-btn .material-symbols-rounded { font-size: 22px; }

.reels-mute-btn {
  position: absolute;
  top: calc(14px + var(--safe-top));
  right: 14px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reels-mute-btn .material-symbols-rounded { font-size: 22px; }

.reel-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: #fff;
}
.reel-action-btn .material-symbols-rounded {
  font-size: 27px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.reel-action-btn span.count { font-size: 11px; font-weight: 600; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.reel-action-btn.liked .material-symbols-rounded { color: var(--accent); font-variation-settings: 'FILL' 1; }
.reel-action-btn.saved .material-symbols-rounded { color: var(--gold); font-variation-settings: 'FILL' 1; }
.reel-action-btn.views-count { cursor: default; }
.reel-action-btn.views-count .material-symbols-rounded { font-size: 24px; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-faint);
  flex: 1;
  height: 100%;
  justify-content: center;
  position: relative;
  transition: color 0.15s ease;
}
.nav-item .material-symbols-rounded { font-size: 23px; transition: transform 0.15s ease; }
.nav-item span.label { font-size: 10.5px; font-weight: 500; }

.nav-item.upload-item { flex: 0.9; }
.nav-item.upload-item .upload-pill {
  width: 44px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.nav-item.upload-item .upload-pill .material-symbols-rounded { font-size: 22px; color: var(--accent); }

.nav-item.active { color: var(--text); }
.nav-item.active .material-symbols-rounded { font-variation-settings: 'FILL' 1; transform: translateY(-1px); }
.nav-item.active .material-symbols-rounded.no-fill { font-variation-settings: 'FILL' 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn .material-symbols-rounded { font-size: 18px; }

.btn-primary { background: var(--accent); color: #06231A; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-hover); }

.btn-following { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.active { display: flex; }
.modal-backdrop.center { align-items: center; padding: 20px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }

.sheet {
  position: relative;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 8px 20px calc(24px + var(--safe-bottom));
  animation: slideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  border: 1px solid var(--border);
  border-bottom: none;
}

.modal-backdrop.center .sheet {
  border-radius: var(--radius-lg);
  border-bottom: 1px solid var(--border);
  max-width: 360px;
  padding: 24px 22px calc(22px + var(--safe-bottom));
  animation: popIn 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 6px auto 14px;
}
.modal-backdrop.center .sheet-handle { display: none; }

.sheet-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 4px;
}
.sheet-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }

.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 80px; }
.field.error input, .field.error textarea { border-color: var(--danger); }

.google-btn {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}
.google-btn:hover { background: var(--surface-hover); }
.google-btn svg { width: 18px; height: 18px; }

.player-view { padding-bottom: 100px; }

.cvp-player {
  width: 100%;
  background: #000;
  aspect-ratio: 16/9;
  position: sticky;
  top: 0;
  z-index: 45;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.cvp-player * { -webkit-tap-highlight-color: transparent; }
.cvp-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

.cvp-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #000;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.cvp-poster.hidden { opacity: 0; }

.cvp-tap-zones { position: absolute; inset: 0; display: flex; z-index: 2; }
.cvp-tap-zone { flex: 1; height: 100%; position: relative; }

.cvp-seek-flash {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cvp-seek-flash-left { left: 10%; }
.cvp-seek-flash-right { right: 10%; }
.cvp-seek-flash.show { opacity: 1; transform: translateY(-50%) scale(1); }
.cvp-seek-flash svg { width: 22px; height: 22px; fill: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7)); }
.cvp-seek-flash span { font-size: 14px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }

.cvp-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.75);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(.4,0,.2,1), transform 0.32s cubic-bezier(.34,1.4,.64,1);
}
.cvp-center-btn.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.cvp-center-btn:active { transform: translate(-50%, -50%) scale(0.88); }
.cvp-center-btn svg { width: 36px; height: 36px; transition: opacity 0.15s ease, transform 0.15s ease; pointer-events: none; }
.cvp-center-btn:active svg { opacity: 0.75; }
.cvp-center-btn svg.icon-swap { opacity: 0; transform: scale(0.7); }

.cvp-unlock-hint {
  position: absolute;
  top: 12px;
  left: 12px;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.5);
  border-radius: 20px;
  padding: 6px 12px 6px 8px;
  z-index: 8;
  cursor: pointer;
}
.cvp-unlock-hint.show { display: flex; }
.cvp-unlock-hint svg { width: 16px; height: 16px; }
.cvp-unlock-hint span { color: #fff; font-size: 11.5px; font-weight: 600; }

.cvp-spinner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  z-index: 4;
  display: none;
  pointer-events: none;
}
.cvp-spinner.show { display: block; }
.cvp-spinner svg { width: 100%; height: 100%; animation: cvp-spin 0.9s linear infinite; }
.cvp-spinner circle {
  fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 110; stroke-dashoffset: 70; opacity: 0.9;
}
@keyframes cvp-spin { to { transform: rotate(360deg); } }

.cvp-error-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  background: rgba(180,0,0,0.85);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  text-align: center;
  max-width: 80%;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cvp-error-banner.show { display: flex; }
.cvp-error-retry-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.cvp-error-retry-btn:active { background: rgba(255,255,255,0.28); }

.cvp-audio-only-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.cvp-audio-only-cover.show { display: flex; }
.cvp-audio-only-cover svg { width: 56px; height: 56px; opacity: 0.85; }
.cvp-audio-only-cover .cvp-aoc-title { color: #fff; font-size: 15px; font-weight: 600; opacity: 0.9; }
.cvp-audio-only-cover .cvp-aoc-sub { color: #aaa; font-size: 12.5px; max-width: 260px; }

.cvp-thumb-preview {
  position: absolute;
  bottom: 44px;
  width: 108px;
  height: 61px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  background: #111;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  transform: translateX(-50%);
  z-index: 6;
}
.cvp-thumb-preview.show { opacity: 1; }
.cvp-thumb-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cvp-thumb-time {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.cvp-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 6px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cvp-controls.hidden { opacity: 0; transform: translateY(6px); pointer-events: none; }

.cvp-seek-row { display: flex; align-items: center; margin-bottom: 2px; }
.cvp-seek-track { position: relative; flex: 1; height: 14px; display: flex; align-items: center; cursor: pointer; }
.cvp-seek-bg {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  transition: height 0.15s ease;
}
.cvp-seek-track:hover .cvp-seek-bg, .cvp-seek-track.dragging .cvp-seek-bg { height: 4px; }
.cvp-seek-buffered {
  position: absolute;
  top: 0; left: 0; height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.4);
  border-radius: 999px;
}
.cvp-seek-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  width: 0%;
  background: #FF3B30;
  border-radius: 999px;
}
.cvp-seek-thumb {
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #FF3B30;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%) scale(0.6);
  left: 0%;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.cvp-seek-track:hover .cvp-seek-thumb, .cvp-seek-track.dragging .cvp-seek-thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cvp-ab-loop-range {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: rgba(245,165,36,0.35);
  min-width: 4px;
  display: none;
}
.cvp-ab-loop-range.show { display: block; }
.cvp-ab-marker {
  position: absolute;
  top: 50%;
  width: 4px; height: 16px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  transform: translate(-50%, -50%);
  display: none;
  pointer-events: none;
}
.cvp-ab-marker.show { display: block; }

.cvp-bottom-row { display: flex; align-items: center; gap: 2px; }
.cvp-spacer { flex: 1; }

.cvp-ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  position: relative;
}
.cvp-ctrl-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.12); }
.cvp-ctrl-btn svg { width: 25px; height: 25px; fill: #fff; }

.cvp-ctrl-btn.active { background: var(--accent); }
.cvp-ctrl-btn.active:active { background: var(--accent); }

.cvp-ctrl-btn.ab-pending { box-shadow: inset 0 0 0 2px var(--accent); }
.cvp-ctrl-btn.ab-active { background: var(--accent); }
.cvp-ctrl-btn.ab-active:active { background: var(--accent); }

.cvp-time-display {
  font-size: 11.5px;
  font-weight: 500;
  color: #fff;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cvp-speed-wrap { position: relative; }
.cvp-speed-btn { font-size: 14px; font-weight: 700; width: auto; padding: 0 8px; min-width: 40px; }
.cvp-speed-menu {
  position: absolute;
  bottom: 38px;
  right: -4px;
  background: rgba(24,24,24,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 76px;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.5);
  z-index: 10;
}
.cvp-speed-menu.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cvp-speed-option {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.cvp-speed-option:active { background: rgba(255,255,255,0.08); color: #fff; }
.cvp-speed-option.active { color: var(--accent); background: rgba(245,165,36,0.12); }

@media (max-width: 400px) {
  .cvp-time-display { font-size: 10.5px; margin-left: 2px; }
  .cvp-controls { padding: 6px 6px 8px; }
  .cvp-bottom-row { gap: 0; }
  .cvp-ctrl-btn { width: 34px; height: 34px; }
  .cvp-ctrl-btn svg { width: 22px; height: 22px; }
  .cvp-speed-btn { font-size: 12.5px; padding: 0 5px; min-width: 32px; }
}

.player-body { padding: 14px 16px; }

.upload-page-body { padding: 16px 16px 32px; }

.player-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}

.player-stats { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }

.creator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.creator-row img { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); }
.creator-row .creator-info { flex: 1; min-width: 0; }
.creator-row .creator-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
.creator-row .creator-followers { font-size: 12px; color: var(--text-muted); }

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.action-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.action-pill .material-symbols-rounded { font-size: 18px; }
.action-pill.liked { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.action-pill.liked .material-symbols-rounded { font-variation-settings: 'FILL' 1; }
.action-pill.saved { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, var(--border)); }
.action-pill.saved .material-symbols-rounded { font-variation-settings: 'FILL' 1; }

.desc-chevron {
  transition: transform 0.25s ease;
}
#descToggleBtn.active .desc-chevron { transform: rotate(180deg); }

.desc-plain-full {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.desc-plain.open .desc-plain-full { max-height: 1200px; }
.desc-full-text {
  position: relative;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--border);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  white-space: pre-wrap;
  letter-spacing: 0.005em;
}
.desc-plain.open { margin-top: 14px; margin-bottom: 8px; }

.section-label {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.related-list { display: flex; flex-direction: column; gap: 14px; }
.related-item { display: flex; gap: 10px; cursor: pointer; }
.related-item .thumb-wrap { width: 130px; flex-shrink: 0; aspect-ratio: 16/9; }
.related-item .related-text { min-width: 0; flex: 1; }
.related-item .video-title { font-size: 13.5px; -webkit-line-clamp: 2; }
.related-item .video-sub {
  font-size: 11.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 2px;
}

.profile-header {
  padding: 24px 20px 18px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.profile-options-wrap {
  position: absolute;
  top: 14px;
  right: 14px;
}
.profile-options-btn { position: static; }
.profile-options-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 176px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  z-index: 50;
}
.profile-options-popover.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.popover-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
}
.popover-option:active { background: var(--surface); }
.popover-option .material-symbols-rounded { color: var(--text-faint); font-size: 17px; }

.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.profile-username { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.profile-bio { font-size: 13.5px; color: var(--text-muted); margin-top: 10px; max-width: 300px; margin-inline: auto; line-height: 1.5; }

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 16px;
}
.profile-stat { text-align: center; }
.profile-stat b { display: block; font-size: 16px; font-weight: 700; font-family: var(--font-mono); }
.profile-stat span { font-size: 11.5px; color: var(--text-muted); }

.profile-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  background: var(--bg);
  z-index: 10;
}
.profile-tab {
  flex: 1;
  padding: 13px 0;
  text-align: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.profile-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px;
}
.grid-card { border-radius: var(--radius-md); overflow: hidden; }
.grid-card .thumb-wrap { border-radius: var(--radius-md); margin-bottom: 6px; }
.grid-card .video-title { font-size: 12.5px; -webkit-line-clamp: 2; margin-bottom: 2px; }
.grid-card .video-sub { font-size: 11px; }

.profile-reel-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 12px;
}
.profile-reel-grid .reel-strip-card { min-width: 0; }

#profileGrid > .profile-reel-grid + .video-grid {
  margin-top: 4px;
}

.upload-preview {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1.5px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.upload-preview img, .upload-preview video { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .material-symbols-rounded { font-size: 30px; }
.upload-preview span.hint { font-size: 12.5px; }

.thumb-options { display: flex; gap: 8px; margin-bottom: 16px; }
.thumb-options .btn { flex: 1; }

.progress-wrap { margin-top: 8px; }
.progress-track {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-raised);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s ease;
}
.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  font-family: var(--font-mono);
}

.type-toggle {
  display: flex;
  background: var(--surface-raised);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.type-toggle button {
  flex: 1;
  padding: 9px 0;
  border-radius: var(--radius-pill);
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.type-toggle button.active { background: var(--accent); color: #06231A; }

.apply-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.apply-icon-badge .material-symbols-rounded { font-size: 26px; color: var(--gold); font-variation-settings: 'FILL' 1; }

.support-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}
.support-contact-item .material-symbols-rounded { font-size: 20px; color: var(--gold); flex-shrink: 0; }
a.support-contact-item:active { opacity: 0.7; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-stack {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  left: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.toast .material-symbols-rounded { font-size: 17px; color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.desktop-notice {
  position: fixed;
  inset: 0;
  background: var(--bg);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 9999;
  text-align: center;
  padding: 24px;
}
.desktop-notice.active { display: flex; }
.desktop-notice h2 { font-family: var(--font-display); font-size: 22px; }
.desktop-notice p { color: var(--text-muted); max-width: 320px; }

.hidden { display: none !important; }
.report-options { display: flex; flex-direction: column; gap: 2px; }
.report-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
  text-align: left;
}
.report-option:last-child { border-bottom: none; }
.report-option .material-symbols-rounded { color: var(--text-faint); font-size: 18px; }

.username-check { font-size: 12px; margin-top: 5px; display: flex; align-items: center; gap: 4px; min-height: 16px; }
.username-check.ok { color: var(--accent); }
.username-check.taken { color: var(--danger); }
.username-check .material-symbols-rounded { font-size: 14px; }

@media (min-width: 560px) {
  body { max-width: 480px; margin: 0 auto; border-inline: 1px solid var(--border); min-height: 100vh; }
  .app-header, .bottom-nav { max-width: 480px; margin: 0 auto; }
}

