/* App host styles (login, account, CMS). Tokens follow the Onlain brand, see docs/PLAN.md. */
:root {
    --ink: #15171A;
    --paper: #F4F2EC;
    --white: #FFFFFF;
    --line: #DEDAD0;
    --field-border: #B9B5AA;
    --muted: #4A4D53;
    --green: #22C55E;
    --green-text: #0B7A3D;
    --danger: #B42318;
    --radius-card: 20px;
    --radius-field: 12px;
    --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.55 var(--font);
}

a { color: var(--ink); }
a:hover { color: var(--green-text); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.app-header {
    border-bottom: 1px solid var(--line);
}

/* One full-width shell for every app page, as in the page editor: the header and the CMS
   navigation band span the window, the page content is a centred column. */
.app-header__inner {
    padding: 10px var(--gutter);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.04em;
    line-height: 1;
    text-decoration: none;
    color: var(--ink);
}

.logo::after {
    content: '';
    display: inline-block;
    width: 0.22em;
    height: 0.22em;
    margin-left: 0.05em;
    border-radius: 50%;
    background: var(--green);
    vertical-align: 0.46em;
}

.app-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 15px; }

.app-main {
    max-width: calc(1080px + 2 * var(--gutter));
    margin: 0 auto;
    padding: 40px var(--gutter) 64px;
}

/* Login and account screens: one centred column */
.app-main--narrow { max-width: calc(480px + 2 * var(--gutter)); }

h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.02em; }

.lead { margin: 0 0 28px; color: var(--muted); }

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 28px;
}

.stack { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }

input[type=email], input[type=password], input[type=text], input[type=tel], input[type=url], input[type=number], input[type=search], input[type=date], select, textarea {
    font: inherit;
    font-size: 17px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--field-border);
    border-radius: var(--radius-field);
    background: var(--white);
    color: var(--ink);
    width: 100%;
}

.help { font-size: 14px; color: var(--muted); }
.field .help, .field .field-error { margin: 0; }
.field-error, .form-errors { color: var(--danger); font-size: 15px; margin: 0; padding: 0; list-style: none; }

.button {
    font: inherit;
    font-weight: 600;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.button:hover { color: var(--paper); background: #000; }

.button--secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.button--secondary:hover { background: var(--white); color: var(--ink); }

.link-button { font: inherit; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; }

.alert { border-radius: var(--radius-field); padding: 12px 16px; margin: 0 0 20px; border: 1px solid var(--line); background: var(--white); }
.alert--success { border-color: var(--green-text); }
.alert--error { border-color: var(--danger); color: var(--danger); }

.site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.site-list a { display: block; text-decoration: none; }
.site-list a:hover .card { border-color: var(--ink); }
.site-list .meta { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.site-list h2 { margin: 0; }
.site-list__status { margin: 10px 0 0; }

/* Login: password or e-mailed code */
.login__forgot { align-self: flex-start; font-size: 15px; }
.login__or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--muted); font-size: 14px; }
.login__or::before, .login__or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.login__code { display: flex; flex-direction: column; gap: 8px; }
.login__code .help { margin: 0; text-align: center; }
.login__after { margin-top: 20px; font-size: 15px; }
.code-input { font: 600 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.3em; text-align: center; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }

/* CMS: the site navigation is a full-width band under the header, the content sits below it */
.app-main.app-main--cms { max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cms-content { width: 100%; max-width: calc(1080px + 2 * var(--gutter)); margin: 0 auto; padding: 32px var(--gutter) 64px; }
/* Form buttons sit left in the CMS; full-width buttons are for the narrow login screens */
.cms-content .card.stack > .button { align-self: flex-start; }
input[type=number] { max-width: 10em; }
.cms-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px var(--gutter); border-bottom: 1px solid var(--line); background: var(--white); font-size: 15px; }
.cms-nav a { text-decoration: none; }
.cms-nav a[aria-current] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.cms-nav__site { margin-right: auto; font-size: 17px; }

/* Site switcher (more than one site) */
.site-switcher { position: relative; margin-right: auto; }
.site-switcher__current { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; margin-left: -10px; border-radius: 8px; font-size: 17px; cursor: pointer; list-style: none; }
.site-switcher__current::-webkit-details-marker { display: none; }
.site-switcher__current:hover, .site-switcher[open] .site-switcher__current { background: var(--paper); }
.site-switcher[open] .site-switcher__current svg { transform: rotate(180deg); }
.site-switcher__menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: -10px; width: min(340px, calc(100vw - 2 * var(--gutter))); padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgb(21 23 26 / 0.14); }
.site-switcher__filter { min-height: 40px; padding: 8px 12px; font-size: 15px; margin-bottom: 6px; }
.site-switcher__list { list-style: none; margin: 0; padding: 0; max-height: min(60vh, 420px); overflow-y: auto; }
.site-switcher__list a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.site-switcher__list a:hover, .site-switcher__list a:focus-visible { background: var(--paper); }
.site-switcher__list a[aria-current] { box-shadow: inset 3px 0 0 var(--green); background: #F2FBF5; font-weight: inherit; text-decoration: none; }
.site-switcher__name { font-weight: 600; }
.site-switcher__meta { font-size: 13px; color: var(--muted); }
.site-switcher__empty { margin: 8px 10px; font-size: 14px; color: var(--muted); }
.site-switcher__all { display: block; margin-top: 6px; padding: 10px 10px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.breadcrumb { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.meta { color: var(--muted); font-size: 15px; margin: 0; }
h2 { margin-top: 36px; }
.card + .card, .card + form, form + .card, .row-list + p, .card + p { margin-top: 16px; }

.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }
.page-head__actions, .action-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }

.row-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--white); }
.row-list__item { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 14px 20px; }
.row-list__item + .row-list__item { border-top: 1px solid var(--line); }
.row-list__item--hidden .row-list__title { color: var(--muted); }
.row-list__main { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; min-width: 0; }
.row-list__title { font-weight: 600; }
.row-list__actions { display: flex; gap: 14px; align-items: center; }
.inline-form { display: inline; margin: 0; }
.danger-zone { margin: 24px 0 0; }
.account__text { margin: 0; }
.token-secret { font-family: ui-monospace, monospace; }
.token-command { margin: 0; padding: 12px 14px; overflow-x: auto; background: var(--paper); border-radius: var(--radius-field); font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.app-nav a[aria-current] { font-weight: 700; }
.link-button--danger { color: var(--danger); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--ink); }
.badge--muted { border-color: var(--line); color: var(--muted); }
.badge--success { border-color: var(--green-text); color: var(--green-text); }
.badge--warning { border-color: #8A5A00; color: #8A5A00; }

.inline-create { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 24px; }
.inline-create .field { flex: 1 1 260px; }

.template-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.template-list .card { display: flex; flex-direction: column; gap: 12px; }

fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-weight: 700; font-size: 17px; margin-bottom: 4px; padding: 0; }
.form-rows { display: flex; flex-direction: column; gap: 18px; }
.field--group > fieldset { gap: 12px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-field); background: #FBFAF7; }
.field--group > fieldset > legend { float: left; width: 100%; margin: 0 0 2px; font-size: 15px; }
.field--group > fieldset > legend + * { clear: both; }
.field--checkbox { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.field--checkbox input { width: 22px; height: 22px; margin: 0; }
.field--checkbox .help, .field--checkbox .field-error { flex-basis: 100%; }
.field--invalid input, .field--invalid textarea, .field--invalid select { border-color: var(--danger); }
input[type=time] { width: auto; min-height: 44px; padding: 8px 10px; }
textarea { min-height: 96px; resize: vertical; }

.collection-item { position: relative; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-field); padding: 6px 14px 16px; background: var(--white); }
.collection-item > .form-rows { gap: 14px; }
.collection-item__tools { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin: 0 -6px -6px; font-size: 14px; }
.collection-item__title { margin-right: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.collection-add { align-self: flex-start; }
.collection-item__handle, .block__handle { display: inline-grid; place-items: center; width: 32px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: grab; }
.collection-item__handle:hover, .block__handle:hover { background: var(--paper); color: var(--ink); }
.collection-item__handle[hidden], .block__handle[hidden] { display: none; }
.is-dragging { opacity: 0.4; }
.is-sortable .row-list__move { display: none; }
.row-list.is-sortable .row-list__item { justify-content: flex-start; flex-wrap: nowrap; padding-left: 8px; }
.row-list.is-sortable .row-list__main { flex: 1; }
.row-list.is-sortable .row-list__actions { margin-left: auto; }
.advanced { border-top: 1px solid var(--line); padding-top: 12px; }
.advanced summary { cursor: pointer; font-weight: 600; }
.advanced[open] summary { margin-bottom: 12px; }

trix-editor.richtext { min-height: 140px; background: var(--white); border: 1.5px solid var(--field-border); border-radius: var(--radius-field); padding: 10px 14px; }
trix-toolbar .trix-button-group--file-tools { display: none; }

.media-preview { max-width: 240px; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; }
.media-preview { max-width: 100%; max-height: 360px; }

.media-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.media-grid__item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 8px; height: 100%; }
.media-grid__item:hover { border-color: var(--ink); }
.media-grid__item img, .media-grid__file { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--paper); }
.media-grid__file { display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.media-grid__name { font-size: 14px; overflow-wrap: anywhere; }

.opening-hours { border-collapse: collapse; align-self: flex-start; }
.opening-hours th { text-align: left; padding: 6px 16px 6px 0; font-weight: 600; }
.opening-hours td { padding: 6px 12px 6px 0; white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.submission { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 24px; margin: 16px 0; }
.submission dt { font-weight: 600; }
.submission dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .submission { grid-template-columns: 1fr; } .submission dd { margin-bottom: 8px; } }

.impersonation { padding: 10px 16px; background: #8A5A00; color: #FFF; text-align: center; font-size: 15px; }
.impersonation a { color: #FFF; font-weight: 600; margin-left: 12px; }

/* Page editor: a full-height workspace. Toolbar on top, the block list or block form on the
   left and the live preview on the right; both columns scroll on their own. */
body:has(.app-main--editor) { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-main.app-main--editor { flex: 1; min-height: 0; }
.cms-content.cms-content--editor { max-width: none; margin: 0; flex: 1; min-height: 0; padding: 0; display: flex; flex-direction: column; }
.cms-content--editor > .alert { margin: 12px var(--gutter) 0; }

.editor { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.editor__toolbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); background: var(--white); }
.editor__heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 0 1 auto; }
.editor__crumb { font-size: 15px; color: var(--muted); white-space: nowrap; }
.editor__crumb-sep { color: var(--muted); }
.editor__title { margin: 0; font-size: 20px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.editor__state { display: flex; align-items: center; gap: 10px; }
/* Fixed width so "Bezig met opslaan…" / "Opgeslagen" never pushes the toolbar around */
.editor__save-state { display: inline-block; min-width: 9.5em; font-size: 14px; color: var(--muted); }
.editor__save-state[data-state=error], .editor__save-state[data-state=invalid] { color: var(--danger); }
.editor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-left: auto; }
.editor__link { font-size: 15px; white-space: nowrap; }
.editor__publish { margin: 0; }
.editor__publish .button:disabled { opacity: 0.4; cursor: default; }

.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.segmented button { font: inherit; font-size: 14px; padding: 5px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed=true] { background: var(--white); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(21 23 26 / 0.12); }

.editor__side { min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--white); border-right: 1px solid var(--line); scrollbar-gutter: stable; }
.editor__panel { padding: 20px var(--gutter) 40px; }
/* Delayed, so quick panel swaps do not flicker */
.editor__panel[aria-busy=true] { opacity: 0.55; transition: opacity 0.15s 0.15s; }
.editor__preview { min-height: 0; min-width: 0; padding: 16px var(--gutter) 24px; display: flex; }
.editor__preview > .card { align-self: flex-start; }
.editor__frame-wrap { position: relative; flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--white); display: flex; justify-content: center; }
.editor__frame { width: 100%; height: 100%; border: 0; display: block; background: var(--white); }
/* While a refreshed preview loads it sits underneath the visible one (no white flash) */
.editor__frame--loading { position: absolute; inset: 0 auto auto 50%; transform: translateX(-50%); visibility: hidden; }
.editor__frame-wrap.is-phone { background: var(--paper); }
.editor__frame-wrap.is-phone .editor__frame { width: 390px; max-width: 100%; border-inline: 1px solid var(--line); }

.blocks { display: flex; flex-direction: column; gap: 28px; }
.blocks__group { display: flex; flex-direction: column; gap: 8px; }
.blocks__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.blocks__title { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.blocks__group .help { margin: 0; }
.blocks__empty { margin: 0; padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius-field); color: var(--muted); font-size: 15px; }
.blocks__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.blocks__add { align-self: flex-start; font-size: 15px; font-weight: 600; text-decoration: none; padding: 6px 2px; }
.blocks__add:hover { text-decoration: underline; }
.block { display: flex; align-items: center; gap: 2px; padding: 2px 4px 2px 2px; border: 1px solid var(--line); border-radius: var(--radius-field); background: var(--white); transition: border-color 0.1s, background-color 0.1s; }
.block:hover { border-color: var(--field-border); background: #FBFAF7; }
.block--selected { border-color: var(--green-text); box-shadow: inset 3px 0 0 var(--green); }
.block--hidden .block__name, .block--hidden .block__summary { color: var(--muted); }
.block--hidden .block__name::after { content: attr(data-hidden-label); margin-left: 8px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); vertical-align: 2px; }
.block__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 8px 6px; text-decoration: none; }
.block__main:hover { color: var(--ink); }
.block__name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.block__summary { font-size: 14px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block__tools { display: flex; gap: 0; opacity: 0.55; transition: opacity 0.1s; }
.block:hover .block__tools, .block:focus-within .block__tools { opacity: 1; }
.block__tools form { margin: 0; }
.block.is-dragging, .collection-item.is-dragging { opacity: 0.35; }
.sortable-chosen { box-shadow: 0 8px 24px rgb(21 23 26 / 0.12); }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--paper); color: var(--ink); }
.icon-button--danger:hover { color: var(--danger); }
.button--small { min-height: 40px; padding: 8px 18px; font-size: 15px; }

.panel { display: flex; flex-direction: column; gap: 20px; }
.panel__head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.panel__back { align-self: flex-start; font-size: 15px; text-decoration: none; color: var(--muted); margin-bottom: 6px; }
.panel__back:hover { color: var(--ink); text-decoration: underline; }
.panel__title { margin: 0; font-size: 22px; }
.panel__title:focus { outline: none; } /* focused by the editor (tabindex -1) so screen readers announce the panel */
.panel__subtitle { margin: 8px 0 0; font-size: 18px; }
.panel .help { margin: 0; }
.panel__form { display: flex; flex-direction: column; gap: 20px; }
.panel__form.is-autosaving .panel__submit { display: none; }

.template-choices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.template-choices form { margin: 0; }
.template-choice { width: 100%; display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-field); background: var(--white); color: var(--ink); cursor: pointer; }
.template-choice:hover { border-color: var(--ink); }
.template-choice__name { font-weight: 600; }
.template-choice__description { font-size: 14px; color: var(--muted); }

/* Image fields and the photo picker */
.image-field { display: flex; flex-direction: column; gap: 12px; border-radius: var(--radius-field); }
.image-field:not(.is-enhanced) .image-field__picker { display: none; }
.image-field__picker { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.image-field__preview { width: 160px; aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--muted); font-size: 14px; overflow: hidden; text-align: center; padding: 6px; }
.image-field__preview:has(img) { padding: 0; }
.image-field__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-field__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.image-field__actions .help:empty { display: none; }
.image-field.is-dragover { outline: 2px dashed var(--green-text); outline-offset: 6px; }
.js-hidden { display: none !important; }

.media-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 0; border-radius: var(--radius-card); padding: 24px; background: var(--white); color: var(--ink); }
.media-dialog::backdrop { background: rgb(21 23 26 / 0.55); }
.media-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.media-dialog__head h2 { margin: 0; }
.media-dialog__grid { margin-top: 16px; }
.media-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.media-choice { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 6px; font: inherit; font-size: 13px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); cursor: pointer; }
.media-choice:hover { border-color: var(--ink); }
.media-choice img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.media-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px; border: 2px dashed var(--field-border); border-radius: var(--radius-card); background: var(--paper); text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--green-text); background: #EAF6EE; }
.dropzone:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone__title { font-weight: 600; }
.dropzone--page { padding: 40px 24px; margin-bottom: 16px; }
.dropzone[hidden] { display: none; }

@media (max-width: 1000px) {
    :root { --gutter: 16px; }
    body:has(.app-main--editor) { height: auto; overflow: visible; display: block; }
    .editor { grid-template-columns: 1fr; grid-template-rows: auto; }
    .editor__side { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
    .editor__panel { padding: 20px 16px 32px; }
    .editor__preview { padding: 16px; }
    .editor__frame-wrap { height: 75vh; flex: none; width: 100%; }
}
