:root {
  --background: #ffffff;
  --surface: #f8f8f8;
  --surface-strong: #ffffff;
  --ink: #0f0f0f;
  --muted: #606060;
  --line: #e5e5e5;
  --line-strong: #d8d8d8;
  --accent: #ff0033;
  --accent-dark: #cc0029;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

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

button,
input {
  font: inherit;
}

.route-loading {
  inset: 0 0 auto;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transform: translateY(-8px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  z-index: 100;
}

.route-loading.show {
  opacity: 1;
  transform: translateY(0);
}

.route-loading-bar {
  animation: route-loading-progress 1.1s ease-in-out infinite;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255, 0, 51, 0.35);
  display: block;
  height: 3px;
  transform-origin: left center;
  width: 100%;
}

@keyframes route-loading-progress {
  0% {
    transform: scaleX(0.18);
  }

  50% {
    transform: scaleX(0.72);
  }

  100% {
    transform: scaleX(0.96);
  }
}


.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(160px, 1fr) minmax(280px, 640px) minmax(160px, 1fr);
  min-height: 56px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
}

.brand {
  align-items: center;
  display: inline-flex;
  height: 24px;
  width: 144px;
}

.brand-logo {
  display: block;
  height: 100%;
  width: 100%;
}

.brand-logo-compact {
  aspect-ratio: 29 / 20;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}

.icon-button:hover {
  background: #f2f2f2;
}

.icon-button span {
  background: var(--ink);
  display: block;
  height: 1.5px;
  width: 18px;
}

.search {
  display: flex;
  justify-self: center;
  justify-content: center;
  max-width: 640px;
  width: 100%;
}

.search input {
  border: 1px solid var(--line-strong);
  border-radius: 999px 0 0 999px;
  border-right: 0;
  min-height: 40px;
  min-width: 0;
  padding: 0 16px;
  width: min(100%, 540px);
}

.search button {
  background: #f8f8f8;
  border: 1px solid var(--line-strong);
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  min-height: 40px;
  padding: 0 20px;
}

.search button:hover {
  background: #eeeeee;
}

.nav {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  justify-content: flex-end;
}

.muted {
  color: var(--muted);
}

.membership-expiry {
  align-items: center;
  background: #e8f5ed;
  border: 1px solid #cbe8d5;
  border-radius: 999px;
  color: #136c35;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.button,
.ghost-button,
.danger-button {
  align-items: center;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
}

.button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
}

.button:hover {
  background: var(--accent-dark);
}

.subscribe-button {
  align-items: center;
  background: #0f0f0f;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
}

.subscribe-button:hover {
  background: #272727;
}

.ghost-button {
  background: #f2f2f2;
  border: 1px solid #f2f2f2;
  color: var(--ink);
}

.ghost-button:hover {
  background: #e7e7e7;
}

.danger-button {
  background: #fff4f2;
  border: 1px solid #fecdca;
  color: var(--danger);
}

.main {
  margin: 0 auto;
  max-width: 1360px;
  padding: 20px 24px 64px;
}

.channel-main {
  padding-top: 12px;
}

.channel-hero {
  /* border-bottom: 1px solid var(--line); */
  display: grid;
  gap: 20px;
  /* margin-bottom: 0; */
  padding-bottom: 18px;
}

.channel-banner {
  align-items: flex-end;
  background: url("/channel/laowang-banner.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  display: flex;
  min-height: clamp(128px, 16.5vw, 224px);
  overflow: hidden;
}

.watch-header {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.watch-primary .watch-header {
  gap: 8px;
  margin-bottom: 0;
  margin-top: 14px;
}

.watch-header h1,
.channel-hero h1 {
  line-height: 1.2;
  margin: 0;
}

.watch-header h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.watch-primary .watch-header h1 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.28;
  max-width: 1120px;
}

.channel-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  max-width: 760px;
}

.watch-header p,
.channel-hero p {
  color: var(--muted);
  margin: 0;
}

.watch-header p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 880px;
}

.watch-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.metadata-badge {
  align-items: center;
  background: #f2f2f2;
  border-radius: 4px;
  color: #606060;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  line-height: 1;
  min-height: 20px;
  padding: 4px 6px;
}

.membership-badge {
  background: #f1f1f1;
  color: #0f0f0f;
}

.metadata-badge-icon {
  display: inline-flex;
  height: 12px;
  width: 12px;
}

.metadata-badge-icon svg {
  fill: currentColor;
}

.watch-stats {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  gap: 4px 8px;
  line-height: 1.35;
}

.watch-stats span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
}

.watch-description {
  background: #f2f2f2;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  margin-top: 4px;
  max-width: 920px;
  padding: 10px 12px;
}

.watch-description strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.watch-description p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: none;
}

.channel-hero p {
  font-size: 16px;
  line-height: 1.45;
  max-width: 720px;
}

.channel-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.avatar,
.avatar-image {
  border-radius: 999px;
  height: 96px;
  width: 96px;
}

.avatar {
  background: #0f0f0f;
  color: #ffffff;
  display: grid;
  font-size: 24px;
  font-weight: 800;
  place-items: center;
}

.avatar-image {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
}

.channel-copy {
  display: grid;
  gap: 8px;
}

.channel-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 60;
}

.contact-modal {
  background: var(--surface-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 18px;
  max-width: 420px;
  padding: 22px;
  width: min(100%, 420px);
}

.contact-modal-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.contact-modal-head h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}

.modal-close-button {
  align-items: center;
  background: #f2f2f2;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.modal-close-button:hover {
  background: #e7e7e7;
}

.error-dialog-overlay {
  background: rgba(0, 0, 0, 0.48);
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.error-dialog {
  background: var(--surface-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  color: var(--ink);
  display: grid;
  gap: 18px;
  left: 50%;
  max-width: 420px;
  min-width: 280px;
  outline: none;
  padding: 22px;
  pointer-events: auto;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 40px);
  z-index: 1001;
}

.error-dialog-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.error-dialog-head h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
}

.error-dialog-description {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.error-dialog-confirm {
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  justify-self: end;
  min-height: 40px;
  padding: 8px 18px;
}

.error-dialog-confirm:hover {
  filter: brightness(0.94);
}

.site-message-dialog {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.site-message-content {
  overflow-wrap: anywhere;
}

.site-message-content > :first-child {
  margin-top: 0;
}

.site-message-content > :last-child {
  margin-bottom: 0;
}

.site-message-content a {
  color: var(--accent);
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.contact-item span,
.contact-empty {
  color: var(--muted);
  font-size: 14px;
}

.contact-item strong {
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contact-empty {
  margin: 0;
}

.account-pill,
.joined-pill {
  background: #eeeeee;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.joined-pill {
  background: #e8f5ed;
  color: #136c35;
}

.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 28px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.tab {
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 0;
  white-space: nowrap;
}

.tab.active {
  border-color: var(--ink);
  color: var(--ink);
}

.feed-controls {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
  margin-top: 0;
}

.tab-strip {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-strip::-webkit-scrollbar {
  display: none;
}

.channel-tab {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 16px 0 13px;
  position: relative;
  white-space: nowrap;
}

.channel-tab:hover,
.channel-tab.active {
  color: var(--ink);
}

.channel-tab::after {
  background: transparent;
  border-radius: 999px 999px 0 0;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.channel-tab.active::after {
  background: var(--ink);
}

.sort-chip-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 0 0;
  scrollbar-width: none;
}

.sort-chip-bar::-webkit-scrollbar {
  display: none;
}

.sort-chip {
  align-items: center;
  background: #f2f2f2;
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px 0 12px;
  white-space: nowrap;
}

.sort-chip:hover {
  background: #e9e9e9;
}

.sort-chip.active {
  background: var(--ink);
  color: #ffffff;
}

.sort-chip-icon {
  display: inline-flex;
  height: 18px;
  width: 18px;
}

.sort-chip-icon svg {
  fill: currentColor;
}

.sort-chip.asc .sort-chip-icon {
  transform: rotate(180deg);
}

.search-summary {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 0;
}

.search-summary p {
  color: var(--muted);
  margin: 0;
}

.search-summary a {
  color: var(--accent);
  font-weight: 800;
}

.empty-state {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-items: center;
  min-height: 260px;
  padding: 36px 0;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
}

.loading-grid {
  margin-top: 18px;
}

.loading-card {
  display: grid;
  gap: 12px;
}

.loading-thumb,
.loading-line {
  animation: loading-pulse 1.25s ease-in-out infinite;
  background: linear-gradient(90deg, #eeeeee, #f7f7f7, #eeeeee);
  background-size: 220% 100%;
}

.loading-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.loading-line {
  border-radius: 999px;
  height: 14px;
}

.loading-line-title {
  width: 82%;
}

.loading-line-meta {
  width: 56%;
}

@keyframes loading-pulse {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.video-grid {
  display: grid;
  gap: 34px 18px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.video-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.thumbnail-link {
  display: block;
  position: relative;
}

.video-card img {
  aspect-ratio: 16 / 9;
  background: #eeeeee;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.thumbnail-link:hover img {
  filter: brightness(0.92);
}

.duration-badge,
.preview-badge {
  background: rgba(0, 0, 0, 0.88);
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 5px;
  position: absolute;
}

.duration-badge {
  bottom: 7px;
  right: 7px;
}

.preview-badge {
  background: rgba(255, 0, 51, 0.92);
  bottom: 7px;
  left: 7px;
}

.video-meta-row {
  display: block;
  padding-top: 12px;
}

.mini-avatar {
  background: #0f0f0f;
  border-radius: 999px;
  color: #ffffff;
  display: grid;
  font-size: 14px;
  font-weight: 800;
  height: 36px;
  place-items: center;
  width: 36px;
}

.mini-avatar-image {
  border-radius: 999px;
  display: block;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.video-card-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
}

.video-card h2 {
  display: -webkit-box;
  font-size: 16px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
  margin: 0;
  overflow: hidden;
  word-break: break-word;
}

.video-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-name {
  font-weight: 700;
}

.auth-wrap,
.auth-page {
  display: grid;
  gap: 24px;
  margin: 48px auto;
  max-width: 420px;
}

.auth-header {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 40px;
}

.auth-back {
  justify-self: start;
}

.auth-logo {
  color: var(--ink);
  grid-column: 2;
  height: 28px;
  width: 168px;
}

.panel {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.panel h1 {
  margin: 0 0 20px;
}

.auth-panel {
  width: 100%;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0 12px;
}

.gmail-input {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.gmail-input input {
  border-radius: 6px 0 0 6px;
}

.gmail-input span {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  display: flex;
  min-height: 42px;
  padding: 0 12px;
  white-space: nowrap;
}

.code-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.code-row .ghost-button {
  min-height: 42px;
  white-space: nowrap;
}

.auth-tabs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

.auth-tabs button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  min-height: 36px;
}

.auth-tabs button.active {
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 700;
}

.auth-switch {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 0;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.auth-switch a:hover {
  color: var(--accent-dark);
}

.turnstile-box {
  min-height: 65px;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.email-code-hint {
  color: var(--danger);
}

.error {
  color: var(--danger);
  min-height: 20px;
}

.player-layout {
  display: grid;
  gap: 24px;
}

.watch-main {
  max-width: 1680px;
}

.watch-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.watch-primary {
  min-width: 0;
}

.player-frame {
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
}

.dplayer-shell {
  aspect-ratio: 16 / 9;
  position: relative;
  width: 100%;
}

.dplayer-host,
.dplayer-host .dplayer {
  height: 100%;
  width: 100%;
}

.seo-video {
  background: #000000;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.notice {
  align-items: center;
  background: rgba(15, 15, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  bottom: 72px;
  color: #ffffff;
  display: none;
  gap: 12px;
  justify-content: space-between;
  left: 50%;
  max-width: min(560px, calc(100% - 32px));
  padding: 14px;
  position: absolute;
  transform: translateX(-50%);
  width: max-content;
  z-index: 20;
}

.notice.show {
  display: flex;
}

.source-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.recommendation-sidebar {
  display: grid;
  gap: 14px;
}

.recommendation-sidebar h2 {
  font-size: 20px;
  margin: 0;
}

.recommendation-list {
  display: grid;
  gap: 12px;
}

.recommendation-item {
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.recommendation-item:hover strong {
  color: var(--accent);
}

.recommendation-thumb {
  display: block;
  position: relative;
}

.recommendation-thumb img {
  aspect-ratio: 16 / 9;
  background: #eeeeee;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.recommendation-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recommendation-copy strong {
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recommendation-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.recommendation-empty {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.comments-section {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  max-width: 920px;
}

.comments-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
}

.comments-head h2 {
  font-size: 22px;
  margin: 0;
}

.comments-head span,
.comments-empty,
.comments-error,
.comments-load-row,
.reply-error {
  color: var(--muted);
  font-size: 14px;
}

.comments-member-note {
  align-items: center;
  background: #f8f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
}

.comments-member-note span {
  color: var(--muted);
}

.comments-member-note a,
.reply-error a {
  color: var(--accent);
  font-weight: 800;
}

.comment-list {
  display: grid;
  gap: 20px;
}

.comment-item,
.reply-item {
  display: grid;
  gap: 12px;
  grid-template-columns: 40px minmax(0, 1fr);
}

.comment-avatar {
  background: #eeeeee;
  border-radius: 999px;
  display: block;
  height: 40px;
  object-fit: cover;
  width: 40px;
}

.comment-avatar-fallback {
  align-items: center;
  color: #555555;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
}

.comment-content,
.comment-body,
.reply-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.comment-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.comment-meta strong {
  font-size: 14px;
}

.comment-meta span {
  background: #eeeeee;
  border-radius: 4px;
  color: #404040;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 5px;
}

.comment-meta time,
.comment-actions {
  color: var(--muted);
  font-size: 13px;
}

.comment-body p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reply-toggle {
  background: transparent;
  border: 0;
  color: #065fd4;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  justify-self: start;
  padding: 4px 0;
}

.reply-toggle-muted {
  color: var(--muted);
}

.reply-toggle:disabled {
  color: var(--muted);
  cursor: wait;
}

.reply-list {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.reply-item {
  grid-template-columns: 32px minmax(0, 1fr);
}

.reply-item .comment-avatar {
  height: 32px;
  width: 32px;
}

.reply-error {
  margin: 0;
}

.comments-error {
  color: var(--danger);
  margin: 0;
}

.comments-empty {
  margin: 0;
}

.comments-load-row {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 40px;
}

.membership-main {
  display: grid;
  gap: 30px;
  max-width: 1120px;
  padding-top: 28px;
}

.membership-hero {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.membership-copy {
  align-content: center;
  background: linear-gradient(135deg, #111111, #2a2a2a 58%, #4a1d25);
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  gap: 14px;
  min-height: 340px;
  padding: clamp(28px, 5vw, 56px);
}

.membership-kicker {
  color: #ffccd6;
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

.membership-copy h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  margin: 0;
  max-width: 660px;
}

.membership-copy p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  max-width: 660px;
}

.membership-plan {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.plan-head {
  display: grid;
  gap: 8px;
}

.plan-head span {
  color: var(--muted);
  font-weight: 800;
}

.plan-head strong {
  font-size: 42px;
  line-height: 1;
}

.membership-plan p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.membership-pay {
  display: grid;
  gap: 10px;
}

.membership-pay-button {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  line-height: 1;
  padding: 0 18px;
}

.membership-pay-button:hover {
  background: var(--accent-dark);
}

.membership-pay-button:disabled {
  background: #d8d8d8;
  border-color: #d8d8d8;
  color: #606060;
  cursor: not-allowed;
}

.membership-loading-dots {
  align-items: center;
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}

.membership-loading-dots span {
  animation: membership-loading-dot 1s ease-in-out infinite;
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 4px;
  opacity: 0.45;
  width: 4px;
}

.membership-loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.membership-loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.membership-checkout-hint {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
}

.membership-checkout-hint span {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  font-size: inherit;
  line-height: inherit;
}

.membership-checkout-hint span:first-child {
  color: var(--muted);
  font-weight: 400;
}

.membership-checkout-countdown {
  font-weight: 700;
}

.membership-pay-message,
.membership-login-link {
  color: var(--muted);
  font-size: 14px;
}

.membership-cashier-link {
  align-items: center;
  color: var(--accent);
  display: inline-flex;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  justify-self: start;
}

.membership-cashier-link:hover {
  color: var(--accent-dark);
}

.membership-cashier-link span:last-child {
  color: currentColor;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.payment-waiting {
  align-items: center;
  background: #fff8e6;
  border: 1px solid #ffe1a3;
  border-radius: 8px;
  color: #6f4b00;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}

.payment-waiting span {
  animation: payment-spin 0.9s linear infinite;
  border: 2px solid rgba(111, 75, 0, 0.25);
  border-top-color: #6f4b00;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.payment-waiting p {
  color: inherit;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

@keyframes payment-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes membership-loading-dot {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.membership-login-link {
  font-weight: 800;
  text-decoration: underline;
}

.membership-benefits {
  display: grid;
  gap: 16px;
}

.membership-benefits h2 {
  font-size: 24px;
  margin: 0;
}

.benefit-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benefit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.benefit-card span {
  background: #e8f5ed;
  border-radius: 999px;
  color: #136c35;
  display: grid;
  font-weight: 900;
  height: 28px;
  place-items: center;
  width: 28px;
}

.benefit-card p {
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  white-space: pre-line;
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    gap: 12px;
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }

  .topbar-left,
  .nav {
    justify-content: space-between;
  }

  .search {
    flex-basis: auto;
    max-width: none;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hide-mobile {
    display: none;
  }

  .main {
    padding: 16px 14px 48px;
  }

  .channel-banner {
    border-radius: 0;
    margin: 0 -14px;
  }

  .channel-row {
    align-items: flex-start;
  }

  .avatar {
    height: 58px;
    width: 58px;
  }

  .avatar-image {
    height: 64px;
    width: 64px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .notice.show {
    align-items: stretch;
    flex-direction: column;
  }

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .recommendation-item {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .membership-hero,
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .membership-copy {
    min-height: 280px;
  }
}
