/* Site editor styles. Same colours as the public site, calmer. */
:root {
  --bg: #121315;
  --panel: #1b1d20;
  --panel2: #24262a;
  --line: #33363b;
  --ink: #f2f2f3;
  --dim: #a9acb3;
  --red: #ff1e40;
  --red-soft: #ff6b80;
  --teal: #1effdd;
  --teal-dim: #12b8a0;
  --blush: #ffb4bf;
  --ok-bg: #0f2e29;
  --err-bg: #3a1219;
  --info-bg: #1f2633;
  --radius: 12px;
  --f-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --f-body: "Outfit", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.5;
}
a { color: var(--teal); }
a:hover { color: #8dfff0; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 6px; }
code, pre { font-family: var(--f-mono); font-size: 13px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--teal); color: #06110f; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.lead { color: var(--dim); margin: 0; max-width: 70ch; }

/* Top bar */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-head); font-weight: 800; font-size: 17px; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(90deg, var(--red) 0 50%, var(--teal) 50% 100%); display: inline-block; }
.adminnav { margin-left: auto; }
.adminnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.adminnav a, .adminnav .linkish { display: inline-block; padding: 8px 12px; border-radius: 8px; color: var(--dim); text-decoration: none; font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.adminnav a:hover, .adminnav .linkish:hover { color: var(--ink); background: var(--panel2); }
.adminnav a[aria-current="page"] { color: var(--teal); background: var(--panel2); }
.adminnav form { margin: 0; }
.menu-btn { display: none; margin-left: auto; }

/* Layout */
.main { max-width: 1180px; margin: 0 auto; padding: 20px 20px 120px; }
.main-bare { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--dim); }
.crumbs li + li::before { content: "\203A"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--dim); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { margin: 36px 0 12px; font-size: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.narrow { max-width: 520px; }
.stack > * + * { margin-top: 16px; }
.empty { text-align: center; color: var(--dim); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--f-mono); font-weight: 700; font-size: 13px; line-height: 1.2;
  padding: 10px 16px; min-height: 42px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--panel2); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line);
}
.btn:hover { background: #2f3237; color: var(--ink); }
.btn-primary { background: var(--teal); color: #06110f; box-shadow: none; }
.btn-primary:hover { background: #7affec; color: #06110f; }
.btn-quiet { background: transparent; }
.btn-danger { background: transparent; color: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.btn-danger:hover { background: var(--err-bg); color: #fff; }
.btn-small { padding: 7px 12px; min-height: 36px; font-size: 12px; }
.btn-icon { min-width: 36px; padding: 7px 8px; }
.btn-wide { width: 100%; }
.btn-spacer { display: inline-block; width: 36px; }
.linkish { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger-text { color: var(--red-soft) !important; }
.inline-form { display: inline; margin: 0; }

/* Notices */
.notice { border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--info-bg); }
.notice p { margin: 0; }
.notice p + p, .notice ul { margin-top: 8px; }
.notice ul { padding-left: 20px; margin-bottom: 0; }
.notice-ok { background: var(--ok-bg); border-color: var(--teal-dim); }
.notice-ok p::before { content: "\2713  "; color: var(--teal); font-weight: 700; }
.notice-error { background: var(--err-bg); border-color: var(--red); }
.notice-error a { color: #ffd0d7; }

/* Login */
.login-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.login-brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 13px; color: var(--dim); margin-bottom: 18px; }
.login-card h1 { font-size: 26px; }
.login-card .lead { margin-bottom: 18px; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dash-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.dash-card h2 a { color: var(--ink); text-decoration: none; }
.dash-card h2 a:hover { color: var(--teal); }
.dash-card p { margin: 0; font-size: 15px; }
.dash-count { font-family: var(--f-mono); font-size: 12px !important; color: var(--blush); }
.dash-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* List view */
.list-search { max-width: 420px; margin-bottom: 14px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.row.is-hidden .row-thumb img { opacity: 0.45; }
.row-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--panel2); display: block; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-thumb { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, var(--panel2) 0 8px, #2a2c31 8px 16px); }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; margin: 0; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.row-title:hover { color: var(--teal); }
.row-meta { margin: 4px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--dim); }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.reorder { display: inline-flex; gap: 4px; }
.rows.is-filtering .reorder { display: none; }
.badge { font-family: var(--f-mono); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--panel2); color: var(--dim); }
.badge-live { background: var(--ok-bg); color: var(--teal); }
.badge-hidden { background: var(--err-bg); color: var(--blush); }
.badge-feat { color: var(--blush); }
.more { position: relative; }
.more summary { list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 170px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.more-menu a, .more-menu .linkish { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 15px; }
.more-menu a:hover, .more-menu .linkish:hover { background: var(--panel); }
.more-menu form { display: block; }
.history-row { align-items: flex-start; }
.peek summary { cursor: pointer; color: var(--dim); font-size: 14px; margin-top: 6px; }
.peek pre { max-height: 360px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; white-space: pre-wrap; word-break: break-word; }

/* Forms */
.form-card { padding: 22px; }
.field { margin: 0 0 18px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; font-weight: 600; margin-bottom: 6px; }
.req { font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--blush); margin-left: 6px; }
.help { margin: 6px 0 0; font-size: 14px; color: var(--dim); max-width: 70ch; }
.err { margin: 6px 0 0; font-size: 14px; color: #ff9aa8; font-weight: 600; }
.has-error input, .has-error textarea, .has-error select, .has-error .imgpick, .has-error .ql-container { border-color: var(--red) !important; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], textarea, select {
  width: 100%; max-width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(30,255,221,.18); }
input[type="number"] { max-width: 160px; }
input[type="date"] { max-width: 220px; }
input[type="file"] { font: inherit; color: var(--dim); max-width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.group { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; background: rgba(255,255,255,0.015); }
.group > legend, .field-list > legend { font-family: var(--f-head); font-weight: 700; font-size: 17px; padding: 0 6px; margin-left: -6px; }
.group > .help, .field-list > .help { margin: 0 0 14px; }
.group .group { background: transparent; }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; min-height: 44px; }
.switch input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 46px; height: 26px; border-radius: 999px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); position: relative; flex: 0 0 auto; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--dim); transition: transform .15s, background .15s; }
.switch input:checked + .switch-track { background: var(--teal-dim); }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--teal); outline-offset: 2px; }
.switch-text { font-weight: 600; }

/* Repeater lists */
.field-list { margin: 0 0 18px; }
.field-list .count { font-family: var(--f-mono); font-size: 12px; color: var(--dim); font-weight: 500; }
.list-expand { margin: 0 0 8px; font-size: 14px; }
.list-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.list-item { border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.list-item .list-item { background: var(--panel); }
.li-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 4px; }
.li-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left; padding: 8px; cursor: pointer; border-radius: 6px; }
.li-toggle:hover { background: rgba(255,255,255,.04); }
.li-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--dim); transition: transform .15s; flex: 0 0 auto; }
.list-item.collapsed > .li-head .li-caret { transform: rotate(-90deg); }
.list-item.collapsed > .li-body { display: none; }
.li-tools { display: flex; gap: 4px; flex: 0 0 auto; }
.li-tools button { background: transparent; border: 1px solid var(--line); color: var(--dim); border-radius: 6px; min-width: 34px; min-height: 34px; font-size: 12px; cursor: pointer; font-family: var(--f-mono); padding: 0 8px; }
.li-tools button:hover { color: var(--ink); background: var(--panel); }
.li-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.li-body > .field:first-of-type, .li-body > input + .field { margin-top: 12px; }
.btn-add { margin-top: 2px; }

/* Image fields */
.imgpick { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); }
.imgpick-preview { width: 140px; height: 105px; border-radius: 8px; overflow: hidden; background: repeating-conic-gradient(#202226 0 25%, #1a1b1e 0 50%) 50% / 16px 16px; display: grid; place-items: center; flex: 0 0 auto; }
.imgpick-preview img { width: 100%; height: 100%; object-fit: contain; }
.imgpick-empty { color: var(--dim); font-size: 13px; font-family: var(--f-mono); }
.imgpick-side { flex: 1; min-width: 180px; }
.imgpick-path { margin: 8px 0 0; font-family: var(--f-mono); font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.img-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.img-status { margin: 6px 0 0; font-size: 14px; color: var(--dim); min-height: 0; }
.img-status.is-error { color: #ff9aa8; font-weight: 600; }
.imgs { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); }
.imgs-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.imgs-list:empty { display: none; }
.imgs-list:not(:empty) + .imgs-empty { display: none; }
.imgs-empty { margin: 0 0 10px; color: var(--dim); font-size: 14px; }
.imgs-item { position: relative; border-radius: 8px; overflow: hidden; background: var(--panel2); aspect-ratio: 4 / 3; }
.imgs-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgs-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 2px; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.imgs-tools button { background: rgba(18,19,21,.85); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; min-width: 32px; min-height: 30px; cursor: pointer; font-size: 11px; }
.imgs-tools button:hover { background: var(--panel2); }
.imgs-item:first-child .imgs-tools [data-imgs-left], .imgs-item:last-child .imgs-tools [data-imgs-right] { visibility: hidden; }

/* Rich text (Quill, restyled for the dark theme) */
.rt-source { font-family: var(--f-mono); font-size: 13px; }
.rt .ql-toolbar.ql-snow { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px 8px 0 0; padding: 6px; }
.rt .ql-container.ql-snow { background: var(--bg); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; font-family: var(--f-body); font-size: 16px; color: var(--ink); }
.rt .ql-editor { min-height: 180px; max-height: 70vh; overflow-y: auto; line-height: 1.6; }
.rt .ql-editor.ql-blank::before { color: var(--dim); font-style: normal; }
.rt .ql-editor img { max-width: 100%; height: auto; border-radius: 6px; }
.rt .ql-editor iframe { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 6px; }
.rt .ql-editor a { color: var(--teal); }
.rt .ql-editor blockquote { border-left: 4px solid var(--red); padding-left: 14px; color: var(--dim); }
.rt .ql-editor pre.ql-syntax { background: var(--panel2); color: var(--ink); border-radius: 6px; }
.rt .ql-snow .ql-stroke { stroke: var(--ink); }
.rt .ql-snow .ql-fill, .rt .ql-snow .ql-stroke.ql-fill { fill: var(--ink); }
.rt .ql-snow .ql-picker { color: var(--ink); }
.rt .ql-snow .ql-picker-options { background: var(--panel2); border-color: var(--line) !important; }
.rt .ql-snow.ql-toolbar button:hover .ql-stroke, .rt .ql-snow.ql-toolbar button.ql-active .ql-stroke, .rt .ql-snow .ql-picker-label:hover .ql-stroke { stroke: var(--teal); }
.rt .ql-snow.ql-toolbar button:hover .ql-fill, .rt .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--teal); }
.rt .ql-snow.ql-toolbar button:hover, .rt .ql-snow.ql-toolbar button.ql-active, .rt .ql-snow .ql-picker-label:hover, .rt .ql-snow .ql-picker-label.ql-active, .rt .ql-snow .ql-picker-item:hover, .rt .ql-snow .ql-picker-item.ql-selected { color: var(--teal); }
.rt .ql-snow .ql-tooltip { background: var(--panel2); color: var(--ink); border-color: var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 5; }
.rt .ql-snow .ql-tooltip input[type=text] { background: var(--bg); color: var(--ink); border-color: var(--line); min-height: 32px; }
.rt .ql-snow .ql-tooltip a { color: var(--teal); }
.rt .ql-toolbar button { width: 32px; height: 30px; }

/* Save bar */
.savebar { position: sticky; bottom: 0; z-index: 15; margin: 18px -20px 0; padding: 12px 20px; background: rgba(18,19,21,.94); backdrop-filter: blur(6px); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.savebar-note { color: var(--dim); font-size: 14px; }
.savebar.is-dirty .savebar-note { color: var(--blush); }
.danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Pictures page */
.upload-card { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.media-filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.media-filters .field { margin: 0; min-width: 200px; flex: 1; }
.media-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.media-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { display: block; aspect-ratio: 4 / 3; background: repeating-conic-gradient(#202226 0 25%, #1a1b1e 0 50%) 50% / 16px 16px; }
.media-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.media-info { padding: 10px 12px 12px; }
.media-info p { margin: 0 0 4px; }
.media-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 18px; }

/* Modal (confirm, picture picker, embed) */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal.modal-wide { max-width: 920px; }
.modal h2 { margin-bottom: 10px; }
.modal p { margin: 0 0 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.picker-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.picker-tools input { flex: 1; min-width: 180px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 55vh; overflow: auto; padding: 2px; }
.picker-item { position: relative; border: 2px solid transparent; border-radius: 8px; padding: 0; background: var(--panel2); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.picker-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-item span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 3px 4px; background: rgba(0,0,0,.7); color: var(--ink); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-mono); }
.picker-item:hover { border-color: var(--line); }
.picker-item.is-selected { border-color: var(--teal); }
.picker-item.is-selected::after { content: "\2713"; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #06110f; font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.logout-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: var(--err-bg); border: 1px solid var(--red); border-radius: 12px; padding: 12px 16px; max-width: 760px; margin: 0 auto; }
.logout-banner p { margin: 0; }

/* Phone */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .menu-btn { display: inline-flex; }
  .adminnav { display: none; width: 100%; margin: 0; }
  .adminnav.is-open { display: block; }
  .adminnav ul { flex-direction: column; align-items: stretch; padding-bottom: 6px; }
  .adminnav a, .adminnav .linkish { display: block; width: 100%; text-align: left; padding: 12px; }
  .main { padding: 16px 16px 120px; }
  .card, .form-card { padding: 16px; }
  .group { padding: 12px; }
  .li-body { padding: 4px 10px 12px; }
  .row { flex-wrap: wrap; }
  .row-thumb { flex-basis: 52px; width: 52px; height: 52px; }
  .row-main { flex-basis: calc(100% - 70px); }
  .row-actions { width: 100%; justify-content: flex-start; }
  .savebar { margin: 18px -16px 0; padding: 10px 16px; }
  .savebar-note { width: 100%; order: 3; font-size: 13px; }
  .imgpick-preview { width: 100%; height: 160px; }
  .page-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Drag to reorder */
.drag-handle { flex: 0 0 auto; cursor: grab; color: var(--dim); font-size: 18px; letter-spacing: -6px; padding: 8px 10px 8px 2px; user-select: none; }
.drag-handle:hover { color: var(--teal); }
.rows.is-filtering .drag-handle { visibility: hidden; }
.row.is-dragging { opacity: 0.5; border-color: var(--teal); }
.reorder-tip { margin: 0 0 8px; }

/* History */
.history-live { border-color: var(--teal-dim); }
.changes { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink); }
.changes li { margin: 2px 0; overflow-wrap: anywhere; }

/* Misc */
.picker-count { margin: 0 0 8px; }
.picker-more { margin: 10px 0 0; text-align: center; }
.slug-note { color: var(--blush); }
.put-first { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Touch screens: every control at least 44 by 44 pixels */
@media (pointer: coarse) {
  .menu-btn, .btn, .btn-small, .btn-icon { min-height: 44px; min-width: 44px; }
  .img-tools .btn, .imgs-tools button, .li-tools button { min-height: 44px; min-width: 44px; }
  .imgs-tools { padding: 6px; }
  .rt .ql-toolbar button { width: 44px; height: 44px; padding: 8px; }
  .rt .ql-snow .ql-picker { height: 44px; }
  .rt .ql-snow .ql-picker-label { display: flex; align-items: center; }
  .more-menu a, .more-menu .linkish { min-height: 44px; display: flex; align-items: center; }
  .adminnav a, .adminnav .linkish { min-height: 44px; }
  .linkish { min-height: 44px; }
  .drag-handle { display: none; }
}

/* Video field and videos in the library */
.vidpick .imgpick-preview video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vidpick .vidpick-value { margin: 4px 0 8px; }
.media-thumb.is-video { position: relative; }
.media-thumb video, .picker-item video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.video-badge { position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(18,19,21,.85); color: var(--teal); display: grid; place-items: center; font-size: 12px; }

/* Logins page: "Set a new password" opens a small form under the row's buttons. */
.inline-details summary { list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details[open] { flex-basis: 100%; }
.inline-details > form { margin-top: 8px; max-width: 420px; margin-left: auto; text-align: left; }
.row-actions:has(.inline-details[open]) { flex-basis: 100%; }
.rows .row { flex-wrap: wrap; }
