/* Gudpress Admin — styles
   Warm, editorial, calm. Serif for headings, sans for chrome.
   No rounded/bubble fonts. Generous whitespace. */

:root {
  --bg: #faf7f4;
  --panel: #ffffff;
  --panel-2: #f6f1ec;
  --border: #eae2d8;
  --border-2: #dcd0c1;
  --text: #2a2036;
  --text-dim: #6b6072;
  --accent: #b8748e;
  --accent-2: #8a5b74;
  --accent-soft: #f4dbe4;
  --success: #6a8e6a;
  --danger: #b0596b;
  --shadow: 0 2px 6px rgba(60, 40, 60, 0.06);
  --shadow-lg: 0 8px 32px rgba(60, 40, 60, 0.1);
  --radius: 6px;
  --radius-lg: 10px;
  --fs-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-serif: "Cormorant Garamond", "Times New Roman", serif;
  --fs-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: var(--fs-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
code, .mono { font-family: var(--fs-mono); font-size: 12px; color: var(--text-dim); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-dim); font-family: var(--fs-serif); font-size: 18px; }

/* ------------- login ------------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, #f7e3ea, #faf7f4 60%);
  padding: 24px;
}
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px 36px; width: min(400px, 100%);
  box-shadow: var(--shadow-lg); text-align: center;
}
.login-mark { margin-bottom: 12px; }
.login-card h1 { font-family: var(--fs-serif); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; }
.login-sub { color: var(--text-dim); margin: 6px 0 24px; }
.login-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-2);
  border-radius: var(--radius); background: var(--panel-2); margin-bottom: 12px;
}
.login-card input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login-card button {
  width: 100%; padding: 12px; background: var(--accent-2); color: white;
  border-radius: var(--radius); font-weight: 500; letter-spacing: 0.01em;
}
.login-card button:hover { background: var(--accent); }
.login-card button:disabled { opacity: 0.6; cursor: not-allowed; }
.err { color: var(--danger); font-size: 13px; margin-bottom: 8px; }

/* ------------- shell ------------- */
.editor-shell { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  background: var(--panel); gap: 16px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-right { justify-self: end; }
.topbar-mid { text-align: center; }
.brand-title { font-family: var(--fs-serif); font-size: 18px; letter-spacing: -0.01em; }
.topbar-divider { color: var(--border-2); }
.topbar-page { color: var(--text-dim); font-size: 13px; }
.page-picker { position: relative; min-width: 0; }
.page-picker-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 220px; max-width: 52vw; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  background: var(--panel-2); color: var(--text); font-size: 13px; text-align: left;
}
.page-picker-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-picker-chevron { flex-shrink: 0; color: var(--accent-2); }
.page-picker-trigger:hover, .page-picker-trigger[aria-expanded="true"] { border-color: var(--accent-2); background: var(--accent-soft); }
.page-picker-trigger[aria-expanded="true"] .page-picker-chevron { transform: rotate(180deg); }
.page-picker-trigger:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.page-picker-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  width: 280px; max-width: calc(100vw - 20px); max-height: min(380px, 65vh);
  overflow-y: auto; padding: 6px; border-radius: var(--radius-lg);
  background: var(--panel); box-shadow: var(--shadow-lg);
  scrollbar-width: thin; scrollbar-color: var(--border-2) var(--panel);
}
.page-picker-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 10px 12px; border-radius: var(--radius);
  font-size: 13px; cursor: pointer;
}
.page-picker-option svg { flex-shrink: 0; }
.page-picker-option[aria-selected="true"] { color: var(--accent-2); font-weight: 600; }
.page-picker-option.is-active { background: var(--panel-2); outline: 1px solid var(--border-2); outline-offset: -1px; }
.page-picker-option[aria-selected="true"].is-active { background: var(--accent-soft); }
.topbar-link { font-size: 13px; padding: 6px 8px; }
.save-status { color: var(--text-dim); font-size: 13px; font-style: italic; }
.save-status.err { color: var(--danger); font-style: normal; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.pill-live { background: #eaf5ea; color: var(--success); border: 1px solid #d4ecd4; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: 13px; font-weight: 500;
  transition: background 0.12s, border-color 0.12s;
}
.btn-primary { background: var(--accent-2); color: white; }
.btn-primary:hover { background: var(--accent); }
.btn-primary:disabled { background: var(--border-2); color: var(--text-dim); cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.editor-body { flex: 1; display: grid; grid-template-columns: 300px 1fr 10px var(--preview-w, 460px); min-height: 0; }
.resizer {
  cursor: col-resize;
  background: var(--border);
  transition: background 0.15s;
  position: relative;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.resizer:hover, .resizer.is-dragging { background: var(--accent); }
.resizer::before { content: ''; position: absolute; inset: 0 -6px; z-index: 5; }
.resizer::after {
  content: '';
  display: block;
  width: 2px;
  height: 36px;
  background: var(--text-dim);
  opacity: 0.5;
  border-radius: 2px;
  box-shadow: -4px 0 0 var(--text-dim), 4px 0 0 var(--text-dim);
  transform: scaleX(0.5);
}
.resizer:hover::after, .resizer.is-dragging::after { opacity: 0.9; background: white; box-shadow: -4px 0 0 white, 4px 0 0 white; }

/* ------------- sidebar ------------- */
.sidebar {
  border-right: 1px solid var(--border); background: var(--panel);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.sidebar-tabs .tab {
  padding: 12px 4px; text-align: center; font-size: 12px; font-weight: 500;
  color: var(--text-dim); border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.sidebar-tabs .tab:hover { color: var(--text); }
.sidebar-tabs .tab.is-active { color: var(--accent-2); border-color: var(--accent-2); }
.sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }
.sidebar-info { padding: 24px 16px; }
.sidebar-info .hint { color: var(--text-dim); font-size: 13px; line-height: 1.6; }

.sidebar-section-list { display: flex; flex-direction: column; gap: 4px; }
.sect-item {
  display: grid; grid-template-columns: auto auto 1fr auto;
  align-items: center; gap: 8px;
  padding: 10px 10px; border-radius: var(--radius);
  cursor: pointer; user-select: none;
  border: 1px solid transparent;
}
.sect-item:hover { background: var(--panel-2); }
.sect-item.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.sect-item.is-disabled { opacity: 0.5; }
.sect-item.is-dragging { opacity: 0.4; }
.sect-drag { color: var(--border-2); font-size: 14px; cursor: grab; letter-spacing: -2px; }
.sect-icon { font-size: 16px; color: var(--accent-2); }
.sect-body { display: flex; flex-direction: column; min-width: 0; }
.sect-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sect-type { font-size: 11px; color: var(--text-dim); }
.sect-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.sect-item:hover .sect-actions, .sect-item.is-selected .sect-actions { opacity: 1; }
.ico {
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 4px; color: var(--text-dim); font-size: 13px;
}
.ico:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.ico-danger:hover { background: #fbe4e8; color: var(--danger); }
.sidebar-add {
  margin-top: 14px; padding: 10px; width: 100%;
  border: 1px dashed var(--border-2); border-radius: var(--radius);
  color: var(--text-dim); font-size: 13px;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.sidebar-add:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }

/* ------------- main ------------- */
.main { padding: 32px 40px; overflow-y: auto; min-height: 0; }
.main-media { padding: 32px 40px; }
.empty-state { text-align: center; color: var(--text-dim); padding: 80px 20px; }
.empty-state h2, .empty-state h3 { font-family: var(--fs-serif); font-size: 22px; margin-bottom: 8px; color: var(--text); }
.empty-state p { max-width: 400px; margin: 0 auto; }

.section-editor { max-width: 720px; }
.section-editor-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border);
}
.section-editor-title { display: flex; align-items: center; gap: 12px; }
.section-editor-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--accent-soft); border-radius: var(--radius); color: var(--accent-2);
  font-size: 20px;
}
.section-editor h2 { font-family: var(--fs-serif); font-size: 24px; margin-bottom: 2px; letter-spacing: -0.01em; }
.section-editor-thumb { max-width: 200px; }
.section-editor-thumb img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.section-editor-form { display: flex; flex-direction: column; gap: 18px; }

.fld { display: flex; flex-direction: column; gap: 6px; }
.fld-label { font-size: 12px; font-weight: 500; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.fld-visibility { position: relative; padding: 10px; border-radius: var(--radius); transition: opacity 0.15s, background 0.15s; }
.fld-visibility.is-hidden { background: var(--panel-2); }
.fld-visibility.is-hidden > .fld { opacity: 0.55; }
.fld-visibility-btn {
  position: absolute; z-index: 2; top: 6px; right: 6px; width: 28px; height: 28px;
  display: grid; place-items: center; border: 1px solid var(--border); border-radius: 5px;
  background: var(--panel); color: var(--text-dim); cursor: pointer;
}
.fld-visibility-btn:hover, .fld-visibility-btn:focus-visible { color: var(--accent-2); border-color: var(--accent); background: var(--accent-soft); }
.fld-visibility-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fld-visibility-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fld-visibility.is-hidden .fld-visibility-btn { color: var(--danger); }
.fld-visibility > .fld > .fld-label, .fld-visibility > .fld > label > .fld-label { padding-right: 36px; }
.fld input[type="text"], .fld input[type="url"], .fld input[type="tel"], .fld input[type="email"], .fld input[type="password"], .fld textarea, .fld select {
  padding: 10px 12px; border: 1px solid var(--border-2);
  border-radius: var(--radius); background: var(--panel);
  transition: border-color 0.12s, box-shadow 0.12s;
  font-size: 14px; width: 100%;
}
.fld input:focus, .fld textarea:focus, .fld select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.fld textarea { resize: vertical; font-family: var(--fs-sans); }
.fld-hint { font-size: 12px; color: var(--text-dim); }
.fld-hint code { background: var(--panel-2); padding: 1px 4px; border-radius: 3px; font-size: 11px; color: var(--accent-2); }
.fld-err { border-color: var(--danger) !important; }
.fld-err:focus { box-shadow: 0 0 0 3px rgba(176, 89, 107, 0.15) !important; }
.fld-error { font-size: 12px; color: var(--danger); font-weight: 500; }
.fld-toggle { flex-direction: row; align-items: center; gap: 10px; }
.fld-toggle input { width: 16px; height: 16px; }
.fld-toggle .fld-label { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); }
.fld-color .color-row { display: flex; gap: 8px; }
.fld-color input[type="color"] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--panel); cursor: pointer; }
.fld-color input[type="text"] { flex: 1; font-family: var(--fs-mono); }

.rt-wrap { display: flex; flex-direction: column; gap: 6px; }
.rt-toolbar { display: flex; gap: 4px; }
.rt-toolbar button {
  padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 4px;
  background: var(--panel); color: var(--text-dim); font-size: 12px;
}
.rt-toolbar button:hover { background: var(--panel-2); color: var(--text); }
.rt-editable {
  padding: 10px 12px; border: 1px solid var(--border-2);
  border-radius: var(--radius); background: var(--panel);
  font-size: 14px; min-height: 60px; line-height: 1.5;
}
.rt-editable:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rt-editable:empty::before { content: attr(data-placeholder); color: var(--text-dim); }
.rt-editable em, .rt-editable i { font-style: italic; }
.rt-editable strong, .rt-editable b { font-weight: 600; }

/* Repeater */
.fld-repeater .rep-list { display: flex; flex-direction: column; gap: 6px; }
.rep-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.rep-item.is-dragging { opacity: 0.4; }
.rep-head {
  display: grid; grid-template-columns: auto auto 1fr auto;
  align-items: center; gap: 8px; padding: 8px 10px;
  cursor: pointer; user-select: none;
}
.rep-drag { color: var(--border-2); font-size: 14px; cursor: grab; letter-spacing: -2px; }
.rep-num { font-family: var(--fs-mono); font-size: 11px; color: var(--text-dim); }
.rep-title { font-size: 13px; }
.rep-actions { display: flex; align-items: center; gap: 4px; }
.rep-caret { color: var(--text-dim); font-size: 12px; width: 16px; text-align: center; }
.rep-body { padding: 12px 12px 16px 40px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; background: var(--panel-2); }
.rep-add {
  margin-top: 6px; padding: 8px 12px; border: 1px dashed var(--border-2); border-radius: var(--radius);
  color: var(--text-dim); font-size: 12px;
}
.rep-add:hover { border-color: var(--accent); color: var(--accent-2); }

/* Image picker */
.img-picker { display: flex; flex-direction: column; gap: 8px; }
.img-preview {
  position: relative;
  width: 100%; max-width: 320px; aspect-ratio: 16/9;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius); display: grid; place-items: center; overflow: hidden;
}
.img-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.img-preview > .img-dims-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.img-preview > .img-dims-wrap img { width: 100%; height: 100%; }
.img-placeholder { color: var(--text-dim); font-size: 12px; }
.img-dims-wrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.img-dims-wrap img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.img-dims {
  position: absolute; bottom: 4px; right: 4px;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 11px; font-weight: 600; font-family: var(--fs-mono);
  pointer-events: none; line-height: 1.3;
}
.img-picker-actions { display: flex; gap: 6px; }
.img-picker-actions button {
  padding: 6px 12px; border: 1px solid var(--border-2); border-radius: 4px;
  background: var(--panel); font-size: 12px; color: var(--text);
}
.img-picker-actions button:hover { background: var(--panel-2); }
.img-picker-actions .ico-danger { color: var(--danger); }
.img-picker-actions button:disabled { opacity: 0.6; cursor: not-allowed; }
.img-path code { font-size: 11px; color: var(--text-dim); word-break: break-all; }

/* Modal */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(30, 20, 30, 0.4);
  display: grid; place-items: center; z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--panel); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: 900px; width: 100%;
  max-height: 85vh; display: flex; flex-direction: column;
}
.modal-add { max-width: 780px; }
.modal-media { max-width: 900px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-family: var(--fs-serif); font-size: 20px; letter-spacing: -0.01em; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.add-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel-2); text-align: left; transition: all 0.12s;
  position: relative; overflow: hidden;
}
.add-card:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); box-shadow: var(--shadow); }
.add-card-icon { font-size: 22px; color: var(--accent-2); }
.add-card-label { font-weight: 500; font-size: 13px; }
.add-card-thumb { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); margin-top: 4px; }

/* Media library */
.media-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.media-head h2 { font-family: var(--fs-serif); font-size: 26px; letter-spacing: -0.01em; }
.media-head .hint { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.media-head label.btn { cursor: pointer; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.media-grid-large { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); text-align: left; transition: all 0.12s;
}
.media-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.media-tile-thumb { aspect-ratio: 1; background: var(--panel-2); border-radius: 4px; overflow: visible; display: grid; place-items: center; }
.media-tile-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-tile-name { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.media-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: visible; }
.media-card-thumb { aspect-ratio: 4/3; background: var(--panel-2); display: grid; place-items: center; }
.media-card-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.media-card-name { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card-meta { font-size: 11px; color: var(--text-dim); }
.media-card-actions { display: flex; gap: 6px; margin-top: 6px; }
.media-card-actions .btn { padding: 4px 10px; font-size: 11px; border: 1px solid var(--border-2); background: var(--panel); }
.media-card-actions .btn:hover { background: var(--panel-2); }
.media-card-actions .ico-danger { color: var(--danger); border-color: #f2c8d0; }
.media-card-actions .ico-danger:hover { background: #fbe4e8; }

/* Versions */
.version-list { list-style: none; margin: 0; padding: 0; }
.version-item {
  display: grid; grid-template-columns: 220px 1fr auto;
  gap: 12px; padding: 10px 12px; align-items: center;
  border-bottom: 1px solid var(--border);
}
.version-when { font-family: var(--fs-mono); font-size: 12px; }
.version-id { font-family: var(--fs-mono); font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-item .btn { padding: 4px 10px; font-size: 11px; border: 1px solid var(--border-2); background: var(--panel); }

.main-inquiries { min-width: 0; }
.inquiries-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.inquiries-head h2 { margin-bottom: 4px; }
.inquiries-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inquiries-head-actions label { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 12px; }
.inquiries-head-actions .btn, .inquiry-actions .btn { border: 1px solid var(--border-2); background: var(--panel); }
.inquiries-error { padding: 10px 12px; margin-bottom: 14px; border-radius: var(--radius); background: #fbe4e8; color: var(--danger); font-size: 13px; }
.inquiries-layout { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(320px, 1.15fr); min-height: 480px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.inquiries-list { max-height: calc(100vh - 230px); overflow-y: auto; border-right: 1px solid var(--border); }
.inquiry-row { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; color: var(--text-dim); background: var(--panel); }
.inquiry-row:hover, .inquiry-row.is-selected { background: var(--accent-soft); }
.inquiry-row.is-unread { color: var(--text); }
.inquiry-row.is-unread strong::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent-2); }
.inquiry-row-top { display: flex; justify-content: space-between; gap: 10px; color: var(--text); }
.inquiry-row-top time { flex-shrink: 0; color: var(--text-dim); font-size: 10px; font-weight: 400; }
.inquiry-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.inquiry-detail { min-width: 0; padding: 22px; }
.inquiry-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.inquiry-detail-head h3 { font-family: var(--fs-serif); font-size: 24px; }
.inquiry-detail-head time { color: var(--text-dim); font-size: 12px; }
.delivery-pill { padding: 4px 8px; border-radius: 999px; background: var(--panel-2); color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.delivery-pill.is-sent { background: #e4f5ec; color: #26704b; }
.delivery-pill.is-failed { background: #fbe4e8; color: var(--danger); }
.inquiry-detail dl { display: grid; gap: 10px; margin: 18px 0; }
.inquiry-detail dl div { display: grid; grid-template-columns: 60px 1fr; gap: 10px; }
.inquiry-detail dt { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.inquiry-detail dd { min-width: 0; overflow-wrap: anywhere; }
.inquiry-detail a { color: var(--accent-2); }
.inquiry-message { min-height: 150px; padding: 16px; border-radius: var(--radius); background: var(--panel-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.inquiry-actions { display: flex; gap: 8px; margin-top: 18px; }

/* Settings */
.settings-group { max-width: 680px; margin-bottom: 32px; }
.settings-group h3 { font-family: var(--fs-serif); font-size: 20px; margin-bottom: 16px; letter-spacing: -0.01em; }

/* Preview */
.preview {
  border-left: 1px solid var(--border);
  background: var(--panel-2);
  display: flex; flex-direction: column;
}
.preview-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--panel); }
.preview-device { display: flex; gap: 2px; background: var(--panel-2); border-radius: 4px; padding: 2px; }
.preview-device button {
  padding: 4px 10px; font-size: 11px; border-radius: 3px; color: var(--text-dim);
}
.preview-device button.is-active { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.preview-stage { flex: 1; display: grid; place-items: center; padding: 20px; overflow: auto; }
.preview-stage-desktop iframe { width: 100%; height: 100%; background: white; }
.preview-stage-tablet iframe, .preview-stage-mobile iframe { max-height: 100%; background: white; box-shadow: var(--shadow-lg); border-radius: 12px; }
.preview-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-dim); background: var(--panel); }
.hint { color: var(--text-dim); font-size: 12px; }
.sidebar-note { margin-top: 16px; padding: 0 6px; line-height: 1.5; }
.delivery-pill.is-stored { background: #eef0f6; color: #4a5578; }

/* Galleries */
.main-galleries { min-width: 0; }
.gal-new { display: flex; gap: 8px; }
.gal-new input { padding: 8px 12px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--panel); width: 260px; }
.gal-banner { padding: 10px 12px; margin-bottom: 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-2); font-size: 13px; }
.gal-banner-ok { background: #e4f5ec; color: #26704b; }
.gal-skipped { margin-bottom: 14px; font-size: 12px; color: var(--text-dim); }
.gal-skipped ul { margin: 6px 0 0; padding-left: 18px; }
.gal-layout { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 24px; align-items: start; }
.gal-list { display: flex; flex-direction: column; gap: 4px; }
.gal-list .hint { margin-top: 10px; }
.gal-row { display: grid; grid-template-columns: auto 48px 1fr; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; user-select: none; }
.gal-row:hover { background: var(--panel-2); }
.gal-row.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.gal-row.is-dragging { opacity: 0.4; }
.gal-row-thumb { width: 48px; height: 36px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.gal-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-row-body { display: flex; flex-direction: column; min-width: 0; }
.gal-row-body strong { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-row-body span { font-size: 11px; color: var(--text-dim); }
.gal-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gal-title-row { display: flex; align-items: flex-end; gap: 8px; max-width: 520px; }
.gal-title-row .fld { flex: 1; }
.gal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gal-actions label.btn { cursor: pointer; }
.gal-actions .is-disabled { opacity: 0.6; pointer-events: none; }
.gal-actions .ico-danger { color: var(--danger); }
.gal-spacer { flex: 1; }
.gal-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gal-photo { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.gal-photo.is-cover { border-color: var(--accent-2); box-shadow: 0 0 0 2px var(--accent-soft); }
.gal-photo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.gal-cover-badge { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-2); color: #fff; font-size: 10px; font-weight: 600; }
.gal-photo-actions { display: flex; gap: 4px; padding: 6px; flex-wrap: wrap; }
.gal-photo-actions .btn { border: 1px solid var(--border-2); background: var(--panel); font-size: 11px; padding: 3px 8px; }
.gal-photo-actions .ico-danger { color: var(--danger); }
@media (max-width: 900px) { .gal-layout { grid-template-columns: 1fr; } }

/* Responsive collapse */
@media (max-width: 1280px) {
  .editor-body { grid-template-columns: 260px 1fr 10px var(--preview-w, 400px); }
}
@media (max-width: 1080px) {
  .editor-body { grid-template-columns: 240px 1fr; }
  .preview, .resizer { display: none; }
}
@media (max-width: 720px) {
  .editor-body { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); max-height: 40vh; }
  .sidebar-tabs .tab { font-size: 10px; }
  .topbar { grid-template-columns: 1fr; padding: 8px 10px; gap: 8px; }
  .topbar-left { justify-content: center; }
  .topbar-right { justify-self: stretch; justify-content: center; flex-wrap: wrap; gap: 6px; }
  .topbar-mid { display: none; }
  .inquiries-head { flex-direction: column; }
  .inquiries-layout { grid-template-columns: 1fr; }
  .inquiries-list { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--border); }
  .inquiry-detail { padding: 16px; }
}
