* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f1f1f;
  background: #f4f1ec;
  max-width: 100%;
}
a { color: #c45c26; text-decoration: none; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-mask, .nav-burger { display: none; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 200px;
  background: #2b241c; color: #eee; z-index: 40;
}
.brand { padding: 20px 16px; font-weight: 700; }
.side nav a {
  display: block; padding: 12px 16px; color: #eee;
}
.side nav a.on, .side nav a:hover { color: #e8c39c; background: #0002; }
.shell { margin-left: 200px; min-height: 100%; min-width: 0; }
.top {
  height: 56px; display: flex; justify-content: flex-end; align-items: center;
  gap: 12px; padding: 0 20px; background: #fff; border-bottom: 1px solid #eee;
}
.top a { color: #666; }
.who { color: #666; }
.main { padding: 20px 24px; }
h3 { margin: 0 0 12px; }
h4 { margin: 16px 0 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-head h3 { margin: 0; }
.sum-row { display: flex; align-items: baseline; gap: 12px; }
.clear-link { font-size: 13px; color: #9a8f84; }
.clear-link:hover { color: #c45c26; }
.flash { padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }
.flash.bad { background: #fde8e8; color: #a61b1b; }
.flash.good { background: #e7f6e7; color: #1b7a1b; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #f0eae3; font-size: 14px; }
th { color: #888; font-weight: 600; background: #faf7f3; }
tr.link { cursor: pointer; }
tr.link:hover { background: #faf7f3; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #eee; }
.tag.pending_pay { background: #fdf6ec; color: #b88230; }
.tag.paid, .tag.done { background: #f0f9eb; color: #529b2e; }
.tag.shipped, .tag.cancelled { background: #f4f4f5; color: #666; }
.btn {
  display: inline-block; border: 1px solid #ddd; background: #fff; color: #333;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.btn.primary { background: #c45c26; border-color: #c45c26; color: #fff; }
.btn.danger { color: #c45656; border-color: #e8b4b4; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.form { display: grid; gap: 12px; max-width: 640px; }
.form.inline { display: flex; gap: 8px; max-width: none; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.form label { display: grid; gap: 6px; font-size: 14px; }
.form input, .form select, .main select {
  padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 6px; font: inherit;
}
.form .check { display: flex; align-items: center; gap: 8px; }
.size-block { display: grid; gap: 8px; }
.size-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.size-list { display: grid; gap: 8px; }
.size-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  background: #fff;
  border: 1px solid #eee4da;
  border-radius: 8px;
}
.size-row .size-del { margin-bottom: 2px; white-space: nowrap; }
.size-row.bead-pick { grid-template-columns: 1.4fr 1fr auto; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 48px; height: 36px; padding: 2px; cursor: pointer; }
.color-field .swatch { width: 20px; height: 20px; }
.color-field code { font-size: 13px; color: #666; }
.ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.row-ops { display: flex; gap: 12px; align-items: center; }
.linkish { border: 0; background: none; color: #c45c26; cursor: pointer; padding: 0; font: inherit; }
.bead-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bead {
  display: inline-block; width: 36px; height: 36px; border-radius: 50%;
  border: 0; vertical-align: middle; overflow: hidden;
  background: #ccc; position: relative;
  clip-path: circle(50% at 50% 50%);
  --cs: 1; --cx: 0.5; --cy: 0.5; --fill: 1.38;
}
.bead img {
  position: absolute;
  width: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  height: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  left: calc(50% - var(--cx, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  top: calc(50% - var(--cy, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  object-fit: cover; display: block; max-width: none;
}
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #ccc; vertical-align: middle; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; background: #fff; padding: 16px; border-radius: 8px; }
.span2 { grid-column: span 2; }
.muted { display: block; color: #888; font-size: 12px; margin-bottom: 4px; }
.hint { color: #888; font-size: 12px; line-height: 1.5; }
.page-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.page-tabs a {
  padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #e6ddd3; color: #333; font-size: 13px;
}
.page-tabs a.on { background: #2b241c; color: #fff; border-color: #2b241c; }
.form-wide { max-width: 820px; }
.form textarea { padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 6px; font: inherit; min-height: 96px; }
.thumb-wide { max-width: 220px; max-height: 80px; object-fit: cover; border-radius: 8px; vertical-align: middle; }
.pick-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; background: #fff; padding: 12px; border-radius: 8px; }
.slide-card {
  border: 1px solid #eee4da; border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 10px;
}
.decorate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}
.phone-col {
  position: sticky;
  top: 16px;
  min-width: 320px;
  justify-self: end;
}
.phone-col h4 { margin: 0 0 10px; font-size: 14px; }
#cmsPreview { min-height: 720px; }
.slot-card {
  background: #fff;
  border: 1px solid #eee4da;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
}
.hv-hero {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 750 / 640;
  height: auto;
  background: #c4a882;
  overflow: hidden;
}
.hv-hero img, .hv-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hv-ph { background: linear-gradient(165deg, #e8d2b0, #8f6b4a); }
.hv-mask { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(40,24,10,.4)); }
.hv-copy { position: absolute; left: 14px; right: 14px; top: 28px; color: #f7efe4; z-index: 1; }
.hv-brand { font-style: italic; font-size: 13px; }
.hv-sub { font-size: 10px; opacity: .85; margin-top: 2px; }
.hv-hl { font-size: 14px; margin-top: 6px; }
.hv-tip { font-size: 10px; margin-top: 6px; opacity: .85; }
.hv-cap {
  position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1;
  text-align: center; color: #fff; font-size: 11px;
  background: rgba(70,48,32,.38); border-radius: 99px; padding: 6px;
}
.hv-hero .pv-ov {
  z-index: 3;
  left: calc(40 * var(--rpx));
  right: calc(40 * var(--rpx));
}
.hv-hero .pv-ov-bl,
.hv-hero .pv-ov-br,
.hv-hero .pv-ov-bottom { bottom: calc(88 * var(--rpx)); }
.hv-hero .pv-ov-center { top: 52%; }
.hv-dots { position: absolute; left: 0; right: 0; bottom: calc(16 * var(--rpx)); text-align: center; z-index: 3; pointer-events: none; }
.hv-dots i {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.4); margin: 0 2px; vertical-align: middle;
}
.hv-dots i.on { background: #fff; }
.hv-sheet {
  background: #fff;
  border-radius: calc(40 * var(--rpx)) calc(40 * var(--rpx)) 0 0;
  margin-top: calc(-40 * var(--rpx));
  position: relative;
  z-index: 4;
  padding: calc(32 * var(--rpx)) calc(40 * var(--rpx)) calc(80 * var(--rpx));
  flex-shrink: 0;
  box-sizing: border-box;
}
.hv-user { display: flex; align-items: center; gap: calc(24 * var(--rpx)); font-size: calc(24 * var(--rpx)); margin-bottom: calc(32 * var(--rpx)); }
.hv-user i { width: calc(88 * var(--rpx)); height: calc(88 * var(--rpx)); border-radius: 50%; border: 2px solid #111; display: block; flex-shrink: 0; }
.hv-user b { display: block; font-size: calc(32 * var(--rpx)); }
.hv-user span { display: block; color: #c45c26; font-size: calc(20 * var(--rpx)); margin-top: calc(8 * var(--rpx)); }
.hv-user em { margin-left: auto; color: #999; font-style: normal; font-size: calc(22 * var(--rpx)); }
.hv-tiles { display: flex; align-items: stretch; padding: calc(8 * var(--rpx)) 0 calc(24 * var(--rpx)); }
.hv-tile { flex: 1; min-width: 0; text-align: center; }
.hv-tile img, .hv-tile-ph {
  width: calc(160 * var(--rpx));
  height: calc(160 * var(--rpx));
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
.hv-tile-ph { background: #1a1a1a; transform: rotate(45deg); width: calc(56 * var(--rpx)); height: calc(56 * var(--rpx)); margin-top: calc(52 * var(--rpx)); margin-bottom: calc(52 * var(--rpx)); }
.hv-tile-ph.ring {
  transform: none;
  width: calc(160 * var(--rpx));
  height: calc(160 * var(--rpx));
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 18%, #1a1a1a 19% 22%, #fff 23%);
}
.hv-tile b { display: block; margin-top: calc(8 * var(--rpx)); font-size: calc(32 * var(--rpx)); line-height: calc(44 * var(--rpx)); }
.hv-split { width: 1px; flex-shrink: 0; background: #eee; margin: calc(16 * var(--rpx)) 0; }
.hv-icons { display: flex; justify-content: space-around; font-size: calc(22 * var(--rpx)); color: #333; padding: calc(8 * var(--rpx)) 0 calc(32 * var(--rpx)); }
.hv-story {
  margin: 0 0 calc(24 * var(--rpx));
  padding: calc(28 * var(--rpx)) calc(24 * var(--rpx)) calc(24 * var(--rpx));
  border-radius: calc(28 * var(--rpx));
  background: #fff;
  box-shadow: 0 4px 14px rgba(43, 36, 28, 0.06);
  box-sizing: border-box;
}
.hv-st { font-size: calc(32 * var(--rpx)); font-weight: 700; line-height: calc(44 * var(--rpx)); margin-bottom: calc(16 * var(--rpx)); }
.hv-story img, .hv-sph {
  width: 100%;
  height: calc(280 * var(--rpx));
  border-radius: calc(20 * var(--rpx));
  object-fit: cover;
  display: block;
}
.hv-sph.a { background: linear-gradient(160deg, #efe4d6, #7a4e8a); }
.hv-sph.b { background: linear-gradient(90deg, #f3d5c4, #c5d9b0, #ead9b0); }
.pv-phone {
  --pv-w: 300px;
  --rpx: calc(var(--pv-w) / 750);
  width: 320px;
  background: #1f1a16;
  border-radius: 36px;
  padding: 10px 10px 18px;
  box-shadow: 0 16px 40px rgba(43, 36, 28, 0.18);
}
.pv-status { color: #eee; text-align: center; font-size: 11px; padding: 4px 0 8px; letter-spacing: 1px; }
.pv-screen {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  width: 100%;
  height: calc(var(--pv-w) * 844 / 390);
  display: flex;
  flex-direction: column;
}
.hv-screen { overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.hv-screen::-webkit-scrollbar,
.pv-body::-webkit-scrollbar { display: none; }
.pv-nav {
  height: 44px;
  background: #2b241c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.pv-body { flex: 1; min-height: 0; overflow: auto; background: #fff; padding-bottom: 16px; scrollbar-width: none; }
.pv-empty { color: #9a8f84; text-align: center; padding: 48px 16px; font-size: 13px; }
.pv-block { position: relative; }
.pv-block.off { opacity: 0.45; }
.pv-off {
  position: absolute; right: 18px; top: 10px; z-index: 3;
  font-size: 10px; background: #2b241c; color: #fff; padding: 2px 6px; border-radius: 4px;
}
.pv-card { margin: 0 12px 12px; padding: 16px; }
.pv-h { font-size: 16px; font-weight: 600; }
.pv-p { margin-top: 8px; color: #6b645c; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.pv-pad { padding: 0 12px 12px; display: flex; flex-wrap: wrap; }
.pv-pad.align-left { justify-content: flex-start; }
.pv-pad.align-center { justify-content: center; }
.pv-pad.align-right { justify-content: flex-end; }
.pv-btn {
  display: inline-block; padding: 6px 16px; font-size: 13px; margin: 0 8px 8px 0; line-height: 1.4;
}
.pv-row { display: flex; gap: 10px; padding: 0 12px 12px; }
.pv-mini { flex: 1; padding: 14px 12px; border: 1px solid #f0eae3; border-radius: 14px; }
.pv-t { font-size: 14px; font-weight: 600; }
.pv-d { margin-top: 4px; font-size: 12px; color: #8a8178; }
.pv-hero {
  margin: calc(24 * var(--rpx));
  height: calc(320 * var(--rpx));
  border-radius: calc(28 * var(--rpx));
  overflow: hidden;
  position: relative;
  background: #cfc8bf;
}
.pv-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-ph {
  height: 100%; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(160deg, #6f655c, #d8d0c6); font-size: 13px;
}
.pv-ov { position: absolute; z-index: 2; display: flex; gap: 4px; left: calc(24 * var(--rpx)); right: calc(24 * var(--rpx)); }
.pv-ov-bl { bottom: calc(24 * var(--rpx)); justify-content: flex-start; }
.pv-ov-center { top: 50%; transform: translateY(-50%); justify-content: center; }
.pv-ov-br { bottom: calc(24 * var(--rpx)); justify-content: flex-end; }
.pv-ov-bottom { bottom: calc(24 * var(--rpx)); justify-content: center; }
.pv-swiper { position: relative; }
.pv-slide { display: none; }
.pv-slide.on { display: block; }
.pv-dots { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; z-index: 2; pointer-events: none; }
.pv-dots i {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff8; margin: 0 3px;
}
.pv-dots i.on { background: #fff; }
.pv-grid { display: flex; flex-wrap: wrap; margin-top: 10px; }
.pv-cell { width: 25%; text-align: center; padding: 0 4px 8px; box-sizing: border-box; }
.pv-pic {
  width: 48px; height: 48px; border-radius: 50%; display: block; margin: 0 auto; object-fit: cover; background: #eee;
}
.pv-pn { margin-top: 4px; font-size: 11px; }
.pv-ps { font-size: 10px; color: #8a8178; }
.pv-space { margin: 0 12px; }
@media (max-width: 980px) {
  .decorate-layout { grid-template-columns: 1fr; }
  .phone-col { position: static; }
}
.form.tpl-form { max-width: none; }
.tpl-editor {
  display: grid;
  grid-template-columns: minmax(260px, 440px) minmax(240px, 420px);
  gap: 24px;
  align-items: start;
}
.tpl-stage {
  position: relative;
  width: 100%;
  background: #221e1a;
  border-radius: 12px;
  overflow: hidden;
  user-select: none;
}
.tpl-stage.is-11 { aspect-ratio: 1 / 1; }
.tpl-stage.is-34 { aspect-ratio: 3 / 4; }
.tpl-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.tpl-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #9a8f84; font-size: 14px; padding: 24px; text-align: center;
}
.tpl-fit {
  position: absolute;
  overflow: visible;
}
.tpl-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tpl-svg ellipse {
  fill: none;
  stroke: #c45c26;
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}
.tpl-svg .bead { fill: #e8c9a0; stroke: #c45c26; stroke-width: 0.8; }
.tpl-hit {
  position: absolute; inset: 0;
  cursor: grab;
}
.tpl-hit:active { cursor: grabbing; }
.tpl-fields { display: grid; gap: 12px; }
.tpl-fields .range {
  display: grid;
  grid-template-columns: 84px 1fr 4.8em;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.tpl-fields .range b { font-weight: 600; min-width: 3em; }
.tpl-fields .range input[type="number"] { width: 4.6em; padding: 4px 6px; text-align: right; }
@media (max-width: 900px) {
  .tpl-editor { grid-template-columns: 1fr; }
}
.anchor-picker { display: grid; gap: 8px; max-width: 360px; }
.anchor-picker .range { display: grid; grid-template-columns: 72px 1fr 4.8em; gap: 8px; align-items: center; font-size: 13px; }
.anchor-picker .range b { font-weight: 600; min-width: 2.8em; text-align: right; }
.anchor-picker .range input[type="number"] {
  width: 4.6em; padding: 4px 6px; text-align: right;
}
.anchor-box {
  position: relative;
  width: 240px;
  height: 240px;
  overflow: hidden;
  border: 0;
  outline: none;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  --ax: 50%;
  --ay: 50%;
  --cs: 1;
  --cx: 0.5;
  --cy: 0.5;
  --fill: 1.38;
  background: #f3ebe3;
  box-shadow: none;
}
.anchor-box.dir { border-radius: 18%; clip-path: none; }
.anchor-box .bead-body {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.anchor-box img {
  position: absolute;
  width: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  height: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  left: calc(50% - var(--cx, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  top: calc(50% - var(--cy, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  max-width: none;
  display: block;
  object-fit: cover;
  pointer-events: none;
}
.anchor-box.is-empty img { visibility: hidden; }
.hole-capsule,
.anchor-mask {
  display: none;
}
.anchor-hit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  cursor: crosshair;
  z-index: 4;
  touch-action: none;
}
.anchor-box.dir .anchor-hit { border-radius: 18%; }
.anchor-dot {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px solid #fff; background: #c45c26; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1px #c45c26, 0 1px 4px #0004;
  z-index: 2;
}
.login-body { display: grid; place-items: center; background: #2b241c; }
.login-box {
  width: min(360px, calc(100% - 32px)); background: #fff; padding: 28px; border-radius: 12px; display: grid; gap: 12px;
}
.login-box h1 { margin: 0; font-size: 22px; }
.login-box p { margin: 0 0 8px; color: #888; }
.login-box button { background: #c45c26; color: #fff; border: 0; padding: 10px; border-radius: 8px; cursor: pointer; }
.diy { display: grid; grid-template-columns: 260px minmax(0, 1fr) 200px; gap: 20px; align-items: start; grid-auto-flow: dense; }
.tray { display: contents; }
.tray-beads,
.tray-acc {
  background: #fff; border: 1px solid #e6ddd3; border-radius: 12px; padding: 12px; min-width: 0;
  grid-column: 1;
}
.tray-beads { grid-row: 1; }
.tray-acc { grid-row: 2; }
.tray h4, .tray-beads h4, .tray-acc h4 { margin: 0 0 10px; }
.diy-main { grid-column: 2; grid-row: 1 / span 2; min-width: 0; overflow: hidden; }
.wrist-tools {
  grid-column: 3;
  grid-row: 1 / span 2;
  background: #fff; border: 1px solid #e6ddd3; border-radius: 12px; padding: 12px;
  display: grid; gap: 10px; align-content: start; min-width: 0;
}
.wrist-tools h4 { margin: 0; }
.wrist-tools label { display: grid; gap: 4px; font-size: 13px; color: #5c534c; }
.wrist-tools input {
  width: 100%; padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 6px; font: inherit;
}
.wrist-tools .hint { margin: 0; }
.wrist-tools .btn { justify-self: start; }
.stage {
  position: relative; width: min(560px, 100%); max-width: 100%; aspect-ratio: 1; margin: 0 auto;
  background: radial-gradient(circle at 50% 50%, #faf6f1 0%, #f3ebe3 72%);
  border-radius: 16px; border: 1px solid #e6ddd3; touch-action: none; user-select: none;
  overflow: hidden;
  contain: layout paint;
  overflow-anchor: none;
}
.stage.drop-ready::before,
.stage.drop-ready::after {
  content: "删除";
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 38%;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl;
  letter-spacing: 0.2em;
  color: #c45c26; font-size: 11px; font-weight: 600;
  background: #c45c2618; border-radius: 8px;
  pointer-events: none; z-index: 8;
}
.stage.drop-ready::before { left: 6px; }
.stage.drop-ready::after { right: 6px; }
.stage .item.drop-side { opacity: 0.72; }
.cord { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.stage .item {
  position: absolute; margin: 0; padding: 0; border: 0; outline: none;
  -webkit-appearance: none; appearance: none;
  cursor: grab; overflow: visible; box-shadow: none;
  z-index: 2; border-radius: 50%;
  --ax: 50%; --ay: 50%;
  --cs: 1; --cx: 0.5; --cy: 0.5; --fill: 1.38;
  background: transparent;
  font-size: 0; line-height: 0;
  will-change: left, top;
}
.stage .item.flying,
.stage .item.rolling {
  z-index: 7;
  pointer-events: none;
}
.stage .item.leaving {
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.stage .item.tossing {
  z-index: 9;
  pointer-events: none;
  opacity: 1;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.stage .item .bead-body {
  position: absolute; inset: 0;
  overflow: hidden;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}
.stage .item.dir { border-radius: 18%; }
.stage .item.dir .bead-body { border-radius: 18%; clip-path: none; }
.stage .item.acc { border-radius: 0; overflow: visible; --fill: 1; }
.stage .item.acc .bead-body {
  overflow: visible; border-radius: 0; clip-path: none; background: transparent;
}
.chip .dot.acc {
  overflow: visible; border-radius: 0; clip-path: none; --fill: 1;
}
.stage .item.selected { outline: none; }
.stage .item img {
  position: absolute;
  width: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  height: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  left: calc(50% - var(--cx, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  top: calc(50% - var(--cy, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  max-width: none;
  display: block; object-fit: cover; pointer-events: none;
}
.stage .fill {
  width: 100%; height: 100%; display: block; pointer-events: none; border-radius: inherit;
}
.bead.dir { border-radius: 8px; }
.stage .empty {
  position: absolute; inset: 0; display: grid; place-items: center; color: #9a8f84; font-size: 14px;
  pointer-events: none; z-index: 0;
}
.stage .empty[hidden] { display: none !important; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cat {
  border: 1px solid #e6ddd3; background: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.cat.on { background: #409eff; border-color: #409eff; color: #fff; }
.palette { display: flex; flex-direction: column; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid #e6ddd3; background: #fff; border-radius: 8px; cursor: pointer; text-align: left;
}
.chip .dot {
  width: 28px; height: 28px; border-radius: 50%; flex: none; border: 0;
  overflow: hidden; position: relative;
  clip-path: circle(50% at 50% 50%);
  --cs: 1; --cx: 0.5; --cy: 0.5; --fill: 1.38;
}
.chip .dot img {
  position: absolute;
  width: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  height: calc(var(--cs, 1) * var(--fill, 1) * 100%);
  left: calc(50% - var(--cx, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  top: calc(50% - var(--cy, 0.5) * var(--cs, 1) * var(--fill, 1) * 100%);
  max-width: none; object-fit: cover; display: block;
}
.chip span { flex: 1; }
.chip b { font-weight: 600; }
.stage-spin {
  position: absolute; left: 8px; right: 8px; top: 8px; height: 36px;
  z-index: 8; display: grid; place-items: center;
  border-radius: 10px; border: 1px dashed #d4c6b6;
  background: #fff8; color: #8a7d72; font-size: 12px;
  cursor: grab; touch-action: none; user-select: none;
}
.stage-spin:active { cursor: grabbing; background: #fff; }
.circ-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 14px;
  width: min(560px, 100%); margin: 0 auto 8px; padding: 8px 12px;
  background: #fff; border: 1px solid #e6ddd3; border-radius: 10px;
  font-size: 16px; font-weight: 600; color: #3a342e; box-sizing: border-box;
}
.circ-bar .circ-main b { font-size: 20px; font-variant-numeric: tabular-nums; }
.stats { margin-top: 10px; color: #555; }
.sum { font-weight: 600; }
@media (max-width: 900px) {
  body:has(.nav-toggle:checked) { overflow: hidden; }
  .nav-burger {
    display: grid; place-items: center; margin-right: auto;
    width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
  }
  .nav-burger span,
  .nav-burger span::before,
  .nav-burger span::after {
    display: block; width: 18px; height: 2px; background: #333; position: relative;
  }
  .nav-burger span::before,
  .nav-burger span::after { content: ""; position: absolute; left: 0; }
  .nav-burger span::before { top: -6px; }
  .nav-burger span::after { top: 6px; }
  .nav-mask {
    display: none; position: fixed; inset: 0; background: #0006; z-index: 30;
  }
  .nav-toggle:checked ~ .nav-mask { display: block; }
  .side {
    width: min(240px, 86vw);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .nav-toggle:checked ~ .side { transform: translateX(0); }
  .shell { margin-left: 0; }
  .top { padding: 0 12px; }
  .main { padding: 12px; }
  .card-head { flex-wrap: wrap; gap: 8px; }
  .diy { grid-template-columns: 1fr; gap: 12px; }
  .diy > * { min-width: 0; }
  .tray {
    display: grid; gap: 14px; min-width: 0;
    background: #fff; border: 1px solid #e6ddd3; border-radius: 12px; padding: 12px;
  }
  .tray-beads, .diy-main, .wrist-tools { grid-column: auto; grid-row: auto; }
  .wrist-tools { order: -1; }
  .tray-beads, .wrist-tools { background: none; border: 0; padding: 0; border-radius: 0; }
  .wrist-tools { padding-bottom: 4px; border-bottom: 1px solid #eee4da; }
  .wrist-tools input { font-size: 16px; }
  .stage { width: 100%; }
  .btn { min-height: 40px; padding: 10px 14px; }
  .cat { min-height: 36px; padding: 8px 12px; }
  .chip { min-height: 44px; }
  .chip span { min-width: 0; overflow-wrap: anywhere; }
  .ops { gap: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .form { max-width: none; }
  .form input, .form select, .main select { font-size: 16px; }
  .size-row { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
