/* 云脉智算 · 模型广场 — 清言风格浅色对话 UI */

:root {
  --ym-bg: #f5f6f8;
  --ym-sidebar: #f0f1f4;
  --ym-surface: #ffffff;
  --ym-border: #e8e9ed;
  --ym-border-soft: #eef0f3;
  --ym-text: #1f2329;
  --ym-text-2: #646a73;
  --ym-text-3: #8f959e;
  --ym-accent: #3b82f6;
  --ym-accent-soft: #eff6ff;
  --ym-accent-hover: #2563eb;
  --ym-green: #22c55e;
  --ym-purple: #8b5cf6;
  --ym-teal: #14b8a6;
  --ym-orange: #f59e0b;
  --ym-radius: 14px;
  --ym-radius-sm: 10px;
  --ym-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --ym-sidebar-w: 268px;
  --ym-font: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ym-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--ym-font);
  color: var(--ym-text);
  background: var(--ym-bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

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

#app {
  display: flex;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* —— Sidebar —— */
.ym-sidebar {
  width: var(--ym-sidebar-w);
  flex-shrink: 0;
  background: var(--ym-sidebar);
  border-right: 1px solid var(--ym-border);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  transition: transform 0.25s ease, margin 0.25s ease;
  z-index: 40;
}

.ym-sidebar__top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 12px;
}

.ym-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ym-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.ym-logo__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ym-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--ym-text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ym-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ym-text);
}

.ym-new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 42px;
  margin-bottom: 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ym-new-chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.ym-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.ym-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ym-text);
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.ym-menu__item:hover,
.ym-menu__item.is-active {
  background: rgba(255, 255, 255, 0.85);
}

.ym-menu__item.is-active {
  color: var(--ym-text);
  box-shadow: inset 0 0 0 1px #dbe3ef;
}

.ym-menu__icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #2f343c;
  background: transparent;
}

.ym-menu__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ym-history-label {
  font-size: 12px;
  color: var(--ym-text-3);
  padding: 10px 10px 4px;
}

.ym-history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0 6px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
}

.ym-history::-webkit-scrollbar {
  width: 4px;
}

.ym-history::-webkit-scrollbar-track {
  background: transparent;
}

.ym-history::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 999px;
}

.ym-history::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.ym-history__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  padding: 2px 4px 2px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ym-text-2);
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}

.ym-history__item:hover,
.ym-history__item.is-active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ym-text);
}

.ym-history__title {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 5px 2px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ym-history__pin-ico {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ym-accent);
}

.ym-history__title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ym-history__more {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ym-text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
}

.ym-history__item:hover .ym-history__more,
.ym-history__item.is-active .ym-history__more,
.ym-history__more.is-open {
  opacity: 1;
}

.ym-history__more:hover,
.ym-history__more.is-open {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ym-text);
}

.ym-history__menu {
  position: absolute;
  right: 4px;
  top: calc(100% - 2px);
  z-index: 50;
  min-width: 132px;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--ym-border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.ym-history__menu[hidden] {
  display: none !important;
}

.ym-history__menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ym-text);
  cursor: pointer;
  text-align: left;
}

.ym-history__menu button:hover {
  background: var(--ym-bg);
}

.ym-history__menu button.is-danger {
  color: #dc2626;
}

.ym-history__menu button.is-danger:hover {
  background: #fef2f2;
}

.ym-history__menu i {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.ym-history__empty {
  padding: 12px 8px;
  font-size: 12px;
  color: var(--ym-text-3);
  text-align: center;
}

.ym-sidebar__foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--ym-border);
}

.ym-power {
  font-size: 11px;
  color: var(--ym-text-3);
  text-align: center;
  padding: 6px 8px 10px;
  letter-spacing: 0.02em;
}

.ym-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--ym-surface);
  border: 1px solid var(--ym-border-soft);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.ym-user:hover {
  box-shadow: var(--ym-shadow);
}

.ym-user__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  object-fit: cover;
  flex-shrink: 0;
}

.ym-user__avatar--letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  font-size: 14px;
}

.ym-user__meta {
  flex: 1;
  min-width: 0;
}

.ym-user__name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ym-user__credit {
  font-size: 11px;
  color: var(--ym-text-3);
  margin-top: 2px;
}

.ym-user__login {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ym-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px;
  text-align: center;
}

/* —— Main —— */
.ym-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ym-surface);
  position: relative;
}

.ym-main__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid transparent;
  flex-shrink: 0;
}

.ym-mobile-toggle {
  display: none;
}

.ym-model-select {
  position: relative;
}

.ym-model-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--ym-border);
  border-radius: 999px;
  background: var(--ym-surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--ym-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ym-model-btn:hover {
  border-color: #c7d2fe;
  background: var(--ym-accent-soft);
}

.ym-model-btn i {
  font-size: 14px;
  color: var(--ym-text-3);
}

.ym-model-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--ym-surface);
  border: 1px solid var(--ym-border);
  border-radius: 12px;
  box-shadow: var(--ym-shadow);
  padding: 6px;
  z-index: 30;
  display: none;
}

.ym-model-dropdown.is-open {
  display: block;
}

.ym-model-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ym-text);
}

.ym-model-option:hover,
.ym-model-option.is-active {
  background: var(--ym-accent-soft);
}

.ym-model-option strong {
  font-size: 13px;
}

.ym-model-option small {
  font-size: 11px;
  color: var(--ym-text-3);
}

.ym-bar-badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--ym-text-3);
  background: var(--ym-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.ym-auto-tts {
  margin-left: 6px;
  flex-shrink: 0;
  color: var(--ym-text-3);
}

.ym-auto-tts.is-on {
  color: var(--ym-accent);
  background: rgba(37, 99, 235, 0.1);
}

.ym-auto-tts.is-on i {
  color: var(--ym-accent);
}

/* —— Welcome / Chat —— */
.ym-stage {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ym-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 0 20px;
  position: relative;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.ym-welcome__title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 0 20px;
  flex-shrink: 0;
}

.ym-hot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 4px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
}

.ym-hot__row {
  width: 100%;
  overflow: hidden;
}

.ym-hot__track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  will-change: transform;
  animation: ym-hot-marquee 42s linear infinite;
}

.ym-hot__row.is-reverse .ym-hot__track {
  animation-name: ym-hot-marquee-rev;
  animation-duration: 48s;
}

.ym-hot__row:nth-child(3) .ym-hot__track {
  animation-duration: 36s;
}

.ym-hot.is-paused .ym-hot__track {
  animation-play-state: paused;
}

@keyframes ym-hot-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes ym-hot-marquee-rev {
  from {
    transform: translate3d(-50%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.ym-hot__chip {
  border: none;
  background: #f0f1f4;
  color: var(--ym-text);
  font-size: 13px;
  line-height: 1.4;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  white-space: nowrap;
  text-align: left;
  flex-shrink: 0;
  max-width: none;
}

.ym-hot__chip:hover {
  background: #e4e7ec;
  color: var(--ym-accent-hover);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .ym-hot__track {
    animation: none !important;
  }
}

.ym-promo {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 120px;
  padding: 14px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  transform: rotate(8deg);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  pointer-events: none;
}

.ym-promo small {
  display: block;
  opacity: 0.85;
  font-weight: 500;
  margin-top: 4px;
  font-size: 11px;
}

.ym-composer-wrap {
  width: 100%;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 28px 16px;
  flex-shrink: 0;
}

.ym-composer {
  position: relative;
  background: var(--ym-surface);
  border: 1px solid var(--ym-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: 12px 14px 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ym-composer:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12);
}

.ym-composer__input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ym-text);
  background: transparent;
  min-height: 52px;
  max-height: 180px;
  padding: 4px 4px 8px;
}

.ym-composer__input::placeholder {
  color: var(--ym-text-3);
}

.ym-composer__toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ym-composer__tools {
  display: flex;
  gap: 2px;
  position: relative;
  align-items: center;
}

.ym-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.ym-tool-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ym-tools-wrap {
  position: relative;
}

.ym-tools-pop {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 160px;
  background: var(--ym-surface);
  border: 1px solid var(--ym-border);
  border-radius: 12px;
  box-shadow: var(--ym-shadow);
  padding: 6px;
  z-index: 40;
}

.ym-tools-pop.is-open {
  display: block;
}

.ym-tools-pop button {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ym-text);
  cursor: pointer;
}

.ym-tools-pop button:hover {
  background: var(--ym-accent-soft);
  color: var(--ym-accent);
}

.ym-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 4px 8px;
}

.ym-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px 5px 10px;
  border-radius: 8px;
  background: var(--ym-bg);
  border: 1px solid var(--ym-border);
  font-size: 12px;
  color: var(--ym-text-2);
}

.ym-attach-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.ym-attach-chip button {
  border: none;
  background: transparent;
  color: var(--ym-text-3);
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
}

.ym-attach-chip button:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ym-text);
}

.ym-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  bottom: auto;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 200;
  max-width: min(90vw, 420px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ym-composer__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ym-think-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--ym-border);
  border-radius: 999px;
  background: var(--ym-bg);
  font-size: 12px;
  color: var(--ym-text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.ym-think-toggle.is-on {
  background: var(--ym-accent-soft);
  border-color: #bfdbfe;
  color: var(--ym-accent);
}

.ym-think-toggle.is-web.is-on {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

.ym-opt-btn {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7c3aed;
}
.ym-opt-btn:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
}
.ym-opt-btn.is-hidden {
  display: none !important;
}
.ym-opt-btn.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

/* 提示词优化：彩色 AI 边框 + 粒子层 */
.ym-composer.is-ai-optimizing {
  border-color: transparent !important;
  box-shadow:
    0 0 0 2px rgba(96, 165, 250, 0.35),
    0 0 0 4px rgba(167, 139, 250, 0.25),
    0 8px 28px rgba(124, 58, 237, 0.12);
  animation: ym-ai-glow 1.2s ease-in-out infinite alternate;
}
.ym-composer.is-ai-optimizing::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    120deg,
    #60a5fa,
    #a78bfa,
    #f472b6,
    #34d399,
    #fbbf24,
    #60a5fa
  );
  background-size: 300% 300%;
  animation: ym-ai-border 1.6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
@keyframes ym-ai-border {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes ym-ai-glow {
  from { filter: saturate(1); }
  to { filter: saturate(1.25); }
}
.ym-composer__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
}
.ym-composer__particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0.95;
  margin: 0;
  box-shadow: 0 0 6px currentColor;
  animation: ym-particle-fly 1.5s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
  will-change: transform, opacity;
}
@keyframes ym-particle-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
  55% { opacity: 0.85; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.18); opacity: 0; }
}
.ym-composer__input.is-optimizing-wait {
  opacity: 0.78;
  transition: opacity 0.35s ease;
}
.ym-composer__input.is-dissolving {
  /* 文字已拆成粒子并清空，这里只挡交互/光标 */
  caret-color: transparent;
  color: transparent;
}
.ym-composer__input.is-typing-in {
  opacity: 1;
  color: inherit;
  caret-color: auto;
  transition: opacity 0.2s ease;
}

.ym-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--ym-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
  position: relative;
}

.ym-send:hover:not(:disabled) {
  background: var(--ym-accent-hover);
  transform: scale(1.04);
}

.ym-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ym-send.is-stop {
  background: #ef4444;
}

.ym-send.is-voice {
  background: #eef2ff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.ym-send.is-voice:hover:not(:disabled) {
  background: #e0e7ff;
  transform: scale(1.04);
}

.ym-send-voice-icon {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

/* —— 实时语音 Stage —— */
.ym-voice-stage {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
}
.ym-voice-stage.is-hidden { display: none !important; }
.ym-voice-stage__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fce7f3 0%, #f5f3ff 42%, #eef2ff 100%);
}
.ym-voice-m, .ym-voice-d {
  position: relative;
  z-index: 1;
  flex: 1;
  display: none;
  flex-direction: column;
  min-height: 0;
}

/* Mobile = 图三 */
@media (max-width: 900px) {
  .ym-voice-m { display: flex; }
  .ym-voice-d { display: none !important; }
}
@media (min-width: 901px) {
  .ym-voice-m { display: none !important; }
  .ym-voice-d { display: flex; background: #fafafa; }
  .ym-voice-stage__bg { background: #f7f7f8; }
}

.ym-voice-m__transcript {
  padding: 28px 22px 12px;
  max-height: 34vh;
  overflow: auto;
}
.ym-voice-m__bot {
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 36vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ym-voice-m__user {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.ym-voice-m__orb-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 12px;
}
.ym-voice-orb {
  width: min(58vw, 280px);
  height: min(58vw, 280px);
  transition: transform 0.35s ease;
}
.ym-voice-orb.is-listening { animation: ym-orb-breathe 2.2s ease-in-out infinite; }
.ym-voice-orb.is-talking { animation: ym-orb-breathe 1.1s ease-in-out infinite; transform: scale(1.04); }
.ym-voice-orb__svg { width: 100%; height: 100%; display: block; }
@keyframes ym-orb-breathe {
  0%, 100% { transform: scale(1); filter: saturate(1); }
  50% { transform: scale(1.05); filter: saturate(1.15); }
}
.ym-voice-m {
  position: relative;
}
.ym-voice-m__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(15,23,42,0.08);
}
.ym-voice-m__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ym-voice-hangup-m {
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: #fee2e2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ym-voice-m__ctrl {
  padding: 18px 20px 36px;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.ym-voice-interrupt {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #334155;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}
.ym-voice-m__hint {
  color: #94a3b8;
  font-size: 13px;
}

/* Desktop = 图四 */
.ym-voice-d__hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 24px 20px;
}
.ym-voice-d__avatar-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
}
.ym-voice-wave-ring {
  position: absolute;
  inset: 0;
  width: 220px;
  height: 220px;
  opacity: 0.9;
}
.ym-voice-d__avatar-wrap.is-listening .ym-voice-wave-bars .b,
.ym-voice-d__avatar-wrap.is-talking .ym-voice-wave-bars .b {
  transform-origin: center;
  animation: ym-wave-bar 0.9s ease-in-out infinite alternate;
}
.ym-voice-d__avatar-wrap.is-talking .ym-voice-wave-bars .b { animation-duration: 0.55s; }
.ym-voice-wave-bars .b:nth-child(1) { animation-delay: 0s; }
.ym-voice-wave-bars .b:nth-child(2) { animation-delay: 0.08s; }
.ym-voice-wave-bars .b:nth-child(3) { animation-delay: 0.16s; }
.ym-voice-wave-bars .b:nth-child(4) { animation-delay: 0.04s; }
.ym-voice-wave-bars .b:nth-child(5) { animation-delay: 0.12s; }
.ym-voice-wave-bars .b:nth-child(6) { animation-delay: 0.2s; }
.ym-voice-wave-bars .b:nth-child(7) { animation-delay: 0.1s; }
.ym-voice-wave-bars .b:nth-child(8) { animation-delay: 0.18s; }
@keyframes ym-wave-bar {
  from { transform: scaleY(0.55); opacity: 0.65; }
  to { transform: scaleY(1.25); opacity: 1; }
}
.ym-voice-d__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.15);
  z-index: 1;
}
.ym-voice-d__bubble {
  position: absolute;
  top: 18px;
  right: -8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #ede9fe;
  color: #6d28d9;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.08);
  white-space: nowrap;
}
.ym-voice-d__bubble .dots {
  width: 14px;
  height: 6px;
  background:
    radial-gradient(circle, #7c3aed 1.4px, transparent 1.5px) 0 50% / 5px 6px,
    radial-gradient(circle, #7c3aed 1.4px, transparent 1.5px) 5px 50% / 5px 6px,
    radial-gradient(circle, #7c3aed 1.4px, transparent 1.5px) 10px 50% / 5px 6px;
  background-repeat: no-repeat;
  animation: ym-dots 1s linear infinite;
}
@keyframes ym-dots { 50% { opacity: 0.35; } }
.ym-voice-d__greet { text-align: center; }
.ym-voice-d__greet .hi {
  font-size: 34px;
  font-weight: 700;
  color: #7c3aed;
  letter-spacing: 0.02em;
}
.ym-voice-d__greet .sub {
  margin-top: 8px;
  font-size: 16px;
  color: #334155;
}
.ym-voice-d__lines {
  width: min(520px, 90%);
  text-align: center;
  min-height: 3em;
}
.ym-voice-d__lines .u { color: #94a3b8; font-size: 13px; margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.ym-voice-d__lines .a { color: #0f172a; font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 28vh; overflow: auto; }
.ym-voice-d__bar {
  margin: 0 auto 28px;
  width: min(720px, calc(100% - 48px));
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.ym-voice-d__bar .left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}
.ym-voice-d__bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}
.ym-voice-d__bar .timer {
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}
.ym-voice-d__bar .right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ym-voice-d__bar .icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ym-voice-d__bar .icon-btn.power {
  color: #ef4444;
  background: #fef2f2;
}
.ym-voice-d__bar .sep {
  width: 1px;
  height: 22px;
  background: #e2e8f0;
}
.rec-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.rec-toggle input { display: none; }
.rec-toggle i {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.2s;
}
.rec-toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.rec-toggle input:checked + i { background: #7c3aed; }
.rec-toggle input:checked + i::after { transform: translateX(16px); }

.ym-footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--ym-text-3);
  padding: 8px 16px 14px;
  flex-shrink: 0;
}

.ym-footer-note a {
  color: var(--ym-text-3);
}

.ym-footer-note a:hover {
  color: var(--ym-accent);
}

.ym-composer-power {
  display: none;
  text-align: center;
  font-size: 11px;
  color: var(--ym-text-3);
  padding: 6px 8px 0;
}

.ym-msg__disclaimer {
  margin-top: 8px;
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

/* —— Messages —— */
.ym-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0 8px;
}

.ym-messages__inner {
  max-width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ym-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ym-msg--user {
  flex-direction: row-reverse;
}

.ym-msg__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
}

.ym-msg--assistant .ym-msg__avatar {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.ym-msg__body {
  min-width: 0;
  max-width: min(100%, 920px);
}

.ym-msg--user .ym-msg__body {
  flex: 0 1 auto;
  width: fit-content;
  max-width: min(100%, 72%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ym-msg--assistant .ym-msg__body {
  flex: 1 1 auto;
  width: 100%;
  max-width: min(100%, 920px);
}

.ym-msg--user .ym-msg__bubble {
  background: var(--ym-accent-soft);
  color: var(--ym-text);
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.ym-msg__images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.ym-msg__img-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
  max-width: min(240px, 70vw);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.ym-msg__img-btn img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.ym-msg--assistant .ym-msg__content {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ym-text);
  word-break: break-word;
}

/* Thinking box */
.ym-think {
  margin-bottom: 10px;
  border: 1px solid var(--ym-border);
  border-radius: 12px;
  background: #fafbfc;
  overflow: hidden;
}

.ym-think__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ym-text-2);
  text-align: left;
}

.ym-think__head:hover {
  background: rgba(0, 0, 0, 0.02);
}

.ym-think__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ym-accent);
}

.ym-think__badge .spin,
.ym-web__badge .spin {
  animation: ym-spin 1s linear infinite;
}

.ym-think__chevron {
  margin-left: auto;
  transition: transform 0.2s;
  color: var(--ym-text-3);
}

.ym-think.is-collapsed .ym-think__chevron {
  transform: rotate(-90deg);
}

.ym-think.is-collapsed .ym-think__body {
  display: none;
}

.ym-think__body {
  padding: 0 12px 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ym-text-3);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  border-top: 1px dashed var(--ym-border-soft);
  padding-top: 10px;
  margin: 0 4px;
  scroll-behavior: auto;
}

.ym-think.is-streaming .ym-think__body {
  max-height: min(60vh, 560px);
}

.ym-web {
  margin-bottom: 10px;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  background: #f0fdf4;
  overflow: hidden;
}

.ym-web__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #047857;
  text-align: left;
}

.ym-web__head:hover {
  background: rgba(16, 185, 129, 0.06);
}

.ym-web__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
}

.ym-web__chevron {
  margin-left: auto;
  transition: transform 0.2s;
  color: #6ee7b7;
}

.ym-web.is-collapsed .ym-web__chevron {
  transform: rotate(-90deg);
}

.ym-web.is-collapsed .ym-web__body {
  display: none;
}

.ym-web__body {
  padding: 0 12px 12px;
  border-top: 1px dashed #a7f3d0;
  margin: 0 4px;
  padding-top: 10px;
}

.ym-web__item {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #d1fae5;
  text-decoration: none;
  color: inherit;
}

.ym-web__item:last-child {
  border-bottom: none;
}

.ym-web__item-title {
  font-size: 13px;
  font-weight: 600;
  color: #065f46;
  line-height: 1.4;
}

.ym-web__item-meta {
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
}

.ym-web__item-snip {
  margin-top: 4px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ym-web__empty {
  font-size: 12px;
  color: #6b7280;
  padding: 4px 0;
}

.ym-map {
  margin-bottom: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  overflow: hidden;
}

.ym-map__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #1d4ed8;
  text-align: left;
}

.ym-map__head:hover {
  background: rgba(37, 99, 235, 0.06);
}

.ym-map__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
}

.ym-map__chevron {
  margin-left: auto;
  transition: transform 0.2s;
  color: #93c5fd;
}

.ym-map.is-collapsed .ym-map__chevron {
  transform: rotate(-90deg);
}

.ym-map.is-collapsed .ym-map__body {
  display: none;
}

.ym-map__body {
  padding: 0 12px 12px;
  border-top: 1px dashed #bfdbfe;
  margin: 0 4px;
  padding-top: 10px;
}

.ym-map__item {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #dbeafe;
  text-decoration: none;
  color: inherit;
}

.ym-map__item:last-child {
  border-bottom: none;
}

.ym-map__item-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e3a8a;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ym-map__dist {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ym-map__item-meta {
  margin-top: 2px;
  font-size: 11px;
  color: #6b7280;
}

.ym-map__item-snip {
  margin-top: 4px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Markdown */
.ym-md > *:first-child {
  margin-top: 0;
}

.ym-md > *:last-child {
  margin-bottom: 0;
}

.ym-md p {
  margin: 0 0 0.75em;
}

.ym-md h1,
.ym-md h2,
.ym-md h3,
.ym-md h4 {
  margin: 1.1em 0 0.5em;
  font-weight: 700;
  line-height: 1.35;
}

.ym-md h1 { font-size: 1.35em; }
.ym-md h2 { font-size: 1.2em; }
.ym-md h3 { font-size: 1.08em; }

.ym-md ul,
.ym-md ol {
  margin: 0 0 0.75em;
  padding-left: 1.4em;
}

.ym-md li {
  margin: 0.25em 0;
}

.ym-md a {
  color: var(--ym-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ym-md blockquote {
  margin: 0.75em 0;
  padding: 6px 12px;
  border-left: 3px solid #93c5fd;
  background: var(--ym-accent-soft);
  color: var(--ym-text-2);
  border-radius: 0 8px 8px 0;
}

.ym-md table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75em 0;
  font-size: 13px;
}

.ym-md th,
.ym-md td {
  border: 1px solid var(--ym-border);
  padding: 6px 10px;
  text-align: left;
}

.ym-md th {
  background: var(--ym-bg);
}

.ym-md hr {
  border: none;
  border-top: 1px solid var(--ym-border);
  margin: 1em 0;
}

.ym-md code:not(pre code) {
  font-family: var(--ym-mono);
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: #c026d3;
}

.ym-md .katex {
  font-size: 1.05em;
}
.ym-md .katex-display {
  margin: 0.75em 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
}
.ym-math-fallback {
  font-family: var(--ym-mono);
  font-size: 0.92em;
  color: #334155;
}

.ym-code {
  margin: 0.75em 0;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: #0f172a;
  /* 不用 overflow:hidden，否则吸顶工具栏失效 */
}

.ym-code__bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 12px;
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ym-code__lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ym-code__lines {
  font-style: normal;
  opacity: 0.65;
  font-size: 11px;
}

.ym-code__btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ym-code__btn,
.ym-code__copy {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}

.ym-code__btn:hover,
.ym-code__copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.ym-code__body {
  position: relative;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.ym-code pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
}

.ym-code code {
  font-family: var(--ym-mono);
  font-size: 13px;
  line-height: 1.55;
  color: #e2e8f0;
  background: transparent !important;
}

/* 超过约 12 行默认折叠，底部渐隐 */
.ym-code.is-collapsed .ym-code__body {
  max-height: calc(1.55em * 12 + 24px);
}

.ym-code.is-collapsed .ym-code__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0), #0f172a 88%);
}

.ym-msg__actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.ym-msg:hover .ym-msg__actions,
.ym-msg__actions:focus-within {
  opacity: 1;
}

.ym-msg__action {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--ym-text-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ym-msg__action:hover,
.ym-msg__action.is-on {
  background: rgba(37, 99, 235, 0.08);
  color: var(--ym-accent);
}

.ym-icon-btn.is-recording {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  animation: ym-mic-pulse 1.2s ease-in-out infinite;
}

@keyframes ym-mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

@media (hover: none) {
  .ym-msg__actions {
    opacity: 1;
  }
}

.ym-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.ym-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ym-text-3);
  animation: ym-bounce 1.2s infinite ease-in-out;
}

.ym-typing span:nth-child(2) { animation-delay: 0.15s; }
.ym-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ym-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

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

.ym-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 35;
}

.ym-overlay.is-open {
  display: block;
}

.ym-login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ym-login-gate.is-open {
  display: flex;
}

.ym-login-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ym-login-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.ym-login-card p {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--ym-text-3);
  line-height: 1.5;
}

.ym-login-card .ym-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--ym-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.ym-login-card .ym-btn-primary:hover {
  background: var(--ym-accent-hover);
}

.ym-login-card .ym-btn-ghost {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ym-text-3);
}

.ym-geo-card p {
  margin-bottom: 12px;
}

.ym-geo-card__legal {
  margin: 0 0 20px !important;
  font-size: 12px !important;
  color: var(--ym-text-3);
  line-height: 1.6;
}

.ym-geo-card__legal a {
  color: var(--ym-accent);
  text-decoration: none;
}

.ym-geo-card__legal a:hover {
  text-decoration: underline;
}

.ym-login-card .ym-btn-ghost--btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: var(--ym-text-2, #4b5563);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.ym-login-card .ym-btn-ghost--btn:hover {
  background: #f9fafb;
}

/* hidden helpers */
.is-hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 860px) {
  .ym-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-105%);
  }

  .ym-sidebar.is-open {
    transform: translateX(0);
  }

  .ym-mobile-toggle {
    display: inline-flex;
  }

  .ym-promo {
    display: none;
  }

  .ym-bar-badge {
    display: none;
  }

  .ym-auto-tts {
    margin-left: auto;
  }

  .ym-main__bar {
    padding: 10px 12px;
  }

  .ym-welcome {
    padding: 20px 0 12px;
    justify-content: center;
  }

  .ym-welcome__title {
    font-size: 22px;
    margin-bottom: 22px;
    text-align: center;
  }

  .ym-hot {
    gap: 10px;
    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 10%,
      #000 90%,
      transparent 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0,
      #000 10%,
      #000 90%,
      transparent 100%
    );
  }

  .ym-hot__chip {
    font-size: 12.5px;
    padding: 8px 13px;
  }

  .ym-hot__track {
    gap: 8px;
    animation-duration: 38s;
  }

  .ym-hot__row.is-reverse .ym-hot__track {
    animation-duration: 44s;
  }

  .ym-hot__row:nth-child(3) .ym-hot__track {
    animation-duration: 32s;
  }

  .ym-messages__inner {
    padding: 0 12px;
  }

  .ym-composer-wrap {
    max-width: 100%;
    width: 100%;
    padding: 0 10px 8px;
  }

  .ym-composer {
    border-radius: 16px;
    padding: 10px 10px 8px;
  }

  .ym-composer__toolbar {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .ym-composer__right {
    gap: 6px;
    min-width: 0;
  }

  .ym-think-toggle {
    padding: 5px 8px;
    font-size: 11px;
  }

  .ym-think-toggle .ri-arrow-down-s-line {
    display: none;
  }

  .ym-footer-note {
    display: none;
  }

  .ym-composer-power {
    display: block;
  }

  .ym-msg--user .ym-msg__body {
    max-width: min(100%, 88%);
  }

  .ym-messages__inner {
    padding: 0 14px;
  }

  .ym-msg--assistant .ym-msg__body {
    max-width: 100%;
    padding-right: 36px;
    box-sizing: border-box;
  }

  .ym-cover {
    display: block;
    width: min(248px, 68%);
    max-width: min(248px, 68%);
  }

  /* 生图 / 3D 卡：手机端加宽，减少内边距 */
  .ym-imggen,
  .ym-gen3d {
    display: block;
    width: min(100%, 92%);
    max-width: min(320px, 92%);
    border-radius: 18px;
  }
  .ym-msg--assistant .ym-msg__body .ym-imggen,
  .ym-msg--assistant .ym-msg__body .ym-gen3d {
    margin-right: -20px;
  }
  .ym-imggen__head,
  .ym-gen3d__head {
    gap: 8px;
    padding: 12px 12px 6px;
  }
  .ym-imggen__icon,
  .ym-gen3d__icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .ym-imggen__icon svg,
  .ym-gen3d__icon svg { width: 15px; height: 15px; }
  .ym-imggen__title,
  .ym-gen3d__title { font-size: 13px; }
  .ym-imggen__sub,
  .ym-gen3d__sub { font-size: 11px; }
  .ym-imggen__action,
  .ym-gen3d__action { width: 30px; height: 30px; }
  .ym-imggen__action.is-spin svg,
  .ym-gen3d__action.is-spin svg { width: 14px; height: 14px; }
  .ym-imggen__body,
  .ym-gen3d__body { padding: 2px 12px 8px; }
  .ym-imggen__preview {
    aspect-ratio: 1 / 0.58;
    border-radius: 12px;
  }
  .ym-gen3d__preview {
    aspect-ratio: 1 / 0.62;
    border-radius: 12px;
  }
  .ym-imggen__anim { min-height: 96px; }
  .ym-gen3d__anim { min-height: 110px; }
  .ym-gen3d__orb {
    width: 48px;
    height: 48px;
  }
  .ym-gen3d__ring {
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
  }
  .ym-gen3d__ring--2 {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
  }
  .ym-imggen__canvas {
    width: 84px;
    height: 66px;
    border-radius: 10px;
  }
  .ym-imggen__foot,
  .ym-gen3d__foot {
    padding: 0 12px 12px;
  }
  .ym-imggen__dl,
  .ym-gen3d__dl { font-size: 12px; }
  .ym-imggen__badge,
  .ym-gen3d__badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  .ym-gen3d__status {
    font-size: 11px;
    margin-top: 6px;
  }
  .ym-gen3d__tools {
    gap: 4px;
    padding: 6px;
  }
  .ym-gen3d__tool {
    width: 30px;
    height: 30px;
  }
}

/* Code preview modal */
.ym-preview {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ym-preview__panel {
  width: min(960px, 100%);
  height: min(80vh, 720px);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.ym-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1e293b;
  color: #e2e8f0;
  flex-shrink: 0;
}

.ym-preview__title {
  font-size: 13px;
  font-weight: 600;
}

.ym-preview__actions {
  display: flex;
  gap: 8px;
}

.ym-preview__btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #cbd5e1;
  font-size: 12px;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}

.ym-preview__btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ym-preview__frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

.ym-preview__fallback {
  flex: 1;
  margin: 0;
  padding: 16px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 13px;
}

/* Image lightbox */
.ym-lightbox {
  position: fixed;
  inset: 0;
  z-index: 230;
  background: rgba(2, 6, 23, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ym-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.ym-lightbox__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* —— Seed3D 渐变玻璃卡片 —— */
.ym-gen3d {
  margin: 10px 0 4px;
  max-width: min(480px, 100%);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 90% at 10% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(145deg, #c4b5fd 0%, #a78bfa 28%, #e879f9 62%, #f9a8d4 100%);
  box-shadow: 0 12px 36px rgba(167, 139, 250, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}
.ym-gen3d__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
}
.ym-gen3d__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ym-gen3d__icon svg { width: 18px; height: 18px; }
.ym-gen3d__meta { flex: 1; min-width: 0; }
.ym-gen3d__title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(88, 28, 135, 0.2);
}
.ym-gen3d__sub {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.82;
}
.ym-gen3d__action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #7c3aed;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}
.ym-gen3d__action:hover { transform: scale(1.04); }
.ym-gen3d__body {
  padding: 4px 14px 12px;
}
.ym-gen3d__preview {
  width: 100%;
  aspect-ratio: 1 / 0.72;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  position: relative;
}
.ym-gen3d__preview--live {
  aspect-ratio: 1 / 0.92;
  background:
    linear-gradient(180deg, #e8eef5 0%, #d5dde8 55%, #c8d0db 100%);
}
.ym-gen3d__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ym-gen3d__viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ym-gen3d__viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 140, 160, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 160, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center bottom;
  mask-image: linear-gradient(180deg, transparent 8%, #000 42%);
  pointer-events: none;
  z-index: 0;
}
.ym-gen3d__mv {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  --poster-color: transparent;
  background: transparent;
}
.ym-gen3d__viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #475569;
  background: rgba(232, 238, 245, 0.72);
}
.ym-gen3d__viewer-loading.is-error { color: #b91c1c; }
.ym-gen3d__tools {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ym-gen3d__tool {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}
.ym-gen3d__tool:hover { background: #fff; }
.ym-gen3d__tool.is-on { color: #7c3aed; background: #f5f3ff; }
.ym-gen3d__status {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.9;
}
.ym-gen3d__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 14px;
}
.ym-gen3d__dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.95;
}
.ym-gen3d__dl:hover { text-decoration: underline; }
.ym-gen3d__badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}
.ym-gen3d.is-error {
  background: linear-gradient(145deg, #fda4af, #fb7185 55%, #f9a8d4);
}

/* —— AI 生图卡片（与 3D/翻唱同系：粉紫 + 中间光球动画） —— */
.ym-imggen {
  margin: 10px 0 4px;
  max-width: min(340px, 100%);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, 0.38), transparent 55%),
    linear-gradient(145deg, #f9a8d4 0%, #e879f9 42%, #c4b5fd 100%);
  box-shadow: 0 12px 36px rgba(232, 121, 249, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
}
.ym-imggen__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
}
.ym-imggen__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ym-imggen__icon svg { width: 18px; height: 18px; }
.ym-imggen__meta { flex: 1; min-width: 0; }
.ym-imggen__title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(88, 28, 135, 0.18);
}
.ym-imggen__sub {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.85;
}
.ym-imggen__action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #c026d3;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ym-imggen__action.is-spin {
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.ym-imggen__action.is-spin svg {
  display: block;
  animation: ym-spin 0.9s linear infinite;
}
.ym-imggen__body { padding: 4px 14px 12px; }
.ym-imggen__preview {
  width: 100%;
  aspect-ratio: 1 / 0.72;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  position: relative;
}
.ym-imggen__preview--live {
  aspect-ratio: 1 / 1;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
}
.ym-imggen__anim {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 画框扫光 + 笔触：生图感 */
.ym-imggen__canvas {
  position: relative;
  width: 108px;
  height: 86px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  box-shadow:
    0 10px 28px rgba(88, 28, 135, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: ym-imggen-frame 2.8s ease-in-out infinite;
}
.ym-imggen__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: ym-imggen-shimmer 2.2s ease-in-out infinite;
}
.ym-imggen__stroke {
  position: absolute;
  left: 14px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transform-origin: left center;
  animation: ym-imggen-stroke 1.8s ease-in-out infinite;
}
.ym-imggen__stroke--a {
  top: 24px;
  width: 62%;
}
.ym-imggen__stroke--b {
  top: 38px;
  width: 48%;
  opacity: 0.72;
  animation-delay: 0.18s;
}
.ym-imggen__stroke--c {
  top: 52px;
  width: 36%;
  opacity: 0.55;
  animation-delay: 0.36s;
}
.ym-imggen__dot {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
  animation: ym-imggen-dot 1.4s ease-in-out infinite;
}
@keyframes ym-imggen-frame {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-3px) rotate(1.2deg); }
}
@keyframes ym-imggen-shimmer {
  0%, 18% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(120%); }
}
@keyframes ym-imggen-stroke {
  0% { transform: scaleX(0.2); opacity: 0.25; }
  40% { transform: scaleX(1); opacity: 0.9; }
  100% { transform: scaleX(0.55); opacity: 0.4; }
}
@keyframes ym-imggen-dot {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50% { transform: scale(1.15); opacity: 1; }
}
.ym-imggen__shot {
  display: block;
  line-height: 0;
  width: 100%;
  height: 100%;
}
.ym-imggen__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ym-imggen__fail-txt {
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  padding: 16px;
  opacity: 0.95;
}
.ym-imggen__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 14px;
}
.ym-imggen__dl {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.95;
}
.ym-imggen__dl:hover { text-decoration: underline; }
.ym-imggen__badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}
.ym-imggen.is-error {
  background: linear-gradient(145deg, #fda4af, #fb7185 55%, #f9a8d4);
}

/* —— 支付宝 AI 付支付卡 —— */
.ym-gen3d--aipay {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: 420px;
}
.ym-aipay-card {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #1677ff 0%, #0a58d6 55%, #0958d9 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(22, 119, 255, 0.28);
}
.ym-aipay-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 4px;
}
.ym-aipay-card__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.ym-aipay-card__logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #fff;
  color: #1677ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.ym-aipay-card__sub {
  font-size: 11px;
  opacity: 0.85;
}
.ym-aipay-card__main {
  display: flex;
  gap: 12px;
  padding: 8px 14px 14px;
  align-items: center;
}
.ym-aipay-card__info { flex: 1; min-width: 0; }
.ym-aipay-card__merchant {
  font-size: 12px;
  opacity: 0.9;
}
.ym-aipay-card__goods {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}
.ym-aipay-card__price {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.ym-aipay-card__tip {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.85;
  line-height: 1.4;
}
.ym-aipay-card__qrwrap {
  width: 112px;
  height: 112px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  flex-shrink: 0;
}
.ym-aipay-card__qrwrap--lg {
  width: 168px;
  height: 168px;
  padding: 10px;
  border-radius: 12px;
}
.ym-aipay-card__main--wallet {
  align-items: flex-start;
}
.ym-aipay-card__qr {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}
.ym-aipay-card__qr-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  color: #64748b;
  line-height: 1.35;
  padding: 4px;
}
.ym-aipay-card__actions {
  padding: 0 14px 14px;
}
.ym-aipay-card__btn {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #1677ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.ym-aipay-card__btn--ghost {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.ym-aipay-card__btn + .ym-aipay-card__btn { margin-top: 8px; }
.ym-aipay-card__link {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 0 14px 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}
.ym-aipay-card__link:hover { color: #fff; }
.ym-aipay-card__hint {
  padding: 0 14px 12px;
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.45;
}

/* —— 翻唱上传弹窗进度 —— */
.ym-cover-upload {
  margin: 0 0 14px;
  text-align: left;
}
.ym-cover-upload.is-hidden { display: none !important; }
.ym-cover-upload__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--ym-text-2, #475569);
}
.ym-cover-upload__row i { color: #c026d3; font-size: 18px; }
.ym-cover-upload__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ym-cover-upload__track {
  height: 8px;
  border-radius: 999px;
  background: #f1e4f7;
  overflow: hidden;
}
.ym-cover-upload__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e879f9, #a78bfa);
  transition: width 0.18s ease;
}
.ym-cover-upload__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ym-text-3, #94a3b8);
}

/* —— AI 翻唱音乐卡片 —— */
.ym-cover {
  margin: 10px 0 4px;
  max-width: min(340px, 100%);
  width: auto;
  box-sizing: border-box;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, 0.38), transparent 55%),
    linear-gradient(145deg, #f9a8d4 0%, #e879f9 42%, #c4b5fd 100%);
  box-shadow: 0 12px 36px rgba(232, 121, 249, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
}
.ym-cover--enter {
  animation: ym-cover-enter 0.45s ease both;
}
@keyframes ym-cover-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.ym-cover__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
}
.ym-cover__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ym-cover__icon svg { width: 20px; height: 20px; }
.ym-cover__meta { flex: 1; min-width: 0; }
.ym-cover__title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(88, 28, 135, 0.18);
}
.ym-cover__sub {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.85;
}
.ym-cover__action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #c026d3;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}
.ym-cover__action:hover { transform: scale(1.04); }
.ym-cover__action.is-disabled,
.ym-cover__action.is-spin {
  opacity: 0.7;
  pointer-events: none;
}
.ym-cover__action.is-spin svg {
  animation: ym-spin 0.9s linear infinite;
}
.ym-cover__body { padding: 4px 14px 10px; }
.ym-cover__eq {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 36px;
  margin: 6px 0 10px;
}
.ym-cover__eq i {
  flex: 1;
  display: block;
  height: 30%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  animation: ym-cover-eq 1s ease-in-out infinite;
}
.ym-cover__eq i:nth-child(2) { animation-delay: 0.08s; height: 55%; }
.ym-cover__eq i:nth-child(3) { animation-delay: 0.16s; height: 80%; }
.ym-cover__eq i:nth-child(4) { animation-delay: 0.24s; height: 45%; }
.ym-cover__eq i:nth-child(5) { animation-delay: 0.32s; height: 70%; }
.ym-cover__eq i:nth-child(6) { animation-delay: 0.4s; height: 40%; }
.ym-cover__eq i:nth-child(7) { animation-delay: 0.48s; height: 60%; }
@keyframes ym-cover-eq {
  0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}
.ym-cover__progress { margin-top: 2px; }
.ym-cover__progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.ym-cover__progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
  transition: width 0.35s ease;
}
.ym-cover__progress-pct {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}
.ym-cover__player-wrap { position: relative; }
.ym-cover__audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.ym-cover__ico-play.is-hidden,
.ym-cover__ico-pause.is-hidden {
  display: none !important;
}
.ym-cover__ctrl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}
.ym-cover__seek {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  touch-action: none;
  overflow: hidden;
}
.ym-cover__seek.is-shimmer {
  cursor: default;
  overflow: hidden;
}
.ym-cover__seek.is-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: ym-cover-shimmer 1.15s ease-in-out infinite;
}
@keyframes ym-cover-shimmer {
  100% { transform: translateX(100%); }
}
.ym-cover__seek.is-shimmer .ym-cover__seek-fill,
.ym-cover__seek.is-shimmer .ym-cover__seek-knob {
  opacity: 0;
}
.ym-cover__seek.is-loading-pct {
  cursor: default;
}
.ym-cover__seek.is-loading-pct .ym-cover__seek-knob {
  opacity: 0;
}
.ym-cover__seek.is-loading-pct .ym-cover__seek-fill {
  background: rgba(255, 255, 255, 0.88);
  transition: width 0.2s ease;
}
.ym-cover__seek-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.ym-cover__seek-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(88, 28, 135, 0.28);
  pointer-events: none;
  z-index: 1;
}
.ym-cover__time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.92;
  white-space: nowrap;
}
.ym-cover__time-sep { margin: 0 3px; opacity: 0.7; }
.ym-cover__action.is-busy {
  opacity: 0.55;
  pointer-events: none;
}
.ym-cover__dl.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  text-decoration: none;
}
.ym-cover__retry {
  margin-left: 6px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.ym-cover__retry:hover { background: rgba(255, 255, 255, 0.28); }
.ym-cover.is-playing .ym-cover__icon {
  animation: ym-cover-icon-pulse 1.2s ease-in-out infinite;
}
@keyframes ym-cover-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.ym-cover__status {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.92;
}
.ym-cover__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 14px;
}
.ym-cover__dl {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.ym-cover__dl:hover { text-decoration: underline; }
.ym-cover__dl:disabled { opacity: 0.6; cursor: wait; }
.ym-cover__badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}
.ym-cover.is-error {
  background: linear-gradient(145deg, #fda4af, #fb7185 55%, #f9a8d4);
}

.ym-gen3d__action.is-spin {
  background: rgba(255, 255, 255, 0.28) !important;
  pointer-events: none;
}
.ym-gen3d__action.is-spin svg {
  display: block;
  animation: ym-spin 0.9s linear infinite;
}
.ym-gen3d__anim {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ym-gen3d__orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #e9d5ff 45%, #c084fc 80%);
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.35);
  animation: ym-gen3d-float 1.6s ease-in-out infinite;
  z-index: 2;
  position: relative;
}
.ym-gen3d__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  animation: ym-gen3d-ripple 1.8s ease-out infinite;
  pointer-events: none;
}
.ym-gen3d__ring--2 {
  animation-delay: 0.6s;
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
}
@keyframes ym-gen3d-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}
@keyframes ym-gen3d-ripple {
  0% { opacity: 0.7; transform: scale(0.75); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* 全屏 3D 浏览 */
.ym-gen3d-fs {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: #d8e0ea;
  display: flex;
  flex-direction: column;
}
.ym-gen3d-fs.is-hidden { display: none; }
.ym-gen3d-fs__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.ym-gen3d-fs__title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}
.ym-gen3d-fs__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #334155;
}
.ym-gen3d-fs__stage {
  flex: 1;
  position: relative;
  background:
    linear-gradient(180deg, #eef2f7 0%, #d5dde8 70%, #c5ced9 100%);
}
.ym-gen3d-fs__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100, 120, 140, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 120, 140, 0.2) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, transparent 5%, #000 48%);
  pointer-events: none;
}
.ym-gen3d-fs__stage .ym-gen3d__mv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ym-gen3d-fs__stage .ym-gen3d__viewer-loading {
  background: transparent;
  color: #334155;
}
body.ym-gen3d-fs-open { overflow: hidden; }

/* ========== 滴滴打车卡片 ========== */
.ym-didi {
  margin: 0 0 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--ym-border);
  box-shadow: var(--ym-shadow);
  max-width: 520px;
}
.ym-didi.is-error { border-color: #fecaca; }
.ym-didi__intro {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ym-text);
  margin: 0 0 10px;
}
.ym-didi__link {
  color: var(--ym-accent);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed rgba(59, 130, 246, 0.45);
}
.ym-didi__link i { font-size: 13px; margin-left: 2px; vertical-align: -1px; }
.ym-didi__bullets {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ym-text-2);
  line-height: 1.7;
}
.ym-didi__bullets li {
  position: relative;
  padding-left: 14px;
}
.ym-didi__bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--ym-text-3);
}
.ym-didi__bullets strong { color: var(--ym-text); font-weight: 600; }
.ym-didi__map {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #e8edf3;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
}
.ym-didi__map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ym-didi__map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ym-text-3);
  font-size: 13px;
}
.ym-didi__map-card {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(24, 24, 27, 0.82);
  color: #fff;
  backdrop-filter: blur(8px);
}
.ym-didi__map-price {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}
.ym-didi__map-tip {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}
.ym-didi__pick {
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ym-didi__pick:hover { background: rgba(255, 255, 255, 0.28); }
.ym-didi__pick:disabled { opacity: 0.5; cursor: not-allowed; }
.ym-didi__foot {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ym-text-2);
}
.ym-didi__cmd {
  color: var(--ym-accent);
  font-weight: 600;
  cursor: pointer;
}
.ym-didi__status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ym-text-3);
}
.ym-didi.is-loading .ym-didi__status { color: var(--ym-accent); }

/* 选车底部弹层（深色，参考高德打车） */
.ym-didi-sheet {
  position: fixed;
  inset: 0;
  z-index: 13000;
  pointer-events: none;
  visibility: hidden;
}
.ym-didi-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}
.ym-didi-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.ym-didi-sheet.is-open .ym-didi-sheet__mask { opacity: 1; }
.ym-didi-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  background: #121212;
  color: #f4f4f5;
  border-radius: 20px 20px 0 0;
  transform: translateY(108%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
.ym-didi-sheet.is-open .ym-didi-sheet__panel { transform: translateY(0); }
.ym-didi-sheet__grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 10px auto 4px;
}
.ym-didi-sheet__head {
  padding: 6px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ym-didi-sheet__title {
  font-size: 15px;
  font-weight: 650;
}
.ym-didi-sheet__sub {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(244, 244, 245, 0.65);
}
.ym-didi-sheet__sub em {
  color: #60a5fa;
  font-style: normal;
  font-weight: 600;
}
.ym-didi-sheet__pricebar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ym-didi-sheet__chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 244, 245, 0.85);
}
.ym-didi-sheet__body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}
.ym-didi-sheet__nav {
  width: 88px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #1a1a1a;
}
.ym-didi-sheet__nav-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(244, 244, 245, 0.55);
  text-align: left;
  padding: 14px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}
.ym-didi-sheet__nav-item.is-on {
  color: #fff;
  background: #121212;
  font-weight: 600;
}
.ym-didi-sheet__nav-item.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #3b82f6;
}
.ym-didi-sheet__nav-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.7;
}
.ym-didi-sheet__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 12px;
}
.ym-didi-sheet__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border: 0;
  width: 100%;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
}
.ym-didi-sheet__item:hover { background: rgba(255, 255, 255, 0.04); }
.ym-didi-sheet__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff7a45, #ff4d4f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ym-didi-sheet__meta { flex: 1; min-width: 0; }
.ym-didi-sheet__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ym-didi-sheet__tags {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(244, 244, 245, 0.45);
}
.ym-didi-sheet__right {
  text-align: right;
  flex-shrink: 0;
}
.ym-didi-sheet__item-price {
  font-size: 14px;
  font-weight: 650;
}
.ym-didi-sheet__discount {
  margin-top: 3px;
  font-size: 11px;
  color: #fb923c;
}
.ym-didi-sheet__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  margin-left: 8px;
  flex-shrink: 0;
  position: relative;
}
.ym-didi-sheet__item.is-on .ym-didi-sheet__check {
  border-color: #3b82f6;
  background: #3b82f6;
}
.ym-didi-sheet__item.is-on .ym-didi-sheet__check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ym-didi-sheet__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #0d0d0d;
}
.ym-didi-sheet__sum { flex: 1; min-width: 0; }
.ym-didi-sheet__sum-price {
  font-size: 16px;
  font-weight: 700;
}
.ym-didi-sheet__sum-tip {
  margin-top: 2px;
  font-size: 11px;
  color: #f87171;
}
.ym-didi-sheet__cta {
  flex-shrink: 0;
  min-width: 128px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #3b82f6;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.ym-didi-sheet__cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ym-didi-sheet__cta:not(:disabled):hover { background: #2563eb; }
body.ym-didi-sheet-open { overflow: hidden; }

@media (max-width: 640px) {
  .ym-didi { max-width: none; }
  .ym-didi-sheet__nav { width: 76px; }
}

/* ========== 麦当劳点餐 ========== */
.ym-mcd {
  margin: 0 0 12px;
  max-width: 440px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ececec;
  overflow: hidden;
}
.ym-mcd__hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.ym-mcd__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ym-mcd__mark img {
  width: 22px;
  height: 20px;
  object-fit: contain;
  display: block;
}
.ym-mcd__hero-title {
  font-size: 15px;
  font-weight: 650;
  color: #111;
}
.ym-mcd__hero-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #888;
}
.ym-mcd__body { padding: 8px 10px 12px; }
.ym-mcd__store {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 11px 10px;
  margin: 0 0 6px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.ym-mcd__store:active { background: #fafafa; }
.ym-mcd__store.is-on {
  border-color: #da291c;
  background: #fff8f7;
}
.ym-mcd__radio {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  flex-shrink: 0;
}
.ym-mcd__store.is-on .ym-mcd__radio {
  border-color: #da291c;
  box-shadow: inset 0 0 0 4px #da291c;
}
.ym-mcd__store-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}
.ym-mcd__store-addr {
  margin-top: 3px;
  font-size: 12px;
  color: #888;
  line-height: 1.45;
}
.ym-mcd__store-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #666;
}
.ym-mcd__store-meta em {
  color: #da291c;
  font-style: normal;
  font-weight: 600;
}
.ym-mcd__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.ym-mcd__btn {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  font-family: inherit;
}
.ym-mcd__btn--primary { background: #da291c; color: #fff; }
.ym-mcd__btn--primary:disabled { opacity: .4; cursor: not-allowed; }
.ym-mcd__btn--ghost {
  flex: 0 0 auto;
  padding: 0 14px;
  background: #f5f5f5;
  color: #444;
}
.ym-mcd__tip {
  margin-top: 8px;
  font-size: 11px;
  color: #999;
  line-height: 1.5;
}

.ym-mcd-sheet {
  position: fixed;
  inset: 0;
  z-index: 13010;
  pointer-events: none;
  visibility: hidden;
}
.ym-mcd-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}
.ym-mcd-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .2s ease;
}
.ym-mcd-sheet.is-open .ym-mcd-sheet__mask { opacity: 1; }
.ym-mcd-sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  transform: translateY(105%);
  transition: transform .26s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.ym-mcd-sheet.is-open .ym-mcd-sheet__panel { transform: translateY(0); }
.ym-mcd-sheet__grab {
  width: 32px; height: 4px; border-radius: 999px;
  background: #ddd; margin: 8px auto 0;
}
.ym-mcd-sheet__head {
  padding: 8px 12px 10px;
  border-bottom: 1px solid #f0f0f0;
}
.ym-mcd-sheet__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ym-mcd-sheet__logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ym-mcd-sheet__logo img {
  width: 20px; height: 18px; object-fit: contain; display: block;
}
.ym-mcd-sheet__head-text { flex: 1; min-width: 0; }
.ym-mcd-sheet__title {
  font-size: 15px; font-weight: 650; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ym-mcd-sheet__sub { margin-top: 2px; font-size: 12px; color: #888; }
.ym-mcd-sheet__close {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #f3f3f3; color: #666; font-size: 20px; line-height: 1;
  cursor: pointer;
}
.ym-mcd-sheet__body {
  flex: 1; min-height: 0; display: flex; overflow: hidden;
  background: #fff;
}
.ym-mcd-sheet__nav {
  width: 84px; flex-shrink: 0; overflow-y: auto;
  background: #f7f7f7;
}
.ym-mcd-sheet__nav-item {
  display: block; width: 100%; border: 0; background: transparent;
  color: #666; text-align: left; padding: 13px 10px; font-size: 12px;
  cursor: pointer; font-family: inherit; position: relative; line-height: 1.35;
}
.ym-mcd-sheet__nav-item.is-on {
  color: #111; background: #fff; font-weight: 650;
}
.ym-mcd-sheet__nav-item.is-on::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; background: #da291c; border-radius: 0 2px 2px 0;
}
.ym-mcd-sheet__list {
  flex: 1; overflow-y: auto; padding: 6px 10px 18px;
}
.ym-mcd-sheet__item {
  display: flex; gap: 10px; align-items: stretch;
  padding: 10px 0;
  border-bottom: 1px solid #f3f3f3;
  cursor: pointer;
}
.ym-mcd-sheet__item:active { background: #fafafa; }
.ym-mcd-sheet__img {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover;
  background: #f2f2f2; flex-shrink: 0;
}
.ym-mcd-sheet__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ym-mcd-sheet__name {
  font-size: 14px; font-weight: 600; color: #222; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ym-mcd-sheet__desc {
  margin-top: 3px; font-size: 11px; color: #999;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ym-mcd-sheet__row {
  margin-top: auto; padding-top: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.ym-mcd-sheet__price {
  font-size: 15px; color: #da291c; font-weight: 700;
}
.ym-mcd-sheet__price s {
  margin-left: 6px; color: #bbb; font-weight: 500; font-size: 12px;
}
.ym-mcd-sheet__qty {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.ym-mcd-sheet__qty button {
  width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: #da291c; color: #fff; font-size: 15px; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.ym-mcd-sheet__qty button.is-ghost {
  background: #fff; color: #da291c; border: 1px solid #da291c;
}
.ym-mcd-sheet__qty button:disabled { opacity: .3; }
.ym-mcd-sheet__qty span {
  min-width: 14px; text-align: center; font-weight: 650; font-size: 13px;
}

.ym-mcd-sheet__cart {
  max-height: 42%;
  overflow-y: auto;
  border-top: 1px solid #eee;
  background: #fafafa;
  padding: 8px 12px;
}
.ym-mcd-sheet__cart.is-hidden { display: none; }
.ym-mcd-sheet__cart-h {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 650; color: #333; margin-bottom: 6px;
}
.ym-mcd-sheet__cart-h button {
  border: 0; background: none; color: #da291c; font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.ym-mcd-sheet__cart-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #eee;
}
.ym-mcd-sheet__cart-row:last-child { border-bottom: 0; }
.ym-mcd-sheet__cart-name { flex: 1; min-width: 0; font-size: 13px; color: #333; }
.ym-mcd-sheet__cart-price { font-size: 13px; color: #da291c; font-weight: 650; }

.ym-mcd-sheet__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eee; background: #fff;
}
.ym-mcd-sheet__bag {
  position: relative;
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: #222; color: #fff;
  font-size: 20px; cursor: pointer; flex-shrink: 0;
}
.ym-mcd-sheet__bag-n {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #da291c; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.ym-mcd-sheet__bag-n.is-hidden { display: none; }
.ym-mcd-sheet__sum { flex: 1; min-width: 0; cursor: pointer; }
.ym-mcd-sheet__sum-price { font-size: 18px; font-weight: 750; color: #111; }
.ym-mcd-sheet__sum-tip { margin-top: 1px; font-size: 11px; color: #999; }
.ym-mcd-sheet__cta {
  min-width: 108px; height: 42px; border: 0; border-radius: 21px;
  background: #da291c; color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.ym-mcd-sheet__cta:disabled { background: #ddd; cursor: not-allowed; }

.ym-mcd-detail {
  position: absolute; inset: 0; z-index: 5;
  background: #fff; display: flex; flex-direction: column;
}
.ym-mcd-detail.is-hidden { display: none; }
.ym-mcd-detail__back {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.45); color: #fff; font-size: 22px;
  cursor: pointer; line-height: 1;
}
.ym-mcd-detail__scroll { flex: 1; overflow-y: auto; }
.ym-mcd-detail__cover {
  width: 100%; aspect-ratio: 1.2; object-fit: cover; background: #f2f2f2;
  display: block;
}
.ym-mcd-detail__main { padding: 14px 16px 20px; }
.ym-mcd-detail__name { font-size: 18px; font-weight: 700; color: #111; line-height: 1.35; }
.ym-mcd-detail__price { margin-top: 8px; font-size: 20px; font-weight: 750; color: #da291c; }
.ym-mcd-detail__price s { margin-left: 8px; color: #bbb; font-size: 13px; font-weight: 500; }
.ym-mcd-detail__section { margin-top: 16px; }
.ym-mcd-detail__label { font-size: 13px; font-weight: 650; color: #333; margin-bottom: 8px; }
.ym-mcd-detail__chip {
  display: inline-block; margin: 0 6px 6px 0; padding: 6px 10px;
  border-radius: 8px; border: 1px solid #e8e8e8; background: #fafafa;
  font-size: 12px; color: #444;
}
.ym-mcd-detail__chip.is-on {
  border-color: #da291c; background: #fff5f4; color: #da291c;
}
.ym-mcd-detail__empty { font-size: 13px; color: #999; padding: 24px 0; text-align: center; }
.ym-mcd-detail__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eee;
}
.ym-mcd-detail__qty { display: flex; align-items: center; gap: 10px; }
.ym-mcd-detail__qty button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #da291c;
  background: #fff; color: #da291c; font-size: 16px; cursor: pointer;
}
.ym-mcd-detail__qty span { min-width: 18px; text-align: center; font-weight: 700; }
.ym-mcd-detail__add {
  flex: 1; height: 42px; border: 0; border-radius: 21px;
  background: #da291c; color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
body.ym-mcd-sheet-open { overflow: hidden; }
@media (max-width: 640px) {
  .ym-mcd { max-width: none; }
  .ym-mcd-sheet__nav { width: 76px; }
}
