/* core/base.css
   与主题无关的结构和组件骨架。所有颜色、字体、圆角、动效曲线都来自 --sl-* 变量。
   主题文件（themes 文件夹下各主题的 theme.css）只负责给变量赋值和加装饰。
   下面 :root 里的值是兜底：即使主题文件没加载出来，站点也能正常阅读。 */

:root {
  --sl-bg: #f8f8f9;
  --sl-surface: #fdfdfd;
  --sl-surface-2: #efeff1;
  --sl-ink: #000;
  --sl-ink-2: #2c2c30;
  --sl-mute: #62626a;      /* 次要文字，对浅底对比度约 5.7:1 */
  --sl-faint: #8a8a92;     /* 仅用于装饰，不用于需要阅读的文字 */
  --sl-on-ink: #fff;
  --sl-line: rgba(0, 0, 0, .14);
  --sl-line-2: rgba(0, 0, 0, .07);
  --sl-glow-a: rgba(207, 200, 255, .7);
  --sl-glow-b: rgba(191, 230, 225, .65);
  --sl-glow-c: rgba(241, 216, 226, .65);
  --sl-glass-bg: rgba(253, 253, 253, .86);
  --sl-glass-blur: 18px;
  --sl-scrim: rgba(0, 0, 0, .35);
  --sl-font-disp: "Instrument Serif", "Didot", "Bodoni 72", "Times New Roman", serif;
  --sl-font-body: "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --sl-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sl-radius-s: 10px;
  --sl-radius-m: 18px;
  --sl-radius-l: 26px;
  --sl-radius-pill: 999px;
  --sl-ease: cubic-bezier(.22, .8, .18, 1);
  --sl-head-h: 54px;
  --sl-bar-h: 64px;
  --sl-sat: env(safe-area-inset-top, 0px);
  --sl-sab: env(safe-area-inset-bottom, 0px);
  --sl-z-bg: -1;
  --sl-z-head: 40;
  --sl-z-bar: 45;
  --sl-z-chrome: 60;      /* 顶部胶囊与导航面板：高于顶栏与底栏，低于弹层 */
  --sl-z-grain: 60;
  --sl-z-scrim: 70;
  --sl-z-sheet: 80;
  --sl-z-toast: 90;
  /* 板块之间的距离。想再紧一点或再松一点，只改这四个值（全站子页面同步变化） */
  --sl-gap-head: clamp(28px, 6vw, 48px);     /* 页面标题上方 */
  --sl-gap-first: clamp(22px, 4.5vw, 32px);  /* 标题与第一个板块之间 */
  --sl-gap-section: clamp(20px, 4vw, 28px);  /* 板块分隔线上方、下方各一份 */
  --sl-gap-foot: clamp(32px, 6vw, 48px);     /* 页面底部署名上方 */
  /* 四角星的形状（作为遮罩使用，颜色由 background 决定），弹层装饰与星光迸发共用 */
  --sl-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0c.6 5.4 4 8.8 10 10-6 1.2-9.4 4.6-10 10-.6-5.4-4-8.8-10-10 6-1.2 9.4-4.6 10-10z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-padding-top: calc(var(--sl-head-h) + var(--sl-sat) + 12px); }
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  padding-top: calc(var(--sl-head-h) + var(--sl-sat));
  padding-bottom: calc(var(--sl-bar-h) + var(--sl-sab) + 24px);
  background: var(--sl-bg);
  color: var(--sl-ink);
  font-family: var(--sl-font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .02em;
  min-height: 100vh;
}
body.sl-lock { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
a { color: inherit; }
svg { display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--sl-ink); outline-offset: 3px; border-radius: 4px; }

.sl-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sl-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--sl-ink); color: var(--sl-on-ink); border-radius: var(--sl-radius-s); text-decoration: none; }
.sl-skip:focus { top: calc(var(--sl-sat) + 8px); }

/* ---------- 动效降级 ----------
   data-motion="simple" 由 core/init.js 根据访客选择或系统“减少动态效果”设置写入 */
html[data-motion="simple"] *,
html[data-motion="simple"] *::before,
html[data-motion="simple"] *::after {
  animation-duration: .001ms !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion]) *, html:not([data-motion]) *::before, html:not([data-motion]) *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
}

/* ---------- 顶栏 ---------- */
.sl-head {
  position: fixed; left: 0; right: 0; top: 0; z-index: var(--sl-z-head);
  height: calc(var(--sl-head-h) + var(--sl-sat));
  padding: var(--sl-sat) clamp(20px, 5vw, 40px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--sl-glass-bg);
  -webkit-backdrop-filter: blur(var(--sl-glass-blur)); backdrop-filter: blur(var(--sl-glass-blur));
  border-bottom: 1px solid var(--sl-line-2);
}
.sl-brand { display: inline-flex; align-items: baseline; gap: 12px; min-height: 44px; align-items: center; text-decoration: none; }
.sl-brand-name { font-family: var(--sl-font-disp); font-style: italic; font-size: 24px; line-height: 1; letter-spacing: .01em; }
.sl-brand-page { font-size: 13px; color: var(--sl-mute); letter-spacing: .12em; }
.sl-iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: background-color .3s var(--sl-ease); }
.sl-iconbtn:hover { background: var(--sl-line-2); }

/* ---------- 底部固定：排单状态 + 下单与联系 ---------- */
.sl-orderbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--sl-z-bar);
  padding: 10px clamp(20px, 5vw, 40px) calc(10px + var(--sl-sab));
  min-height: calc(var(--sl-bar-h) + var(--sl-sab));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--sl-glass-bg);
  -webkit-backdrop-filter: blur(var(--sl-glass-blur)); backdrop-filter: blur(var(--sl-glass-blur));
  border-top: 1px solid var(--sl-line-2);
}
.sl-status { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; font-size: 14px; letter-spacing: .06em; text-align: left; }
.sl-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--sl-ink); flex: none; }
.sl-status[data-state="open"] .sl-dot { background: var(--sl-ink); }

/* ---------- 按钮 ---------- */
.sl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 26px; border-radius: var(--sl-radius-pill);
  background: var(--sl-ink); color: var(--sl-on-ink);
  font-size: 14px; letter-spacing: .2em; text-decoration: none; white-space: nowrap;
  transition: opacity .3s var(--sl-ease), transform .25s var(--sl-ease);
}
.sl-btn:hover { opacity: .86; }
.sl-btn:active { transform: scale(.97); }
.sl-btn--ghost { background: transparent; color: var(--sl-ink); border: 1px solid var(--sl-line); }

/* ---------- 底部弹层（手机）/ 居中弹窗（宽屏）---------- */
.sl-scrim { position: fixed; inset: 0; z-index: var(--sl-z-scrim); background: var(--sl-scrim); opacity: 0; visibility: hidden; transition: opacity .35s var(--sl-ease), visibility 0s .35s; }
.sl-scrim.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--sl-z-sheet);
  max-height: 86vh; max-height: 86dvh; overflow: auto; overscroll-behavior: contain;
  padding: 10px clamp(20px, 5vw, 28px) calc(28px + var(--sl-sab));
  border-radius: var(--sl-radius-l) var(--sl-radius-l) 0 0;
  background: var(--sl-surface);
  box-shadow: 0 -30px 70px -30px rgba(0, 0, 0, .35);
  transform: translateY(105%); visibility: hidden;
  transition: transform .5s var(--sl-ease), visibility 0s .5s;
}
.sl-sheet.on { transform: none; visibility: visible; transition-delay: 0s; }
.sl-sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--sl-line); margin: 4px auto 6px; }
.sl-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sl-sheet-title { font-size: 22px; font-weight: 400; letter-spacing: .06em; }
.sl-sheet-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--sl-line-2); }
.sl-sheet-sec > h3 { font-size: 13px; font-weight: 400; color: var(--sl-mute); letter-spacing: .14em; margin-bottom: 8px; }
@media (min-width: 720px) {
  .sl-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; width: min(520px, 92vw);
    border-radius: var(--sl-radius-l); padding-bottom: 28px; opacity: 0;
    transform: translate(-50%, -46%) scale(.98);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .4);
    transition: transform .5s var(--sl-ease), opacity .4s var(--sl-ease), visibility 0s .5s;
  }
  .sl-sheet.on { transform: translate(-50%, -50%); opacity: 1; }
  .sl-sheet-grip { display: none; }
}

/* 弹层里的列表行 */
.sl-rows > li { border-bottom: 1px solid var(--sl-line-2); }
.sl-rows > li:last-child { border-bottom: 0; }
.sl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 52px; padding: 8px 2px; text-align: left; text-decoration: none; }
.sl-row-main { display: grid; gap: 2px; min-width: 0; }
.sl-row-title { font-size: 17px; letter-spacing: .05em; }
.sl-row-desc { font-size: 13px; color: var(--sl-mute); line-height: 1.6; }
.sl-row[aria-current="page"] .sl-row-title { font-weight: 600; }
.sl-row[aria-disabled="true"] { opacity: .55; cursor: default; }
.sl-tag { font-size: 12px; letter-spacing: .1em; color: var(--sl-mute); border: 1px solid var(--sl-line); border-radius: var(--sl-radius-pill); padding: 1px 10px; white-space: nowrap; }

/* 开关 */
.sl-switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: var(--sl-radius-pill); background: var(--sl-line); transition: background-color .3s var(--sl-ease); }
.sl-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--sl-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--sl-ease); }
.sl-switch[aria-checked="true"] { background: var(--sl-ink); }
.sl-switch[aria-checked="true"]::after { transform: translateX(22px); }

/* 单选（主题列表）*/
.sl-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--sl-ink); display: grid; place-items: center; }
.sl-row[aria-checked="true"] .sl-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sl-ink); }

/* 提示条 */
.sl-toast { position: fixed; left: 50%; bottom: calc(var(--sl-bar-h) + var(--sl-sab) + 18px); z-index: var(--sl-z-toast); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 20px; border-radius: var(--sl-radius-pill); background: var(--sl-ink); color: var(--sl-on-ink); font-size: 14px; transition: opacity .3s var(--sl-ease), transform .3s var(--sl-ease); }
.sl-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 页面内容骨架 ---------- */
.sl-main { max-width: 960px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.sl-section { padding: var(--sl-gap-first) 0 0; }
/* 相邻板块之间：缩小空隙，并放一条细小的分隔装饰（纯 CSS 线条与菱形，颜色跟随主题变量） */
.sl-section + .sl-section { padding-top: var(--sl-gap-section); }
.sl-section + .sl-section::before {
  content: ""; display: block; width: 200px; max-width: 70%; height: 10px; margin: 0 auto var(--sl-gap-section);
  background: var(--sl-faint); opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M0 5H82M118 5H200'/%3E%3Cpath d='M100 .8L104.2 5L100 9.2L95.8 5Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M0 5H82M118 5H200'/%3E%3Cpath d='M100 .8L104.2 5L100 9.2L95.8 5Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.sl-h2 { font-size: clamp(26px, 5vw, 34px); font-weight: 400; letter-spacing: .08em; line-height: 1.3; }
.sl-lede { margin-top: 10px; color: var(--sl-mute); max-width: 36em; }
.sl-ph { color: var(--sl-mute); font-style: italic; }
.sl-loading { color: var(--sl-mute); padding: 16px 0; }
.sl-empty { margin-top: 20px; padding: 20px 0; border-top: 1px solid var(--sl-line); color: var(--sl-mute); }
.sl-error { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--sl-ink); border-radius: var(--sl-radius-s); display: grid; gap: 4px; font-size: 14px; line-height: 1.7; }
.sl-ai-note { margin-top: 18px; padding: 12px 16px; border-left: 2px solid var(--sl-ink); background: var(--sl-line-2); font-size: 14px; line-height: 1.7; }

.sl-page-head { padding-top: var(--sl-gap-head); }
.sl-page-title { font-family: var(--sl-font-body); font-size: clamp(30px, 7vw, 46px); font-weight: 300; letter-spacing: .1em; line-height: 1.25; }

/* 价目 */
.sl-price-cat { margin-top: 36px; }
.sl-price-cat > h3 { font-size: 20px; font-weight: 400; letter-spacing: .08em; }
.sl-price-sum { font-size: 14px; color: var(--sl-mute); margin-top: 2px; }
.sl-price-list { margin-top: 10px; }
.sl-price-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; padding: 12px 0; border-bottom: 1px solid var(--sl-line-2); align-items: baseline; }
.sl-price-name { letter-spacing: .04em; }
.sl-price-val { font-family: var(--sl-font-disp); font-size: 22px; letter-spacing: .02em; white-space: nowrap; }
.sl-price-note { grid-column: 1 / -1; font-size: 13px; color: var(--sl-mute); line-height: 1.6; }
.sl-rules { margin-top: 12px; display: grid; gap: 6px; font-size: 14px; color: var(--sl-ink-2); }
.sl-rules > li { padding-left: 1.1em; position: relative; }
.sl-rules > li::before { content: ""; position: absolute; left: 0; top: .85em; width: .5em; height: 1px; background: var(--sl-ink); }

/* 入口列表：带分隔线的行，不做成一堆卡片 */
.sl-entries { margin-top: 18px; border-top: 1px solid var(--sl-line); }
.sl-entry { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 2px; border-bottom: 1px solid var(--sl-line); text-decoration: none; transition: padding-left .4s var(--sl-ease); }
.sl-entry:hover { padding-left: 10px; }
.sl-entry-title { font-size: clamp(20px, 4vw, 26px); letter-spacing: .06em; }
.sl-entry-desc { font-size: 14px; color: var(--sl-mute); line-height: 1.6; }
.sl-entry-main { display: grid; gap: 2px; }

/* 页面底部署名 */
.sl-foot { margin-top: var(--sl-gap-foot); padding: 24px 0 8px; border-top: 1px solid var(--sl-line-2); font-size: 13px; color: var(--sl-mute); letter-spacing: .08em; }

/* 导航没挂上时的兜底入口：3 秒后才出现，避免正常情况下闪一下 */
.sl-fallback { position: fixed; left: 12px; top: calc(var(--sl-sat) + 10px); z-index: var(--sl-z-head); padding: 8px 14px; background: var(--sl-surface); border: 1px solid var(--sl-line); border-radius: var(--sl-radius-pill); font-size: 14px; opacity: 0; pointer-events: none; animation: sl-fallback-in 0s 3s forwards; }
html[data-shell] .sl-fallback { display: none; }
@keyframes sl-fallback-in { to { opacity: 1; pointer-events: auto; } }
html[data-motion="simple"] .sl-fallback { animation-delay: 3s !important; }

/* ---------- 星光迸发（core/spark.js 创建的节点）---------- */
.sl-spark-layer { position: fixed; inset: 0; z-index: 120; pointer-events: none; overflow: hidden; }
.sl-spark { position: absolute; left: 0; top: 0; will-change: transform, opacity; -webkit-mask: var(--sl-star) center / contain no-repeat; mask: var(--sl-star) center / contain no-repeat; }

/* ---------- 全站通用：AI 点击解封马赛克 & 重点微光高亮 ---------- */
.sl-ai-mosaic {
  position: relative; display: inline-block; padding: 0 5px; margin: 0 2px; border-radius: 4px; cursor: pointer; vertical-align: baseline;
  line-height: 1.45;
  background-color: rgba(150, 140, 225, .18);
  background-image: repeating-conic-gradient(rgba(120, 110, 190, .28) 0% 25%, transparent 0% 50%);
  background-size: 6px 6px; box-shadow: inset 0 0 0 1px rgba(150, 140, 225, .38);
  transition: background .35s, box-shadow .35s, transform .25s var(--sl-ease);
}
.sl-ai-mosaic:hover { box-shadow: inset 0 0 0 1px rgba(125, 108, 225, .65), 0 0 12px -2px rgba(150, 140, 225, .45); }
.sl-ai-mosaic:active { transform: scale(.96); }
.sl-ai-mosaic-in { filter: blur(5px); opacity: .18; transition: filter .35s var(--sl-ease), opacity .35s; pointer-events: none; user-select: none; -webkit-user-select: none; }
.sl-ai-mosaic.is-open { background: rgba(150, 140, 225, .12); box-shadow: inset 0 0 0 1px rgba(150, 140, 225, .26); }
.sl-ai-mosaic.is-open .sl-ai-mosaic-in { filter: none; opacity: 1; user-select: auto; -webkit-user-select: auto; }

/* 重点词：星轨流光高亮（轻柔衬底，避免大段文字显拥挤，轻触可互动迸发微光） */
.sl-hl {
  position: relative; display: inline; padding: 0 5px 1px; margin: 0 1px; border-radius: 4px;
  font-weight: 500; color: #362c7a; cursor: pointer;
  line-height: 1.38; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(110deg, rgba(207, 200, 255, .28) 0%, rgba(191, 230, 225, .36) 45%, rgba(241, 216, 226, .32) 75%, rgba(207, 200, 255, .28) 100%);
  background-size: 240% 100%;
  box-shadow: inset 0 -1px 0 rgba(130, 112, 235, .42);
  animation: sl-hl-shimmer 6s linear infinite;
  transition: box-shadow .3s, color .3s;
}
.sl-hl::after {
  content: ""; display: inline-block; width: 5.5px; height: 5.5px; margin-left: 2.5px; vertical-align: middle;
  background: linear-gradient(135deg, #9a88ff, #5ec2b3);
  -webkit-mask: var(--sl-star) center / contain no-repeat; mask: var(--sl-star) center / contain no-repeat;
  animation: sl-hl-star 2.8s ease-in-out infinite;
}
.sl-hl:hover { color: #1f165c; box-shadow: inset 0 -1.5px 0 rgba(120, 100, 240, .75), 0 2px 10px -2px rgba(140, 125, 245, .45); }
.sl-hl:active { transform: scale(.96); }
@keyframes sl-hl-shimmer { from { background-position: 0% 0; } to { background-position: -240% 0; } }
@keyframes sl-hl-star { 0%, 100% { opacity: .45; transform: scale(.75) rotate(0deg); } 50% { opacity: 1; transform: scale(1.2) rotate(22deg); } }

/* ---------- 入站 AI 马赛克温馨提示：屏幕正中星盘弹窗 ---------- */
.sl-ai-modal-scrim {
  position: fixed; inset: 0; z-index: calc(var(--sl-z-sheet) + 5);
  background: rgba(12, 11, 22, .52);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity .38s var(--sl-ease), visibility 0s .38s;
}
.sl-ai-modal-scrim.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-ai-modal {
  position: fixed; left: 50%; top: 50%; z-index: calc(var(--sl-z-sheet) + 6);
  width: min(410px, calc(100vw - 32px)); max-height: calc(100dvh - 36px); overflow-y: auto;
  padding: 28px 24px 24px; border-radius: 26px; text-align: center;
  background:
    radial-gradient(120% 80% at 50% -15%, rgba(207, 200, 255, .45), transparent 60%),
    radial-gradient(90% 70% at 100% 115%, rgba(191, 230, 225, .36), transparent 58%),
    rgba(253, 253, 254, .96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .9),
    0 0 0 1px rgba(145, 132, 230, .34),
    0 28px 72px -20px rgba(14, 12, 32, .48),
    0 0 56px -10px rgba(145, 132, 230, .35);
  transform: translate(-50%, -46%) scale(.92);
  opacity: 0; visibility: hidden;
  transition: transform .48s cubic-bezier(.34, 1.45, .64, 1), opacity .35s var(--sl-ease), visibility 0s .48s;
}
.sl-ai-modal.on { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-ai-modal::before {
  content: ""; position: absolute; inset: 7px; border-radius: 20px; pointer-events: none;
  border: 1px solid rgba(145, 132, 230, .18);
}
.sl-ai-modal-x {
  position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--sl-mute);
  transition: background-color .3s, color .3s, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.sl-ai-modal-x:hover { background: var(--sl-line-2); color: var(--sl-ink); transform: rotate(90deg); }
.sl-ai-modal-emblem {
  width: 66px; height: 66px; margin: 0 auto 10px; color: #5b4db8;
  filter: drop-shadow(0 6px 14px rgba(135, 120, 235, .28));
}
.sl-ai-modal-emblem svg { width: 100%; height: 100%; overflow: visible; }
.sl-ai-modal-emblem circle:first-child { transform-origin: 44px 44px; animation: sl-star-spin 26s linear infinite; }
.sl-ai-modal-sub {
  font-family: var(--sl-font-disp); font-style: italic; font-size: 11.5px;
  letter-spacing: .28em; color: var(--sl-mute); margin-bottom: 3px;
}
.sl-ai-modal-title { font-size: 21px; font-weight: 400; letter-spacing: .16em; color: var(--sl-ink); }
.sl-ai-modal-div { display: flex; align-items: center; gap: 10px; margin: 12px auto 14px; width: 72%; }
.sl-ai-modal-div::before, .sl-ai-modal-div::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(145, 132, 230, .42), transparent); }
.sl-ai-modal-div i { width: 6px; height: 6px; border: 1px solid #7d6ce1; transform: rotate(45deg); flex: none; }
.sl-ai-modal-p { font-size: 14.5px; line-height: 1.92; color: var(--sl-ink-2); text-align: left; margin-bottom: 14px; }
.sl-ai-modal-demo {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px;
  padding: 10px 14px; margin-bottom: 18px; border-radius: 14px;
  background: rgba(207, 200, 255, .14); box-shadow: inset 0 0 0 1px rgba(145, 132, 230, .24);
  font-size: 13px; color: var(--sl-mute);
}
.sl-ai-modal-btn { width: 100%; min-height: 46px; box-shadow: 0 14px 28px -12px rgba(25, 20, 55, .45); }

/* ---------- 驻站灵魂小助手 RUI（方案 A 黑曜星典风：哑光黑底 + 极细银白铜版六芒星轨） ---------- */
@keyframes sl-rui-ccw { to { transform: rotate(-360deg); } }
@keyframes sl-rui-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.sl-rui-spin-cw { animation: sl-star-spin 28s linear infinite; transform-origin: center; transform-box: fill-box; }
.sl-rui-spin-ccw { animation: sl-rui-ccw 20s linear infinite; transform-origin: center; transform-box: fill-box; }
.sl-rui-pulse { animation: sl-rui-pulse 3.4s ease-in-out infinite; }

.sl-rui-fab {
  position: fixed; left: 16px; bottom: calc(var(--sl-bar-h) + var(--sl-sab) + 14px);
  z-index: calc(var(--sl-z-chrome) - 1);
  height: 44px; padding: 0 16px 0 10px; border-radius: var(--sl-radius-pill);
  display: inline-flex; align-items: center; gap: 10px;
  background: #0d0d10; color: #f2f2ef;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .65);
  transition: transform .4s cubic-bezier(.34, 1.45, .64, 1), opacity .3s, border-color .3s, box-shadow .35s;
}
.sl-rui-fab:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: 0 20px 38px -12px rgba(0, 0, 0, .78);
}
.sl-rui-fab:active { transform: scale(.96); }
.sl-rui-fab.is-hide { opacity: 0; pointer-events: none; transform: translateY(10px) scale(.92); }
.sl-rui-fab-sigil { width: 28px; height: 28px; flex: none; overflow: visible; color: #f2f2ef; }
.sl-rui-fab-txt { position: relative; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.sl-rui-fab-txt b { font-family: var(--sl-font-disp); font-weight: 400; font-style: italic; font-size: 17px; letter-spacing: .06em; color: #f4f4f0; }
.sl-rui-fab-txt small { font-size: 10px; letter-spacing: .18em; color: rgba(242, 242, 239, .52); }

/* RUI 对话遮罩与窗口（黑曜星典风） */
.sl-rui-scrim {
  position: fixed; inset: 0; z-index: calc(var(--sl-z-sheet) + 3);
  background: rgba(8, 8, 12, .42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--sl-ease), visibility 0s .35s;
}
.sl-rui-scrim.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-rui-panel {
  position: fixed; left: 16px; bottom: calc(var(--sl-bar-h) + var(--sl-sab) + 14px);
  z-index: calc(var(--sl-z-sheet) + 4);
  width: min(386px, calc(100vw - 24px));
  height: min(540px, calc(100dvh - var(--sl-bar-h) - var(--sl-sab) - 36px));
  min-height: 350px;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 18px;
  background: #0c0c0f; color: #ecece8;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 28px 70px -20px rgba(0, 0, 0, .78);
  transform-origin: 18% 100%;
  transform: translateY(16px) scale(.94);
  opacity: 0; visibility: hidden;
  transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), opacity .32s var(--sl-ease), visibility 0s .45s;
}
.sl-rui-panel::before {
  content: ""; position: absolute; inset: 5px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .07); pointer-events: none; z-index: 2;
}
.sl-rui-panel.on { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
@media (max-width: 560px) {
  .sl-rui-panel {
    left: 12px; right: 12px; width: auto;
    bottom: calc(var(--sl-bar-h) + var(--sl-sab) + 10px);
    height: min(520px, calc(100dvh - var(--sl-bar-h) - var(--sl-sab) - 24px));
  }
}

.sl-rui-head {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  background: #0c0c0f; color: #f4f4f0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sl-rui-avatar { width: 36px; height: 36px; flex: none; color: #f4f4f0; }
.sl-rui-avatar svg { width: 100%; height: 100%; overflow: visible; }
.sl-rui-meta { flex: 1; min-width: 0; }
.sl-rui-title-row { display: flex; align-items: baseline; gap: 10px; }
.sl-rui-title { font-family: var(--sl-font-disp); font-style: italic; font-size: 22px; font-weight: 400; letter-spacing: .06em; line-height: 1; color: #fff; }
.sl-rui-role { font-size: 10px; letter-spacing: .18em; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .24); color: rgba(244, 244, 240, .75); }
.sl-rui-sub { font-size: 11px; color: rgba(244, 244, 240, .48); letter-spacing: .06em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-rui-close {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: rgba(255, 255, 255, .65);
  transition: background-color .3s, color .3s, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.sl-rui-close:hover { background: rgba(255, 255, 255, .1); color: #fff; transform: rotate(90deg); }

.sl-rui-bar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 16px; font-size: 11px; letter-spacing: .06em;
  background: #121216; border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: rgba(244, 244, 240, .52);
}
.sl-rui-quota { font-family: var(--sl-font-disp); font-style: italic; font-size: 12px; letter-spacing: .12em; color: #e6e6e0; }
.sl-rui-quota.is-low { color: #e2a4a4; }

.sl-rui-msgs {
  position: relative; z-index: 3;
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 12px;
}
.sl-rui-row { display: flex; align-items: flex-start; gap: 10px; }
.sl-rui-row.is-user { justify-content: flex-end; }
.sl-rui-mini-av {
  width: 20px; height: 20px; flex: none; margin-top: 4px; color: rgba(244, 244, 240, .75);
}
.sl-rui-mini-av svg { width: 100%; height: 100%; overflow: visible; }
.sl-rui-bub {
  max-width: 86%; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.82; letter-spacing: .02em;
}
.sl-rui-row.is-rui .sl-rui-bub {
  border-top-left-radius: 2px;
  background: #15151a; color: #e8e8e3;
  border: 1px solid rgba(255, 255, 255, .12);
}
.sl-rui-row.is-user .sl-rui-bub {
  border-top-right-radius: 2px;
  background: #f2f2ee; color: #0c0c0f;
}
.sl-rui-qtag {
  display: inline-block; margin-bottom: 6px; padding: 1px 7px; border-radius: 2px;
  font-size: 10px; letter-spacing: .12em; color: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255, 255, 255, .22);
}
.sl-rui-btxt p { margin: 0 0 6px; }
.sl-rui-btxt p:last-child { margin-bottom: 0; }
.sl-rui-thinking { color: rgba(244, 244, 240, .55); font-style: italic; }

/* 黑曜底色下的 AI 马赛克块适配 */
.sl-rui-panel .sl-ai-mosaic {
  background-color: rgba(255, 255, 255, .14);
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .24) 0% 25%, transparent 0% 50%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
  color: #fff;
}
.sl-rui-panel .sl-ai-mosaic.is-open {
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.sl-rui-quicks {
  position: relative; z-index: 3;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 8px 14px; border-top: 1px solid rgba(255, 255, 255, .09);
  background: #0f0f13;
}
.sl-rui-quicks::-webkit-scrollbar { display: none; }
.sl-rui-qbtn {
  flex: none; height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: .06em; color: #dcdcd6;
  background: transparent; border: 1px solid rgba(255, 255, 255, .2);
  transition: background-color .25s, color .25s, border-color .25s, transform .2s;
}
.sl-rui-qbtn:hover { background: #f2f2ee; color: #0c0c0f; border-color: #f2f2ee; }
.sl-rui-qbtn:active { transform: scale(.96); }

.sl-rui-form {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 12px; border-top: 1px solid rgba(255, 255, 255, .12);
  background: #0c0c0f;
}
.sl-rui-inwrap {
  flex: 1; position: relative; display: flex; align-items: center;
  border-radius: 999px; background: #15151a;
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 0 12px;
  transition: border-color .25s;
}
.sl-rui-inwrap:focus-within { border-color: rgba(255, 255, 255, .48); }
.sl-rui-input {
  flex: 1; min-width: 0; height: 34px; border: 0; background: transparent;
  font: inherit; font-size: 12.5px; color: #f4f4f0; outline: none;
}
.sl-rui-input::placeholder { color: rgba(244, 244, 240, .38); }
.sl-rui-chars { flex: none; font-size: 10px; color: rgba(244, 244, 240, .42); margin-left: 6px; font-variant-numeric: tabular-nums; }
.sl-rui-send {
  flex: none; height: 34px; min-width: 60px; padding: 0 14px; border-radius: 999px;
  background: #f2f2ee; color: #0c0c0f; font-size: 12px; font-weight: 500; letter-spacing: .12em;
  transition: opacity .25s, transform .2s;
}
.sl-rui-send:hover:not([disabled]) { opacity: .88; }
.sl-rui-send:active:not([disabled]) { transform: scale(.96); }
.sl-rui-send[disabled] { opacity: .38; cursor: not-allowed; }

/* ---------- 小标签链接（弹层里的快捷入口）---------- */
.sl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sl-chip { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-pill); font-size: 14px; letter-spacing: .08em; text-decoration: none; transition: background-color .3s var(--sl-ease), color .3s var(--sl-ease), transform .3s var(--sl-ease); }
.sl-chip:hover { background: var(--sl-ink); color: var(--sl-on-ink); border-color: var(--sl-ink); }
.sl-chip:active { transform: scale(.96); }

/* ---------- 外壳形态二：顶部正中胶囊 + 展开面板 + 底部浮动按钮 ----------
   由主题的 chrome: 'pill' 启用（core/init.js 写 data-chrome，core/shell.js 按它搭结构）。
   主界面自带顶栏与悬浮球，不用这一套，所以下面的边距规则排除主界面。 */
html[data-chrome="pill"] body:not([data-page="home"]) {
  padding-top: calc(70px + var(--sl-sat));
  padding-bottom: calc(var(--sl-bar-h) + var(--sl-sab) + 24px);
}
.sl-chrome {
  position: fixed; left: 0; right: 0; top: calc(12px + var(--sl-sat)); z-index: var(--sl-z-chrome);
  display: flex; justify-content: center; pointer-events: none;
}
.sl-chrome > * { pointer-events: auto; }
.sl-pill-btn {
  height: 46px; padding: 0 10px 0 18px; display: inline-flex; align-items: center; gap: 10px;
  border-radius: var(--sl-radius-pill); background: var(--sl-glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 0 0 1px var(--sl-line), 0 18px 40px -24px rgba(0, 0, 0, .55);
  transition: transform .35s var(--sl-ease), box-shadow .35s var(--sl-ease);
}
.sl-pill-btn[aria-expanded="true"] { transform: scale(1.02); }
.sl-pill-brand { font-family: var(--sl-font-disp); font-style: italic; font-size: 17px; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.sl-pill-star {
  flex: none; width: 20px; height: 20px;
  background: var(--sl-star-fill, linear-gradient(135deg, #d8d2ff, #a597ff 58%, #74c9bc));
  -webkit-mask: var(--sl-star) center / contain no-repeat; mask: var(--sl-star) center / contain no-repeat;
  animation: sl-star-spin 16s linear infinite;
}
.sl-pill-btn[aria-expanded="true"] .sl-pill-star { animation-duration: 3.2s; }
@keyframes sl-star-spin { to { transform: rotate(360deg); } }

/* 展开面板 */
.sl-nav-panel {
  position: absolute; top: calc(100% + 8px); left: 50%;
  width: min(358px, calc(100vw - 24px)); padding: 8px; border-radius: 24px;
  background: var(--sl-surface);
  box-shadow: 0 0 0 1px var(--sl-line), 0 34px 64px -34px rgba(0, 0, 0, .45);
  transform: translateX(-50%) translateY(-10px) scale(.97); opacity: 0; visibility: hidden;
  transition: opacity .3s var(--sl-ease), transform .32s var(--sl-ease), visibility 0s .32s;
}
.sl-nav-panel.on { transform: translateX(-50%); opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-nav-veil {
  position: fixed; inset: 0; z-index: -1; background: rgba(12, 10, 24, .14);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--sl-ease), visibility 0s .3s;
}
.sl-nav-veil.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 12px 8px; }
.sl-panel-head b { font-size: 11px; font-weight: 400; letter-spacing: .26em; color: var(--sl-mute); }
.sl-panel-head em { font-family: var(--sl-font-disp); font-style: italic; font-size: 12px; color: var(--sl-faint); }
.sl-panel-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px;
  text-align: left; text-decoration: none;
  transition: background-color .3s var(--sl-ease), padding-left .35s var(--sl-ease);
}
.sl-panel-t { flex: 1; min-width: 0; }
.sl-panel-t > span { display: block; font-size: 15px; letter-spacing: .04em; }
.sl-panel-t > small { display: block; margin-top: 2px; font-size: 12px; letter-spacing: .06em; line-height: 1.6; color: var(--sl-mute); }
.sl-panel-chev { flex: none; width: 9px; height: 9px; border-right: 1.5px solid var(--sl-ink); border-top: 1.5px solid var(--sl-ink); transform: rotate(45deg); opacity: .35; transition: transform .35s var(--sl-ease), opacity .3s; }
.sl-panel-star { flex: none; width: 10px; height: 10px; background: var(--sl-star-fill, linear-gradient(135deg, #d8d2ff, #a597ff 58%, #74c9bc)); -webkit-mask: var(--sl-star) center / contain no-repeat; mask: var(--sl-star) center / contain no-repeat; }
.sl-panel-row[aria-current="page"] { background: var(--sl-line-2); }
.sl-panel-div { display: flex; align-items: center; gap: 10px; margin: 4px 16px; }
.sl-panel-div::before, .sl-panel-div::after { content: ""; flex: 1; height: 1px; background: var(--sl-line-2); }
.sl-panel-div i { width: 6px; height: 6px; border: 1px solid var(--sl-faint); transform: rotate(45deg); }
.sl-panel-dots { position: absolute; inset: 0; pointer-events: none; }
.sl-panel-cs { position: absolute; width: 13px; height: 13px; background: var(--sl-star-fill, linear-gradient(135deg, #d8d2ff, #a597ff 58%, #74c9bc)); -webkit-mask: var(--sl-star) center / contain no-repeat; mask: var(--sl-star) center / contain no-repeat; opacity: .7; }
.sl-panel-dot { position: absolute; width: 5px; height: 5px; background: none; -webkit-mask: var(--sl-star) center / contain no-repeat; mask: var(--sl-star) center / contain no-repeat; }
@media (hover: hover) and (pointer: fine) {
  .sl-panel-row:hover { background: var(--sl-line-2); padding-left: 16px; }
  .sl-panel-row:hover .sl-panel-chev { opacity: .7; transform: translateX(2px) rotate(45deg); }
}

/* 底部浮动：排单状态 + 下单 */
.sl-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--sl-z-bar); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px calc(18px + var(--sl-sab)); pointer-events: none; }
.sl-dock > * { pointer-events: auto; }
.sl-dock .sl-dock-state {
  min-height: 42px; height: 42px; padding: 0 16px; border-radius: var(--sl-radius-pill);
  background: var(--sl-glass-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px var(--sl-line); font-size: 12px; letter-spacing: .1em; color: var(--sl-mute);
}
.sl-dock .sl-dock-order {
  min-height: 46px; height: 46px; padding: 0 20px; font-size: 14px; letter-spacing: .12em;
  /* 深色封面（返图页、主界面）上也要看得出边界，所以加一圈极淡的白边 */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 14px 30px -14px rgba(0, 0, 0, .55);
}
