:root {
  color-scheme: dark;
  --bg: #151515;
  --panel: #1c1c1c;
  --panel-2: #282828;
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --muted: #8e8e93;
  --accent: #ff2b73;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

#app {
  height: 100%;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  border: 0;
  outline: 0;
  box-shadow: none;
  background:
    linear-gradient(180deg, #151515 0%, #141414 24%, #121212 58%, #111 100%);
}

.watch-mode {
  max-width: none;
}

.top-mini {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  min-height: calc(env(safe-area-inset-top, 0px) + 70px);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 18px 10px;
  background: #141414;
  backdrop-filter: blur(10px);
}

.top-mini::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  z-index: 0;
  height: 4px;
  pointer-events: none;
  background: #141414;
  content: "";
}

.top-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  height: 42px;
  text-align: center;
}

.top-mini-left {
  position: relative;
  z-index: 1;
  justify-self: start;
  display: flex;
  align-items: center;
}

.top-logo {
  display: block;
  object-fit: cover;
  width: 22px;
  height: 22px;
  border-radius: 5.5px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.24);
}

.top-mini strong {
  font-size: 18px;
  font-weight: 700;
}

.home-fixed-panel .top-mini,
.list-fixed-panel .top-mini,
.profile-fixed-panel .top-mini {
  padding-right: 0;
  padding-left: 0;
}

.mini-actions {
  position: relative;
  z-index: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0 11px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: #202020;
  color: #aaa;
  font-size: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 6px 14px rgba(0, 0, 0, 0.16);
}

.mini-actions span:first-child {
  padding-right: 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.mini-actions span:last-child {
  font-size: 12px;
  line-height: 1;
}

.screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 18px 96px;
  background: transparent;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.screen::-webkit-scrollbar {
  display: none;
}

.home-screen,
.library-screen,
.profile-screen,
.legal-screen {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding: 0 18px 0;
}

.home-fixed-panel {
  position: relative;
  top: 0;
  z-index: 80;
  flex: 0 0 auto;
  padding: 12px 0 10px;
  background: #141414;
}

.list-fixed-panel,
.profile-fixed-panel,
.legal-fixed-panel {
  position: relative;
  z-index: 80;
  flex: 0 0 auto;
  padding-bottom: 18px;
  background: #141414;
}

/* My List 与 Profile 使用内容区首行，不再重复应用内标题或模拟系统按钮。 */
.list-fixed-panel {
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  padding-bottom: 10px;
}

.profile-fixed-panel {
  padding-bottom: 8px;
}

.legal-fixed-panel {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  min-height: calc(env(safe-area-inset-top, 0px) + 70px);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 0 10px;
}

.legal-fixed-panel strong {
  justify-self: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.back-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.home-search {
  position: relative;
  z-index: 90;
  margin-top: 0;
  isolation: isolate;
  transform: translateZ(0);
}

.home-search label {
  position: relative;
  z-index: 91;
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(100%, 390px);
  min-height: 30px;
  margin: 0 auto;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.032);
  background: #202020;
  color: #ccc;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.16);
}

.home-search span {
  font-size: 16px;
  line-height: 1;
}

.home-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  /* iOS 会在小于 16px 的输入框获得焦点时自动放大页面。 */
  font-size: 16px;
}

.home-search input::placeholder {
  color: #777;
}

.home-section {
  margin-top: 17px;
  padding-bottom: 0;
}

.poster-scroll {
  padding-bottom: 0;
}

.list-scroll,
.profile-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.list-scroll::-webkit-scrollbar,
.profile-scroll::-webkit-scrollbar {
  display: none;
}

.home-scroll::-webkit-scrollbar {
  display: none;
}

.home-scroll {
  flex: 1 1 auto;
  width: calc(100% + 36px);
  min-height: 0;
  margin-inline: -18px;
  padding-inline: 18px;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-hero {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin: 2px -18px 12px;
  overflow: visible;
}

.top-chart,
.new-releases {
  margin: -8px 0 12px;
}

.top-chart h1,
.new-releases h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.45px;
  line-height: 21px;
  transform: translateY(3px);
}

.top-chart-rail,
.new-releases-rail {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-inline: -18px;
  padding: 0 18px 4px;
  scroll-padding-inline: 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.top-chart-rail::-webkit-scrollbar,
.new-releases-rail::-webkit-scrollbar {
  display: none;
}

.top-chart-card,
.new-releases-card {
  flex: 0 0 calc((100% - 54px) / 3);
}

.must-watch-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 20px;
  transform: translateY(3px);
}

.hero-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 20px 14% 34px;
  scroll-padding: 0 14%;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--hero-slide-width, 76%);
  aspect-ratio: 9 / 13.4;
  margin: 0 -11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 22px;
  background: #111;
  scroll-snap-align: center;
  transform: scale(0.78);
  transform-origin: center;
  filter: brightness(0.42) saturate(0.78);
  will-change: transform, filter;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.hero-slide.is-active {
  z-index: 4;
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.58);
}

.hero-slide img,
.hero-slide-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  object-fit: cover;
}

.hero-slide-shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 38%, rgba(0, 0, 0, 0.44) 100%);
}

.hero-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding-left: 3px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 19px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.34);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 6px;
  transform: translateY(-14px);
}

.hero-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: width 380ms cubic-bezier(0.22, 1, 0.36, 1), background 380ms ease;
}

.hero-dots span.active {
  width: 28px;
  background: #fff;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.section-title h1,
.list-page h1,
.profile-page h1,
.legal-page h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
}

.section-title h1 {
  font-size: 18px;
  line-height: 18px;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 2px 3px 2px 2px;
  border: 1.5px solid rgba(255, 255, 255, 0.86);
  border-radius: 7px;
  color: #fff;
  line-height: 1;
}

.age-badge b {
  display: grid;
  place-items: center;
  height: 16px;
  width: 20px;
  min-width: 20px;
  border-radius: 5px;
  background: #fff;
  color: #111;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.age-badge em {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 1px 2px 1px 3px;
  min-width: 22px;
  height: 16px;
  font-family:
    "Arial Rounded MT Bold", "Trebuchet MS", "Comic Sans MS", system-ui,
    sans-serif;
  font-size: 7px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.82;
  text-align: left;
}

.age-badge em span {
  display: block;
  width: 100%;
}

.age-badge em span:first-child {
  transform: translateY(-0.8px);
}

.age-badge em span:last-child {
  transform: translateY(1.2px);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 9px;
}

.poster-card {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: #111;
  box-shadow: none;
}

.poster-wrap::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 25%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.28) 44%,
    rgba(0, 0, 0, 0.76)
  );
  content: "";
  pointer-events: none;
}

.poster-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.03);
}

.poster-wrap span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 1;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  font-size: 10px;
}

.poster-wrap h2 {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.18;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.82);
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.detail-simple,
.legal-page {
  padding: 20px 0;
}

.legal-page {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 86px;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.legal-page::-webkit-scrollbar {
  display: none;
}

.detail-simple img {
  width: 100%;
  max-height: 52vh;
  border-radius: var(--radius);
  object-fit: cover;
}

.detail-simple h1 {
  margin: 16px 0 8px;
}

.detail-simple p,
.legal-page p,
.reserved-note p {
  color: var(--muted);
  line-height: 1.5;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 20px;
}

.faq-list details {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  float: right;
  color: var(--muted);
  content: "+";
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list details p {
  margin: 0;
  padding: 0 14px 14px;
  font-size: 14px;
}

.support-mail-button {
  margin-top: 4px;
}

.watch-container {
  min-height: 100vh;
}

.watch-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  touch-action: auto;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.watch-screen * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.watch-screen::before {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 168px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 58%, transparent 100%);
  content: "";
}

.watch-screen video,
.watch-player-container {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.watch-player-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.watch-player-container.player-pending {
  display: grid;
  place-items: center;
  color: #fff;
  background: #111;
}

.watch-player-container.player-pending img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}

.watch-player-container.player-pending p {
  position: relative;
  z-index: 1;
  margin: 0 24px;
  text-align: center;
  font-weight: 700;
}

.watch-speed-indicator {
  position: absolute;
  top: 68px;
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.72);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 120ms ease, transform 120ms ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.watch-speed-indicator strong {
  font-size: 16px;
  line-height: 1;
}

.watch-speed-indicator span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  white-space: nowrap;
}

.watch-screen.is-speed-hold .watch-speed-indicator {
  opacity: 1;
  transform: translate(-50%, 0);
}

.watch-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.watch-top a,
.watch-top button {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.46);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.watch-top a {
  position: relative;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.watch-top a::before {
  content: none;
}

.watch-top a svg {
  display: block;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.94);
}

.watch-top span {
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 14px;
}

.watch-actions {
  position: absolute;
  right: 14px;
  bottom: 170px;
  z-index: 3;
  display: grid;
  gap: 18px;
}

.watch-actions button {
  display: grid;
  place-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.watch-actions strong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  font-size: 28px;
}

.watch-actions button.active strong:not(.all-action) {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

.watch-actions strong.all-action {
  width: 40px;
  height: 30px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.watch-actions span {
  font-size: 12px;
}

.watch-meta {
  position: absolute;
  left: 16px;
  right: 90px;
  bottom: 52px;
  z-index: 3;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.watch-meta h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.description-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  color: #fff;
  line-height: 1.35;
}

.description-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description-line.expanded {
  display: block;
}

.description-line.expanded span {
  display: block;
  overflow: visible;
  white-space: normal;
}

.description-line button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 800;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.35);
}

.episode-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  padding: 16px 16px 28px;
  border-radius: 18px 18px 0 0;
  background: #111;
}

.episode-sheet-back {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border: 0;
  border-radius: 50%;
  background: #2a2a2a;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.episode-sheet-hero {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.episode-sheet-hero img {
  width: 76px;
  aspect-ratio: 9 / 14;
  border-radius: 8px;
  object-fit: cover;
}

.episode-sheet-hero h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.15;
}

.episode-sheet-hero p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-sheet-hero span {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.sheet-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #2a2a2a;
  color: #fff;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.episode-button {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: var(--radius);
  background: #242424;
}

.episode-button.active {
  background: #fff;
  color: #000;
}

.episode-button.locked {
  border: 1px solid rgba(255, 43, 115, 0.5);
}

.episode-button span {
  color: var(--muted);
  font-size: 11px;
}

.locked-screen {
  display: grid;
  align-content: end;
  min-height: 100vh;
  padding: 24px;
  background: #000;
}

.locked-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.locked-copy {
  position: relative;
  z-index: 1;
  padding-bottom: 24px;
}

.locked-copy span {
  color: var(--accent);
  font-weight: 800;
}

.locked-copy p {
  color: #ddd;
}

.list-page h1,
.profile-page h1 {
  padding-top: 22px;
  text-align: center;
}

.list-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin: 12px 0 0;
}

.list-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 18px;
  font-weight: 500;
  line-height: 18px;
}

.list-tabs button.active {
  color: #fff;
}

.list-tabs button.active::after {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 28px;
  height: 2px;
  border-radius: 4px;
  background: #fff;
  content: "";
  transform: translateX(-50%);
}

.empty-list {
  display: flex;
  min-height: 58vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 0;
  transform: translateY(28px);
  text-align: center;
}

.empty-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 142px;
  height: 104px;
  border-radius: var(--radius);
  background: #171717;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

.following-empty .empty-icon::before {
  position: absolute;
  left: 29px;
  top: 28px;
  width: 84px;
  height: 50px;
  border: 3px solid #3a3a3a;
  border-top-width: 5px;
  border-radius: 5px;
  content: "";
}

.following-empty .empty-icon::after {
  position: absolute;
  left: 38px;
  top: 38px;
  width: 66px;
  height: 30px;
  border-top: 3px solid #333;
  border-bottom: 3px solid #333;
  background:
    linear-gradient(90deg, transparent 18%, #333 18% 22%, transparent 22% 48%, #333 48% 52%, transparent 52% 78%, #333 78% 82%, transparent 82%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  content: "";
}

.clock-icon::before {
  position: absolute;
  left: 47px;
  top: 18px;
  width: 48px;
  height: 48px;
  border: 4px solid #3b3b3b;
  border-radius: 50%;
  background: #191919;
  box-shadow:
    inset 0 0 0 3px #222,
    0 14px 0 -8px #333;
  content: "";
}

.clock-icon::after {
  position: absolute;
  left: 68px;
  top: 39px;
  width: 18px;
  height: 16px;
  border-left: 3px solid #4a4a4a;
  border-bottom: 3px solid #4a4a4a;
  transform: rotate(-42deg);
  transform-origin: left bottom;
  content: "";
}

.history-empty .empty-icon {
  background:
    radial-gradient(circle at 50% 19%, #333 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 40% 72%, #333 0 5px, transparent 5.5px),
    radial-gradient(ellipse at 60% 72%, #333 0 5px, transparent 5.5px),
    #171717;
}

.following-empty .empty-icon,
.history-empty .empty-icon {
  width: 104px;
  height: 136px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.82;
}

.following-empty .empty-icon {
  background-image: url("../assets/icons/empty-shelf.svg");
}

.history-empty .empty-icon {
  background-image: url("../assets/icons/empty-clock.svg");
}

.following-empty .empty-icon::before,
.following-empty .empty-icon::after,
.history-empty .empty-icon::before,
.history-empty .empty-icon::after {
  display: none;
}

.empty-list p {
  margin: 0;
  color: #555;
  font-size: 20px;
}

.empty-list a {
  min-width: 230px;
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.saved-grid,
.history-list {
  display: grid;
  gap: 12px;
}

.saved-card,
.history-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--panel);
}

.saved-card img,
.history-item img {
  width: 72px;
  height: 96px;
  border-radius: 5px;
  object-fit: cover;
}

.saved-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.saved-card p,
.history-item span {
  color: var(--muted);
}

.profile-page {
  padding-top: calc(env(safe-area-inset-top, 0px) + 2px);
}

.guest-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.guest-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #222;
  color: #888;
  font-size: 28px;
}

.guest-row h2,
.guest-row p {
  margin: 0;
}

.guest-row h2 {
  font-size: 22px;
}

.guest-row p {
  margin-top: 4px;
  color: var(--muted);
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  text-align: left;
}

.profile-row strong {
  color: var(--muted);
  font-weight: 500;
}

.button-row {
  padding: 0;
}

.profile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(0, 0, 0, 0.45);
}

.language-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(480px, 100vw);
  padding: 18px 16px 28px;
  border-radius: 18px 18px 0 0;
  background: #111;
  transform: translateX(-50%);
}

.language-options {
  display: grid;
  gap: 10px;
}

.language-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1f1f1f;
  color: #fff;
}

.language-options button.active {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.language-options strong {
  color: var(--muted);
  font-size: 13px;
}

.reserved-note {
  margin: 18px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel);
}

.reserved-note h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary {
  background: #fff;
  color: #000;
}

.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: #fff;
}

.wide {
  width: 100%;
  margin-top: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(480px, 100vw);
  min-height: 50px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(20, 20, 20, 0.96);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 1px;
  border: 0;
  background: transparent;
  color: #777;
}

.bottom-nav button.active {
  color: #fff;
}

.nav-icon {
  position: relative;
  display: block;
  width: 19px;
  height: 19px;
  color: currentColor;
}

.nav-home::before {
  position: absolute;
  inset: 1px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: currentColor;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 10.6 12 3.4l8.5 7.2v9.1a.9.9 0 0 1-.9.9h-5.1v-6.2h-5v6.2H4.4a.9.9 0 0 1-.9-.9z' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 10.6 12 3.4l8.5 7.2v9.1a.9.9 0 0 1-.9.9h-5.1v-6.2h-5v6.2H4.4a.9.9 0 0 1-.9-.9z' fill='none' stroke='white' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav-home::after {
  display: none;
}

.bottom-nav button.active .nav-home::before {
  background: currentColor;
  box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.4 12 2.8l9 7.6v9.4a1.2 1.2 0 0 1-1.2 1.2h-5.4v-6.4H9.6V21H4.2A1.2 1.2 0 0 1 3 19.8z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.4 12 2.8l9 7.6v9.4a1.2 1.2 0 0 1-1.2 1.2h-5.4v-6.4H9.6V21H4.2A1.2 1.2 0 0 1 3 19.8z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav-list::before {
  position: absolute;
  left: 5px;
  top: 2px;
  width: 9px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  content: "";
}

.nav-list::after {
  position: absolute;
  left: 7px;
  bottom: 1px;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
}

.bottom-nav button:not(.active) .nav-list::after {
  border-top-color: transparent;
}

.bottom-nav button.active .nav-list::before {
  background: currentColor;
}

.bottom-nav button.active .nav-list::after {
  border-top-color: #141414;
}

.nav-profile::before {
  position: absolute;
  left: 6px;
  top: 1px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.nav-profile::after {
  position: absolute;
  left: 3px;
  bottom: 1px;
  width: 13px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 12px 12px 4px 4px;
  content: "";
}

.bottom-nav button.active .nav-profile::before,
.bottom-nav button.active .nav-profile::after {
  background: currentColor;
}

.bottom-nav span {
  font-size: 10px;
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 40;
  width: min(340px, calc(100vw - 32px));
  padding: 12px 14px;
  transform: translateX(-50%);
  border-radius: var(--radius);
  background: #fff;
  color: #000;
  text-align: center;
  font-weight: 800;
}

.debugger {
  position: fixed;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 62px);
  z-index: 120;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

.watch-mode .debugger {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
}

.debugger-toggle {
  pointer-events: auto;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.82);
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.debugger.open .debugger-toggle {
  display: none;
}

.debugger-panel {
  pointer-events: auto;
  width: min(330px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(16, 16, 16, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.debugger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.debugger-head strong {
  font-size: 13px;
}

.debugger-head button,
.debugger-actions button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
}

.debugger-head button {
  width: 26px;
  height: 26px;
}

.debugger-grid {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 7px 10px;
}

.debugger-grid span {
  color: var(--muted);
}

.debugger-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
}

.debugger-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.debugger-actions button {
  min-height: 30px;
  padding: 0 10px;
}

@media (min-width: 760px) {
  body {
    background: #1b1b1b;
  }

  .app-shell {
    inset: 20px 0;
    width: min(480px, 100vw);
    margin-block: 20px;
    height: calc(100vh - 40px);
    min-height: calc(100vh - 40px);
    border: 0;
    border-radius: 0;
  }

  .watch-mode {
    max-width: 480px;
  }

  .bottom-nav {
    bottom: 20px;
    border-radius: 0 0 18px 18px;
  }
}
