:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #1b1b1b;
  color: #f2f2f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --surface-0: #1b1b1b;
  --surface-1: #242424;
  --surface-2: #323232;
  --surface-3: #444444;
  --line: #4a4a4a;
  --muted: #a8a8a8;
  --bright: #f3f3f3;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--surface-0); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #d7d7d7; outline-offset: 3px; }
[hidden] { display: none !important; }

.ql-font-cousine { font-family: "Cousine", "Courier New", monospace; }
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="cousine"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="cousine"]::before {
  content: "Cousine";
  font-family: "Cousine", "Courier New", monospace;
}

.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 176px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 24px 17px 18px; border-right: 1px solid var(--line); background: #202020; }
.admin-wordmark { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.admin-wordmark__mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #a0a0a0; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.08em; }
.admin-wordmark strong, .admin-wordmark small { display: block; }
.admin-wordmark strong { font-size: 0.91rem; letter-spacing: 0.12em; }
.admin-wordmark small { margin-top: 4px; color: var(--muted); font-size: 0.58rem; letter-spacing: 0.12em; }
.admin-nav { display: grid; gap: 5px; margin-top: 55px; }
.admin-nav button, .sidebar-public-link { display: flex; width: 100%; min-height: 43px; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid transparent; background: transparent; color: #c7c7c7; text-align: left; cursor: pointer; text-decoration: none; transition: color 160ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out; }
.admin-nav button:hover, .sidebar-public-link:hover { border-color: #595959; color: white; }
.admin-nav button.is-active { border-color: #7c7c7c; background: #303030; color: white; }
.sidebar-public-link { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.admin-main { min-width: 0; padding: 38px clamp(16px, 2.4vw, 36px) 64px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-eyebrow { margin: 0 0 8px; color: #b1b1b1; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em; }
.admin-header h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -0.055em; line-height: 1.05; }
.muted { color: var(--muted); line-height: 1.55; }
.global-notice { margin: 0 0 20px; padding: 12px 14px; border: 1px solid #666; background: #282828; color: #eee; line-height: 1.45; }
.global-notice[data-kind="error"] { border-color: #999; background: #363636; }
.global-notice[data-kind="success"] { border-color: #7d7d7d; }

.login-view { display: grid; min-height: min(650px, calc(100vh - 160px)); place-items: center; }
.login-card { width: min(100%, 430px); padding: clamp(22px, 4vw, 36px); border: 1px solid var(--line); background: var(--surface-1); }
.login-card h2 { margin: 0; font-size: 1.8rem; letter-spacing: -0.05em; }
.login-card .muted { margin: 12px 0 23px; font-size: 0.94rem; }
.login-footnote { margin: 20px 0 0; color: #969696; font-size: 0.78rem; line-height: 1.5; }
.form-stack { display: grid; gap: 9px; }
.form-stack label, .field label { color: #d0d0d0; font-size: 0.82rem; font-weight: 600; }
input, textarea, select { width: 100%; min-height: 43px; border: 1px solid #5a5a5a; border-radius: 0; padding: 10px 12px; background: #171717; color: #f3f3f3; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #858585; }
.form-stack .button { margin-top: 10px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid #777; background: #2b2b2b; color: #f2f2f2; cursor: pointer; text-decoration: none; transition: transform 140ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out; }
.button:hover { border-color: #bbb; background: #3a3a3a; }
.button:active { transform: scale(0.98); }
.button--primary { border-color: #ddd; background: #e6e6e6; color: #171717; font-weight: 700; }
.button--primary:hover { background: #fff; }
.button--quiet { min-height: 36px; background: transparent; }
.button--danger { border-color: #777; background: #333; }
.button--danger:hover { border-color: #bbb; background: #454545; }
.button--small { min-height: 34px; padding: 0 10px; font-size: 0.82rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }

.view-container { min-width: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.04em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 30px; }
.stat-card { min-height: 112px; padding: 17px; border: 1px solid var(--line); background: var(--surface-1); }
.stat-card strong { display: block; margin-top: 14px; font-size: 2rem; line-height: 1; letter-spacing: -0.06em; }
.stat-card span { color: var(--muted); font-size: 0.77rem; }
.panel-card { margin: 18px 0; padding: 18px; border: 1px solid var(--line); background: var(--surface-1); }
.panel-card h3 { margin: 0 0 7px; font-size: 1rem; }
.panel-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.toolbar > * { flex: 1 1 180px; }
.case-list { display: grid; gap: 8px; }
.case-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); background: #252525; }
.case-row__title { margin: 0 0 5px; font-size: 0.96rem; font-weight: 700; }
.case-row__meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.76rem; }
.status-chip { display: inline-flex; min-height: 23px; align-items: center; padding: 2px 8px; border: 1px solid #777; color: #e4e4e4; font-size: 0.69rem; }
.status-chip[data-status="draft"] { background: #333; }
.status-chip[data-status="published"] { background: #494949; }
.status-chip[data-status="hidden"] { background: #252525; color: #aaa; }
.case-row__actions { display: flex; gap: 6px; }
.empty-state { padding: 28px 18px; border: 1px dashed #666; color: var(--muted); text-align: center; line-height: 1.5; }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr); gap: 20px; align-items: start; }
.editor-card { min-width: 0; padding: 18px; border: 1px solid var(--line); background: var(--surface-1); }
.editor-card h3 { margin: 0 0 16px; font-size: 1rem; }
.editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; min-width: 0; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.case-summary-field[data-card-size="small"],
.case-summary-field[data-card-size="tall"] { max-width: min(100%, 240px); }
.case-summary-field[data-card-size="lead"],
.case-summary-field[data-card-size="wide"] { max-width: min(100%, 496px); }
.field small { color: #969696; font-size: 0.74rem; line-height: 1.4; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 43px; color: #ddd; }
.check-row input { width: 18px; min-height: 18px; accent-color: #dedede; }
.block-list { display: grid; gap: 12px; margin: 12px 0; }
.content-block { padding: 13px; border: 1px solid #555; background: #202020; }
.content-block__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.content-block__header strong { font-size: 0.83rem; }
.content-block .field + .field { margin-top: 10px; }
.preview-frame { display: block; width: 100%; height: 600px; border: 1px solid var(--line); background: #1b1b1b; }
.preview-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; margin: 12px 0; }
.mosaic-order { display: grid; gap: 7px; }
.mosaic-order-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); background: #222; }
.mosaic-order-row__number { color: #aaa; font-size: 0.78rem; }
.mosaic-order-row__actions { display: flex; gap: 5px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 154px minmax(0, 1fr); }
  .admin-sidebar { padding-inline: 12px; }
  .admin-main { padding: 28px 18px 48px; }
  .editor-grid { grid-template-columns: 1fr; }
  .preview-frame { height: 520px; }
}

@media (max-width: 640px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 14px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-wordmark__mark { width: 32px; height: 32px; }
  .admin-nav { display: flex; overflow-x: auto; gap: 5px; margin-top: 15px; padding-bottom: 2px; }
  .admin-nav button { width: auto; min-width: max-content; min-height: 38px; padding-inline: 10px; }
  .sidebar-public-link { display: none; }
  .admin-main { padding: 22px 16px 40px; }
  .admin-header { align-items: center; margin-bottom: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats-grid .stat-card:last-child { grid-column: 1 / -1; }
  .stat-card { min-height: 90px; padding: 12px; }
  .stat-card strong { font-size: 1.7rem; }
  .case-row { grid-template-columns: minmax(0, 1fr) auto; }
  .case-row__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .section-heading { display: block; }
  .section-heading > .button { margin-top: 12px; }
  .editor-card { padding: 14px; }
  .editor-fields { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .preview-frame { height: 520px; }
  .mosaic-order-row { grid-template-columns: 32px minmax(0,1fr) auto; }
}

.case-editor-layout { display: grid; gap: 18px; }
.case-editor-structure .editor-fields { align-items: start; }
.case-editor-composition { overflow: hidden; }
.case-editor-composition > .muted { margin: -7px 0 18px; font-size: 0.84rem; }
.case-editor-actions { display: grid; gap: 12px; }
.case-editor-actions h3, .case-editor-actions p { margin: 0; }
.case-editor-actions .login-footnote { margin-top: 3px; }
.profile-content-editor { grid-column: 1 / -1; min-width: 0; margin-top: 5px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-content-editor h3 { margin: 0; font-size: 1.05rem; }
.profile-content-editor__description { margin: 6px 0 13px; font-size: 0.86rem; }
.profile-content-editor__mount { width: 100%; min-width: 0; }
.profile-content-editor__mount > .case-composer { width: 100%; min-width: 0; }
.case-preview-toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.case-preview-toolbar button[aria-pressed="true"] { border-color: #e7e7e7; background: #dedede; color: #171717; }
.case-preview-frame { display: block; min-height: 440px; border: 1px solid var(--line); background: #1b1b1b; }
.tone-picker-field > span:first-child { margin-bottom: 1px; }
.tone-picker-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px auto; align-items: center; gap: 9px; }
.tone-picker-row select { min-width: 0; }
.tone-picker__swatch { display: block; width: 36px; height: 36px; border: 1px solid #d0d0d0; }
.tone-picker__hex { color: #f0f0f0; font-size: 0.78rem; font-weight: 700; }

.case-composer { display: grid; gap: 12px; container-type: inline-size; }
.case-composer__toolbar { position: sticky; z-index: 5; top: 0; display: flex; flex-wrap: wrap; gap: 6px; padding: 9px; border: 1px solid var(--line); background: #242424; }
.case-composer__toolbar .button { min-height: 34px; padding-inline: 10px; }
.case-composer__toolbar .button:disabled { opacity: 0.42; cursor: not-allowed; }
.case-composer__toolbar-separator { margin-left: 5px; }
.case-composer__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 0.32fr); align-items: start; gap: 12px; }
.case-composer__workspace { min-width: 0; padding: 10px; border: 1px solid var(--line); background: #202020; }
.case-composer__canvas-scroll { max-height: 78vh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #555; background: #3b3b3b; }
.case-composer__canvas-frame { position: relative; margin-inline: auto; }
.case-composer__stage { position: relative; min-height: 900px; margin: 0; overflow: hidden; transform-origin: top left; touch-action: none; }
.case-composer__stage.is-empty { background-clip: padding-box; }
.case-composer__empty-message { position: absolute; top: 50%; left: 50%; width: min(82%, 480px); margin: 0; color: #686868; font-size: 0.9rem; text-align: center; transform: translate(-50%, -50%); pointer-events: none; }
.case-composer__element { position: absolute; display: flex; min-width: 0; min-height: 0; align-items: stretch; border: 1px dashed currentColor; background: transparent; color: inherit; cursor: grab; user-select: none; }
.case-composer__element:active { cursor: grabbing; }
.case-composer__element.is-selected { border: 2px solid #111; box-shadow: 0 0 0 1px #f7f7f7; }
.case-composer__element:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.case-composer__text-preview { width: 100%; height: 100%; overflow: hidden; padding: 8px; background: transparent; color: inherit; font-size: clamp(0.62rem, 1vw, 1rem); line-height: 1.4; overflow-wrap: anywhere; }
.case-composer__text-preview p { margin: 0 0 0.35em; }
.case-composer__inline-quill.ql-container.ql-snow { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: transparent; color: inherit; }
.case-composer__inline-quill .ql-editor { width: 100%; height: 100%; min-height: 100%; overflow: auto; padding: 8px; background: transparent; color: inherit; font-size: clamp(0.62rem, 1vw, 1rem); line-height: 1.4; overflow-wrap: anywhere; cursor: text; user-select: text; touch-action: auto; }
.case-composer__inline-quill .ql-editor p { margin: 0 0 0.35em; }
.case-composer__element > img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.case-composer__media-empty, .case-composer__link-preview { display: grid; width: 100%; height: 100%; place-items: center; padding: 10px; background: #bdbdbd; color: #242424; font-size: 0.78rem; line-height: 1.35; text-align: center; pointer-events: none; }
.case-composer__link-preview { background: #282828; color: #f2f2f2; }
.case-composer__caption { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; padding: 4px 7px; background: rgb(20 20 20 / 78%); color: #fff; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.case-composer__move-handle { position: absolute; z-index: 2; top: -7px; left: -7px; display: grid; width: 20px; height: 20px; place-items: center; padding: 0; border: 1px solid #111; background: #f4f4f4; color: #111; font-size: 0.75rem; line-height: 1; cursor: move; touch-action: none; }
.case-composer__resize-handle { position: absolute; right: -6px; bottom: -6px; width: 15px; height: 15px; border: 2px solid #111; background: #f4f4f4; cursor: nwse-resize; touch-action: none; }
.case-composer__inspector { display: grid; min-width: 0; gap: 10px; padding: 12px; border: 1px solid var(--line); background: #202020; }
.case-composer__inspector h4 { margin: 0; font-size: 0.84rem; }
.case-composer__selected-label { margin: 0; color: #ddd; font-size: 0.76rem; font-weight: 700; }
.case-composer__geometry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 8px; border: 1px solid #505050; }
.case-composer__geometry legend { padding: 0 4px; color: #ccc; font-size: 0.72rem; }
.case-composer__number-field { display: grid; gap: 4px; color: #c2c2c2; font-size: 0.7rem; }
.case-composer__number-field input { min-height: 34px; padding: 5px 7px; }
.case-composer__field { margin: 0; }
.case-composer__rich-toolbar.ql-toolbar.ql-snow { display: flex; flex-wrap: wrap; gap: 3px; padding: 7px; border-color: #595959; background: #e8e8e8; }
.case-composer__rich-toolbar.ql-toolbar.ql-snow button { width: 28px; height: 28px; padding: 3px; }
.case-composer__rich-toolbar.ql-toolbar.ql-snow select { width: auto; min-width: 76px; height: 28px; margin: 0; padding: 2px 19px 2px 5px; border: 1px solid #999; background-color: #f7f7f7; color: #191919; font-size: 0.7rem; }
@media (max-width: 960px) {
  .case-composer__layout { grid-template-columns: minmax(0, 1fr); }
  .case-composer__inspector { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .case-composer__inspector > h4, .case-composer__geometry, .case-composer__selected-label, .case-composer__rich-toolbar { grid-column: 1 / -1; }
}

@container (max-width: 1260px) {
  .case-composer__layout { grid-template-columns: minmax(0, 1fr); }
  .case-composer__inspector { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .case-composer__inspector > h4, .case-composer__geometry, .case-composer__selected-label, .case-composer__rich-toolbar { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .case-composer__toolbar { position: static; }
  .case-composer__layout { grid-template-columns: minmax(0, 1fr); }
  .case-composer__inspector { grid-template-columns: minmax(0, 1fr); }
  .case-composer__inspector > * { grid-column: auto; }
  .case-composer__inspector > h4, .case-composer__geometry, .case-composer__selected-label, .case-composer__rich-toolbar { grid-column: 1 / -1; }
  .case-composer__canvas-scroll { max-height: 62vh; }
  .case-composer__stage { min-width: 0; }
  .case-composer__workspace { overflow: hidden; }
  .case-composer__rich-toolbar.ql-toolbar.ql-snow { gap: 2px; }
  .case-composer__rich-toolbar.ql-toolbar.ql-snow select { min-width: 68px; }
}

.slide-editor { display: grid; gap: 14px; }
.slide-editor__toolbar { display: flex; flex-wrap: wrap; gap: 7px; }
.slide-editor__layout { display: grid; grid-template-columns: minmax(175px, 0.72fr) minmax(0, 1.8fr) minmax(245px, 0.9fr); align-items: start; gap: 12px; }
.slide-editor__navigation, .slide-editor__inspector { display: grid; min-width: 0; gap: 12px; }
.slide-editor__panel, .slide-editor__inspector { min-width: 0; padding: 11px; border: 1px solid var(--line); background: #202020; }
.slide-editor__panel h4, .slide-editor__inspector h4 { margin: 0 0 9px; font-size: 0.8rem; letter-spacing: 0.04em; }
.slide-editor__slide-list, .slide-editor__element-list { display: grid; gap: 6px; }
.slide-editor__slide-row { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 5px; align-items: center; padding: 5px; border: 1px solid #424242; background: #191919; }
.slide-editor__slide-row.is-active, .slide-editor__element-row.is-active { border-color: #c8c8c8; }
.slide-editor__slide-row input { min-width: 0; min-height: 34px; padding: 6px 8px; font-size: 0.78rem; }
.slide-editor__slide-select { min-height: 34px; padding: 0 5px; border: 1px solid #5d5d5d; background: #303030; color: #eee; cursor: pointer; }
.slide-editor__compact-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 4px; }
.slide-editor__compact-actions .button { min-width: 31px; min-height: 28px; padding-inline: 6px; }
.slide-editor__element-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 5px; border: 1px solid #424242; background: #191919; }
.slide-editor__element-select { min-width: 0; overflow: hidden; border: 0; background: transparent; color: #ddd; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.slide-editor__hint { margin: 0 0 8px; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.slide-editor__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #767676; background: #d3d3d3; color: #202020; touch-action: none; }
.slide-editor__element { position: absolute; display: flex; min-width: 0; min-height: 0; align-items: stretch; border: 1px dashed #555; background: rgb(246 246 246 / 62%); color: #202020; cursor: grab; user-select: none; }
.slide-editor__element:active { cursor: grabbing; }
.slide-editor__element.is-selected { border: 2px solid #111; box-shadow: 0 0 0 1px #f7f7f7; }
.slide-editor__element:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.slide-editor__text-preview { width: 100%; height: 100%; overflow: hidden; padding: 8px; font-size: clamp(0.6rem, 1vw, 0.95rem); line-height: 1.4; overflow-wrap: anywhere; }
.slide-editor__text-preview p { margin: 0 0 0.35em; }
.slide-editor__element > img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.slide-editor__media-empty, .slide-editor__link-preview { display: grid; width: 100%; height: 100%; place-items: center; padding: 10px; background: #bdbdbd; color: #242424; font-size: 0.75rem; line-height: 1.35; text-align: center; pointer-events: none; }
.slide-editor__link-preview { background: #282828; color: #f2f2f2; }
.slide-editor__stage-caption { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; padding: 4px 7px; background: rgb(20 20 20 / 78%); color: #fff; font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }
.slide-editor__resize-handle { position: absolute; right: -6px; bottom: -6px; width: 15px; height: 15px; border: 2px solid #111; background: #f4f4f4; cursor: nwse-resize; touch-action: none; }
.slide-editor__geometry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 8px; border: 1px solid #505050; }
.slide-editor__geometry legend { padding: 0 4px; color: #ccc; font-size: 0.72rem; }
.slide-editor__number-field { display: grid; gap: 4px; color: #c2c2c2; font-size: 0.7rem; }
.slide-editor__number-field input { min-height: 34px; padding: 5px 7px; }
.slide-editor__inspector-label { margin: 2px 0 -4px; color: #ddd; font-size: 0.75rem; font-weight: 700; }
.slide-editor__inspector-field { margin: 0; }
.slide-editor__inspector-field > span { font-size: 0.75rem; }
.slide-editor__inspector-field input, .slide-editor__inspector-field textarea, .slide-editor__inspector-field select { min-height: 36px; padding: 7px 9px; font-size: 0.78rem; }
.slide-editor__quill-toolbar.ql-toolbar.ql-snow { display: flex; flex-wrap: wrap; gap: 3px; padding: 7px; border-color: #595959; background: #e8e8e8; }
.slide-editor__quill-toolbar.ql-toolbar.ql-snow button { width: 28px; height: 28px; padding: 3px; }
.slide-editor__quill-toolbar.ql-toolbar.ql-snow select { width: auto; min-width: 92px; height: 28px; margin: 0; padding: 2px 19px 2px 5px; border: 1px solid #999; background-color: #f7f7f7; color: #191919; font-size: 0.7rem; }
.slide-editor__quill-editor.ql-container.ql-snow { min-height: 150px; border-color: #595959; background: #161616; color: #f3f3f3; }
.slide-editor__quill-editor .ql-editor { min-height: 150px; color: #f3f3f3; font-size: 0.85rem; line-height: 1.55; }
.slide-editor__quill-editor .ql-editor.ql-blank::before { color: #909090; font-style: normal; }
.slide-editor__inspector > .button { justify-self: start; }

@media (max-width: 1120px) {
  .slide-editor__layout { grid-template-columns: minmax(0, 1fr); }
  .slide-editor__navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-editor__workspace, .slide-editor__inspector { grid-column: 1 / -1; }
  .slide-editor__inspector { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .slide-editor__inspector > h4, .slide-editor__geometry, .slide-editor__inspector-label, .slide-editor__quill-toolbar, .slide-editor__quill-editor, .slide-editor__inspector > .button { grid-column: 1 / -1; }
  .slide-editor__quill-editor { min-height: 190px; }
}

@media (max-width: 640px) {
  .case-preview-frame { min-height: 520px; }
  .slide-editor__navigation, .slide-editor__inspector { grid-template-columns: minmax(0, 1fr); }
  .slide-editor__inspector > * { grid-column: auto; }
  .slide-editor__inspector > h4, .slide-editor__geometry, .slide-editor__inspector-label, .slide-editor__quill-toolbar, .slide-editor__quill-editor, .slide-editor__inspector > .button { grid-column: 1 / -1; }
  .slide-editor__stage { min-width: 0; }
  .slide-editor__quill-toolbar.ql-toolbar.ql-snow { gap: 2px; }
  .slide-editor__quill-toolbar.ql-toolbar.ql-snow select { min-width: 75px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
