:root {
  --bg: #08090c;
  --surface: #121418;
  --ink: #f5f6f8;
  --muted: #a7abb5;
  --line: rgba(255, 255, 255, 0.11);
  --soft: #181a20;
  --lime: #f4f4f5;
  --coral: #f2b5ff;
  --teal: #7ff4e7;
  --violet: #a78bfa;
  --amber: #f2b5ff;
  --dark: #101115;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --browser-bottom-offset: 0px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

@supports (-webkit-touch-callout: none) {
  :root {
    --browser-bottom-offset: 0px;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050608;
  color: var(--ink);
}

body {
  display: grid;
  place-items: start center;
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(242, 181, 255, 0.1), transparent 34%),
    linear-gradient(180deg, #0d0e13 0%, var(--bg) 46%, #050608 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 22px 18px calc(92px + var(--safe-bottom));
  animation: fade-up 180ms ease both;
}

.screen.is-active {
  display: block;
}

.app-shell[data-current="create"] #screen-create {
  animation: none;
  padding-bottom: calc(138px + var(--safe-bottom));
  transform: none;
}

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

.topbar,
.page-header,
.floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  padding-top: 10px;
}

.page-header {
  min-height: 72px;
}

.page-header.no-back {
  margin-top: 16px;
}

.page-header h1,
.profile-head h1,
.player-content h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow,
.tiny-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.subcopy {
  margin: 8px 0 0;
  color: rgba(245, 246, 248, 0.68);
  line-height: 1.45;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.brand-note {
  font-size: 30px;
  font-weight: 900;
  color: var(--lime);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.icon-button:disabled,
.icon-button.is-muted {
  cursor: not-allowed;
  opacity: 0.46;
}

.icon-button svg,
button svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.5;
}

.hero-strip {
  display: grid;
  gap: 18px;
  margin: 26px 0 28px;
  padding: 18px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 14%, rgba(242, 181, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(18, 20, 24, 0.92), rgba(24, 26, 32, 0.88)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-strip h1 {
  max-width: 270px;
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
}

.primary-action,
.ghost-action,
.ghost-dark,
.generate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-action,
.generate-button {
  color: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(110deg, #f4f4f5, #f2b5ff);
  box-shadow: var(--shadow);
}

.primary-action:disabled,
.generate-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.generate-button.is-busy {
  cursor: wait;
}

.ghost-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.ghost-dark {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.section {
  margin-top: 28px;
}

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

.section-head.compact {
  margin-top: 8px;
}

.section h2,
.section-head h2,
.modal-panel h2,
.subscription-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.text-button {
  padding: 8px 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.filter-row,
.style-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.chip.is-selected {
  background: rgba(223, 245, 63, 0.14);
  color: var(--ink);
}

.track-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.track-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 138px;
  align-items: center;
  gap: 12px;
  min-height: 95px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.track-row img {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
}

.track-copy {
  min-width: 0;
}

.track-row h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.track-row p {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 164px;
  padding: 28px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--ink);
}

.empty-state p {
  margin: 0;
  max-width: 220px;
  font-size: 14px;
  line-height: 1.45;
}

.track-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}

.play-small,
.clip-small {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.play-small svg,
.clip-small svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.8;
}

.play-small {
  background: var(--dark);
  color: #fff;
}

.clip-small {
  background: var(--lime);
  color: var(--dark);
}

.credit-panel,
.subscription-panel,
.modal-panel {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.credit-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.credit-panel .ghost-action {
  grid-column: 1 / -1;
}

.credit-panel strong {
  display: block;
  font-size: 24px;
}

.stepper {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 10px 0 24px;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 900;
}

.step-dot.is-active {
  background: rgba(223, 245, 63, 0.14);
  color: var(--lime);
}

.create-step {
  display: none;
}

.create-step.is-active {
  display: block;
}

.big-input {
  width: 100%;
  height: min(48vh, 440px);
  padding: 20px;
  resize: none;
  border: 2px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
}

.big-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(34, 212, 196, 0.16);
}

.chat-input-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.chat-input-tabs button {
  min-height: 40px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  font-size: 15px;
}

.chat-input-tabs button.is-selected {
  background: rgba(223, 245, 63, 0.16);
  color: var(--ink);
}

.chat-input-panel[hidden] {
  display: none !important;
}

.chat-input-panel .big-input {
  height: min(36vh, 310px);
}

.chat-skin-picker {
  position: relative;
  z-index: 6;
  margin-bottom: 10px;
}

.chat-skin-trigger {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 12px 0 14px;
  border: 1px solid color-mix(in srgb, var(--chat-accent, var(--teal)) 36%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
  font-size: 15px;
  font-weight: 900;
}

.chat-skin-trigger svg {
  color: var(--chat-accent, var(--teal));
}

.chat-skin-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #161923;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.chat-skin-menu button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: rgba(245, 247, 251, 0.76);
  text-align: left;
  font-size: 14px;
  font-weight: 850;
}

.chat-skin-menu button small {
  color: rgba(166, 176, 197, 0.58);
  font-size: 11px;
  font-weight: 800;
}

.chat-skin-menu button.is-selected,
.chat-skin-menu button:not(:disabled):hover {
  background: rgba(223, 245, 63, 0.14);
  color: var(--ink);
}

.chat-skin-menu button:disabled {
  cursor: not-allowed;
  color: rgba(166, 176, 197, 0.48);
}

.chat-bubble-board {
  display: flex;
  height: clamp(340px, 42vh, 370px);
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px 12px;
  border: 2px solid color-mix(in srgb, var(--chat-accent, var(--teal)) 32%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    var(--chat-board-bg, rgba(7, 8, 12, 0.54));
}

.chat-bubble-row {
  display: flex;
  width: 100%;
}

.chat-avatar {
  display: none;
  padding: 0;
  border: 0;
  appearance: none;
  cursor: pointer;
}

.chat-bubble-row.is-left {
  justify-content: flex-start;
}

.chat-bubble-row.is-right {
  justify-content: flex-end;
}

.chat-bubble {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 76%;
  min-width: 0;
  padding: 7px 11px 8px;
  border: 0;
  border-radius: 8px;
}

.chat-bubble.is-left {
  background: var(--chat-other-bg, #252934);
  color: var(--chat-other-text, var(--ink));
}

.chat-bubble.is-right {
  background: var(--chat-self-bg, #9bef5f);
  color: var(--chat-self-text, #111218);
}

.chat-bubble.is-editing {
  border-color: var(--chat-accent, var(--teal));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chat-accent, var(--teal)) 22%, transparent);
}

.chat-bubble-board[data-chat-skin="wechat"] {
  gap: 12px;
  padding: 18px 12px;
  border-color: #20232b;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 34%),
    #101113;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble-row {
  align-items: center;
  gap: 9px;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-avatar {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin-top: 0;
  border-radius: 6px;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-avatar.is-left {
  background:
    linear-gradient(145deg, rgba(150, 170, 190, 0.78), rgba(58, 69, 81, 0.92)),
    #4d5c69;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-avatar.is-right {
  background:
    linear-gradient(145deg, rgba(91, 45, 123, 0.9), rgba(24, 17, 31, 0.96)),
    #211827;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble {
  max-width: calc(100% - 64px);
  border-radius: 6px;
  border-color: transparent;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble.is-left {
  background: #2a2c31;
  color: #f5f5f7;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble.is-right {
  background: #95ec69;
  color: #101411;
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 12px;
  background: inherit;
  transform: translateY(-50%);
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble.is-left::before {
  left: -8px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble.is-right::before {
  right: -8px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble.is-editing {
  border-color: rgba(34, 212, 196, 0.46);
  box-shadow: 0 0 0 3px rgba(34, 212, 196, 0.14);
}

.chat-bubble-board[data-chat-skin="wechat"] .chat-bubble-input {
  min-height: 24px;
  padding: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.36;
}

.chat-bubble-input {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  min-height: 24px;
  padding: 0;
  overflow: hidden;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: 850 15px/1.42 var(--font);
}

#chat-bubble-measure {
  position: fixed;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
  white-space: pre;
}

.chat-bubble-input::placeholder {
  opacity: 0;
}

.chat-bubble-placeholder,
.wechat-bubble-placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 12px);
  color: currentColor;
  font: inherit;
  line-height: inherit;
  opacity: 0.5;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.chat-bubble-placeholder svg,
.wechat-bubble-placeholder svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

.chat-bubble.has-value .chat-bubble-placeholder,
.wechat-fullscreen-bubble.has-value .wechat-bubble-placeholder {
  display: none;
}

.chat-bubble-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.chat-bubble-tools .mini-action {
  min-height: 40px;
  gap: 6px;
}

.chat-bubble-tools .mini-action svg {
  width: 17px;
  height: 17px;
}

.screenshot-upload-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: min(34vh, 290px);
  padding: 28px 18px;
  border: 2px dashed rgba(34, 212, 196, 0.34);
  border-radius: 8px;
  background: rgba(34, 212, 196, 0.08);
  color: #72f2e6;
  text-align: center;
}

.screenshot-upload-card:disabled {
  cursor: wait;
  opacity: 0.7;
}

.screenshot-upload-card svg {
  width: 42px;
  height: 42px;
}

.screenshot-upload-card span {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.screenshot-upload-card small {
  max-width: 220px;
  color: rgba(245, 247, 251, 0.68);
  font-weight: 800;
  line-height: 1.4;
}

.style-input {
  height: min(48vh, 410px);
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  color: var(--muted);
  font-weight: 800;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 212, 196, 0.3);
  background: rgba(34, 212, 196, 0.12);
  color: #72f2e6;
  font-weight: 900;
}

.upload-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ocr-status {
  min-height: 0;
  margin: 0 0 12px;
  padding: 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.ocr-status.is-visible {
  min-height: 42px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.ocr-status.is-success {
  background: rgba(34, 212, 196, 0.12);
  color: #72f2e6;
}

.ocr-status.is-error {
  background: rgba(255, 107, 107, 0.12);
  color: #ff9a9a;
}

.preset-grid,
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.preset-card,
.plan-card {
  min-height: 78px;
  padding: 12px 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.field-label {
  display: block;
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(223, 245, 63, 0.18);
  background: linear-gradient(110deg, rgba(223, 245, 63, 0.12), rgba(244, 166, 65, 0.1), rgba(138, 77, 232, 0.12));
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.select-row small {
  grid-column: 1 / -1;
  color: rgba(245, 247, 251, 0.72);
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
}

.segmented button.is-selected {
  background: rgba(223, 245, 63, 0.14);
  outline: 2px solid var(--teal);
}

.cost-pill,
.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(223, 245, 63, 0.22);
  background: rgba(223, 245, 63, 0.12);
  color: var(--lime);
  font-weight: 900;
}

.generation-gate {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.generation-gate-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.generation-gate strong,
.generation-gate span {
  overflow-wrap: anywhere;
}

.generation-gate strong {
  font-size: 14px;
  line-height: 1.25;
}

.generation-gate span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.generation-gate.is-ready {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.12);
}

.generation-gate.is-warning {
  border-color: rgba(244, 166, 65, 0.4);
  background: rgba(244, 166, 65, 0.12);
}

.generation-gate.is-danger {
  border-color: rgba(221, 59, 59, 0.3);
  background: rgba(255, 107, 107, 0.12);
}

.generation-gate.is-muted {
  background: rgba(255, 255, 255, 0.045);
}

.generation-gate .mini-action[hidden] {
  display: none;
}

.generate-button {
  width: 100%;
  min-height: 66px;
  margin-top: 14px;
  font-size: 18px;
}

.form-warning {
  min-height: 22px;
  margin: 10px 0 0;
  color: #d43f3f;
  font-weight: 800;
}

.wizard-footer {
  position: sticky;
  bottom: var(--safe-bottom);
  z-index: 18;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(17, 18, 24, 0), var(--bg) 32%);
}

.app-shell[data-current="create"] .wizard-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100vw, 430px);
  padding: 12px 18px calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(17, 18, 24, 0), var(--bg) 28%);
}

.loading-screen {
  display: none;
  place-items: center;
  min-height: 100vh;
  padding: 0;
  background: var(--bg);
}

.loading-screen.is-active {
  display: grid;
}

.close-loading {
  position: absolute;
  top: 26px;
  left: 18px;
  z-index: 3;
}

.loading-card {
  position: relative;
  width: 100%;
  height: 72vh;
  overflow: hidden;
}

.loading-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loading-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(17, 18, 24, 0), var(--bg));
}

.loading-logo {
  position: absolute;
  left: 50%;
  top: 44%;
  display: grid;
  place-items: center;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--dark);
  color: #fff;
  font-size: 62px;
  font-weight: 900;
  z-index: 2;
}

.loading-logo span {
  display: block;
  font-size: 35px;
  color: var(--lime);
}

.progress-wrap {
  width: calc(100% - 44px);
  margin-top: -80px;
  z-index: 2;
}

.progress-wrap p {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

.progress-wrap small,
.progress-wrap em {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: rgba(233, 238, 246, 0.76);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.progress-wrap em {
  margin-top: 4px;
  color: rgba(233, 238, 246, 0.58);
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--lime), var(--coral));
  transition: width 260ms ease;
}

.result-screen {
  min-height: 100vh;
  padding: 0;
  background: var(--dark);
  color: #fff;
}

.floating-header {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 24px;
  z-index: 4;
}

.floating-actions {
  display: flex;
  gap: 10px;
}

.player-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.player-stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 62%;
  object-fit: cover;
  filter: brightness(0.66);
}

.player-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 27, 0.06), rgba(16, 18, 27, 0.72) 50%, #10121b 74%);
}

.player-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 20px 330px;
}

.player-content h1 {
  max-width: 100%;
  font-size: 32px;
  overflow-wrap: anywhere;
}

.player-content p {
  margin: 8px 0 22px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.ai-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: -10px 0 18px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.ai-disclosure svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

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

.result-actions .primary-action,
.result-actions .ghost-dark {
  min-height: 54px;
  padding: 0 8px;
  font-size: 14px;
}

.player-controls {
  margin-top: 26px;
}

.timeline input {
  width: 100%;
  accent-color: #fff;
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}

.play-main {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lyrics-sheet {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  max-height: 29vh;
  padding: 16px;
  overflow: auto;
  border-radius: 8px 8px 0 0;
  background: rgba(17, 18, 24, 0.94);
  color: var(--ink);
}

.lyrics-sheet pre {
  margin: 0;
  white-space: pre-wrap;
  font: 700 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.library-list .track-row {
  background-size: cover;
  background-position: center;
}

.library-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  margin-bottom: 12px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.library-search svg {
  width: 18px;
  height: 18px;
}

.library-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: 800 14px/1 var(--font);
}

.library-search input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.subscription-panel {
  margin-top: 16px;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(16, 18, 27, 0.94), rgba(31, 41, 55, 0.82)),
    url("./assets/cover-gospel-shout.png") center / cover;
}

.subscription-panel p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.45;
}

.pay-status {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  line-height: 1.35;
}

.pay-status.is-warning {
  color: #ffd7a3;
}

.subscription-panel.is-disabled {
  filter: saturate(0.78);
}

.subscription-panel .primary-action {
  width: 100%;
  margin-top: 10px;
}

.pay-plan:disabled {
  box-shadow: none;
  opacity: 0.48;
}

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

.plan-card {
  display: grid;
  gap: 4px;
  text-align: left;
}

.plan-card strong {
  font-size: 25px;
}

.plan-card span {
  font-weight: 900;
}

.plan-card small {
  color: var(--muted);
  font-weight: 800;
}

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

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
}

.history-row.positive {
  color: #079669;
}

.profile-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 0 20px;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.58), transparent 18%),
    linear-gradient(135deg, rgba(127, 244, 231, 0.92), rgba(242, 181, 255, 0.92));
  color: #101115;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.avatar.has-image {
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.profile-avatar-button {
  padding: 0;
  appearance: none;
  cursor: pointer;
}

.profile-avatar-button:focus-visible {
  outline: 2px solid rgba(127, 244, 231, 0.82);
  outline-offset: 4px;
}

.profile-head p,
.version {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.account-summary,
.ops-compact {
  margin-bottom: 16px;
}

.guest-login-panel {
  display: grid;
  gap: 12px;
  padding: 28px 0 18px;
}

.guest-login-panel[hidden],
.profile-head[hidden],
.account-summary[hidden],
.menu-row[hidden] {
  display: none;
}

.guest-brand-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 24px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 181, 255, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  text-align: center;
}

.guest-logo {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.guest-brand-card p,
.guest-brand-card h1,
.guest-brand-card span {
  margin: 0;
}

.guest-brand-card p {
  color: rgba(245, 247, 251, 0.54);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.guest-brand-card h1 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
}

.guest-brand-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

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

.guest-benefits div {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(245, 247, 251, 0.8);
  font-size: 12px;
  font-weight: 900;
}

.guest-benefits svg {
  width: 18px;
  height: 18px;
  color: #80f4e8;
}

.auth-choice-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 76px;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: left;
}

.auth-choice-card svg {
  justify-self: center;
  align-self: center;
  width: 32px;
  height: 32px;
  color: var(--teal);
}

.auth-choice-copy strong,
.sms-login-box label {
  font-weight: 950;
}

.auth-choice-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.auth-choice-copy strong {
  line-height: 1.15;
}

.auth-choice-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.auth-choice-modal {
  display: grid;
  gap: 12px;
}

.auth-method-panel {
  display: grid;
  gap: 10px;
}

.auth-choice-card {
  width: 100%;
}

.auth-choice-card.wechat {
  border-color: rgba(127, 244, 231, 0.25);
}

.auth-choice-card.sms {
  border-color: rgba(242, 181, 255, 0.24);
}

.auth-choice-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.auth-choice-title svg {
  width: 19px;
  height: 19px;
  color: #80f4e8;
}

.modal-sms-login {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(18, 20, 24, 0.78);
}

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

.profile-edit-avatar-button {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  column-gap: 14px;
  row-gap: 3px;
  min-height: 78px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(127, 244, 231, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: left;
}

.profile-edit-avatar-preview {
  grid-row: 1 / span 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.58), transparent 18%),
    linear-gradient(135deg, rgba(127, 244, 231, 0.92), rgba(242, 181, 255, 0.92));
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.profile-edit-avatar-button strong {
  align-self: end;
  font-size: 15px;
  font-weight: 950;
}

.profile-edit-avatar-button small {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-edit-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-edit-field input {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.065);
  color: var(--ink);
  padding: 0 12px;
  font-size: 15px;
  font-weight: 900;
}

.account-binding-list {
  display: grid;
  gap: 8px;
}

.account-binding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.account-binding-row span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.account-binding-row svg {
  width: 16px;
  height: 16px;
  color: #80f4e8;
  flex: 0 0 auto;
}

.account-binding-row strong {
  justify-self: end;
  max-width: 142px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 950;
}

.account-binding-action {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 7px 5px 9px;
  font-size: 12px;
  font-weight: 950;
}

.account-binding-action svg {
  width: 13px;
  height: 13px;
}

.account-binding-row strong.is-bound {
  color: #bbf7d0;
  border: 1px solid rgba(43, 210, 111, 0.24);
  background: rgba(43, 210, 111, 0.12);
}

.account-binding-row strong.is-unbound,
.account-binding-action.is-unbound {
  color: #80f4e8;
  border: 1px solid var(--line);
  background: rgba(127, 244, 231, 0.08);
}

.account-binding-action.is-unbound:active {
  transform: translateY(1px);
  background: rgba(127, 244, 231, 0.14);
}

.account-bind-modal {
  display: grid;
  gap: 12px;
}

.account-bind-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.profile-save-button {
  min-height: 48px;
}

.sms-login-box {
  display: grid;
  gap: 10px;
}

.sms-login-box label {
  display: grid;
  gap: 7px;
  color: rgba(245, 247, 251, 0.9);
  font-size: 13px;
}

.sms-login-box input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.sms-login-box input:focus {
  border-color: rgba(34, 212, 196, 0.55);
  box-shadow: 0 0 0 2px rgba(34, 212, 196, 0.12);
}

.sms-captcha-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(34, 212, 196, 0.2);
  background: rgba(34, 212, 196, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.sms-captcha-hint svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #80f4e8;
}

.sms-captcha-hint.is-passed {
  border-color: rgba(43, 210, 111, 0.42);
  background: rgba(43, 210, 111, 0.1);
  color: rgba(204, 255, 219, 0.9);
}

.sms-puzzle-modal {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 8px;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sms-puzzle-modal[hidden] {
  display: none;
}

.sms-puzzle-card {
  width: min(100%, 314px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 25% 15%, rgba(34, 212, 196, 0.16), transparent 38%),
    radial-gradient(circle at 82% 88%, rgba(244, 166, 65, 0.12), transparent 42%),
    rgba(20, 23, 31, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

.sms-puzzle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sms-puzzle-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.sms-puzzle-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.sms-puzzle-close svg {
  width: 18px;
  height: 18px;
}

.sms-puzzle-stage {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121620;
}

.sms-puzzle-bg {
  position: relative;
  height: 150px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(127, 244, 231, 0.16), transparent 32%),
    linear-gradient(225deg, rgba(242, 181, 255, 0.16), transparent 34%),
    radial-gradient(circle at 36% 50%, rgba(255, 255, 255, 0.16), transparent 12%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 8px, transparent 8px 16px),
    #151a24;
}

.sms-puzzle-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.25)),
    radial-gradient(circle at 58% 42%, rgba(0, 0, 0, 0.22), transparent 34%);
}

.sms-puzzle-hole,
.sms-puzzle-piece {
  position: absolute;
  top: 56px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  z-index: 1;
}

.sms-puzzle-hole {
  border: 1px dashed rgba(255, 255, 255, 0.34);
  background: rgba(4, 7, 12, 0.72);
  box-shadow:
    inset 0 0 0 999px rgba(0, 0, 0, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

.sms-puzzle-hole::before,
.sms-puzzle-piece::before {
  content: "";
  position: absolute;
  top: 13px;
  right: -8px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.sms-puzzle-hole::before {
  background: rgba(4, 7, 12, 0.72);
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.sms-puzzle-piece {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(244, 244, 245, 0.96), rgba(242, 181, 255, 0.92));
  color: #101411;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
  transition: left 0.12s ease;
}

.sms-puzzle-piece::before {
  background: rgba(242, 181, 255, 0.92);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.16);
}

.sms-puzzle-piece svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.4;
}

.sms-puzzle-track {
  position: relative;
  display: grid;
  place-items: center;
  height: 46px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.sms-puzzle-track span {
  color: rgba(245, 247, 251, 0.48);
  font-size: 13px;
  font-weight: 950;
  pointer-events: none;
}

.sms-puzzle-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 46px;
  margin: 0;
  background: transparent;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
}

.sms-puzzle-range:active {
  cursor: grabbing;
}

.sms-puzzle-range::-webkit-slider-runnable-track {
  height: 46px;
  background: transparent;
}

.sms-puzzle-range::-webkit-slider-thumb {
  width: 58px;
  height: 40px;
  margin-top: 3px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #f4f4f5, #f2b5ff);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  -webkit-appearance: none;
  appearance: none;
}

.sms-puzzle-range::-moz-range-track {
  height: 46px;
  background: transparent;
}

.sms-puzzle-range::-moz-range-thumb {
  width: 58px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #f4f4f5, #f2b5ff);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

.sms-puzzle-card small {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sms-puzzle-card.is-error small {
  color: #ffb4a6;
}

.sms-puzzle-card.is-success small {
  color: #ccffdb;
}

.sms-code-row {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 8px;
}

.sms-code-row button {
  border-radius: 8px;
  border: 1px solid rgba(242, 181, 255, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: #f5f6f8;
  font-size: 13px;
  font-weight: 950;
}

.sms-code-row button:disabled {
  opacity: 0.54;
}

.sms-login-submit {
  margin-top: 2px;
}

.sms-back-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(245, 246, 248, 0.82);
  font-size: 13px;
  font-weight: 900;
}

#auth-helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

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

.account-card {
  display: grid;
  gap: 6px;
  min-height: 70px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(18, 20, 24, 0.78);
}

.account-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-card strong {
  overflow: hidden;
  font-size: 20px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-compact {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(18, 20, 24, 0.72);
}

.ops-compact summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  list-style: none;
}

.ops-compact summary::-webkit-details-marker {
  display: none;
}

.ops-compact summary svg {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}

.ops-compact[open] summary svg {
  transform: rotate(180deg);
}

.ops-compact .ops-panel {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  box-shadow: none;
}

.ops-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ops-panel .section-head {
  margin-bottom: 0;
}

.ops-panel h2 {
  margin: 0;
  font-size: 22px;
}

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

.ops-card {
  display: grid;
  gap: 5px;
  min-height: 70px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.ops-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ops-card strong {
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

#ops-provider {
  overflow-wrap: normal;
  white-space: nowrap;
}

.ops-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ops-flag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ops-flag.is-good {
  border-color: rgba(34, 212, 196, 0.3);
  background: rgba(34, 212, 196, 0.12);
  color: #72f2e6;
}

.ops-flag.is-warn {
  border-color: rgba(244, 166, 65, 0.3);
  background: rgba(244, 166, 65, 0.12);
  color: #ffd7a3;
}

.ops-latest {
  display: grid;
  gap: 8px;
}

.ops-latest h3 {
  margin: 2px 0 0;
  font-size: 14px;
}

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

.analytics-funnel-item {
  display: grid;
  gap: 3px;
  min-height: 50px;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.analytics-funnel-item strong {
  font-size: 16px;
  line-height: 1;
}

.analytics-funnel-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-event-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  min-height: 42px;
  margin-top: 7px;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.analytics-event-row strong,
.analytics-event-row span,
.analytics-event-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-event-row span,
.analytics-event-row small {
  color: var(--muted);
  font-weight: 800;
}

.analytics-event-row small {
  grid-column: 1 / -1;
}

.ops-job-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  min-height: 52px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.ops-job-row strong,
.ops-job-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-job-row small {
  grid-column: 1 / 2;
  color: var(--muted);
  font-weight: 800;
}

.ops-job-row .mini-action {
  grid-column: 2;
  justify-self: end;
  align-self: center;
}

.ops-report-row {
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.ops-report-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
}

.ops-report-main strong,
.ops-report-main span,
.ops-report-main small,
.ops-report-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-report-main small,
.ops-report-main em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.ops-report-main em {
  color: rgba(245, 247, 251, 0.56);
  font-style: normal;
}

.ops-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-action {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
}

.mini-action.danger {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.12);
  color: #ff9a9a;
}

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

.menu-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.menu-row.login-row {
  min-height: 76px;
  border-color: rgba(127, 244, 231, 0.26);
  background:
    linear-gradient(135deg, rgba(127, 244, 231, 0.12), rgba(242, 181, 255, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.menu-row.login-row span {
  display: grid;
  gap: 4px;
}

.menu-row.login-row strong {
  font-size: 16px;
  line-height: 1.1;
}

.menu-row.login-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.menu-row.login-row svg {
  color: #80f4e8;
}

.menu-row.danger {
  color: #dd3b3b;
}

.version {
  margin-top: 26px;
  text-align: center;
}

.video-maker-screen {
  background:
    linear-gradient(180deg, rgba(17, 18, 24, 0.04), transparent 180px),
    var(--bg);
}

.video-maker-header {
  align-items: flex-start;
}

.video-hero-panel {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 18, 24, 0.96), rgba(38, 34, 54, 0.94) 54%, rgba(25, 83, 77, 0.88)),
    #111218;
  color: #fff;
  box-shadow: var(--shadow);
}

.video-hero-panel h2 {
  margin: 10px 0 8px;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: 0;
}

.video-hero-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.video-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(223, 245, 63, 0.16);
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
}

.video-preview-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.video-phone-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  background: #0b0d14;
  box-shadow: var(--shadow);
}

.video-phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  filter: saturate(1.06) contrast(1.04);
}

.video-preview-overlay {
  position: absolute;
  inset: auto 14px 14px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(13, 15, 22, 0.74);
  color: #fff;
  backdrop-filter: blur(12px);
}

.video-preview-overlay span {
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
}

.video-preview-overlay strong {
  font-size: 20px;
  line-height: 1.15;
}

.video-preview-overlay small {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.video-timeline {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.25fr 0.8fr;
  gap: 5px;
  height: 8px;
}

.video-timeline span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.video-timeline span:first-child {
  background: var(--lime);
}

.video-maker-section {
  margin-top: 22px;
}

.video-upload-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  width: 100%;
  gap: 2px 12px;
  min-height: 76px;
  padding: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
}

.video-upload-card svg {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  color: var(--violet);
}

.video-upload-card span {
  font-size: 16px;
  font-weight: 900;
}

.video-upload-card small {
  color: var(--muted);
  font-weight: 800;
}

.video-shot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.video-shot-item {
  position: relative;
  display: grid;
  min-height: 98px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.video-shot-item img {
  width: 100%;
  height: 100%;
  min-height: 98px;
  object-fit: cover;
}

.video-shot-item span {
  position: absolute;
  top: 7px;
  left: 7px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(17, 18, 24, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.video-shot-item p {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  margin: 0;
  padding: 6px;
  border-radius: 8px;
  background: rgba(13, 15, 22, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.video-shot-item.is-placeholder {
  align-content: end;
  min-height: 98px;
  padding: 42px 8px 10px;
  background:
    linear-gradient(180deg, rgba(24, 26, 34, 0.42), rgba(24, 26, 34, 0.94)),
    repeating-linear-gradient(135deg, #232735 0 8px, #181b24 8px 16px);
}

.video-shot-item.is-placeholder p {
  position: static;
  padding: 0;
  background: transparent;
  color: rgba(245, 247, 251, 0.72);
}

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

.video-template-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 126px;
  padding: 12px 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-align: left;
}

.video-template-card svg {
  color: var(--teal);
}

.video-template-card strong {
  font-size: 15px;
  line-height: 1.15;
}

.video-template-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.video-template-card.is-selected {
  border-color: var(--lime);
  background: rgba(223, 245, 63, 0.14);
  box-shadow: 0 8px 18px rgba(20, 24, 39, 0.18);
}

.video-music-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #111218;
  color: #fff;
}

.video-music-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.video-music-card p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.video-music-card svg {
  flex: 0 0 auto;
  color: var(--lime);
}

.video-duration-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 8px;
  color: var(--ink);
  font-weight: 900;
}

.video-duration-range {
  width: 100%;
  accent-color: var(--dark);
}

.video-credit-strip {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.video-credit-strip strong {
  display: block;
  font-size: 20px;
}

.video-credit-strip .ghost-action {
  min-height: 42px;
  padding: 0 14px;
}

.chip,
.preset-card,
.plan-card,
.big-input,
.segmented button,
.generation-gate,
.credit-panel,
.subscription-panel,
.modal-panel,
.menu-row,
.mini-action,
.video-upload-card,
.video-shot-item,
.video-template-card,
.video-credit-strip,
.feedback-form select,
.feedback-form textarea,
.feedback-form input {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.chip.is-selected,
.segmented button.is-selected,
.video-template-card.is-selected {
  border-color: var(--lime);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  outline-color: var(--lime);
}

.empty-state,
.lyrics-sheet {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.video-shot-item p {
  background: rgba(13, 15, 22, 0.76);
  color: #fff;
}

.video-shot-item.is-placeholder {
  background:
    linear-gradient(180deg, rgba(24, 26, 34, 0.42), rgba(24, 26, 34, 0.94)),
    repeating-linear-gradient(135deg, #232735 0 8px, #181b24 8px 16px);
}

.video-shot-item.is-placeholder p {
  color: rgba(245, 247, 251, 0.72);
}

.video-duration-control {
  color: var(--ink);
}

.video-duration-range {
  accent-color: var(--lime);
}

.play-small {
  background: #07080c;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100vw, 430px);
  min-height: calc(72px + var(--safe-bottom));
  padding: 7px 12px var(--safe-bottom);
  transform: translateX(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 9, 12, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-shell[data-current="loading"] .bottom-nav,
.app-shell[data-current="result"] .bottom-nav,
.app-shell[data-current="create"] .bottom-nav {
  display: none;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  background: transparent;
  color: #737888;
  font-size: 11px;
  font-weight: 800;
}

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

.bottom-nav .create-nav {
  color: var(--coral);
}

.bottom-nav .create-nav svg {
  width: 34px;
  height: 34px;
}

body.is-chat-fullscreen {
  overflow: hidden;
}

.wechat-fullscreen[hidden] {
  display: none !important;
}

.wechat-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: #050608;
}

.wechat-fullscreen-phone {
  display: flex;
  width: min(100vw, 430px);
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(31, 32, 32, 0.98) 0%, rgba(16, 18, 18, 0.99) 44%, rgba(6, 8, 9, 1) 100%),
    radial-gradient(circle at 50% 28%, rgba(42, 95, 79, 0.22), transparent 34%),
    radial-gradient(circle at 20% 76%, rgba(77, 60, 38, 0.16), transparent 32%),
    #0a0d0d;
  color: #f5f5f7;
}

@supports (height: 100dvh) {
  .wechat-fullscreen-phone {
    height: 100dvh;
  }
}

.wechat-fullscreen-header {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  height: 58px;
  flex: 0 0 58px;
  padding: 0 8px;
  background: #202020;
}

.wechat-title-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: fit-content;
  min-width: 126px;
  max-width: 100%;
  gap: 6px;
}

.wechat-title-field svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: rgba(245, 245, 247, 0.48);
  stroke-width: 2.4;
}

.wechat-title-field.has-value svg {
  display: none;
}

.wechat-title-field:focus-within svg {
  color: #70fff0;
}

.wechat-title-input {
  width: 112px;
  min-width: 112px;
  max-width: min(220px, calc(100vw - 190px));
  border: 0;
  outline: 0;
  background: transparent;
  overflow: hidden;
  color: rgba(245, 245, 247, 0.82);
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-title-input::placeholder {
  color: rgba(245, 245, 247, 0.48);
}

.wechat-title-input:focus {
  color: #f5f5f7;
}

.wechat-back-button,
.wechat-more-button {
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(245, 245, 247, 0.9);
}

.wechat-back-button {
  width: 48px;
  height: 48px;
}

.wechat-back-button svg {
  width: 33px;
  height: 33px;
  stroke-width: 1.8;
}

.wechat-more-wrap {
  position: relative;
  justify-self: end;
}

.wechat-more-button {
  width: 48px;
  height: 48px;
}

.wechat-more-button svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.2;
}

.wechat-more-menu {
  position: absolute;
  top: 46px;
  right: 2px;
  z-index: 6;
  display: grid;
  width: 132px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(38, 38, 40, 0.98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.wechat-more-menu[hidden] {
  display: none;
}

.wechat-more-menu button {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 245, 247, 0.9);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.wechat-more-menu button:active {
  background: rgba(255, 255, 255, 0.1);
}

.wechat-fullscreen-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 22px 12px 24px;
}

.wechat-fullscreen-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
}

.wechat-fullscreen-row.is-right {
  justify-content: flex-end;
}

.wechat-fullscreen-avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  appearance: none;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.wechat-fullscreen-avatar.is-left {
  background:
    linear-gradient(145deg, rgba(150, 170, 190, 0.78), rgba(58, 69, 81, 0.92)),
    #4d5c69;
}

.wechat-fullscreen-avatar.is-right {
  background:
    linear-gradient(145deg, rgba(91, 45, 123, 0.9), rgba(24, 17, 31, 0.96)),
    #211827;
}

.wechat-fullscreen-bubble {
  position: relative;
  display: block;
  width: fit-content;
  max-width: calc(100% - 64px);
  min-width: 0;
  min-height: 0;
  padding: 7px 11px 8px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.36;
}

.wechat-fullscreen-row .wechat-fullscreen-bubble {
  max-width: calc(100% - 106px);
}

.wechat-fullscreen-bubble.is-editing {
  box-shadow: 0 0 0 2px rgba(42, 213, 191, 0.36);
}

.wechat-fullscreen-bubble.is-left {
  background: #2b2b2d;
  color: #e8e8ec;
}

.wechat-fullscreen-bubble.is-right {
  background: #27bf69;
  color: #07130d;
}

.wechat-fullscreen-input {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: 0;
  line-height: inherit;
}

.wechat-fullscreen-input::placeholder {
  opacity: 0;
}

.wechat-fullscreen-bubble::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 12px;
  background: inherit;
  transform: translateY(-50%);
}

.wechat-fullscreen-bubble.is-left::before {
  left: -8px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.wechat-fullscreen-bubble.is-right::before {
  right: -8px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.wechat-fullscreen-composer {
  display: grid;
  gap: 8px;
  min-height: calc(92px + var(--safe-bottom) + var(--browser-bottom-offset));
  flex: 0 0 auto;
  padding: 9px 12px calc(10px + var(--safe-bottom) + var(--browser-bottom-offset));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(32, 32, 33, 0.98);
}

.wechat-fullscreen-count {
  color: rgba(245, 245, 247, 0.54);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.wechat-fullscreen-actions {
  display: grid;
  grid-template-columns: 1fr 1.16fr 1fr;
  gap: 8px;
}

.wechat-fullscreen-actions .mini-action {
  min-height: 46px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 245, 247, 0.92);
  font-size: 15px;
  font-weight: 900;
}

.wechat-fullscreen-actions .mini-action.is-exit {
  background: rgba(42, 213, 191, 0.16);
  color: #70fff0;
}

.wechat-fullscreen-actions .mini-action svg {
  width: 17px;
  height: 17px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 50;
  min-width: 240px;
  max-width: min(380px, calc(100vw - 28px));
  padding: 13px 16px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  text-align: center;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: max(18px, var(--safe-top)) 18px max(18px, var(--safe-bottom));
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(242, 181, 255, 0.11), transparent 34%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px) saturate(0.82);
  -webkit-backdrop-filter: blur(16px) saturate(0.82);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 36px));
  max-height: min(680px, calc(100dvh - 72px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

body.modal-open .app-shell,
.app-shell.is-modal-blurred {
  filter: blur(4px) brightness(0.58);
  transform: scale(0.985);
  transition: filter 160ms ease, transform 160ms ease;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.modal-body {
  margin: 12px 0 18px;
  color: rgba(245, 247, 251, 0.72);
  line-height: 1.55;
}

.modal-body p {
  margin: 0 0 10px;
}

.policy-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: rgba(245, 247, 251, 0.66);
}

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

.feedback-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
}

.feedback-form select,
.feedback-form textarea,
.feedback-form input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
}

.feedback-form select,
.feedback-form input {
  min-height: 44px;
  padding: 0 10px;
}

.feedback-form textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.feedback-form small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.wechat-auth-preview {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.wechat-auth-qr {
  display: grid;
  place-items: center;
  width: 146px;
  height: 146px;
  border-radius: 8px;
  border: 1px solid rgba(43, 210, 111, 0.26);
  background:
    linear-gradient(135deg, rgba(43, 210, 111, 0.2), rgba(34, 212, 196, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.wechat-auth-qr svg {
  width: 62px;
  height: 62px;
  color: #69f28a;
}

.wechat-auth-preview p,
.wechat-auth-preview small {
  margin: 0;
  line-height: 1.5;
}

.wechat-auth-preview small {
  color: var(--muted);
  font-weight: 800;
}

@media (min-width: 620px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: 860px;
    border-radius: 24px;
  }

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

@media (max-width: 360px) {
  .page-header h1,
  .profile-head h1 {
    font-size: 30px;
  }

  .hero-strip h1 {
    font-size: 28px;
  }

  .preset-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }
}
