/* MuuZi Studio: desktop creator workspace with persistent navigation and live preview. */

:root {
  --bg: #f4f5f8;
  --card: #ffffff;
  --ink: #15171e;
  --ink-2: #33374a;
  --muted: #666c80;
  --faint: #667085;
  --accent: #2f6df4;
  --accent-soft: #6a99fe;
  --accent-wash: #eaf1ff;
  --line: rgba(21, 23, 30, 0.08);
  --hairline: rgba(21, 23, 30, 0.06);
  --danger: #b64242;
  --ok: #57c98a;
  --grad: linear-gradient(160deg, #6a99fe, #2f6df4);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --text-caption: .8125rem; /* 13px: labels and secondary information */
  --text-body: .875rem; /* 14px: body and actions */
  --text-control: .9375rem; /* 15px: editable content */
  --text-input-mobile: 1rem; /* 16px: prevents input zoom on iOS */
  --font-serif: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; }
html, body { min-height: 100%; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font-size: var(--text-body); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; font-size: var(--text-control); color: inherit; }
[hidden] { display: none !important; }

.eyebrow { font-family: var(--font-mono); font-size: var(--text-caption); letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.serif { font-family: var(--font-serif); }

/* ---------- 载入 ---------- */
.loading { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: var(--text-caption); }
.loading img { width: 58px; height: 58px; }

/* ---------- 登录 / 注册地址：单列居中卡片 ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 24px; padding: 30px 28px 26px; box-shadow: 0 22px 54px rgba(21, 23, 30, 0.08); display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.brand strong { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 400; }
.brand span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; color: var(--faint); }
.gate h1 { font-family: var(--font-serif); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.gate p.lead { color: var(--muted); line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family: var(--font-mono); font-size: var(--text-caption); letter-spacing: 0.14em; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.field small { color: var(--faint); font-size: var(--text-caption); }
.field-row { display: flex; gap: 8px; align-items: center; }
.field-row input { flex: 1; }
.prefix { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--muted); white-space: nowrap; }

.node { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); }
.node img, .node .node-mark { width: 36px; height: 36px; border-radius: 11px; flex: none; object-fit: cover; }
.node .node-mark { background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 600; }
.node-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.node-text strong { font-weight: 600; }
.node-text span { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--muted); }
.node button { color: var(--accent); font-size: var(--text-body); }

.primary { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 18px; font-weight: 500; transition: opacity 0.15s; width: 100%; }
.primary:disabled { opacity: 0.45; cursor: default; }
.primary.accent { background: var(--grad); }
.ghost { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--card); font-size: var(--text-body); }
.ghost:hover { border-color: var(--ink-2); }
.text-btn { color: var(--muted); font-size: var(--text-body); padding: 6px 0; }
.text-btn:hover { color: var(--ink); }
.error { color: var(--danger); font-size: var(--text-caption); line-height: 1.5; }
.note { color: var(--muted); font-size: var(--text-caption); line-height: 1.6; }
.privacy { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-caption); color: var(--muted); line-height: 1.55; padding-top: 4px; border-top: 1px solid var(--hairline); }
.privacy::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; margin-top: 6px; }

/* ---------- 编辑卡片 ---------- */
.card { background: var(--card); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--hairline); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 1.375rem; }
.card-head .eyebrow { font-size: var(--text-caption); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* 皮肤：四个可点的色板，照 6e 那排 */
.skins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.skin { border-radius: 16px; padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 2px solid transparent; background: var(--bg); transition: border-color 0.15s, transform 0.15s; }
.skin:hover { transform: translateY(-1px); }
.skin.on { border-color: var(--ink); background: var(--card); }
.skin i { width: 40px; height: 40px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7); }
.skin span { font-size: var(--text-caption); color: var(--ink-2); }

/* 社交链接列表：每行 平台 / 名称 / 网址 / 删除 */
.socials { display: flex; flex-direction: column; gap: 8px; }
.social-row { display: grid; grid-template-columns: 128px 1fr 1.6fr auto; gap: 8px; align-items: center; }
.social-row select, .social-row input { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); outline: none; width: 100%; }
.social-row select:focus, .social-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.social-row .remove { width: 34px; height: 34px; border-radius: 50%; color: var(--faint); font-size: 1.125rem; line-height: 1; display: grid; place-items: center; }
.social-row .remove:hover { background: #fbe9e9; color: var(--danger); }
.social-row input[aria-invalid="true"], .social-row select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px #d7474720; }
.social-field-error { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: 14px; line-height: 1.5; }
.workspace-error .error-locate { margin-left: 12px; color: inherit; text-decoration: underline; font-weight: 600; }
.socials-empty { color: var(--faint); font-size: var(--text-caption); padding: 6px 0; }
@media (max-width: 640px) { .social-row { grid-template-columns: 1fr 1fr; } .social-row input:last-of-type { grid-column: 1 / -1; } }

.toggle { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.toggle-text { display: flex; flex-direction: column; gap: 3px; }
.toggle-text strong { font-weight: 500; }
.toggle-text span { color: var(--muted); font-size: var(--text-caption); line-height: 1.5; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: rgba(21, 23, 30, 0.14); position: relative; transition: background 0.15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

.card .error { padding-top: 2px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--faint); font-size: var(--text-caption); }
.address-card { background: var(--accent-wash); border-color: transparent; }
.address-card code { font-family: var(--font-mono); font-size: var(--text-caption); color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: var(--text-caption); box-shadow: 0 10px 30px rgba(21, 23, 30, 0.25); z-index: 20; }

/* ---------- 区块编辑 ---------- */
.sections { display: flex; flex-direction: column; gap: 10px; }
.section-card { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden; }
.section-card.off { opacity: 0.55; }
.section-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--hairline); }
.section-type { font-family: var(--font-mono); font-size: var(--text-caption); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); background: var(--accent-wash); border-radius: 999px; padding: 4px 9px; flex: none; }
.section-head input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 4px; font-size: var(--text-control); font-weight: 500; outline: none; }
.section-head input:focus { box-shadow: inset 0 -1px 0 var(--accent); }
.section-tools { display: flex; gap: 2px; flex: none; }
.section-tools button { width: 30px; height: 30px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; font-size: var(--text-body); }
.section-tools button:hover { background: var(--bg); color: var(--ink); }
.section-tools button:disabled { opacity: 0.3; cursor: default; }
.section-tools button.danger:hover { background: #fbe9e9; color: var(--danger); }
.section-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; gap: 6px; align-items: center; }
.item-row.cols-2 { grid-template-columns: 1fr 1.4fr auto; }
.item-row.cols-3 { grid-template-columns: 1fr 1.4fr 84px auto; }
.item-row.cols-4 { grid-template-columns: 1fr 1.2fr 1.2fr 84px auto; }
.item-row.cols-1 { grid-template-columns: 1fr auto; }
.item-row input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--card); outline: none; width: 100%; font-size: var(--text-control); }
.item-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.item-row .remove { width: 30px; height: 30px; border-radius: 50%; color: var(--faint); font-size: var(--text-input-mobile); display: grid; place-items: center; }
.item-row .remove:hover { background: #fbe9e9; color: var(--danger); }
.item-empty { color: var(--faint); font-size: var(--text-caption); }
.add-item { align-self: flex-start; color: var(--accent); font-size: var(--text-body); padding: 4px 2px; }
.add-item:hover { text-decoration: underline; }
.chooser { display: flex; flex-wrap: wrap; gap: 6px; }
.chooser .ghost { padding: 8px 12px; font-size: var(--text-body); }
@media (max-width: 640px) {
  .item-row.cols-2, .item-row.cols-3, .item-row.cols-4 { grid-template-columns: 1fr auto; }
  .item-row.cols-3 input:nth-child(-n+3), .item-row.cols-4 input:nth-child(-n+4) { grid-column: 1; }
}

/* ---------- 上传 ---------- */
.upload-btn { white-space: nowrap; padding: 10px 12px; font-size: var(--text-body); flex: none; }
.upload-btn.busy { opacity: 0.5; cursor: progress; }
.item-row .upload-btn { padding: 8px 10px; font-size: var(--text-body); border-radius: 10px; }
.item-row.cols-4 { grid-template-columns: 1fr 1.2fr 1.2fr auto 84px auto; }
@media (max-width: 640px) { .item-row.cols-4 { grid-template-columns: 1fr auto; } }

.announcement { background: var(--accent-wash); color: var(--ink-2); border-radius: 12px; padding: 10px 12px; font-size: var(--text-caption); line-height: 1.55; white-space: pre-line; }
.announcement.maintenance { background: #fbe9e9; color: var(--danger); }

/* 会员卡片 */
.member-now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.member-now strong { font-size: 1.0625rem; }
.member-now span { color: var(--faint); font-size: var(--text-caption); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.plan { border: 1px solid var(--hairline); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.plan.is-current { border-color: var(--ink, #111); }
.plan h3 { margin: 0; font-size: var(--text-body); }
.plan p { margin: 0; color: var(--faint); font-size: var(--text-caption); line-height: 1.5; }
.plan .price-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.plan .price-row button { flex: 1; min-height: 34px; border: 1px solid var(--hairline); border-radius: 10px; background: transparent; font: inherit; font-size: var(--text-body); cursor: pointer; }
.plan .price-row button:hover { border-color: var(--ink, #111); }
.plan .price-row button:disabled { opacity: .45; cursor: default; }
.orders { display: flex; flex-direction: column; gap: 8px; }
.order { border: 1px dashed var(--hairline); border-radius: 12px; padding: 10px 12px; font-size: var(--text-caption); display: flex; flex-direction: column; gap: 6px; }
.order.is-pending { border-style: solid; }
.order .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.order .row code { font-size: var(--text-caption); }
.order .msg { color: var(--faint); line-height: 1.5; }
.order button { border: 0; background: transparent; color: var(--faint); font: inherit; font-size: var(--text-body); cursor: pointer; text-decoration: underline; }

/* 认证卡片 */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
#verify-form textarea { width: 100%; box-sizing: border-box; }
.verified-mark { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-caption); color: #1d6fe0; }
#verify-actions button { border: 0; background: transparent; color: var(--faint); font: inherit; font-size: var(--text-body); cursor: pointer; text-decoration: underline; }

/* 企业 */
.org-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-row strong { font-size: var(--text-body); }
.org-row small { display: block; color: var(--faint); font-size: var(--text-caption); margin-top: 2px; }
.org-row .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.org-row .actions button, .invite-row button { border: 1px solid var(--hairline); border-radius: 10px; background: transparent; font: inherit; font-size: var(--text-body); padding: 6px 10px; cursor: pointer; }
.org-row .actions button.primary-ish { border-color: var(--ink, #111); }
.org-row .actions input[type="text"] { border: 1px solid var(--hairline); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: var(--text-control); width: 110px; }
.invite-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.invite-row code { font-size: var(--text-control); letter-spacing: .12em; }
.invite-row small { color: var(--faint); font-size: var(--text-caption); }
#org-invite-role { border: 1px solid var(--hairline); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: var(--text-control); background: transparent; }
.mode-org #membership-card .card-head h2::after { content: ' · 企业'; color: var(--faint); font-weight: 400; }

/* 模板选择 */
.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.template { border: 2px solid transparent; border-radius: 16px; background: var(--bg); padding: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.template:hover { transform: translateY(-1px); }
.template.on { border-color: var(--ink); background: var(--card); }
.template.locked { opacity: 1; }
.template strong { font-size: var(--text-caption); }
.template small { color: var(--faint); font-size: var(--text-caption); line-height: 1.4; }
.template .lock { font-size: var(--text-caption); color: var(--faint); }

/* 作品库 */
.usage-bar { height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.usage-bar i { display: block; height: 100%; width: 0; background: var(--ink, #111); border-radius: 999px; transition: width .3s; }
.usage-bar i.warn { background: #d9822b; }
.work-row { display: flex; align-items: center; gap: 10px; }
.work-row .thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--bg); overflow: hidden; flex: 0 0 40px; display: flex; align-items: center; justify-content: center; font-size: var(--text-caption); color: var(--faint); }
.work-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-row .meta { flex: 1; min-width: 0; }
.work-row .meta strong { display: block; font-size: var(--text-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-row .meta small { color: var(--faint); font-size: var(--text-caption); }
.work-row button { border: 0; background: transparent; color: var(--faint); font: inherit; font-size: var(--text-body); cursor: pointer; text-decoration: underline; }
.pick-work { border: 1px solid var(--hairline); border-radius: 8px; padding: 6px; font: inherit; font-size: var(--text-body); max-width: 140px; background: transparent; }

/* 域名 */
.dns-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dns-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 8px; align-items: center; }
.dns-row code { font-size: var(--text-caption); word-break: break-all; background: var(--bg); padding: 4px 6px; border-radius: 6px; user-select: all; }
#domain-actions button { border: 1px solid var(--hairline); border-radius: 10px; background: transparent; font: inherit; font-size: var(--text-body); padding: 6px 10px; cursor: pointer; }

/* 数据 */
.bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; align-items: end; height: 64px; }
.bars i { display: block; background: var(--ink, #111); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.bars i.today { background: #1d6fe0; }


/* 微信扫码付款：二维码就地显示在待付单下面 */
.orders .pay-qr { display: block; width: 180px; height: 180px; margin: 8px 0; background: #fff; border: 1px solid var(--line, #e3e6ec); border-radius: 10px; padding: 6px; }

.trial { margin: 8px 0; }
.trial button { padding: 8px 14px; border-radius: 999px; background: var(--accent, #2f6df4); color: #fff; font-size: var(--text-body); }

/* --- 拖拽排序（只在电脑上；手机端的 App 用 ↑↓ 按钮） --- */
.drag-handle {
  flex: none;
  width: 20px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: rgba(21, 23, 30, 0.28);
  font-size: var(--text-caption);
  line-height: 1;
  user-select: none;
}

.drag-handle:active { cursor: grabbing; }
.section-card:hover .drag-handle,
.item-editor:hover .drag-handle { color: rgba(21, 23, 30, 0.5); }

.dragging { opacity: 0.45; }

/* 拖到哪一条上，那一条就顶出一条线——不做占位块，避免拖动时整页跳动 */
.drop-target { box-shadow: 0 -2px 0 0 #2f6df4; }

/* Desktop shell. The editing workspace and the public-page preview are separate surfaces. */
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 28px 18px 20px; background: #fff; border-right: 1px solid var(--line); }
.sidebar .brand { padding: 0 10px; gap: 8px; }
.brand strong { font-family: var(--font-sans); font-size: 1.4375rem; font-weight: 700; letter-spacing: -.8px; }
.sidebar .brand span { font-size: 0.75rem; letter-spacing: .13em; margin-top: 5px; }
.workspace-label { display: flex; gap: 10px; align-items: center; margin: 32px 4px 28px; padding: 12px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workspace-icon { display: grid; place-items: center; width: 30px; height: 30px; color: #2f6df4; background: #eaf1ff; border: 1px solid #dce7fc; border-radius: 8px; font-weight: 700; }
.workspace-label strong { font-size: var(--text-caption); font-weight: 600; }
.workspace-label small { display: block; margin-top: 5px; font-size: var(--text-caption); color: var(--faint); letter-spacing: .08em; }
.side-nav { display: grid; gap: 6px; }
.side-nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 9px; text-align: left; color: #646a78; font-size: var(--text-body); }
.side-nav button:hover { background: #f5f6f8; }
.side-nav button[aria-current="page"] { background: #edf2ff; color: #285bce; font-weight: 600; }
.side-nav svg { width: 19px; height: 19px; }
.nav-caption { padding: 30px 14px 8px; font-size: var(--text-caption); color: var(--faint); }
.sidebar-footer { display: block; margin-top: auto; padding: 10px 0 0; border-top: 1px solid var(--line); }
.account-copy { min-width: 0; flex: 1; }
.account-chevron { color: var(--muted); }
.account-menu[open] .account-chevron { transform: rotate(180deg); }
.sidebar-footer strong { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-caption); }
.sidebar-footer small { display: block; margin-top: 4px; color: var(--faint); font-size: var(--text-caption); }
.workspace-main { min-width: 0; }
.topbar { position: sticky; top: 0; height: 76px; padding: 0 32px; display: flex; align-items: center; gap: 18px; background: #fff; border-bottom: 1px solid var(--line); z-index: 5; }
.breadcrumb { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: var(--text-caption); white-space: nowrap; }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.spacer { flex: 1; }
.status { color: #758079; font-size: var(--text-caption); white-space: nowrap; }
.status::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 2px; }
.status.saving { color: var(--accent); }.status.dirty { color: #a17323; }.status.error { color: var(--danger); }
.share-button { border: 1px solid #e0e3e9; border-radius: 9px; padding: 10px 15px; font-size: var(--text-body); font-weight: 500; }
.publish { background: #171a22; color: #fff; padding: 11px 18px; border-radius: 9px; font-size: var(--text-body); font-weight: 600; }
.avatar-btn { width: 32px; height: 32px; background: #eaf0ff; border-radius: 50%; color: #3561c6; }
.account-menu { position: relative; flex: none; z-index: 8; }
.account-menu > summary { display: flex; align-items: center; gap: 10px; padding: 8px 6px; min-height: 48px; border-radius: 9px; cursor: pointer; list-style: none; text-align: left; }
.account-menu > summary:hover, .account-menu[open] > summary { background: var(--accent-wash); }
.account-menu .avatar-btn { display: grid; place-items: center; flex: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-dropdown { position: absolute; bottom: calc(100% + 8px); left: 0; width: max(168px, 100%); padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #15233816; }
.account-dropdown > span { display: block; padding: 8px 10px; font-size: var(--text-caption); color: var(--muted); }
.account-dropdown > button { display: block; width: 100%; padding: 10px; text-align: left; border-radius: 6px; font-size: var(--text-body); color: var(--danger); }
.account-dropdown > button:hover,.account-dropdown > button:focus-visible { background: #fff0f0; }
.account-dropdown > #account-info-button { color: var(--ink); }
.account-dropdown > #account-info-button:hover,.account-dropdown > #account-info-button:focus-visible { background: var(--accent-wash); }
.account-info-dialog { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: 20px; padding: 24px; color: var(--ink); background: var(--card); }
.account-info-dialog::backdrop { background: #15171e55; }
.account-info-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-info-dialog h2 { margin: 0; font-size: 20px; }
.account-info-dialog dt { color: var(--muted); font-size: 14px; margin-top: 16px; }
.account-info-dialog dd { margin: 6px 0 0; font-size: 16px; overflow-wrap: anywhere; user-select: text; }
.account-info-dialog > button { margin-top: 12px; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100dvh - 76px); }
.editor { min-width: 0; width: 100%; max-width: 960px; justify-self: center; padding: 42px clamp(24px, 3vw, 56px) 80px; }
.workspace-heading .eyebrow { font-size: var(--text-caption); letter-spacing: .16em; color: var(--muted); }
.workspace-heading h1 { font-size: 1.875rem; line-height: 1.3; font-weight: 600; letter-spacing: -1px; margin: 12px 0 10px; outline: none; }
.workspace-heading > p:last-child { color: var(--muted); font-size: var(--text-caption); line-height: 1.8; }
.workspace-tabs { display: flex; gap: 28px; margin: 26px 0 26px; border-bottom: 1px solid #e2e5eb; }
.workspace-tabs button { position: relative; padding: 0 0 15px; font-size: var(--text-body); color: var(--muted); }
.workspace-tabs button[aria-current="page"] { color: var(--ink); font-weight: 600; }
.workspace-tabs button[aria-current="page"]::after { content: ''; height: 2px; position: absolute; bottom: -1px; left: 0; right: 0; background: var(--ink); }
.workspace-panel { display: flex; flex-direction: column; gap: 22px; }
.workspace-panel:not(#workspace-content):not(#workspace-profile):not(#workspace-appearance) { margin-top: 30px; }
.profile-overview { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid #e5e7ee; background: #fff; border-radius: 14px; }
.profile-monogram { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; color: #4066b8; background: #edf2ff; font-size: 1.3125rem; }
.profile-overview strong { font-size: var(--text-body); font-weight: 600; }.profile-overview p { font-size: var(--text-caption); color: var(--muted); margin-top: 6px; line-height: 1.5; }
.profile-overview .ghost { margin-left: auto; white-space: nowrap; border-radius: 8px; padding: 8px 12px; font-size: var(--text-body); }
.content-toolbar { display: flex; gap: 16px; align-items: center; }
.content-toolbar > span { margin-left: auto; font-size: var(--text-caption); color: var(--muted); }
.add-content { display: block; background: #316bf2; color: #fff; border-radius: 10px; min-width: 180px; padding: 14px 22px; font-size: var(--text-body); font-weight: 600; }
.card { border: 1px solid #e5e7ed; border-radius: 14px; padding: 24px; gap: 18px; box-shadow: none; }
.card-head h2 { font-family: var(--font-sans); font-size: var(--text-control); font-weight: 600; }.card-head .eyebrow { font-size: var(--text-caption); color: var(--muted); }
#workspace-content > .card:has(#sections) { padding: 0; background: transparent; border: 0; gap: 12px; }
#workspace-content > .card:has(#sections) > .note { display: none; }
#workspace-content > .card:has(#sections) .card-head { padding: 0 2px; }
.section-card { background: #fff; border: 1px solid #e0e4ec; border-radius: 13px; }
.section-head { min-height: 56px; padding: 10px 16px; border-bottom: 1px solid #f0f1f5; }
.section-type { border-radius: 5px; font-size: var(--text-caption); letter-spacing: 0; padding: 5px 8px; background: #f0f3fa; color: #66758e; }
.section-head input { font-size: var(--text-control); font-weight: 600; }
.section-tools button { width: 27px; height: 28px; font-size: var(--text-body); }
.section-body { padding: 8px 16px 14px; gap: 8px; }
.item-editor { border: 1px solid #edf0f5; border-radius: 9px; background: #fff; }
.item-summary { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px; list-style: none; cursor: pointer; }
.item-summary::-webkit-details-marker { display: none; }
.item-symbol { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: #f2f5fa; color: #687c9b; font-size: 1.125rem; }
.item-summary-copy { flex: 1; min-width: 0; }.item-summary-copy strong { font-size: var(--text-caption); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-summary-copy small { display: block; margin-top: 5px; font-size: var(--text-caption); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-summary > .item-edit-label { font-size: var(--text-caption); color: var(--muted); }
.item-editor .item-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; border-top: 1px solid #edf0f5; }
.item-fields label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }.item-fields label > span { color: var(--muted); font-size: var(--text-caption); }
.item-fields input,.item-fields textarea,.item-fields select { width: 100%; border: 1px solid #e2e6ee; border-radius: 7px; padding: 10px; font-size: var(--text-control); background: #fff; min-width: 0; }
.item-fields .remove { color: var(--danger); justify-self: end; align-self: end; padding: 8px; font-size: var(--text-caption); }
.add-item { padding: 8px; font-size: var(--text-body); color: #73819a; }
.social-row { grid-template-columns: 110px 1fr 1.3fr 26px; }.social-row select,.social-row input { font-size: var(--text-control); border-radius: 7px; padding: 9px; }
.field > span { font-family: var(--font-sans); font-size: var(--text-caption); letter-spacing: 0; }.field input,.field textarea,.field select { border-radius: 8px; font-size: var(--text-control); }
.templates { grid-template-columns: repeat(3,1fr); }.template { border-radius: 10px; padding: 12px; }.skin { border-radius: 9px; }
.workspace-error { margin-bottom: 16px; padding: 12px; background: #fff0f0; border-radius: 8px; }
.preview-pane { position: sticky; top: 76px; align-self: start; height: calc(100dvh - 76px); display: flex; flex-direction: column; align-items: center; padding: 26px 25px 18px; gap: 14px; border-left: 1px solid #e8ebf0; background: #f0f2f6; overflow: auto; }
.preview-heading { display: flex; width: 100%; justify-content: space-between; align-items: center; }.preview-heading strong { font-size: var(--text-caption); font-weight: 600; }.preview-heading span { font-size: var(--text-caption); letter-spacing: .1em; color: #a2aab7; }
.preview-address { font-size: var(--text-caption); color: #66738c; display: flex; align-items: center; gap: 6px; padding: 6px 0; }.preview-address code { font-family: var(--font-sans); }
.preview-tabs { display: flex; gap: 3px; background: #e5e9f0; border-radius: 8px; padding: 3px; }
.preview-tabs button { padding: 7px 13px; border-radius: 6px; font-size: var(--text-body); color: #87909f; }.preview-tabs button.on { background: #fff; color: #3e4757; box-shadow: 0 1px 4px #1523380a; }
.phone { width: 282px; height: min(582px,calc(100dvh - 296px)); min-height: 340px; flex: none; border: 7px solid #fff; border-radius: 34px; overflow: hidden; background: #fff; box-shadow: 0 12px 45px #22304716,0 0 0 1px #dfe3ea; }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-pane .address-card { background: none; width: 100%; border: 0; padding: 0; }.preview-pane .card-foot { flex-wrap: wrap; justify-content: center; text-align: center; font-size: var(--text-caption); gap: 8px; }.preview-pane .address-card code { display: none; }
.preview-hint { color: var(--muted); font-size: var(--text-caption); text-align: center; line-height: 1.6; }
#content-picker { border: 1px solid #e5e8ef; border-radius: 20px; padding: 30px; width: min(560px,calc(100% - 32px)); margin: auto; color: var(--ink); box-shadow: 0 30px 120px #101c3526; }
#content-picker::backdrop { background: #14203355; backdrop-filter: blur(3px); }
#content-picker header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }#content-picker h2 { font-size: 1.375rem; margin-top: 9px; }#picker-close { width: 36px; height: 36px; font-size: 1.625rem; color: #9aa1ae; }
#content-picker > p { font-size: var(--text-caption); color: var(--muted); margin: 16px 0 24px; }
#content-picker .chooser { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }#content-picker .chooser button { border-radius: 10px; padding: 22px; text-align: left; }
.shell.wide-workspace .work { grid-template-columns: minmax(0,1fr); }.shell.wide-workspace .preview-pane { display: none; }.shell.wide-workspace .editor { max-width: 1100px; justify-self: start; }
@media (min-width:1700px) { .work { grid-template-columns: minmax(0,1fr) 420px; }.preview-pane { padding-inline: 36px; }.phone { width: 310px; } }
@media (max-width:1200px) { .shell { grid-template-columns: 184px minmax(0,1fr); }.sidebar { padding-inline: 10px; }.work { grid-template-columns: minmax(0,1fr) 304px; }.preview-pane { padding-inline: 12px; }.phone { width: 270px; }.topbar { padding-inline: 22px; gap: 12px; }.editor { padding-inline: 24px; }.breadcrumb { display: none; }.social-row { grid-template-columns: 1fr 1fr; } }
@media (max-width:980px) { .shell { grid-template-columns: 76px minmax(0,1fr); }.sidebar .brand { padding: 0 10px; }.sidebar .brand strong,.sidebar .brand span,.side-nav span,.workspace-label,.account-copy,.account-chevron,.nav-caption { display: none; }.side-nav { margin-top: 36px; }.side-nav button { justify-content: center; padding: 0; }.work { grid-template-columns: minmax(0,1fr); }.preview-pane { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); padding: 24px; }.phone { height: 550px; }.preview-heading { max-width: 400px; }.editor { max-width: 850px; }.topbar .status { display: none; } }
@media (max-width:600px) { .shell { grid-template-columns: 58px minmax(0,1fr); }.sidebar { padding: 20px 6px; }.sidebar .brand { padding: 0 7px; }.brand img { width: 26px; height: 26px; }.editor { padding: 28px 16px; }.topbar { height: 64px; padding: 0 12px; gap: 8px; }.publish,.share-button { padding: 10px; font-size: var(--text-body); }.avatar-btn { display:none; }.workspace-heading h1 { font-size: 1.625rem; }.workspace-heading > p:last-child { font-size: var(--text-caption); }.workspace-tabs { gap: 20px; }.workspace-tabs button { font-size: var(--text-body); }.profile-overview { flex-wrap: wrap; padding: 16px; }.content-toolbar { flex-wrap: wrap; }.content-toolbar > span { display: none; }.add-content { width: 100%; }.card { padding: 16px; }.templates { grid-template-columns: 1fr 1fr; }.item-editor .item-fields { grid-template-columns: 1fr; }.section-head { flex-wrap: wrap; gap: 6px; }.section-head input { flex-basis: 50%; }.section-tools { margin-left:auto; }.item-summary { gap: 7px; padding: 10px; }.item-edit-label { display: none; }.preview-pane { padding: 20px 10px; }.phone { width: min(282px,100%); }.workspace-tabs { overflow-x: auto; } }

.item-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.item-actions button { padding: 7px 12px; border-radius: 7px; border: 1px solid var(--line); font-size: var(--text-body); }
.item-actions .remove { width: auto; height: auto; color: #b43f3f; }

#org-exit { margin: 0 0 16px; }

/* App/Studio shared profile and personal commerce settings. */
.workspace-panel fieldset { border: 0; padding: 0; margin: 12px 0; display: grid; gap: 14px; min-width: 0; }
.check-field { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.management-links { display: grid; gap: 12px; }.management-links a { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.store-link-row { padding: 16px 0; border-bottom: 1px solid var(--line); }.store-link-row p { color: var(--muted); }.store-link-row button { margin-right: 8px; }
#store-share { overflow-wrap: anywhere; }.workspace-tabs { flex-wrap: wrap; }

/* 运营公告与会员推广：使用现有订阅入口。 */
.shell { --promo-offset: 0px; }
.shell.has-promotion { --promo-offset: 52px; grid-template-rows: auto 1fr; }
.membership-promo { grid-column: 1 / -1; position: sticky; top: 0; z-index: 8; min-height: 52px; padding: 8px 28px; display: flex; align-items: center; justify-content: center; gap: 24px; background: var(--accent-wash); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--accent) 16%, transparent); font-size: var(--text-caption); }
.promo-brand { white-space: nowrap; font-family: var(--font-serif); font-size: 1.375rem; }.promo-brand b { font: 600 .75rem/1.4 var(--font-sans); letter-spacing: .1em; color: var(--accent); margin-left: 7px; }
.promo-copy { display: flex; align-items: center; justify-content: center; gap: 14px; flex: 1; min-width: 0; }.promo-copy strong { font-weight: 500; }.promo-copy span { color: var(--muted); }
#promo-action { padding: 7px 16px; border: 1px solid var(--accent); background: var(--accent); border-radius: 20px; color: var(--card); white-space: nowrap; }
#promo-controls { display: flex; align-items: center; gap: 8px; font-size: var(--text-caption); color: var(--muted); }#promo-controls button { min-width: 26px; height: 30px; color: var(--accent); }
.has-promotion .sidebar { top: var(--promo-offset); height: calc(100dvh - var(--promo-offset)); }.has-promotion .topbar { top: var(--promo-offset); }.has-promotion .preview-pane { top: calc(76px + var(--promo-offset)); height: calc(100dvh - 76px - var(--promo-offset)); }
.announcement-bell { position: relative; width: 32px; height: 32px; display: grid; place-items: center; flex: none; font-size: 1.375rem; border-radius: 50%; color: var(--ink-2); }
.announcement-bell svg { width: 19px; height: 19px; }.announcement-bell > span { position: absolute; right: -3px; top: -3px; min-width: 16px; padding: 1px 4px; border-radius: 12px; background: var(--accent); color: var(--card); font: 600 .75rem/1.4 var(--font-sans); }
.announcement-nav { display: flex; justify-content: space-between; gap: 12px; padding: 14px; margin-top: auto; text-align: left; color: var(--muted); font-size: var(--text-caption); }.announcement-nav + .sidebar-footer { margin-top: 0; }
.announcement-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; color: var(--muted); font-size: var(--text-caption); }
.announcement-card { display: flex; width: 100%; align-items: start; gap: 20px; padding: 26px 0; text-align: left; border-top: 1px solid var(--line); }.announcement-card:hover .announcement-card-title { color: var(--accent); }
.announcement-card-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; background: var(--accent-wash); border-radius: 14px; color: var(--accent); font-family: var(--font-serif); font-size: 1.5rem; }
.announcement-card-copy { flex: 1; min-width: 0; }.announcement-card-title { display: block; font-size: 1.1875rem; font-weight: 500; margin: 10px 0; overflow-wrap: anywhere; }.announcement-card-meta { color: var(--muted); font-size: var(--text-caption); }.announcement-card-summary { display: block; color: var(--muted); font-size: var(--text-caption); line-height: 1.8; overflow-wrap: anywhere; }.notice-unread { align-self: center; color: var(--accent); font-size: var(--text-caption); }
.announcement-dialog { width: min(500px, calc(100% - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 40px; border: 0; border-radius: 26px; color: var(--ink); background: var(--card); box-shadow: 0 32px 100px color-mix(in srgb, var(--ink) 20%, transparent); text-align: center; }
.announcement-dialog::backdrop { background: color-mix(in srgb, var(--ink) 36%, transparent); backdrop-filter: blur(3px); }.announcement-close { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); font-size: 1.5rem; color: var(--muted); }
.announcement-art { width: 140px; height: 130px; margin: 8px auto 24px; position: relative; display: grid; place-items: center; }.announcement-art img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 12px 20px color-mix(in srgb, var(--accent) 16%, transparent)); }.announcement-art i { position: absolute; top: 0; right: 0; font-size: 2.25rem; color: var(--accent-soft); font-style: normal; }
.announcement-dialog h2 { font-size: 1.8125rem; line-height: 1.3; margin: 14px 0; overflow-wrap: anywhere; }#announcement-summary { font-size: var(--text-control); line-height: 1.7; color: var(--muted); margin-bottom: 20px; white-space: pre-line; }#announcement-body { text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-body); line-height: 1.9; color: var(--ink-2); margin: 20px 0 28px; }.announcement-dialog .primary { width: 100%; justify-content: center; border-radius: 30px; background: var(--accent); color: var(--card); }
@media(max-width:980px){.promo-copy span { display: none; }.membership-promo { gap: 12px; padding-inline: 16px; }.has-promotion .preview-pane { height: auto; }.announcement-nav { font-size: var(--text-caption); padding: 10px 0; flex-direction: column; }}
@media(max-width:600px){.promo-brand { display: none; }.membership-promo { padding: 8px 12px; gap: 8px; flex-wrap: wrap; position: static; }.shell.has-promotion { --promo-offset: 0px; }.promo-copy { flex-basis: 50%; font-size: var(--text-caption); }#promo-controls { gap: 0; }#promo-action { padding: 6px 10px; font-size: var(--text-caption); }.announcement-dialog { padding: 30px 22px; }.announcement-dialog h2 { font-size: 1.5625rem; }.announcement-card { gap: 12px; }.announcement-card-icon { width: 38px; height: 38px; }.announcement-card-title { font-size: 1.0625rem; }}
@media(prefers-reduced-motion:no-preference){.promo-copy.is-changing { animation: promo-slide .3s ease-out; }@keyframes promo-slide { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }}
.promo-copy strong,.promo-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.promo-copy span { max-width: 45%; }

.announcement-card-icon img { width: 32px; height: 32px; object-fit: contain; }
#promo-action:hover,.announcement-dialog .primary:hover { background: color-mix(in srgb, var(--accent) 90%, var(--ink)); }
#promo-controls button:hover,.announcement-bell:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.announcement-dialog .eyebrow { color: var(--accent); }

/* 内容编辑：居中操作列与独立的固定手机预览。 */
.editing-content .workspace-heading { display: none; }
.editing-content .editor { max-width: 760px; padding-top: 0; }
.editing-content .workspace-tabs { margin: 0 0 26px; padding-top: 16px; gap: 24px; }
.editing-content #workspace-content { gap: 24px; }
.profile-overview { padding: 0; border: 0; background: transparent; border-radius: 0; gap: 16px; }
.profile-monogram { width: 76px; height: 76px; font-size: 1.75rem; overflow: hidden; }
.profile-monogram img { width: 100%; height: 100%; object-fit: cover; }
.profile-overview strong { font-size: var(--text-input-mobile); }
.profile-overview p { font-size: var(--text-body); color: var(--muted); margin-top: 5px; }
.profile-overview .ghost { border: 0; color: var(--muted); }
.profile-socials { display: flex; gap: 7px; margin-top: 8px; color: var(--muted); }
.profile-socials span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); font-size: var(--text-body); }
.add-content { width: 100%; min-height: 48px; padding: 12px 24px; border-radius: 30px; background: var(--accent); font-size: var(--text-control); box-shadow: 0 2px 3px #15171e10; }
.add-content:hover { background: #245dd6; }
.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.collection-toolbar .ghost { border: 1px solid var(--line); border-radius: 24px; padding: 10px 16px; font-size: var(--text-body); background: transparent; }
.collection-toolbar .note { font-size: var(--text-caption); margin: 0; }
.content-list { min-width: 0; }
.content-empty { min-height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.content-empty img { width: 64px; height: 64px; opacity: .18; filter: grayscale(1); margin-bottom: 24px; }
.content-empty h2 { font-size: var(--text-input-mobile); font-weight: 500; margin: 0 0 8px; }
.content-empty p { font-size: var(--text-caption); line-height: 1.7; }
.social-editor { width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 28px; border: 0; border-radius: 24px; color: var(--ink); background: var(--card); box-shadow: 0 24px 80px #15171e30; overflow: auto; }
.social-editor::backdrop { background: #15171e66; }
.social-editor header, .social-editor footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.social-editor h2 { margin: 0; font-size: 1.25rem; }
.social-editor header button { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 1.5rem; }
.social-editor .note { margin: 12px 0 24px; }
.social-editor footer { margin-top: 24px; }
.social-editor footer button { width: auto; flex: 0 0 auto; white-space: nowrap; }
.social-editor footer .primary { min-width: 96px; text-align: center; background: var(--accent); }
.social-editor .social-row { grid-template-columns: 110px minmax(0,1fr) minmax(0,1.3fr) 34px; }
@media (max-width: 640px) { .social-editor { padding: 24px 20px; } .social-editor .social-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px; } .social-editor .social-row input:last-of-type { grid-column: 1 / 3; grid-row: 2; } .social-editor .social-row .remove { grid-column: 3; grid-row: 1 / 3; } }

.section-card { border-radius: 18px; background: var(--card); }
.preview-pane { background: #fafafa; gap: 14px; }
.preview-heading { display: none; }
.preview-address { width: 100%; display: flex; justify-content: center; position: relative; padding: 12px 35px; border: 1px solid var(--line); border-radius: 28px; color: var(--ink); font-size: var(--text-caption); min-height: 42px; }
.preview-address code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-address > span { position: absolute; right: 18px; font-size: 1.0625rem; }
.preview-tabs { background: transparent; padding: 0; gap: 14px; }
.preview-tabs button { padding: 6px 0; color: var(--muted); font-size: var(--text-body); border-radius: 0; }
.preview-tabs button.on { color: var(--accent); box-shadow: none; background: transparent; border-bottom: 2px solid var(--accent); }
.phone { border: 0; border-radius: 24px; background: #edeef0; box-shadow: 0 8px 36px #15171e12, 0 0 0 1px #15171e08; width: min(334px,100%); height: min(720px,calc(100dvh - 220px)); min-height: 400px; }
.publish { background: var(--accent); border-radius: 24px; }
.share-button { border-radius: 24px; }
@media(min-width:1100px) {
  .workspace-main { display: grid; grid-template-columns: minmax(0,1fr) clamp(340px,24.5vw,470px); grid-template-rows: 64px 1fr; }
  .workspace-main > .topbar { grid-column: 1; grid-row: 1; height: 64px; padding-inline: 22px; gap: 12px; }
  .workspace-main > .work { display: contents; }
  .editor { grid-column: 1; grid-row: 2; }
  .preview-pane,.has-promotion .preview-pane { grid-column: 2; grid-row: 1 / 3; top: var(--promo-offset); height: calc(100dvh - var(--promo-offset)); padding: 12px clamp(24px,3vw,56px) 20px; }
  .preview-address { flex: none; margin-bottom: 6px; }
  .preview-tabs { margin-bottom: 10px; }
  .shell.wide-workspace .workspace-main { grid-template-columns: minmax(0,1fr); }
  .breadcrumb { display: none; }
  .editing-content .editor { max-width: 736px; padding-inline: 48px; }
}
@media(min-width:1700px) { .shell { grid-template-columns: 240px minmax(0,1fr); } }
@media(max-width:1099px) {
  .work { grid-template-columns: minmax(0,1fr); }
  .preview-pane,.has-promotion .preview-pane { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .preview-address { max-width: 380px; }
  .phone { height: 650px; }
}
@media(max-width:600px) {
  .editing-content .editor { padding-top: 0; }
  .editing-content .workspace-tabs { gap: 16px; }
  .profile-monogram { width: 58px; height: 58px; }
  .profile-overview { flex-wrap: nowrap; gap: 12px; }
  .profile-overview strong { font-size: var(--text-body); }
  .profile-overview p { font-size: var(--text-caption); }
  .profile-overview .ghost { padding: 0; font-size: var(--text-body); }
  .profile-socials { gap: 4px; }
  .collection-toolbar { gap: 8px; }
  .collection-toolbar .ghost { font-size: var(--text-body); padding: 9px 12px; }
  .collection-toolbar .note { font-size: var(--text-caption); }
  .content-empty { min-height: 240px; }
}
@media(min-width:1100px) {
  .breadcrumb { display: flex; font-size: 0; gap: 0; }
  .breadcrumb > span { display: none; }
  .breadcrumb strong { font-size: var(--text-body); font-weight: 600; }
}

/* 添加内容目录：搜索、分类与推荐列表。 */
#content-picker { width: min(852px,calc(100% - 40px)); height: min(656px,calc(100dvh - 64px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 26px; background: var(--card); box-shadow: 0 18px 48px #15171e22; overflow: hidden; }
#content-picker[open] { display: flex; flex-direction: column; }
#content-picker::backdrop { background: #e7e6e2c9; backdrop-filter: blur(1px); }
#content-picker > header { padding: 22px 48px; min-height: 72px; border-bottom: 1px solid var(--line); flex: none; }
#content-picker h2 { font: 600 20px/1.3 var(--font-sans); margin: 0; }
#picker-close { width: 28px; height: 28px; background: var(--bg); border-radius: 50%; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.picker-search { margin: 16px 48px 32px; display: flex; align-items: center; gap: 12px; background: #f3f3f2; border-radius: 32px; min-height: 52px; padding: 0 16px; flex: none; }
.picker-search svg { width: 22px; height: 22px; flex: none; }
.picker-search input { width: 100%; min-width: 0; border: 0; outline: none; box-shadow: none; background: transparent; padding: 14px 0; font: var(--text-control)/1.5 var(--font-sans); }
.picker-search:focus-within { box-shadow: 0 0 0 2px var(--accent-wash); }
#picker-url-add { flex: none; font-size: var(--text-caption); color: var(--accent); white-space: nowrap; }
.picker-body { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 20px; padding: 8px 48px 24px; overflow: auto; min-height: 0; }
.picker-categories { display: flex; flex-direction: column; gap: 2px; align-self: start; }
.picker-categories button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 14px; border-radius: 24px; text-align: left; font-size: var(--text-body); min-height: 40px; }
.picker-categories button > span { width: 22px; font-size: 1.3125rem; text-align: center; line-height: 1; }
.picker-categories button[aria-pressed="true"] { background: #f3f3f2; font-weight: 500; }
.picker-categories button:hover,.picker-result:hover { background: var(--accent-wash); }
.picker-content { min-width: 0; }
.picker-shortcuts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 20px; }
.picker-shortcuts button { height: 92px; padding: 16px; border-radius: 24px; background: #f3f3f2; display: flex; flex-direction: column; align-items: start; justify-content: space-between; gap: 10px; font-size: var(--text-body); }
.picker-shortcuts button:hover { background: var(--accent-wash); }
.picker-shortcuts i { color: var(--accent); font-size: 1.5rem; line-height: 1; font-style: normal; }
#picker-results-title { font-size: var(--text-caption); font-weight: 500; margin: 0 12px 16px; }
#picker-feedback { margin: 20px 12px; font-size: var(--text-caption); line-height: 1.8; }
.picker-result { width: 100%; display: flex; gap: 12px; padding: 12px; align-items: center; text-align: left; border-radius: 14px; min-height: 68px; }
.picker-result-icon { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 1.375rem; color: var(--ink-2); }
.picker-result-copy { min-width: 0; flex: 1; }
.picker-result strong { display: block; font: 500 15px var(--font-sans); }
.picker-result small { display: block; font-size: var(--text-caption); line-height: 1.5; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.picker-result-arrow { color: var(--muted); font-size: 1.5rem; }
@media(max-width:700px) {
  #content-picker { width: calc(100% - 24px); height: min(700px,calc(100dvh - 32px)); border-radius: 22px; }
  #content-picker > header { padding: 18px 22px; min-height: 64px; }
  .picker-search { margin: 16px 20px; }
  .picker-body { display: flex; flex-direction: column; gap: 22px; padding: 0 20px 24px; }
  .picker-categories { flex-direction: row; overflow-x: auto; width: 100%; flex: none; padding-bottom: 4px; }
  .picker-categories button { width: auto; white-space: nowrap; gap: 6px; padding: 8px 12px; font-size: var(--text-body); }
  .picker-categories button > span { font-size: var(--text-input-mobile); }
  .picker-shortcuts button { height: 82px; border-radius: 18px; padding: 12px 10px; font-size: var(--text-body); }
  .picker-result { padding-inline: 4px; }
}

/* 右侧预览按 334 × 720 的参考比例展示，模式切换移到卡片下方。 */
.preview-address { order: 0; margin-bottom: 0; }
.preview-pane .phone { order: 1; margin-top: 28px; width: min(334px,100%); height: min(720px,calc(100dvh - 180px)); min-height: 400px; }
.preview-pane .preview-tabs { order: 2; margin: 0; }
.preview-pane .address-card { order: 3; }
.preview-pane .preview-hint { order: 4; }
.preview-pane { gap: 16px; }
@media(max-width:1099px) { .preview-pane .phone { height: 720px; } }

.preview-address svg { width: 18px; height: 18px; display: block; }

/* 主页编辑入口收纳到左侧下拉分组。 */
.side-nav { min-height: 0; overflow-y: auto; flex: 1; align-content: start; }
.home-navigation { min-width: 0; }
.home-navigation > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 9px; color: var(--muted); font-size: var(--text-body); cursor: pointer; list-style: none; }
.home-navigation > summary::-webkit-details-marker { display: none; }
.home-navigation > summary:hover { background: var(--bg); }
.home-navigation.is-current > summary { color: var(--ink); font-weight: 600; }
.home-navigation > summary > svg { width: 19px; height: 19px; flex: none; }
.home-chevron { margin-left: auto; font-size: 1.0625rem; transform: rotate(180deg); }
.home-navigation[open] .home-chevron { transform: none; }
.home-subnav { display: grid; gap: 3px; border-left: 1px solid var(--line); margin: 2px 4px 10px 24px; padding-left: 9px; }
.side-nav .home-subnav button { min-height: 34px; padding: 7px 12px; font-size: var(--text-body); border-radius: 8px; text-align: left; justify-content: flex-start; }
.side-nav .home-subnav button[aria-current="page"] { color: var(--accent); background: var(--accent-wash); }
.editing-content .editor { padding-top: 26px; }
@media(max-width:980px) {
  .sidebar { z-index: 7; }
  .side-nav { overflow: visible; }
  .home-navigation { position: relative; }
  .home-navigation > summary { justify-content: center; padding: 0; }
  .home-navigation .home-chevron { display: block; position: absolute; right: 0; bottom: 2px; font-size: var(--text-caption); }
  .home-subnav { position: absolute; z-index: 10; left: calc(100% + 8px); top: 0; width: 172px; margin: 0; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px #15171e20; }
}

/* Content catalog: fixed navigation, independently scrolling results. */
#content-picker [hidden] { display: none !important; }
.picker-body { flex: 1; overflow: hidden; padding-bottom: 0; }
.picker-content { overflow-y: auto; min-height: 0; padding-bottom: 24px; overscroll-behavior: contain; scrollbar-width: thin; }
.picker-categories { padding-bottom: 20px; }
.picker-categories button { font-size: var(--text-control); min-height: 42px; }
.picker-categories button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.picker-categories button > span { display: flex; flex: none; }
.picker-categories .picker-result-icon { width: 22px; height: 22px; border: 0; border-radius: 0; background: none; }
.picker-categories small { font-size: var(--text-caption); padding: 3px 6px; border-radius: 12px; color: white; background: var(--ink); white-space: nowrap; }
.picker-result-icon svg { width: 24px; height: 24px; }
.picker-result-icon { background: white; }
.picker-result-icon.brand-instagram { background: radial-gradient(circle at 25% 100%,#ffcf61,#fa405c 45%,#943bd0 85%); color: white; border: 0; }
.picker-result-icon.brand-black { background: #080808; color: white; border: 0; }
.picker-result-icon.brand-youtube { color: #ff0033; }
.picker-result-icon.brand-spotify { background: #1ed760; color: #080808; border: 0; }
.picker-result-icon.brand-sky { background: #85bfff; color: white; border: 0; }
.picker-result-icon.brand-orange { background: #ff850c; color: #231b14; border: 0; }
.picker-result-icon.brand-pink { background: #e9c1e9; color: #302631; border: 0; }
.picker-result-icon.brand-lime { background: #d0e82a; color: #293017; border: 0; }
.picker-result-icon.brand-sand { background: #c4c7b8; color: #262a21; border: 0; }
.picker-result-icon.brand-blue { background: #2878ec; color: white; border: 0; }
.picker-result-icon.brand-red { background: #f43c57; color: white; border: 0; }
.picker-shortcuts .picker-result-icon { width: 24px; height: 24px; border: 0; background: none; color: var(--accent); }
#picker-results-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 22px; }
.picker-shortcuts:not([hidden]) ~ #picker-results-title { font-size: var(--text-caption); font-weight: 500; margin-bottom: 16px; }
.picker-group-title { font-size: var(--text-body); font-weight: 500; margin: 24px 12px 18px; }
.picker-group-title:first-child { margin-top: 0; }
.picker-result strong { font-size: var(--text-input-mobile); font-weight: 500; }
.picker-result small { font-size: var(--text-caption); margin-top: 1px; }
.picker-result:hover { background: #f1f2f4; }
.picker-result:focus-visible,.picker-categories button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.picker-catalog-note { margin: 20px 12px 0; color: var(--muted); font-size: var(--text-caption); line-height: 1.6; }
#picker-detail { padding: 24px 48px 32px; overflow: auto; flex: 1; }
#picker-detail-back { color: var(--muted); font-size: var(--text-caption); padding: 0; margin-bottom: 28px; }
.picker-detail-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.picker-detail-heading .picker-result-icon { width: 56px; height: 56px; }
.picker-detail-heading h3 { font-size: 1.375rem; margin: 0 0 6px; }
.picker-detail-heading p { margin: 0; color: var(--muted); font-size: var(--text-caption); }
#picker-detail-form label { display: block; font-size: var(--text-caption); margin: 16px 0 8px; }
#picker-detail-form input,#picker-detail-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: white; font: var(--text-control)/1.5 var(--font-sans); }
#picker-detail-form input:focus,#picker-detail-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
#picker-detail-hint { font-size: var(--text-caption); color: var(--muted); line-height: 1.7; margin: 16px 0 24px; }
#picker-detail-error { color: #b42318; font-size: var(--text-caption); }
#picker-detail-submit { width: 100%; border-radius: 28px; min-height: 48px; }
@media(max-width:700px) {
  .picker-body { gap: 16px; }
  .picker-categories { padding-bottom: 4px; }
  .picker-categories button { font-size: var(--text-body); min-height: 40px; }
  .picker-categories small { display: none; }
  .picker-content { flex: 1; }
  #picker-detail { padding: 20px; }
  .picker-result strong { font-size: var(--text-control); }
}

/* Consistent workspace forms, including dynamically added cooperation entries. */
#profile-metadata { display:grid; gap:28px; min-width:0; }
.metadata-languages { border:0; padding:0; margin:0; min-width:0; }
.metadata-languages legend { font-size: var(--text-caption); font-weight:500; margin-bottom:12px; color:var(--muted); }
.language-options { display:flex; flex-wrap:wrap; gap:10px; }
.language-option { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; cursor:pointer; font-size: var(--text-caption); }
.language-option:has(:checked) { background:var(--accent-wash); color:var(--accent); border-color:var(--accent); }
.language-option:hover { border-color:var(--accent-soft); }
input[type=checkbox] { accent-color:var(--accent); }
.language-option input,.check-field input { width:16px; height:16px; flex:none; }
.metadata-group { display:grid; gap:14px; border-top:1px solid var(--line); padding-top:24px; min-width:0; }
.metadata-group h3 { font-size: var(--text-control); font-weight:600; }
.metadata-group > .ghost { justify-self:start; color:var(--accent); }
.metadata-item { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:20px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.metadata-item > .field:first-child { grid-column:1 / -1; }
.metadata-item > button { justify-self:start; color:var(--danger); }
.workspace-panel fieldset:not(.metadata-languages) { border:0; padding:0; margin:0; min-width:0; display:grid; gap:18px; }
.check-field { display:flex; align-items:center; gap:10px; min-height:40px; font-size: var(--text-caption); }
.workspace-panel .card > h2 { font-size: var(--text-control); font-weight:600; }
.workspace-panel .card > p { line-height:1.7; }
.field,.field-row { min-width:0; }.field-row input { min-width:0; }.field-row > button { flex-shrink:0; }
button:focus-visible,a:focus-visible,.language-option:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:640px) { .metadata-item { grid-template-columns:minmax(0,1fr); padding:16px; }.language-options { gap:8px; }.language-option { min-height:44px; }.field-row { flex-wrap:wrap; } }
@media(max-width:980px) { .side-nav .home-subnav button { min-height:44px; } }

/* Shop workspace shares the editor and live preview shell. */
.shop-tabs { display:flex; gap:10px; border-bottom:1px solid var(--line); padding-bottom:18px; }
.shop-tabs button { padding:10px 20px; border-radius:24px; font-size: var(--text-body); }.shop-tabs button[aria-current] { background:var(--accent-wash);color:var(--accent);font-weight:600; }
.shop-banner { padding:20px 24px; border:1px solid var(--accent-soft); border-radius:20px; background:var(--card); }.shop-banner span { font-weight:600; }.shop-banner p { margin-top:8px;font-size: var(--text-caption);color:var(--muted);line-height:1.7; }
#workspace-storefront .add-content { width:100%; }.shop-collections { display:grid;gap:16px; }.shop-empty { padding:42px 28px;background:var(--card);border-radius:20px;text-align:center; }.shop-empty h3 { font-size: 1.125rem;margin-bottom:12px; }.shop-empty p { color:var(--muted);font-size: var(--text-caption);line-height:1.8; }
.shop-settings { margin-top:24px; }.shop-settings > summary { padding:18px 0;font-weight:500;cursor:pointer; }.shop-row-actions { display:flex;gap:10px;flex-wrap:wrap; }.shop-collection h3 {font-size: var(--text-control);}.shop-product {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;}.shop-product .note {grid-column:1 / -1;}.shop-product a {color:var(--accent);font-size: var(--text-caption);overflow-wrap:anywhere;}
.shop-dialog { width:min(852px,calc(100vw - 32px));max-height:85vh;margin:auto;border:0;border-radius:26px;padding:32px 48px;color:var(--ink);background:var(--card);box-shadow:0 20px 60px #15171e30;overflow:auto; }
.shop-dialog::backdrop { background:#15171e66; }.shop-dialog header {display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;}.shop-dialog h2 {font-size: 1.25rem;}.shop-dialog header button {border:0;background:var(--bg);border-radius:50%;padding:4px;width:32px;height:32px;}
#shop-picker-options,#shop-entry-form,#shop-entry-extra {display:grid;gap:18px;}.shop-choice {display:flex;align-items:center;gap:24px;min-height:128px;width:100%;padding:24px 28px;background:var(--bg);border-radius:22px;text-align:left;}.shop-choice > span:nth-child(2){flex:1;}.shop-choice strong {display:block;font-size: 1.125rem;margin-bottom:10px;}.shop-choice small {color:var(--muted);font-size: var(--text-body);line-height:1.7;}.shop-choice:hover {background:var(--accent-wash);}.shop-choice > span:last-child {font-size: 1.625rem;}.shop-choice .picker-result-icon {background:white;color:var(--accent);width:56px;height:56px;border-radius:16px;}
@media(max-width:640px){.shop-dialog {padding:24px 20px;}.shop-choice {gap:14px;padding:20px 16px;min-height:112px;}.shop-choice strong {font-size: var(--text-control);}.shop-choice small {font-size: var(--text-caption);}.shop-tabs button {padding:10px 16px;}.shop-banner {padding:18px;}}
.editing-storefront .editor { max-width:720px; }.shop-product strong {overflow-wrap:anywhere;}
@media(max-width:480px){.topbar .share-button,.topbar .publish {white-space:nowrap;}.topbar #personal-address {display:none;}}

.picker-library { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; font-size: var(--text-caption); color: var(--muted); }
.picker-library .ghost { border: 1px solid var(--line); border-radius: 20px; padding: 8px 14px; white-space: nowrap; }
.collection-toolbar .note { margin-left: auto; }

.brand-footer-control { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; margin-top: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.brand-footer-control strong { font-size: var(--text-body); } .brand-footer-control .note { margin: 8px 0 0; font-size: var(--text-caption); }
.brand-footer-control .switch { flex-shrink: 0; }

.invite-reward {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid var(--line);} #invite-link {overflow-wrap:anywhere;}

.trust-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin:20px 0}.trust-grid article{border:1px solid #e0e5ef;border-radius:16px;padding:20px;background:#f8faff}.trust-symbol{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eaf0ff;color:#2f6df4;font-weight:700}.trust-grid h3{margin:14px 0 8px}.trust-grid p,.trust-status{font-size: var(--text-caption);color:#69738b;line-height:1.7}.trust-connection{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:20px 0;border-bottom:1px solid #e0e5ef}.trust-connection>div{flex:1;min-width:170px}.trust-connection .note{margin:8px 0 0}

.workspace-switcher{position:relative;margin:26px 4px 22px}.workspace-switcher .workspace-label{margin:0;cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:12px;background:#f8faff;padding:12px 9px}.workspace-switcher summary::-webkit-details-marker{display:none}.switch-chevron{margin-left:auto;color:var(--muted)}.workspace-menu{position:absolute;left:0;top:calc(100% + 8px);width:296px;max-width:calc(100vw - 32px);z-index:80;padding:12px;background:#fff;border:1px solid var(--line);box-shadow:0 12px 40px #1c2f5420;border-radius:16px}.workspace-menu>p{font-weight:600;padding:6px}.workspace-menu small{display:block;color:var(--muted);font-size: var(--text-caption);font-weight:400;margin-top:4px}.workspace-menu button{width:100%;text-align:left;padding:11px;border:0;border-radius:10px;background:transparent;cursor:pointer}.workspace-menu button:hover,.workspace-menu button[aria-current=true]{background:#edf2ff;color:#316bfa}.workspace-menu h4{font-size: var(--text-caption);color:var(--muted);margin:12px 6px 4px}.workspace-menu label{display:block;font-size: var(--text-caption);margin:10px 0}.workspace-menu input{width:100%;margin-top:5px}.workspace-menu form .primary{background:#316bfa;color:#fff;text-align:center;margin-top:10px}.new-page{border-top:1px solid var(--line);margin-top:8px;padding-top:10px}.new-page>summary{cursor:pointer;padding:8px;font-size: var(--text-caption)}#workspace-options{max-height:320px;overflow:auto}#workspace-switch-error{font-size: var(--text-caption);color:#aa3148}

@media(max-width:980px){.workspace-switcher .workspace-label{display:flex}.workspace-switcher .workspace-label>div,.workspace-switcher .switch-chevron{display:none}.workspace-switcher{margin:20px 0}.workspace-menu{left:0}}

.enterprise-onboarding{background:#f0f4fa;border:1px solid #dce5f0;border-radius:18px;padding:24px;margin:20px 0;color:#244a79}.enterprise-onboarding h3{font-size: 1.375rem;margin:12px 0}.enterprise-onboarding p{line-height:1.8;color:#65768e}.enterprise-onboarding ol{padding-left:20px;line-height:2.3;margin:16px 0}.enterprise-onboarding .primary{background:#244a79;color:white;padding:12px 22px;border-radius:12px}.mode-org{--accent:#244a79;--accent-wash:#edf2f8}.mode-org .sidebar{background:#f5f7fb}.mode-org .workspace-label{background:#eaf0f8;border-color:#cbd8e9}.mode-org .workspace-icon{background:#244a79;color:#fff}.mode-org .publish,.mode-org .studio-add-content{background:#244a79}

/* Compact social logos share the local brand artwork used by the picker. */
.profile-socials .picker-result-icon { width: 26px; height: 26px; padding: 5px; color: var(--ink); flex: none; }
.profile-socials .picker-result-icon svg { width: 16px; height: 16px; }
.profile-socials { flex-wrap: wrap; }

/* Template design previews use local layout primitives; no external sample media. */
.template { min-width: 0; }
.template:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.template-status { margin-top: auto; padding-top: 8px; font-size: var(--text-caption); color: var(--muted); }
.template.on .template-status { color: var(--accent); font-weight: 600; }
.template-preview { display: flex; flex-direction: column; width: 100%; height: 238px; padding: 12px; border: 1px solid #e8ebf2; border-radius: 10px; background: #fff; overflow: hidden; color: #252c3e; }
.mini-header { display: flex; justify-content: space-between; font-size: 8px; font-weight: 600; color: #316bfa; }
.mini-cover { display: flex; height: 80px; gap: 4px; margin-top: 12px; flex: none; }
.mini-cover i { flex: 1; border-radius: 14px 14px 0 0; background: linear-gradient(160deg,#adc8df,#e7eef1 70%,#fff); }
.mini-cover i:nth-child(2) { background: linear-gradient(150deg,#d6dfb3,#eef1e7 65%,#fff); }
.mini-cover i:nth-child(3) { background: linear-gradient(150deg,#c6b9b0,#e7eaf1 65%,#fff); }
.mini-avatar { display: grid; place-items: center; align-self: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: #eef2fb; color: #316bfa; border: 3px solid white; font-size: 12px; margin-top: -21px; z-index: 1; }
.mini-name { font-size: 13px; font-weight: 600; text-align: center; margin-top: 8px; }
.mini-bio { font-size: 7px; color: #7a8391; margin-top: 5px; text-align: center; }
.mini-socials { text-align: center; font-size: 9px; letter-spacing: 4px; color: #919cae; margin: 8px 0; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mini-cards i { background: #f0f3f8; padding: 9px 5px; border-radius: 6px; font-size: 7px; font-style: normal; }
.mini-cards i:first-child { grid-column: 1/-1; background: #eaf0fb; }
.preview-avatar { background: #edeef0; }
.preview-avatar .mini-cover { height: 42px; border-radius: 6px; background: linear-gradient(115deg,#b9c9b3,#e6ddd1); }
.preview-avatar .mini-cover i { display: none; }
.preview-avatar .mini-avatar { margin-top: 12px; background: #d8dbd3; color: #5c665e; border-color: #fff; }
.preview-avatar .mini-cards { grid-template-columns: 1fr; }
.preview-avatar .mini-cards i { background: #fff; text-align: center; padding: 7px; }
.preview-editorial { background: #f7f3ec; }
.preview-editorial .mini-header { color: #87755f; }
.preview-editorial .mini-cover,.preview-editorial .mini-avatar { display: none; }
.preview-editorial .mini-name { text-align: left; font-family: 'Noto Serif SC',serif; font-size: 29px; line-height: 1.15; max-width: 120px; margin-top: 22px; }
.preview-editorial .mini-bio,.preview-editorial .mini-socials { text-align: left; }
.preview-editorial .mini-cards { grid-template-columns: 1fr; }
.preview-editorial .mini-cards i { border-top: 1px solid #dcd4c6; border-radius: 0; background: transparent; padding: 9px 0; }
.cover-layout { width: min(100%,390px); margin: 18px auto; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff; }
.cover-art { display: none; }
.cover-art img { display: block; min-width: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-identity { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; }
.cover-avatar { width: 64px; height: 64px; border: 4px solid white; border-radius: 50%; background: #eef2fb; display: grid; place-items: center; color: #316bfa; font-size: 1.5rem; }
.cover-identity strong { font-size: 1.375rem; overflow-wrap: anywhere; text-align: center; }
.cover-bio { color: var(--muted); font-size: 11px; }
.layout-profile .cover-art { position: relative; display: flex; gap: 8px; height: 220px; padding: 26px 18px 0; overflow: hidden; }
.layout-profile .cover-art > * { min-width: 0; width: 0; flex: 1; border-radius: 24px 24px 0 0; }
.layout-profile .cover-art:after { content: ''; position: absolute; inset: 48px 0 0; background: linear-gradient(transparent 10%,#ffffff99 62%,#fff 100%); pointer-events: none; }
.cover-light { background: linear-gradient(145deg,#dce8f7,#91b1b8); }
.cover-light:nth-child(2) { background: linear-gradient(150deg,#edf0d4,#a0b9ac); }
.cover-light:nth-child(3) { background: linear-gradient(145deg,#e3d9d2,#abc0de); }
.layout-profile .cover-identity { margin-top: -48px; padding-top: 0; }
.layout-avatar { background: #edeef0; }
.layout-avatar.has-cover .cover-art,.layout-editorial.has-cover .cover-art { display: block; aspect-ratio: 3/1; overflow: hidden; border-radius: 20px; }
.layout-editorial { background: #f7f3ec; }
.layout-editorial .cover-identity { align-items: flex-start; }
.layout-editorial .cover-identity strong { font: 36px/1.2 'Noto Serif SC',serif; text-align: left; }
.layout-editorial .cover-avatar { display: none; }
@media (max-width:600px) { .templates { grid-template-columns: 1fr; } .template-preview { height: 260px; } .mini-cover { height: 100px; } .preview-avatar .mini-cover { height: 48px; } }

.profile-cover-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 20px 0; }
.profile-cover-slot { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.profile-cover-slot > input { width: 100%; font-size: var(--text-control); margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.profile-cover-pick { display: grid; place-items: center; width: 100%; aspect-ratio: 3/4; overflow: hidden; border: 1px dashed #a8bbd9; border-radius: 12px; background: linear-gradient(150deg,#dce8f7,#f5f8fc); color: #316bfa; padding: 0; }
.profile-cover-pick img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-pick span { font-size: var(--text-caption); }
.profile-cover-slot .text-btn { width: 100%; font-size: var(--text-body); }
@media (max-width:600px) { .profile-cover-fields { grid-template-columns: 1fr; } .profile-cover-pick { aspect-ratio: 3/2; } }

.cover-avatar, .avatar-btn { overflow: hidden; }
.cover-avatar img, .avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Cover ordering: handles support pointer capture on mouse, pen and touch. */
.profile-cover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.profile-cover-head .field { margin: 0; }
.cover-drag-handle { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #68768f; font-size: 1.4375rem; cursor: grab; touch-action: none; user-select: none; }
.cover-drag-handle:active { cursor: grabbing; }
.cover-drag-handle:focus-visible { outline: 2px solid #316bfa; outline-offset: 2px; }
.profile-cover-slot.cover-dragging { opacity: .6; }
.profile-cover-slot.cover-drop-target { border-color: #316bfa; box-shadow: 0 0 0 2px #316bfa; background: #edf3ff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.avatar-random-controls { margin-top: 10px; flex-wrap: wrap; }
.avatar-random-controls select { flex: 1; min-width: 140px; }

.portrait-editor { display: flex; align-items: flex-start; gap: 20px; }
.portrait-current { flex: 0 0 96px; display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: var(--text-caption); }
.portrait-preview { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #edf2ff; color: #4066b8; font-size: 2rem; }
.portrait-preview img { width: 100%; height: 100%; object-fit: cover; }
.portrait-controls { flex: 1; min-width: 0; display: grid; gap: 8px; }
.portrait-controls .avatar-random-controls { margin-top: 0; }
@media (max-width: 600px) { .portrait-editor { flex-direction: column; } .portrait-current { flex-basis: auto; } .portrait-controls { width: 100%; } }

@media(max-width:980px) {
  .account-menu > summary { justify-content: center; padding-inline: 0; }
}

/* Compact link cards: inline title/URL, one toolbar, then the settings panel. */
.compact-link-card { border-radius: 24px; overflow: hidden; }
.compact-link-card > .item-summary { display: grid; grid-template-columns: 16px minmax(0,1fr); gap: 14px 16px; padding: 24px; cursor: default; }
.compact-link-card > .item-summary > .drag-handle { grid-row: 1 / 3; align-self: center; }
.link-card-copy { display: grid; gap: 2px; min-width: 0; }
.link-inline-field { display: flex; align-items: center; gap: 5px; min-width: 0; }
.link-field-caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.link-inline-field input { max-width: calc(100% - 40px); min-width: 0; padding: 4px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; font: inherit; font-size: var(--text-control); color: var(--ink); text-overflow: ellipsis; }
.link-inline-label input { font-weight: 600; }
.link-inline-url input { color: var(--muted); font-size: var(--text-control); }
.link-inline-field input:focus { outline: none; border-bottom-color: var(--accent); }
.link-card-toolbar { grid-column: 2; display: flex; align-items: center; gap: 8px; min-width: 0; }
.link-card-tool { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.link-card-tool svg { width: 18px; height: 18px; }
.link-card-tool:hover { background: var(--accent-wash); color: var(--accent); }
.link-card-toolbar > .link-card-tool:first-child { padding: 0; }
.link-card-toolbar .picker-result-icon { width: 32px; height: 32px; border-radius: 8px; }
.link-card-toolbar > .remove { margin-left: auto; color: var(--danger); }
.item-editor.compact-link-card .item-fields { display: block; padding: 0; border: 0; }
.link-settings-heading { display: flex; align-items: center; justify-content: center; position: relative; min-height: 38px; padding: 6px 44px; background: #eceeea; font-size: var(--text-caption); font-weight: 600; }
.link-settings-heading .link-card-tool { position: absolute; right: 12px; top: 3px; }
.link-settings-tabs { display: flex; padding: 0 24px; border-bottom: 1px solid var(--line); }
.link-settings-tabs button { flex: 1; min-height: 48px; border-bottom: 2px solid transparent; color: var(--muted); font-size: var(--text-body); }
.link-settings-tabs button[aria-selected="true"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.link-settings-content { display: grid; gap: 16px; padding: 24px; }
.link-settings-content .note { margin: 0; line-height: 1.7; }
.compact-link-card .instagram-panel-heading { position: relative; justify-content: center; min-height: 38px; padding: 6px 44px; background: #eceeea; }
.compact-link-card .instagram-panel-heading > span .picker-result-icon { display: none; }
.compact-link-card .instagram-panel-heading > button { position: absolute; right: 12px; top: 3px; width: 32px; height: 32px; padding: 0; background: transparent; }
@media(max-width:600px) { .compact-link-card > .item-summary { padding: 18px 14px; gap: 10px; }.link-card-toolbar { gap: 4px; }.link-settings-content { padding: 20px; }.link-inline-field input { width: 100%; } }
/* Upgrade prompts for workspaces without an effective membership. */
@property --paid-orbit { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.paid-feature { position: relative; outline: 1px solid #ddcba4; outline-offset: -1px; }
.paid-feature::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 1; animation: paid-border-sweep 4s linear infinite; background: conic-gradient(from var(--paid-orbit), transparent 0deg 235deg, #cfac64 275deg, #fff4d5 305deg, transparent 345deg); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; }
@keyframes paid-border-sweep { to { --paid-orbit: 360deg; } }
@keyframes paid-badge-shimmer { to { background-position: -200% 0; } }
.paid-feature > .paid-badge { position: absolute; top: -8px; right: 9px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; min-height: 20px; padding: 1px 6px; border: 1px solid #e5d5b3; border-radius: 999px; background: linear-gradient(110deg, #faf3e4 25%, #fffdf3 42%, #efd69e 50%, #fffdf3 58%, #faf3e4 75%) 200% 0 / 200% 100%; animation: paid-badge-shimmer 4s linear infinite; color: #94723a; font: 600 .75rem/1.2 var(--font-sans); letter-spacing: .8px; pointer-events: none; }
.paid-feature:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.template.paid-feature { border-color: transparent; }
.template.paid-feature.on { border-color: var(--accent); outline-offset: 3px; }
.template.paid-feature.on::after { inset: -4px; }
.brand-footer-control.paid-feature { border-radius: 14px; padding: 14px; }
@media (prefers-reduced-motion: reduce) { .paid-feature::after, .paid-feature > .paid-badge { animation: none; } }

/* Compact social shortcuts; each icon has its own hover and keyboard target. */
.profile-socials { align-items: center; gap: 5px; padding-top: 4px; }
.profile-socials .social-shortcut { position: relative; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.profile-socials .social-shortcut .picker-result-icon { border: 0; background: transparent; color: inherit; width: 26px; height: 26px; padding: 3px; }
.profile-socials .social-shortcut .picker-result-icon svg { width: 20px; height: 20px; }
.profile-socials .social-shortcut.is-placeholder { color: #969997; }
.profile-socials .social-shortcut-plus { position: absolute; right: -1px; top: -3px; width: 13px; height: 13px; border: 1px solid #dedfdd; border-radius: 50%; background: #fff; color: #767c78; font: 11px/11px system-ui; text-align: center; }
.profile-socials .social-shortcut-add { border-radius: 50%; background: #eff0ed; color: #747a74; width: 25px; height: 25px; margin-left: 3px; }
.profile-socials .social-shortcut:is(:hover, :focus-visible) { transform: translateY(-3px) scale(1.08); background: #eef2fc; color: var(--accent); box-shadow: 0 4px 9px #253f6712; }
.profile-socials .social-shortcut:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-socials .social-shortcut:active { transform: translateY(-1px) scale(.96); }
@media (prefers-reduced-motion: reduce) { .profile-socials .social-shortcut { transition: none; } .profile-socials .social-shortcut:is(:hover, :focus-visible, :active) { transform: none; } }
.item-symbol .picker-result-icon { width: 24px; height: 24px; padding: 2px; background: transparent; color: inherit; }
.item-symbol .picker-result-icon svg { width: 20px; height: 20px; }

/* Instagram gets its own settings panel while retaining the shared link data. */
.instagram-editor { border-radius: 20px; overflow: hidden; }
.instagram-editor .item-summary .item-symbol { background: linear-gradient(135deg,#a728d3,#e24683,#efa24b); color: white; }
.instagram-editor .item-fields { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.instagram-editor .item-fields > .field { width: 100%; }
.instagram-panel { margin: 5px -20px 0; border-top: 1px solid var(--line); }
.instagram-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; background: #f3f2f6; }
.instagram-panel-heading > span { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-caption); font-weight: 600; }
.instagram-panel-heading .picker-result-icon { width: 24px; height: 24px; padding: 4px; border-radius: 7px; }
.instagram-tabs { display: flex; padding: 0 20px; border-bottom: 1px solid var(--line); }
.instagram-tabs button { flex: 1; padding: 15px 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: var(--text-body); cursor: pointer; }
.instagram-tabs button[aria-selected="true"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.instagram-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.instagram-tab-panel { padding: 22px 20px 12px; }
.instagram-tab-panel[hidden] { display: none; }
.instagram-tab-panel h4 { font-size: var(--text-caption); margin: 24px 0 12px; }
.instagram-intro { margin: 0 0 18px; font-size: var(--text-caption); line-height: 1.7; }
.instagram-connect-note { border: 1px solid #cbdcf9; border-radius: 12px; background: #f2f7ff; padding: 15px; font-size: var(--text-caption); line-height: 1.7; color: #526784; }
.instagram-option { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: var(--text-caption); }
.instagram-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.instagram-option:has(input:disabled) { color: #979da7; }
.instagram-connect { width: 100%; min-height: 44px; margin-top: 10px; border: 1px solid transparent; border-radius: 999px; padding: 12px; background: linear-gradient(110deg, #833ab4, #b52a78 58%, #c13e48); color: #fff; font-size: var(--text-caption); font-weight: 600; cursor: pointer; box-shadow: 0 3px 10px #833ab424; transition: filter .18s ease, box-shadow .18s ease; }
.instagram-connect:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 5px 15px #833ab438; }
.instagram-connect:active:not(:disabled) { filter: brightness(.94); }
.instagram-connect:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.instagram-connect:disabled { opacity: .6; cursor: wait; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .instagram-connect { transition: none; } }
.instagram-editor .item-actions { margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Override the shared form labels: radio and caption must stay left-aligned. */
.instagram-editor .item-fields .instagram-option { flex-direction: row; justify-content: flex-start; align-items: center; text-align: left; gap: 10px; }
.instagram-editor .item-fields .instagram-option input { flex: 0 0 16px; width: 16px; height: 16px; padding: 0; margin: 0; }
.instagram-editor .item-fields .instagram-option > span { flex: 1; color: inherit; font-size: var(--text-caption); text-align: left; }
.instagram-tab-panel { text-align: left; }

.compact-link-card .instagram-panel { margin: 0; }

/* Standalone link editing stays in the workspace, beside the live preview. */
.standalone-link { border: 0; background: transparent; scroll-margin-top: 80px; }
.standalone-link > .section-head, .standalone-link > .section-body > .add-item { display: none; }
.standalone-link > .section-body { padding: 0; }
.standalone-link .compact-link-card { margin: 0; background: white; }
.standalone-link .item-summary { position: relative; padding-right: 160px; }
.standalone-tools { position: absolute; right: 20px; top: 26px; display: flex; gap: 6px; }
.standalone-tools .link-visibility { width: 40px; height: 24px; border: 0; border-radius: 20px; background: #d9dce4; position: relative; }
.standalone-tools .link-visibility::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: white; border-radius: 50%; }
.standalone-tools .link-visibility[aria-checked="true"] { background: var(--accent); }
.standalone-tools .link-visibility[aria-checked="true"]::after { left: 19px; }
@media (max-width: 600px) { .standalone-link .item-summary { padding-right: 14px; padding-top: 60px; }.standalone-tools { top: 16px; right: 14px; } }

/* Active or configured social shortcuts retain each platform's brand color. */
.profile-socials .social-shortcut.is-colored .picker-result-icon { color: #2878ec; }
.profile-socials .social-shortcut.is-colored[data-social-kind="instagram"] .picker-result-icon { background: radial-gradient(circle at 25% 100%,#ffcf61,#fa405c 45%,#943bd0 85%); color: white; border-radius: 7px; }
.profile-socials .social-shortcut.is-colored:is([data-social-kind="youtube"],[data-social-kind="xiaohongshu"],[data-social-kind="weibo"]) .picker-result-icon { color: #f03; }
.profile-socials .social-shortcut.is-colored:is([data-social-kind="tiktok"],[data-social-kind="douyin"]) .picker-result-icon { color: #121212; filter: drop-shadow(1px 0 #fe2c55) drop-shadow(-1px 0 #25f4ee); }
.profile-socials .social-shortcut.is-colored:is([data-social-kind="x"],[data-social-kind="github"],[data-social-kind="threads"]) .picker-result-icon { color: #171717; }
.profile-socials .social-shortcut.is-colored:is([data-social-kind="whatsapp"],[data-social-kind="wechat"]) .picker-result-icon { color: #159d52; }
.compact-link-card > .item-summary > .drag-handle { width: 24px; min-height: 40px; color: #778096; border-radius: 6px; }
.drag-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link-pending-note { grid-column: 1 / -1; margin: 0; padding: 10px 20px; background: #f2f6ff; border-top: 1px solid #dce5fb; color: #657394; font-size: var(--text-caption); }

/* Let the pending notice join both edges and the settings panel below. */
.compact-link-card .link-pending-note { margin: 0 -24px -24px; padding: 10px 24px; }
.standalone-link .link-pending-note { margin-right: -160px; }
@media (max-width:600px) {
  .compact-link-card .link-pending-note { margin: 0 -14px -18px; padding: 10px 14px; }
}

.section-tools .section-delete-button { display: grid; place-items: center; width: 30px; height: 28px; padding: 5px; border-radius: 7px; }
.section-delete-button[aria-expanded="true"] { background: #edf2ff; color: var(--accent); }
.confirming-delete > .item-fields, .confirming-delete > .section-body { display: none !important; }
.delete-confirm-panel { background: white; }
.delete-confirm-heading { position: relative; display: flex; justify-content: center; align-items: center; min-height: 38px; padding: 6px 44px; background: #eceeea; font-size: var(--text-caption); }
.delete-confirm-heading button { position: absolute; right: 12px; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 1.125rem; }
.delete-confirm-body { padding: 22px 24px; }
.delete-confirm-body p { margin: 0 0 18px; color: var(--muted); font-size: var(--text-caption); line-height: 1.7; }
.delete-confirm-actions { display: flex; gap: 12px; }
.delete-confirm-actions button { flex: 1; min-height: 42px; border: 1px solid var(--line); border-radius: 24px; }
.delete-confirm-action { background: #fff4f3; border-color: #f0c9c7 !important; color: #c03d36; font-weight: 600; }
.delete-confirm-action:hover { background: #ffe9e7; }

/* Link thumbnail tool shares the card's inline panel and draft image field. */
.link-thumbnail-body { display: grid; gap: 16px; padding: 20px; text-align: center; }
.link-thumbnail-body > p { margin: 0; }
.link-thumbnail-body .field { text-align: left; }
.link-thumbnail-preview { width: 104px; height: 104px; object-fit: cover; border-radius: 16px; justify-self: center; border: 1px solid var(--line); }
.link-thumbnail-upload { width: 100%; min-height: 44px; margin-top: 12px; border: 0; border-radius: 24px; color: white; background: var(--accent); font-weight: 600; }
.link-card-tool[aria-expanded="true"] { color: white; background: var(--accent); }
.link-card-tool.has-thumbnail:not([aria-expanded="true"]) { color: var(--accent); background: var(--accent-wash); }

.link-feature-body { display: grid; gap: 18px; padding: 20px; }
.link-feature-body > p { margin: 0; line-height: 1.7; }
.feature-unavailable { color: #89909c; background: #f1f2f5; border-radius: 6px; padding: 3px 8px; font-size: var(--text-caption); width: fit-content; }
.compact-link-card .link-feature-option { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 14px 0; color: #89909c; border-bottom: 1px solid var(--line); }
.compact-link-card .link-feature-option > input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; }
.compact-link-card .link-feature-option > span:nth-child(2) { flex: 1; }
.link-feature-option strong, .link-feature-option small { display: block; }
.link-feature-option small { margin-top: 5px; line-height: 1.5; }
.link-feature-current { font-weight: 600; }
.link-feature-body input:disabled { color: #89909c; background: #f5f6f8; cursor: not-allowed; }
.link-rule-dialog { width: min(480px, calc(100vw - 32px)); }
.link-rule-dialog > .field { margin: 18px 0; }
.link-rule-dialog footer button { flex: 1; min-height: 42px; }
.link-insight-result { padding: 14px; background: var(--accent-wash); border-radius: 12px; }
.link-insight-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.link-card-toolbar { flex-wrap: wrap; }

.link-stats-tool { display: flex; gap: 5px; width: auto; min-width: 56px; font-size: var(--text-caption); }

.link-layout-choices { display: grid; gap: 14px; }
.link-layout-choice { padding: 18px; border: 1px solid var(--line); border-radius: 22px; display: grid; gap: 14px; }
.link-layout-choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.compact-link-card .link-layout-label { display: flex; flex-direction: row; align-items: center; gap: 14px; cursor: pointer; }
.compact-link-card .link-layout-label input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.link-layout-label strong, .link-layout-label small { display: block; }
.link-layout-label strong { color: var(--ink); font-size: var(--text-body); }
.link-layout-label small { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.link-layout-sample { margin-left: 32px; width: min(190px, calc(100% - 32px)); background: #345f68; color: white; overflow: hidden; }
.layout-classic .link-layout-sample { display: flex; align-items: center; gap: 10px; height: 38px; padding: 5px; border-radius: 24px; }
.layout-classic .link-layout-sample img { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.link-layout-sample span { font-size: var(--text-caption); padding: 6px; }
.layout-featured .link-layout-sample { min-height: 100px; border-radius: 14px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(140deg,#547a86,#264550); }
.layout-featured .link-layout-sample img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.link-layout-choice > button { margin-left: 32px; min-height: 42px; }

.thumbnail-source-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 30px; background: white; color: var(--ink); box-shadow: 0 24px 80px #15171e30; overflow: auto; }
.thumbnail-source-dialog::backdrop { background: #15171e99; }
.thumbnail-source-dialog > header { position: relative; display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 20px 64px; border-bottom: 1px solid var(--line); }
.thumbnail-source-dialog h2 { margin: 0; font-size: var(--text-input-mobile); font-weight: 600; }
.thumbnail-source-close { position: absolute; right: 18px; top: 16px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f0f1f3; font-size: 1.625rem; }
.thumbnail-source-choices { padding: 22px 28px 26px; display: grid; gap: 4px; }
.thumbnail-source-choice { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px; border: 0; border-radius: 14px; background: transparent; text-align: left; }
.thumbnail-source-choice:not(:disabled):hover { background: var(--accent-wash); }
.thumbnail-source-icon { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; }
.thumbnail-source-icon svg { width: 26px; height: 26px; }
.thumbnail-source-label { flex: 1; font-size: var(--text-control); font-weight: 600; }
.thumbnail-source-arrow { font-size: 1.5rem; }
.thumbnail-source-choice:disabled { color: #9298a2; cursor: not-allowed; opacity: 1; }
.thumbnail-source-choice .feature-unavailable { flex: none; }
.thumbnail-address { text-align: left; font-size: var(--text-caption); color: var(--muted); }
.thumbnail-address > summary { cursor: pointer; padding: 4px 0; }
.thumbnail-address .field { margin-top: 12px; }
@media(max-width:480px) { .thumbnail-source-choices { padding: 14px 12px 18px; }.thumbnail-source-choice { gap: 10px; }.thumbnail-source-label { font-size: var(--text-caption); }.thumbnail-source-icon { flex-basis: 40px; height: 40px; } }

/* Shared social card shell; platforms supply their own identity and actions. */
.tiktok-connect { background: #161823; box-shadow: -2px 2px 0 #25f4ee, 2px -2px 0 #fe2c55; }
.tiktok-connect:hover:not(:disabled) { box-shadow: -3px 3px 0 #25f4ee, 3px -3px 0 #fe2c55; }

.youtube-connect { background: #c62828; box-shadow: 0 3px 10px #c6282826; }
.youtube-connect:hover:not(:disabled) { background: #a91f1f; }

.official-community{display:block;padding:10px 14px;color:var(--muted);font-size: var(--text-caption);text-decoration:none;overflow-wrap:anywhere}
.official-community:hover{color:var(--accent)}
.official-community[hidden]{display:none}
.official-community + .sidebar-footer{margin-top:0}

.workspace-menu .workspace-create-action{display:flex;align-items:center;gap:8px;width:100%;padding:11px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;font-size: var(--text-caption);font-weight:400;line-height:20px;text-align:left;cursor:pointer;list-style:none}
.workspace-menu .workspace-create-action::marker{content:""}
.workspace-menu .workspace-create-action::-webkit-details-marker{display:none}
.workspace-menu .workspace-create-action:hover{background:#edf2ff;color:#316bfa}
.workspace-create-action>span:first-child{flex:0 0 16px;text-align:center}

/* Action failures must survive toast timeouts and the global margin reset. */
.studio-error-dialog { position: fixed; inset: 0; margin: auto; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border: 0; border-radius: 24px; color: var(--ink); background: var(--card); box-shadow: 0 24px 80px #15171e30; }
.studio-error-dialog::backdrop { background: #15171e66; }
.studio-error-dialog h2 { font-size: 1.25rem; line-height: 1.4; margin: 0 0 14px; }
.studio-error-messages { overflow-wrap: anywhere; white-space: pre-wrap; color: var(--muted); font-size: var(--text-body); line-height: 1.8; }
.studio-error-messages p + p { margin-top: 12px; }
.studio-error-dialog > button { display: block; margin: 24px 0 0 auto; min-width: 96px; min-height: 44px; }

/* Shared card typography: readable labels and controls across every content type. */
.item-editor .item-fields label > span { font-size: var(--text-caption); line-height: 1.6; color: #596477; }
.item-editor .item-fields input, .item-editor .item-fields textarea, .item-editor .item-fields select { font-size: var(--text-control); line-height: 1.5; }
.item-editor .link-inline-label input { font-size: var(--text-control); }
.item-editor .link-inline-url input { font-size: var(--text-control); }
.item-editor .note, .item-editor .link-pending-note, .item-editor .link-settings-heading { font-size: var(--text-caption); line-height: 1.7; }
.item-editor .link-settings-tabs button { font-size: var(--text-body); }
.item-editor .item-summary-copy small, .item-editor .item-edit-label { font-size: var(--text-caption); }
.audio-card-editor { display: grid; gap: 12px; min-width: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.audio-card-editor > strong { font-size: var(--text-body); }
.audio-card-editor > audio { width: 100%; min-width: 0; }
.audio-card-editor > a { color: var(--accent); font-size: var(--text-body); overflow-wrap: anywhere; }
.audio-upload { justify-self: start; min-height: 44px; font-size: var(--text-body); }
.audio-upload:disabled { opacity: .6; cursor: wait; }
@media(max-width:600px) {
  .item-editor .item-fields input, .item-editor .item-fields textarea, .item-editor .item-fields select,
  .item-editor .link-inline-field input { font-size: var(--text-input-mobile); }
}

.collection-card { border:1px solid var(--line); border-radius:24px; background:white; padding:18px; }
.collection-card .section-head { flex-wrap:wrap; }
.collection-card .section-head input { font-size: var(--text-control); }
.collection-collapse { padding:8px; font-size: var(--text-body); color:var(--muted); }
.collection-layouts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.collection-layouts button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; border:1px solid var(--line); border-radius:14px; padding:10px 4px; min-height:68px; font-size: var(--text-body); }
.collection-layouts button[aria-pressed="true"] { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); font-weight:600; }
.collection-dropzone { padding:18px; border:1px dashed var(--line); border-radius:18px; margin-bottom:12px; font-size: var(--text-body); line-height:1.7; color:var(--muted); }
.collection-dropzone.drop-target { border-color:var(--accent); background:var(--accent-wash); }
.collection-dropzone select,.collection-destination select { max-width:100%; width:100%; border:1px solid var(--line); border-radius:10px; background:white; padding:10px; font:inherit; color:var(--ink); }
.collection-destination { display:flex; gap:12px; align-items:center; padding:10px 16px; font-size: var(--text-body); }
.collection-destination>span { flex:none; }.collection-destination>select { min-width:0; }
@media(max-width:600px){.collection-layouts{grid-template-columns:repeat(2,minmax(0,1fr));}.collection-dropzone select,.collection-destination select{font-size: var(--text-input-mobile);}}

.collection-layouts button svg { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }

/* Collection members retain their own content editor within a shared layout container. */
.collection-card .collection-member { margin: 12px 0; border: 1px solid var(--line, #e6e7ed); border-radius: 18px; box-shadow: none; }
.collection-card .collection-member .section-body { padding: 12px; }
.collection-card > .section-body > .add-item { width: 100%; min-height: 40px; margin-top: 12px; background: #f0f0f2; border-radius: 22px; font-size: var(--text-body); color: #25262c; }

.collection-folder{font-size: 1.625rem;background:transparent;color:#a2a6ad}.collection-setup-status{font-size: var(--text-caption);color:#956900;white-space:nowrap}

/* Collection overview and its dedicated card editor share the existing field handlers. */
.collection-add-zone { width:100%; min-height:72px; padding:18px; border:1px dashed var(--border,#e2e4ea); border-radius:20px; background:transparent; color:var(--muted,#667085); font:inherit; font-size: var(--text-body); cursor:pointer; }
.collection-add-zone:hover { background:#f5f7fc; }
.collection-dropzone:has(.collection-add-zone:not([hidden])) { padding:0; border:0; }
.collection-dropzone:has(.collection-add-zone[hidden]):has(select[hidden]) { display:none; }
.collection-entry { display:flex; align-items:center; gap:14px; padding:16px; min-height:76px; border:1px solid #e9eaf0; border-radius:22px; background:#fff; margin:12px 0; }
.collection-entry-icon { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; border-radius:12px; background:#f4f6fb; }
.collection-entry-icon svg { width:26px; height:26px; }
.collection-entry-copy { display:grid; gap:5px; min-width:0; flex:1; }
.collection-entry-copy strong { font-size: var(--text-control); overflow-wrap:anywhere; }
.collection-entry-copy small { font-size: var(--text-caption); color:#697386; }
.collection-entry-setup { border:0; background:transparent; color:#536282; font:inherit; font-size: var(--text-body); cursor:pointer; padding:10px; flex-shrink:0; }
.collection-card .collection-member { border:0; border-radius:0; padding:0; margin:0; box-shadow:none; }
.collection-member > .section-head, .collection-member > .section-body > .add-item, .collection-card > .section-body > .item-empty { display:none; }
.collection-member > .section-body { padding:0; }
#workspace-content.editing-collection-item > :not(#collection-editor) { display:none; }
.collection-editor { background:white; border:1px solid #e9eaf0; border-radius:24px; padding:24px; }
.collection-editor-header { display:flex; flex-wrap:wrap; align-items:center; gap:18px; margin-bottom:24px; }
.collection-editor-header h2 { font-size: 1.25rem; margin:0; overflow-wrap:anywhere; }
.collection-editor .compact-link-card { border:0; }
.collection-editor .compact-link-card > .item-summary { cursor:default; }
.collection-editor .item-summary > .drag-handle { display:none; }
.collection-editor [hidden], .collection-card [hidden] { display:none !important; }
@media(max-width:600px) { .collection-editor { padding:16px; } .collection-entry { gap:10px; padding:12px; } }
.collection-editor .compact-link-card > .item-summary { display:flex; flex-direction:column; align-items:stretch; gap:16px; padding:0 0 20px; }
.collection-editor .link-card-copy { width:100%; gap:12px; }
.collection-editor .link-inline-field { padding:8px 12px; border:1px solid #e2e4ea; border-radius:14px; }
.collection-editor .link-inline-field input { width:100% !important; font-size: var(--text-control); }
.collection-editor .link-card-toolbar { flex-wrap:wrap; }
.collection-editor .standalone-tools { position:static; align-self:flex-end; order:-1; }
.collection-editor .link-pending-note { margin:0; }
.collection-card .collection-member > .section-body { padding:0; gap:0; }
.collection-existing { font-size: var(--text-caption); }
.collection-existing summary { padding:8px 0; cursor:pointer; }
.collection-dropzone:has(.collection-add-zone[hidden]) { border:0; padding:0; margin:0; }

/* All Studio form controls use readable type, including dialogs and narrow layouts. */
small { font-size: var(--text-caption); }
h1,h2,h3,h4 { line-height: 1.35; }
.gate h1 { line-height: 1.35; font-weight: 600; }
.field > span,.section-type { font-family: var(--font-sans); letter-spacing: 0; }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: 1; }
.sidebar .brand { flex-wrap: wrap; row-gap: 0; }
.workspace-label small { letter-spacing: 0; }
.card-head,.collection-toolbar { flex-wrap: wrap; }
@media(max-width:600px) {
  /* Higher priority than per-card/input overrides, including the dedicated editor. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),textarea,select { font-size: var(--text-input-mobile) !important; }
  .topbar { height:auto; min-height:64px; flex-wrap:wrap; padding-block:10px; }
  .topbar .spacer { display:none; }
  .topbar .publish,.topbar .share-button { white-space:normal; }
  .profile-overview { flex-wrap:wrap; }
}
/* The reusable share dialog also follows Studio's font stack. */
body .muuzi-share-picker { font-family: var(--font-sans); }
body .muuzi-share-picker small { font-size: var(--text-caption); }
