/* YC 独立站 v1 · 移动端 · 暖杏色单色系 */
:root {
  --paper: #FEFDFB;
  --card: #FCF7F2;
  --line: #E4DBD4;
  --hair: rgba(26, 26, 24, 0.34);
  --ink: #1A1A18;
  --muted: #8A8578;
  --accent: #FFB48A;
  --deep: #D2733C;
  /* 荧光绿只用于三处：拼图、MBTI 小方块、底部导航选中圆点 */
  --lime: #C9F24D;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 10px 30px rgba(90, 62, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  background: #FDF0E8;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: #FDF0E8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg,#FEFEFC 0%,#FEFCFA 14%,#FEFAF7 30%,#FEF9F4 44%,#FEF7F2 58%,#FEF5F0 72%,#FEF3EE 84%,#FCF1EA 92%,#FDF0E8 100%);
}

img {
  max-width: 100%;
  display: block;
  border: 1px solid var(--hair);
  padding: 2px;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

.screen {
  position: relative;
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  /* 固定导航 74px + 底部安全区 + 24px 空隙，避免最后一行被压住 */
  padding: 0 0 calc(98px + env(safe-area-inset-bottom));
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.micro {
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------ 首页 */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 10px;
}

.brand {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}

.brand i {
  font-style: normal;
  color: var(--deep);
}

.topr {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mbti {
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--lime);
  padding: 4px 5px 3px;
  border-radius: 1px;
  transform: translateY(-1px);
}

.icobtn,
a.back {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  padding: 0;
}

.icobtn svg,
a.back svg,
.search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  padding: 26px 20px 16px;
}

.hrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 19px;
}

.puz {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  fill: var(--lime);
  stroke: none;
}

.hrow .micro {
  white-space: nowrap;
}

.hline {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hs {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.hsub2 {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 20px 22px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(252, 247, 242, 0.42);
}

.search svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex: 0 0 auto;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 1px 0;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.searchclear {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.cats {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cats::-webkit-scrollbar {
  display: none;
}

.cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(198, 142, 110, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: #7A5C46;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease;
}

.cat:active {
  transform: scale(0.97);
}

.cat.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #F7F4ED;
  font-weight: 600;
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 13px;
  padding: 0 20px;
}

.gcard {
  min-width: 0;
  background: transparent;
  border: 0;
}

.gimg {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: transparent;
  border: 0;
  text-decoration: none;
}

.gimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.stamp {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14%;
  pointer-events: none;
}

.stamp b {
  display: block;
  padding: 6px 9px;
  border: 1.5px solid rgba(26, 26, 24, 0.6);
  border-radius: 0;
  background: rgba(252, 247, 242, 0.7);
  color: rgba(26, 26, 24, 0.78);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.2em;
  text-align: center;
  transform: rotate(-8deg);
}

.stamp b span {
  display: block;
}

.stamp b span + span {
  margin-top: 1px;
  font-size: 9px;
}

.gmat {
  margin-top: 9px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.gcode {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.09em;
  line-height: 1.5;
}

.gname {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.gbuy {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.gbuy.sold,
.gbuy.wish {
  background: #FCF0E6;
  border-color: var(--deep);
  color: var(--deep);
}

.gbuy.wish.on {
  color: var(--deep);
  background: #FBEBE0;
}

.empty {
  padding: 46px 20px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.03em;
}

.empty b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.24em;
  color: #D9CEC5;
  margin-bottom: 5px;
  padding-left: 0.24em;
}

.empty.small {
  padding: 22px 12px;
  background: rgba(252, 247, 242, 0.4);
  font-size: 9.5px;
}

.textlink {
  color: var(--deep);
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------ 底部导航 */
.nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  width: 100%;
  max-width: 390px;
  height: calc(74px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 18px calc(8px + env(safe-area-inset-bottom));
  /* 内容会滚到导航下面：底部实色、向上渐隐 + 毛玻璃，保证图标文字始终看得清 */
  background: linear-gradient(
    180deg,
    rgba(253, 240, 232, 0) 0%,
    rgba(253, 240, 232, 0.88) 34%,
    rgba(253, 240, 232, 0.99) 100%
  );
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  backdrop-filter: blur(14px) saturate(1.04);
}

/* 底部导航规格唯一来源：前台与后台共用，不再各自覆盖字号 */
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  min-height: 44px;
  padding: 2px 4px;
  color: rgba(26, 26, 24, 0.42);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.45;
}

.nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a.on {
  color: var(--ink);
}

.nav a span {
  position: relative;
  display: inline-block;
}

/* 选中圆点改为绝对定位，不再把文字挤偏，图标与文字保持同一条中线 */
.nav a.on span::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--lime);
  transform: translateY(-50%);
}

/* ------------------------------------------------------------ 详情 */
.dtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 4px;
}

.dcount {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.dhero {
  position: relative;
  margin: 4px 16px 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: transparent;
}

.dhero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.dhero .stamp {
  padding-top: 12%;
}

.dhero .stamp b {
  padding: 7px 11px;
  font-size: 11px;
}

.dhero .stamp b span + span {
  font-size: 10px;
}

.ycsep {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
}

.ycsep i {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.ycsep b {
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--muted);
  padding-left: 0.28em;
}

.dimages {
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
}

.dimages .dimage {
  margin: 0 16px;
}

.dimages .dimage img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.dtitle {
  padding: 0 20px;
}

.dtitle h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.dmeta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.dmeta b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.dprice2 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 20px 4px;
}

.dprice2 .p {
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dprice2 .p small {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.dprice2 .p small:first-child {
  font-size: 14px;
  margin-right: 2px;
}

.dprice2 .stock {
  text-align: right;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.8;
}

.dprice2 .stock b {
  display: block;
  color: var(--deep);
  font-size: 10px;
  font-weight: 500;
}

.dcta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 15px 20px 0;
}

.dcta > form {
  min-width: 0;
}

.dcta .btn {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 11px 15px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #FDF6F0;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

.btn.buy {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn.wish {
  width: 100%;
  background: #FCF0E6;
  border-color: var(--deep);
  color: var(--deep);
}

.btn.wish.on {
  background: #FBEBE0;
}

.btn.wish span {
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}

.btn.fill {
  background: var(--ink);
  color: #FDF6F0;
  border-color: var(--ink);
}

.btn.ghostbtn {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.hint {
  padding: 12px 20px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.notice {
  margin: 12px 20px 0;
  padding: 9px 11px;
  border-left: 2px solid var(--deep);
  background: rgba(252, 240, 230, 0.72);
  color: #7D5A44;
  font-size: 10px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.notice.ok {
  border-left-color: #7E8C5B;
  color: #5F6848;
  background: rgba(244, 245, 233, 0.72);
}

.notice.error {
  border-left-color: #B44A3A;
  color: #9A4033;
  background: rgba(252, 236, 233, 0.78);
}

.sect {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px 8px;
}

.sect b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sect span {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.sectlink {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------ 购物车 / 表单 */
.phead {
  padding: 10px 20px 18px;
}

.phead.tight {
  padding: 0 20px 12px;
}

.phead h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.phead p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.citem {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin: 0 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.citem img {
  width: 76px;
  height: 88px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.cimgph {
  width: 76px;
  height: 88px;
  display: grid;
  place-items: center;
  background: #F4EEE9;
  color: #B9ADA2;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  flex: 0 0 auto;
}

.cimgph.small {
  width: 50px;
  height: 58px;
  font-size: 9px;
}

.cinfo {
  min-width: 0;
}

.cinfo h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.cinfo .m {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.cinfo .pr {
  margin-top: 7px;
  font-size: 11px;
}

.warnline {
  margin-top: 4px;
  color: #B44A3A;
  font-size: 8.5px;
  line-height: 1.6;
}

.cprice {
  padding-top: 2px;
  font-size: 11px;
  white-space: nowrap;
}

.stepper {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.stepper button {
  width: 28px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.stepper button:disabled {
  color: #C9C0B7;
}

.stepper span {
  min-width: 27px;
  text-align: center;
  font-size: 10.5px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  line-height: 26px;
}

.sum {
  margin: 18px 20px 0;
  padding: 13px 0 0;
  border-top: 1px solid var(--ink);
}

.sum .r,
.sum .t {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 10.5px;
  color: var(--muted);
}

.sum .r span:last-child {
  color: var(--ink);
}

.sum .t {
  margin-top: 7px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}

.sum .t span:last-child {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.ctawrap {
  padding: 16px 20px 0;
}

.ctawrap .btn {
  width: 100%;
}

.field {
  margin: 0 20px 15px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
}

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

.twocol .field {
  margin-right: 0;
  margin-left: 0;
}

.twocol .field:first-child {
  margin-left: 20px;
}

.twocol .field:last-child {
  margin-right: 20px;
}

/* ------------------------------------------------------------ 下单成功 / 我的 */
.donehero {
  padding: 24px 20px 20px;
}

.donehero h1 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.donehero p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}

.summarybox {
  margin: 0 20px;
  padding: 15px;
  background: var(--card);
  border-radius: 2px;
}

.summarybox .micro {
  margin-bottom: 8px;
}

.orow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.orow span:first-child {
  min-width: 0;
}

.ototal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.ototal span:last-child {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.doneacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 16px 20px 0;
}

.doneacts .btn {
  width: 100%;
}

.mehero {
  position: relative;
  padding: calc(30px + env(safe-area-inset-top)) 20px 16px;
}

/* 「我的」右上角：低调的后台入口，只有老板/销售会点 */
.adminlink {
  position: absolute;
  top: calc(34px + env(safe-area-inset-top));
  right: 20px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 1px;
  z-index: 5;
}

.mehero h1 {
  margin: 8px 0 8px;
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.mehero p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.8;
}

.melist {
  margin: 4px 20px 24px;
  border-top: 1px solid var(--line);
}

.melist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 12px;
}

.melist .l {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.melist .l i {
  font-style: normal;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-right: 10px;
}

.melist .r {
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.ocard {
  margin: 0 20px 12px;
  padding: 13px 13px 11px;
  background: var(--card);
  border-radius: 2px;
}

.ohead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(228, 219, 212, 0.8);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.chip {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.chip.wait {
  border-color: var(--deep);
  background: #FCF0E6;
  color: var(--deep);
}

.chip.ship {
  border-color: var(--ink);
  color: var(--ink);
}

.chip.back {
  border-color: var(--line);
  color: var(--muted);
}

.chip.ghost {
  border-style: dashed;
  color: #A9A196;
}

.chip.low {
  border-color: var(--deep);
  color: var(--deep);
}

.obody {
  padding-top: 3px;
}

.oline {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
}

.oline img {
  width: 48px;
  height: 55px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.oline .t {
  min-width: 0;
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.oline .t small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.oline .p {
  font-size: 10px;
  white-space: nowrap;
}

.oaddr {
  padding: 7px 0;
  margin-top: 1px;
  border-top: 1px solid rgba(228, 219, 212, 0.8);
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.oaddressret {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(228, 219, 212, 0.8);
  font-size: 9px;
}

.oaddressret b {
  font-size: 12px;
}

.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.05em;
}

.mini.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #FDF6F0;
}

.mini.ghost {
  border-color: var(--line);
  color: var(--muted);
}

.mini.danger {
  border-color: #C98A7A;
  color: #B44A3A;
}

/* ------------------------------------------------------------ 错误页 */
.error-screen {
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.errorbox {
  width: 100%;
  text-align: center;
}

.errorbox h1 {
  margin: 12px 0;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.errorbox p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

.erroracts .btn {
  width: 100%;
}

/* ------------------------------------------------------------ 后台 */
.admin-body {
  background: #FDF0E8;
}

.admin-screen {
  padding: calc(14px + env(safe-area-inset-top)) 0 calc(96px + env(safe-area-inset-bottom));
}

.atop {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 10px;
}

.atop .who {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}

.atop b {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.atopright {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.rolechip {
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.logoutlink {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.anav {
  display: flex;
  gap: 17px;
  padding: 0 20px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.anav::-webkit-scrollbar {
  display: none;
}

/* 老板有 9 项导航：收紧间距让「分享图」在 390 宽完整露出。 */
.anav-wide {
  gap: 8px;
}

.anav a {
  flex: 0 0 auto;
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.anav a.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.subatop {
  align-items: center;
  padding-top: 2px;
}

.subatop .back {
  width: 30px;
  height: 30px;
  margin-left: -6px;
}

.subatop b {
  flex: 1;
  min-width: 0;
  font-size: 18px;
}

.adminhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px 12px;
}

.adminhead h1 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.adminhero {
  padding: 18px 20px 16px;
}

.adminhero h1 {
  margin: 6px 0 6px;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.adminhero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 16px;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  flex: 0 0 auto;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.tabs a.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* admin notices sit inside content */
.admin-screen .notice {
  margin: 0 20px 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 20px;
}

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

.stat {
  min-width: 0;
  padding: 11px 11px 10px;
  background: var(--card);
  border-radius: 2px;
}

.stat .k {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.stat .v {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.stats.three .v {
  font-size: 24px;
}

.stat .v small {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat.warn {
  background: #FCF0E6;
}

.stat.lime {
  background: #F6E8DE;
  border: 1px solid rgba(210, 115, 60, 0.18);
}

.statnote {
  padding: 9px 20px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

.quickgrid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 10px;
  background: rgba(250, 243, 237, 0.72);
  border: 1px solid rgba(228, 219, 212, 0.7);
  border-radius: 2px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.quickgrid a span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.arow {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}

.arow img {
  width: 54px;
  height: 62px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.arow .t {
  min-width: 0;
  overflow-wrap: anywhere;
}

.arow .t b {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
}

.arow .t > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.arow .r {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  max-width: 100px;
  min-width: 0;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}

.arow .r b {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.rowtags {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 3px;
  margin-top: 4px !important;
}

.rowacts {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 7px;
}

.minilink {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.minilink.danger {
  color: #B44A3A;
}

.minilink:disabled {
  color: #CFC6BD;
  text-decoration: none;
}

.miniink {
  color: var(--ink);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.linkmini {
  text-decoration: none;
  white-space: nowrap;
}

/* 产品表单 */
.upgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 20px;
}

.up {
  position: relative;
  aspect-ratio: 1;
  background: #F4EEE9;
  overflow: hidden;
  border-radius: 2px;
}

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

.up.add {
  display: grid;
  place-items: center;
  border: 1px dashed #C8BDB3;
  background: rgba(250, 243, 237, 0.45);
  cursor: pointer;
}

.up.add span {
  font-size: 24px;
  font-weight: 300;
  color: var(--muted);
}

.up.add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.coverbadge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  background: var(--ink);
  color: #FDF6F0;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 1px;
}

.imgacts {
  padding: 8px 20px 14px;
}

.imgact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(228, 219, 212, 0.7);
  font-size: 13px;
  color: var(--muted);
}

.imgact > span:first-child {
  min-width: 30px;
}

.dangerzone {
  margin: 26px 20px 0;
  padding: 13px;
  border: 1px solid rgba(180, 74, 58, 0.32);
  border-radius: 2px;
}

.dangerzone .micro {
  margin-bottom: 9px;
  color: #B44A3A;
}

.dangerbtn {
  width: 100%;
  background: transparent;
  border-color: rgba(180, 74, 58, 0.55);
  color: #B44A3A;
}

.historybox {
  margin: 0 20px;
  padding: 8px 11px;
  background: rgba(250, 243, 237, 0.72);
  border-radius: 2px;
}

.historyrow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(228, 219, 212, 0.7);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.historyrow:last-child {
  border-bottom: 0;
}

.historyrow span:first-child {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.historyrow span:last-child {
  color: var(--muted);
}

/* 库存 */
.invrow {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 20px 7px;
}

.invrow img {
  width: 54px;
  height: 62px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.invinfo {
  min-width: 0;
  overflow-wrap: anywhere;
}

.invinfo b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.invinfo > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.invtags {
  display: flex !important;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px !important;
}

.invnums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.invnums div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.invnums b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.stockform {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 2px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.stockform form {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stockform label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.stockform input {
  width: 58px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  outline: none;
  font-size: 13px;
}

.stockform input:focus {
  border-color: var(--ink);
}

/* 后台订单 */
.orders .ocard {
  margin: 0 20px 11px;
}

.ocard .ohead {
  font-size: 13px;
}

.orderfoot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px solid rgba(228, 219, 212, 0.8);
  color: var(--muted);
  font-size: 13px;
}

.orderfoot b {
  color: var(--ink);
  font-size: 14px;
}

.profitrow {
  margin-top: 6px;
  padding: 6px 8px;
  background: #F6E8DE;
  color: #7D5A44;
  font-size: 13px;
  line-height: 1.6;
}

.profitrow b {
  font-size: 13px;
}

.profitrow span {
  color: var(--muted);
}

.oacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(228, 219, 212, 0.8);
}

.oacts form {
  display: inline-flex;
}

.oactionnote {
  margin-right: auto;
}

/* 许愿 / 建议 */
.suggestion {
  margin: 0 20px 12px;
  padding: 12px;
  background: #FCF0E6;
  border-left: 2px solid var(--deep);
}

.suggestion p {
  margin: 5px 0 0;
  color: #7D5A44;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.wishnum {
  font-family: var(--serif);
  font-size: 26px !important;
  line-height: 1;
}

/* AI */
.aiwrap {
  padding: 6px 20px 0;
}

.bubble {
  max-width: 88%;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.bubble.bot {
  background: var(--card);
  color: var(--ink);
}

.bubble.me {
  margin-left: auto;
  background: var(--ink);
  color: #FDF6F0;
}

.bubble.mutedbubble {
  color: var(--muted);
}

.bubble.answer {
  white-space: pre-wrap;
}

.sugs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px 8px;
}

.sugs form {
  display: inline-flex;
}

.sug {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.aimode {
  padding: 0 20px 12px;
}

.aiinput {
  display: flex;
  gap: 7px;
  padding: 4px 20px calc(18px + env(safe-area-inset-bottom));
}

.aiinput input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  font-size: 14px;
}

.aiinput input:focus {
  border-color: var(--ink);
}

.aiinput button {
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #FDF6F0;
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* 设置 */
.permcard {
  margin: 4px 20px 0;
  padding: 12px;
  background: rgba(250, 243, 237, 0.72);
  border-radius: 2px;
}

.permcard .micro {
  margin-bottom: 4px;
}

.permrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(228, 219, 212, 0.8);
  font-size: 13px;
  line-height: 1.6;
}

.permrow:last-child {
  border-bottom: 0;
}

.permrow span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.permrow .onlyowner {
  color: var(--deep);
}

.permrow small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.permrow > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 账号折叠与权限开关 */
.acctrow > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.acctrow > summary::-webkit-details-marker {
  display: none;
}

.acctrow > summary::marker {
  content: "";
}

.acctrow[open] > summary.arow {
  background: rgba(250, 243, 237, 0.55);
}

.createacct {
  margin: 14px 20px 0;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.createacct > summary.createbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.createbar b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.acctbody {
  padding: 4px 0 18px;
}

.acctbody .permcard {
  margin: 8px 20px 0;
}

.acctbody .hint {
  padding: 10px 20px 0;
}

.acctform {
  margin-top: 10px;
}

.acctacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 0;
}

.acctsep {
  height: 1px;
  margin: 16px 20px 0;
  background: var(--line);
}

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch i {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #E4DBD4;
  transition: background 0.18s ease;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease;
}

.switch input:checked + i {
  background: var(--ink);
}

.switch input:checked + i::after {
  transform: translateX(16px);
}

.switch input:disabled {
  cursor: not-allowed;
}

.switch input:disabled + i {
  opacity: 0.45;
}

.switch input:focus-visible + i {
  outline: 2px solid var(--deep);
  outline-offset: 2px;
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #FDF6F0;
  font-family: var(--serif);
  font-size: 17px;
}

.avatar.dark {
  background: var(--deep);
}

/* 登录 */
.login {
  padding: calc(72px + env(safe-area-inset-top)) 30px 40px;
}

.login .logo {
  font-family: var(--serif);
  font-size: 50px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding-left: 0.05em;
}

.login .sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.loginnotice {
  margin: 18px 0 0;
}

.login form {
  margin-top: 38px;
}

.login .f {
  margin-bottom: 20px;
}

.login .f label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login .f input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
}

.login .f input:focus {
  border-bottom-color: var(--ink);
}

.login .go {
  width: 100%;
  min-height: 47px;
  margin-top: 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #FDF6F0;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.login .foot {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* ------------------------------------------------------------ 小屏微调 */
@media (max-width: 339px) {
  .top,
  .dtop {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero,
  .phead,
  .adminhero,
  .adminhead {
    padding-right: 16px;
    padding-left: 16px;
  }

  .search,
  .cats,
  .pgrid {
    margin-right: 0;
    margin-left: 0;
  }

  .search {
    margin-right: 16px;
    margin-left: 16px;
  }

  .cats,
  .pgrid {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hs {
    font-size: 33px;
  }

  .pgrid {
    gap: 22px 10px;
  }

  .gname {
    font-size: 14px;
  }

  .dcta,
  .dprice2,
  .dtitle,
  .ycsep {
    padding-right: 16px;
    padding-left: 16px;
  }

  .dhero {
    margin-right: 12px;
    margin-left: 12px;
  }

  .dimages .dimage {
    margin-right: 12px;
    margin-left: 12px;
  }

  .citem,
  .sum,
  .field,
  .ocard,
  .melist,
  .summarybox,
  .doneacts,
  .ctawrap,
  .notice,
  .atop,
  .anav,
  .adminhead,
  .tabs,
  .stats,
  .quickgrid,
  .arow,
  .invrow,
  .stockform,
  .upgrid,
  .imgacts,
  .historybox,
  .suggestion,
  .permcard,
  .aiwrap,
  .sugs,
  .aiinput {
    margin-right: 16px;
    margin-left: 16px;
  }

  .atop,
  .anav,
  .adminhead,
  .tabs,
  .stats,
  .quickgrid,
  .arow,
  .invrow,
  .stockform,
  .upgrid,
  .imgacts,
  .sugs,
  .aiinput {
    margin-right: 0;
    margin-left: 0;
    padding-right: 16px;
    padding-left: 16px;
  }

  .createacct,
  .acctbody .permcard {
    margin-right: 16px;
    margin-left: 16px;
  }

  .acctacts {
    padding-right: 16px;
    padding-left: 16px;
  }

  .acctsep {
    margin-right: 16px;
    margin-left: 16px;
  }

  .stats.three .v {
    font-size: 21px;
  }

  .dprice2 .p {
    font-size: 27px;
  }

  .anav {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------ 后台排版统一（2026-11-23 老板定：字不要太小、排版易操作）
   字阶：大标题 32 / 区块标题 18 / 列表标题 16 / 正文 15 / 次要 14 / 输入框 16（避免 iOS 聚焦放大） */
.admin-body {
  font-size: 15px;
  line-height: 1.65;
}

/* —— 标题层 —— */
.admin-body .adminhead h1,
.admin-body .adminhero h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.admin-body .sect b {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.admin-body .sect span,
.admin-body .micro {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.admin-body .atop b {
  font-size: 21px;
}

/* —— 数字与统计 —— */
.admin-body .stat {
  padding: 14px 12px 12px;
}

.admin-body .stat .k {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.admin-body .stat .v {
  margin-top: 6px;
  font-size: 30px;
}

.admin-body .stats.three .v {
  /* 库存三卡：数字+单位必须单行；320 宽下最长 "103,020 元" 也要放得下 */
  font-size: clamp(20px, 6.2vw, 26px);
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.admin-body .stats.three .stat .v small {
  margin-left: 2px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: baseline;
  white-space: nowrap;
}

/* 库存统计三列：窄屏收紧列距与卡内边距，保证 320 宽也不溢出 */
@media (max-width: 430px) {
  .admin-body .stats.three {
    gap: 5px;
  }

  .admin-body .stats.three .stat {
    padding-right: 5px;
    padding-left: 5px;
  }
}

/* 库存页右上角权限说明：必须单行，13px，禁止折行 */
.admin-body .invhead .micro.invperm {
  flex: 0 0 auto;
  max-width: none;
  text-align: right;
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.admin-body .stat .v small,
.admin-body .wishnum {
  font-size: 22px;
}

.admin-body .statnote {
  font-size: 14px;
  line-height: 1.65;
}

/* —— 导航（后台顶部标签） —— */
.admin-body .anav a,
.admin-body .tabs a {
  font-size: 15px;
  letter-spacing: 0.02em;
  padding-top: 6px;
  padding-bottom: 8px;
}

/* 8 项后台导航（含「分享」）：窄屏单行放不下，仅分级收窄间隙，字号保持 15px、不折行不截断 */
@media (max-width: 389px) {
  .admin-body .anav {
    gap: 12px;
  }

  /* 老板 9 项导航：390 以下收字号到 13px（后台下限）并收紧间距，保证不横向裁切。 */
  .admin-body .anav-wide {
    gap: 4px;
  }

  .admin-body .anav-wide a {
    font-size: 13px;
  }
}

@media (max-width: 359px) {
  .admin-body .anav {
    gap: 7px;
  }

  .admin-body .anav-wide {
    gap: 4px;
  }
}

/* —— 快捷入口 —— */
.admin-body .quickgrid a {
  font-size: 15px;
  padding: 15px 12px;
  line-height: 1.5;
}

.admin-body .quickgrid a span {
  font-size: 14px;
}

/* —— 列表行 —— */
.admin-body .arow {
  padding: 13px 20px;
}

.admin-body .arow .t b {
  font-size: 16px;
}

.admin-body .arow .t > span {
  font-size: 14px;
  line-height: 1.55;
}

.admin-body .arow .r {
  font-size: 14px;
}

.admin-body .arow .r b {
  font-size: 15px;
}

.admin-body .orderfoot {
  font-size: 14px;
  padding-top: 9px;
}

.admin-body .orderfoot b {
  font-size: 15px;
}

/* —— 客户地址：正文 14，地址长时自然换行，不截断 —— */
.admin-body .oaddr {
  font-size: 14px;
  line-height: 1.7;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-body .oaddressret {
  font-size: 14px;
}

.admin-body .oaddressret b {
  font-size: 15px;
}

/* 空状态与正文同字阶 */
.admin-body .empty,
.admin-body .empty.small {
  font-size: 14px;
  line-height: 1.8;
}

.admin-body .oline .t small,
.admin-body .historyrow,
.admin-body .historyrow span:first-child,
.admin-body .invinfo > span,
.admin-body .invnums,
.admin-body .gname,
.admin-body .sug,
.admin-body .suggestion p {
  font-size: 14px;
}

.admin-body .invinfo b,
.admin-body .invnums b {
  font-size: 15px;
}

/* —— 按钮与操作：抬高点击区域 —— */
.admin-body .btn {
  font-size: 15px;
  min-height: 46px;
  padding: 12px 16px;
}

.admin-body .chip,
.admin-body .rolechip,
.admin-body .coverbadge,
.admin-body .imgact,
.admin-body .mini,
.admin-body .minilink,
.admin-body .linkmini,
.admin-body .sectlink,
.admin-body .logoutlink,
.admin-body .hint,
.admin-body small,
.admin-body .bubble,
.admin-body p,
.admin-body .permrow,
.admin-body .permrow small,
.admin-body .permrow span:last-child,
.admin-body .stockform label,
.admin-body .profitrow,
.admin-body .createbar b {
  font-size: 14px;
}

.admin-body .createbar b {
  font-size: 17px;
}

.admin-body .permrow {
  padding: 11px 0;
  line-height: 1.6;
}

/* —— 表单：输入框 16px，避免 iOS 自动放大 —— */
.admin-body input,
.admin-body textarea,
.admin-body select,
.admin-body .stockform input,
.admin-body .aiinput input {
  font-size: 16px;
}

.admin-body .field label,
.admin-body .f label,
.admin-body .login .f label {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.admin-body .aiinput button {
  font-size: 15px;
  min-height: 46px;
}

/* —— 登录页 —— */
.admin-body .login .sub,
.admin-body .login .foot,
.admin-body .loginnotice {
  font-size: 14px;
  letter-spacing: 0.06em;
}

.admin-body .login .go {
  font-size: 16px;
  min-height: 48px;
}


/* —— 顶部日期、订单号、价格：与正文同一字阶 —— */
.admin-body .atop .who,
.admin-body .ocard .ohead,
.admin-body .oline .t,
.admin-body .oline .p,
.admin-body .oline .p .num,
.admin-body .ohead {
  font-size: 14px;
}

.admin-body .oline .p {
  font-size: 15px;
  font-weight: 600;
}

/* —— 文字型操作：字号 14，点击区抬到 38px —— */
.admin-body .logoutlink,
.admin-body .sectlink,
.admin-body .minilink,
.admin-body .miniink {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 6px;
  font-size: 14px;
}

.admin-body .sectlink {
  letter-spacing: 0.02em;
}

/* 「退出」与「老板」胶囊同形同高（2026-11-23 老板定）：红边红字，视觉尺寸不变，
   用 ::after 向外扩 6px 隐形点击区。前缀 .atopright 保证盖住上面的 .logoutlink 规则。 */
.admin-body .atopright form {
  margin: 0;
  display: flex;
  align-items: center;
}

.admin-body .atopright .rolechip {
  line-height: 1.5;
}

.admin-body .atopright .logoutlink {
  position: relative;
  padding: 3px 8px;
  border: 1px solid #C0392B;
  border-radius: 999px;
  color: #C0392B;
  background: transparent;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  min-height: 0;
}

.admin-body .atopright .logoutlink::after {
  content: "";
  position: absolute;
  inset: -6px;
}

/* —— 小按钮（退货 / 标记已发 / 删除 / 保存 / 上移下移）—— */
.admin-body .mini {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* —— AI 快捷提问 —— */
.admin-body .sug {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 14px;
}


/* —— 返回按钮与利润行 —— */
.admin-body .subatop .back {
  width: 40px;
  height: 40px;
}

.admin-body .profitrow b {
  font-size: 15px;
}

/* —— 底部导航字号/间距统一由基础 .nav a 提供，后台不再覆盖 —— */


/* ============================================================ 前台排版统一（2026-11-23）
   硬指标：前台最小字号 12px；正文/商品名 15–16；区块标题 18；页面大标题 28–32；
   次要信息 12–13；底部导航 12px 且总高仍 74px；按钮点击高 ≥ 44px。
   只作用于 .store-body，后台 .admin-body 的字号规则不受影响。 */

.store-body {
  font-size: 15px;
  line-height: 1.6;
}

/* —— 英文小标 / 标签 / 编号 —— */
.store-body .micro {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.store-body .mbti {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  padding: 3px 6px;
}

/* —— 首页 —— */
.store-body .hs {
  font-size: 32px;
  line-height: 1.2;
}

.store-body .hsub2 {
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.store-body .search input {
  font-size: 16px;
  line-height: 1.4;
}

.store-body .cat {
  height: 44px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.store-body .gmat {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.store-body .gcode {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.store-body .gname {
  font-size: 16px;
  line-height: 1.4;
}

.store-body .gbuy {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 8px;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.store-body .empty {
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.store-body .empty.small {
  font-size: 13px;
  line-height: 1.7;
}

/* 售罄戳：中文 12 / 英文同样取 12，保证全站无 12px 以下文字 */
.store-body .stamp b {
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.14em;
}

.store-body .stamp b span + span {
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.store-body .dhero .stamp b {
  font-size: 12px;
}

.store-body .dhero .stamp b span + span {
  font-size: 12px;
}

/* —— 详情 —— */
.store-body .dcount {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.store-body .ycsep b {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.store-body .dtitle h2 {
  font-size: 28px;
  line-height: 1.3;
}

.store-body .dmeta {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.store-body .dmeta b {
  font-size: 13px;
  line-height: 1.5;
}

.store-body .dprice2 .p small {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* 与数字之间留一点空隙，避免“1,280含包装”粘连 */
.store-body .dprice2 .p small:last-child {
  margin-left: 5px;
}

.store-body .dprice2 .stock {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.store-body .dprice2 .stock b {
  font-size: 12px;
}

.store-body .btn {
  min-height: 46px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.store-body .hint {
  font-size: 13px;
  line-height: 1.75;
}

.store-body .notice {
  font-size: 13px;
  line-height: 1.7;
}

.store-body .sect b {
  font-size: 18px;
}

.store-body .sect span {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.store-body .sectlink {
  font-size: 13px;
}

/* —— 购物车 / 表单 —— */
.store-body .phead h1 {
  font-size: 32px;
  line-height: 1.2;
}

.store-body .phead p {
  font-size: 15px;
  line-height: 1.6;
}

.store-body .cimgph {
  line-height: 1.5;
}

.store-body .cimgph.small {
  font-size: 12px;
  line-height: 1.5;
}

.store-body .cinfo h3 {
  font-size: 16px;
}

.store-body .cinfo .m {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.store-body .cinfo .pr {
  font-size: 14px;
}

.store-body .warnline {
  font-size: 13px;
  line-height: 1.55;
}

.store-body .cprice {
  font-size: 14px;
}

.store-body .stepper button {
  width: 40px;
  height: 44px;
  font-size: 18px;
}

.store-body .stepper span {
  min-width: 36px;
  font-size: 14px;
  line-height: 44px;
}

.store-body .sum .r,
.store-body .sum .t {
  font-size: 14px;
  line-height: 1.5;
}

.store-body .sum .t {
  font-size: 15px;
}

.store-body .field label {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.store-body .field input,
.store-body .field select,
.store-body .field textarea {
  font-size: 16px;
  line-height: 1.5;
}

/* —— 下单成功 —— */
.store-body .donehero h1 {
  font-size: 32px;
  line-height: 1.25;
}

.store-body .donehero p {
  font-size: 15px;
  line-height: 1.7;
}

.store-body .orow {
  font-size: 14px;
  line-height: 1.5;
}

.store-body .ototal {
  font-size: 15px;
}

/* —— 我的 —— */
.store-body .adminlink {
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.store-body .mehero h1 {
  font-size: 32px;
  line-height: 1.15;
}

.store-body .mehero p {
  font-size: 15px;
  line-height: 1.7;
}

.store-body .melist a {
  min-height: 44px;
  font-size: 15px;
  line-height: 1.5;
}

.store-body .melist .l i {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.store-body .melist .r {
  font-size: 13px;
  line-height: 1.5;
}

.store-body .ohead {
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.store-body .chip {
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.5;
}

.store-body .oline .t {
  font-size: 15px;
}

.store-body .oline .t small {
  font-size: 12px;
  line-height: 1.5;
}

.store-body .oline .p {
  font-size: 14px;
}

.store-body .oaddr {
  font-size: 14px;
  line-height: 1.7;
}

.store-body .oaddressret {
  font-size: 14px;
  line-height: 1.6;
}

.store-body .oaddressret b {
  font-size: 15px;
}

.store-body .mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
}

/* —— 错误页 —— */
.store-body .errorbox h1 {
  font-size: 30px;
}

.store-body .errorbox p {
  font-size: 15px;
  line-height: 1.7;
}

/* —— 底部导航：规格已统一在基础 .nav a，前台只补纵向居中 —— */
.store-body .nav a {
  justify-content: center;
}

/* ============================================================ 2026-11-23 追加
   1) 首页 Logo 图片；2) 库存统计卡片全部单行；3) 详情图 1:1；4) 图片全屏预览 */

/* —— 1. 首页左上角 Logo：与右侧图标垂直居中，不额外撑高 —— */
.store-body .brand-logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.store-body .brand-logo img {
  height: 28px;
  width: auto;
  display: block;
  padding: 0;
  border: 0;
}

/* —— 2. 库存页统计卡片：标签 / 数字 / 单位 / 右上角说明一律单行 —— */
.admin-body .stat .k {
  white-space: nowrap;
}

.admin-body .stats.three .stat .v {
  white-space: nowrap;
  font-size: clamp(18px, 5.2vw, 24px);
  letter-spacing: -0.04em;
  overflow-wrap: normal;
}

.admin-body .stats.three .stat .v small {
  font-size: 13px;
  white-space: nowrap;
}

.admin-body .invhead .micro.invperm {
  max-width: none;
  font-size: 13px;
  white-space: nowrap;
  overflow-wrap: normal;
}

@media (max-width: 360px) {
  .admin-body .stats.three .stat {
    padding: 8px;
  }
}

/* —— 3. 详情图 1:1：按宽度撑成正方形，cover 裁切不拉伸、不留白 —— */
.store-body .dimages .dimage img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: auto;
}

@media (max-width: 360px) {
  /* 详情图与主图同宽：窄屏两侧都收进 12px */
  .dhero,
  .store-body .dimages .dimage {
    margin-left: 12px;
    margin-right: 12px;
  }
}

/* —— 4. 主图 / 详情图点击全屏预览：z-index 90 高于底部导航 30 —— */
.store-body .dhero img,
.store-body .dimages .dimage img {
  cursor: zoom-in;
  /* 去掉双击缩放和 300ms 点击延迟 */
  touch-action: manipulation;
}

.store-body .imgview {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 19, 17, 0.88);
  /* 预览层内禁用双指缩放/双击缩放与滚动链 */
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.store-body .imgview[hidden] {
  display: none;
}

.store-body .imgview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: zoom-out;
  padding: 0;
  border: 0;
  -webkit-user-drag: none;
  user-select: none;
}

.store-body .imgview-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ============================================================ 2026-11-23 库存页排版整理
   只作用于库存页：.inv-page / .invstats / .invnote / .invlist。
   不改前台 .store-body，也不改其它后台页面。
   硬指标：本页可见文字最小 13px（底部导航在本页同样抬到 13px）。 */

/* —— 1. 三张统计卡统一浅底、等高、同内边距 —— */
.admin-body .stats.three.invstats .stat,
.admin-body .stats.three.invstats .stat.lime {
  min-height: 78px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(26, 26, 24, 0.08);
  border-radius: 3px;
}

.admin-body .invstats .stat .k {
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.admin-body .invstats .stat .v {
  margin-top: 6px;
  font-size: clamp(18px, 5.2vw, 24px);
  line-height: 1.15;
}

.admin-body .invstats .stat .v small {
  margin-left: 2px;
  font-size: 13px;
  line-height: 1;
}

@media (max-width: 430px) {
  .admin-body .invstats {
    gap: 5px;
  }

  .admin-body .stats.three.invstats .stat,
  .admin-body .stats.three.invstats .stat.lime {
    padding: 10px 8px;
  }
}

@media (max-width: 360px) {
  .admin-body .stats.three.invstats .stat,
  .admin-body .stats.three.invstats .stat.lime {
    min-height: 74px;
    padding: 9px 7px;
  }
}

/* —— 2. 说明文字拆两行：数据一行、公式一行 —— */
.admin-body .invnote {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 20px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.admin-body .invnote span {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.admin-body .invnote-sub {
  color: rgba(138, 133, 120, 0.82);
}

/* —— 3/4/5/6. 商品块：72px 方图、横排价格、单胶囊、两行操作、细分隔 —— */
.admin-body .invlist {
  padding-bottom: 24px;
}

.admin-body .invitem {
  padding: 18px 0;
}

.admin-body .invitem + .invitem {
  border-top: 1px solid rgba(26, 26, 24, 0.08);
}

.admin-body .invlist .invrow {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: 0;
  padding: 0 20px;
}

.admin-body .invlist .invrow img,
.admin-body .invlist .invrow .cimgph {
  width: 72px;
  height: 72px;
  grid-column: 1;
  grid-row: 1;
  object-fit: cover;
}

.admin-body .invlist .invrow .cimgph {
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1.2;
}

.admin-body .invlist .invinfo {
  grid-column: 2;
  grid-row: 1;
}

.admin-body .invlist .invinfo b {
  font-size: 15px;
  line-height: 1.35;
}

.admin-body .invlist .invinfo > span.invmeta {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.5;
}

.admin-body .invlist .invtags {
  align-items: center;
  gap: 4px;
  margin-top: 6px !important;
}

.admin-body .invlist .chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
}

.admin-body .invlist .invstatus {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.admin-body .invprices {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-body .invprices span {
  white-space: nowrap;
}

.admin-body .invprices span + span::before {
  content: "·";
  margin-right: 4px;
  color: rgba(138, 133, 120, 0.7);
}

.admin-body .invprices b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.admin-body .invlist .stockform {
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 0;
  border-bottom: 0;
}

.admin-body .invlist .stockform form {
  flex: 1 1 100%;
  flex-wrap: nowrap;
  gap: 8px;
}

.admin-body .invlist .stockform label {
  font-size: 13px;
}

.admin-body .invlist .stockform input {
  width: 88px;
  height: 40px;
  padding: 0 10px;
  border-radius: 3px;
}

.admin-body .invlist .stockform button {
  width: 88px;
  min-width: 88px;
  height: 40px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 14px;
}

.admin-body .invlist .stockform .editlink {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 339px) {
  .admin-body .invnote {
    padding-right: 16px;
    padding-left: 16px;
  }

  .admin-body .invlist .invrow,
  .admin-body .invlist .stockform {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* —— 本页底部导航文字不小于 13px（其它后台页面不改） —— */
.admin-body.inv-page .nav a {
  font-size: 13px;
}

/* ============================================================ 后台开单 · 产品选择与选货页（2026-11-23）
   仅作用于 .admin-body；后台最小字号 13px。 */

/* —— 开单页：产品选择区 —— */
.admin-body .productpick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.admin-body .productpick.empty {
  justify-content: center;
  border-style: dashed;
  border-color: var(--hair);
  color: var(--muted);
  background: transparent;
}

.admin-body .ppplus {
  font-size: 15px;
  letter-spacing: 0.06em;
}

.admin-body .ppthumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
  background: #EFE6DC;
}

.admin-body .ppthumb img {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  object-fit: cover;
}

.admin-body .ppph {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #D0C2B4;
}

.admin-body .ppmeta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-body .ppmeta b {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-body .ppmeta span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-body .ppchange {
  flex: 0 0 auto;
  align-self: center;
  padding: 8px 2px 8px 4px;
  color: var(--deep);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— 选货页：标题与网格 —— */
.admin-body .picktop .micro {
  flex: 0 0 auto;
  font-size: 13px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.admin-body.pick-page .admin-screen {
  /* 给固定提交条 + 底部导航留出空间，最后一排不被遮住 */
  padding-bottom: calc(168px + env(safe-area-inset-bottom));
}

.admin-body .pickgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px;
}

.admin-body .pickcell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.admin-body .pickcell:disabled {
  cursor: default;
}

.admin-body .pickcell.on::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--ink);
  pointer-events: none;
  z-index: 2;
}

.admin-body .pickimg {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 2px;
  background: #EFE6DC;
}

.admin-body .pickimg img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  object-fit: cover;
}

.admin-body .pickph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.18em;
  color: #D9CEC5;
}

.admin-body .pickname {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 6px;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-body .pickcode,
.admin-body .pickmat {
  display: block;
  margin-top: 2px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* 售罄：置灰且不可选，保留「售罄」角标 */
.admin-body .pickcell.soldout .pickimg img,
.admin-body .pickcell.soldout .pickph {
  filter: grayscale(1);
  opacity: 0.5;
}

.admin-body .pickcell.soldout .pickname,
.admin-body .pickcell.soldout .pickcode,
.admin-body .pickcell.soldout .pickmat {
  color: var(--muted);
}

.admin-body .picksold {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(26, 26, 24, 0.82);
  color: #FDF6F0;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

/* 选中：右上角黑底白勾 18×18 */
.admin-body .pickcheck {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: #FDF6F0;
}

.admin-body .pickcheck svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #FDF6F0;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-body .pickcell.on .pickcheck {
  display: flex;
}

/* —— 选货页：底部固定提交条（压在底部导航上方） —— */
.admin-body .pickbar {
  position: fixed;
  left: 50%;
  bottom: calc(74px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 25;
  width: 100%;
  max-width: 390px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(254, 253, 251, 0.97);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.admin-body .pickbarname {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-body .pickbarname b {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .pickbarsubmit {
  flex: 0 0 auto;
  min-width: 112px;
  height: 46px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #FDF6F0;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.admin-body .pickbarsubmit:disabled {
  border-color: var(--line);
  background: #D9D3CA;
  color: #FAF7F2;
}

@media (max-width: 339px) {
  .admin-body .pickbar {
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .admin-body .pickbarsubmit {
    min-width: 96px;
    padding: 0 18px;
  }
}

/* —— 发货弹窗 / 快递单号（tracking_no） —— */
.admin-body .shipmask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 24, 0.42);
}

.admin-body .shipmask[hidden] {
  display: none;
}

.admin-body .shipbox {
  width: calc(100% - 48px);
  max-width: 320px;
  padding: 18px;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.admin-body .shipbox h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.admin-body .shipbox p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-body .shipbox input[type="text"] {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #FFF;
  font-size: 16px;
}

.admin-body .shipbox .shipmsg {
  margin: 6px 0 0;
  color: #B44A3A;
  font-size: 13px;
}

.admin-body .shipbox .shipmsg[hidden] {
  display: none;
}

.admin-body .shipbtns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.admin-body .shipbtns .mini {
  flex: 0 0 auto;
}

button.linkmini {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.admin-body .otrack {
  margin-right: 4px;
  overflow-wrap: anywhere;
}

.store-body .otrack {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.store-body .otrack b {
  color: var(--ink);
  font-weight: 700;
}

/* 后台底部导航同样满足最小字号 13px */
.admin-body .nav a {
  font-size: 13px;
}

/* —— 分享入口（追加；不改上方既有规则） —— */
.rowacts-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* 复制分享链接的轻提示 */
.yc-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  max-width: min(320px, calc(100vw - 40px));
  padding: 10px 16px;
  border-radius: 999px;
  background: #1c1a17;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
}

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

.yc-toast.error {
  background: #B44A3A;
}

/* ============================================================ 2026-11-23 全站图片预览（imgview.js）
   前台沿用上方 .store-body .imgview 外观，这里只补手势过渡与后台同款规则。
   遮罩 z-index 90 高于底部导航 30（前台 / 后台同一导航）。 */
.imgview img {
  transition: transform 0.18s ease-out;
  will-change: transform;
}

/* 手势进行中去掉过渡，图片跟手；松手 / 轻点回 1x 时恢复过渡 */
.imgview img.dragging {
  transition: none;
}

.admin-body .imgview {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 19, 17, 0.88);
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.admin-body .imgview[hidden] {
  display: none;
}

.admin-body .imgview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: zoom-out;
  padding: 0;
  border: 0;
  -webkit-user-drag: none;
  user-select: none;
}

.admin-body .imgview-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ============================================================ 网站分享卡片（2026-11-23）
   仅后台使用；字号随后台统一规则，最小 13px，320 宽不横向溢出。 */

/* —— 设置页入口行 —— */
.settingsrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 20px 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--ink);
  text-decoration: none;
}

.settingsrow .t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settingsrow b {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.settingsrow small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* —— 网站分享卡片（版面按老板给的 JM 截图：标题栏居中、预览卡、表单卡） —— */
.sc-top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  padding: 2px 20px 14px;
}

.sc-top .back {
  justify-self: start;
  width: 40px;
  height: 40px;
  margin-left: -8px;
}

.sc-top b {
  justify-self: center;
  min-width: 0;
  text-align: center;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.sc-top-spacer {
  width: 40px;
  height: 1px;
}

.sc-card {
  min-width: 0;
  margin: 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(90, 62, 42, 0.04);
}

/* —— 预览卡 —— */
.sc-preview-card {
  padding: 12px 14px 14px;
}

.sc-preview-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.sc-preview-body {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  margin-top: 10px;
}

.sc-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 8px;
  background: #EFE6DC;
}

.sc-thumb[hidden] {
  display: none;
}

.sc-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
}

.sc-preview-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 1px 0;
}

.sc-preview-title {
  color: #1C1A17;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sc-preview-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sc-preview-desc[hidden] {
  display: none;
}

.sc-preview-domain {
  margin-top: 4px;
  padding-top: 4px;
  color: #A9A296;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* —— 表单卡 —— */
.sc-formcard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 14px;
  padding: 16px 14px;
}

.sc-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sc-label {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.sc-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sc-formcard input,
.sc-formcard textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  outline: none;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

.sc-formcard textarea {
  min-height: 96px;
  resize: vertical;
}

.sc-formcard input:focus,
.sc-formcard textarea:focus {
  border-color: var(--ink);
}

.sc-imgbtns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.sc-imgbtns .mini {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.sc-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(180, 74, 58, 0.35);
  border-radius: 8px;
  background: rgba(180, 74, 58, 0.07);
  color: #B44A3A;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.sc-error[hidden] {
  display: none;
}

.sc-save {
  width: 100%;
  min-height: 50px;
  border-radius: 8px;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.sc-footnote {
  margin: 14px 20px 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media (max-width: 339px) {
  .settingsrow,
  .sc-card,
  .sc-footnote {
    margin-right: 16px;
    margin-left: 16px;
  }

  .sc-formcard {
    margin-top: 12px;
  }

  .sc-top {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sc-thumb {
    flex-basis: 80px;
    width: 80px;
    height: 80px;
  }
}

/* ------------------------------------------------------------ 分享按钮（首页 / 商品详情）
   绝对定位在顶部右侧：不参与 .top/.dtop 的 flex 排版，Logo 位置与大小不受影响；
   右侧预留 72–76px 给按钮，避免与搜索、计数重叠。 */
.top.has-share,
.dtop.has-share {
  position: relative;
}

.top.has-share {
  padding-right: 76px;
}

.dtop.has-share {
  padding-right: 72px;
}

.sharebtn {
  position: absolute;
  right: 20px;
  top: calc(18px + env(safe-area-inset-top) + 17px);
  transform: translateY(-50%);
  min-width: 48px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dtop.has-share .sharebtn {
  right: 16px;
  top: calc(14px + env(safe-area-inset-top) + 17px);
}

.sharebtn:active {
  background: var(--accent);
}

/* 微信内引导层：固定在底部导航上方，不遮挡导航。 */
.share-guide {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(74px + env(safe-area-inset-bottom) + 72px);
  transform: translateX(-50%);
  width: min(calc(100vw - 32px), 358px);
  padding: 16px;
  border-radius: 14px;
  background: #1A1A18;
  color: var(--paper);
  box-shadow: 0 18px 44px rgba(26, 26, 24, 0.28);
}

.share-guide[hidden] {
  display: none;
}

.share-guide strong {
  display: block;
  font-size: 15px;
  line-height: 1.4;
}

.share-guide p {
  margin: 6px 0 14px;
  color: rgba(254, 253, 251, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

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

.share-guide-actions button {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
}

.share-guide-copy {
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.share-guide-close {
  border: 1px solid rgba(254, 253, 251, 0.32);
  background: transparent;
  color: var(--paper);
}

/* 分享结果轻提示：位于底部导航上方。 */
.share-toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(74px + env(safe-area-inset-bottom) + 18px);
  transform: translate(-50%, 8px);
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #1A1A18;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.share-toast.error {
  background: #B44A3A;
}

/* 320 档与页面左右 16px 内边距对齐 */
@media (max-width: 339px) {
  .top.has-share {
    padding-right: 72px;
  }

  .top.has-share .sharebtn {
    right: 16px;
  }
}

/* ============================================================ 后台改单页（2026-11-23）
   仅作用于改单页 .order-edit-page；320/360/390 不横向溢出，字号 ≥13px，点击区 ≥40px。 */
.admin-body .eorderline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 20px 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.admin-body .eorderline .num {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-body .eorderline .chip {
  flex: 0 0 auto;
  font-size: 14px;
}

.admin-body .ehint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-body .esect {
  margin: 4px 20px 14px;
}

.admin-body .esecthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0 9px;
  border-bottom: 1px solid var(--line);
}

.admin-body .esecthead b {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.admin-body .eitem {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}

.admin-body .eitem.is-new {
  border-color: var(--hair);
}

.admin-body .eitem.removed {
  background: #F3EAE1;
}

.admin-body .eitem.removed .einfo,
.admin-body .eitem.removed .egrid {
  opacity: 0.55;
}

.admin-body .ehead {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.admin-body .ethumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
  background: #EFE6DC;
  object-fit: cover;
}

.admin-body .ethumb.ph {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.admin-body .einfo {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-body .einfo b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-body .einfo span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-body .einfo em {
  display: inline-block;
  margin-top: 5px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.admin-body .einfo .eno {
  border-color: #C98A7A;
  color: #B44A3A;
}

.admin-body .einfo .enew {
  border-color: #D8C3AE;
  background: #F6E8DE;
  color: #7D5A44;
}

.admin-body .egrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.admin-body .ecell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-body .ecell b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.admin-body .ecell .eqty {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}

.admin-body .ecell .eqty:focus {
  border-color: var(--ink);
}

.admin-body .efoot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.admin-body .efoot .mini {
  min-height: 40px;
}

.admin-body .eadd {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 10px;
  border: 1px dashed var(--hair);
  border-radius: 2px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.admin-body .eadd:active {
  background: rgba(255, 255, 255, 0.3);
}

.admin-body .esummary {
  margin: 0 20px 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-body .esumrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.admin-body .esumrow b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.admin-body .etotalrow {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(228, 219, 212, 0.8);
  color: var(--ink);
  font-size: 15px;
}

.admin-body .etotalrow b {
  font-size: 18px;
}

@media (max-width: 339px) {
  .admin-body .eorderline,
  .admin-body .esect,
  .admin-body .esummary {
    margin-right: 16px;
    margin-left: 16px;
  }

  .admin-body .eitem {
    padding: 10px;
  }
}

/* 后台提示条字号与正文一致（改单成功/货品错误提示）。 */
.admin-body .notice {
  font-size: 14px;
}

/* 订单操作里的文字按钮（复制单号 / 修改单号）点击区抬到 40px。 */
.admin-body .linkmini {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 6px;
}

/* 无图货品的「YC」是图形占位，后台里也按最小字号 13px 显示。 */
.admin-body .cimgph.small {
  font-size: 13px;
  line-height: 1.2;
}

/* ------------------------------------------------------------ 后台 · 分享图 */
/* 三款开源字体（OFL）随站点落地，后台画布预览与 Pillow 出图同源。 */
@font-face {
  font-family: "YC Serif SC";
  src: url("/static/fonts/NotoSerifSC-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YC Serif SC";
  src: url("/static/fonts/NotoSerifSC-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YC Sans SC";
  src: url("/static/fonts/NotoSansSC-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YC Sans SC";
  src: url("/static/fonts/NotoSansSC-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "YC WenKai";
  src: url("/static/fonts/LXGWWenKai-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 文楷只有 Medium 字重，粗体档位由它承担。 */
@font-face {
  font-family: "YC WenKai";
  src: url("/static/fonts/LXGWWenKai-Medium.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.qp-root {
  padding: 0 20px;
  overflow-x: clip;
}

.qp-root [hidden] {
  display: none !important;
}

.qp-top {
  padding-bottom: 12px;
}

.qp-savestate {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.qp-savestate:not(.on) {
  color: var(--ink);
}

.qp-savestate.err {
  color: #B44A3A;
}

.qp-previewcard {
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}

.qp-preview {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #EFE9E1;
  touch-action: pan-y;
  overscroll-behavior: auto;
}

.qp-layer,
.qp-layer *,
.qp-handle,
.qp-handle * {
  touch-action: none;
}

.qp-canvas {
  touch-action: pan-y;
}

html.qp-drag-lock,
html.qp-drag-lock body {
  overscroll-behavior: none;
  touch-action: none !important;
}

.qp-canvas {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  transform-origin: 0 0;
  background: var(--paper);
}

.qp-canvas .qp-canvas-empty {
  position: absolute;
  inset: 6%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 8px dashed #C9BFB2;
  border-radius: 24px;
  color: #8A7E70;
  font-size: 60px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.qp-canvas .qp-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  padding: 0;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.qp-layer {
  position: absolute;
  margin: 0;
  padding: 0;
  transform-origin: center center;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  outline: 1px dashed transparent;
  outline-offset: 2px;
}

.qp-layer.on {
  outline-color: var(--ink);
}

.qp-layer-text {
  max-width: none;
  white-space: pre-wrap;
  overflow-wrap: normal;
}

.qp-layer-code {
  line-height: 0;
}

.qp-layer-code img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  padding: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.qp-handle {
  position: absolute;
  z-index: 3;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: nwse-resize;
  touch-action: none;
}

.qp-dimline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.qp-dimline #qpDims {
  flex: 0 0 auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* 尺寸行内提示与尺寸/图层名同用 1.4 行高，避免未选中时 20.15px 撑高整行 */
.qp-dimline .qp-note {
  line-height: 1.4;
}

/* 选中图层时在尺寸行内复用空间：左侧图层名，右侧红色删除 */
.qp-dimleft {
  display: flex;
  flex: 0 1 auto;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.qp-dimname {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qp-dimname::before {
  content: "·";
  margin-right: 6px;
  color: var(--muted);
}

.qp-dimdel {
  flex: 0 0 auto;
  /* 18px 外高 + 不参与基线对齐：不超过 13px/1.4=18.2px 的文本行，选中前后行高一致 */
  align-self: center;
  box-sizing: border-box;
  height: 18px;
  padding: 0 9px;
  border: 1px solid #C98A7A;
  border-radius: 2px;
  background: #B44A3A;
  color: #FDF6F0;
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-dimdel:active {
  opacity: 0.85;
}

.qp-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.qp-note.warn {
  color: #B44A3A;
}

.qp-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}

.qp-card > .qp-label {
  display: block;
  margin-bottom: 8px;
}

.qp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.qp-grow {
  flex: 1;
  min-width: 0;
}

.qp-label {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.qp-inlinebtns {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.qp-root .mini {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.qp-root .mini:disabled {
  color: var(--muted);
  opacity: 0.55;
}

.qp-root .mini.ghost:disabled {
  border-color: var(--line);
}

.qp-select,
.qp-field input,
.qp-field textarea,
.qp-mini-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.qp-select:focus,
.qp-field input:focus,
.qp-field textarea:focus,
.qp-mini-field input:focus {
  border-color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 0;
}

.qp-ratio {
  flex: 1;
  max-width: none;
}

/* 字体下拉：按「中文 / 英文」分组，分组标题 13px；窄屏不撑破卡片。 */
.qp-font-select {
  max-width: 100%;
}

.qp-font-select optgroup {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
}

.qp-font-select optgroup option {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
}

.qp-custom {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.qp-mini-field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.qp-custom .mini {
  flex: 0 0 auto;
}

.qp-bgrow {
  margin-top: 12px;
}

.qp-addrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qp-add {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  min-height: 42px;
  padding: 8px 6px;
  border: 1px dashed var(--hair);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.qp-add:active {
  background: #F5EDE4;
}

.qp-card > .qp-note {
  margin-top: 8px;
}

.qp-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.qp-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.qp-slot-label {
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.qp-slot-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  padding: 0;
  object-fit: contain;
  background:
    repeating-conic-gradient(#F1EAE2 0% 25%, #FCF7F2 0% 50%) 50% / 16px 16px;
}

.qp-slot-empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
}

.qp-slot-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qp-slot-btns .mini {
  width: 100%;
}

.qp-inspector-head {
  margin-bottom: 10px;
}

.qp-inspector-head b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.qp-empty {
  margin-bottom: 10px;
}

.qp-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qp-flabel {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.qp-field textarea {
  min-height: 78px;
  resize: vertical;
}

.qp-field input[type="color"] {
  padding: 4px;
}

.qp-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 8px;
  margin-top: 10px;
}

.qp-field-wide {
  margin-top: 10px;
}

.qp-rotate-row {
  grid-template-columns: minmax(0, 1fr);
}

.qp-rotate-row .qp-field {
  max-width: 160px;
}

.qp-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.qp-actions .btn {
  flex: 1;
  min-height: 47px;
  padding: 11px 8px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.qp-actions .btn:first-child {
  flex: 1.4;
}

.qp-root .btn.ghostbtn {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.qp-autonote {
  margin-top: 6px;
  text-align: right;
}

.qp-result .qp-download {
  color: var(--ink);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.qp-result img {
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  padding: 0;
}

.qp-recent {
  display: flex;
  flex-direction: column;
}

.qp-recent-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.qp-recent-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.qp-recent-link {
  display: block;
  width: 64px;
}

.qp-recent-link img {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  padding: 0;
  object-fit: cover;
}

.qp-recent-meta {
  min-width: 0;
}

.qp-recent-name {
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.qp-recent-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}

.qp-recent-actions .mini {
  white-space: nowrap;
}

.qp-recent-del {
  align-self: center;
}

.qp-tpl {
  display: flex;
  flex-direction: column;
}

.qp-tpl-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.qp-tpl-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.qp-tpl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.qp-tpl-name {
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.qp-tpl-head .qp-note {
  flex: 0 0 auto;
  white-space: nowrap;
}

.qp-tpl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qp-tpl-btns .mini {
  flex: 0 0 auto;
}

.qp-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 120;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
  overflow-wrap: anywhere;
}

.qp-toast[hidden] {
  display: none;
}

@media (max-width: 339px) {
  .qp-root {
    padding: 0 16px;
  }

  .qp-previewcard {
    padding: 8px;
  }

  .qp-card {
    padding: 10px;
  }

  .qp-recent-item {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .qp-recent-link,
  .qp-recent-link img {
    width: 56px;
  }

  .qp-recent-link img {
    height: 56px;
  }
}

/* ============================================================
   分享图布局改版：短画布 + 常驻图层条 + 添加弹层 + 固定生成
   ============================================================ */

.qp-root {
  padding: 0 14px 120px;
}

.qp-top {
  gap: 8px;
}

.qp-topbtn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-topbtn:active {
  background: #F5F2EA;
}

.qp-previewcard {
  padding: 8px 10px 10px;
  border-radius: 12px;
}

.qp-preview {
  height: min(42vh, 330px);
  border-radius: 8px;
  background: #F4F1EA;
  touch-action: pan-y;
  overscroll-behavior: auto;
}

.qp-canvas {
  box-shadow: 0 1px 6px rgba(36, 35, 32, 0.07);
}

.qp-canvas.qp-bgselected {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.qp-dimline {
  align-items: center;
  padding: 7px 0 1px;
  font-size: 13px;
}

.qp-dimline .qp-note {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.qp-dimline #qpDims {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- 常驻图层条 ---------- */

.qp-layers {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  margin-top: 8px;
  padding: 1px 0 2px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.qp-layers::-webkit-scrollbar {
  display: none;
}

.qp-layers.is-empty {
  min-height: 32px;
}

.qp-layers-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.qp-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-chip.on {
  border-color: var(--ink);
  background: #F5F2EA;
  font-weight: 600;
}

.qp-chip-i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #F4F1EA;
  color: var(--ink);
  font-size: 10px;
  line-height: 1;
}

/* ---------- 添加 / 删除按钮 ---------- */

.qp-layerbtns {
  display: flex;
  gap: 8px;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--line);
}

.qp-lbtn {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-lbtn:active {
  background: #F5F2EA;
}

.qp-lbtn-del {
  border-color: #EED6D2;
  background: #FFF8F6;
  color: #B44A3A;
}

.qp-lbtn-del:disabled {
  border-color: var(--line);
  background: var(--paper);
  color: var(--muted);
  opacity: 0.5;
  cursor: default;
}

/* ---------- 下移的正文区 ---------- */

.qp-root .qp-body {
  padding: 0;
}

.qp-section {
  margin-top: 16px;
}

.qp-h {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.qp-ratios {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: none;
}

.qp-ratios::-webkit-scrollbar {
  display: none;
}

.qp-r {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-r.on {
  border-color: var(--ink);
  background: var(--ink);
  color: #FDF6F0;
}

.qp-inspector-card {
  margin-top: 0;
  padding: 4px 12px 12px;
  border-radius: 12px;
}

.qp-inspector-card .qp-field-wide:first-child,
.qp-inspector-card .qp-grid2:first-child {
  margin-top: 8px;
}

.qp-bgbtns {
  margin-top: 10px;
}

/* ---------- 字体分组列表 ---------- */

.qp-fontfield {
  margin-top: 10px;
}

.qp-fontrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-fontrow.open {
  border-color: var(--ink);
}

.qp-fontcur {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qp-chev {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.qp-fontlist {
  max-height: 268px;
  margin-top: 6px;
  padding: 2px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  overscroll-behavior: contain;
}

.qp-fgroup {
  margin: 8px 8px 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.qp-fgroup:first-child {
  margin-top: 4px;
}

.qp-fitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin-bottom: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-fitem.on {
  border-color: var(--ink);
  background: #F5F2EA;
}

.qp-fname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qp-fcheck {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 13px;
  visibility: hidden;
}

.qp-fitem.on .qp-fcheck {
  visibility: visible;
}

/* ---------- 色块图层 ---------- */

.qp-layer-shape {
  border-radius: 0;
}

/* ---------- 底部添加弹层 ---------- */

.qp-sheetmask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(36, 35, 32, 0.25);
}

.qp-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 6px 14px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  background: var(--paper);
  box-shadow: 0 -12px 30px rgba(36, 35, 32, 0.16);
  touch-action: pan-y;
}

.qp-sheet[hidden],
.qp-sheetmask[hidden] {
  display: none !important;
}

.qp-sheet.on {
  animation: qpSheetIn 0.22s ease-out;
}

@keyframes qpSheetIn {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.qp-sheet-grab {
  width: 36px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 2px;
  background: #DDD8CE;
  cursor: grab;
  touch-action: none;
}

.qp-sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.qp-sheet-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.qp-sheet-count {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.qp-sheet-count.warn {
  color: #B44A3A;
}

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

.qp-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.qp-opt:active {
  background: #F5F2EA;
}

.qp-opt-i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #F4F1EA;
  color: var(--ink);
  font-size: 12px;
}

/* ---------- 固定底部生成按钮 ---------- */

.qp-fab {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 8px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(254, 253, 251, 0), var(--paper) 30%);
  pointer-events: none;
}

.qp-fab .qp-generate {
  width: 100%;
  height: 46px;
  min-height: 46px;
  border-radius: 11px;
  font-size: 15px;
  letter-spacing: 0.08em;
  pointer-events: auto;
}

@media (max-width: 339px) {
  .qp-root {
    padding-right: 10px;
    padding-left: 10px;
  }

  .qp-lbtn {
    padding: 0 4px;
    font-size: 13px;
  }
}
