/* Share the Warmth · 羊毛毡视觉
   颜色全部取自主KV：粉色底、玫粉标题、薰衣草紫、奶油黄、围巾蓝。 */

@font-face {
  font-family: 'Fredoka';
  src: url('/static/fredoka.woff') format('woff');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Chiron GoRound';
  src: url('/static/chiron-goround-subset.woff') format('woff');
  font-weight: 500 900;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #ffe9ff;
  --card: #ffffff;
  --rose: #e25584;
  --rose-deep: #c53a6b;
  --rose-soft: #f6c6cf;
  --plum: #8a3f7c;
  --plum-soft: #b27aa8;
  --lav: #d5cdf0;
  --lav-deep: #9d8fd6;
  --butter: #f6e7b4;
  --butter-deep: #dcc27a;
  --sky: #b9d8f4;
  --sky-deep: #8fbbe6;
  --cream: #fff7ec;

  --shadow: 0 10px 24px -10px rgba(160, 80, 150, 0.45);
  --shadow-soft: 0 6px 18px -10px rgba(160, 80, 150, 0.4);

  /* 羊毛毡的细颗粒，叠在色块上 */
  --felt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  -1.1 0 0 0 .66'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* KV 底部标签上的白色格纹 */
  --plaid:
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(255, 255, 255, 0.5) 30px 34px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(255, 255, 255, 0.5) 22px 26px);

  --font: 'Fredoka', 'Chiron GoRound', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--plum);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--lav-deep);
  outline-offset: 3px;
}

/* ---------- 版心 ---------- */

.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100svh;
}

.pad {
  padding-left: 22px;
  padding-right: 22px;
}

/* ---------- 文字 ---------- */

/* 毛线字：KV 里 "A little gift" 那一行。
   斜纹铺满字形，再用和毛线同色的粗描边盖住边缘：
   笔画正中间只剩一行斜针脚，字也被描边撑成圆滚滚的毛线。 */
.puffy {
  --yarn: #e4628d;
  --yarn-w: 0.062em;
  color: var(--yarn);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.05em;
  text-wrap: balance;
}
:lang(en) .puffy,
.puffy--latin {
  --yarn-w: 0.118em;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.puffy--lines > span {
  display: block;
}
.puffy:not(.puffy--lines),
.puffy--lines > span {
  text-shadow:
    0 0.04em 0 var(--rose-deep),
    0 0.12em 0.1em rgba(197, 58, 107, 0.28);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .puffy {
    font-weight: 600;
  }
  :lang(en) .puffy,
  .puffy--latin {
    font-weight: 600;
  }
  .puffy:not(.puffy--lines),
  .puffy--lines > span {
    padding: 0.08em 0.08em 0.16em;
    background:
      repeating-linear-gradient(56deg, transparent 0 0.1em, #ffe3d6 0.1em 0.126em),
      var(--yarn);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: var(--yarn-w) var(--yarn);
    text-shadow: none;
    filter: drop-shadow(0 -0.012em 0 #f9a3bc) drop-shadow(0 0.034em 0 #c63d6e)
      drop-shadow(0 0.08em 0.055em rgba(190, 50, 105, 0.26));
  }
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-soft);
}
:lang(zh) .kicker {
  letter-spacing: 0.3em;
}

.lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--plum);
  text-wrap: pretty;
}

.fine {
  font-size: 13px;
  color: var(--plum-soft);
}

/* ---------- 布贴按钮 ---------- */

.patch {
  --fill: var(--lav);
  --stitch: var(--lav-deep);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 20px;
  background: var(--felt), var(--plaid), var(--fill);
  color: var(--rose);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(120, 60, 120, 0.1),
    var(--shadow-soft);
  transition:
    transform 0.16s cubic-bezier(0.3, 1.6, 0.6, 1),
    box-shadow 0.16s ease,
    filter 0.16s ease;
  user-select: none;
  -webkit-user-select: none;
}
.patch::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 2px dashed var(--stitch);
  border-radius: 15px;
  opacity: 0.75;
  pointer-events: none;
}
.patch:active:not(:disabled) {
  transform: translateY(2px) scale(0.985);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(120, 60, 120, 0.1),
    0 3px 8px -6px rgba(160, 80, 150, 0.5);
}
.patch:disabled {
  cursor: default;
  filter: saturate(0.45);
  opacity: 0.6;
}

.patch--butter {
  --fill: var(--butter);
  --stitch: var(--butter-deep);
}
.patch--sky {
  --fill: var(--sky);
  --stitch: var(--sky-deep);
}
.patch--peach {
  --fill: var(--rose-soft);
  --stitch: #e88ea4;
  background: var(--felt), var(--fill);
}

/* 主按钮：红礼盒那块玫红 */
.patch--rose {
  --fill: var(--rose);
  --stitch: #ffd3e0;
  min-height: 62px;
  border-radius: 24px;
  background: var(--felt), linear-gradient(180deg, #ea6b95, var(--rose) 55%, #d94678);
  color: #fff8fb;
  font-size: 20px;
  text-shadow: 0 2px 0 rgba(160, 30, 80, 0.35);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -4px 0 rgba(150, 20, 70, 0.22),
    0 12px 22px -10px rgba(210, 60, 115, 0.75);
}
.patch--rose::after {
  inset: 6px;
  border-radius: 18px;
  opacity: 0.9;
}

.patch--block {
  display: flex;
  width: 100%;
}
.patch--small {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
}
.patch--small::after {
  inset: 4px;
  border-radius: 12px;
  border-width: 1.5px;
}

/* ---------- 围巾标签（KV 里写日期的那条） ---------- */

.scarf {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px;
  padding: 9px 20px;
  border-radius: 5px;
  background:
    var(--felt),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, 0.55) 34px 37px),
    linear-gradient(0deg, transparent 30%, rgba(255, 255, 255, 0.55) 30% 37%, transparent 37% 63%, rgba(255, 255, 255, 0.55) 63% 70%, transparent 70%),
    #a8cef2;
  color: #cf3f73;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  box-shadow: 0 5px 12px -8px rgba(80, 120, 190, 0.8);
  transform: rotate(-1.5deg);
}
.scarf::before,
.scarf::after {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 11px;
  background: repeating-linear-gradient(0deg, #8fbbe6 0 2.5px, transparent 2.5px 6px);
}
.scarf::before {
  right: 100%;
}
.scarf::after {
  left: 100%;
}

/* 等待中的三个小点 */
.dots {
  display: inline-flex;
  gap: 4px;
}
.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: dot 1.2s ease-in-out infinite;
}
.dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ---------- 卡片 ---------- */

.card {
  position: relative;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.card--stitched::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px dashed var(--lav);
  border-radius: 21px;
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--felt), #dcc6ea;
  color: var(--rose);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 顶部横幅（号码页、工作人员页） ---------- */

.banner {
  position: relative;
  height: 0;
  padding-bottom: 49.2%;
  background: url('/static/kv-title.jpg') center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 72%, transparent);
  mask-image: linear-gradient(#000 72%, transparent);
}

/* ---------- 语言切换 ---------- */

.lang {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  z-index: 5;
  min-width: 44px;
  height: 32px;
  padding: 0 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(110, 100, 180, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.lang::before {
  /* 把可点区域撑到 44px */
  content: '';
  position: absolute;
  inset: -8px -4px;
}

/* ---------- 小装饰：毛毡星星和爱心 ---------- */

.deco {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(160, 80, 150, 0.3));
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(110px + env(safe-area-inset-bottom));
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 40px);
  padding: 12px 20px;
  border-radius: 18px;
  background: var(--plum);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 12px 24px -10px rgba(90, 30, 80, 0.7);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition:
    transform 0.25s cubic-bezier(0.3, 1.4, 0.6, 1),
    opacity 0.2s ease;
  pointer-events: none;
}
.toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}
.toast--bad {
  background: #b3305c;
}

/* ---------- 看大图 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  background: rgba(74, 40, 92, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade 0.2s ease;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100svh - 150px);
  border: 8px solid #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  -webkit-touch-callout: default;
}
.lightbox__bar {
  display: flex;
  gap: 12px;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* =====================================================
   取号页
   ===================================================== */

.take__hero {
  width: 100%;
  height: auto;
  aspect-ratio: 813 / 1116;
}

.take__body {
  position: relative;
  margin-top: -6px;
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
  text-align: center;
}
.take__title {
  font-size: clamp(34px, 10.5vw, 46px);
}
.take__title > span + span {
  margin-top: -0.14em;
}
.take__body .lead {
  max-width: 21em;
  margin: 16px auto 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 84px;
  padding: 14px 6px 12px;
  border-radius: 20px;
  background: var(--felt), var(--plaid), var(--fill, var(--lav));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(120, 60, 120, 0.08),
    var(--shadow-soft);
  color: var(--rose);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.steps li::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 2px dashed var(--stitch, var(--lav-deep));
  border-radius: 15px;
  opacity: 0.7;
}
.steps li:nth-child(2) {
  --fill: var(--butter);
  --stitch: var(--butter-deep);
}
.steps li:nth-child(3) {
  --fill: var(--sky);
  --stitch: var(--sky-deep);
}
.steps b {
  font-size: 26px;
  line-height: 1;
  text-shadow:
    0 2px 0 #fff,
    0 3px 0 rgba(197, 58, 107, 0.25);
}

.take__cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 44px 22px calc(22px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255, 233, 255, 0), var(--bg) 46%);
  pointer-events: none;
}
.take__cta > * {
  max-width: 436px;
  margin: 0 auto;
  pointer-events: auto;
}

/* =====================================================
   号码页
   ===================================================== */

.ticket__main {
  position: relative;
  margin-top: -5%;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}

.numcard {
  padding: 26px 20px 38px;
}
.numcard__num {
  font-size: clamp(76px, 25vw, 108px);
  --yarn-w: 0.066em;
  line-height: 1;
  letter-spacing: 0.085em;
  text-indent: 0.085em;
  font-variant-numeric: tabular-nums;
}
.numcard__tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.numcard .deco--star {
  top: -16px;
  left: 18px;
  width: 46px;
  transform: rotate(-14deg);
}
.numcard .deco--heart {
  top: -12px;
  right: 20px;
  width: 40px;
  transform: rotate(12deg);
}

/* 拿到照片后，号码收成一条 */
.numcard.is-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 16px 26px;
  text-align: left;
}
.numcard.is-compact .numcard__num {
  font-size: 46px;
}
.numcard.is-compact .numcard__tag {
  position: static;
  flex: none;
}
.numcard.is-compact .deco {
  display: none;
}
.numcard.is-compact .kicker {
  font-size: 11px;
}

.waiting {
  margin-top: 52px;
}
.medallion {
  position: relative;
  width: 176px;
  height: 176px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  animation: bob 3.6s ease-in-out infinite;
}
.medallion img {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  border-radius: 50%;
  object-fit: cover;
}
.medallion::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 2px dashed var(--rose-soft);
  border-radius: 50%;
}
@keyframes bob {
  50% {
    transform: translateY(-7px) rotate(1.5deg);
  }
}
.waiting h2 {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--rose);
  text-wrap: balance;
}
:lang(en) .waiting h2 {
  font-weight: 700;
}
.waiting .lead {
  max-width: 19em;
  margin: 10px auto 0;
}

.ready {
  margin-top: 34px;
}
.ready__title {
  font-size: clamp(32px, 9.6vw, 42px);
}
.ready .fine {
  margin-top: 10px;
  font-size: 14px;
}

.photos {
  display: grid;
  gap: 26px;
  margin-top: 24px;
}
.photo {
  margin: 0;
  padding: 10px 10px 14px;
  animation: pop 0.6s cubic-bezier(0.25, 1.5, 0.5, 1) backwards;
}
.photo:nth-child(odd) {
  transform: rotate(-0.8deg);
}
.photo:nth-child(even) {
  transform: rotate(0.8deg);
}
.photo__img {
  width: 100%;
  min-height: 120px;
  border-radius: 20px;
  background: var(--bg);
  cursor: zoom-in;
  -webkit-touch-callout: default;
}
.photo figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 6px 0 10px;
  text-align: left;
}
.photo__meta {
  font-size: 13px;
  line-height: 1.35;
  color: var(--plum-soft);
}
.photo__meta b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--rose);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.9) rotate(-3deg);
  }
}

.ticket__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}
.linkbtn {
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--plum-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.notice {
  margin-top: 26px;
  padding: 36px 24px 30px;
}
.notice h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--rose);
}
.notice .lead {
  margin: 8px 0 22px;
}

/* 照片到达时撒一把毛毡星星 */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}
.confetti svg {
  position: absolute;
  top: -40px;
  animation: fall linear forwards;
}
@keyframes fall {
  to {
    transform: translateY(112svh) rotate(var(--spin));
    opacity: 0.9;
  }
}

/* =====================================================
   工作人员页
   ===================================================== */

.staff__main {
  position: relative;
  margin-top: -3%;
  padding-bottom: calc(140px + env(safe-area-inset-bottom));
}
.staff__head {
  text-align: center;
}
.staff__title {
  margin-top: 2px;
  font-size: 38px;
}

.panel {
  margin-top: 22px;
  padding: 20px 18px 22px;
}
.panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.panel__no {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--felt), var(--rose);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(150, 20, 70, 0.25);
}
.panel__head h2 {
  flex: 1;
  font-size: 20px;
  font-weight: 900;
  color: var(--rose);
}
:lang(en) .panel__head h2 {
  font-weight: 700;
}
.panel__head .fine {
  font-weight: 600;
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 150px;
  padding: 20px;
  border: 2.5px dashed var(--rose-soft);
  border-radius: 22px;
  background: #fff6fb;
  color: var(--rose);
  font-size: 17px;
  font-weight: 700;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.drop svg {
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
}
.drop .fine {
  font-weight: 500;
}
.drop.is-over {
  border-color: var(--rose);
  background: #ffeaf3;
}

.picked {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.picked__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--bg);
  overflow: hidden;
}
.picked__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picked__item.no-preview img {
  display: none;
}
.picked__item.no-preview::before {
  content: attr(data-ext);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--plum-soft);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.picked__item.is-done::after,
.picked__item.is-busy::after,
.picked__item.is-bad::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 233, 255, 0.72);
}
.picked__item.is-done::after {
  background: rgba(255, 233, 255, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e25584' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 40% no-repeat;
}
.picked__item.is-busy::after {
  animation: pulse 0.9s ease-in-out infinite alternate;
}
.picked__item.is-bad {
  outline: 3px solid #d4376b;
  outline-offset: -3px;
}
.picked__item.is-bad::after {
  background: rgba(212, 55, 107, 0.25);
}
@keyframes pulse {
  to {
    opacity: 0.35;
  }
}
.picked__x {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(90, 40, 90, 0.62);
  color: #fff;
}
.picked__x::before {
  content: '';
  position: absolute;
  inset: -7px;
}
.picked__x svg {
  width: 14px;
  height: 14px;
}
.picked__add {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2.5px dashed var(--rose-soft);
  border-radius: 16px;
  background: #fff6fb;
  color: var(--rose);
}
.picked__add svg {
  width: 30px;
  height: 30px;
}

.search {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border: 2px solid var(--lav);
  border-radius: 16px;
  background: #fbf8ff;
  color: var(--plum);
  font-size: 17px;
  font-weight: 600;
  outline: none;
}
.search::placeholder {
  color: #bfaed0;
  font-weight: 500;
}
.search:focus {
  border-color: var(--lav-deep);
  background: #fff;
}

.seg {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.seg button {
  min-height: 36px;
  padding: 4px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--plum-soft);
  font-size: 14px;
  font-weight: 600;
}
.seg button[aria-pressed='true'] {
  background: var(--felt), #ead9f2;
  color: var(--rose);
}

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  max-height: 268px;
  margin: 14px -6px -6px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chip {
  --fill: var(--lav);
  --stitch: var(--lav-deep);
  position: relative;
  min-height: 54px;
  padding: 6px 4px;
  border: 0;
  border-radius: 18px;
  background: var(--felt), var(--fill);
  color: var(--rose);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(120, 60, 120, 0.08);
  transition: transform 0.14s cubic-bezier(0.3, 1.6, 0.6, 1);
}
.chip::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px dashed var(--stitch);
  border-radius: 14px;
  opacity: 0.7;
  pointer-events: none;
}
.chip.has-photos {
  --fill: var(--butter);
  --stitch: var(--butter-deep);
}
.chip[aria-pressed='true'] {
  --stitch: #ffd3e0;
  background: var(--felt), linear-gradient(180deg, #ea6b95, var(--rose) 55%, #d94678);
  color: #fff;
  text-shadow: 0 2px 0 rgba(160, 30, 80, 0.35);
  transform: scale(1.04);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 0 rgba(150, 20, 70, 0.22),
    0 8px 14px -8px rgba(210, 60, 115, 0.8);
}
.chip__count {
  position: absolute;
  top: -5px;
  right: -4px;
  z-index: 1;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-shadow: none;
}

.empty {
  padding: 26px 12px 12px;
  color: var(--plum-soft);
  font-size: 15px;
  text-align: center;
}

.sentlist {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sentlist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.sentlist li + li {
  border-top: 2px dashed #f1e2f4;
}
.sentlist__num {
  flex: none;
  width: 66px;
  color: var(--rose);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sentlist__thumbs {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
}
.sentlist__thumbs button {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}
.sentlist__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sendbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 40px 22px calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(255, 233, 255, 0), var(--bg) 44%);
  pointer-events: none;
}
.sendbar > * {
  max-width: 436px;
  margin: 0 auto;
  pointer-events: auto;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 26px;
}

/* =====================================================
   二维码页（竖版海报）
   所有尺寸用 --u：竖屏时等于 1vw，横屏时按 9:16 居中成一张竖版海报
   ===================================================== */

.screen {
  --u: min(1vw, 0.5625vh);
  --u: min(1vw, 0.5625svh);
  position: relative;
  display: flex;
  flex-direction: column;
  width: calc(var(--u) * 100);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 0 80px -20px rgba(150, 70, 150, 0.45);
}

/* 屏幕越高，主KV露出越多；矮屏时小伙伴从白卡后面探出头 */
.screen__kv {
  flex: 100 1 0;
  width: 100%;
  height: 0;
  min-height: calc(var(--u) * 96);
  max-height: calc(var(--u) * 123);
  object-fit: cover;
  object-position: 50% 0;
}

.screen__sheet {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  margin-top: calc(var(--u) * -7);
  padding: calc(var(--u) * 8.5) calc(var(--u) * 6.5) calc(var(--u) * 4 + env(safe-area-inset-bottom));
  border-radius: calc(var(--u) * 9) calc(var(--u) * 9) 0 0;
  background: var(--bg);
  text-align: center;
}
.screen__sheet::before {
  content: '';
  position: absolute;
  top: calc(var(--u) * 2);
  left: calc(var(--u) * 2);
  right: calc(var(--u) * 2);
  height: calc(var(--u) * 12);
  border: 2px dashed #eebfe0;
  border-bottom: 0;
  border-radius: calc(var(--u) * 7.2) calc(var(--u) * 7.2) 0 0;
  -webkit-mask-image: linear-gradient(#000 35%, transparent);
  mask-image: linear-gradient(#000 35%, transparent);
  pointer-events: none;
}
.screen__sheet .deco--star {
  top: calc(var(--u) * -5);
  left: calc(var(--u) * 9);
  width: calc(var(--u) * 11);
  transform: rotate(-14deg);
}
.screen__sheet .deco--heart {
  top: calc(var(--u) * -4);
  right: calc(var(--u) * 10);
  width: calc(var(--u) * 9.5);
  transform: rotate(12deg);
}
.qrrow {
  display: flex;
  align-items: stretch;
  gap: calc(var(--u) * 4.5);
}
.qr {
  flex: none;
  align-self: center;
  width: calc(var(--u) * 41);
  padding: calc(var(--u) * 3.6);
  border-radius: calc(var(--u) * 6.5);
}
.qr::after {
  inset: calc(var(--u) * 1.3);
  border-radius: calc(var(--u) * 5.2);
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.qr svg path:last-child {
  stroke: #7a3570;
}
.qrside {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.screen__title {
  margin: calc(var(--u) * -1.5) calc(var(--u) * -2) calc(var(--u) * 0.5);
  font-size: calc(var(--u) * 9.4);
  line-height: 1.2;
  white-space: nowrap;
}
:lang(en) .screen__title {
  font-size: calc(var(--u) * 8.6);
}
.qrside .steps {
  flex: 1;
  grid-template-columns: 1fr;
  gap: calc(var(--u) * 1.8);
  margin: 0;
}
.qrside .steps li {
  flex-direction: row;
  justify-content: flex-start;
  gap: calc(var(--u) * 2.2);
  min-height: calc(var(--u) * 8.2);
  padding: 0 calc(var(--u) * 3.4);
  border-radius: calc(var(--u) * 3.8);
  font-size: calc(var(--u) * 3.6);
  text-align: left;
  white-space: nowrap;
}
.qrside .steps li::after {
  inset: calc(var(--u) * 0.9);
  border-width: 1.5px;
  border-radius: calc(var(--u) * 2.9);
}
.qrside .steps b {
  font-size: calc(var(--u) * 5.4);
}

.screen__foot {
  margin-top: calc(var(--u) * 5);
}
.screen__foot .scarf {
  padding: calc(var(--u) * 2) calc(var(--u) * 5);
  font-size: calc(var(--u) * 3.9);
}
.screen__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 calc(var(--u) * 4);
  margin-top: calc(var(--u) * 3);
  font-size: max(11px, calc(var(--u) * 2.9));
  color: var(--plum-soft);
}
.screen__meta a {
  color: inherit;
  font-weight: 600;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .confetti {
    display: none;
  }
}
