/*
File purpose: Visual styling for the TikTok-style vertical feed client.
Module: frontend/vertical-feed-client.
Call relationship: Loaded by index.html.
Replaceability: Can be replaced by a design-system stylesheet without changing business logic.
Modification notes: Keep fixed controls dimensioned so feed scrolling does not shift the layout.
*/

:root {
  --surface: #0b0d12;
  --surface-soft: rgba(13, 18, 26, 0.72);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.74);
  --line: rgba(255, 255, 255, 0.2);
  --accent: #19c6a3;
  --accent-strong: #ff3f6c;
  --warning: #ffd36a;
  --panel: #151922;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #090b10;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--surface);
}

.top-bar,
.bottom-nav,
.action-rail,
.status-strip {
  position: fixed;
  z-index: 20;
}

.top-bar {
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 64px;
  padding: 10px max(14px, env(safe-area-inset-left)) 8px max(14px, env(safe-area-inset-right));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
}

.feed-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.feed-tabs::-webkit-scrollbar {
  display: none;
}

.tab-button,
.nav-button,
.icon-button,
.rail-button,
.create-button,
.sheet-close {
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-button {
  display: grid;
  place-items: center;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.menu-lines {
  position: relative;
}

.menu-lines::before,
.menu-lines::after {
  position: absolute;
  left: 0;
}

.menu-lines::before {
  top: -7px;
}

.menu-lines::after {
  top: 7px;
}

.tab-button {
  min-width: 58px;
  height: 36px;
  padding: 0 8px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 700;
}

.status-strip {
  left: 16px;
  right: 16px;
  top: 64px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.status-strip span {
  max-width: min(520px, 90vw);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-drawer {
  position: fixed;
  z-index: 32;
  top: 64px;
  left: max(14px, env(safe-area-inset-left));
  width: min(230px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.86);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.category-drawer-backdrop {
  position: fixed;
  z-index: 31;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.category-drawer-backdrop.hidden {
  display: none;
}

.category-drawer.hidden {
  display: none;
}

.category-drawer-item {
  min-height: 50px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.category-drawer-item span {
  color: var(--text-muted);
  font-size: 12px;
}

.category-drawer-item.active,
.category-drawer-item:hover {
  border-color: rgba(25, 198, 163, 0.62);
  background: rgba(25, 198, 163, 0.16);
}

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

.feed-viewport::-webkit-scrollbar {
  display: none;
}

.feed-card {
  position: relative;
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  overflow: hidden;
  background: #111827;
  content-visibility: auto;
  contain-intrinsic-size: 100vh 520px;
}

.feed-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), transparent 28%, transparent 55%, rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

.feed-card.video-paused::before {
  content: "暂停";
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.visual-layer,
.video-layer,
.image-layer,
.inline-app-layer,
.inline-app-frame,
.novel-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inline-app-layer {
  display: grid;
  place-items: center;
  padding: 46px 0 88px;
  background:
    radial-gradient(circle at 50% 8%, rgba(25, 198, 163, 0.16), transparent 34%),
    #0b1020;
  pointer-events: none;
}

.inline-app-shell {
  width: 100%;
  height: calc(100vh - 134px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.inline-app-frame {
  position: static;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.feed-card.is-active .inline-app-frame {
  pointer-events: auto;
}

.inline-app-activate {
  position: absolute;
  z-index: 5;
  inset: 68px 82px 230px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.feed-card.runtime-active .inline-app-activate {
  display: none;
}

.immersive-return-button {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  min-width: 88px;
  min-height: 40px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(5, 8, 14, 0.78);
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.app-shell.immersive-runtime .bottom-nav,
.app-shell.immersive-runtime .action-rail,
.app-shell.immersive-runtime .card-copy,
.app-shell.immersive-runtime .status-strip {
  display: none;
}

.novel-layer {
  display: grid;
  align-content: start;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 72px 22px 96px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.9), rgba(232, 240, 255, 0.86)),
    transparent;
  color: #1f2937;
}

.novel-layer strong {
  font-size: 26px;
  line-height: 1.25;
}

.novel-promo {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 36px rgba(31, 41, 55, 0.14);
}

.novel-promo-cover {
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(31, 41, 55, 0.08), rgba(25, 198, 163, 0.16)),
    #111827;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  font-weight: 900;
}

.novel-promo-meta {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.novel-promo-meta small {
  color: #64748b;
  font-weight: 800;
}

.novel-promo-meta p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.novel-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.novel-tag-row span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(25, 198, 163, 0.14);
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
}

.novel-layer p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 14;
  -webkit-box-orient: vertical;
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.feed-card .image-layer {
  width: 100%;
  height: calc(100vh - 134px);
  inset: 46px 0 auto 0;
  transform: none;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.reader-sheet-mode {
  z-index: 56;
  align-items: stretch;
  background: #0b1020;
}

.reader-sheet-mode .sheet-panel {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: 70px 14px 92px;
  background: #0b1020;
}

.reader-sheet-mode .sheet-kicker,
.reader-sheet-mode .sheet-panel h2 {
  color: #ffffff;
}

.reader-sheet-mode .sheet-actions {
  display: none;
}

.reader-experience {
  height: calc(100vh - 176px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.reader-toolbar,
.reader-turnbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.reader-turnbar button {
  flex: 1;
}

.reader-toolbar button,
.reader-turnbar button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.reader-page-body {
  overflow: hidden;
  border-radius: 18px;
  background: #fffaf0;
}

.novel-reader-page {
  height: 100%;
  padding: 22px;
  overflow: auto;
  color: #1f2937;
  white-space: pre-wrap;
  line-height: 1.9;
}

.comic-page-body {
  display: grid;
  place-items: center;
  background: #111827;
}

.comic-reader-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.visual-layer {
  display: grid;
  place-items: center;
  padding: 24px;
}

.visual-mark {
  width: min(62vw, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(8px);
  font-size: clamp(28px, 7vw, 76px);
  font-weight: 800;
  text-align: center;
}

.motion-mark {
  animation: floatPulse 2.4s ease-in-out infinite;
}

@keyframes floatPulse {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

.palette-ocean {
  background:
    radial-gradient(circle at 30% 18%, rgba(25, 198, 163, 0.8), transparent 32%),
    radial-gradient(circle at 80% 72%, rgba(49, 112, 255, 0.72), transparent 34%),
    linear-gradient(135deg, #071923, #172136 58%, #0d302b);
}

.palette-coral {
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 63, 108, 0.78), transparent 31%),
    radial-gradient(circle at 20% 78%, rgba(255, 179, 84, 0.72), transparent 35%),
    linear-gradient(135deg, #21111a, #2c2230 58%, #3b1722);
}

.palette-sky {
  background:
    radial-gradient(circle at 28% 25%, rgba(135, 206, 250, 0.78), transparent 34%),
    radial-gradient(circle at 82% 70%, rgba(255, 235, 120, 0.66), transparent 30%),
    linear-gradient(135deg, #0a1224, #1f3954 58%, #17445b);
}

.palette-lime {
  background:
    radial-gradient(circle at 75% 22%, rgba(184, 255, 92, 0.68), transparent 32%),
    radial-gradient(circle at 18% 72%, rgba(25, 198, 163, 0.72), transparent 34%),
    linear-gradient(135deg, #0b1812, #1e3222 58%, #21381e);
}

.card-copy {
  position: absolute;
  z-index: 6;
  left: max(18px, env(safe-area-inset-left));
  right: 92px;
  bottom: 96px;
}

.ticket-strip {
  position: relative;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 30px;
}

.ticket-claim-button,
.ticket-progress,
.content-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.ticket-claim-button {
  min-width: 66px;
  justify-content: center;
  border: 0;
  background: #14c878;
  color: #04100d;
  font-weight: 800;
  cursor: pointer;
}

.ticket-claim-button.claimed {
  background: rgba(255, 255, 255, 0.84);
  color: #0b0d12;
}

.ticket-progress {
  border: 1px solid rgba(20, 200, 120, 0.55);
  background: rgba(0, 0, 0, 0.46);
  color: #d9fff0;
}

.content-badge {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
}

.card-title {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: 0;
}

.card-summary {
  max-width: 680px;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.creator-link {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.open-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 18px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #051111;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.action-rail {
  right: max(14px, env(safe-area-inset-right));
  bottom: 104px;
  display: grid;
  gap: 14px;
}

.app-shell.workspace-open .action-rail {
  display: none;
}

.creator-button {
  position: relative;
  width: 58px;
  height: 66px;
  display: grid;
  justify-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.creator-avatar,
.creator-large-avatar {
  display: grid;
  place-items: center;
  color: #051111;
  background:
    linear-gradient(135deg, #ffffff, #9fffe6 48%, #ffb4c6);
  font-weight: 900;
  box-shadow: 0 12px 28px var(--shadow);
}

.creator-avatar {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 14px;
}

.follow-plus {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--accent-strong);
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
}

.creator-button.following .follow-plus {
  background: var(--accent);
  color: #04100d;
}

.rail-button {
  width: 58px;
  min-height: 58px;
  display: grid;
  justify-items: center;
  gap: 3px;
}

.rail-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px var(--shadow);
  font-size: 22px;
}

.rail-button.active .rail-icon {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.22);
}

.rail-count {
  min-height: 16px;
  font-size: 11px;
}

.bottom-nav {
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: 76px;
  padding: 8px max(10px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 4, 8, 0.84);
  backdrop-filter: blur(14px);
}

.nav-button {
  height: 48px;
  color: var(--text-muted);
}

.nav-button.active {
  color: var(--text);
  font-weight: 700;
}

.create-button {
  width: 54px;
  height: 40px;
  justify-self: center;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.fox-assistant-button {
  position: relative;
  width: 62px;
  height: 62px;
  margin-top: -20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 25%, #fff7dd 0%, #ffc66f 34%, #f26d3d 72%, #9b301e 100%);
  box-shadow: 0 16px 38px rgba(242, 109, 61, 0.38), 0 6px 18px rgba(0, 0, 0, 0.32);
  animation: foxAssistantBreath 2.8s ease-in-out infinite;
}

.fox-assistant-button:hover {
  transform: translateY(-2px) scale(1.03);
}

.fox-assistant-image {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.fox-assistant-fallback {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.fox-assistant-image:not(.hidden) + .fox-assistant-fallback {
  display: none;
}

.fox-assistant-overlay {
  position: fixed;
  z-index: 70;
  inset: 0;
  pointer-events: none;
}

.fox-assistant-overlay.hidden {
  display: none;
}

.fox-assistant-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 180ms ease;
}

.fox-assistant-card {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(88px + env(safe-area-inset-bottom));
  width: min(92vw, 390px);
  max-height: min(68vh, 560px);
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto auto;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(255, 239, 219, 0.94));
  color: #251715;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36), 0 12px 38px rgba(242, 109, 61, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(0, 44px) scale(0.72);
  transform-origin: 72% 100%;
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.18, 0.92, 0.28, 1.2);
}

.fox-assistant-overlay.active {
  pointer-events: auto;
}

.fox-assistant-overlay.active .fox-assistant-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.fox-assistant-overlay.active .fox-assistant-card {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0) scale(1);
}

.fox-assistant-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(45, 31, 25, 0.08);
  color: #49322a;
  font-size: 22px;
}

.fox-assistant-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 38px;
}

.fox-assistant-avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 25%, #fff7dd 0%, #ffc66f 36%, #f26d3d 72%, #9b301e 100%);
  box-shadow: 0 12px 28px rgba(242, 109, 61, 0.28);
  animation: foxAssistantPop 320ms ease both;
}

.fox-assistant-hero h2 {
  margin: 0;
  color: #211513;
  font-size: 20px;
}

.fox-assistant-messages {
  display: flex;
  min-height: 160px;
  overflow-y: auto;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.fox-assistant-message {
  display: flex;
}

.fox-assistant-message span {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.fox-assistant-message.assistant span {
  color: #3d2a21;
  background: #fff3df;
}

.fox-assistant-message.user {
  justify-content: flex-end;
}

.fox-assistant-message.user span {
  color: #ffffff;
  background: linear-gradient(135deg, #f26d3d, #ff9f45);
}

.fox-assistant-message.thinking span {
  color: #805944;
  background: rgba(255, 214, 160, 0.68);
}

.fox-assistant-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 4px 6px;
}

.fox-assistant-quick-actions button {
  border: 1px solid rgba(255, 176, 102, 0.45);
  border-radius: 999px;
  background: rgba(255, 247, 234, 0.92);
  color: #6b3b24;
  padding: 8px 12px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(99, 50, 24, 0.12);
}

.fox-assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.fox-assistant-form input {
  min-width: 0;
  height: 44px;
  border: 1px solid rgba(96, 60, 37, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.88);
  color: #211513;
}

.fox-assistant-note {
  margin: 0;
  color: rgba(61, 42, 33, 0.66);
  font-size: 12px;
  line-height: 1.45;
}

@keyframes foxAssistantBreath {
  0%,
  100% {
    box-shadow: 0 16px 38px rgba(242, 109, 61, 0.34), 0 6px 18px rgba(0, 0, 0, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 18px 46px rgba(255, 166, 80, 0.48), 0 8px 22px rgba(0, 0, 0, 0.34);
    transform: scale(1.035);
  }
}

@keyframes foxAssistantPop {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.72);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .fox-assistant-card {
    left: 12px;
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(72vh, 560px);
    transform-origin: 50% 100%;
  }

  .fox-assistant-button {
    width: 58px;
    height: 58px;
  }
}

.fox-assistant-button.assistant-empty {
  background: radial-gradient(circle at 50% 62%, rgba(255, 236, 202, 0.98) 0%, rgba(255, 194, 118, 0.9) 48%, rgba(148, 66, 38, 0.82) 100%);
  animation: foxAssistantNestPulse 1.8s ease-in-out infinite;
}

.fox-assistant-button.assistant-empty::after {
  content: "";
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: rgba(89, 43, 30, 0.32);
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
}

.fox-assistant-button.assistant-empty .fox-assistant-image,
.fox-assistant-button.assistant-empty .fox-assistant-fallback {
  display: none;
}

.fox-assistant-overlay.active .fox-assistant-backdrop {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.34));
}

.fox-assistant-stage {
  left: 50%;
  right: auto;
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: min(92vw, 430px);
  max-height: min(78vh, 620px);
  display: grid;
  grid-template-rows: minmax(180px, auto) auto auto;
  justify-items: center;
  gap: 10px;
  padding: 0 10px 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  transform: translate(-50%, 120px) scale(0.4);
  transform-origin: 50% 100%;
  transition: opacity 180ms ease, transform 420ms cubic-bezier(0.18, 1.28, 0.3, 1);
}

.fox-assistant-overlay.active .fox-assistant-stage {
  transform: translate(-50%, 0) scale(1);
}

.fox-assistant-stage .fox-assistant-close {
  top: 88px;
  right: 14px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.88);
  color: #4d2f24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.fox-assistant-character-wrap {
  position: relative;
  width: min(54vw, 230px);
  min-width: 168px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.fox-assistant-character {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 42% 42% 48% 48%;
  background: radial-gradient(circle at 42% 24%, #fff7dd 0%, #ffba63 42%, #f06a3b 72%, #89301f 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32), 0 0 42px rgba(255, 153, 86, 0.28);
  animation: foxAssistantLeap 560ms cubic-bezier(0.18, 1.42, 0.3, 1) both, foxAssistantIdle 3.2s ease-in-out 620ms infinite;
}

.fox-assistant-character .fox-assistant-image {
  object-fit: cover;
}

.fox-assistant-shadow {
  position: absolute;
  z-index: 1;
  bottom: 2px;
  width: 74%;
  height: 24px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  filter: blur(10px);
  animation: foxAssistantShadow 560ms ease both;
}

.fox-assistant-jump-trail {
  position: absolute;
  z-index: 0;
  bottom: -8px;
  width: 96px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 192, 104, 0), rgba(255, 192, 104, 0.28));
  filter: blur(3px);
  animation: foxAssistantTrail 620ms ease both;
}

.fox-assistant-speech {
  position: relative;
  width: min(92%, 360px);
  margin-top: -8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px 22px 22px 8px;
  background: rgba(255, 250, 239, 0.94);
  color: #2c1b15;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  animation: foxAssistantBubbleIn 260ms ease 360ms both;
}

.fox-assistant-speech::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 58px;
  width: 18px;
  height: 18px;
  border-radius: 5px 0 0 0;
  background: rgba(255, 250, 239, 0.94);
  transform: rotate(45deg);
}

.fox-assistant-speech h2,
.fox-assistant-speech p {
  margin: 0;
}

.fox-assistant-speech h2 {
  color: #241610;
  font-size: 19px;
}

.fox-assistant-speech > p:last-child {
  margin-top: 6px;
  color: rgba(44, 27, 21, 0.78);
  font-size: 14px;
  line-height: 1.45;
}

.fox-assistant-chat-dock {
  width: min(94%, 390px);
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  background: rgba(20, 18, 16, 0.36);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
  opacity: 0;
  transform: translateY(18px);
  animation: foxAssistantBubbleIn 260ms ease 460ms both;
}

.fox-assistant-stage .fox-assistant-messages {
  min-height: 76px;
  max-height: 168px;
  padding: 4px;
  background: transparent;
}

.fox-assistant-stage .fox-assistant-message span {
  max-width: 88%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.fox-assistant-stage .fox-assistant-form {
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.fox-assistant-stage .fox-assistant-note {
  padding: 0 6px 4px;
  color: rgba(255, 255, 255, 0.72);
}

@keyframes foxAssistantNestPulse {
  0%,
  100% {
    box-shadow: 0 16px 38px rgba(242, 109, 61, 0.28), 0 6px 18px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 18px 46px rgba(255, 166, 80, 0.44), 0 8px 22px rgba(0, 0, 0, 0.34);
  }
}

@keyframes foxAssistantLeap {
  0% {
    opacity: 0;
    transform: translateY(168px) scale(0.28) rotate(-8deg);
  }

  62% {
    opacity: 1;
    transform: translateY(-16px) scale(1.08) rotate(3deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes foxAssistantIdle {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

@keyframes foxAssistantShadow {
  0% {
    opacity: 0.1;
    transform: scale(0.3);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes foxAssistantTrail {
  0% {
    opacity: 0;
    transform: translateY(80px) scaleY(0.2);
  }

  48% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes foxAssistantBubbleIn {
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .fox-assistant-stage {
    left: 50%;
    right: auto;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 100vw;
    max-height: min(80vh, 650px);
    padding-inline: 8px;
  }

  .fox-assistant-character-wrap {
    width: min(58vw, 230px);
  }

  .fox-assistant-stage .fox-assistant-close {
    top: 72px;
    right: 18px;
  }

  .fox-assistant-chat-dock {
    width: min(94vw, 390px);
  }
}

.sheet {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.45);
}

.sheet.hidden {
  display: none;
}

.sheet-panel {
  width: 100%;
  max-height: 64vh;
  overflow-y: auto;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--panel);
  box-shadow: 0 -24px 80px var(--shadow);
}

.comment-page {
  display: grid;
  gap: 14px;
  margin: 0 -4px;
  padding: 4px 0 0;
  color: #111827;
}

.comment-search-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px 12px;
  border-bottom: 1px solid #edf0f4;
}

.comment-search-line span {
  color: #456273;
  font-size: 16px;
}

.comment-search-line strong {
  color: #111827;
  font-size: 14px;
}

.comment-thread {
  display: grid;
  gap: 18px;
}

.comment-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: start;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #9fffe6, #ffb4c6);
  color: #071013;
  font-weight: 900;
}

.comment-row strong,
.comment-row p,
.comment-row small {
  display: block;
  margin: 0;
}

.comment-row p {
  margin-top: 5px;
  color: #151922;
  font-size: 15px;
  line-height: 1.55;
}

.comment-row small {
  margin-top: 6px;
  color: #8a94a3;
}

.comment-row button {
  min-width: 54px;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.icon-button svg,
.rail-icon svg,
.comment-icon-button svg,
.comment-action-button svg,
.share-option-grid button svg,
.message-topbar button svg,
.message-thread-page button svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.comment-body {
  min-width: 0;
}

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

.comment-action-button {
  min-width: auto !important;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0;
  font-size: 12px;
}

.comment-action-button.is-done {
  color: #ff315d;
}

.comment-action-button.is-replying {
  color: #ff315d;
  font-weight: 800;
}

.comment-action-button.danger {
  color: #d64545;
}

.comment-history-list,
.comment-history-row {
  display: grid;
  gap: 10px;
}

.comment-history-row p {
  margin: 0;
  color: #2d3748;
}

.comment-replies {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid #eef2f7;
}

.comment-reply-row {
  grid-template-columns: 32px 1fr;
}

.comment-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.comment-input-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 38px 38px 38px 42px;
  gap: 8px;
  align-items: center;
  margin: 8px -6px -10px;
  padding: 10px 6px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), #ffffff 28%);
}

.comment-input-bar input {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #f2f4f7;
  color: #111827;
}

.comment-input-bar button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #111827;
}

.comment-input-bar button.send {
  background: #111827;
  color: #ffffff;
}

.comment-page + .sheet-actions {
  display: none;
}

.comment-tip {
  color: #8a94a3;
  font-size: 12px;
}

.comment-picker-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
}

.comment-picker-panel.hidden {
  display: none;
}

.comment-picker-actions,
.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-picker-actions button,
.comment-upload-choice,
.emoji-grid button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #111827;
  cursor: pointer;
}

.comment-upload-choice input {
  display: none;
}

.comment-attachment-preview {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #6b7280;
  font-size: 12px;
}

.comment-attachment-preview img,
.comment-image-preview {
  max-width: 128px;
  max-height: 128px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  object-fit: cover;
}

.sheet.comment-sheet-mode {
  z-index: 45;
  background: rgba(0, 0, 0, 0.08);
}

.sheet.comment-sheet-mode .sheet-panel {
  max-height: 72vh;
  padding-bottom: 92px;
  border-radius: 20px 20px 0 0;
}

.sheet.comment-sheet-mode .sheet-close,
.sheet.comment-sheet-mode .sheet-actions {
  display: none;
}

.sheet-close {
  float: right;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 24px;
}

.sheet-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.sheet-panel h2 {
  margin: 0 44px 10px 0;
  font-size: 24px;
}

.sheet-panel p {
  line-height: 1.55;
}

.preview-frame-wrap {
  width: 100%;
  height: 280px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.reader-wrap {
  max-height: 260px;
  margin-top: 14px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.65;
}

.image-preview {
  width: 100%;
  max-height: 320px;
  margin-top: 14px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.hidden {
  display: none;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.upload-form .sheet-actions {
  position: sticky;
  bottom: 0;
  margin: 12px -2px -2px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(14, 17, 23, 0), rgba(14, 17, 23, 0.96) 36%);
}

.publish-submit-button {
  min-height: 48px;
  font-size: 16px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #04100d;
  font-weight: 700;
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.upload-form label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font: inherit;
}

.upload-form select option {
  color: #111827;
}

.upload-form textarea {
  resize: vertical;
}

.upload-help {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.workspace-panel {
  max-height: 82vh;
}

.sheet.user-page-mode {
  z-index: 18;
  align-items: stretch;
  background: #090b10;
}

.sheet.user-page-mode .workspace-panel {
  width: 100%;
  max-height: none;
  height: 100%;
  padding: 86px 16px 96px;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(25, 198, 163, 0.11), transparent 26%),
    #0d1018;
  color: var(--text);
}

.sheet.user-page-mode .sheet-close,
.sheet.user-page-mode .sheet-kicker,
.sheet.user-page-mode .account-section,
.sheet.user-page-mode .ai-section,
.sheet.user-page-mode .health-section,
.sheet.user-page-mode .module-entry-section {
  display: none;
}

.sheet.user-page-mode .workspace-section {
  display: none;
}

.sheet.user-page-mode .search-section {
  display: block;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.sheet.user-page-mode:not(.search-page-mode) .inline-form {
  display: none;
}

.sheet.user-page-mode .workspace-results {
  margin-top: 0;
}

.search-suggestion-panel,
.share-page,
.message-thread-page {
  display: grid;
  gap: 12px;
}

.search-chip-row,
.share-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.future-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 14px;
}

.future-feature-card {
  min-height: 84px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(25, 198, 163, 0.18), rgba(255, 63, 108, 0.1)),
    rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
}

.future-feature-card strong,
.future-feature-card span {
  display: block;
}

.future-feature-card span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.feature-mini-list .workspace-result button {
  width: max-content;
  min-height: 34px;
  margin-top: 4px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #04100d;
  font-weight: 800;
}

.search-chip-row button,
.share-option-grid button {
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.share-option-grid button.is-done {
  border-color: rgba(25, 198, 163, 0.72);
  background: rgba(25, 198, 163, 0.16);
}

.share-preview,
.share-tip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.chat-bubble {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  line-height: 1.45;
}

.chat-bubble.mine {
  justify-self: end;
  background: rgba(25, 198, 163, 0.28);
}

.workspace-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.workspace-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.inline-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font: inherit;
}

.workspace-results,
.module-health-grid,
.module-entry-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.workspace-result,
.module-entry-card,
.module-health-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
}

.workspace-result span,
.module-entry-card span,
.module-health-card span,
.workspace-output {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.profile-columns {
  display: grid;
  gap: 14px;
}

.profile-columns h4 {
  margin: 0 0 8px;
}

.ticket-record {
  border-color: rgba(20, 200, 120, 0.55);
}

.subpage-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.subpage-list a {
  color: #9fffe6;
}

.creator-profile {
  display: grid;
  gap: 14px;
}

.creator-large-avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  font-size: 20px;
}

.web-info-list {
  display: grid;
  gap: 8px;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.discover-page-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 18px;
  align-items: center;
  margin: -2px 0 12px;
  padding: 10px 2px;
  overflow-x: auto;
  background: var(--panel);
}

.discover-page-header button {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  white-space: nowrap;
}

.discover-page-header button:first-child {
  border-bottom-color: var(--text);
  color: var(--text);
}

.discover-page-header button.active {
  border-bottom-color: var(--text);
  color: var(--text);
}

.discover-page-header button:not(.active):first-child {
  border-bottom-color: transparent;
  color: var(--text-muted);
}

.discover-card {
  min-height: 168px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  text-align: left;
  overflow: hidden;
}

.discover-card-type {
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  font-size: 11px;
}

.discover-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.discover-card small {
  color: rgba(255, 255, 255, 0.78);
}

.ranking-page-header {
  gap: 12px;
}

.ranking-summary {
  display: grid;
  gap: 3px;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 63, 108, 0.14), rgba(25, 198, 163, 0.12)),
    var(--panel);
}

.ranking-summary strong {
  font-size: 16px;
}

.ranking-summary span {
  color: var(--text-muted);
  font-size: 12px;
}

.ranking-grid {
  padding-bottom: 18px;
}

.ranking-card {
  min-height: 178px;
  border-color: rgba(255, 255, 255, 0.12);
}

.ranking-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  background: var(--panel);
}

.live-channel-page,
.market-channel-page,
.commerce-channel-page {
  display: grid;
  gap: 12px;
}

.channel-hero {
  min-height: 138px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 63, 108, 0.34), rgba(25, 198, 163, 0.24)),
    #161b25;
  color: #ffffff;
}

.channel-hero button,
.commerce-card button {
  width: max-content;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #04100d;
  font-weight: 800;
}

.market-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.market-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  white-space: nowrap;
}

.market-tabs button.active {
  background: var(--text);
  color: #111827;
}

.commerce-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.commerce-toolbar span {
  color: var(--text-muted);
  font-size: 12px;
}

.commerce-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.commerce-card {
  min-height: 228px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
}

.commerce-card > strong {
  font-size: 16px;
  line-height: 1.3;
}

.market-product-card > strong {
  font-size: 14px;
}

.commerce-card p,
.commerce-card span,
.commerce-card small {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.commerce-card em {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.product-cover {
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(25, 198, 163, 0.28), rgba(255, 63, 108, 0.22)),
    rgba(255, 255, 255, 0.08);
}

.product-cover > span {
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-weight: 800;
}

.product-price-row {
  display: flex;
  gap: 7px;
  align-items: center;
}

.product-price-row > span {
  margin-right: auto;
  text-align: left;
}

.commerce-card .product-price-row > button {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.product-cover.large {
  height: 150px;
}

.product-detail-page,
.creator-shop-page {
  display: grid;
  gap: 14px;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  align-items: start;
}

.product-detail-hero h3,
.product-detail-hero p {
  margin: 4px 0;
}

.product-detail-hero strong {
  display: block;
  color: var(--accent);
  font-size: 22px;
}

.product-detail-hero small,
.product-detail-hero span {
  color: var(--text-muted);
}

.product-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-review-section,
.product-review-list {
  display: grid;
  gap: 10px;
}

.product-review-list article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.product-review-list p,
.product-review-list span {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.live-badge {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ff315d;
  color: #ffffff !important;
}

.message-center {
  display: grid;
  gap: 4px;
  padding: 4px 0;
}

.message-count-pill {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(25, 198, 163, 0.12);
  color: var(--text-muted);
  font-size: 12px;
}

.friend-picker-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.friend-picker-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
}

.friend-picker-row.is-done {
  border-color: rgba(25, 198, 163, 0.72);
  background: rgba(25, 198, 163, 0.16);
}

.creator-profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.creator-message-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.creator-message-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.message-topbar {
  display: grid;
  grid-template-columns: 48px 1fr 64px;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.message-topbar strong {
  font-size: 24px;
}

.message-topbar button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.message-row {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.message-avatar,
.profile-avatar-large {
  display: grid;
  place-items: center;
  color: #06110f;
  background: linear-gradient(135deg, #ffffff, #9fffe6 52%, #ffb4c6);
  font-weight: 900;
}

.message-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
}

.message-avatar.orange { background: linear-gradient(135deg, #ffd17a, #ff6b35); }
.message-avatar.blue { background: linear-gradient(135deg, #a6e6ff, #4f8cff); }
.message-avatar.green { background: linear-gradient(135deg, #aaffcf, #19c6a3); }
.message-avatar.purple { background: linear-gradient(135deg, #e6d7ff, #996dff); }
.message-avatar.red { background: linear-gradient(135deg, #ffb4c6, #ff315d); }

.message-row strong,
.message-row small {
  display: block;
}

.message-row small,
.message-row em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff315d;
}

.profile-cover {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(25, 198, 163, 0.22), rgba(255, 63, 108, 0.16)),
    rgba(255, 255, 255, 0.08);
}

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

.profile-settings-wrap {
  position: relative;
  z-index: 8;
}

.profile-cover .profile-settings-toggle {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 18px;
}

.profile-settings-menu {
  position: absolute;
  top: 44px;
  right: 0;
  width: 178px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 17, 23, 0.98);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

.profile-settings-menu.hidden { display: none; }

.profile-cover .profile-settings-menu button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.settings-page {
  display: grid;
  gap: 10px;
}

.settings-page > button,
.settings-switch-row,
.settings-account-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
}

.settings-page strong,
.settings-page small {
  display: block;
}

.settings-page small {
  margin-top: 4px;
  color: var(--text-muted);
}

.settings-account-row {
  grid-template-columns: 42px 1fr auto;
}

.message-thread-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.message-thread-toolbar h3 {
  margin: 0;
  text-align: center;
}

.danger-button,
.creator-block-button {
  color: #ff6b86;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 20px;
}

.profile-cover button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font-weight: 800;
}

.profile-cover strong,
.profile-cover span {
  display: block;
}

.profile-cover span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.profile-stat-grid div {
  display: grid;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.profile-stat-grid strong {
  font-size: 20px;
}

.profile-stat-grid span {
  color: var(--text-muted);
  font-size: 12px;
}

.profile-section-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.profile-section-list h4 {
  margin: 0 0 8px;
}

.profile-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.profile-action-grid button {
  min-height: 66px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
}

.profile-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
}

.profile-tabs button.active {
  border-bottom-color: var(--text);
  color: var(--text);
}

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

.profile-work-card {
  min-height: 210px;
  aspect-ratio: 3 / 4;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 10px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  text-align: left;
  overflow: hidden;
  box-shadow: inset 0 -80px 70px rgba(0, 0, 0, 0.38);
}

.profile-work-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.profile-work-card span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.profile-work-type {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
}

.wallet-page,
.monetization-grid,
.ticket-detail-list {
  display: grid;
  gap: 10px;
}

.wallet-balance-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(25, 198, 163, 0.2), rgba(49, 112, 255, 0.18));
}

.wallet-balance-card strong {
  font-size: 38px;
}

.wallet-recharge-form {
  display: grid;
  gap: 10px;
}

.wallet-recharge-form input {
  width: 100%;
  margin-top: 6px;
}

.monetization-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monetization-grid button {
  min-height: 128px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(25, 198, 163, 0.14));
  color: var(--text);
  text-align: left;
}

.payment-page,
.monetization-detail-page {
  display: grid;
  gap: 14px;
}

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

.payment-method-grid button,
.product-action-row button,
.commerce-card button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.payment-method-grid button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.payment-method-grid button.active,
.product-action-row button.is-done,
.commerce-card button.is-done {
  border-color: rgba(25, 198, 163, 0.72);
  background: rgba(25, 198, 163, 0.18);
}

.star-rating {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.star-rating button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
}

.star-rating button.active {
  color: #f59e0b;
}

.sheet-panel:has(.comment-page) {
  background: #ffffff;
  color: #111827;
}

.sheet-panel:has(.comment-page) .sheet-kicker {
  color: #456273;
}

.sheet-panel:has(.comment-page) h2 {
  color: #111827;
}

.module-health-grid,
.module-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-health-card.up {
  border-color: rgba(25, 198, 163, 0.72);
}

.module-health-card.down {
  border-color: rgba(255, 63, 108, 0.52);
}

@media (min-width: 860px) {
  .app-shell {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .top-bar,
  .bottom-nav {
    left: 50%;
    width: 600px;
    transform: translateX(-50%);
  }

  .status-strip {
    left: 50%;
    right: auto;
    width: 568px;
    transform: translateX(-50%);
  }

  .action-rail {
    right: calc(50% - 286px);
  }

  .sheet-panel {
    width: 600px;
    margin: 0 auto;
  }
}
/* Launch Service page: independent 首发/总榜 presentation with two-column mobile cards. */
.launch-page {
  --launch-gold-start: #fff2a6;
  --launch-gold-middle: #e6b63f;
  --launch-gold-end: #a96d0b;
  --launch-gold-ink: #3f2900;
  color: #111827;
  padding: 4px 0 96px;
}
.launch-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 14px; }
.launch-heading-main { display: flex; align-items: center; gap: 10px; }
.launch-heading-main > span { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 8px; color: var(--launch-gold-ink); background: linear-gradient(145deg, var(--launch-gold-start), var(--launch-gold-middle) 56%, var(--launch-gold-end)); box-shadow: 0 5px 14px rgba(169,109,11,.25); }
.launch-heading-main svg, .launch-award svg { width: 20px; height: 20px; fill: currentColor; }
.launch-heading h3, .launch-heading p { margin: 0; }
.launch-heading h3 { font-size: 20px; }
.launch-heading p, .launch-heading small { color: #6b7280; font-size: 12px; }
.launch-register-button { flex: 0 0 auto; min-height: 34px; padding: 6px 9px; border: 1px solid #c88e20; border-radius: 7px; color: var(--launch-gold-ink); background: linear-gradient(135deg, var(--launch-gold-start), var(--launch-gold-middle)); box-shadow: 0 4px 12px rgba(169,109,11,.18); font-size: 10px; font-weight: 900; }
.launch-upload-field { display: grid; gap: 7px; padding: 10px; border: 1px solid #d8c58f; border-radius: 7px; background: #fffaf0; }
.launch-upload-field small { color: #725c2c; font-size: 11px; line-height: 1.45; }
.upload-inline-option { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.upload-inline-option input { width: 18px; min-height: 18px; margin: 0; }
.upload-contest-label { padding: 3px 8px; border-radius: 999px; color: #3f2900; background: linear-gradient(135deg, #fff2b0, #e6b63f); font-size: 11px; }
.launch-tabs, .launch-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 3px 0 7px; }
.launch-tabs button, .launch-categories button { min-width: 0; min-height: 34px; border: 1px solid #d9dde5; background: #fff; color: #667085; padding: 5px 2px; border-radius: 7px; font-size: 11px; font-weight: 800; white-space: nowrap; transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.launch-tabs button.active, .launch-categories button.active { background: linear-gradient(135deg, var(--launch-gold-start), var(--launch-gold-middle) 58%, var(--launch-gold-end)); color: var(--launch-gold-ink); border-color: #c88e20; box-shadow: 0 0 0 2px rgba(230,182,63,.18), 0 4px 12px rgba(169,109,11,.18); }
.launch-rule-note { margin: 4px 0 12px; padding: 9px 11px; border-left: 3px solid #c88e20; background: #fffaf0; color: #5f4a20; font-size: 12px; }
.launch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.launch-card { position: relative; overflow: hidden; background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; box-shadow: 0 5px 16px rgba(15, 23, 42, .07); }
.launch-rank { position: absolute; z-index: 2; top: 7px; left: 7px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 6px; color: #111; background: rgba(255,255,255,.94); font-weight: 900; }
.launch-rank.rank-1 { background: #facc15; } .launch-rank.rank-2 { background: #d9e0e8; } .launch-rank.rank-3 { background: #d99a62; }
.launch-rank-trophy { display: inline-flex; grid-auto-flow: column; gap: 4px; width: auto; height: 30px; min-width: 30px; padding: 0 7px; border-radius: 6px; white-space: nowrap; }
.launch-rank-trophy svg { flex: 0 0 17px; width: 17px; height: 17px; fill: currentColor; }
.launch-rank-trophy span { font-size: 10px; font-weight: 900; }
.launch-rank-trophy.rank-1 { color: #8a5b00; box-shadow: 0 3px 9px rgba(250,204,21,.45); }
.launch-rank-trophy.rank-2 { color: #596579; box-shadow: 0 3px 9px rgba(148,163,184,.4); }
.launch-rank-trophy.rank-3 { color: #7c3f13; box-shadow: 0 3px 9px rgba(217,154,98,.42); }
.launch-cover { position: relative; display: block; overflow: hidden; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: linear-gradient(145deg,#26344d,#111827); text-align: left; }
.launch-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.launch-cover span { position: absolute; left: 0; bottom: 0; display: inline-block; margin: 10px; padding: 4px 7px; border-radius: 5px; color: #fff; background: rgba(15,23,42,.78); font-size: 11px; }
.launch-card-body { padding: 10px; }
.launch-title-row { display: flex; justify-content: space-between; gap: 8px; }
.launch-title-row strong { display: block; font-size: 15px; line-height: 1.25; }
.launch-title-row p { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: #667085; font-size: 12px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.launch-title-row > span { align-self: flex-start; flex: 0 0 auto; color: #047857; background: #ecfdf5; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; }
.launch-maker { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11px; }
.launch-maker i { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #fff; background: #111827; font-style: normal; }
.launch-maker b { color: #6d28d9; font-size: 9px; text-transform: uppercase; }
.launch-awards { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.launch-award { display: inline-flex; align-items: center; gap: 3px; color: #8a5b00; background: #fff8db; padding: 3px 5px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.launch-award svg { width: 11px; height: 11px; }
.launch-meta { display: grid; gap: 2px; margin-top: 8px; color: #667085; font-size: 10px; }
.launch-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 9px; }
.launch-actions button { min-width: 0; min-height: 34px; padding: 5px 2px; border: 1px solid #d5dae2; border-radius: 6px; background: #fff; color: #111827; font-size: 10px; font-weight: 800; }
.launch-actions button:nth-child(2) { border-color: #111827; background: #111827; color: #fff; }
.launch-actions button:disabled { color: #98a2b3; background: #f2f4f7; border-color: #eaecf0; }
@media (max-width: 430px) { .launch-heading { align-items: flex-start; } .launch-heading small { max-width: 105px; text-align: right; } .launch-register-button { max-width: 92px; line-height: 1.2; white-space: normal; } }
