/* ==========================================================
   DD 的小站 · 样式
   目录：1 颜色与字体  2 基础  3 导航  4 按钮  5 顶部
        6 工作台与地砖  7 GPT 代充  8 页脚  9 DD 形象
        10 小特效  11 小屏  12 减少动效
   ========================================================== */

/* ---------- 1 颜色与字体：全部取自 DD 本身 ---------- */
:root {
  --wall: #BFD5E9;        /* 眼睛蓝：顶部的墙面 */
  --fluff: #FFFDFA;       /* 毛毛白 */
  --floor: #E8E0D6;       /* 地面（砖缝） */
  --cocoa: #A8866F;       /* 可可棕：背上那一大块毛 */
  --choco: #4A372D;       /* 尾巴巧克力：文字与描边 */
  --tail: #5E4638;        /* 尾巴的填色 */
  --nose: #F29CAE;        /* 鼻头粉 */
  --ear: #FCE4E9;         /* 耳朵粉 */
  --ink-2: #6B5142;       /* 次要文字 */
  --ink-3: #8A6B56;       /* 提示文字 */
  --line: rgb(168 134 111 / .4);   /* 虚线 */

  --font-display: "ZCOOL KuaiLe", "Yuanti SC", "YouYuan", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;

  --edge: 2.5px;                    /* 贴纸描边 */
  --drop: 0 4px 0 var(--choco);     /* 贴纸投影 */
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --wrap: 1200px;

  /* 砖缝交叉处的小花 */
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%238FB1D2'%3E%3Cellipse cx='12' cy='5.6' rx='3.6' ry='5'/%3E%3Cellipse cx='12' cy='18.4' rx='3.6' ry='5'/%3E%3Cellipse cx='5.6' cy='12' rx='5' ry='3.6'/%3E%3Cellipse cx='18.4' cy='12' rx='5' ry='3.6'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%23F29CAE'/%3E%3C/svg%3E");
}

/* ---------- 2 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  font: 400 16px/1.7 var(--font-body);
  color: var(--choco);
  background: var(--floor);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .btn, .nav__name, .bubble, .foot__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
}

ul, ol { list-style: none; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }

:focus-visible {
  outline: 3px solid var(--choco);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: min(100% - clamp(32px, 6vw, 80px), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 8px 16px; border-radius: 999px;
  background: var(--choco); color: var(--fluff);
}
.skip:focus { top: 16px; }

/* 藏起来但读屏还能读到 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---------- 3 导航 ---------- */
.nav {
  position: fixed; z-index: 50; top: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(6px, 1.8vw, 20px);
  max-width: calc(100vw - 20px);
  padding: 6px 8px 6px 12px;
  background: var(--fluff);
  border: var(--edge) solid var(--choco);
  border-radius: 999px;
  box-shadow: var(--drop);
  white-space: nowrap;
}
.nav__brand {
  display: flex; align-items: center; gap: 8px;
  color: inherit; text-decoration: none;
  border-radius: 999px;
}
.nav__logo { width: 42px; flex: none; --dd-sw: 9px; }
.nav__name { font-size: 20px; line-height: 1; }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 6px 13px; border-radius: 999px;
  color: inherit; text-decoration: none; font-size: 15px; line-height: 1.5;
  transition: background-color .18s;
}
.nav__links a:hover { background: var(--ear); }

/* ---------- 4 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px;
  font-size: 19px; line-height: 1.4;
  color: var(--choco); text-decoration: none;
  background: var(--fluff);
  border: var(--edge) solid var(--choco);
  border-radius: 999px;
  box-shadow: var(--drop);
  transition: transform .12s, box-shadow .12s, background-color .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--choco); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--choco); }
.btn--pink { background: var(--nose); }

.btn--small { padding: 5px 16px; font-size: 15px; line-height: 1.5; box-shadow: 0 3px 0 var(--choco); }
.btn--small:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--choco); }
.btn--small:active { transform: translateY(2px); box-shadow: 0 0 0 var(--choco); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 3px 0 var(--choco); }

/* ---------- 5 顶部：标题 + 状态 + DD ---------- */
.intro {
  position: relative;
  padding-top: clamp(88px, 11vh, 108px);
  background: var(--wall);
}
.intro__row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
}
.intro__copy {
  align-self: center;
  max-width: 34em;
  padding-bottom: 12px;
}
.intro__copy h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.15;
  letter-spacing: .02em;
}
.intro__sub { margin-top: 8px; opacity: .84; }
.intro .rch__status { margin-top: 14px; }

/* DD 本猫：踩在花砖上 */
.intro__cat {
  position: relative; z-index: 2; flex: none;
  width: clamp(132px, 14vw, 184px);
  margin-right: clamp(0px, 5vw, 64px);
  margin-bottom: -5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.intro__dd { transform-origin: 50% 100%; animation: pop-up .8s var(--spring) .2s both; }
.intro__cat.is-pat .intro__dd { animation: squish .55s var(--spring); }

/* 说话气泡：往左边冒 */
.bubble {
  position: absolute; right: 74%; top: 2%;
  padding: 5px 15px;
  font-size: clamp(15px, 1.4vw, 18px); line-height: 1.5; white-space: nowrap;
  background: var(--fluff);
  border: var(--edge) solid var(--choco);
  border-radius: 20px 20px 6px 20px;
  box-shadow: var(--drop);
  transform-origin: 100% 100%;
  transform: scale(0) rotate(12deg);
  transition: transform .3s var(--spring);
  pointer-events: none;
}
.bubble.is-on { transform: scale(1) rotate(3deg); }

/* 花砖 */
.floorband {
  position: relative; z-index: 1;
  border-block: 3px solid var(--choco);
  background: #D3DFEA;
}

/* ---------- 6 工作台与地砖 ---------- */
.desk { padding-block: clamp(26px, 3.6vw, 44px) clamp(64px, 8vw, 96px); }

/* 大砖在左，查询中心和小工具在右边叠着 */
.desk__grid {
  --gap: 10px;
  --notch: 19px;
  --cut: #0000 var(--notch), #000 calc(var(--notch) + .7px);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--gap);
}
.tile--big { grid-row: span 2; }

/* 地砖：四个角向里凹，砖缝交叉处有一朵小花 */
.tile {
  --tile-bg: var(--fluff);
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--tile-bg);
  -webkit-mask:
    radial-gradient(circle at calc(var(--gap) / -2) calc(var(--gap) / -2), var(--cut)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle at calc(100% + var(--gap) / 2) calc(var(--gap) / -2), var(--cut)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle at calc(var(--gap) / -2) calc(100% + var(--gap) / 2), var(--cut)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle at calc(100% + var(--gap) / 2) calc(100% + var(--gap) / 2), var(--cut)) 100% 100% / 51% 51% no-repeat;
          mask:
    radial-gradient(circle at calc(var(--gap) / -2) calc(var(--gap) / -2), var(--cut)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle at calc(100% + var(--gap) / 2) calc(var(--gap) / -2), var(--cut)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle at calc(var(--gap) / -2) calc(100% + var(--gap) / 2), var(--cut)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle at calc(100% + var(--gap) / 2) calc(100% + var(--gap) / 2), var(--cut)) 100% 100% / 51% 51% no-repeat;
}
.tile::after {
  content: "";
  position: absolute; z-index: 4;
  inset: calc(var(--gap) / -2 - 11px);
  pointer-events: none;
  background:
    var(--orn) 0 0 / 22px 22px no-repeat,
    var(--orn) 100% 0 / 22px 22px no-repeat,
    var(--orn) 0 100% / 22px 22px no-repeat,
    var(--orn) 100% 100% / 22px 22px no-repeat;
}
.tile__body {
  position: relative; z-index: 2;
  flex: 1 1 auto; min-width: 0;
  padding: 22px clamp(18px, 2vw, 26px) 24px;
}

/* 每块砖的标题行 */
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 14px;
}
.card-head__title { font-size: 24px; line-height: 1.2; letter-spacing: .01em; }
.tile--big .card-head__title { font-size: 28px; }

/* ---------- 7 GPT 代充（充值台 / 查询中心 / 小工具） ---------- */

/* 服务状态小牌子（在顶部） */
.rch__status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 13px;
  font-size: 14px; line-height: 1.5; white-space: nowrap;
  background: var(--fluff);
  border: 2px solid var(--choco);
  border-radius: 999px;
}
.rch__status[data-mode="paused"],
.rch__status[data-mode="offline"] { background: var(--ear); }
.rch__dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--choco); }
.rch__status[data-mode="checking"] .rch__dot { opacity: .3; }
.rch__status[data-mode="paused"] .rch__dot { background: var(--fluff); border: 1.5px solid var(--choco); }
.rch__status[data-mode="offline"] .rch__dot { background: transparent; border: 2px solid var(--choco); }

/* --- 7.1 充值台 --- */
.rch { display: flex; flex-direction: column; gap: 14px; }

.rch__steps { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.rch__steps li {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px 2px 4px; border-radius: 999px;
}
.rch__steps li span {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  font-size: 11px; line-height: 1;
  border: 1.5px solid currentColor; border-radius: 50%;
}
.rch__steps li.is-on { background: var(--ear); color: var(--choco); }
.rch__steps li.is-done { color: var(--choco); }
.rch__steps li.is-done span { background: var(--choco); color: var(--fluff); border-color: var(--choco); }

.rch__notice {
  padding: 7px 12px;
  font-size: 13px; line-height: 1.6;
  background: rgb(191 213 233 / .3);
  border: 2px dashed rgb(168 134 111 / .6);
  border-radius: 12px;
}

.rch__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 20px;
}

/* 左：表单 */
.rch__form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rch__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rch__fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rch__label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 14px; font-weight: 600; line-height: 1.5;
}
legend.rch__label { padding: 0; margin-bottom: 6px; }

.rch__seg {
  display: inline-flex; gap: 2px; padding: 2px;
  background: var(--fluff);
  border: 2px solid var(--choco); border-radius: 999px;
  font-weight: 400;
}
.rch__seg button { padding: 0 12px; font-size: 13px; line-height: 1.75; border-radius: 999px; color: var(--cocoa); }
.rch__seg button.is-on { background: var(--wall); color: var(--choco); }

.rch__input, .mini__input, .mini__area {
  width: 100%; font: inherit; font-size: 15px; line-height: 1.55; color: var(--choco);
  background: var(--fluff);
  border: 2px solid var(--choco); border-radius: 12px;
  padding: 7px 12px;
  box-shadow: 0 2px 0 var(--choco);
}
.rch__area, .mini__area { resize: vertical; min-height: 72px; max-height: 200px; }
.rch__input:disabled, .mini__input:disabled { opacity: .55; }
.rch__input::placeholder, .mini__input::placeholder, .mini__area::placeholder { color: #A9927F; opacity: 1; }

.rch__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; }
.rch__hint { font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.rch__link {
  font-size: 13px; font-weight: 400; color: var(--ink-2);
  text-underline-offset: 3px;
}
.rch__link:hover { color: var(--choco); }

.rch__submit { margin-top: auto; padding-top: 4px; }
.rch__submit .btn { width: 100%; }

.rch__spin {
  display: none; width: 12px; height: 12px; flex: none;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  animation: rch-spin .7s linear infinite;
}
.is-loading .rch__spin { display: inline-block; }
.is-loading { cursor: progress; }

.rch__plans { display: flex; flex-wrap: wrap; gap: 6px; }
.rch__plan {
  padding: 2px 14px;
  font-size: 14px; line-height: 1.7;
  background: var(--fluff);
  border: 2px solid var(--choco); border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s, transform .12s;
}
.rch__plan:hover { transform: translateY(-1px); }
.rch__plan.is-on { background: var(--nose); }
.rch__plan.is-off { border-style: dashed; color: #A9927F; cursor: not-allowed; }
.rch__plan.is-off:hover { transform: none; }
.rch__plan:focus-within { outline: 3px solid var(--choco); outline-offset: 2px; }

/* 验证结果 */
.rch__out {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 220px; overflow-y: auto;
  scrollbar-width: thin;
}

/* 右：进度 */
.rch__panel {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
  padding: 16px;
  background: rgb(191 213 233 / .22);
  border: 2px dashed rgb(168 134 111 / .5);
  border-radius: 16px;
}
.rch__now { display: flex; align-items: center; gap: 14px; }
.rch__bigface { flex: none; width: 82px; --dd-sw: 6px; }
.rch__now-text { min-width: 0; }
.rch__state { font: 400 20px/1.3 var(--font-display); }
.rch__detail { margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }
.rch__bar {
  height: 10px; flex: none;
  background: var(--fluff);
  border: 2px solid var(--choco); border-radius: 999px;
  overflow: hidden;
}
.rch__bar i { display: block; width: 0; height: 100%; background: var(--nose); transition: width .45s var(--spring); }
.rch__bar.is-wait i { width: 36%; animation: rch-wait 1.4s ease-in-out infinite; }
.rch__bar.is-done i { width: 100%; background: var(--cocoa); }
.rch__bar.is-bad i { width: 100%; background: var(--nose); opacity: .5; }
.rch__log {
  display: flex; flex-direction: column; gap: 3px;
  flex: 1 1 auto; min-height: 110px; max-height: 280px;
  overflow-y: auto;
  padding: 8px 11px;
  font-size: 13px; line-height: 1.55; color: #7A5E4B;
  background: rgb(255 253 250 / .55);
  border: 2px dashed var(--line);
  border-radius: 10px;
  scrollbar-width: thin;
}
.rch__log:empty { justify-content: center; align-items: center; }
.rch__log:empty::before { content: "进度会写在这里"; font-size: 13px; color: #A9927F; }
.rch__log li { display: flex; gap: 7px; }
.rch__log li::before { content: "·"; opacity: .5; }
.rch__log time { flex: none; opacity: .62; font-variant-numeric: tabular-nums; }
.rch__action { display: flex; flex-wrap: wrap; gap: 8px; }
.rch__faq {
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 10px;
  border-top: 2px dashed var(--line);
  font-size: 13px; line-height: 1.6; color: var(--ink-2);
}
.rch__faq b { font-weight: 600; color: var(--choco); margin-right: 4px; }

/* --- 7.2 查询中心 / 小工具 --- */
.mini { display: flex; flex-direction: column; gap: 12px; }
.mini__tag {
  flex: none; padding: 0 10px;
  font-size: 12px; line-height: 1.75;
  background: var(--ear);
  border: 2px solid var(--choco); border-radius: 999px;
}
.mini__tabs {
  display: flex; gap: 2px; padding: 2px;
  background: var(--fluff);
  border: 2px solid var(--choco); border-radius: 999px;
}
.mini__tabs button { flex: 1; padding: 0 8px; font-size: 14px; line-height: 1.85; border-radius: 999px; color: var(--cocoa); }
.mini__tabs button.is-on { background: var(--wall); color: var(--choco); }
.mini__pane { display: flex; flex-direction: column; gap: 8px; }
.mini__pane .btn { align-self: flex-start; }
.mini__area { min-height: 64px; }
.mini__out {
  display: flex; flex-direction: column; gap: 6px;
  flex: 1 1 auto;
  min-height: 84px; max-height: 300px; overflow-y: auto;
  padding: 8px 11px;
  font-size: 13px; line-height: 1.6; color: var(--ink-2);
  background: rgb(255 253 250 / .55);
  border: 2px dashed var(--line);
  border-radius: 10px;
  scrollbar-width: thin;
}
.mini__empty { font-size: 13px; line-height: 1.6; color: var(--ink-3); }

.tool { display: flex; flex-direction: column; gap: 6px; }
.tool + .tool { padding-top: 12px; border-top: 2px dashed var(--line); }
.tool__label { font-size: 14px; font-weight: 600; line-height: 1.5; }
.tool__label small { margin-left: 6px; font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.tool__row { display: flex; align-items: center; gap: 8px; }
.tool__row .mini__input { flex: 1 1 auto; min-width: 0; }
.tool__row .btn { flex: none; }
.tool__confirm {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 11px;
  background: rgb(242 156 174 / .16);
  border: 2px dashed var(--cocoa); border-radius: 10px;
}
.tool__ask { font-size: 13px; line-height: 1.55; }
.tool__out {
  min-height: 0; max-height: 160px;
  padding: 0;
  background: none; border: 0; border-radius: 0;
}
.tool__tip {
  margin-top: auto;
  padding: 7px 11px;
  font-size: 13px; line-height: 1.6; color: var(--ink-2);
  background: rgb(191 213 233 / .22);
  border: 2px dashed rgb(168 134 111 / .45);
  border-radius: 10px;
}

/* --- 7.3 结果卡片 --- */
.res {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px;
  font-size: 13px; line-height: 1.6;
  background: var(--fluff);
  border: 2px solid rgb(74 55 45 / .16);
  border-radius: 10px;
}
.res__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.res__code { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res__line { font-size: 12.5px; color: var(--ink-2); }
.res__line b { font-weight: 600; color: var(--choco); }
.res__line.is-bad { text-decoration: underline wavy var(--nose); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.res.res--kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
.res--kv dt { font-size: 12.5px; color: var(--ink-3); }
.res--kv dd { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }

.pill {
  flex: none; padding: 0 8px;
  font-size: 11.5px; line-height: 1.7; white-space: nowrap;
  border: 1.5px solid var(--choco); border-radius: 999px;
}
.pill--ok { background: var(--wall); }
.pill--wait { background: var(--ear); }
.pill--bad { background: var(--nose); }
.pill--mute { border-style: dashed; color: var(--cocoa); background: none; }

.code-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.code {
  padding: 1px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; letter-spacing: .02em;
  background: var(--ear);
  border: 1.5px dashed var(--cocoa); border-radius: 6px;
  overflow-wrap: anywhere;
}

/* ---------- 8 页脚 ---------- */
.foot {
  position: relative;
  padding-block: 32px 36px;
  background: var(--choco); color: var(--fluff);
}
.foot__row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px 28px;
}
.foot__name { font-size: 22px; line-height: 1.3; }
.foot__line { font-size: 14px; opacity: .8; }
.foot__top {
  margin-left: auto;
  color: inherit; font-size: 14px;
  text-underline-offset: 5px;
}
.foot__top:focus-visible { outline-color: var(--fluff); }
/* 从页脚后面翘出来的尾巴 */
.foot__tail {
  position: absolute; right: clamp(28px, 13vw, 190px); bottom: calc(100% - 16px);
  width: clamp(48px, 5vw, 66px);
  transform-origin: 50% 100%;
  animation: sway 2.8s ease-in-out infinite alternate;
}

/* ---------- 9 DD 形象 ---------- */
.dd {
  --dd-sw: 4px;
  width: 100%; height: auto;
  overflow: visible;
}
.dd-fur  { fill: var(--fluff); stroke: var(--choco); stroke-width: var(--dd-sw); stroke-linejoin: round; stroke-linecap: round; }
.dd-fill { fill: var(--fluff); }
.dd-line { fill: none; stroke: var(--choco); stroke-width: var(--dd-sw); stroke-linejoin: round; stroke-linecap: round; }
.dd-thin { stroke-width: calc(var(--dd-sw) * .75); }
.dd-shade { fill: none; stroke: #DDD2C8; stroke-width: 3.5px; stroke-linecap: round; stroke-linejoin: round; }
.dd-shadow { fill: var(--choco); opacity: .14; }

.dd-ear-in { fill: #F9C4CF; }
.dd-ear-tuft { fill: none; stroke: var(--fluff); stroke-width: 4px; stroke-linecap: round; }
/* 头顶花纹：奶茶色的头顶、深棕色的小尖尖、近黑色的耳边 */
.dd-cap { fill: #C8A888; }
.dd-mark-deep { fill: #5B4234; }
.dd-mark-dark { fill: #3B2A22; }
.dd-eye-rim { fill: #F8C6D0; }
.dd-whisker { fill: none; stroke: #C4B5A9; stroke-width: calc(var(--dd-sw) * .5); stroke-linecap: round; }
.dd-blush { fill: var(--nose); opacity: .42; }
.dd-nose { fill: var(--nose); stroke: #D9788D; stroke-width: 1.5px; stroke-linejoin: round; }
.dd-pupil-dot { fill: #33251E; transition: transform .2s; }
.dd-pupil { transition: transform .14s ease-out; }
.dd-eye-open { transition: transform .07s; }
.dd-eye-arc { opacity: 0; }
.dd-mouth-o { fill: #7A4A4A; opacity: 0; }
.dd-tongue {
  fill: #F58CA5; stroke: var(--choco); stroke-width: calc(var(--dd-sw) * .6); stroke-linejoin: round;
  transform-origin: 120px 160px;
  transform: scaleY(0);
  transition: transform .2s var(--spring);
}

.dd-tail { transform-origin: 118px 362px; animation: sway-tail 2.6s ease-in-out infinite alternate; }
.dd-tail-fill { fill: var(--tail); stroke: var(--choco); stroke-width: var(--dd-sw); stroke-linejoin: round; }
.dd-tail-light { fill: none; stroke: #7C5F4E; stroke-width: 7px; stroke-linecap: round; }

.dd--sit .dd-head { transform-origin: 120px 188px; transition: transform .3s ease-out; }
.dd-ear { transform-box: fill-box; transform-origin: 50% 100%; }
.dd-ear-l.is-twitch { animation: twitch-l .45s ease-in-out; }
.dd-ear-r.is-twitch { animation: twitch-r .45s ease-in-out; }

/* 眨眼 */
.dd.is-blink .dd-eye-open { transform: scaleY(.08); }

/* 表情 */
.dd[data-mood="blep"] .dd-tongue { transform: scaleY(1); }
.dd[data-mood="happy"] .dd-eye-open { opacity: 0; }
.dd[data-mood="happy"] .dd-eye-arc { opacity: 1; }
.dd[data-mood="happy"] .dd-blush { opacity: .7; }
.dd[data-mood="wow"] .dd-pupil-dot { transform: scale(.58); }
.dd[data-mood="wow"] .dd-mouth { opacity: 0; }
.dd[data-mood="wow"] .dd-mouth-o { opacity: 1; }

/* 招手：右前爪抬起来，露出粉色肉垫 */
.dd-leg-wave { transform-origin: 197px 300px; transition: transform .36s var(--spring); }
.dd-pads { fill: var(--nose); opacity: 0; transition: opacity .2s; }
.dd-toes { transition: opacity .2s; }
.is-waving .dd-leg-wave {
  transform: translate(30px, -34px) rotate(-150deg);
  animation: wave .42s ease-in-out .36s infinite alternate;
}
.is-waving .dd-pads { opacity: 1; }
.is-waving .dd-toes { opacity: 0; }

/* ---------- 10 小特效 ---------- */
.heart {
  position: absolute; top: 20%; z-index: 3;
  font-size: clamp(18px, 1.8vw, 24px); line-height: 1;
  color: var(--nose);
  -webkit-text-stroke: 1.5px var(--choco);
  pointer-events: none;
  animation: heart 1.15s ease-out var(--d) both;
}

@keyframes pop-up {
  0%   { opacity: 0; transform: translateY(30%) scale(.5, .3); }
  45%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes squish {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.07, .9); }
  60%  { transform: scale(.96, 1.05); }
  100% { transform: scale(1); }
}
@keyframes sway      { from { transform: rotate(-6deg); } to { transform: rotate(7deg); } }
@keyframes sway-tail { from { transform: rotate(-7deg); } to { transform: rotate(4deg); } }
@keyframes twitch-l  { 30% { transform: rotate(-14deg); } 65% { transform: rotate(5deg); } }
@keyframes twitch-r  { 30% { transform: rotate(14deg); }  65% { transform: rotate(-5deg); } }
@keyframes wave {
  from { transform: translate(30px, -34px) rotate(-150deg); }
  to   { transform: translate(30px, -34px) rotate(-126deg); }
}
@keyframes heart {
  0%   { opacity: 0; transform: translate(0, 0) scale(.3); }
  20%  { opacity: 1; transform: translate(calc(var(--x) * .2), -20px) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), -100px) scale(.9) rotate(var(--rot)); }
}
@keyframes rch-spin { to { transform: rotate(360deg); } }
@keyframes rch-wait {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* ---------- 11 小屏 ---------- */

/* 中屏：大砖占满一行，查询中心和小工具并排放在下面 */
@media (max-width: 1080px) {
  .desk__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--big { grid-column: 1 / -1; grid-row: auto; }
}

/* 窄屏：全部一列 */
@media (max-width: 720px) {
  .desk__grid { grid-template-columns: minmax(0, 1fr); }
  .rch__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rch__submit { order: 0; }
  .rch__log { min-height: 84px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .nav__name { display: none; }
  .nav__links a { padding-inline: 10px; }
  .intro__row { gap: 12px; }
  .intro__copy h1 { font-size: 32px; }
  .intro__sub { font-size: 14px; }
  .intro__cat { width: 104px; margin-right: 0; margin-bottom: -4px; }
  .bubble { right: 58%; top: -10%; font-size: 14px; padding: 3px 11px; }
  .desk__grid { --gap: 8px; --notch: 15px; }
  .tile::after { inset: calc(var(--gap) / -2 - 8px); background-size: 16px 16px; }
  .tile__body { padding: 18px 16px 20px; }
  .tile--big .card-head__title { font-size: 25px; }
  .rch__bigface { width: 64px; }
  .foot__top { margin-left: 0; }
}

/* ---------- 12 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
