:root {
  --bg: #f8f3ee;
  --paper: #fffdfb;
  --ink: #2a2230;
  --muted: #7a6f7e;
  --line: #ebe1da;
  --rose: #c2577a;
  --rose-deep: #9d3d5f;
  --rose-soft: #f8e1e8;
  --plum: #5b3a5e;
  --plum-soft: #ece2ef;
  --sage: #3f8a72;
  --sage-soft: #dcefe7;
  --amber: #b97a12;
  --amber-soft: #fbefd6;
  --sky: #3f74b0;
  --sky-soft: #e0ecf8;
  --shadow: 0 18px 40px rgba(64, 38, 58, 0.10);
  --shadow-sm: 0 6px 16px rgba(64, 38, 58, 0.08);
  --radius: 20px;
  --serif: "Noto Serif TC", Georgia, serif;
  --sans: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(248, 243, 238, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(235, 225, 218, 0.8);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: .28em; color: var(--ink); }
.brand-divider { width: 1px; height: 18px; background: #d9cdc5; }
.brand-app { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.demo-tag {
  font-size: 12px; font-weight: 700; color: var(--rose-deep); background: var(--rose-soft);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.lang-toggle { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-toggle button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted);
  transition: background .2s, color .2s;
}
.lang-toggle button.active { background: var(--ink); color: #fff; }

.ghost-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  transition: border-color .2s, transform .15s;
}
.ghost-btn:hover { border-color: var(--rose); }
.ghost-btn:active { transform: scale(.97); }

/* ---------- hero ---------- */
.hero {
  max-width: 1240px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 40px) 24px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
}
.eyebrow { color: var(--rose); font-weight: 700; letter-spacing: .08em; font-size: 13px; margin-bottom: 12px; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.22; letter-spacing: .01em; }
.hero-sub { margin-top: 16px; color: var(--muted); font-size: 16px; max-width: 560px; }
.hero-ctas { display: grid; gap: 12px; margin-top: 26px; max-width: 560px; }
.cta-card {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--rose); }
.cta-num { flex: none; width: 36px; font-family: var(--serif); font-weight: 600; font-size: 22px; color: #b9aaa3; letter-spacing: .02em; }
.cta-card.join .cta-num { color: var(--rose); }
.cta-card.shop .cta-num { color: var(--sage); }
.cta-body { flex: 1; min-width: 0; }
.cta-body strong { display: block; font-size: 16px; }
.cta-body small { display: block; color: var(--muted); font-size: 13px; }
.cta-arrow { width: 20px; height: 20px; color: var(--ink); transition: transform .2s; }
.cta-arrow svg { width: 100%; height: 100%; display: block; }
.cta-card:hover .cta-arrow { transform: translateX(4px); }

/* hero map */
.hero-map { position: relative; border-radius: 28px; min-height: 460px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 28px; background: #e9dfd4; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px; background: rgba(255, 253, 251, .96);
  border: 1px solid rgba(235, 225, 218, .9); border-radius: 16px; padding: 11px 14px; box-shadow: 0 14px 34px rgba(42, 34, 48, .16);
  animation: floatY 6s ease-in-out infinite;
}
.float-card small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.float-card strong { display: block; font-size: 15px; font-weight: 800; }
.float-card div > span { display: block; font-size: 11.5px; color: var(--sage); font-weight: 700; }
.fc-app { left: -22px; top: 46px; animation-delay: -1s; }
.fc-order { right: -18px; top: 44%; animation-delay: -3s; }
.fc-order strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.fc-order div > span { color: var(--rose-deep); }
.fc-stock { left: 26px; bottom: 26px; font-size: 12.5px; font-weight: 700; color: var(--amber); animation-delay: -4.5s; }
.fc-stock .ic { width: 18px; height: 18px; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.map-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 0; }
.map-track + .map-hub { margin: 6px 0; }
.map-track .rail {
  position: absolute; left: 12.5%; right: 12.5%; top: 34px; height: 3px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
}
.map-track .runner {
  position: absolute; top: 28px; left: 12.5%; width: 15px; height: 15px; border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(194, 87, 122, .18);
  animation: run 5.2s cubic-bezier(.6,0,.4,1) infinite;
}
.map-track.join .runner { background: var(--rose); }
.map-track.shop .runner { background: var(--sage); box-shadow: 0 0 0 5px rgba(63, 138, 114, .2); animation-delay: -2.6s; }
@keyframes run {
  0% { left: 12.5%; opacity: 0; transform: scale(.4); }
  6% { opacity: 1; transform: scale(1); }
  30% { left: 37.5%; }
  36% { left: 37.5%; }
  60% { left: 62.5%; }
  66% { left: 62.5%; }
  92% { left: 87.5%; opacity: 1; transform: translateX(-100%) scale(1); }
  100% { left: 87.5%; opacity: 0; transform: translateX(-100%) scale(.4); }
}
.map-node { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; text-align: center; }
.map-node .ico {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 24px;
  animation: bob 5.2s ease-in-out infinite;
}
.map-track .map-node:nth-child(4) .ico { animation-delay: .3s; }
.map-track .map-node:nth-child(5) .ico { animation-delay: 1.5s; }
.map-track .map-node:nth-child(6) .ico { animation-delay: 2.7s; }
.map-track .map-node:nth-child(7) .ico { animation-delay: 3.9s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); } 88% { transform: translateY(-5px); } }
.map-node span { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.map-track.join .map-node .ico { color: var(--rose-deep); }
.map-track.shop .map-node .ico { color: var(--sage); }
.map-row-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; margin-bottom: 2px; }
.map-row-title.join { color: var(--rose); }
.map-row-title.shop { color: var(--sage); }
.map-hub {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 16px;
  background: linear-gradient(120deg, var(--plum-soft), var(--rose-soft)); font-weight: 800; color: var(--plum);
  font-size: 14px;
}
.map-hub .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--plum); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(91, 58, 94, .45); } 100% { box-shadow: 0 0 0 12px rgba(91, 58, 94, 0); } }

/* ---------- playground ---------- */
.playground { max-width: 1240px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 40px; scroll-margin-top: 70px; }
.system-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px; box-shadow: var(--shadow-sm);
}
.system-switch button {
  position: relative; z-index: 1; border: 0; background: transparent; padding: 11px 10px; border-radius: 999px;
  font-weight: 800; font-size: 15px; color: var(--muted); transition: color .3s; white-space: nowrap;
}
.system-switch button b {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px;
  background: var(--line); color: var(--muted); margin-right: 4px; transition: background .3s, color .3s;
}
.system-switch button.active { color: #fff; }
.system-switch button.active b { background: rgba(255,255,255,.25); color: #fff; }
.switch-indicator {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px;
  background: var(--ink);
  transition: transform .45s cubic-bezier(.6,.05,.3,1.2), background .45s;
}
.system-switch[data-system="shop"] .switch-indicator { transform: translateX(100%); }

/* guide */
.guide {
  margin: 18px auto 18px; max-width: 980px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.guide-head strong { font-size: 14px; }
.guide-bar { height: 6px; flex: 1; max-width: 220px; background: var(--line); border-radius: 6px; overflow: hidden; }
.guide-bar i { display: block; height: 100%; background: var(--rose); border-radius: 6px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.guide[data-system="shop"] .guide-bar i { background: var(--sage); }
.guide-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gstep {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; font-size: 13px; font-weight: 700;
  color: var(--muted); background: #faf6f2; border: 1px solid transparent; transition: all .3s;
}
.gstep .gnum {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: var(--line); color: var(--muted); transition: all .3s;
}
.gstep.current { color: var(--ink); background: #fff; border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.guide[data-system="shop"] .gstep.current { border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-soft); }
.gstep.current .gnum { background: var(--rose); color: #fff; }
.guide[data-system="shop"] .gstep.current .gnum { background: var(--sage); }
.gstep.done { color: var(--sage); }
.gstep.done .gnum { background: var(--sage); color: #fff; animation: popIn .4s; }
.guide-hint { margin-top: 10px; font-size: 14px; color: var(--ink); display: flex; gap: 8px; align-items: flex-start; }
.guide-hint .hand { animation: nudge 1.2s ease-in-out infinite; display: inline-block; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.guide-hint button { margin-left: 6px; }
.link-btn { border: 0; background: none; color: var(--rose); font-weight: 800; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* mobile pane switch */
.mpane-switch { display: none; }

/* stage */
.stage { display: grid; grid-template-columns: 372px 70px minmax(0, 1fr); gap: 0; align-items: start; }
.pane-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--muted); margin: 0 0 10px 6px; }
.role-dot { width: 9px; height: 9px; border-radius: 50%; }
.role-dot.visitor { background: var(--sky); }
.role-dot.member { background: var(--plum); }

.phone {
  position: relative; width: 100%; max-width: 372px; height: 740px; margin: 0 auto;
  border-radius: 46px; background: #231c27; padding: 10px; box-shadow: 0 30px 60px rgba(42, 34, 48, .28), inset 0 0 0 2px #3a3040;
}
.phone-notch { position: absolute; top: 18px; left: 50%; width: 92px; height: 24px; border-radius: 20px; background: #000; transform: translateX(-50%); z-index: 5; }
.phone-screen {
  position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--bg);
  display: flex; flex-direction: column;
}
.screen-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 50px 16px 20px; scrollbar-width: thin; }
.screen-scroll::-webkit-scrollbar { width: 4px; }
.screen-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.wire { position: relative; align-self: stretch; display: grid; place-items: center; }
.wire-line { position: relative; width: 4px; height: 60%; margin-top: 30px; background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px); border-radius: 4px; overflow: hidden; }
.wire-line i { display: none; }
.wire-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--muted); background: var(--bg); padding: 4px 8px; border-radius: 6px;
}
.wire.pulse .wire-line { background: linear-gradient(180deg, transparent, var(--rose), transparent); background-size: 100% 40%; background-repeat: no-repeat; animation: wireflow .8s linear 2; }
.stage[data-system="shop"] .wire.pulse .wire-line { background-image: linear-gradient(180deg, transparent, var(--sage), transparent); }
@keyframes wireflow { from { background-position: 0 -40%; } to { background-position: 0 140%; } }

.dash {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
  min-height: 740px; overflow: hidden;
}
.dash-inner { padding: 22px; }

/* ---------- phone common ---------- */
.urlbar {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); margin-bottom: 12px; white-space: nowrap; overflow: hidden;
}
.urlbar b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.urlbar .lock { color: var(--sage); }
.bound-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); margin-bottom: 14px;
  animation: slideDown .5s cubic-bezier(.3,1.3,.5,1);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; color: #fff;
  background: var(--plum);
}
.avatar.admin { background: #3b4a8a; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.alt { background: #8c7a70; }
.bound-card .who { flex: 1; min-width: 0; }
.bound-card small { display: block; font-size: 11px; color: var(--rose-deep); font-weight: 700; }
.bound-card strong { display: block; font-size: 14px; }
.lock-badge { font-size: 11px; color: var(--sage); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.lock-badge svg { width: 14px; height: 14px; animation: lockSnap .6s .3s both; }
@keyframes lockSnap { 0% { transform: translateY(-4px) scale(.8); opacity: 0; } 60% { transform: translateY(1px) scale(1.15); opacity: 1; } 100% { transform: none; } }
@keyframes slideDown { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

.stepper { display: flex; gap: 4px; margin-bottom: 14px; }
.stepper .s { flex: 1; }
.stepper .s i { display: block; height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; }
.stepper .s i::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--rose); transition: width .5s ease; }
.stepper .s.done i::after, .stepper .s.cur i::after { width: 100%; }
.stepper .s.cur i::after { background: var(--rose); }
.stepper .s span { display: block; text-align: center; font-size: 10.5px; margin-top: 4px; color: var(--muted); font-weight: 600; }
.stepper .s.cur span { color: var(--rose-deep); font-weight: 800; }

.step-card { background: #fff; border-radius: 18px; padding: 14px; border: 1px solid var(--line); animation: stepIn .45s cubic-bezier(.2,.9,.3,1); }
.step-card.back { animation-name: stepBack; }
@keyframes stepIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stepBack { from { transform: translateX(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
.step-card h3 { font-size: 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.step-card h3 small { font-size: 11px; color: var(--muted); font-weight: 600; }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 11px; background: #fdfbf9; font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); background: #fff; }
.field.typing input, .field.typing select { border-color: var(--rose); background: #fff; box-shadow: 0 0 0 3px var(--rose-soft); }
.field.invalid input, .field.invalid select { border-color: #d9534f; background: #fff6f5; animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fill-btn {
  width: 100%; border: 1px solid var(--line); background: #faf6f2; color: var(--ink); border-radius: 12px;
  padding: 9px; font-weight: 700; font-size: 13px; margin-bottom: 12px; transition: transform .15s, background .2s, border-color .2s;
}
.fill-btn:hover { background: #fff; border-color: var(--ink); }
.fill-btn:disabled { opacity: .6; cursor: default; }
.nav-row { display: flex; gap: 8px; margin-top: 12px; }
.primary-btn {
  flex: 1; border: 0; border-radius: 13px; padding: 12px 14px; font-weight: 800; font-size: 14.5px; color: #fff;
  background: var(--ink); box-shadow: none;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.primary-btn:hover { background: #40354a; }
.primary-btn:active { transform: scale(.97); }
.primary-btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.primary-btn.green { background: var(--sage); }
.primary-btn.green:hover { background: #357562; }
.secondary-btn { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 12px 14px; font-weight: 700; font-size: 14px; }

.doc-list { display: grid; gap: 8px; margin-bottom: 12px; }
.doc-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fdfbf9; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .25s; user-select: none;
}
.doc-item input { position: absolute; opacity: 0; pointer-events: none; }
.doc-item .box {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid #d8ccc5; display: grid; place-items: center; flex: none; transition: all .25s;
}
.doc-item .box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; fill: none; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .3s .05s; }
.doc-item.on { border-color: var(--sage); background: var(--sage-soft); }
.doc-item.on .box { background: var(--sage); border-color: var(--sage); }
.doc-item.on .box svg { stroke-dashoffset: 0; }
.doc-item.invalid { border-color: #d9534f; animation: shake .4s; }

/* success */
.success { text-align: center; padding: 40px 10px 10px; animation: stepIn .5s; }
.check-circle { width: 96px; height: 96px; margin: 0 auto 18px; }
.check-circle circle { fill: none; stroke: var(--sage); stroke-width: 5; stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw .7s forwards; }
.check-circle path { fill: none; stroke: var(--sage); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .45s .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h3 { font-family: var(--serif); font-size: 24px; margin-bottom: 8px; }
.success p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.sent-pill {
  display: inline-flex; align-items: center; gap: 6px; background: var(--sage-soft); color: var(--sage); font-weight: 800; font-size: 12.5px;
  padding: 7px 12px; border-radius: 999px; margin-bottom: 20px; animation: popIn .5s 1s both;
}
@keyframes popIn { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- dashboard common ---------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-title h2 { font-family: var(--serif); font-size: 20px; }
.role-chip { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--plum-soft); color: var(--plum); margin-top: 2px; }
.role-chip.admin { background: #e6e9f6; color: #3b4a8a; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.kpi small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi strong { display: block; font-size: 24px; font-weight: 900; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi.rose strong { color: var(--rose-deep); }
.kpi.sage strong { color: var(--sage); }
.kpi.amber strong { color: var(--amber); }

.link-card {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; margin-bottom: 16px;
  background: #fbf8f5; border: 1px solid var(--line);
}
.link-card small { display: block; font-size: 12px; font-weight: 800; color: var(--plum); margin-bottom: 6px; }
.link-field { display: flex; gap: 6px; }
.link-field code {
  flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.copy-btn {
  border: 0; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.copy-btn:active { transform: scale(.95); }
.copy-btn.ok { background: var(--sage); }
.qr { width: 74px; height: 74px; background: #fff; border-radius: 10px; padding: 5px; border: 1px solid var(--line); }
.qr rect { fill: var(--ink); }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kcol { background: #faf5f1; border-radius: 16px; padding: 10px; min-height: 170px; border: 1px solid transparent; transition: border-color .3s, background .3s; }
.kcol.glow { border-color: var(--rose); background: #fff4f7; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 800; margin-bottom: 8px; }
.kcol-head .count { background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.kcol[data-col="needs_sponsor"] .kcol-head { color: var(--amber); }
.kcol[data-col="ready"] .kcol-head { color: var(--sky); }
.kcol[data-col="submitted"] .kcol-head { color: var(--sage); }
.kcard {
  display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 10px;
  margin-bottom: 8px; box-shadow: 0 2px 6px rgba(64, 38, 58, .05); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #e3c7d1; }
.kcard .kc-top { display: flex; align-items: center; gap: 8px; }
.kcard strong { font-size: 13.5px; display: block; }
.kcard .meta { font-size: 11px; color: var(--muted); }
.kcard .kc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; }
.mini-pill { display: inline-block; padding: 2px 7px; border-radius: 999px; font-weight: 700; font-size: 10.5px; white-space: nowrap; }
.mini-pill.amber { background: var(--amber-soft); color: var(--amber); }
.mini-pill.sage { background: var(--sage-soft); color: var(--sage); }
.mini-pill.sky { background: var(--sky-soft); color: var(--sky); }
.mini-pill.rose { background: var(--rose-soft); color: var(--rose-deep); }
.new-badge { background: var(--rose); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-left: auto; animation: popIn .5s; }
.kcard.flash { animation: flashCard 1.6s ease; }
@keyframes flashCard { 0% { transform: scale(.8); opacity: 0; box-shadow: 0 0 0 0 rgba(194, 87, 122, .5); } 25% { transform: scale(1.04); opacity: 1; } 60% { box-shadow: 0 0 0 10px rgba(194, 87, 122, 0); } 100% { transform: none; } }
.kempty { font-size: 12px; color: #b5a9b0; text-align: center; padding: 18px 4px; border: 1.5px dashed #e9dcd6; border-radius: 12px; }

.sub-panel { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.sub-panel h3 { font-size: 15px; }
.sub-panel .hint { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.sponsor-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 10px; }
.sponsor-form input { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; min-width: 0; background: #fdfbf9; }
.sponsor-form input:focus { outline: none; border-color: var(--plum); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.s-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 999px; background: var(--plum-soft);
  font-size: 13px; font-weight: 700; color: var(--plum); animation: popIn .4s;
}
.s-chip small { font-weight: 600; color: var(--muted); }
.s-chip button { border: 0; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--muted); font-size: 13px; line-height: 1; }
.s-chip button:hover { color: #d9534f; }

/* drawer */
.drawer-backdrop { position: absolute; inset: 0; background: rgba(42, 34, 48, .28); opacity: 0; pointer-events: none; transition: opacity .35s; z-index: 10; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); z-index: 11;
  transform: translateX(105%); transition: transform .45s cubic-bezier(.2,.9,.3,1); box-shadow: -20px 0 40px rgba(42, 34, 48, .15);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer.open ~ .drawer-backdrop, .drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head .who { flex: 1; min-width: 0; }
.drawer-head h3 { font-size: 18px; }
.close-btn { border: 0; width: 34px; height: 34px; border-radius: 50%; background: #f1e9e4; font-size: 18px; line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.d-sec { margin-bottom: 18px; }
.d-sec h4 { font-size: 13.5px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.d-sec .hint { font-size: 12.5px; color: var(--muted); margin: -4px 0 8px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chk {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; padding: 7px 9px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line); opacity: 0; transform: translateY(6px); animation: chkIn .35s forwards;
}
@keyframes chkIn { to { opacity: 1; transform: none; } }
.chk .ci { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; flex: none; }
.chk.ok .ci { background: var(--sage); }
.chk.bad { border-color: #f1d49c; background: var(--amber-soft); }
.chk.bad .ci { background: var(--amber); }
.sponsor-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 12px; font-size: 13px; font-weight: 700; text-align: left;
  transition: all .2s;
}
.pick small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.pick:hover { border-color: var(--plum); }
.pick.on { border-color: var(--sage); background: var(--sage-soft); color: var(--sage); }
.locked-note { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 700; }

.mock-browser { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; margin-bottom: 10px; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #f3eee9; font-size: 11px; color: var(--muted); font-weight: 700; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #e0d4cc; display: inline-block; }
.mock-bar span { margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; }
.mock-field { border: 1px solid #ece5df; border-radius: 8px; padding: 4px 7px; min-height: 36px; transition: all .25s; }
.mock-field small { display: block; font-size: 9.5px; color: #a89ca3; font-weight: 700; }
.mock-field b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.mock-field.active { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-soft); }
.mock-field.filled { background: #f6fbf8; border-color: #cfe7dc; }
.progress-line { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.progress-line .bar { flex: 1; height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress-line .bar i { display: block; height: 100%; width: 0; background: var(--sky); transition: width .25s; border-radius: 6px; }
.copy-rows { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.copy-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #f2ebe6; background: #fff; transition: background .25s; }
.copy-row:last-child { border-bottom: 0; }
.copy-row .idx { font-size: 10.5px; color: #b5a9b0; font-weight: 800; font-variant-numeric: tabular-nums; }
.copy-row .lbl { font-size: 11px; color: var(--muted); font-weight: 700; display: block; }
.copy-row .val { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.copy-row.active { background: var(--sky-soft); }
.copy-row.done .idx { color: var(--sage); }
.mini-copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; transition: all .2s; }
.mini-copy.ok { background: var(--sage); border-color: var(--sage); color: #fff; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; background: #fff; }
.drawer-foot .primary-btn { flex: 1; }

/* ---------- shop phone ---------- */
.shop-hero {
  border-radius: 16px; margin-bottom: 12px; color: #fff; min-height: 150px; display: flex; align-items: flex-end;
  background-color: #b48a5c; background-size: cover; background-position: center 40%;
  position: relative; overflow: hidden; animation: slideDown .5s cubic-bezier(.3,1.3,.5,1);
}
.shop-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 22, 18, 0) 20%, rgba(30, 22, 18, .72)); }
.shop-hero-in { position: relative; padding: 12px 14px; }
.shop-hero small { display: block; font-size: 11px; opacity: .9; font-weight: 600; }
.shop-hero strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: .2em; }
.shop-hero p { font-size: 11.5px; margin-top: 4px; opacity: .92; }
.shop-hero code { background: rgba(255,255,255,.2); padding: 1px 6px; border-radius: 6px; font-weight: 800; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  transition: all .25s;
}
.cat.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 70px; }
.pcard {
  background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column;
  animation: cardIn .45s both cubic-bezier(.2,.9,.3,1); position: relative;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.pcard .art-wrap { border-radius: 12px; aspect-ratio: 1 / 1; overflow: hidden; background: #efe8e1; }
.pcard .art { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.pcard:hover .art { transform: scale(1.05); }
.pcard .pname { font-size: 12.5px; font-weight: 700; line-height: 1.35; margin: 7px 2px 2px; min-height: 34px; }
.pcard .pfoot { display: flex; align-items: center; justify-content: space-between; margin: 0 2px; }
.pcard .pprice { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; border-radius: 6px; transition: background .3s; padding: 0 2px; margin-left: -2px; }
.pcard .pprice.flash { animation: priceFlash 1.2s; }
@keyframes priceFlash { 0% { background: #ffe58a; } 100% { background: transparent; } }
.add-btn {
  width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--ink); color: #fff; font-size: 19px; line-height: 1; display: grid; place-items: center;
  transition: transform .15s, background .2s;
}
.add-btn:hover { background: var(--sage); }
.add-btn:active { transform: scale(.88); }
.pcard .in-cart { position: absolute; top: 12px; right: 12px; background: var(--sage); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; animation: popIn .35s; }

.cart-fab {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6; display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 18px; padding: 11px 14px; background: var(--ink); color: #fff; box-shadow: 0 12px 26px rgba(42, 34, 48, .35);
  transition: transform .25s;
}
.cart-fab.bump { animation: bump .45s; }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.06); } }
.cart-fab .cico { position: relative; font-size: 18px; }
.cart-fab .badge {
  position: absolute; top: -8px; right: -10px; background: var(--rose); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px;
}
.cart-fab .ctxt { flex: 1; text-align: left; font-weight: 700; font-size: 14px; }
.cart-fab .ctot { font-weight: 900; font-variant-numeric: tabular-nums; }

.sheet-backdrop { position: absolute; inset: 0; background: rgba(42, 34, 48, .35); z-index: 7; opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; max-height: 88%; background: var(--paper); border-radius: 26px 26px 0 0;
  transform: translateY(102%); transition: transform .45s cubic-bezier(.2,.9,.3,1); display: flex; flex-direction: column;
}
.sheet.open { transform: none; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet-grip { width: 42px; height: 5px; border-radius: 5px; background: #ddd2cb; margin: 8px auto 2px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 8px; }
.sheet-head h3 { font-size: 17px; }
.sheet-body { overflow-y: auto; padding: 0 16px 16px; }
.cart-line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0e8e2; animation: stepIn .3s; }
.cart-line .thumb { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; }
.cart-line .thumb svg { width: 90%; height: 90%; }
.cart-line strong { font-size: 13px; display: block; line-height: 1.3; }
.cart-line small { font-size: 12px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qty button { border: 0; background: none; width: 26px; height: 28px; font-size: 15px; font-weight: 700; }
.qty span { min-width: 20px; text-align: center; font-weight: 800; font-size: 13px; }
.coupon-box { margin: 12px 0; }
.coupon-box label { font-size: 12px; font-weight: 800; color: var(--muted); display: block; margin-bottom: 5px; }
.coupon-row { display: flex; gap: 6px; }
.coupon-row input { flex: 1; min-width: 0; border: 1.5px dashed #d8c3cb; border-radius: 11px; padding: 9px 11px; background: #fff; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.coupon-row input:focus { outline: none; border-color: var(--sage); border-style: solid; }
.coupon-row input.bad { border-color: #d9534f; animation: shake .4s; }
.coupon-row .copy-btn { padding: 8px 14px; }
.coupon-ok {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--sage-soft);
  color: var(--sage); font-weight: 800; font-size: 13px; animation: popIn .45s;
}
.coupon-ok button { border: 0; background: none; color: var(--sage); font-size: 16px; }
.coupon-msg { font-size: 12px; color: #c0392b; margin-top: 5px; font-weight: 600; min-height: 0; }
.totals { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.trow { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.trow.disc { color: var(--sage); font-weight: 700; }
.trow.final { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; font-size: 16px; font-weight: 900; }
.trow .strike { text-decoration: line-through; color: #b5a9b0; font-weight: 600; margin-right: 6px; font-size: 13px; }
.pay-note { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.empty-cart { text-align: center; color: var(--muted); font-size: 13.5px; padding: 28px 8px; }
.empty-cart .big { font-size: 34px; display: block; margin-bottom: 6px; }

/* fly + confetti */
.fly-chip {
  position: fixed; z-index: 9999; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 7px 11px; font-size: 12.5px; font-weight: 800; box-shadow: 0 12px 26px rgba(42, 34, 48, .25); white-space: nowrap;
}
.fly-dot { position: fixed; z-index: 9999; pointer-events: none; width: 16px; height: 16px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px rgba(194, 87, 122, .25); }
.confetti { position: fixed; z-index: 9999; pointer-events: none; width: 8px; height: 12px; border-radius: 2px; }

/* ---------- shop dashboard ---------- */
.dtabs { display: flex; gap: 4px; background: #f4ede8; padding: 4px; border-radius: 14px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.dtabs::-webkit-scrollbar { display: none; }
.dtab { border: 0; background: transparent; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; transition: all .25s; position: relative; }
.dtab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(64, 38, 58, .1); }
.dtab .dot { position: absolute; top: 5px; right: 4px; width: 7px; height: 7px; background: var(--amber); border-radius: 50%; }
.dtab.admin.active { color: #3b4a8a; }
.tab-body { animation: stepIn .35s; }
.restock {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; margin-bottom: 12px;
  background: var(--amber-soft); border: 1px solid #f1d49c;
}
.restock .rs-ico { font-size: 22px; animation: wiggle 2s infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } 95% { transform: rotate(-6deg); } }
.restock .rs-txt { flex: 1; min-width: 180px; }
.restock strong { font-size: 13.5px; color: var(--amber); display: block; }
.restock .rs-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.restock .rs-items span { background: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.restock .primary-btn { flex: none; padding: 9px 14px; font-size: 13px; }
.restock.ok { background: var(--sage-soft); border-color: #bfe0d2; }
.restock.ok strong { color: var(--sage); }
.restock.ok .rs-ico { animation: none; }
.order {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px;
  transition: border-color .3s;
}
.order.flash { animation: flashCard 1.6s ease; }
.order-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-head .oid { font-weight: 900; font-size: 13.5px; }
.order-head .ocus { font-size: 13px; font-weight: 600; }
.order-head .otime { font-size: 11.5px; color: var(--muted); }
.order-head .ototal { margin-left: auto; font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.olines { margin: 8px 0; display: grid; gap: 5px; }
.oline { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 12.5px; }
.oline .thumb { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.oline .thumb svg { width: 92%; height: 92%; }
.oline .q { color: var(--muted); font-weight: 700; }
.stock-badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; transition: all .4s; }
.stock-badge.ok { background: var(--sage-soft); color: var(--sage); }
.stock-badge.short { background: var(--amber-soft); color: var(--amber); }
.stock-badge.done { background: #eee8f0; color: var(--muted); }
.order-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 9px; }
.ostatus { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: #b5a9b0; flex: 1; min-width: 200px; }
.ostatus .st { display: flex; align-items: center; gap: 4px; }
.ostatus .st i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #ddd2cb; display: grid; place-items: center; font-style: normal; font-size: 9px; color: #fff; transition: all .3s; }
.ostatus .st.on { color: var(--sage); }
.ostatus .st.on i { background: var(--sage); border-color: var(--sage); }
.ostatus .sep { width: 14px; height: 2px; background: #e5dbd5; }
.ostatus .sep.on { background: var(--sage); }
.o-act { border: 0; border-radius: 10px; padding: 7px 12px; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--sky); transition: transform .15s; }
.o-act:active { transform: scale(.95); }
.o-act.ship { background: var(--sage); }
.o-act:disabled { background: #d9d0d4; cursor: not-allowed; }
.o-coupon { font-size: 11px; }

.inv-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1e9e4; }
.inv-row:last-child { border-bottom: 0; }
.inv-row .thumb { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.inv-row .thumb svg { width: 90%; height: 90%; }
.inv-row strong { font-size: 13px; display: block; }
.inv-bar { height: 6px; background: #f1e9e4; border-radius: 6px; margin-top: 5px; position: relative; overflow: hidden; max-width: 260px; }
.inv-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--sage); transition: width .5s cubic-bezier(.3,1.2,.5,1); }
.inv-bar i.need { background: rgba(185, 122, 18, .35); }
.inv-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; }
.inv-meta .short { color: var(--amber); font-weight: 800; }
.inv-meta .ok { color: var(--sage); font-weight: 800; }
.stepper-ctl { display: inline-flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 2px; }
.stepper-ctl button { width: 30px; height: 30px; border: 0; background: #f6f0eb; border-radius: 9px; font-size: 16px; font-weight: 800; }
.stepper-ctl span { min-width: 34px; text-align: center; font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.stepper-ctl span.bump { animation: bump .35s; }

.pb-note { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pb-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; animation: cardIn .4s both; }
.pb-card .pb-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pb-card .thumb { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.pb-card .thumb svg { width: 90%; height: 90%; }
.pb-card strong { font-size: 12.5px; line-height: 1.3; }
.tier { display: grid; grid-template-columns: 70px minmax(0, 1fr) 62px; gap: 6px; align-items: center; font-size: 11px; margin-bottom: 4px; }
.tier span { color: var(--muted); font-weight: 700; }
.tier b { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.tier .tb { height: 8px; border-radius: 6px; background: #f1e9e4; overflow: hidden; }
.tier .tb i { display: block; height: 100%; border-radius: 6px; animation: grow .8s both cubic-bezier(.3,1,.4,1); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tier.full .tb i { background: #c9bfc5; }
.tier.disc .tb i { background: var(--sage); }
.tier.mem .tb i { background: var(--rose); }

.ad-note { font-size: 12.5px; color: #3b4a8a; background: #eef0fa; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.ad-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1e9e4; }
.ad-row:last-child { border-bottom: 0; }
.ad-row .thumb { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.ad-row .thumb svg { width: 90%; height: 90%; }
.ad-row.off .thumb, .ad-row.off .ad-main { opacity: .45; }
.ad-main strong { font-size: 13px; display: block; }
.ad-slider { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ad-slider input[type="range"] { flex: 1; min-width: 0; accent-color: #3b4a8a; }
.ad-slider .mp { font-weight: 900; font-size: 13px; min-width: 64px; font-variant-numeric: tabular-nums; color: #3b4a8a; }
.ad-derived { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.ad-derived b { color: var(--ink); font-variant-numeric: tabular-nums; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #d9d0d4; border-radius: 999px; transition: background .25s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.switch input:checked + span { background: var(--sage); }
.switch input:checked + span::after { transform: translateX(18px); }
.sw-wrap { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); font-weight: 700; }

/* spotlight */
.spot { position: relative; animation: spotRing 1.6s ease-out infinite !important; }
@keyframes spotRing { 0% { box-shadow: 0 0 0 0 rgba(194, 87, 122, .55); } 100% { box-shadow: 0 0 0 12px rgba(194, 87, 122, 0); } }
.stage[data-system="shop"] .spot { animation-name: spotRingG !important; }
@keyframes spotRingG { 0% { box-shadow: 0 0 0 0 rgba(63, 138, 114, .6); } 100% { box-shadow: 0 0 0 12px rgba(63, 138, 114, 0); } }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); z-index: 9000; background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 700; box-shadow: 0 14px 30px rgba(42, 34, 48, .3);
  transition: transform .4s cubic-bezier(.3,1.3,.5,1); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* roles + footer */
.roles { max-width: 1240px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 10px; }
.roles h2 { font-family: var(--serif); font-size: 24px; text-align: center; margin-bottom: 16px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); }
.role-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: #fff; margin-bottom: 10px; }
.role-ico.admin { background: #3b4a8a; }
.role-ico.member { background: var(--plum); }
.role-ico.visitor { background: var(--sky); }
.role-card h3 { font-size: 16px; margin-bottom: 4px; }
.role-card p { font-size: 14px; color: var(--muted); }
.footer { max-width: 900px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 80px; text-align: center; color: var(--muted); font-size: 13px; }
.foot-market { margin-top: 6px; font-weight: 700; }

/* ---------- photos + line icons ---------- */
.thumb { overflow: hidden; background: #efe8e1; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }
.urlbar .lock .ic { width: 12px; height: 12px; }
.sent-pill .ic { width: 15px; height: 15px; }
.gstep .gnum .ic { width: 13px; height: 13px; }
.chk .ci .ic { width: 11px; height: 11px; stroke-width: 2.4; }
.mini-copy .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.ostatus .st i .ic { width: 10px; height: 10px; stroke-width: 2.6; }
.cart-fab .cico .ic { width: 21px; height: 21px; }
.empty-cart .ic.big { width: 34px; height: 34px; display: block; margin: 0 auto 8px; color: #c4b6ae; }
.restock .rs-ico .ic { width: 24px; height: 24px; }
.restock .rs-ico { color: var(--amber); display: grid; }
.restock.ok .rs-ico { color: var(--sage); }
.coupon-ok .ic { width: 15px; height: 15px; }
.locked-note .ic { width: 15px; height: 15px; }
.hint-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); flex: none; margin-top: 8px; }
.guide[data-system="shop"] .hint-dot { background: var(--sage); }
.hint-ok { color: var(--sage); display: grid; }
.hint-ok .ic { width: 18px; height: 18px; }
.role-num { display: block; font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--rose); margin-bottom: 8px; }
.foot-credit { margin-top: 6px; font-size: 12px; color: #a99d97; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stage { grid-template-columns: 340px 44px minmax(0, 1fr); }
  .wire-label { display: none; }
  .checks { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .guide-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .mpane-switch {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px;
    margin-bottom: 14px; position: sticky; top: 64px; z-index: 20; box-shadow: var(--shadow-sm);
  }
  .mpane-switch button { position: relative; border: 0; background: transparent; padding: 9px; border-radius: 12px; font-weight: 800; font-size: 14px; color: var(--muted); transition: all .25s; }
  .mpane-switch button.active { background: var(--ink); color: #fff; }
  .mp-dot { position: absolute; top: 7px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); display: none; animation: pulse 1.4s infinite; }
  .mp-dot.on { display: block; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .wire { display: none; }
  .stage[data-mpane="visitor"] .pane-dash, .stage[data-mpane="dash"] .pane-visitor { display: none; }
  .pane { animation: stepIn .35s; }
  .phone { height: 680px; }
  .dash { min-height: 560px; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .demo-tag, .brand-app, .brand-divider { display: none; }
  .wordmark { font-size: 16px; letter-spacing: .22em; }
  .hero-map { min-height: 340px; }
  .fc-app { left: 10px; top: 14px; }
  .fc-order { right: 10px; top: auto; bottom: 74px; }
  .fc-stock { left: 10px; bottom: 14px; }
  .hero { padding: 24px 16px 8px; gap: 22px; }
  .hero-map { padding: 18px 10px; }
  .map-node .ico { width: 44px; height: 44px; font-size: 19px; border-radius: 14px; }
  .map-track .rail { top: 27px; }
  .map-track .runner { top: 21px; }
  .map-node span { font-size: 11px; }
  .playground { padding: 16px 16px 30px; }
  .system-switch button { font-size: 13.5px; padding: 10px 4px; }
  .guide { padding: 12px; }
  .guide-head .guide-bar { display: none; }
  .gstep { font-size: 12px; padding: 7px 8px; }
  .dash-inner { padding: 14px; }
  .kpis { gap: 6px; }
  .kpi { padding: 9px 10px; }
  .kpi strong { font-size: 18px; }
  .kpi small { font-size: 11px; }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .kcol { min-height: 0; }
  .link-card { grid-template-columns: minmax(0, 1fr); }
  .qr { display: none; }
  .sponsor-form { grid-template-columns: 1fr 1fr; }
  .sponsor-form button { grid-column: 1 / -1; }
  .phone { border-radius: 40px; padding: 8px; height: 640px; }
  .phone-screen { border-radius: 33px; }
  .role-grid { grid-template-columns: 1fr; }
  .mock-form { grid-template-columns: minmax(0, 1fr); }
  .drawer-body, .drawer-head, .drawer-foot { padding-left: 14px; padding-right: 14px; }
  .oline { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .oline .q { display: none; }
  .ostatus { min-width: 0; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
