:root {
  --paper: #f3f0ea;
  --surface: #fffdfa;
  --surface-2: #ebe6dd;
  --ink: #1e1d1a;
  --muted: #6c675f;
  --line: #d8d1c6;
  --line-strong: #bcb3a6;
  --accent: #7b2d2b;
  --accent-soft: #ead9d6;
  --success: #256247;
  --success-soft: #dcebe4;
  --warning: #8a5b17;
  --warning-soft: #f3e7cf;
  --danger: #992e2d;
  --danger-soft: #f1dddd;
  --blue: #315d77;
  --blue-soft: #dce7ed;
  --shadow: 0 12px 32px rgba(37, 31, 24, .08);
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.page-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.page-main { padding: 28px 0 96px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(188, 179, 166, .75);
  background: rgba(243, 240, 234, .96);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 900;
  border-radius: 8px;
  flex: 0 0 auto;
}
.brand-copy { min-width: 0; }
.brand-title { font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.btn,
.small-btn,
.icon-btn {
  border: 1px solid transparent;
  background: var(--ink);
  color: white;
  font-weight: 850;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover, .small-btn:hover, .icon-btn:hover { opacity: .9; }
.btn:active, .small-btn:active, .icon-btn:active { transform: translateY(1px); }
.btn:disabled, .small-btn:disabled, .icon-btn:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.25;
}
.btn.large { min-height: 52px; padding-inline: 20px; font-size: 16px; }
.btn.full { width: 100%; }
.btn.secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.btn.ghost { color: var(--ink); background: transparent; border-color: transparent; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.success { background: var(--success); border-color: var(--success); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.warning { background: var(--warning); border-color: var(--warning); }
.small-btn {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.small-btn.secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.small-btn.danger { background: var(--danger); }
.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  flex: 0 0 auto;
}
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.stack-actions { display: grid; gap: 8px; }

.preview-banner {
  border-bottom: 1px solid #decaa6;
  background: #f4ead8;
  color: #6f4d18;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}
.preview-banner .page-wrap { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-banner a { text-decoration: underline; text-underline-offset: 2px; }

.market-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 16px;
  align-items: stretch;
}
.market-title-card,
.market-control-card,
.panel,
.card,
.account-card,
.dash-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
}
.market-title-card { padding: clamp(24px, 4vw, 44px); }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; }
.market-title-card h1 {
  margin: 10px 0 12px;
  max-width: 680px;
  font-size: clamp(35px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -2.6px;
}
.market-title-card p { margin: 0; max-width: 680px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.market-facts { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.market-fact { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 750; }
.market-fact::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.market-control-card { padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.control-title { margin: 0 0 6px; font-size: 19px; }
.control-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.location-readout { margin-top: 16px; padding: 13px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; }
.location-readout small { display: block; color: var(--muted); font-weight: 750; margin-bottom: 3px; }
.location-readout strong { font-size: 15px; }
.control-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.market-toolbar {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.search-field { position: relative; }
.search-field input { padding-left: 40px; }
.search-field::before { content: "搜尋"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-weight: 900; }

.section-head { margin: 32px 0 16px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.section-head h2 { margin: 4px 0 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -1px; }
.section-note { color: var(--muted); font-size: 13px; text-align: right; line-height: 1.55; }

.merchant-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.merchant-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.merchant-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.merchant-cover {
  min-height: 170px;
  position: relative;
  overflow: hidden;
  background: #d7cabe;
  border-bottom: 1px solid var(--line);
}
.merchant-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.merchant-cover-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 20px; font-size: 44px; font-weight: 950; letter-spacing: -2px; }
.merchant-card-body { flex: 1; padding: 18px; display: flex; flex-direction: column; }
.merchant-card-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.merchant-category { color: var(--muted); font-size: 12px; font-weight: 800; }
.merchant-card h3 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.6px; }
.merchant-address { margin: 14px 0; min-height: 40px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.merchant-card-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.merchant-card-footer small { display: block; color: var(--muted); margin-bottom: 3px; }
.merchant-card-footer strong { font-size: 15px; }
.empty-state { border: 1px dashed var(--line-strong); background: rgba(255,253,250,.45); border-radius: var(--radius); padding: 34px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.badge.green, .status-pill.green { color: var(--success); border-color: #afd0c0; background: var(--success-soft); }
.badge.red, .status-pill.red { color: var(--danger); border-color: #d8aeae; background: var(--danger-soft); }
.badge.amber, .status-pill.amber { color: var(--warning); border-color: #dec89e; background: var(--warning-soft); }
.badge.blue, .status-pill.blue { color: var(--blue); border-color: #b8cedb; background: var(--blue-soft); }

.bottom-nav {
  display: none;
  position: fixed;
  z-index: 70;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: calc(62px + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  background: rgba(255,253,250,.97);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.bottom-nav a.active { color: var(--accent); }
.nav-symbol { width: 18px; height: 18px; border: 1.8px solid currentColor; border-radius: 5px; }

.modal-backdrop {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(26, 24, 21, .56);
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: min(560px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0,0,0,.24);
  padding: 22px;
}
.modal-card.wide { width: min(850px, 100%); }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 24px; letter-spacing: -.7px; }
.modal-copy { margin: 0 0 16px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.city-choice { min-height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-weight: 750; cursor: pointer; }
.city-choice.active { background: var(--ink); color: white; border-color: var(--ink); }
.login-demo-box { margin-top: 14px; padding: 14px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; }
.login-demo-box h3 { margin: 0 0 7px; font-size: 15px; }

.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100% - 30px));
  padding: 12px 15px;
  border-radius: 10px;
  background: #1e1d1a;
  color: white;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

/* Store */
.store-hero { border-bottom: 1px solid var(--line); background: var(--surface); }
.store-hero-grid { min-height: 310px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .62fr); }
.store-identity { padding: clamp(30px, 6vw, 66px) 0; display: flex; flex-direction: column; justify-content: flex-end; }
.store-identity h1 { margin: 8px 0 10px; font-size: clamp(52px, 10vw, 98px); line-height: .92; letter-spacing: -4px; }
.store-identity p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 660px; }
.store-visual { position: relative; min-height: 280px; overflow: hidden; background: #d7cabe; }
.store-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-visual-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 950; font-size: clamp(60px, 12vw, 125px); letter-spacing: -6px; color: rgba(30,29,26,.7); }
.store-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.store-main { display: grid; gap: 14px; }
.store-side { position: sticky; top: 84px; }
.store-play-card { border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: white; padding: 20px; }
.store-play-card h2 { margin: 6px 0 8px; font-size: 25px; }
.store-play-card p { margin: 0; color: rgba(255,255,255,.72); line-height: 1.65; font-size: 13px; }
.store-play-stats { margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; overflow: hidden; }
.store-play-stat { padding: 12px; }
.store-play-stat + .store-play-stat { border-left: 1px solid rgba(255,255,255,.2); }
.store-play-stat small { display: block; color: rgba(255,255,255,.62); font-size: 11px; margin-bottom: 4px; }
.store-play-stat strong { font-size: 18px; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel h2, .panel h3 { margin: 0; }
.panel h2 { font-size: 22px; }
.panel h3 { font-size: 18px; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.rule-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.62; font-size: 14px; }
.product-public-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.product-public-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.product-public-image { aspect-ratio: 16/10; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-weight: 850; overflow: hidden; }
.product-public-image img { width: 100%; height: 100%; object-fit: cover; }
.product-public-body { padding: 12px; }
.product-public-body strong { display: block; margin-bottom: 5px; }
.product-public-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.responsibility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.responsibility-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--paper); }
.responsibility-item strong { display: block; margin-bottom: 6px; }
.responsibility-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* Account */
.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.account-side { position: sticky; top: 84px; }
.account-card { padding: 18px; }
.account-profile { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.account-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-weight: 900; margin-bottom: 10px; }
.account-profile strong { display: block; }
.account-profile small { color: var(--muted); }
.account-nav { display: grid; gap: 4px; }
.account-nav button { border: 0; background: transparent; min-height: 42px; border-radius: 8px; text-align: left; padding: 0 11px; font-weight: 800; cursor: pointer; }
.account-nav button.active { color: var(--accent); background: var(--accent-soft); }
.account-main { min-width: 0; }
.account-section { display: none; }
.account-section.active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.metric-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 17px; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 800; }
.metric-value { margin-top: 7px; font-size: 30px; font-weight: 950; letter-spacing: -1px; }
.metric-note { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.claim-grid { display: grid; gap: 10px; }
.claim-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 17px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.claim-code { margin: 8px 0; padding: 10px 12px; border: 1px dashed var(--line-strong); background: var(--paper); border-radius: 8px; font-size: 20px; font-weight: 950; letter-spacing: 1px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 850; }
.field-help { color: var(--muted); font-size: 11px; line-height: 1.5; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(30,29,26,.07); }
input[type="range"] { padding: 0; min-height: 28px; box-shadow: none; border: 0; background: transparent; }
input[type="checkbox"], input[type="radio"] { width: 18px; min-height: 18px; padding: 0; }
.form-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; font-size: 13px; line-height: 1.55; }
.check-row input { flex: 0 0 auto; margin-top: 1px; }
.range-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 48px; align-items: center; gap: 12px; }
.range-row + .range-row { margin-top: 14px; }
.range-name { font-size: 13px; font-weight: 850; }
.range-value { text-align: right; font-weight: 900; }

.notice,
.locked-box {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.notice strong, .locked-box strong { color: var(--ink); }
.notice.warn { color: #6f4d18; border-color: #dec89e; background: var(--warning-soft); }
.notice.good { color: var(--success); border-color: #afd0c0; background: var(--success-soft); }
.notice.bad { color: var(--danger); border-color: #d8aeae; background: var(--danger-soft); }
.disclosure { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* Dashboard */
.dashboard { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px 16px;
  background: #211f1b;
  color: white;
  display: flex;
  flex-direction: column;
}
.sidebar .brand-mark { background: white; color: #211f1b; border-color: white; }
.sidebar .brand-subtitle { color: rgba(255,255,255,.58); }
.side-context { margin: 24px 0 12px; padding: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; }
.side-context small { display: block; color: rgba(255,255,255,.55); margin-bottom: 4px; }
.side-context strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav { display: grid; gap: 3px; }
.side-nav button, .side-nav a {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.7);
  padding: 0 11px;
  text-align: left;
  font-weight: 750;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.side-nav button:hover, .side-nav a:hover { color: white; background: rgba(255,255,255,.07); }
.side-nav button.active { color: white; background: rgba(255,255,255,.12); }
.sidebar-foot { margin-top: auto; padding-top: 20px; color: rgba(255,255,255,.46); font-size: 11px; line-height: 1.55; }
.dashboard-main { min-width: 0; padding: 24px; }
.dashboard-top { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dashboard-title small { display: block; color: var(--muted); font-weight: 750; margin-bottom: 4px; }
.dashboard-title h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -1.3px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 12px; }
.dash-card { grid-column: span 12; padding: 18px; min-width: 0; }
.dash-card.span-8 { grid-column: span 8; }
.dash-card.span-7 { grid-column: span 7; }
.dash-card.span-6 { grid-column: span 6; }
.dash-card.span-5 { grid-column: span 5; }
.dash-card.span-4 { grid-column: span 4; }
.dash-card.span-3 { grid-column: span 3; }
.card-title { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.card-subtitle { margin: 5px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.readiness-list { display: grid; gap: 8px; }
.readiness-item { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); font-size: 13px; font-weight: 750; }
.readiness-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line-strong); color: transparent; font-size: 11px; }
.readiness-item.done .readiness-dot { color: white; background: var(--success); border-color: var(--success); }
.progress-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; background: var(--success); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; background: var(--surface); }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; line-height: 1.55; }
th { color: var(--muted); font-size: 11px; font-weight: 900; background: var(--paper); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.product-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.product-admin-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--paper); }
.product-admin-card h3 { margin: 0 0 5px; font-size: 16px; }
.product-admin-meta { color: var(--muted); font-size: 11px; line-height: 1.55; }
.product-admin-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.file-preview { min-height: 110px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--paper); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; padding: 10px; }
.file-preview img { width: 100%; height: 150px; object-fit: contain; }
.log-list { display: grid; gap: 8px; }
.log-item { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.55; }
.log-item:last-child { border-bottom: 0; }
.log-time { color: var(--muted); }
.mobile-dashboard-bar, .mobile-dashboard-menu { display: none; }

/* Game wrapper */
.game-shell { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #111318; color: white; overflow: hidden; }
.game-bar { min-height: 56px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: #17191e; border-bottom: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-bar-left, .game-bar-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.game-title { min-width: 0; }
.game-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-title small { display: block; color: rgba(255,255,255,.55); margin-top: 2px; }
.game-bar .small-btn.secondary { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: white; }
.game-stage { position: relative; min-height: 0; }
.game-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #101318; }
.game-integration-alert { position: absolute; z-index: 18; top: 10px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); padding: 10px 12px; border: 1px solid #d8aeae; border-radius: 10px; background: rgba(86,25,25,.96); color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 13px; line-height: 1.55; }
.game-guard { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: var(--paper); color: var(--ink); text-align: center; }
.game-guard-card { width: min(460px, 100%); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 24px; }
.game-guard-card h1 { margin: 0 0 10px; font-size: 25px; }
.game-guard-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }

@media (max-width: 980px) {
  .merchant-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .store-layout { grid-template-columns: 1fr; }
  .store-side { position: static; }
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; }
  .account-nav { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .account-nav button { text-align: center; padding-inline: 6px; }
  .dash-card.span-8, .dash-card.span-7, .dash-card.span-6, .dash-card.span-5, .dash-card.span-4, .dash-card.span-3 { grid-column: span 12; }
}

@media (max-width: 760px) {
  .page-wrap { width: min(100% - 24px, 1180px); }
  .page-main { padding-top: 18px; padding-bottom: 90px; }
  .topbar-inner { min-height: 58px; }
  .brand-subtitle { display: none; }
  .top-actions .btn.secondary { display: none; }
  .preview-banner .page-wrap { min-height: 42px; }
  .preview-banner span { max-width: 78%; }
  .market-intro { grid-template-columns: 1fr; }
  .market-title-card { padding: 24px 20px; }
  .market-title-card h1 { font-size: 40px; letter-spacing: -1.8px; }
  .market-control-card { padding: 18px; }
  .market-toolbar { grid-template-columns: 1fr 1fr; }
  .market-toolbar .search-field { grid-column: 1 / -1; }
  .section-head { align-items: start; }
  .merchant-list { grid-template-columns: 1fr; }
  .merchant-card { min-height: 0; }
  .bottom-nav { display: flex; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-card { width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(22px + var(--safe-bottom)); }
  .city-grid { grid-template-columns: repeat(2, 1fr); }
  .store-hero-grid { grid-template-columns: 1fr; }
  .store-identity { min-height: 210px; padding: 28px 0; }
  .store-identity h1 { font-size: 58px; }
  .store-visual { min-height: 210px; }
  .product-public-grid, .responsibility-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .claim-card { grid-template-columns: 1fr; }
  .account-nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .range-row { grid-template-columns: 1fr 52px; }
  .range-row input { grid-column: 1 / -1; grid-row: 2; }
  .dashboard { display: block; }
  .sidebar { display: none; }
  .mobile-dashboard-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 58px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #211f1b;
    color: white;
  }
  .mobile-dashboard-menu {
    position: fixed;
    z-index: 120;
    inset: 58px 0 auto 0;
    display: none;
    max-height: calc(100dvh - 58px);
    overflow: auto;
    padding: 10px 12px 18px;
    background: #211f1b;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .mobile-dashboard-menu.open { display: grid; }
  .mobile-dashboard-menu button, .mobile-dashboard-menu a { min-height: 46px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); background: transparent; color: white; text-align: left; font-weight: 800; }
  .dashboard-main { padding: 16px 12px 36px; }
  .dashboard-top { align-items: start; flex-direction: column; }
  .dashboard-top .inline-actions { width: 100%; }
  .dashboard-top .inline-actions .btn { flex: 1; }
  .product-admin-grid { grid-template-columns: 1fr; }
  .log-item { grid-template-columns: 1fr; gap: 3px; }
  .game-bar { align-items: flex-start; }
  .game-bar-right .game-secondary-action { display: none; }
}


/* V3 complete-flow additions */
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.8);
  background: white;
  color: #211f1b;
  font-size: 13px;
  font-weight: 950;
}
.wordmark-text { min-width: 0; }
.wordmark-text strong,
.wordmark-text small { display: block; }
.wordmark-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wordmark-text small { margin-top: 2px; color: rgba(255,255,255,.56); font-size: 11px; }
.side-label {
  margin: 22px 10px 7px;
  color: rgba(255,255,255,.43);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.terms-details,
.inline-edit-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}
.terms-details summary,
.inline-edit-details summary {
  min-height: 42px;
  padding: 11px 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style-position: inside;
}
.terms-details[open] summary,
.inline-edit-details[open] summary { border-bottom: 1px solid var(--line); }
.terms-details > :not(summary),
.inline-edit-details > :not(summary) { margin-inline: 13px; }
.terms-details > :last-child,
.inline-edit-details > :last-child { margin-bottom: 13px; }
.compact-check { padding: 7px 0; }
.compact-check + .compact-check { border-top: 1px solid var(--line); }
.compact-select { width: auto; min-width: 118px; min-height: 36px; padding: 6px 30px 6px 10px; }

.preview-security-note {
  margin: 14px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(222,200,158,.7);
  border-radius: 9px;
  background: rgba(243,231,207,.12);
  color: rgba(255,255,255,.65);
  font-size: 11px;
  line-height: 1.6;
}
.card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.card-head-row .card-subtitle { margin-bottom: 0; }

.readiness-mark {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}
.readiness-item.ready .readiness-mark,
.readiness-item.done .readiness-mark {
  border-color: var(--success);
  background: var(--success);
  color: white;
}
.success-note {
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid #afd0c0;
  border-radius: 9px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}
.plain-list,
.rule-list,
.agreement-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}
.plain-list li + li,
.rule-list li + li { margin-top: 5px; }
.agreement-list { padding: 0; list-style: none; display: grid; gap: 8px; }
.agreement-row {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}
.agreement-row strong { display: block; margin-bottom: 2px; }

.preview-file,
.merchant-upload-preview {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  overflow: hidden;
}
.preview-file img,
.merchant-upload-preview img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  border-radius: 7px;
}
.preview-file code,
.merchant-upload-preview code { overflow-wrap: anywhere; }

.product-manage-list { display: grid; gap: 12px; }
.product-manage-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}
.product-manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.product-manage-head h3 { margin: 0 0 4px; font-size: 17px; }
.product-mini-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.product-mini-grid > div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
}
.product-mini-grid small,
.compact-metrics small,
.claim-detail-grid small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.product-mini-grid strong { overflow-wrap: anywhere; font-size: 12px; }
.danger-text { color: var(--danger) !important; }
.meta { color: var(--muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }

.compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.single-column { grid-template-columns: 1fr !important; }
.compact-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
}
.compact-metrics > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.compact-metrics strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.claim-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
.claim-detail-grid > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  min-width: 0;
}
.claim-detail-grid strong { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; }

.range-grid { display: grid; gap: 12px; }
.range-field {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.range-field:last-child { border-bottom: 0; }
.range-field > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 850; }
.range-field > span strong { color: var(--accent); font-size: 14px; }
.range-field output { text-align: right; font-size: 13px; font-weight: 950; }
.tall-textarea { min-height: 170px; }
.disabled-link { pointer-events: none; opacity: .42; }

.active-session-panel {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #b8cedb;
  border-radius: 11px;
  background: var(--blue-soft);
}
.active-session-panel h3 { margin: 0 0 5px; font-size: 16px; }
.active-session-list { display: grid; gap: 8px; margin-top: 12px; }
.active-session-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(49,93,119,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.58);
}
.active-session-row strong,
.active-session-row small { display: block; }
.active-session-row small { margin-top: 3px; color: var(--blue); line-height: 1.45; }

.game-loading {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #111318;
  color: white;
}
.game-loading-card { width: min(390px, 100%); text-align: center; }
.game-loading-card h1 { margin: 18px 0 8px; font-size: 22px; }
.game-loading-card p { margin: 0; color: rgba(255,255,255,.58); font-size: 13px; line-height: 1.65; }
.loading-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: white;
  border-radius: 50%;
  animation: loading-spin .85s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .card-head-row,
  .product-manage-head { align-items: stretch; flex-direction: column; }
  .product-mini-grid,
  .compact-metrics,
  .claim-detail-grid,
  .compact-grid { grid-template-columns: 1fr 1fr; }
  .range-field { grid-template-columns: 1fr; }
  .range-field input { grid-column: 1; grid-row: 2; }
  .active-session-row { grid-template-columns: 1fr; }
  .active-session-row .btn { width: 100%; }
}

@media (max-width: 420px) {
  .product-mini-grid,
  .compact-metrics,
  .claim-detail-grid,
  .compact-grid { grid-template-columns: 1fr; }
}

/* Legal and shared footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.site-footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 16px;
  font-size: 12px;
  line-height: 1.55;
}
.site-footer-inner > div { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 18px; align-items: start; }
.legal-nav { position: sticky; top: 84px; padding: 16px; display: grid; gap: 3px; }
.legal-nav strong { padding: 6px 9px 11px; font-size: 13px; }
.legal-nav a { min-height: 38px; display: flex; align-items: center; padding: 0 9px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.legal-nav a:hover { color: var(--ink); background: var(--paper); }
.legal-content { min-width: 0; display: grid; gap: 14px; }
.legal-warning,
.legal-section { padding: clamp(18px, 3vw, 28px); scroll-margin-top: 86px; }
.legal-warning h1 { margin: 8px 0 10px; font-size: clamp(27px, 4vw, 42px); letter-spacing: -1.4px; }
.legal-warning p,
.legal-section > p { color: var(--muted); line-height: 1.75; }
.legal-section h2 { margin: 7px 0 16px; font-size: clamp(22px, 3vw, 29px); letter-spacing: -.7px; }
.legal-list { margin-top: 14px; }
.legal-definition-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.legal-definition-list > div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 16px; padding: 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.legal-definition-list > div:last-child { border-bottom: 0; }
.legal-definition-list strong { font-size: 12px; }
.legal-definition-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.legal-checklist { margin-top: 4px; }

@media (max-width: 800px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .legal-nav strong { grid-column: 1 / -1; }
  .legal-definition-list > div { grid-template-columns: 1fr; gap: 5px; }
  .site-footer { padding-bottom: calc(62px + var(--safe-bottom)); }
  .site-footer-inner { align-items: flex-start; flex-direction: column; }
}
.sidebar-legal-link {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-weight: 800;
}
.sidebar-legal-link:hover { color: white; }
.sidebar-legal-link + .sidebar-foot { margin-top: 0; }

/* Mobile dashboard clarity fixes */
.preview-security-note {
  background: #f4ead8;
  color: #6f4d18;
  border-color: #decaa6;
}
.compact-select {
  display: grid;
  gap: 4px;
  width: auto;
  min-width: 150px;
  min-height: 0;
  padding: 0;
}
.compact-select > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.compact-select > select {
  min-height: 40px;
  padding: 8px 32px 8px 10px;
}
.mobile-dashboard-bar .icon-btn {
  background: #fff;
  color: #211f1b !important;
  border-color: #fff !important;
  font-size: 21px;
  line-height: 1;
}
.table-wrap {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (max-width: 760px) {
  .dashboard-top .inline-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }
  .dashboard-top .inline-actions .compact-select {
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }
  .dashboard-top .inline-actions > .status-pill {
    grid-column: 2;
    justify-self: end;
    white-space: nowrap;
  }
  .dashboard-top .inline-actions > .status-pill + .status-pill {
    grid-column: 1;
    justify-self: start;
  }
  .dashboard-top .inline-actions > .btn {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    flex: none;
  }
}

/* === V7 marketplace polish === */
.market-main { padding-top: 22px; }
.marketplace-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0 20px; border-bottom:1px solid var(--line); }
.marketplace-head-copy h1 { margin:0; font-size:clamp(30px,5vw,44px); letter-spacing:-1.2px; }
.marketplace-head-copy p { margin:7px 0 0; color:var(--muted); font-size:14px; }
.marketplace-location { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.location-chip { min-height:42px; display:flex; align-items:center; gap:9px; padding:0 13px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--ink); cursor:pointer; }
.location-chip span { color:var(--muted); font-size:11px; }
.location-chip strong { font-size:13px; }
.btn.compact { min-height:42px; padding:0 14px; }
.market-searchbar { display:grid; grid-template-columns:minmax(0,1fr) 150px auto; gap:8px; padding:16px 0; align-items:center; }
.marketplace-search input { min-height:48px; border-radius:8px; background:var(--surface); font-size:15px; }
.market-searchbar select { min-height:48px; border-radius:8px; background:var(--surface); }
.text-button { min-height:42px; border:0; background:transparent; color:var(--muted); font-weight:800; cursor:pointer; padding:0 8px; }
.text-button:hover { color:var(--ink); }
.market-section { padding:4px 0 30px; }
.market-section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:8px 0 14px; }
.market-section-head h2 { margin:0; font-size:22px; }
.market-section-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.market-section-head a { font-size:12px; font-weight:850; text-decoration:underline; text-underline-offset:3px; }
.marketplace-list { gap:12px; }
.marketplace-list .merchant-card { min-height:0; border-radius:10px; box-shadow:none; }
.marketplace-list .merchant-card:hover { transform:none; box-shadow:0 5px 16px rgba(36,32,28,.07); border-color:var(--line-strong); }
.marketplace-list .merchant-cover { aspect-ratio:16/8.5; }
.marketplace-list .merchant-card-body { padding:14px; }
.marketplace-list .merchant-card h3 { font-size:20px; letter-spacing:-.3px; }
.marketplace-list .merchant-card-footer { padding-top:11px; }
.market-trust-strip { margin-bottom:34px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.market-trust-strip > div { padding:14px 16px; min-width:0; }
.market-trust-strip > div + div { border-left:1px solid var(--line); }
.market-trust-strip strong,.market-trust-strip span { display:block; }
.market-trust-strip strong { font-size:12px; }
.market-trust-strip span { margin-top:4px; color:var(--muted); font-size:11px; line-height:1.5; }

.field-help { display:block; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.55; }
.upload-state { margin:14px 0; padding:13px; border:1px solid var(--line); border-radius:9px; background:var(--paper); }
.upload-state-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.upload-state-head strong { font-size:13px; }
.upload-state-head span { color:var(--muted); font-size:11px; }
.upload-state p { margin:8px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.upload-progress { height:6px; margin-top:9px; overflow:hidden; background:var(--surface-2); border-radius:999px; }
.upload-progress i { display:block; width:0; height:100%; background:var(--ink); border-radius:inherit; transition:width .16s ease; }
.base-rule-box { padding:15px 18px 15px 34px; border:1px solid var(--line); border-radius:9px; background:var(--paper); color:var(--ink); }

/* machine editor: immediate preview before 3D */
.machine-editor-layout-v7 { display:grid; grid-template-columns:minmax(390px,.92fr) minmax(420px,1.08fr); gap:14px; align-items:start; }
.machine-settings-card,.machine-live-preview-card { min-width:0; }
.machine-live-preview-card { position:sticky; top:18px; }
.machine-safety-strip { margin:14px 0 2px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.machine-setting-list { margin-top:10px; border-top:1px solid var(--line); }
.machine-setting-row { display:grid; gap:8px; padding:14px 0; border-bottom:1px solid var(--line); }
.machine-setting-title { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; font-weight:900; }
.machine-setting-title strong { color:var(--accent); font-size:13px; }
.machine-setting-row > small { color:var(--muted); font-size:11px; line-height:1.6; }
.range-with-number { display:grid; grid-template-columns:minmax(0,1fr) 72px; gap:10px; align-items:center; }
.range-with-number input[type=range] { width:100%; accent-color:#675848; }
.range-with-number input[type=number] { min-height:38px; padding:7px 8px; text-align:center; }
.machine-weight-context > div { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.machine-mobile-preview-dock { display:none; }
.machine-preview-stack { position:relative; height:min(58vh,540px); min-height:390px; overflow:hidden; border:1px solid var(--line-strong); border-radius:12px; background:#d7c8b8; }
.machine-preview-stack .machine-preview-stage { position:absolute; inset:0; height:100%; min-height:0; border:0; border-radius:0; transition:opacity .15s ease; }
.machine-3d-preview-frame { position:absolute; inset:0; width:100%; height:100%; border:0; opacity:0; visibility:hidden; background:#d7c8b8; pointer-events:none; transition:opacity .16s ease; }
.machine-preview-stack.three-ready .machine-preview-stage { opacity:0; visibility:hidden; }
.machine-preview-stack.three-ready .machine-3d-preview-frame { opacity:1; visibility:visible; }
.machine-preview-layer-label { position:absolute; left:10px; bottom:10px; z-index:8; padding:6px 9px; border-radius:999px; background:rgba(35,31,28,.78); color:#fff; font-size:10px; font-weight:850; pointer-events:none; }
.machine-3d-status { margin-top:9px; display:flex; gap:5px; color:var(--muted); font-size:11px; line-height:1.5; }
.machine-3d-status strong { color:var(--ink); flex:none; }
.machine-preview-stage { --preview-barrier-height:26%; --preview-swing:0deg; --preview-claw-spread:1; --preview-grip:.65; position:relative; height:min(58vh,540px); min-height:390px; overflow:hidden; border:1px solid var(--line-strong); border-radius:12px; background:#ddd1c4; }
.preview-machine-shell { position:absolute; inset:6% 6% 5%; overflow:hidden; border:8px solid #cdbba7; border-top-width:24px; border-radius:11px 11px 15px 15px; background:rgba(255,255,255,.55); box-shadow:inset 0 0 0 1px rgba(55,45,38,.12); }
.preview-machine-top { position:absolute; inset:0 0 auto; height:12%; background:#c0ae99; border-bottom:1px solid rgba(55,45,38,.15); }
.preview-claw-carriage { position:absolute; left:50%; top:8%; width:92px; height:150px; transform:translateX(-50%) rotate(var(--preview-swing)); transform-origin:50% 0; transition:transform .12s ease; z-index:4; }
.preview-claw-stem { position:absolute; top:0; left:50%; width:5px; height:78px; transform:translateX(-50%); background:#585651; border-radius:4px; }
.preview-claw-head { position:absolute; top:70px; left:50%; width:78px; height:68px; transform:translateX(-50%) scaleX(var(--preview-claw-spread)); transform-origin:50% 15%; transition:transform .12s ease; }
.preview-claw-head::before { content:''; position:absolute; top:0; left:50%; width:34px; height:24px; transform:translateX(-50%); border-radius:8px 8px 11px 11px; background:#4f4d49; }
.preview-claw-arm { position:absolute; top:17px; width:5px; height:55px; border-radius:5px; background:#706d68; transform-origin:50% 0; opacity:var(--preview-grip); }
.preview-claw-arm.arm-left { left:25px; transform:rotate(28deg); }
.preview-claw-arm.arm-mid { left:37px; transform:rotate(0); }
.preview-claw-arm.arm-right { right:25px; transform:rotate(-28deg); }
.preview-products { position:absolute; left:8%; right:40%; bottom:5%; height:34%; z-index:2; }
.preview-products span { position:absolute; width:42px; height:66px; border:1px solid rgba(70,58,49,.16); border-radius:7px; background:#d1bea9; box-shadow:0 6px 14px rgba(60,48,40,.08); }
.preview-products span:nth-child(1){left:2%;bottom:2%;transform:rotate(-10deg)} .preview-products span:nth-child(2){left:21%;bottom:4%;transform:rotate(6deg)} .preview-products span:nth-child(3){left:40%;bottom:1%;transform:rotate(-3deg)} .preview-products span:nth-child(4){left:59%;bottom:5%;transform:rotate(11deg)} .preview-products span:nth-child(5){left:77%;bottom:2%;transform:rotate(-7deg)}
.preview-hole { position:absolute; right:4%; bottom:1%; width:32%; height:13%; border-radius:8px 8px 15px 15px; background:#433b34; box-shadow:inset 0 7px 14px rgba(0,0,0,.32); }
.preview-barrier { position:absolute; right:4%; bottom:2%; width:34%; height:var(--preview-barrier-height); max-height:43%; min-height:8%; border-radius:4px 4px 2px 2px; background:#a78f76; border:1px solid rgba(70,55,44,.18); transition:height .12s ease; z-index:3; }
.preview-countdown { position:absolute; top:16%; right:5%; z-index:5; min-width:52px; padding:7px 8px; border:1px solid rgba(50,43,37,.18); border-radius:8px; background:rgba(255,255,255,.8); color:#3b342e; text-align:center; }
.preview-countdown b,.preview-countdown small { display:block; }
.preview-countdown b { font-size:18px; line-height:1; }
.preview-countdown small { margin-top:2px; font-size:9px; }
.machine-preview-values { margin-top:10px; display:flex; flex-wrap:wrap; gap:6px; }
.machine-preview-values span { padding:6px 8px; border:1px solid var(--line); border-radius:7px; background:var(--paper); color:var(--muted); font-size:10px; }
.machine-preview-values strong { color:var(--ink); }

.claim-lookup-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; margin-top:14px; }
.claim-lookup-form .field { margin:0; }
.claim-lookup-result { margin-top:12px; }
.claim-verify-result { padding:14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--paper); }
.claim-verify-result.valid { border-color:#9fc4b1; background:var(--success-soft); }
.claim-verify-result.locked { border-color:#dfc697; background:#fbf4e7; }
.claim-verify-result-head { display:flex; align-items:start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.claim-verify-result-head strong,.claim-verify-result-head span { display:block; }
.claim-verify-result-head span { margin-top:3px; color:var(--muted); font-size:11px; }

.admin-merchant-monitor { display:grid; gap:10px; }
.admin-monitor-toolbar { display:grid; grid-template-columns:minmax(0,1fr) 160px 160px; gap:8px; margin:12px 0; }
.admin-monitor-row { display:grid; grid-template-columns:minmax(180px,1.4fr) minmax(150px,1fr) minmax(150px,1fr) 150px; gap:12px; align-items:center; padding:10px 0; border-top:1px solid var(--line); }
.admin-monitor-row.header { color:var(--muted); font-size:10px; font-weight:850; text-transform:uppercase; }
.admin-monitor-row strong,.admin-monitor-row span { min-width:0; overflow-wrap:anywhere; }

@media (max-width:1120px){
  .machine-editor-layout-v7 { grid-template-columns:1fr; }
  .machine-live-preview-card { position:static; }
  .machine-preview-stack,.machine-preview-stage { height:470px; }
}
@media (max-width:760px){
  .market-main { padding-top:8px; }
  .marketplace-head { align-items:flex-start; flex-direction:column; padding:12px 0 14px; }
  .marketplace-head-copy h1 { font-size:30px; }
  .marketplace-location { width:100%; justify-content:flex-start; }
  .location-chip { flex:1; justify-content:space-between; }
  .market-searchbar { grid-template-columns:minmax(0,1fr) 126px; }
  .market-searchbar .text-button { grid-column:1/-1; justify-self:start; min-height:30px; padding-left:0; }
  .market-trust-strip { grid-template-columns:1fr; }
  .market-trust-strip > div + div { border-left:0; border-top:1px solid var(--line); }
  .machine-mobile-preview-dock { display:block; position:sticky; top:54px; z-index:13; margin:0 0 10px; padding:7px; border:1px solid var(--line-strong); border-radius:10px; background:rgba(248,246,242,.95); box-shadow:0 8px 20px rgba(45,38,33,.10); backdrop-filter:blur(9px); }
  .machine-mobile-preview-head { display:flex; justify-content:space-between; gap:8px; margin:0 2px 6px; color:var(--muted); font-size:10px; }
  .machine-mobile-preview-head strong { color:var(--ink); }
  .machine-preview-stage-mini { height:138px!important; min-height:138px!important; border-radius:8px!important; }
  .machine-preview-stage-mini .preview-machine-shell { inset:4% 4% 3%; border-width:5px; border-top-width:12px; }
  .machine-preview-stage-mini .preview-claw-carriage { width:58px; height:92px; top:6%; }
  .machine-preview-stage-mini .preview-claw-stem { height:42px; width:3px; }
  .machine-preview-stage-mini .preview-claw-head { top:37px; width:55px; height:50px; }
  .machine-preview-stage-mini .preview-claw-head::before { width:24px; height:16px; }
  .machine-preview-stage-mini .preview-claw-arm { top:12px; height:37px; width:3px; }
  .machine-preview-stage-mini .preview-claw-arm.arm-left { left:17px; } .machine-preview-stage-mini .preview-claw-arm.arm-mid { left:26px; } .machine-preview-stage-mini .preview-claw-arm.arm-right { right:17px; }
  .machine-preview-stage-mini .preview-products span { width:24px; height:37px; border-radius:4px; }
  .machine-preview-stage-mini .preview-countdown { top:15%; right:4%; min-width:38px; padding:4px; }
  .machine-preview-stage-mini .preview-countdown b { font-size:13px; }
  .range-with-number { grid-template-columns:minmax(0,1fr) 66px; }
  .claim-lookup-form { grid-template-columns:1fr; }
  .claim-lookup-form .btn { width:100%; }
  .admin-monitor-toolbar { grid-template-columns:1fr; }
  .admin-monitor-row { grid-template-columns:1fr 1fr; gap:6px 12px; }
  .admin-monitor-row.header { display:none; }
  .admin-monitor-row > *:nth-child(n+3) { font-size:11px; }
}

/* Store machine sharing / compact marketplace controls */
.machine-market-panel { border-top:1px solid var(--line); padding-top:16px; }
.machine-share-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.machine-share-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:0; min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:9px; background:var(--surface); }
.machine-share-card.selected { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.machine-select-button,.machine-share-button { border:0; background:transparent; color:var(--ink); cursor:pointer; }
.machine-select-button { min-height:62px; display:flex; align-items:center; gap:9px; padding:9px; text-align:left; min-width:0; }
.machine-select-button:disabled { cursor:default; opacity:.45; }
.machine-no { width:31px; height:31px; display:grid; place-items:center; flex:0 0 auto; border:1px solid var(--line-strong); border-radius:7px; background:var(--paper); font-size:13px; font-weight:950; }
.machine-select-button strong,.machine-select-button small { display:block; }
.machine-select-button strong { font-size:12px; }
.machine-select-button small { margin-top:2px; color:var(--muted); font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.machine-share-button { min-width:48px; padding:0 9px; border-left:1px solid var(--line); color:var(--muted); font-size:10px; font-weight:850; }
.machine-share-button:hover { color:var(--ink); background:var(--paper); }
.rule-group + .rule-group { margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.rule-group > strong { display:block; margin-bottom:9px; font-size:12px; }
.store-sticky-action { display:none; }
@media (max-width:760px){
  .machine-share-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .store-sticky-action { position:fixed; left:10px; right:10px; bottom:calc(66px + env(safe-area-inset-bottom)); z-index:35; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border:1px solid var(--line-strong); border-radius:10px; background:rgba(250,248,244,.96); box-shadow:0 8px 28px rgba(45,38,32,.14); backdrop-filter:blur(10px); }
  .store-sticky-action small,.store-sticky-action strong { display:block; }
  .store-sticky-action small { color:var(--muted); font-size:9px; }
  .store-sticky-action strong { margin-top:1px; font-size:12px; }
  .store-sticky-action .btn { min-height:40px; padding:0 13px; }
  .store-page-main { padding-bottom:88px; }
}

/* V7 merchant application */
.merchant-apply-page{background:var(--cream);color:var(--ink);min-height:100vh}.apply-header{max-width:none;padding:18px max(24px,calc((100vw - 1180px)/2));border-bottom:1px solid var(--line);background:rgba(248,245,239,.96)}.apply-shell{width:min(860px,calc(100% - 32px));margin:52px auto 90px}.apply-intro{max-width:680px;margin-bottom:28px}.apply-intro h1{font-size:clamp(32px,5vw,54px);line-height:1.03;letter-spacing:-.04em;margin:8px 0 14px}.apply-intro p{color:var(--muted);font-size:16px;line-height:1.8}.apply-progress{display:flex;align-items:center;gap:10px;margin:0 0 20px}.apply-progress>i{height:1px;background:var(--line-strong);flex:1}.apply-progress-item{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:750}.apply-progress-item b{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line-strong);border-radius:50%;background:var(--paper);color:var(--muted)}.apply-progress-item.active{color:var(--ink)}.apply-progress-item.active b{background:var(--ink);border-color:var(--ink);color:#fff}.apply-progress-item.done b{background:#d9ebe2;border-color:#9ac7b1;color:#235c42}.apply-card,.apply-success{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:26px;box-shadow:0 12px 34px rgba(61,49,38,.05)}.apply-step[hidden],.apply-success[hidden]{display:none!important}.apply-actions{justify-content:space-between;align-items:center;margin-top:24px}.plan-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.plan-choice{cursor:pointer}.plan-choice input{position:absolute;opacity:0;pointer-events:none}.plan-choice span{display:flex;flex-direction:column;gap:5px;padding:18px;border:1px solid var(--line-strong);border-radius:12px;background:#fbf9f5;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}.plan-choice span strong{font-size:18px}.plan-choice span small{color:var(--muted);line-height:1.5}.plan-choice input:checked+span{border-color:var(--ink);box-shadow:0 0 0 2px rgba(32,30,27,.08);transform:translateY(-1px)}.segmented-choice{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.segmented-choice label{cursor:pointer}.segmented-choice input{position:absolute;opacity:0}.segmented-choice span{display:block;text-align:center;padding:12px 10px;border:1px solid var(--line);border-radius:10px;background:#fbf9f5;font-weight:750}.segmented-choice input:checked+span{border-color:var(--ink);background:var(--ink);color:#fff}.application-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 20px}.application-summary>div{display:flex;flex-direction:column;gap:4px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#faf8f4}.application-summary small{color:var(--muted);font-weight:750}.application-summary span{font-size:12px;color:var(--muted);line-height:1.45}.application-code{display:inline-block;margin:12px 0 8px;padding:14px 18px;border:1px solid var(--line-strong);border-radius:10px;background:#f5f0e8;font:800 18px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em}.apply-success h2{font-size:30px;margin:14px 0 8px}.apply-success p{color:var(--muted)}
@media(max-width:720px){.apply-header{padding:12px 14px}.apply-header .wordmark-text{font-size:13px}.apply-header .inline-actions .btn:first-child{display:none}.apply-shell{width:min(100% - 20px,860px);margin:28px auto 70px}.apply-intro h1{font-size:34px}.apply-progress{gap:5px}.apply-progress-item{gap:5px}.apply-progress-item span{font-size:10px}.apply-progress-item b{width:24px;height:24px}.apply-card,.apply-success{padding:18px;border-radius:13px}.plan-choice-grid,.application-summary{grid-template-columns:1fr}.segmented-choice{grid-template-columns:1fr}.apply-actions .meta{display:none}.apply-actions{gap:8px}.apply-actions .btn{flex:1}.apply-header .btn{padding:9px 10px;font-size:12px}}
.application-admin-list{display:grid;gap:12px;margin-top:18px}.application-admin-item{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:18px;padding:18px;border:1px solid var(--line);border-radius:12px;background:#fbf9f5}.application-admin-main h3{font-size:20px;margin:3px 0 0}.application-admin-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.application-admin-facts span{display:flex;flex-direction:column;gap:3px;padding:10px;border-radius:8px;background:var(--paper);border:1px solid var(--line)}.application-admin-facts small{font-size:10px;color:var(--muted);font-weight:800}.application-admin-facts strong{font-size:12px;line-height:1.4;word-break:break-word}.application-admin-actions{display:flex;flex-direction:column;gap:8px;justify-content:center}.application-admin-actions .btn{width:100%}
@media(max-width:820px){.application-admin-item{grid-template-columns:1fr}.application-admin-facts{grid-template-columns:1fr 1fr}.application-admin-actions{display:grid;grid-template-columns:1fr 1fr}.application-admin-actions .meta{grid-column:1/-1}.application-admin-actions .btn{margin:0}}@media(max-width:480px){.application-admin-facts{grid-template-columns:1fr}.application-admin-actions{grid-template-columns:1fr}}
.machine-rule-tabs{display:flex;flex-wrap:wrap;gap:6px}.machine-rule-tabs .small-btn{min-width:38px}.machine-rule-tabs .small-btn.active{background:var(--ink);border-color:var(--ink);color:#fff}

/* V11 product review + prize sync */
.merchant-flow-strip .flow-steps.four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.merchant-flow-strip .flow-steps.four span{display:flex;align-items:center;gap:9px;padding:12px 14px;border:1px solid var(--line,#dedbd4);border-radius:12px;background:#faf9f6;font-size:14px}
.merchant-flow-strip .flow-steps.four b{display:grid;place-items:center;width:26px;height:26px;border-radius:999px;background:#1d1d1f;color:#fff;font-size:12px;flex:0 0 auto}
.product-review-box{margin-top:14px;padding:14px;border:1px solid #dedbd4;border-radius:14px;background:#fbfaf7}
.product-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.product-review-head span,.product-review-detail{font-size:13px;color:#6c6860}
.product-declaration-list{display:grid;gap:8px;margin-top:10px}
.check-row.compact{padding:8px 0}
.product-review-admin-list{display:grid;gap:14px;margin-top:14px}
.product-review-admin-card{padding:16px;border:1px solid #dedbd4;border-radius:16px;background:#fff}
.claim-sync-list{display:grid;gap:10px}
.claim-sync-item{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid #e1ded8;border-radius:12px;background:#fbfaf7}
.claim-sync-item div{display:grid;gap:3px}.claim-sync-item small{color:#77736c;font-size:12px}.claim-sync-item strong{overflow-wrap:anywhere}
.success-badge{background:#e8f6ec!important;color:#1f6d35!important;border-color:#c7e7d0!important;cursor:pointer}
@media(max-width:760px){.merchant-flow-strip .flow-steps.four{grid-template-columns:1fr 1fr}.claim-sync-item{grid-template-columns:1fr}.product-review-admin-card{padding:14px}}

/* V12 scale-ready pagination and bounded DOM */
.market-pager,.admin-table-pager,.admin-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.market-pager{margin:16px 0 4px;padding-top:14px;border-top:1px solid var(--line)}
.market-pager span,.admin-table-pager span,.admin-list-toolbar span{color:var(--muted);font-size:11px;font-weight:800}
.market-loading{padding:24px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--muted);text-align:center;font-size:12px}
.admin-table-pager{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.admin-table-pager>div{display:flex;gap:7px}
.admin-list-toolbar{margin:14px 0 10px}
.admin-list-toolbar input{width:min(420px,100%);min-height:42px}
@media(max-width:760px){.market-pager,.admin-table-pager,.admin-list-toolbar{align-items:stretch}.market-pager .btn{width:100%}.admin-table-pager>div{width:100%}.admin-table-pager>div .small-btn{flex:1}.admin-list-toolbar input{width:100%}}


/* 平台總後台：商品送審已上傳內容預覽 */
.admin-product-upload-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.admin-product-upload-preview.missing { display: grid; gap: 4px; }
.admin-product-upload-preview.missing span,
.admin-product-upload-preview-loading { color: var(--muted); font-size: 13px; }
.admin-product-upload-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.admin-product-upload-preview-head span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.admin-product-photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}
.admin-product-photo-open img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: var(--surface);
}
.admin-product-glb-open {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.admin-product-glb-open:hover { border-color: var(--ink); }
.admin-product-preview-modal-card { width: min(1100px, 100%); }
.admin-product-photo-full-wrap {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
.admin-product-photo-full { display: block; max-width: 100%; max-height: 74vh; object-fit: contain; }
.admin-product-glb-preview-wrap { position: relative; min-height: 560px; }
.admin-product-glb-frame {
  display: block;
  width: 100%;
  height: min(68vh, 720px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.admin-product-glb-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.admin-product-glb-status strong { color: var(--ink); }
@media (max-width: 680px) {
  .admin-product-upload-preview-head,
  .admin-product-glb-status { align-items: flex-start; flex-direction: column; }
  .admin-product-upload-preview-head span { text-align: left; }
  .admin-product-glb-preview-wrap { min-height: 460px; }
  .admin-product-glb-frame { min-height: 430px; height: 58vh; }
}

/* 平台預設機台：左預覽、右設定 */
.platform-preset-workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(340px,.7fr);gap:16px;align-items:start;margin-top:14px}
.platform-preset-preview-stage{position:relative;min-height:620px;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:#111}
.platform-preset-preview-stage iframe{display:block;width:100%;height:620px;border:0;background:#111}
.platform-preset-preview-loading{position:absolute;inset:0;display:grid;place-content:center;gap:7px;padding:24px;text-align:center;background:rgba(15,17,20,.92);color:#fff;z-index:2}
.platform-preset-preview-loading span{font-size:13px;opacity:.75}
.platform-preset-settings{min-width:0;max-height:720px;overflow:auto}
@media(max-width:980px){.platform-preset-workspace{grid-template-columns:1fr}.platform-preset-preview-stage,.platform-preset-preview-stage iframe{min-height:520px;height:520px}.platform-preset-settings{max-height:none}}
