/* ═══════════════ 简单模式(simple.html) —— 一个大输入框, 一个全宽 3D, 三个大按钮 ═══════════════
   颜色: 灰白 + 一个强调色。变量先认 calm.css 的(html.mk-calm 下的 --acc / --k* / --ktext …), 没有就用后面的兜底值。
   模型自己的颜色是画面上最彩的东西; 强调色只给「变!」「我还想…」和输入框的焦点。 */

.sp{
  --a: var(--acc, #0b6ec5);
  --a-h: var(--acc-h, #095fab);
  --a-t: var(--acc-t, #e8f1fb);
  --ink: var(--ktext, #23272e);
  --mut: var(--kmut, #5f6670);
  --line: var(--kl, #dcdfe4);
  --line2: var(--kl2, #c6cbd2);
  --soft: var(--k1, #f6f7f8);
  --soft2: var(--k2, #eef0f2);
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: #fff; color: var(--ink);
  font: 400 16px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
/* 10-20 体检(小条): 英文页先用西文字体 —— 字体链里中文字体排在前面时, ’ “ ” … 会被画成全角(截图里的「it´ s stepping!」) */
html:lang(en) .sp{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.sp *, .sp *::before, .sp *::after { box-sizing: border-box; }
.sp [hidden] { display: none !important; }

/* ---------- 1018 S4 跨页过渡: 门口 → 简单模式(搭) → 工作台 ----------
   Chrome 126+ 支持跨页面 View Transitions; Firefox 等不支持 = 普通跳页(渐进增强)。两页都声明了才过渡(home.css / level4.css 里也有)。
   舞台同名 mk-stage: 门口 .hm-stage / 这里 .sp-stage / 工作台 .panel.cad。prefers-reduced-motion: 不过渡。
   ::view-transition-* 的样式归「新」那一页管: 下面的时长在跳进简单模式(和门口, 门口也载这份)时生效; 跳进工作台归 level4.css。 */
@view-transition{ navigation: auto; }
@media (prefers-reduced-motion: reduce){ @view-transition{ navigation: none; } }
.sp-stage{ view-transition-name: mk-stage; }
::view-transition-group(root){ animation-duration: .35s; }
::view-transition-group(mk-stage){ animation-duration: .45s; animation-timing-function: cubic-bezier(.22, .8, .24, 1); }
/* 门口带 next=3c 进来(simple.html <head> 里那段内联脚本加的 class): 第一帧就是舞台 ——
   跨页过渡要在新页面的第一帧里找到同名的舞台才接得上(不然先露出简单模式的门口, 舞台再「啪」地出来)。simple.js 接手后把 class 拿掉。 */
html.sp-arrive #spHome{ display: none !important; }
html.sp-arrive #spStage{ display: block !important; }
:where(.sp) button { font: inherit; cursor: pointer; }

/* ---------- 语言 ---------- */
.sp-lang{
  position: fixed; top: 14px; right: 14px; z-index: 30;
  min-width: 46px; height: 36px; padding: 0 12px; border-radius: 18px;
  background: rgba(255,255,255,.92); border: 1px solid var(--line); color: var(--mut);
  font-size: 14px; font-weight: 600;
}
.sp-lang:hover { color: var(--ink); border-color: var(--line2); }

/* ---------- ① 首页 ---------- */
.sp-home{
  max-width: 980px; margin: 0 auto; padding: 7vh 16px 32px;
  display: flex; flex-direction: column; align-items: center;
}
.sp-brand{ display: flex; align-items: center; gap: 8px; color: var(--mut); font-size: 15px; letter-spacing: .02em; }
.sp-brand b{ color: var(--ink); }
.sp-dot{ width: 10px; height: 10px; border-radius: 50%; background: var(--a); }
.sp-title{
  margin: 14px 0 26px; text-align: center;
  font-size: clamp(30px, 6.2vw, 52px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em;
}
.sp-box{
  width: 100%; max-width: 680px; position: relative;
  display: flex; align-items: center;
  height: 72px; padding: 0 8px 0 26px; border-radius: 36px;
  background: #fff; border: 1.5px solid var(--line2);
  box-shadow: 0 2px 6px rgba(35,39,46,.06), 0 10px 30px rgba(35,39,46,.07);
  transition: border-color .15s, box-shadow .15s;
}
.sp-box:focus-within{ border-color: var(--a); box-shadow: 0 0 0 4px var(--a-t), 0 10px 30px rgba(35,39,46,.08); }
.sp-input{
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-size: 22px; color: var(--ink);
}
.sp-input::placeholder{ color: #9aa0a8; }
.sp-go{
  flex: none; height: 56px; min-width: 104px; padding: 0 24px; border-radius: 28px; border: 0;
  background: var(--a); color: #fff; font-size: 22px; font-weight: 800; letter-spacing: .04em;
  transition: background .15s, transform .08s;
}
.sp-go:hover{ background: var(--a-h); }
.sp-go:active{ transform: scale(.96); }
.sp-go:disabled{ opacity: .55; cursor: default; }
.sp-or{ margin: 34px 0 14px; color: var(--mut); font-size: 15px; }

.sp-cards{
  width: 100%; max-width: 620px; display: grid; gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));      /* 6 张 = 两排, 一屏放得下 */
}
.sp-card{
  display: flex; flex-direction: column; align-items: stretch; text-align: left;
  padding: 0; border-radius: 20px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
}
.sp-card:hover{ transform: translateY(-2px); border-color: var(--line2); box-shadow: 0 8px 24px rgba(35,39,46,.10); }
.sp-card:active{ transform: scale(.98); }
.sp-card:focus-visible{ outline: 3px solid var(--a-t); border-color: var(--a); }
.sp-card .im{
  aspect-ratio: 4 / 3; background: linear-gradient(180deg, #eef0f3 0%, #f8f9fa 100%);
  display: flex; align-items: center; justify-content: center;
}
.sp-card img{ width: 100%; height: 100%; object-fit: contain; padding: 8px; display: block; }
.sp-card .tx{ padding: 10px 14px 14px; font-size: 17px; font-weight: 700; line-height: 1.3; }

/* ---------- ② 舞台 ---------- */
.sp-stage{ position: fixed; inset: 0; z-index: 10; background: #fff; }
.sp-view{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #dfe3e8 0%, #eef0f3 55%, #f8f9fa 100%);
}
#spCanvas{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.sp-confetti{ position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sp-veil{
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(246,247,248,.72); backdrop-filter: blur(2px);
  transition: opacity .35s ease;
}
.sp-veil.off{ opacity: 0; pointer-events: none; }
.sp-veil p{ margin: 0; font-size: 22px; font-weight: 700; color: var(--ink); text-align: center; padding: 0 24px; }
.sp-spin{
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid var(--line); border-top-color: var(--a);
  animation: spSpin .9s linear infinite;
}
@keyframes spSpin{ to { transform: rotate(360deg); } }

.sp-back{
  position: absolute; top: 14px; left: 14px; z-index: 20;
  width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line);
  background: rgba(255,255,255,.92); color: var(--ink); font-size: 22px; line-height: 1;
}
.sp-line{
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  margin: 0; max-width: min(760px, calc(100vw - 140px));
  padding: 10px 20px; border-radius: 24px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(35,39,46,.08);
  font-size: 20px; font-weight: 700; text-align: center; line-height: 1.35;
}
.sp-line:empty{ display: none; }
.sp-line.pop{ animation: spPop .5s ease-out; }
@keyframes spPop{ 0% { transform: translateX(-50%) scale(.92); opacity: .3; } 60% { transform: translateX(-50%) scale(1.03); opacity: 1; } 100% { transform: translateX(-50%) scale(1); } }

.sp-acts{
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; gap: 14px;
}
.sp-btn{
  min-width: 150px; height: 64px; padding: 0 26px; border-radius: 32px;
  background: #fff; border: 1.5px solid var(--line2); color: var(--ink);
  font-size: 21px; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 4px 16px rgba(35,39,46,.10);
  transition: transform .08s, background .15s, border-color .15s;
}
.sp-btn:hover:not(:disabled){ background: var(--soft); border-color: var(--mut); }
.sp-btn:active:not(:disabled){ transform: scale(.96); }
.sp-btn:disabled{ opacity: .5; cursor: default; }
.sp-btn-acc{ background: var(--a); border-color: var(--a); color: #fff; }
.sp-btn-acc:hover:not(:disabled){ background: var(--a-h); border-color: var(--a-h); }

/* ---------- 10-20 体检 2: 去工作台之前的那几秒(simple.js goNext) ----------
   在三个大按钮上面一行: 「看它走几步，马上带你去工作台…」+「现在就去 →」; 底边一条线在 --hold(= L.NEXT_HOLD_MS)里慢慢走满 = 还剩多久。
   按别的按钮 = 留下来(这一行收起)。「现在就去 →」是描边(实心那个留给「我还想…」)。 */
.sp-hand{
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 21;
  bottom: calc(max(22px, env(safe-area-inset-bottom)) + 78px);
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: min(760px, calc(100vw - 32px));
  padding: 8px 8px 10px 22px; border-radius: 30px; overflow: hidden;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(35,39,46,.10);
  font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink);
}
.sp-hand-t{ min-width: 0; }
.sp-gonow{
  flex: none; height: 48px; padding: 0 20px; border-radius: 24px;
  background: #fff; border: 2px solid var(--a); color: var(--a-h); font-size: 18px; font-weight: 800;
  transition: background .15s, transform .08s;
}
.sp-gonow:hover{ background: var(--a-t); }
.sp-gonow:active{ transform: scale(.96); }
.sp-hand-bar{ position: absolute; left: 22px; right: 22px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--a); transform-origin: left center; transform: scaleX(0); }
.sp-hand.run .sp-hand-bar{ animation: spHold var(--hold, 5000ms) linear forwards; }
@keyframes spHold{ to { transform: scaleX(1); } }

/* ---------- ③ 我还想…: 底部一张卡(渐进第三级) ----------
   从上到下 = 由易到难: 点一下就改(不用打字) → 自己说一句 → 它现在有什么 → 最底下一行小字「全部工具 →」。 */
.sp-sheet{
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 25;
  width: min(680px, 100vw); max-height: 70vh; overflow-y: auto;
  padding: 18px 20px max(14px, env(safe-area-inset-bottom));
  background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 34px rgba(35,39,46,.14);
  animation: spUp .22s ease-out;
}
@keyframes spUp{ from { transform: translate(-50%, 24px); opacity: .4; } to { transform: translate(-50%, 0); opacity: 1; } }
.sp-sh-h{ margin: 0 0 8px; color: var(--mut); font-size: 14px; font-weight: 600; }
.sp-ideas{ display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.sp-idea{
  height: 50px; padding: 0 20px; border-radius: 25px;
  background: var(--a-t); border: 1.5px solid transparent; color: var(--a-h);
  font-size: 18px; font-weight: 800;
  transition: transform .08s, border-color .15s;
}
.sp-idea:hover{ border-color: var(--a); }
.sp-idea:active{ transform: scale(.95); }
.sp-more{
  display: flex; align-items: center; gap: 6px; margin-bottom: 18px;
  height: 58px; padding: 0 6px 0 20px; border-radius: 29px;
  background: #fff; border: 1.5px solid var(--line2);
}
.sp-more:focus-within{ border-color: var(--a); box-shadow: 0 0 0 4px var(--a-t); }
.sp-more .sp-input, .sp-more .sp-input:focus{ font-size: 18px; border: 0; outline: 0; box-shadow: none; background: transparent; padding: 0; }   /* 外框已经是那个圆角框; 灰白主题给 input 的边框在这里不要 */
.sp-more .sp-go{ height: 46px; min-width: 70px; padding: 0 16px; font-size: 18px; border-radius: 23px; }
.sp-has{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.sp-body{
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--soft);
}
.sp-body img{ width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; }
.sp-body b{ font-size: 15px; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-swap{
  height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line2); background: #fff;
  color: var(--ink); font-size: 14px; font-weight: 600;
}
.sp-swap:hover{ border-color: var(--mut); }
.sp-chip{
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px;
  border: 1px solid var(--line); color: var(--ink); font-size: 14px; background: #fff;
}
.sp-sh-foot{ display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.sp-x{
  height: 40px; padding: 0 14px; border-radius: 20px; border: 0; background: transparent; color: var(--mut); font-size: 15px;
}
.sp-x:hover{ background: var(--soft2); color: var(--ink); }
.sp-adv{ color: var(--mut); font-size: 14px; text-decoration: none; padding: 8px 4px; }
.sp-adv:hover{ color: var(--ink); text-decoration: underline; }

/* ---------- 手机 ---------- */
@media (max-width: 760px){
  .sp-cards{ gap: 10px; }                                  /* 手机也是 3 列: 卡片小一点, 6 张全在一屏里 */
}
@media (max-width: 560px){
  .sp-home{ padding-top: 72px; }
  .sp-title{ margin: 10px 0 20px; }
  .sp-box{ height: 62px; padding-left: 18px; border-radius: 31px; }
  .sp-input{ font-size: 19px; }
  .sp-go{ height: 48px; min-width: 76px; padding: 0 16px; font-size: 19px; border-radius: 24px; }
  .sp-or{ margin: 26px 0 12px; }
  .sp-card{ border-radius: 14px; }
  .sp-card img{ padding: 4px; }
  .sp-card .tx{ padding: 6px 8px 9px; font-size: 13px; text-align: center; }
  .sp-sheet{ padding: 14px 16px max(12px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; max-height: 78vh; }
  .sp-idea{ height: 46px; padding: 0 16px; font-size: 17px; }
  .sp-more{ height: 54px; padding-left: 16px; }
  .sp-line{ top: 66px; max-width: calc(100vw - 32px); width: max-content; font-size: 17px; padding: 9px 16px; }
  .sp-acts{ left: 16px; right: 16px; transform: none; gap: 8px; }
  .sp-btn{ flex: 1; min-width: 0; height: 58px; padding: 0 6px; font-size: 18px; border-radius: 29px; }
  .sp-veil p{ font-size: 19px; }
  .sp-hand{ left: 16px; right: 16px; transform: none; width: auto; max-width: none; bottom: calc(max(22px, env(safe-area-inset-bottom)) + 70px);
    gap: 10px; padding: 7px 7px 9px 16px; font-size: 16px; }
  .sp-hand-bar{ left: 16px; right: 16px; }
  .sp-gonow{ height: 46px; padding: 0 14px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce){
  .sp-line.pop, .sp-spin{ animation: none; }
  .sp-card, .sp-btn, .sp-go, .sp-gonow{ transition: none; }
  .sp-hand.run .sp-hand-bar{ animation: none; transform: scaleX(1); opacity: .35; }
}
