/* Sailair visual editor — light, plain-language admin UI */
:root {
  --ui-900: #123f61;
  --ui-800: #14496c;   /* site theme blue — same as the public site */
  --ui-600: #1d6fa5;
  --ui-500: #2a83c0;
  --ui-100: #dcecf8;
  --ui-50:  #eef6fc;
  --ui-ink: #1d2b39;
  --ui-muted: #738294;
  --ui-line: #e3eaf1;
  --ui-bg: #f3f6fa;
  --ui-green: #12805c;
  --ui-red: #c0392b;
  --ui-shadow-sm: 0 1px 2px rgba(20,50,80,.05), 0 2px 8px rgba(20,50,80,.04);
  --ui-shadow-md: 0 6px 20px rgba(20,50,80,.10);
  --ui-shadow-lg: 0 18px 48px rgba(16,40,70,.18);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px; color: var(--ui-ink); background: var(--ui-bg); overflow: hidden;
  color-scheme: light; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ---------- top ---------- */
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid #e5eaf0;
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: #1d6fb8; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px;
}
.brand small { font-weight: 400; color: #96a1af; font-size: 12px; margin-left: 6px; }
.topbar .actions { display: flex; align-items: center; gap: 8px; }
.topbar .actions button {
  border: 1px solid #dbe3ec; background: #fff; color: #5a6878;
  padding: 6px 12px; border-radius: 6px; font-size: 13px;
}
.topbar .actions button:hover { border-color: #1d6fb8; color: #1d6fb8; }

.toolbar {
  height: 54px; background: #fff; border-bottom: 1px solid #e5eaf0;
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
}
.tb-group { display: flex; align-items: center; gap: 6px; }
.tb-label { color: #8a97a6; font-size: 12px; margin-right: 2px; }
.tb-select {
  border: 1px solid #dbe3ec; border-radius: 6px; padding: 6px 10px; background: #fff; color: #26313d;
}
.tb-sep { width: 1px; height: 22px; background: #e5eaf0; margin: 0 8px; }
.tb-spacer { flex: 1; }
.tb-btn {
  border: 1px solid #dbe3ec; background: #fff; color: #445468;
  padding: 7px 13px; border-radius: 6px; white-space: nowrap;
}
.tb-btn:hover { border-color: #1d6fb8; color: #1d6fb8; }
.tb-btn:disabled { opacity: .45; cursor: not-allowed; }
.tb-btn.primary { background: #1d6fb8; border-color: #1d6fb8; color: #fff; font-weight: 600; }
.tb-btn.primary:hover { background: #175d9c; color: #fff; }
.tb-btn.publish { background: #12805c; border-color: #12805c; color: #fff; }
.tb-btn.publish:hover { background: #0d6749; color: #fff; }
.dev {
  border: 1px solid transparent; background: transparent; color: #7b8794;
  padding: 6px 9px; border-radius: 6px; font-size: 13px;
}
.dev:hover { background: #f0f4f8; }
.dev.active { background: #e8f1fa; color: #1d6fb8; border-color: #c9dff2; }
.save-state { color: #8a97a6; font-size: 12px; margin-right: 6px; }
.save-state.dirty { color: #c47a12; font-weight: 600; }

/* ---------- workspace ---------- */
.workspace { display: flex; height: calc(100vh - 56px - 54px - 30px); }
.sidebar {
  width: 256px; min-width: 256px; background: #fff; border-right: 1px solid #e5eaf0;
  display: flex; flex-direction: column;
}
.mod-tabs { padding: 10px 10px 0; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid #eef1f5; }
.mod {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 0; background: transparent; color: #5a6878; padding: 9px 12px; border-radius: 7px;
}
.mod i { font-style: normal; font-size: 15px; width: 18px; text-align: center; color: #9aa7b5; }
.mod:hover { background: #f4f7fa; }
.mod.active { background: #e8f1fa; color: #1d6fb8; font-weight: 600; }
.mod.active i { color: #1d6fb8; }
.side-body { flex: 1; overflow-y: auto; padding: 12px; }
.search-wrap { margin-bottom: 10px; }
.search-wrap input {
  width: 100%; border: 1px solid #dbe3ec; border-radius: 7px; padding: 8px 10px; background: #f8fafc;
}
.side-hint { font-size: 12px; color: #93a0ae; line-height: 1.6; margin-bottom: 12px; }
.wide-btn {
  display: block; width: 100%; text-align: center; border: 1px solid #dbe3ec; background: #fff;
  color: #445468; padding: 9px; border-radius: 7px; margin-bottom: 8px; text-decoration: none;
}
.wide-btn:hover { border-color: #1d6fb8; color: #1d6fb8; }
.wide-btn.primary { background: #1d6fb8; border-color: #1d6fb8; color: #fff; font-weight: 600; }
.wide-btn.primary:hover { background: #175d9c; color: #fff; }
.wide-btn.danger { color: #b4453c; }
.wide-btn.danger:hover { border-color: #b4453c; }
.page-group { margin-bottom: 14px; }
.group-title {
  font-size: 12px; color: #8a97a6; padding: 4px 6px 6px; display: flex; justify-content: space-between;
}
.page-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 6px; color: #445468; line-height: 1.35;
}
.page-item:hover { background: #f2f6fa; }
.page-item.active { background: #e8f1fa; color: #1d6fb8; font-weight: 600; }
.page-item small { display: block; color: #a3aebb; font-weight: 400; font-size: 11px; margin-top: 2px; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.info-card { border: 1px solid #e6ebf1; border-radius: 8px; padding: 10px 11px; background: #fff; }
.info-card h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.info-card p { margin: 0 0 8px; color: #93a0ae; font-size: 11px; }
.info-card .row { display: flex; gap: 6px; }
.info-card .row button {
  flex: 1; border: 1px solid #dbe3ec; background: #fff; color: #5a6878;
  padding: 5px; border-radius: 5px; font-size: 12px;
}
.info-card .row button:hover { border-color: #1d6fb8; color: #1d6fb8; }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.media-grid img { width: 100%; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid #e6ebf1; cursor: pointer; }

/* ---------- canvas ---------- */
.canvas {
  flex: 1; min-width: 0; position: relative; background: #e9edf2;
  display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 18px;
}
.canvas-note {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  background: rgba(38,49,61,.78); color: #fff; font-size: 12px; padding: 5px 12px;
  border-radius: 20px; z-index: 5; pointer-events: none;
}
.frame-wrap {
  width: 100%; max-width: 1440px; background: #fff; border-radius: 6px;
  box-shadow: 0 6px 24px rgba(30,45,65,.16); overflow: hidden; transition: width .25s ease;
  margin: 14px auto 0;
}
#siteFrame { width: 100%; height: calc(100vh - 56px - 54px - 30px - 46px); border: 0; display: block; background: #fff; }
.empty-state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: #e9edf2; color: #7b8794; text-align: center;
}
.empty-state h2 { color: #445468; font-size: 18px; margin: 14px 0 6px; }
.empty-state p { margin: 0; font-size: 13px; line-height: 1.7; }
.empty-icon { font-size: 34px; }

/* ---------- inspector ---------- */
.inspector {
  width: 292px; min-width: 292px; background: #fff; border-left: 1px solid #e5eaf0; overflow-y: auto;
}
.insp-empty { padding: 54px 24px; text-align: center; color: #93a0ae; }
.insp-empty h3 { color: #5a6878; font-size: 15px; margin: 12px 0 8px; }
.insp-empty p { font-size: 13px; line-height: 1.7; margin: 0; }
.mini-tip {
  margin-top: 24px; padding: 10px; background: #f6f9fc; border-radius: 7px;
  font-size: 11px; color: #8a97a6; line-height: 1.8; text-align: left;
}
.insp-form { padding: 14px; }
.insp-head { display: flex; align-items: center; justify-content: space-between; }
.insp-badge { background: #e8f1fa; color: #1d6fb8; padding: 4px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.insp-close { border: 0; background: transparent; color: #9aa7b5; font-size: 16px; }
.insp-sub { color: #93a0ae; font-size: 12px; margin: 10px 0 16px; line-height: 1.5; word-break: break-all; }
.fld-label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.insp-form textarea, .insp-form input[type=text], .insp-form input:not([type]) {
  width: 100%; border: 1px solid #dbe3ec; border-radius: 7px; padding: 9px 10px;
  color: #26313d; background: #fff; line-height: 1.6; resize: vertical;
}
.insp-form textarea:focus, .insp-form input:focus { outline: 2px solid #c9dff2; border-color: #1d6fb8; }
.fld-help { color: #a3aebb; font-size: 11px; margin-top: 6px; line-height: 1.5; }
.img-preview { border: 1px dashed #dbe3ec; border-radius: 7px; background: #f8fafc; padding: 8px; text-align: center; margin-bottom: 10px; }
.img-preview img { max-width: 100%; max-height: 150px; object-fit: contain; }
.insp-actions { margin-top: 20px; padding-top: 14px; border-top: 1px solid #eef1f5; }
.insp-foot { color: #a3aebb; font-size: 11px; text-align: center; margin-top: 14px; }

/* ---------- status / modal / toast ---------- */
.statusbar {
  height: 30px; background: #fff; border-top: 1px solid #e5eaf0; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; color: #8a97a6; font-size: 12px;
}
.modal-bg { position: fixed; inset: 0; background: rgba(20,32,45,.45); z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal-box { width: 520px; max-width: 92vw; max-height: 86vh; overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eef1f5; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head button { border: 0; background: transparent; color: #9aa7b5; font-size: 17px; }
.modal-body { padding: 18px 20px; }
.modal-body .field { margin-bottom: 14px; }
.modal-body label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; border: 1px solid #dbe3ec; border-radius: 7px; padding: 9px 10px; line-height: 1.6;
  background: #fff; color: #26313d; color-scheme: light;
}
.modal-body textarea { min-height: 120px; resize: vertical; }
.modal-foot { padding: 14px 20px; border-top: 1px solid #eef1f5; display: flex; justify-content: flex-end; gap: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 54px; transform: translateX(-50%); z-index: 800;
  background: #26313d; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 80vw; text-align: center;
}
.toast.ok { background: #12805c; }
.toast.err { background: #b4453c; }
.progress-log {
  background: #f6f9fc; border: 1px solid #e6ebf1; border-radius: 7px; padding: 10px;
  font-size: 12px; line-height: 1.8; max-height: 240px; overflow-y: auto; color: #5a6878;
}

/* ---------- content blocks ---------- */
.block-panel { border: 1px solid #cfe2f4; background: #f5faff; border-radius: 9px; padding: 10px; margin-bottom: 12px; }
.block-panel .side-hint { margin-bottom: 10px; }
.block-tpl {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 1px dashed #b9d4ee; background: #fff; border-radius: 8px;
  padding: 9px; margin-bottom: 7px; cursor: grab; color: #445468;
}
.block-tpl:hover { border-color: #1d6fb8; background: #eef6ff; }
.block-tpl:active { cursor: grabbing; }
.block-tpl.dragging { opacity: .5; }
.block-tpl .bt-ico {
  width: 34px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #e8f1fa; color: #1d6fb8; border-radius: 5px; font-size: 15px;
}
.block-tpl b { display: block; font-size: 12px; font-weight: 600; }
.block-tpl small { display: block; color: #93a0ae; font-size: 11px; margin-top: 2px; line-height: 1.4; }

/* ---------- image picker layer (independent, does not replace the modal) ---------- */
.picker-layer { position: fixed; inset: 0; background: rgba(20,32,45,.42); z-index: 700; display: flex; align-items: center; justify-content: center; }
.picker-box { width: 560px; max-width: 92vw; background: #fff; border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.22); overflow: hidden; }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #eef1f5; font-weight: 600; font-size: 14px; }
.picker-head button { border: 0; background: transparent; font-size: 17px; color: #9aa7b5; cursor: pointer; }
.picker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; max-height: 420px; overflow-y: auto; }
.picker-grid img { width: 100%; height: 90px; object-fit: cover; border: 1px solid #e6ebf1; border-radius: 7px; cursor: pointer; }
.picker-grid img:hover { border-color: #1d6fb8; outline: 2px solid #c9dff2; }

/* ---------- product / block forms ---------- */
.pf-sec { border: 1px solid #e6ebf1; border-radius: 9px; padding: 12px 14px 4px; margin-bottom: 14px; }
.pf-sec > legend { font-size: 13px; font-weight: 700; color: #1d6fb8; padding: 0 6px; }
.imgfield { border: 1px dashed #dbe3ec; border-radius: 8px; padding: 8px; background: #f8fafc; }
.imgfield .if-preview { display: block; width: 100%; height: 96px; object-fit: contain; background: #fff; border-radius: 6px; margin-bottom: 8px; }
.imgfield .if-btns { display: flex; gap: 6px; }
.imgfield .if-btns button {
  flex: 1; border: 1px solid #dbe3ec; background: #fff; color: #5a6878;
  padding: 6px; border-radius: 5px; font-size: 12px;
}
.imgfield .if-btns button:hover { border-color: #1d6fb8; color: #1d6fb8; }
.pf-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pf-thumb { width: 86px; border: 1px solid #e6ebf1; border-radius: 7px; padding: 4px; text-align: center; background: #fff; }
.pf-thumb.main { border: 2px solid #1d6fb8; }
.pf-thumb img { width: 100%; height: 60px; object-fit: cover; border-radius: 4px; display: block; }
.pf-thumb button { border: 0; background: transparent; color: #8a97a6; font-size: 11px; cursor: pointer; margin-top: 3px; }
.pf-thumb button:hover { color: #b4453c; }
.pf-feat { border: 1px solid #eef1f5; border-radius: 8px; padding: 10px; margin-bottom: 9px; }
.pf-feat h5 { margin: 0 0 8px; font-size: 12px; color: #5a6878; }
.modal-body .wide-btn { margin-top: 8px; }
.modal-body .fld-help { margin: 6px 0 10px; }

/* ---------- product publisher: two-section, Alibaba-style release page ---------- */
.pub-layer { position: fixed; inset: 0; background: rgba(20,32,45,.5); z-index: 600; display: flex; align-items: center; justify-content: center; padding: 18px; }
.pub-wrap { width: 1320px; max-width: 100%; position: relative; height: min(88vh, 860px); background: #fff; border-radius: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.24); display: flex; flex-direction: column; overflow: hidden; }
.pub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid #eef1f5; background: #fff; }
.pub-title { font-size: 18px; font-weight: 700; color: #1e2b38; }
.pub-title .pub-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; color: #1d6fb8; background: #eaf4fd; vertical-align: 2px; }
.pub-sub { margin-top: 5px; font-size: 12px; color: #7b8794; line-height: 1.5; }
.pub-x { border: 0; background: #f3f6f9; color: #7b8794; width: 30px; height: 30px; border-radius: 7px; font-size: 16px; flex: none; }
.pub-x:hover { background: #e6edf4; color: #26313d; }
.pub-main { flex: 1; display: flex; min-height: 0; background: #f5f7fa; }

.pub-nav { width: 208px; flex: none; border-right: 1px solid #e8edf2; background: #fff; padding: 18px 12px; }
.pub-nav-cap { font-size: 11px; color: #9aa7b5; padding: 0 8px 10px; letter-spacing: .5px; }
.pub-step { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 9px; padding: 10px 9px; margin-bottom: 6px; color: #5a6878; }
.pub-step b { width: 25px; height: 25px; flex: none; border-radius: 50%; background: #eef2f6; color: #8a97a6; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.pub-step span { font-size: 13px; font-weight: 600; line-height: 1.35; }
.pub-step small { display: block; font-size: 11px; font-weight: 400; color: #9aa7b5; margin-top: 2px; }
.pub-step i { margin-left: auto; font-style: normal; font-size: 13px; color: #b9c3cd; }
.pub-step.active { background: #eaf4fd; border-color: #cfe4f6; color: #1d6fb8; }
.pub-step.active b { background: #1d6fb8; color: #fff; }
.pub-step.done i { color: #2e9c6a; }
.pub-nav-tip { margin: 22px 8px 0; padding: 11px; border-radius: 8px; background: #fff9e8; border: 1px solid #f2e2b8; font-size: 11px; line-height: 1.7; color: #8a6c26; }

.pub-scroll { flex: 1; overflow-y: auto; padding: 18px 22px 26px; min-width: 0; }
.pub-card { background: #fff; border: 1px solid #e8edf2; border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
.pub-card-hd { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #eef1f5; padding-bottom: 13px; margin-bottom: 18px; }
.pub-card-hd b { width: 24px; height: 24px; border-radius: 6px; background: #1d6fb8; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pub-card-hd h4 { margin: 0; font-size: 15px; color: #1e2b38; }
.pub-card-hd span { font-size: 12px; color: #9aa7b5; margin-left: 4px; }

.pub-field { margin-bottom: 17px; }
.pub-label { display: block; font-size: 13px; font-weight: 600; color: #33404e; margin-bottom: 7px; }
.pub-label .req { color: #e05252; margin-right: 3px; }
.pub-label .opt { font-weight: 400; color: #9aa7b5; font-size: 11px; margin-left: 5px; }
.pub-input, .pub-field select, .pub-field textarea {
  width: 100%; border: 1px solid #dbe3ec; border-radius: 7px; padding: 10px 11px;
  background: #fff; color: #26313d; line-height: 1.6; outline: none; font-size: 14px;
}
.pub-input:focus, .pub-field select:focus, .pub-field textarea:focus { border-color: #1d6fb8; box-shadow: 0 0 0 3px rgba(29,111,184,.1); }
.pub-field textarea { min-height: 96px; resize: vertical; }
.pub-help { margin-top: 6px; font-size: 11px; color: #9aa7b5; line-height: 1.55; }
.pub-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pub-field.missing .pub-input, .pub-field.missing select, .pub-field.missing .pub-drop { border-color: #e05252; box-shadow: 0 0 0 3px rgba(224,82,82,.1); }
.pub-field.missing .pub-label { color: #c23c3c; }

.pub-drop { border: 1.5px dashed #cbd7e3; border-radius: 9px; background: #fafbfd; padding: 20px 14px; text-align: center; transition: .15s; }
.pub-drop.over { border-color: #1d6fb8; background: #eaf4fd; }
.pub-drop-ico { width: 38px; height: 38px; margin: 0 auto 9px; border-radius: 50%; background: #eaf4fd; color: #1d6fb8; font-size: 24px; line-height: 36px; text-align: center; }
.pub-drop-main { font-size: 13px; color: #4a5866; }
.pub-drop-main button { border: 0; background: none; color: #1d6fb8; font-weight: 600; padding: 0 2px; text-decoration: underline; }
.pub-drop-hint { margin-top: 7px; font-size: 11px; color: #9aa7b5; }
.pub-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pub-thumb { width: 104px; border: 1px solid #e3e9ef; border-radius: 8px; padding: 5px; background: #fff; position: relative; }
.pub-thumb.main { border: 2px solid #1d6fb8; }
.pub-thumb img { width: 100%; height: 74px; object-fit: cover; border-radius: 5px; display: block; background: #f3f6f9; }
.pub-thumb .badge { position: absolute; top: 5px; left: 5px; background: #1d6fb8; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.pub-thumb .ops { display: flex; justify-content: space-between; margin-top: 5px; }
.pub-thumb .ops button { border: 0; background: none; color: #7b8794; font-size: 11px; padding: 1px 2px; }
.pub-thumb .ops button:hover { color: #1d6fb8; }
.pub-thumb .ops button.del:hover { color: #c0392b; }

.pub-rows { border: 1px solid #e8edf2; border-radius: 8px; overflow: hidden; }
.pub-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #eef1f5; }
.pub-row:last-child { border-bottom: 0; }
.pub-row.head { background: #f8fafc; font-size: 11px; color: #8a97a6; font-weight: 600; }
.pub-row.head span { flex: 1; }
.pub-row.head span:last-child { flex: none; width: 32px; }
.pub-row input { flex: 1; min-width: 0; border: 1px solid #dbe3ec; border-radius: 6px; padding: 8px 9px; background: #fff; color: #26313d; font-size: 13px; }
.pub-row input:focus { border-color: #1d6fb8; outline: none; }
.pub-row .row-del { flex: none; width: 32px; border: 0; background: none; color: #b1bcc7; font-size: 15px; }
.pub-row .row-del:hover { color: #c0392b; }
.pub-add { margin-top: 9px; border: 1px dashed #cbd7e3; background: #fff; color: #1d6fb8; border-radius: 7px; padding: 8px 14px; font-size: 12px; font-weight: 600; }
.pub-add:hover { border-color: #1d6fb8; background: #f4f9fe; }

/* ---------- spec sheet import: upload / paste Excel → auto-recognised rows ---------- */
.si-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 12px; margin-bottom: 11px; border: 1px dashed #b9d5ee; border-radius: 9px; background: #f5faff; }
.si-tools.over { border-color: #1d6fb8; background: #eaf4fd; }
.si-btn { border: 1px solid #cdd9e5; background: #fff; color: #33404e; border-radius: 7px; padding: 8px 13px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.si-btn:hover { border-color: #1d6fb8; color: #1d6fb8; }
.si-btn.primary { background: #1d6fb8; border-color: #1d6fb8; color: #fff; }
.si-btn.primary:hover { background: #175d9c; color: #fff; }
.si-tools-hint { flex: 1 1 100%; font-size: 11px; color: #8a97a6; line-height: 1.5; }

.si-layer { position: fixed; inset: 0; z-index: 100000; background: rgba(24,38,52,.48); display: flex; align-items: center; justify-content: center; padding: 16px; }
.si-box { width: min(760px, 100%); max-height: min(88vh, 900px); background: #fff; border-radius: 12px; box-shadow: 0 18px 60px rgba(15,35,60,.28); display: flex; flex-direction: column; overflow: hidden; }
.si-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #e8edf2; }
.si-hd b { font-size: 15px; color: #1e2b38; }
.si-hd span { margin-left: 10px; font-size: 11px; color: #9aa7b5; }
.si-x { border: 0; background: #f1f4f8; color: #5a6878; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.si-paste { padding: 12px 18px 0; }
.si-paste label { display: block; font-size: 12px; color: #5a6878; margin-bottom: 6px; }
.si-paste textarea { width: 100%; box-sizing: border-box; min-height: 54px; max-height: 110px; border: 1px solid #dbe3ec; border-radius: 7px; padding: 8px 10px; font-size: 12px; color: #26313d; background: #fff; resize: vertical; outline: none; }
.si-paste textarea:focus { border-color: #1d6fb8; }
.si-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; padding: 12px 18px; background: #f8fafc; border-bottom: 1px solid #eef1f5; }
.si-bar label { font-size: 12px; color: #5a6878; display: flex; align-items: center; gap: 5px; }
.si-bar select { border: 1px solid #dbe3ec; border-radius: 6px; padding: 5px 7px; font-size: 12px; background: #fff; color: #26313d; max-width: 170px; }
.si-bar .si-chk { cursor: pointer; }
.si-bar #siFlip, .si-bar #siShape { border: 1px solid #cdd9e5; background: #fff; border-radius: 6px; padding: 5px 9px; font-size: 12px; color: #5a6878; cursor: pointer; }
.si-bar #siFlip.on, .si-bar #siShape:hover { background: #eaf4fd; border-color: #1d6fb8; color: #1d6fb8; font-weight: 600; }
.si-tip { padding: 10px 18px; font-size: 12px; color: #5a6878; line-height: 1.6; }
.si-tip b { color: #1d6fb8; }
.si-tbl { flex: 1; overflow-y: auto; margin: 0 18px; border: 1px solid #e8edf2; border-radius: 8px; min-height: 90px; }
.si-tr { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-bottom: 1px solid #eef1f5; }
.si-tr:last-child { border-bottom: 0; }
.si-tr.si-th { background: #f8fafc; font-size: 11px; color: #8a97a6; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.si-tr.si-th span { flex: 1; }
.si-tr.si-th span:last-child { flex: none; width: 28px; }
.si-tr input { flex: 1; min-width: 0; border: 1px solid #dbe3ec; border-radius: 6px; padding: 7px 9px; background: #fff; color: #26313d; font-size: 13px; }
.si-tr input:focus { border-color: #1d6fb8; outline: none; }
.si-del { flex: none; width: 28px; border: 0; background: none; color: #b1bcc7; cursor: pointer; font-size: 14px; }
.si-del:hover { color: #c0392b; }
.si-empty { padding: 22px 14px; text-align: center; color: #9aa7b5; font-size: 12px; line-height: 1.7; }
.si-mode { display: flex; gap: 20px; padding: 11px 18px; font-size: 12px; color: #5a6878; }
.si-mode label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.si-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #e8edf2; background: #fbfcfe; }
.si-ft .tb-btn { cursor: pointer; }

/* ---------- wide model-comparison spec tables ---------- */
.pf-note { margin: 0 0 10px; padding: 9px 11px; border-radius: 7px; background: #eaf4fd; border: 1px solid #cfe4f6; color: #1d6fb8; font-size: 12px; line-height: 1.6; }
.pf-tbl-card { border: 1px solid #d9e6f2; border-radius: 9px; background: #fbfdff; margin-bottom: 10px; overflow: hidden; }
.pf-tbl-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 11px; border-bottom: 1px solid #e8edf2; }
.pf-tbl-hd b { font-size: 13px; color: #1e2b38; }
.pf-tbl-hd span { font-size: 11px; color: #8a97a6; margin-right: auto; }
.pf-tbl-hd button { border: 1px solid #dbe3ec; background: #fff; color: #1d6fb8; border-radius: 6px; padding: 5px 9px; font-size: 11px; cursor: pointer; }
.pf-tbl-hd button.danger { color: #c0392b; }
.pf-tbl-scroll { overflow-x: auto; padding: 8px 11px 11px; }
.pf-tbl-mini { border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.pf-tbl-mini th, .pf-tbl-mini td { border: 1px solid #e2e9f0; padding: 5px 8px; text-align: center; }
.pf-tbl-mini th { background: #eaf3fb; color: #1d6fb8; font-weight: 600; }
.pf-tbl-mini td:first-child { font-weight: 600; }

.si-grid-wrap { overflow-x: auto; }
.si-grid { border-collapse: collapse; font-size: 12px; }
.si-grid th, .si-grid td { border: 1px solid #e8edf2; padding: 3px 4px; }
.si-grid th { background: #f1f6fb; position: sticky; top: 0; z-index: 1; }
.si-grid th input, .si-grid td input { width: 108px; min-width: 88px; box-sizing: border-box; border: 1px solid #dbe3ec; border-radius: 5px; padding: 5px 6px; font-size: 12px; color: #26313d; background: #fff; }
.si-grid th input { font-weight: 600; color: #1d6fb8; }
.si-grid th input:focus, .si-grid td input:focus { border-color: #1d6fb8; outline: none; }
.si-grid .si-gh { background: #f8fafc; color: #9aa7b5; font-size: 11px; text-align: center; width: 34px; }
.si-grid button { border: 0; background: none; color: #b1bcc7; cursor: pointer; font-size: 12px; padding: 2px 4px; }
.si-grid button:hover { color: #c0392b; }
.si-grid #siAddCol { color: #1d6fb8; font-size: 14px; font-weight: 700; }
.si-grid-foot { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid #eef1f5; }
.si-grid-foot button { border: 1px dashed #cbd7e3; background: #fff; color: #1d6fb8; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.si-grid-foot span { font-size: 11px; color: #9aa7b5; }

.pub-feat { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #eef1f5; border-radius: 8px; padding: 11px; margin-bottom: 9px; background: #fcfdfe; }
.pub-feat .imgfield { flex: 0 0 160px; margin: 0; }
.pub-feat .imgfield .if-preview { height: 74px; }
.pub-feat .ft-text { flex: 1; min-width: 0; }
.pub-feat .ft-text input { width: 100%; border: 1px solid #dbe3ec; border-radius: 6px; padding: 8px 9px; background: #fff; color: #26313d; font-size: 13px; }
.pub-feat .ft-del { flex: none; border: 0; background: none; color: #b1bcc7; font-size: 15px; }

.pub-more { margin-top: 4px; border-top: 1px dashed #e3e9ef; padding-top: 12px; }
.pub-more summary { cursor: pointer; font-size: 12px; color: #7b8794; list-style: none; }
.pub-more summary::-webkit-details-marker { display: none; }
.pub-more summary::before { content: '▸ '; }
.pub-more[open] summary::before { content: '▾ '; }
.pub-more .more-inner { padding-top: 14px; }

.pub-foot { border-top: 1px solid #e8edf2; background: #fff; padding: 12px 22px; display: flex; align-items: center; gap: 12px; }
.pub-progress { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.pub-progress-bar { width: 130px; height: 7px; border-radius: 5px; background: #eef2f6; overflow: hidden; flex: none; }
.pub-progress-bar i { display: block; height: 100%; background: #2e9c6a; border-radius: 5px; transition: width .25s; }
.pub-progress span { font-size: 12px; color: #7b8794; white-space: nowrap; }
.pub-foot button { border: 1px solid #dbe3ec; background: #fff; color: #5a6878; border-radius: 7px; padding: 9px 18px; font-size: 13px; }
.pub-foot button.pub-submit { background: #1d6fb8; border-color: #1d6fb8; color: #fff; font-weight: 700; padding: 9px 24px; }
.pub-foot button.pub-submit:disabled { opacity: .6; cursor: not-allowed; }
.pub-foot button.pub-submit:hover { background: #175d9c; }

/* product list: small commerce-style cards */
.prod-item { display: flex; gap: 10px; align-items: center; }
.prod-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid #e6ebf1; background: #f3f6f9; flex: none; }
.prod-item .pi-main { flex: 1; min-width: 0; }
.prod-item h4 { margin: 0 0 3px; font-size: 13px; }
.prod-item p { margin: 0; font-size: 11px; color: #8a97a6; }
.prod-item .row { margin-top: 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.prod-item .row button { font-size: 11px; padding: 4px 8px; white-space: nowrap; }

@media (max-width: 800px) {
  .pub-layer { padding: 0; }
  .pub-wrap { width: 100%; max-width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .pub-head { padding: 12px 14px; }
  .pub-title { font-size: 16px; }
  .pub-sub { font-size: 11px; }
  .pub-main { flex-direction: column; }
  .pub-nav { width: 100%; border-right: 0; border-bottom: 1px solid #e8edf2; padding: 8px 10px; display: flex; gap: 7px; align-items: center; }
  .pub-nav-cap, .pub-nav-tip { display: none; }
  .pub-step { width: auto; flex: 1; margin: 0; padding: 7px 8px; gap: 7px; }
  .pub-step b { width: 20px; height: 20px; font-size: 11px; }
  .pub-step span { font-size: 12px; }
  .pub-step small { display: none; }
  .pub-step i { font-size: 11px; }
  .pub-scroll { padding: 12px 12px 20px; }
  .pub-card { padding: 14px 13px; margin-bottom: 12px; }
  .pub-grid2 { grid-template-columns: 1fr; gap: 0; }
  .pub-foot { padding: 9px 12px; gap: 8px; flex-wrap: wrap; }
  .pub-progress { flex: 1 1 100%; order: -1; }
  .pub-progress-bar { width: 90px; }
  .pub-foot button { flex: 1; padding: 10px 8px; }
  .pub-thumb { width: 84px; }
  .pub-thumb img { height: 60px; }
  .pub-feat { flex-direction: column; }
  .pub-feat .imgfield { flex: none; width: 100%; }
  .pub-row input { font-size: 12px; padding: 8px 6px; }
  .si-tools { gap: 6px; padding: 9px; }
  .si-btn { flex: 1 1 auto; padding: 9px 8px; }
  .si-layer { padding: 0; align-items: stretch; }
  .si-box { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
  .si-hd { padding: 11px 12px; }
  .si-paste { padding: 10px 12px 0; }
  .si-bar { padding: 9px 12px; gap: 7px 10px; }
  .si-bar select { max-width: 120px; }
  .si-tip { padding: 8px 12px; }
  .si-tbl { margin: 0 12px; }
  .si-tr input { font-size: 12px; padding: 7px 6px; }
  .si-mode { padding: 9px 12px; gap: 12px; flex-wrap: wrap; }
  .si-ft { padding: 9px 12px; flex-wrap: wrap; }
  .si-ft .tb-btn { flex: 1; padding: 10px 6px; }
  .si-grid th input, .si-grid td input { width: 88px; min-width: 78px; }
  .si-bar #siShape { flex: 1 1 auto; }
  .pf-tbl-hd span { flex: 1 1 100%; margin-right: 0; }
}

/* ---------- phone / narrow screens: stack the three columns vertically ---------- */
@media (max-width: 800px) {
  html, body { height: auto; }
  body { overflow: auto; font-size: 15px; }
  .topbar { height: 50px; padding: 0 12px; }
  .brand { font-size: 14px; gap: 8px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand small { display: none; }
  .topbar .actions { flex: none; gap: 4px; }
  .topbar .actions span { display: none; }
  .topbar .actions button { padding: 6px 8px; font-size: 12px; white-space: nowrap; }
  .toolbar {
    height: auto; min-height: 50px; padding: 7px 10px; gap: 6px; flex-wrap: wrap;
    overflow-x: visible;
  }
  .toolbar .tb-sep, .toolbar .tb-label, .toolbar .save-state, #deviceGroup { display: none; }
  .toolbar .tb-spacer { flex: 0 0 4px; }
  .tb-btn { padding: 8px 11px; font-size: 13px; }
  .tb-select { padding: 8px; }
  .workspace { flex-direction: column; height: auto; }
  .sidebar { width: 100%; min-width: 0; border-right: 0; border-bottom: 1px solid #e5eaf0; }
  .mod-tabs { flex-direction: row; overflow-x: auto; gap: 4px; padding: 8px; }
  .mod { width: auto; flex: none; padding: 8px 11px; font-size: 13px; white-space: nowrap; }
  .mod i { display: none; }
  .side-body { max-height: 34vh; padding: 10px; }
  .canvas { width: 100%; padding: 8px; overflow: visible; }
  .frame-wrap { margin: 8px 0 0; }
  #siteFrame { height: 62vh; min-height: 380px; }
  .canvas-note { font-size: 11px; max-width: 92vw; text-align: center; }
  .inspector { width: 100%; min-width: 0; border-left: 0; border-top: 1px solid #e5eaf0; overflow: visible; }
  .insp-empty { padding: 18px; }
  .insp-empty .mini-tip { margin-top: 12px; }
  .insp-form { padding: 14px; }
  .modal-box { max-height: 92vh; }
  .modal-body { padding: 14px; }
  .picker-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-thumb { width: 72px; }
  .statusbar { height: auto; min-height: 28px; padding: 5px 10px; font-size: 11px; }
}
@media (max-width: 420px) {
  .toolbar { gap: 5px; padding: 6px 8px; }
  .tb-btn { padding: 8px 9px; font-size: 12px; }
  .picker-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- v9: layout mode, unified delete, live preview, solutions ---------- */
.tb-btn.active { background: #eaf4fd; border-color: #1d6fb8; color: #1d6fb8; font-weight: 600; }
.info-card .row { flex-wrap: wrap; }
.info-card .row button.danger { color: #c0392b; border-color: #f0d4d4; }
.info-card .row button.danger:hover { background: #fff3f3; border-color: #c0392b; color: #c0392b; }

.pub-preview { width: 342px; flex: none; min-width: 0; border-left: 1px solid #e8edf2;
  background: #fff; display: flex; flex-direction: column; }
.pub-preview-hd { padding: 10px 12px; border-bottom: 1px solid #eef1f5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pub-preview-hd b { font-size: 12px; color: #1d6fb8; }
.pub-preview-hd span { flex: 1 1 100%; font-size: 11px; color: #9aa7b5; }
.pub-preview-hd button { border: 1px solid #dbe3ec; background: #fff; border-radius: 5px;
  padding: 3px 8px; font-size: 11px; color: #5a6878; cursor: pointer; }
.pub-preview iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.pub-preview-ft { padding: 8px 12px; border-top: 1px solid #eef1f5; font-size: 11px; color: #9aa7b5; }

.sol-item { border: 1px solid #e8edf2; border-radius: 9px; padding: 14px;
  margin-bottom: 12px; background: #fcfdfe; }
.sol-item-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sol-item-hd b { font-size: 13px; color: #33404e; }
.sol-item-hd button { border: 0; background: none; color: #c0392b; font-size: 12px; cursor: pointer; }
.sol-img { display: flex; gap: 12px; align-items: center; }
.sol-img img { width: 96px; height: 76px; object-fit: cover; border: 1px solid #e3e9ef;
  border-radius: 7px; background: #f3f6f9; flex: none; }
.sol-img button { display: block; margin-bottom: 6px; border: 1px solid #dbe3ec; background: #fff;
  border-radius: 6px; padding: 6px 10px; font-size: 12px; color: #1d6fb8; cursor: pointer; white-space: nowrap; }
.sol-img button:hover { border-color: #1d6fb8; background: #f4f9fe; }
.pub-solution .pub-scroll { padding-top: 18px; }

@media (max-width: 1100px) {
  .pub-preview { display: none; }
  .pub-preview.show { display: flex; position: absolute; z-index: 8;
    inset: 72px 10px 66px; width: auto; border: 1px solid #cfe2f4;
    border-radius: 9px; box-shadow: 0 16px 44px rgba(20,40,70,.3); overflow: hidden; }
}
.pub-head-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.pub-preview-btn { border: 1px solid #cfe2f4; background: #eaf4fd; color: #1d6fb8;
  border-radius: 7px; padding: 7px 12px; font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer; }
.pub-preview-btn:hover { background: #dbeefc; border-color: #1d6fb8; }
@media (min-width: 1101px) { .pub-preview.hide { display: none; } }

@media (max-width: 800px) {
  .pub-grid2 { grid-template-columns: 1fr; }
  .sol-img img { width: 76px; height: 62px; }
  .pub-preview.show { inset: 54px 6px 60px; }
  .pub-preview-btn { padding: 6px 8px; font-size: 11px; }
}

/* ---------- whole-site fixed info (contact + QR) ---------- */
.ct-layer { position: fixed; inset: 0; background: rgba(20,32,45,.5); z-index: 620;
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.ct-wrap { width: 1180px; max-width: 100%; height: min(90vh, 900px); display: flex;
  flex-direction: column; background: #f5f7fa; border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24); overflow: hidden; }
.ct-head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 16px 22px; background: #fff; border-bottom: 1px solid #eef1f5; }
.ct-title { font-size: 18px; font-weight: 700; color: #1e2b38; }
.ct-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; color: #1d6fb8; background: #eaf4fd; vertical-align: 2px; }
.ct-sub { margin-top: 5px; font-size: 12px; color: #7b8794; line-height: 1.5; }
.ct-x { border: 0; background: #f3f6f9; color: #7b8794; width: 30px; height: 30px;
  border-radius: 7px; font-size: 16px; flex: none; cursor: pointer; }
.ct-x:hover { background: #e6edf4; color: #26313d; }
.ct-scroll { flex: 1; overflow-y: auto; padding: 18px 22px 26px; min-height: 0; }
.ct-notice { background: #eaf4fd; border: 1px solid #cfe4f6; color: #1a5a92;
  border-radius: 9px; padding: 11px 14px; font-size: 12.5px; line-height: 1.7; margin-bottom: 16px; }
.ct-card { background: #fff; border: 1px solid #e8edf2; border-radius: 10px;
  padding: 18px 20px; margin-bottom: 14px; }
.ct-card-hd { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #eef1f5;
  padding-bottom: 12px; margin-bottom: 16px; }
.ct-card-hd b { width: 24px; height: 24px; border-radius: 6px; background: #1d6fb8;
  color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.ct-card-hd h4 { margin: 0; font-size: 15px; color: #1e2b38; }
.ct-card-hd span { margin-left: auto; font-size: 11px; color: #9aa7b5; }
.ct-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.ct-field label { display: block; font-size: 12.5px; font-weight: 600; color: #3c4b5a; margin-bottom: 6px; }
.ct-input { width: 100%; box-sizing: border-box; border: 1px solid #dfe6ed; border-radius: 7px;
  padding: 9px 11px; font-size: 13px; color: #26313d; background: #fff; }
.ct-input:focus { outline: none; border-color: #1d6fb8; box-shadow: 0 0 0 3px rgba(29,111,184,.1); }
.ct-help { margin-top: 5px; font-size: 11px; color: #9aa7b5; line-height: 1.5; }
.ct-warn { margin-top: 6px; font-size: 11px; color: #8a6c26; background: #fff9e8;
  border: 1px solid #f2e2b8; border-radius: 6px; padding: 7px 9px; line-height: 1.5; }
.ct-adv { margin-top: 16px; border-top: 1px dashed #e6ebf1; padding-top: 12px; }
.ct-adv summary { cursor: pointer; font-size: 12px; color: #1d6fb8; font-weight: 600; }
.ct-adv .ct-grid2 { margin-top: 14px; }
.ct-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ct-qr-card { border: 1px solid #e8edf2; border-radius: 9px; padding: 14px; background: #fbfcfe; }
.ct-qr-title { font-size: 13px; font-weight: 600; color: #26313d; margin-bottom: 12px; }
.ct-qr-title small { font-weight: 400; color: #9aa7b5; margin-left: 8px; }
.ct-qr-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ct-qr-box { flex: 1; min-width: 0; text-align: center; }
.ct-qr-box img { width: 100%; max-width: 120px; height: 120px; object-fit: contain;
  border: 1px solid #e6ebf1; border-radius: 8px; background: #fff; }
.ct-qr-box span { display: block; margin-top: 6px; font-size: 11px; color: #8a97a6; }
.ct-qr-box.is-new img { border-color: #1d6fb8; }
.ct-qr-arrow { font-size: 18px; color: #9aa7b5; flex: none; }
.ct-qr-card .wide-btn { display: block; text-align: center; }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 22px; background: #fff; border-top: 1px solid #e8edf2; }
.ct-summary { font-size: 12px; color: #5a6878; line-height: 1.6; }
.ct-summary b { color: #1d6fb8; }
.ct-summary small { color: #9aa7b5; }
.ct-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ct-buttons .wide-btn { width: auto; padding: 9px 13px; white-space: nowrap; font-size: 12px; }
.ct-result { border-radius: 9px; padding: 14px 16px; margin: 4px 0 18px;
  font-size: 12.5px; line-height: 1.7; }
.ct-result.info { background: #eaf4fd; border: 1px solid #cfe4f6; color: #274863; }
.ct-result.ok { background: #eaf8f1; border: 1px solid #c9e9d8; color: #1d6544; }
.ct-result.warn { background: #fff9e8; border: 1px solid #f2e2b8; color: #8a6c26; }
.ct-result-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.ct-result-list { margin: 8px 0; padding-left: 20px; }
.ct-result-list li { margin-bottom: 4px; }
.ct-result-list span { color: #8a97a6; }
.ct-result-note { font-size: 11.5px; opacity: .85; margin: 8px 0 0; }
.ct-result code { background: rgba(0,0,0,.05); padding: 2px 5px; border-radius: 4px; }
@media (max-width: 800px) {
  .ct-layer { padding: 0; }
  .ct-wrap { width: 100%; max-width: 100%; height: 100%; border-radius: 0; }
  .ct-head { padding: 12px 14px; }
  .ct-sub { font-size: 11px; }
  .ct-scroll { padding: 12px 12px 20px; }
  .ct-grid2, .ct-qr-grid { grid-template-columns: 1fr; }
  .ct-card { padding: 14px; }
  .ct-card-hd span { display: none; }
  .ct-foot { flex-direction: column; align-items: stretch; padding: 10px 12px; gap: 8px; }
  .ct-buttons { justify-content: stretch; }
  .ct-buttons .wide-btn { flex: 1 1 44%; text-align: center; }
  .ct-qr-box img { height: 96px; }
}

/* ============================================================
   UI refresh v11 — visual polish + easier operation
   Append-only overrides. All legacy ids/classes are preserved.
   ============================================================ */
::selection { background: #cfe6f7; color: var(--ui-900); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd7e2; border: 2px solid transparent;
  background-clip: padding-box; border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: #a9bccd; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--ui-600); outline-offset: 2px; }

/* ---------- login / first password change ---------- */
.auth-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center;
  justify-content: center; background: linear-gradient(135deg, #eaf2f9 0%, #f7fafd 52%, #e6eff8 100%); }
.auth-overlay::before { content: ''; position: absolute; width: 560px; height: 560px; right: -150px;
  top: -190px; border-radius: 50%; background: radial-gradient(circle, rgba(29,111,165,.13), transparent 70%);
  pointer-events: none; }
.auth-overlay::after { content: ''; position: absolute; width: 420px; height: 420px; left: -140px;
  bottom: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(20,73,108,.09), transparent 70%);
  pointer-events: none; }
.auth-card { position: relative; width: 400px; max-width: 92vw; background: #fff; padding: 30px 30px 20px;
  border: 1px solid #e2ebf3; border-radius: 16px; box-shadow: 0 24px 60px rgba(18,55,90,.16); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-logo { width: 42px; height: 42px; border-radius: 12px; flex: none; font-size: 21px; font-weight: 800;
  color: #fff; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ui-800), var(--ui-600)); box-shadow: 0 5px 14px rgba(29,111,165,.3); }
.auth-brand b { display: block; font-size: 17px; color: var(--ui-ink); letter-spacing: .2px; }
.auth-brand small { display: block; font-size: 11.5px; color: #8b9bab; margin-top: 3px; }
.auth-lead { font-size: 12.5px; color: #7c8b9b; margin: 15px 0 22px; }
.auth-label { display: block; font-size: 12px; font-weight: 600; color: #4a5c6e; margin: 0 0 6px; }
.auth-input { width: 100%; box-sizing: border-box; border: 1px solid #dfe8f0; border-radius: 9px;
  padding: 11px 12px; font-size: 14px; color: var(--ui-ink); background: #fbfdff; outline: none;
  transition: .18s; margin-bottom: 15px; }
.auth-input:focus { background: #fff; border-color: var(--ui-600); box-shadow: 0 0 0 3px rgba(29,111,165,.12); }
.auth-submit { width: 100%; padding: 12px; border: 0; border-radius: 9px; margin-top: 3px;
  background: linear-gradient(135deg, var(--ui-800), var(--ui-600)); color: #fff; font-size: 14px;
  font-weight: 700; cursor: pointer; box-shadow: 0 5px 16px rgba(29,111,165,.26); transition: .18s; }
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(29,111,165,.32); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.auth-notice { background: #fff9e8; border: 1px solid #f2e2b8; border-radius: 9px; padding: 11px 12px;
  font-size: 12px; line-height: 1.65; color: #8a6c26; margin-bottom: 16px; }
.auth-error { min-height: 20px; margin-top: 10px; font-size: 12.5px; text-align: center; }
.auth-foot { text-align: center; font-size: 11px; color: #a7b4c1; margin-top: 8px;
  border-top: 1px solid #eef2f6; padding-top: 14px; }

/* ---------- top bar ---------- */
.topbar { position: relative; z-index: 20; background: linear-gradient(180deg, #fff, #fbfdff);
  border-bottom: 1px solid var(--ui-line); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--ui-800), var(--ui-600) 48%, transparent 88%); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--ui-800), var(--ui-600));
  box-shadow: 0 3px 10px rgba(29,111,165,.28); }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text b { font-size: 15px; font-weight: 700; color: var(--ui-ink); letter-spacing: .2px; }
.brand small { margin: 2px 0 0 0; font-size: 11px; color: #8a99a8; font-weight: 400; }
.topbar .actions > span { display: inline-flex; align-items: center; background: #f1f6fb;
  border: 1px solid #e0ebf5; color: #5a7086; font-size: 11px; padding: 4px 10px;
  border-radius: 20px; margin-right: 4px; order: 0; white-space: nowrap; }
.topbar .actions button { border: 1px solid var(--ui-line); background: #fff; color: #5d6f82;
  padding: 7px 12px; border-radius: 8px; font-size: 12px; transition: .18s; white-space: nowrap; }
.topbar .actions button:hover { border-color: var(--ui-600); color: var(--ui-600);
  background: var(--ui-50); transform: translateY(-1px); }
.ui-help-btn { order: 9; font-weight: 600; }
.ui-help-btn:hover { border-color: var(--ui-600) !important; color: var(--ui-600) !important; }

/* ---------- toolbar ---------- */
.toolbar { position: relative; z-index: 15; background: #fff; border-bottom: 1px solid var(--ui-line);
  box-shadow: var(--ui-shadow-sm); gap: 10px; padding: 0 16px; }
.tb-sep { background: #e9eef3; margin: 0 2px; }
.tb-label { color: #94a2b1; font-size: 11.5px; }
.tb-select { border: 1px solid #dfe8f0; border-radius: 8px; padding: 7px 10px; font-size: 12.5px;
  background: #fbfdff; transition: .18s; }
.tb-select:focus { border-color: var(--ui-600); outline: none; box-shadow: 0 0 0 3px rgba(29,111,165,.1); }
.tb-btn { border: 1px solid var(--ui-line); background: #fff; color: #4c5f72; padding: 8px 13px;
  border-radius: 8px; font-size: 13px; transition: .18s; box-shadow: 0 1px 1px rgba(20,50,80,.03); }
.tb-btn:hover:not(:disabled) { border-color: var(--ui-600); color: var(--ui-800); background: #f7fbff;
  box-shadow: var(--ui-shadow-sm); transform: translateY(-1px); }
.tb-btn:active:not(:disabled) { transform: translateY(0); }
.tb-btn:disabled { opacity: .42; cursor: not-allowed; }
.tb-btn.primary { background: linear-gradient(135deg, var(--ui-800), var(--ui-600));
  border-color: var(--ui-800); color: #fff; font-weight: 700; box-shadow: 0 3px 10px rgba(29,111,165,.25); }
.tb-btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #0f3d5c, #175f90);
  border-color: var(--ui-900); color: #fff; }
.tb-btn.publish { background: linear-gradient(135deg, #0e7a57, #159a6d); border-color: #0e7a57;
  color: #fff; font-weight: 700; box-shadow: 0 3px 10px rgba(18,128,92,.22); }
.tb-btn.publish:hover:not(:disabled) { background: #0c6949; border-color: #0c6949; color: #fff; }
.tb-btn.active { background: var(--ui-50); border-color: var(--ui-600); color: var(--ui-800); font-weight: 700; }
.dev-group { background: #f4f7fb; border: 1px solid #e7edf3; border-radius: 9px; padding: 3px; gap: 2px; }
.dev { padding: 6px 11px; border-radius: 7px; font-size: 12px; transition: .18s; border: 1px solid transparent; }
.dev.active { background: #fff; color: var(--ui-800); border-color: #d8e6f2; font-weight: 600;
  box-shadow: 0 1px 4px rgba(20,60,100,.10); }
.btn-pair { gap: 3px; background: #f7f9fc; border: 1px solid #edf1f5; border-radius: 9px; padding: 3px; }
.btn-pair .tb-btn { border-color: transparent; background: transparent; padding: 5px 9px;
  box-shadow: none; font-size: 12px; }
.btn-pair .tb-btn:hover:not(:disabled) { background: #fff; border-color: #dce8f3; }
.save-state { display: inline-flex; align-items: center; gap: 7px; background: #f2f6fa;
  border: 1px solid #e6edf3; color: #718294; padding: 5px 11px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.save-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #9fb1c1; flex: none; }
.save-state.dirty { background: #fff6e8; border-color: #f4dcae; color: #a8680f; font-weight: 700; }
.save-state.dirty::before { background: #e39b1c; box-shadow: 0 0 0 3px rgba(227,155,28,.16); }
.ui-side-toggle { font-size: 12px; color: #6a7c8e; padding: 8px 11px; }
body.ui-side-collapsed .ui-side-toggle { background: var(--ui-50); border-color: var(--ui-600); color: var(--ui-800); }

/* ---------- sidebar ---------- */
.workspace { height: calc(100vh - 56px - 54px - 30px); }
.sidebar { z-index: 5; box-shadow: 2px 0 12px rgba(20,50,80,.03);
  transition: width .22s ease, min-width .22s ease; background: #fff; }
body.ui-side-collapsed .sidebar { width: 0; min-width: 0; border-right: 0; overflow: hidden; }
.mod-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 12px 10px 10px;
  border-bottom: 1px solid #edf1f5; background: linear-gradient(180deg, #fff, #fcfdfe); }
.mod-cap { grid-column: 1 / -1; font-size: 10.5px; letter-spacing: 1px; color: #9aa9b8;
  font-weight: 700; padding: 5px 6px 2px; }
.mod-cap:not(:first-child) { margin-top: 7px; border-top: 1px dashed #e9eef3; padding-top: 11px; }
.mod { position: relative; gap: 7px; padding: 9px 8px; border-radius: 8px; font-size: 12.5px;
  justify-content: flex-start; transition: .16s; }
.mod i { width: 17px; font-size: 14px; }
.mod span { white-space: nowrap; }
.mod.active { background: linear-gradient(135deg, #eaf4fd, #f4f9fe);
  box-shadow: inset 0 0 0 1px #cfe4f6; font-weight: 700; }
.mod.active::before { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 3px; background: var(--ui-600); }
.mod:hover:not(.active) { background: #f4f8fc; transform: translateY(-1px); }
.side-body { padding: 12px; }
.side-hint { color: #8a99a8; font-size: 11.5px; line-height: 1.65; }
.search-wrap { position: relative; margin-bottom: 10px; }
.sw-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .65; pointer-events: none; }
.search-wrap input { width: 100%; border: 1px solid #dfe8f0; border-radius: 9px;
  padding: 9px 30px 9px 31px; background: #f8fbfd; font-size: 12.5px; outline: none; transition: .18s; }
.search-wrap input:focus { background: #fff; border-color: var(--ui-600);
  box-shadow: 0 0 0 3px rgba(29,111,165,.1); }
.sw-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 20px;
  height: 20px; padding: 0; border: 0; border-radius: 50%; background: #e6edf4; color: #6b7d8f;
  font-size: 14px; line-height: 19px; }
.sw-clear:hover { background: #d5e3ef; color: var(--ui-800); }
.wide-btn { border-radius: 9px; padding: 10px; font-size: 13px; font-weight: 500;
  transition: .18s; box-shadow: 0 1px 2px rgba(20,50,80,.03); }
.wide-btn:hover { border-color: var(--ui-600); color: var(--ui-800); background: #f7fbff; transform: translateY(-1px); }
.wide-btn.primary { background: linear-gradient(135deg, var(--ui-800), var(--ui-600));
  border-color: var(--ui-800); box-shadow: 0 3px 10px rgba(29,111,165,.2); }
.wide-btn.primary:hover { color: #fff; background: linear-gradient(135deg, #0f3d5c, #175f90); }
.wide-btn.danger:hover { border-color: var(--ui-red); color: var(--ui-red); background: #fff5f4; }
.page-group { margin-bottom: 11px; }
.group-title { font-size: 11px; color: #8b9bab; padding: 7px 8px 5px; font-weight: 600; letter-spacing: .3px; }
.group-title span:last-child { background: #eef3f8; color: #8496a7; border-radius: 10px;
  padding: 1px 7px; font-size: 10px; }
.page-item { position: relative; padding: 9px 11px; border-radius: 8px; font-size: 12.5px; transition: .15s; }
.page-item small { font-size: 10.5px; color: #a6b3c0; }
.page-item:hover { background: #f3f8fd; transform: translateX(2px); }
.page-item.active { background: linear-gradient(135deg, #e9f3fc, #f4f9fe);
  box-shadow: inset 0 0 0 1px #d3e6f6; font-weight: 700; }
.page-item.active::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 3px; border-radius: 3px; background: var(--ui-600); }
.info-card { border-radius: 10px; border-color: #e7edf3; box-shadow: var(--ui-shadow-sm); transition: .18s; }
.info-card:hover { box-shadow: var(--ui-shadow-md); border-color: #d5e4f1; }
.info-card h4 { color: var(--ui-ink); }
.info-card .row button { border-radius: 7px; transition: .15s; }
.media-grid img { transition: .18s; }
.media-grid img:hover { border-color: var(--ui-600); transform: scale(1.03); box-shadow: var(--ui-shadow-sm); }
.block-panel { border-radius: 10px; }
.block-tpl { border-radius: 9px; transition: .16s; }
.block-tpl:hover { box-shadow: var(--ui-shadow-sm); }

/* ---------- canvas ---------- */
.canvas { background: radial-gradient(circle at 50% 0%, #f1f5f9 0%, #e8edf3 72%); }
.canvas-note { background: rgba(18,63,97,.88); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 4px 14px rgba(20,50,80,.2); font-size: 11.5px; padding: 6px 14px; letter-spacing: .2px; }
.frame-wrap { border-radius: 10px; border: 1px solid #e1e9f0;
  box-shadow: 0 10px 30px rgba(24,52,82,.14); }
.empty-state { background: radial-gradient(circle at 50% 35%, #f4f8fc 0%, #e9eef4 100%); }
.empty-state h2 { color: var(--ui-ink); font-size: 19px; }
.empty-state p { color: #7b8b9b; }

/* ---------- inspector ---------- */
.inspector { box-shadow: -2px 0 12px rgba(20,50,80,.03); }
.insp-empty { padding: 40px 22px; }
.empty-ill { width: 62px; height: 62px; margin: 0 auto; border-radius: 18px; font-size: 29px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eaf4fd, #f6fbff); box-shadow: inset 0 0 0 1px #d9eaf8; }
.insp-empty h3 { color: var(--ui-ink); font-size: 15px; margin: 16px 0 6px; }
.insp-empty p { font-size: 12px; }
.insp-steps { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; }
.insp-steps li { display: flex; align-items: center; gap: 9px; padding: 7px 9px; margin-bottom: 6px;
  border-radius: 8px; background: #f7fafd; font-size: 12px; color: #5b6d80; }
.insp-steps b { width: 20px; height: 20px; flex: none; border-radius: 50%; font-size: 11px; color: #fff;
  background: var(--ui-600); display: flex; align-items: center; justify-content: center; }
.mini-tip { background: #f4f9fe; border: 1px solid #e0edf8; border-radius: 9px; }
.insp-badge { background: linear-gradient(135deg, var(--ui-800), var(--ui-600));
  color: #fff; padding: 5px 11px; border-radius: 7px; }
.insp-close { width: 26px; height: 26px; border-radius: 7px; transition: .15s; }
.insp-close:hover { background: #f1f5f9; color: var(--ui-800); }
.insp-form textarea:focus, .insp-form input:focus { outline: none; border-color: var(--ui-600);
  box-shadow: 0 0 0 3px rgba(29,111,165,.1); }
.insp-actions { border-top: 1px dashed #e3eaf1; }
.img-preview { border-radius: 9px; }

/* ---------- status / modal / toast ---------- */
.statusbar { background: #fbfcfe; border-top: 1px solid var(--ui-line); color: #8b9bab; }
.modal-bg { background: rgba(16,38,62,.5); backdrop-filter: blur(2px); }
.modal-box { border: 1px solid #e6edf3; border-radius: 14px; box-shadow: var(--ui-shadow-lg); }
.modal-head { padding: 17px 20px; }
.modal-head h3 { color: var(--ui-ink); }
.modal-head button { width: 28px; height: 28px; border-radius: 7px; transition: .15s; }
.modal-head button:hover { background: #f1f5f9; color: var(--ui-800); }
.toast { border-radius: 10px; box-shadow: var(--ui-shadow-md); padding: 11px 20px; }

/* ---------- help sheet (created by ui-enhance.js) ---------- */
.ui-sheet { position: fixed; inset: 0; z-index: 950; background: rgba(16,38,62,.46);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.ui-sheet-box { width: 560px; max-width: 100%; max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: var(--ui-shadow-lg); }
.ui-sheet-hd { display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid #edf1f5; }
.ui-sheet-hd h3 { margin: 0; font-size: 18px; color: var(--ui-ink); }
.ui-sheet-hd p { margin: 5px 0 0; font-size: 12px; color: #8b9bab; }
.ui-sheet-x { border: 0; background: #f1f5f9; color: #6b7d8f; width: 30px; height: 30px;
  border-radius: 8px; font-size: 16px; flex: none; }
.ui-sheet-x:hover { background: #e5edf4; color: var(--ui-ink); }
.ui-sheet-body { padding: 18px 24px 24px; }
.ui-sheet-body h4 { font-size: 13px; color: var(--ui-800); margin: 20px 0 10px; }
.ui-sheet-body h4:first-child { margin-top: 0; }
.ui-help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ui-help-card { border: 1px solid #e7edf3; border-radius: 10px; padding: 11px 12px; background: #fafdff; }
.ui-help-card b { display: block; font-size: 12.5px; color: var(--ui-ink); margin-bottom: 4px; }
.ui-help-card span { font-size: 11.5px; color: #7b8b9b; line-height: 1.6; }
.ui-keys { border: 1px solid #e7edf3; border-radius: 10px; overflow: hidden; }
.ui-key-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border-bottom: 1px solid #eff3f7; font-size: 12.5px; color: #4c5f72; }
.ui-key-row:last-child { border-bottom: 0; }
.ui-key-row kbd { flex: none; min-width: 104px; text-align: center; background: #f2f6fa;
  border: 1px solid #dfe8f0; border-bottom-width: 2px; border-radius: 6px; padding: 4px 7px;
  font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--ui-800); }
.ui-help-note { margin-top: 18px; background: #fff9e8; border: 1px solid #f2e2b8;
  border-radius: 9px; padding: 11px 13px; font-size: 12px; line-height: 1.7; color: #8a6c26; }

/* ---------- mobile: one-row toolbar + fixed action bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 800px) {
  body { padding-bottom: 58px; }
  .auth-card { padding: 24px 20px 18px; }
  .topbar { height: 50px; padding: 0 12px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
  .brand-text b { font-size: 13.5px; }
  .brand small { display: none; }
  .topbar .actions > span { display: none; }
  .topbar .actions button { padding: 6px 9px; font-size: 11.5px; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; height: auto; min-height: 48px;
    padding: 6px 10px; gap: 7px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: none; }
  .toolbar .tb-sep, .toolbar .tb-label, .toolbar .save-state,
  #deviceGroup, .toolbar #saveBtn, .toolbar #publishBtn { display: none; }
  .toolbar .tb-spacer { flex: 0 0 2px; }
  .btn-pair { padding: 2px; }
  .btn-pair .tb-btn { padding: 7px 9px; }
  .ui-side-toggle span { display: none; }
  .mod-tabs { display: flex; flex-direction: row; overflow-x: auto; padding: 8px; gap: 5px;
    scrollbar-width: none; }
  .mod-tabs::-webkit-scrollbar { display: none; }
  .mod-cap { display: none; }
  .mod { width: auto; flex: none; padding: 8px 11px; }
  .mod i { display: none; }
  .side-body { max-height: 36vh; }
  .workspace { flex-direction: column; height: auto; }
  .sidebar { width: 100%; min-width: 0; border-right: 0; border-bottom: 1px solid var(--ui-line); }
  body.ui-side-collapsed .sidebar { width: 100%; min-width: 0; border-bottom: 1px solid var(--ui-line); overflow: visible; }
  body.ui-side-collapsed .mod-tabs, body.ui-side-collapsed .side-body { display: none; }
  .canvas { width: 100%; padding: 8px; overflow: visible; }
  #siteFrame { height: 62vh; min-height: 380px; }
  .inspector { width: 100%; min-width: 0; border-left: 0; border-top: 1px solid var(--ui-line); overflow: visible; }
  .insp-empty { padding: 22px; }
  .insp-steps { max-width: 360px; margin-left: auto; margin-right: auto; }
  .statusbar { display: none; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 450;
    align-items: center; gap: 8px; padding: 9px 11px; background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px); border-top: 1px solid #dfe8f0;
    box-shadow: 0 -4px 18px rgba(20,50,80,.08); }
  .mb-state { flex: 1; min-width: 0; font-size: 11px; color: #7b8b9b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mb-state.dirty { color: #b7791f; font-weight: 700; }
  .mb-btn { border: 1px solid var(--ui-line); background: #fff; color: #4c5f72; border-radius: 9px;
    padding: 9px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
  .mb-btn:disabled { opacity: .42; }
  .mb-btn.publish { background: linear-gradient(135deg, #0e7a57, #159a6d);
    border-color: #0e7a57; color: #fff; }
  .ui-help-grid { grid-template-columns: 1fr; }
  .ui-sheet-box { max-height: 92vh; }
  .ui-sheet-hd, .ui-sheet-body { padding-left: 16px; padding-right: 16px; }
}
@media (min-width: 801px) { .mobile-bar { display: none; } }

/* ---- application-scene images in the product publisher ---- */
.pub-static-tip { margin-top: 7px; padding: 8px 11px; border-radius: 8px;
  background: #fff8e8; border: 1px solid #f0dfa8; color: #8a6a1f; font-size: 12px; line-height: 1.65; }
.pub-app-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px;
  padding: 9px 11px; background: #f4f9fe; border: 1px solid #dce9f5; border-radius: 9px; }
.pub-app-bar label { font-size: 12px; font-weight: 700; color: #47586a; white-space: nowrap; }
.pub-app-bar select { flex: 1; min-width: 0; border: 1px solid #d5e2ee; border-radius: 7px;
  padding: 7px 9px; background: #fff; color: #26313d; font-size: 12.5px; }
.pub-app-row { display: grid; grid-template-columns: 24px 150px 1fr auto; gap: 11px;
  align-items: start; border: 1px solid #eef1f5; border-radius: 9px;
  padding: 11px; margin-bottom: 9px; background: #fcfdfe; }
.pub-app-no { width: 24px; height: 24px; border-radius: 50%; background: #e7f1fb;
  color: #14496c; font-size: 12px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; margin-top: 2px; }
.pub-app-row .imgfield { margin: 0; }
.pub-app-row .imgfield .if-preview { height: 76px; }
.pub-app-row .imgfield .if-btns button { font-size: 11px; padding: 5px 7px; }
.pub-app-cap label { display: block; font-size: 11px; color: #8a97a6; margin: 2px 0 5px; }
.pub-app-cap input { width: 100%; border: 1px solid #dbe3ec; border-radius: 6px;
  padding: 8px 9px; background: #fff; color: #26313d; font-size: 13px; }
.pub-app-ops { display: flex; flex-direction: column; gap: 5px; }
.pub-app-ops button { width: 28px; height: 28px; border: 1px solid #dce5ee; border-radius: 7px;
  background: #fff; color: #607487; font-size: 13px; line-height: 1; }
.pub-app-ops button:hover { border-color: #1d6fa5; color: #1d6fa5; }
.pub-app-ops button.danger:hover { border-color: #d9534f; color: #d9534f; }
.pub-app-empty { padding: 16px; text-align: center; font-size: 12.5px; color: #8a97a6;
  border: 1px dashed #dbe3ec; border-radius: 9px; background: #fafcfe; }
@media (max-width: 800px) {
  .pub-app-row { grid-template-columns: 24px 1fr auto; }
  .pub-app-row .imgfield { grid-column: 2 / 4; }
  .pub-app-cap { grid-column: 2 / 3; }
  .pub-app-ops { flex-direction: row; grid-column: 3 / 4; }
}
