/* ==========================================================
   宠物表情包 · PetMoji  |  视觉层（v7）
   仅样式，不改动 app.js 的任何逻辑与接口
   ========================================================== */

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --pink: #FF6E8E;
  --pink-deep: #F0496C;
  --pink-ink: #E23A60;
  --pink-soft: #FFF1F5;
  --pink-line: #F7E3E8;
  --pink-dash: #FFC9D6;

  --ink: #3E2A2E;
  --ink-2: #6B555A;
  --sub: #A28D93;
  --sub-2: #BCA7AC;

  --bg: #FFF7F8;
  --card: #FFFFFF;
  --line: #F7E7EB;

  --r-card: 24px;
  --r-in: 15px;
  --shadow: 0 2px 8px rgba(214, 120, 140, .05), 0 16px 40px rgba(214, 120, 140, .10);
  --shadow-sm: 0 2px 10px rgba(214, 120, 140, .07);
  --grad: linear-gradient(135deg, #FF9BB2 0%, #F0496C 100%);
  --grad-soft: linear-gradient(180deg, #FFE6EC 0%, #FFF2F5 44%, #FFFFFF 100%);
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(120% 45% at 50% 0%, #FFEDF2 0%, rgba(255, 237, 242, 0) 62%),
    radial-gradient(90% 40% at 100% 22%, #FFF1F6 0%, rgba(255, 241, 246, 0) 70%);
  background-repeat: no-repeat;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

.wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 16px calc(38px + env(safe-area-inset-bottom));
}
.wrap.center { text-align: center; padding-top: 8px; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 2px 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--ink);
}
.logo.small { font-size: 14.5px; }
.logo-mark {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #FFA6BE, #FF5C82);
  box-shadow: 0 6px 14px rgba(255, 92, 130, .34);
}
.logo-mark svg { width: 17px; height: 17px; }

.top-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pink-deep);
  background: #FFEFF3;
  border: 1px solid #FFE1E9;
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.top-link.ghosted { background: transparent; border-color: transparent; color: var(--sub-2); font-weight: 600; }
.back {
  width: 32px; height: 32px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: 26px;
  padding: 0 0 18px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* 顶部横图：完整显示，不裁切、不叠加任何遮罩，保证宠物不被遮挡 */
.hero-photo {
  position: relative;
  display: block;
  background: #fff;
  border-radius: 26px 26px 0 0;
  overflow: hidden;
}
.hero-photo picture { display: block; }
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2480 / 722;
  object-fit: contain;
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 16px 14px 0;
  text-align: center;
}
.hero h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.36;
  font-weight: 900;
  letter-spacing: -.6px;
  text-align: center;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  color: var(--pink-deep);
  background: linear-gradient(transparent 64%, rgba(255, 155, 178, .30) 64%, rgba(255, 155, 178, .30) 96%, transparent 96%);
  padding: 0 1px;
}
.hero-sub {
  margin: 8px 0 0;
  font-size: 12.4px;
  line-height: 1.7;
  text-align: center;
  color: #8B7378;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 11px;
}
.hero-badges span {
  font-size: 11px;
  font-weight: 700;
  color: var(--pink-deep);
  background: var(--pink-soft);
  padding: 6px 11px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(240, 73, 108, .09);
}

/* ---------- 成品示例 ---------- */
.samples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 2px 0;
}
.sample {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 16px rgba(214, 120, 140, .13);
}
.sample picture { display: block; }
.sample img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.samples-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--sub-2);
  margin: 8px 0 15px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 17px 15px;
  margin-bottom: 13px;
  box-shadow: var(--shadow);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -.2px;
  color: var(--ink);
}
.card-title small {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--sub-2);
  white-space: nowrap;
}
.card-title.center-title { justify-content: center; }
.card-title.mt { margin-top: 18px; }

.step {
  width: 22px; height: 22px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 4px 10px rgba(255, 92, 130, .33);
}
.sec-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin: 15px 0 9px;
}
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.meta { font-size: 11.5px; color: var(--sub-2); line-height: 1.6; }
.mt { margin-top: 16px; }

/* ---------- 上传区 ---------- */
.pick {
  margin-top: 14px;
  padding: 26px 12px;
  border: 1.5px dashed var(--pink-dash);
  border-radius: 18px;
  background: #FFF9FB;
  text-align: center;
  transition: background .2s, border-color .2s;
}
.pick:active { background: #FFF1F5; border-color: #FFB0C3; }
.pick.has-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  border-style: solid;
  border-color: #FFE1E9;
  background: #fff;
}
.pick.has-photos .pick-icon { width: 22px; height: 22px; margin: 0; }
.pick.has-photos .pick-icon svg { width: 14px; height: 14px; }
.pick.has-photos .pick-t { font-size: 12.5px; color: var(--pink-deep); }
.pick.has-photos .pick-s { display: none; }
.pick-icon {
  width: 46px; height: 46px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #FFF0F4;
  color: var(--pink);
}
.pick-icon svg { width: 22px; height: 22px; }
.pick-t { font-size: 14.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.pick-s { font-size: 11.5px; color: var(--sub-2); margin-top: 4px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.grid:empty { display: none; }
.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #FFF1F4;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .idx {
  position: absolute; left: 6px; top: 6px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.thumb .del {
  position: absolute; right: 5px; top: 5px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  font-weight: 800;
  font-size: 14.5px;
  border-radius: 16px;
  height: 48px;
  transition: transform .12s, opacity .2s, background .2s;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .6; pointer-events: none; }

.btn.ghost {
  background: #fff;
  border: 1.5px solid #FFDCE4;
  color: #4A3237;
}
.btn.ghost:active { background: #FFF7F9; }

.btn.cta {
  width: 100%;
  height: 54px;
  border-radius: 18px;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  letter-spacing: .3px;
  box-shadow: 0 12px 26px rgba(240, 73, 108, .30);
}
.btn.cta svg { width: 19px; height: 19px; }

.btn.mini {
  height: 48px;
  padding: 0 17px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 8px 18px rgba(240, 73, 108, .24);
}
.btn.ghost.danger { color: #E2593B; border-color: #FFD9CE; }

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.stack { display: grid; gap: 10px; margin-top: 16px; }
.copy-btn { width: auto; margin: 0 auto; padding: 0 22px; display: flex; }

/* ---------- 风格 / 张数 ---------- */
.styles, .sizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.style-card, .size-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 13px 5px 11px;
  text-align: center;
  transition: border-color .18s, background .18s, transform .12s;
}
.style-card:active, .size-card:active { transform: scale(.98); }
.style-card .ic {
  width: 30px; height: 30px;
  margin: 0 auto 7px;
  display: grid; place-items: center;
  color: #CBAFB6;
  transition: color .18s;
}
.style-card .ic svg { width: 22px; height: 22px; }
.style-card .n { font-size: 12.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.style-card .h { font-size: 10.5px; color: var(--sub-2); margin-top: 3px; }

.size-card { padding: 15px 5px 13px; }
.size-card .n { font-size: 18px; font-weight: 900; color: var(--ink); letter-spacing: -.3px; }
.size-card .h { font-size: 10.5px; color: var(--sub-2); margin-top: 2px; }

.style-card.on, .size-card.on {
  border-color: #FFB0C3;
  background: #FFF6F8;
  box-shadow: 0 4px 14px rgba(255, 110, 142, .10);
}
.style-card.on .ic { color: var(--pink-deep); }
.style-card.on .n, .size-card.on .n { color: var(--pink-ink); }

.ck {
  position: absolute;
  right: 6px; top: 6px;
  width: 16px; height: 16px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}
.on > .ck { display: grid; }

/* ---------- 输入 ---------- */
.text-in,
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-in);
  background: #FFF9FB;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .18s, background .18s;
}
.text-in { margin-top: 14px; }
.text-in::placeholder, .field input::placeholder, .note-input::placeholder,
.code-input::placeholder { color: #C6B2B7; }
.text-in:focus, .field input:focus, .note-input:focus, .code-input:focus {
  border-color: #FFB0C3;
  background: #fff;
}
.field { display: block; margin-top: 10px; }
.hint { font-size: 11px; color: var(--sub-2); line-height: 1.65; margin-top: 8px; }

.code-row { display: flex; gap: 8px; }
.code-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #FFF9FB;
  text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
  outline: none;
  text-transform: uppercase;
}
.code-input.pass { letter-spacing: .05em; font-size: 15px; text-align: left; }
.msg { font-size: 11.5px; color: var(--pink-deep); margin: 9px 0 0; text-align: center; line-height: 1.6; }
.msg:empty { margin: 0; }

/* ---------- 文本 ---------- */
.tiny { text-align: center; font-size: 11px; color: var(--sub-2); margin: 9px 0 0; line-height: 1.6; }
.links { text-align: center; font-size: 12.5px; margin: 15px 0 6px; color: var(--sub); }
.links a { color: var(--pink-deep); font-weight: 700; text-decoration: none; }
.links i { font-style: normal; color: #E4D2D6; margin: 0 7px; }
.foot-note { text-align: center; font-size: 11px; color: #C9B6BA; margin: 8px 0 0; }

/* ---------- 提交成功 ---------- */
.ok-badge {
  width: 62px; height: 62px;
  margin: 20px auto 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #7FE0BE, #2FC08E);
  color: #fff;
  box-shadow: 0 12px 26px rgba(47, 192, 142, .28);
}
.ok-badge svg { width: 30px; height: 30px; }
h2 { font-size: 22px; font-weight: 900; letter-spacing: -.4px; margin: 0; color: var(--ink); }
.sub { font-size: 12.5px; color: #9C868C; line-height: 1.7; margin: 7px 0 0; }

.ticket {
  position: relative;
  margin: 18px 0;
  padding: 18px 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.ticket-top { font-size: 10.5px; letter-spacing: .34em; color: var(--sub-2); text-indent: .34em; }
.ticket-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 33px;
  font-weight: 800;
  letter-spacing: .13em;
  text-indent: .13em;
  color: var(--pink-deep);
  margin: 7px 0 11px;
}
.ticket-row { display: flex; gap: 8px; justify-content: center; }
.ticket-chip {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pink-deep);
  background: var(--pink-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.ticket-cut {
  position: relative;
  margin: 16px -16px 13px;
  border-top: 1.5px dashed #F2DDE3;
}
.ticket-cut::before, .ticket-cut::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
}
.ticket-cut::before { left: -7px; }
.ticket-cut::after { right: -7px; }
.ticket-foot { font-size: 11px; color: var(--sub-2); line-height: 1.75; }

/* ---------- 订单详情 ---------- */
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ink);
}
.pill {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-deep);
}
.pill.pending { background: #FFF1F5; color: var(--pink-deep); }
.pill.processing { background: #FFF6E1; color: #C08615; }
.pill.done { background: #E6F9F1; color: #17A276; }

.steps3 { display: flex; margin-top: 18px; }
.steps3 .s { flex: 1; position: relative; text-align: center; }
.steps3 .bar {
  position: absolute;
  left: -50%; top: 11px;
  width: 100%; height: 2px;
  background: var(--line);
}
.steps3 .dot {
  position: relative;
  z-index: 1;
  width: 22px; height: 22px;
  margin: 0 auto 5px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #F8ECEF;
  color: #C4B0B5;
  font-size: 11.5px;
  font-weight: 800;
}
.steps3 .t { font-size: 10.5px; color: var(--sub-2); }
.steps3 .s.on .dot { background: var(--grad); color: #fff; box-shadow: 0 4px 10px rgba(255, 92, 130, .28); }
.steps3 .s.on .bar { background: #FFC3D2; }
.steps3 .s.on .t { color: var(--pink-deep); font-weight: 700; }

.expire-chip {
  display: inline-block;
  font-size: 11px;
  color: #9C868C;
  background: var(--pink-soft);
  padding: 5px 9px;
  border-radius: 8px;
}
.expire-chip.ok { background: #E6F9F1; color: #17A276; }
.expire-chip.urgent { background: #FFEDE8; color: #E2593B; }

.done-card { background: linear-gradient(180deg, #FFFBFD 0%, #FFFFFF 46%); }
.paw { display: inline-grid; place-items: center; color: var(--pink); }
.paw svg { width: 17px; height: 17px; }

.stk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}
.stk {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #FFF1F4;
  display: grid;
  place-items: center;
}
.stk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stk .ph { font-size: 22px; opacity: .3; }
.stk .badge {
  position: absolute; left: 5px; top: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  padding: 1px 5px;
  border-radius: 5px;
}
.stk .rm {
  position: absolute; right: 5px; top: 5px;
  width: 19px; height: 19px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 0;
}

.dl-tip { font-size: 11px; color: var(--sub-2); line-height: 1.65; }
.dl-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}
.empty-box {
  padding: 18px 14px;
  border: 1.5px dashed #FFDCE4;
  border-radius: 16px;
  background: #FFF9FB;
  font-size: 12.5px;
  color: #9C868C;
  line-height: 1.85;
  text-align: center;
}
.wait-hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #F6E3C2;
  border-radius: var(--r-in);
  background: linear-gradient(180deg, #FFF8EC 0%, #FFF3E1 100%);
  font-size: 12.5px;
  line-height: 1.75;
  color: #8A6118;
  text-align: left;
}
.wait-hint .ico { flex: none; font-size: 14px; line-height: 1.55; }
.wait-hint .txt { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.wait-hint b { color: #7A5210; font-weight: 800; }
.wait-hint .hl {
  display: inline-block;
  padding: 0 5px;
  border-radius: 6px;
  background: #FFEDC2;
  font-weight: 800;
  color: #7A5210;
  white-space: nowrap;
}
.note-line { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; word-break: break-word; }
.note-line b { color: var(--sub); font-weight: 700; }
.home-done-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wx-guide {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.wx-guide summary { font-size: 12px; font-weight: 800; color: var(--pink-deep); cursor: pointer; }
.wx-guide ol { margin: 9px 0 0 16px; padding: 0; font-size: 12px; color: var(--ink-2); line-height: 1.9; }
.wx-guide p { margin: 9px 0 0; font-size: 11.5px; color: var(--sub-2); line-height: 1.7; }

/* ---------- 管理台 ---------- */
.admin-hint {
  padding: 11px 13px;
  margin-bottom: 12px;
  border: 1px solid #FDE2E9;
  border-radius: 14px;
  background: #FFF6F8;
  font-size: 11.5px;
  color: #8B7378;
  line-height: 1.75;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  padding: 10px 4px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 18px; font-weight: 900; color: var(--ink); line-height: 1.25; }
.stat span { font-size: 10.5px; color: var(--sub-2); }

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 12px;
  padding-bottom: 3px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #9C868C;
}
.tab.on {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(240, 73, 108, .22);
}

.order {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.order .cover {
  width: 48px; height: 48px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  overflow: hidden;
  background: #FFF1F4;
  font-size: 18px;
}
.order .cover img { width: 100%; height: 100%; object-fit: cover; }
.order .info { flex: 1; min-width: 0; }
.order .info .n { font-size: 13px; font-weight: 800; color: var(--ink); }
.order .info .m {
  font-size: 11px;
  color: var(--sub-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--pink-soft);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--pink-deep);
}
.order .right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.originals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.originals figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #FFF1F4;
}
.originals img { width: 100%; height: 100%; object-fit: cover; display: block; }
.originals .tag {
  position: absolute; left: 5px; top: 5px;
  font-size: 9px;
  color: #fff;
  background: rgba(0, 0, 0, .5);
  padding: 1px 5px;
  border-radius: 5px;
}
.note-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #FFF9FB;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  outline: none;
  resize: vertical;
}
.upload-line { display: grid; gap: 8px; margin-top: 10px; }
.admin-tips { font-size: 11px; color: var(--sub-2); line-height: 1.7; margin: 9px 0 0; }

.gate { text-align: center; }
.gate-emoji { font-size: 30px; line-height: 1.2; margin-bottom: 8px; }
.gate .card-title { justify-content: center; }
.gate .meta { margin: 5px 0 14px; }
.gate .code-row { margin-top: 4px; }

/* 二级页标题居中 */
#view-order .topbar .logo,
#view-admin .topbar .logo {
  flex: 1;
  justify-content: center;
}
#view-order .topbar .top-link,
#view-admin .topbar .top-link {
  min-width: 32px;
  text-align: right;
}

/* ---------- 大图 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: rgba(24, 15, 18, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lb-body { flex: 1; display: grid; place-items: center; padding: 10px; min-height: 0; }
.lb-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.lb-close {
  position: absolute;
  right: 14px;
  top: calc(14px + env(safe-area-inset-top));
  width: 34px; height: 34px;
  z-index: 2;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 15px;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 58px;
  z-index: 2;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }
.lb-count { text-align: center; font-size: 12px; color: rgba(255, 255, 255, .7); }
.lb-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
}
.lb-info { flex: 1; min-width: 0; color: #fff; }
.lb-info b { display: block; font-size: 13px; }
.lb-info span { display: block; font-size: 11px; color: rgba(255, 255, 255, .6); line-height: 1.5; }
.lb-dl {
  flex: none;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

/* ---------- Toast / 进度 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 95;
  max-width: 82vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(46, 30, 34, .92);
  color: #fff;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .24s, transform .24s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.progress {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(255, 247, 248, .86);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.progress-inner { width: 200px; text-align: center; }
.spinner {
  width: 34px; height: 34px;
  margin: 0 auto 12px;
  border: 3px solid #FFDCE4;
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-text { font-size: 12.5px; color: #8B7378; }
.progress-bar {
  height: 5px;
  margin-top: 10px;
  border-radius: 99px;
  background: #FFE9EF;
  overflow: hidden;
}
.progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: var(--grad);
  transition: width .3s;
}

/* ---------- 大屏适配 ---------- */
@media (min-width: 520px) {
  .wrap { padding-bottom: 48px; }
  .hero h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
