:root {
  color-scheme: dark;
  --bg: #06080d;
  --bg-elevated: #0e1520;
  --bg-soft: rgba(16, 26, 38, 0.82);
  --bg-card: rgba(18, 28, 42, 0.9);
  --bg-glass: rgba(12, 20, 31, 0.68);
  --stroke: rgba(109, 146, 178, 0.22);
  --stroke-strong: rgba(109, 146, 178, 0.42);
  --text: #f6fbff;
  --text-soft: #d8e7f2;
  --muted: #b0c4d8;
  --muted-strong: #cfdee9;
  --primary: #3ce6dc;
  --primary-strong: #7df8ef;
  --secondary: #ff8a3d;
  --accent: #8b5cf6;
  --success: #6ef3b0;
  --danger: #ff647c;
  --warning: #ffb14f;
  --radius-xs: 10px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --shadow-soft: 0 18px 44px rgba(0, 0, 0, 0.32);
  --shadow-deep: 0 36px 90px rgba(0, 0, 0, 0.44);
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(60, 230, 220, 0.12), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(255, 138, 61, 0.16), transparent 24%),
    radial-gradient(circle at 50% 120%, rgba(139, 92, 246, 0.12), transparent 32%),
    linear-gradient(180deg, #08101a 0%, #06080d 28%, #070c12 100%);
  overflow-x: hidden;
}

body.assistant-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.cinema-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.64), transparent 84%);
  pointer-events: none;
}

.ambient-orb {
  position: fixed;
  inset: auto;
  z-index: -2;
  width: 28rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.32;
  pointer-events: none;
}

.ambient-orb-one {
  top: -7rem;
  left: -5rem;
  background: radial-gradient(circle, rgba(60, 230, 220, 0.8), rgba(60, 230, 220, 0));
}

.ambient-orb-two {
  right: -4rem;
  top: 10rem;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.72), rgba(255, 138, 61, 0));
}

.glass-panel,
.glass-strip {
  background: linear-gradient(180deg, rgba(18, 28, 42, 0.82), rgba(10, 16, 25, 0.7));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(26px) saturate(150%);
}

.glass-panel {
  border-radius: var(--radius-md);
}

.glass-strip {
  border-radius: 0;
}

.eyebrow {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 460px);
  gap: 28px;
  padding: 32px;
  align-items: center;
}

.auth-showcase,
.login-panel {
  position: relative;
  overflow: hidden;
}

.auth-showcase {
  min-height: 42rem;
  padding: 3rem;
  display: grid;
  align-content: end;
  gap: 1.4rem;
}

.auth-showcase h1 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.auth-copy,
.login-copy {
  margin: 0;
  max-width: 42rem;
  color: var(--muted-strong);
  line-height: 1.7;
}

.auth-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-stat-card {
  padding: 1rem 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-stat-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-stat-card strong {
  font-size: 1rem;
}

.auth-showcase-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  mix-blend-mode: screen;
  pointer-events: none;
}

.login-panel {
  padding: 2.2rem;
  width: min(100%, 460px);
}

.login-logo {
  width: 92px;
  height: 92px;
  margin-bottom: 1.15rem;
  border-radius: 26px;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(60, 230, 220, 0.18);
}

.login-panel h2 {
  margin: 0.2rem 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.login-form,
.auth-actions {
  display: grid;
  gap: 14px;
}

.login-form {
  margin-top: 1.6rem;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.login-form input,
.search-box input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.login-form input {
  height: 54px;
  padding: 0 16px;
  border-radius: 18px;
}

.login-form input:focus,
.search-box:focus-within {
  border-color: rgba(60, 230, 220, 0.48);
  box-shadow: 0 0 0 3px rgba(60, 230, 220, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.voice-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.primary-btn svg,
.secondary-btn svg,
.ghost-btn svg,
.icon-btn svg,
.voice-search-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.primary-btn {
  padding: 0 1.3rem;
  font-weight: 800;
  color: #071116;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  box-shadow: 0 18px 44px rgba(60, 230, 220, 0.22);
}

.secondary-btn {
  padding: 0 1.15rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.1);
}

.ghost-btn {
  padding: 0 1.1rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.icon-btn,
.voice-search-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.voice-search-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover,
.voice-search-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(60, 230, 220, 0.35);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.status-text {
  min-height: 24px;
  margin: 1rem 0 0;
  color: var(--muted);
}

.auth-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 7rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto auto minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 14px clamp(1rem, 2vw, 2rem);
  border-width: 0 0 1px;
  background: linear-gradient(180deg, rgba(9, 14, 22, 0.74), rgba(9, 14, 22, 0.48));
}

.topbar.is-scrolled {
  background: linear-gradient(180deg, rgba(9, 14, 22, 0.94), rgba(9, 14, 22, 0.84));
  box-shadow: var(--shadow-soft);
}

.brand,
.profile-chip,
.search-box {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 0.8rem;
  color: var(--muted);
}

.nav-links a {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.search-cluster {
  position: relative;
  justify-self: end;
  width: min(420px, 100%);
}

.search-box {
  width: 100%;
  min-height: 58px;
  gap: 10px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box svg {
  color: var(--muted);
}

.search-box input {
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}

.search-box input::placeholder {
  color: rgba(147, 166, 187, 0.82);
}

.search-suggestion-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 16, 25, 0.96);
  box-shadow: var(--shadow-deep);
}

.search-suggestion-list,
.assistant-suggestion-list {
  display: grid;
  gap: 10px;
}

.search-suggestion-item,
.assistant-suggestion-item {
  width: 100%;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.24rem;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.search-suggestion-item strong,
.assistant-suggestion-item strong {
  font-size: 0.98rem;
}

.search-suggestion-item span,
.assistant-suggestion-item span {
  font-size: 0.82rem;
  color: var(--muted);
}

.search-suggestion-item:hover,
.assistant-suggestion-item:hover {
  border-color: rgba(60, 230, 220, 0.2);
  background: rgba(60, 230, 220, 0.08);
}

.profile-chip {
  gap: 10px;
  padding: 0.5rem 0.6rem 0.5rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 220px;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(60, 230, 220, 0.28), rgba(139, 92, 246, 0.28));
  color: var(--primary-strong);
}

.profile-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-dock {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 26;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px;
  gap: 8px;
}

.mobile-dock a,
.mobile-dock button {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 20px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.mobile-dock a:hover,
.mobile-dock button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.mobile-dock svg {
  width: 18px;
  height: 18px;
}

.hero {
  position: relative;
  min-height: 92vh;
  padding: clamp(5.5rem, 9vw, 7.5rem) clamp(1rem, 4vw, 4rem) clamp(2rem, 5vw, 3.2rem);
  overflow: clip;
}

.hero-media,
.hero-sheen {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  opacity: 0.56;
  filter: saturate(1.08);
  animation: drift 18s ease-in-out infinite alternate;
}

.hero-sheen {
  background:
    linear-gradient(180deg, rgba(4, 8, 13, 0.1), rgba(4, 8, 13, 0.7) 72%, rgba(4, 8, 13, 1)),
    radial-gradient(circle at 20% 24%, rgba(60, 230, 220, 0.2), transparent 24%),
    linear-gradient(90deg, rgba(4, 8, 13, 0.98) 0%, rgba(4, 8, 13, 0.68) 42%, rgba(4, 8, 13, 0.18) 82%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  min-height: calc(92vh - 10rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.75fr);
  gap: clamp(1.5rem, 3vw, 2.8rem);
  align-items: end;
}

.hero-content {
  max-width: 760px;
  display: grid;
  gap: 1rem;
}

.hero-content > * {
  animation: fade-up 520ms ease both;
}

.hero-content > *:nth-child(2) {
  animation-delay: 80ms;
}

.hero-content > *:nth-child(3) {
  animation-delay: 130ms;
}

.hero-content > *:nth-child(4) {
  animation-delay: 180ms;
}

.hero-content > *:nth-child(5) {
  animation-delay: 230ms;
}

.hero-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.status-pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(60, 230, 220, 0.2);
  background: rgba(60, 230, 220, 0.1);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

#heroDescription {
  margin: 0;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.78;
}

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

.hero-meta span,
.mood-chip,
.curation-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.hero-support {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-resume-btn {
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-moods,
.curated-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mood-chip,
.curation-chip {
  border: 0;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.mood-chip:hover,
.curation-chip:hover {
  background: rgba(60, 230, 220, 0.1);
  color: var(--text);
}

.hero-sidecars {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

.hero-sidecar-shell {
  width: 100%;
  padding: 1.35rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 12, 19, 0.8), rgba(7, 12, 19, 0.56));
  box-shadow: var(--shadow-deep);
}

.hero-feature-cards {
  display: grid;
  gap: 12px;
  margin-top: 1rem;
}

.feature-card {
  padding: 1rem 1rem 1.1rem;
  display: grid;
  gap: 0.65rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.feature-card.hero-card--accent {
  border-color: rgba(60, 230, 220, 0.18);
  background: linear-gradient(180deg, rgba(60, 230, 220, 0.14), rgba(255, 255, 255, 0.04));
}

.feature-card.hero-card--warm {
  border-color: rgba(255, 138, 61, 0.18);
  background: linear-gradient(180deg, rgba(255, 138, 61, 0.14), rgba(255, 255, 255, 0.04));
}

.feature-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.02rem;
  font-family: var(--font-display);
}

.feature-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.feature-card button {
  justify-self: start;
}

.quick-actions {
  margin: 0 clamp(1rem, 4vw, 4rem) 1.2rem;
  padding: 1.4rem;
  border-radius: 30px;
  display: grid;
  gap: 1rem;
}

.quick-actions-head h3 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.quick-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.device-pill {
  margin-left: auto;
  min-width: 220px;
  padding: 0.9rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.device-pill-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.device-status {
  display: block;
  margin-top: 0.3rem;
  color: var(--text);
  font-size: 0.96rem;
}

.curated-strip,
.filter-strip {
  padding: 0 clamp(1rem, 4vw, 4rem);
  margin-bottom: 1.4rem;
}

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.curation-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 clamp(1rem, 4vw, 4rem);
  margin-bottom: 2rem;
}

.intelligence-card {
  min-height: 100%;
  padding: 1.35rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.intel-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.intel-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intel-icon-watch {
  color: var(--secondary);
}

.intel-icon-offline {
  color: var(--primary);
}

.intel-copy {
  display: grid;
  gap: 0.45rem;
}

.intel-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.intel-copy p:last-child {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.assistant-launch {
  grid-column: 1 / -1;
  justify-self: start;
}

.rails {
  display: grid;
  gap: 2.4rem;
  padding: 0 clamp(1rem, 4vw, 4rem);
}

.rail {
  display: grid;
  gap: 1rem;
}

.rail-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.rail-header-copy {
  display: grid;
  gap: 0.35rem;
}

.rail-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  letter-spacing: -0.04em;
}

.rail-header p,
.rail-header span {
  margin: 0;
  color: var(--muted);
}

.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 24vw);
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 20px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(60, 230, 220, 0.48) rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
}

.tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 0.78;
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  scroll-snap-align: start;
  box-shadow: var(--shadow-soft);
  isolation: isolate;
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.tile:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(60, 230, 220, 0.24);
  box-shadow: var(--shadow-deep);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
  transition: transform 320ms ease, opacity 320ms ease, filter 320ms ease;
}

.tile:hover img {
  transform: scale(1.08);
  opacity: 1;
  filter: saturate(1.08);
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 8, 13, 0.06) 0%, rgba(6, 8, 13, 0.5) 54%, rgba(6, 8, 13, 0.96) 100%),
    radial-gradient(circle at top right, rgba(60, 230, 220, 0.18), transparent 26%);
  z-index: 0;
}

.tile-progress {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  z-index: 2;
}

.tile-progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.tile-body {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 0.72rem;
  padding: 18px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.tile:hover .tile-body,
.tile:focus-visible .tile-body {
  opacity: 1;
  transform: translateY(0);
}

.tile-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(60, 230, 220, 0.18);
  background: rgba(60, 230, 220, 0.12);
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.badge.is-warm {
  color: #ffd1b7;
  background: rgba(255, 138, 61, 0.14);
  border-color: rgba(255, 138, 61, 0.18);
}

.tile-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.tile-description {
  display: block;
  color: rgba(246, 251, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.55;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(4px);
  transition: max-height 240ms ease, opacity 240ms ease, transform 240ms ease;
}

.tile:hover .tile-description,
.tile:focus-visible .tile-description {
  max-height: 7rem;
  opacity: 1;
  transform: translateY(0);
}

.tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tile-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tile-action {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.tile-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(60, 230, 220, 0.28);
}

.tile-action.is-active {
  color: var(--primary-strong);
  background: rgba(60, 230, 220, 0.12);
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  color: var(--muted-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    url("./assets/profile-placeholder.svg") center / 220px no-repeat;
}

.assistant-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(2, 4, 8, 0.56);
  backdrop-filter: blur(10px);
}

.assistant-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: min(420px, calc(100vw - 24px));
  padding: 1.1rem;
  display: grid;
  align-content: start;
  gap: 1rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 12, 19, 0.94);
  box-shadow: var(--shadow-deep);
  transform: translateX(18px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.assistant-panel.is-open {
  transform: translateX(0);
  opacity: 1;
}

.assistant-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.assistant-panel-head h2 {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.assistant-profile {
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
}

.assistant-profile img {
  width: 68px;
  height: 68px;
  border-radius: 22px;
}

.assistant-profile strong {
  display: block;
  margin-bottom: 0.32rem;
}

.assistant-profile p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.assistant-suggestion-item {
  border-radius: 20px;
}

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 18px;
  background:
    radial-gradient(circle at 16% 18%, rgba(60, 230, 220, 0.12), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(255, 138, 61, 0.12), transparent 20%),
    rgba(2, 4, 8, 0.92);
  backdrop-filter: blur(20px);
}

.player-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.player-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.player-heading h2,
.watch-panel h3,
.up-next-card h4 {
  margin: 0;
}

.player-heading p,
.watch-panel p {
  margin: 0;
  color: var(--muted);
}

.player-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
}

.video-container {
  grid-column: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-deep);
}

.video-container video {
  width: 100%;
  height: 100%;
  min-height: 360px;
  max-height: calc(100vh - 128px);
  object-fit: contain;
  background: #000;
}

.watch-panel {
  grid-column: 2;
  min-height: 0;
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  overflow: auto;
}

.watch-stats {
  display: grid;
  gap: 10px;
}

.watch-stats div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.watch-stats dt {
  color: var(--muted);
}

.watch-stats dd {
  margin: 0;
  color: var(--text-soft);
}

.watch-section {
  display: grid;
  gap: 10px;
}

.watch-section-title {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.scene-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-marker {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.scene-marker:hover,
.scene-marker.is-active {
  border-color: rgba(60, 230, 220, 0.28);
  background: rgba(60, 230, 220, 0.1);
  color: var(--text);
}

.gesture-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted-strong);
  line-height: 1.7;
}

.up-next-card {
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.12), rgba(255, 255, 255, 0.03));
}

.up-next-card p {
  color: var(--muted-strong);
}

.ad-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.ad-overlay,
.player-error {
  position: absolute;
  z-index: 5;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  background: rgba(4, 10, 15, 0.82);
}

.ad-overlay {
  top: 18px;
  width: fit-content;
  right: auto;
  padding: 10px 16px;
}

.ad-overlay strong {
  color: var(--primary-strong);
}

.player-error {
  bottom: 18px;
  padding: 14px 16px;
  color: #ffe4ea;
  border-color: rgba(255, 100, 124, 0.42);
  background: rgba(56, 10, 20, 0.84);
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
}

.toast {
  padding: 14px 16px;
  border-radius: 22px;
  color: var(--text);
  background: rgba(9, 18, 27, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.toast.error {
  border-color: rgba(255, 100, 124, 0.35);
}

.toast.success {
  border-color: rgba(110, 243, 176, 0.28);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-1.5%, 1%, 0);
  }
}

@media (max-width: 1180px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    min-height: 30rem;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .nav-links {
    display: none;
  }

  .search-cluster {
    width: 100%;
  }

  .hero-layout,
  .player-grid,
  .intelligence-grid {
    grid-template-columns: 1fr;
  }

  .video-container,
  .watch-panel {
    grid-column: auto;
  }

  .hero-sidecars {
    align-self: start;
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 78px;
  }

  .profile-chip {
    display: none;
  }

  .hero {
    min-height: 84vh;
    padding-top: 5rem;
  }

  .hero-layout {
    min-height: auto;
  }

  .quick-actions,
  .curated-strip,
  .intelligence-grid,
  .rails {
    padding-left: 16px;
    padding-right: 16px;
  }

  .quick-actions {
    margin-left: 16px;
    margin-right: 16px;
  }

  .rail-track {
    grid-auto-columns: minmax(220px, 62vw);
  }

  .player-overlay {
    padding: 12px;
  }

  .watch-panel {
    max-height: 42vh;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 16px;
  }

  .auth-showcase {
    padding: 1.5rem;
    min-height: 24rem;
  }

  .auth-stat-grid {
    grid-template-columns: 1fr;
  }

  .login-panel {
    padding: 1.4rem;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 12px 14px;
  }

  .search-cluster {
    grid-column: 1 / -1;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .mobile-dock {
    display: grid;
  }

  .hero h2 {
    font-size: 2.9rem;
  }

  .hero-actions .primary-btn,
  .hero-actions .secondary-btn,
  .hero-actions .ghost-btn {
    width: 100%;
  }

  .device-pill {
    width: 100%;
    margin-left: 0;
  }

  .tile {
    aspect-ratio: 0.7;
  }

  .rail-track {
    grid-auto-columns: minmax(210px, 76vw);
  }

  .player-topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .player-actions {
    grid-column: 1 / -1;
  }

  .video-container video {
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
