/* YC 独立站 v1 · 移动端 · 暖杏色单色系 */
:root {
  --paper: #FEFDFB;
  --card: #FAF3ED;
  --line: #E4DBD4;
  --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: #FCE9DE;
  -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: #FCE9DE;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg,#FEFDFB 0%,#FEFBF8 14%,#FEF8F3 30%,#FDF6F0 44%,#FDF3ED 58%,#FDF1E9 72%,#FDEEE6 84%,#FBEBE1 92%,#FCE9DE 100%);
}

img {
  max-width: 100%;
  display: block;
  border: 0.5px solid #000;
}

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(250, 243, 237, 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(250, 243, 237, 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 rgba(26, 26, 24, 0.34);
  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: #FBE9DC;
  border-color: var(--deep);
  color: var(--deep);
}

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

.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(250, 243, 237, 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: transparent;
}

.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 58px;
  padding: 2px 4px;
  color: rgba(26, 26, 24, 0.42);
  text-decoration: none;
  font-size: 9px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.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.on span::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--lime);
  vertical-align: 1px;
}

/* ------------------------------------------------------------ 详情 */
.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;
}

.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: #FBE9DC;
  border-color: var(--deep);
  color: var(--deep);
}

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

.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(251, 233, 220, 0.72);
  color: #7D5A44;
  font-size: 10px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.notice.ok {
  border-left-color: #7E8C5B;
  color: #5F6848;
  background: rgba(240, 241, 224, 0.72);
}

.notice.error {
  border-left-color: #B44A3A;
  color: #9A4033;
  background: rgba(250, 228, 223, 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: #F0E7DF;
  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 {
  padding: calc(30px + env(safe-area-inset-top)) 20px 16px;
}

.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: #FBE9DC;
  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: #FCE9DE;
}

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

.admin-body .nav {
  display: none;
}

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

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

.atop b {
  font-family: var(--serif);
  font-size: 19px;
  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: 8px;
  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: 8.5px;
  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;
}

.anav a {
  flex: 0 0 auto;
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 10.5px;
  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: 16px;
}

.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: 30px;
  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: 30px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.04em;
}

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

.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: 10px;
  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: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

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

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

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

.stat.warn {
  background: #FBE9DC;
}

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

.statnote {
  padding: 9px 20px 14px;
  color: var(--muted);
  font-size: 8.5px;
  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: 9.5px;
  line-height: 1.4;
  text-decoration: none;
}

.quickgrid a span {
  color: var(--muted);
  font-size: 7.5px;
  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: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}

.arow .t > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  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: 8px;
  color: var(--muted);
}

.arow .r b {
  color: var(--ink);
  font-size: 11.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: 9px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.minilink.danger {
  color: #B44A3A;
}

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

.miniink {
  color: var(--ink);
  font-size: 9px;
  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: #F0E7DF;
  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: 22px;
  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: 7px;
  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: 8.5px;
  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: 8.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

.historyrow span:first-child {
  color: var(--muted);
  font-size: 7.5px;
  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: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.invinfo > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  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: 7.5px;
  color: var(--muted);
  white-space: nowrap;
}

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

.invnums b {
  color: var(--ink);
  font-size: 10px;
  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: 8px;
  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: 11px;
}

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

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

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

.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: 8.5px;
}

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

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

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

.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: #FBE9DC;
  border-left: 2px solid var(--deep);
}

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

.wishnum {
  font-family: var(--serif);
  font-size: 24px !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: 10.5px;
  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: 9px;
  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: 12px;
}

.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: 10px;
  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: 9.5px;
  line-height: 1.6;
}

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

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

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

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

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

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

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

.login .sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
  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: 8px;
  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: 14px;
}

.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: 11px;
  letter-spacing: 0.14em;
}

.login .foot {
  margin-top: 22px;
  color: var(--muted);
  font-size: 8.5px;
  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;
  }

  .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;
  }

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

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

  .anav {
    gap: 14px;
  }
}

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