/* SMAC v2 : interface de l'admin (connexion, tableau de bord, coquille d'édition, écarts). */

:root {
  --magenta: #ec008c;
  --magenta-600: #d1007c;
  --magenta-050: #fff4fa;
  --magenta-100: #fde6f3;
  --noir: #16161d;
  --noir-2: #2a2a35;
  --noir-3: #3a3a47;
  --turquoise: #26bfca;
  --gris-1: #f3f4f7;
  --gris-2: #e8e8ee;
  --gris-3: #d6d6df;
  --texte-2: #6f6f7c;
  --texte-sombre-2: #b9b9c6;
  --blanc: #fff;
  --rouge: #d92d20;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(22, 22, 29, .05), 0 6px 20px rgba(22, 22, 29, .06);
  --shadow-2: 0 2px 6px rgba(22, 22, 29, .08), 0 24px 64px rgba(22, 22, 29, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-titre: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 500 15px/1.5 var(--font);
  color: var(--noir);
  background: var(--gris-1);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-titre); line-height: 1.15; letter-spacing: -.02em; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; }
.icon { flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Éléments communs ---------- */

.logo {
  font-family: var(--font-titre);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.03em;
  color: var(--blanc);
  text-decoration: none;
  line-height: 1;
  flex: none;
  padding: 4px 6px 4px 2px;
  border-radius: 8px;
}
.logo span { color: var(--magenta); }
.logo--dark { color: var(--noir); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, transform .15s var(--ease), opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--primary { background: var(--magenta); color: var(--blanc); }
.btn--primary:hover:not(:disabled) { background: var(--magenta-600); }
.btn--dark { background: var(--noir); color: var(--blanc); }
.btn--dark:hover { background: var(--noir-3); }
.btn--ghost { background: transparent; color: var(--noir); }
.btn--ghost:hover { background: var(--gris-1); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: transparent; color: var(--texte-sombre-2);
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--noir-2); color: var(--blanc); }
.icon-btn--light { color: var(--texte-2); }
.icon-btn--light:hover { background: var(--gris-1); color: var(--noir); }
.logout { margin: 0; display: flex; flex: none; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge--magenta { background: var(--magenta-100); color: #b0006a; }
.badge--muted { background: var(--gris-1); color: var(--texte-2); font-weight: 600; }
.count-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; background: var(--gris-2); color: var(--texte-2);
  font: 700 12px var(--font); letter-spacing: 0;
}

.search {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 16px;
  width: min(380px, 100%);
  background: var(--blanc); color: var(--texte-2);
  border: 1px solid var(--gris-2); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(236, 0, 140, .12); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 15px; color: var(--noir);
}
.search input::placeholder { color: #9a9aa6; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search--compact { height: 40px; width: 100%; border-radius: var(--r-sm); background: var(--gris-1); border-color: transparent; }

.empty { color: var(--texte-2); text-align: center; padding: 24px 16px; margin: 0; }
.eyebrow { margin: 0 0 6px; color: var(--texte-2); font-weight: 600; font-size: 14px; }
.section-hint { margin: -6px 0 14px; color: var(--texte-2); font-size: 14px; }
.form-error { color: #b42318; font-weight: 600; font-size: 14px; margin: 0; }
.form-error:empty { display: none; }
.form-error--box { background: #fef3f2; border: 1px solid #fecdca; border-radius: var(--r-sm); padding: 10px 12px; margin: 0 0 16px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md); border: 1px solid; font-size: 14px;
}
.notice .icon { width: 20px; height: 20px; margin-top: 1px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice p { margin: 0 0 10px; line-height: 1.55; }
.notice p:last-child { margin-bottom: 0; }
.notice--warn { background: #fff7e8; border-color: #ffdca3; color: #5e3b00; }
.notice--ok { background: #ebf9f1; border-color: #b6e6c9; color: #0d5a31; }

/* ---------- Barre du haut ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  min-height: 60px; padding: 10px 14px;
  background: var(--noir); color: var(--blanc);
}
.topbar__title { color: var(--texte-sombre-2); font-weight: 600; font-size: 14px; padding-left: 4px; }
.topbar__spacer { flex: 1; }
.topbar__selects { display: flex; gap: 8px; min-width: 0; }

.pill {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  background: var(--noir-2); color: var(--blanc);
  border: 0; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none;
  min-width: 0;
  transition: background-color .15s;
}
.pill:hover { background: var(--noir-3); }
.pill .icon { width: 16px; height: 16px; color: var(--texte-sombre-2); }
.pill__text { overflow: hidden; text-overflow: ellipsis; }
.pill--site { max-width: 260px; font-weight: 700; }
.pill--static:hover { background: var(--noir-2); }
.pill--link .icon { color: inherit; }

/* Sélecteur natif habillé en pastille : le <select> occupe toute la pastille. */
.pill--select { padding: 0; }
.pill--select > .icon:first-child { position: absolute; left: 12px; pointer-events: none; }
.pill--select > .icon:last-child { position: absolute; right: 10px; pointer-events: none; width: 14px; height: 14px; }
.pill--select select {
  appearance: none; -webkit-appearance: none;
  height: 100%; max-width: 220px; min-width: 0;
  padding: 0 30px 0 34px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--blanc); font-weight: 600; font-size: 13px;
  text-overflow: ellipsis; cursor: pointer;
}
.pill--select select:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; }
.pill--select option { color: var(--noir); background: var(--blanc); }
.pill--lang select { max-width: 92px; }

.devices { display: flex; gap: 2px; padding: 3px; background: var(--noir-2); border-radius: var(--r-md); flex: none; }
.devices__btn {
  display: grid; place-items: center; width: 34px; height: 32px;
  border: 0; border-radius: 9px; background: transparent; color: var(--texte-sombre-2);
  transition: background-color .2s, color .2s;
}
.devices__btn:hover { color: var(--blanc); }
.devices__btn[aria-pressed="true"] { background: var(--blanc); color: var(--noir); }

.btn-publish {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 40px; padding: 0 8px 0 18px;
  border: 0; border-radius: 999px;
  background: var(--magenta); color: var(--blanc);
  font-weight: 800; font-size: 14px;
  transition: background-color .15s, transform .15s var(--ease);
}
.btn-publish[data-count="0"] { padding-right: 18px; }
.btn-publish:hover { background: var(--magenta-600); }
.btn-publish:active { transform: scale(.98); }
.btn-publish__count {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 999px; background: var(--blanc); color: var(--magenta);
  font-size: 12px; font-weight: 800;
}
.btn-publish.is-bumped .btn-publish__count { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.25); } }

/* Sélecteur de site (équipe) */
.picker { position: relative; min-width: 0; }
.popover {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 40;
  width: 360px; max-width: calc(100vw - 28px);
  padding: 10px;
  background: var(--blanc); color: var(--noir);
  border: 1px solid var(--gris-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.popover__list { list-style: none; margin: 8px 0 0; padding: 0; max-height: min(420px, 60vh); overflow: auto; overscroll-behavior: contain; }
.popover__list a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  text-decoration: none;
}
.popover__list a:hover, .popover__list a:focus-visible { background: var(--gris-1); outline-offset: -2px; }
.popover__list a[aria-current] { background: var(--magenta-050); box-shadow: inset 3px 0 0 var(--magenta); }
.popover__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover__meta { grid-row: 2; color: var(--texte-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover__list .badge { grid-row: 1 / 3; grid-column: 2; align-self: center; }

/* ---------- Coquille d'édition ---------- */

.screen-editor_shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.stage {
  flex: 1; min-height: 0;
  display: flex; justify-content: center;
  padding: 16px;
  background: var(--gris-1);
}
.frame {
  width: 100%; height: 100%;
  background: var(--blanc);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: width .4s var(--ease), border-radius .4s var(--ease);
}
.stage[data-device="mobile"] .frame { width: 390px; max-width: 100%; border-radius: 22px; box-shadow: 0 0 0 8px var(--noir), var(--shadow-2); }
.stage[data-device="mobile"] { padding-top: 24px; padding-bottom: 24px; }
.frame iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--blanc); }
/* Compte non basculé (mode production) : aperçu en lecture seule. */
.readonly-bar {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 8px 16px;
  background: #fff7e8; border-bottom: 1px solid #ffdca3; color: #5e3b00;
  font-size: 14px; font-weight: 600; text-align: center;
}
.readonly-bar .icon { flex: none; width: 16px; height: 16px; }
.stage__empty { align-self: center; text-align: center; max-width: 420px; color: var(--texte-2); }
.stage__empty h1 { color: var(--noir); font-size: 26px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px);
  padding: 11px 20px; border-radius: 999px;
  background: var(--noir); color: var(--blanc);
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-2);
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--rouge); }

/* ---------- Dialogue « Publier » ---------- */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--blanc); color: var(--noir);
  box-shadow: var(--shadow-2);
}
.dialog[open] { display: flex; animation: dialog-in .22s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dialog::backdrop { background: rgba(22, 22, 29, .5); backdrop-filter: blur(3px); }
.dialog__inner { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0; }
.dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; }
.dialog__head h2 { margin: 0; font-size: 24px; font-weight: 800; }
.dialog__sub { margin: 4px 0 0; color: var(--texte-2); font-size: 14px; }
.dialog .notice { margin: 0 24px 6px; }
.dialog__body { padding: 10px 24px 16px; overflow: auto; min-height: 0; flex: 1; }
.dialog__loading { color: var(--texte-2); margin: 8px 0; }
.dialog__foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 24px; border-top: 1px solid var(--gris-2);
}

.draft-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.draft-list label {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start;
  padding: 12px 14px; border: 1px solid var(--gris-2); border-radius: var(--r-md);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.draft-list label:hover { border-color: var(--gris-3); }
.draft-list label:has(input:checked) { border-color: rgba(236, 0, 140, .45); background: var(--magenta-050); }
.draft-list input { grid-row: 1 / 3; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--magenta); cursor: pointer; }
.draft-list .what { font-weight: 700; overflow-wrap: anywhere; }
.draft-list .is-reserved label { cursor: default; background: var(--gris-1); }
.draft-list .is-reserved input { cursor: not-allowed; }
.draft-list .reserved {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 6px;
  background: var(--noir); color: #fff; font-size: 11px; font-weight: 800;
}
.draft-list li { display: flex; align-items: stretch; gap: 8px; }
.draft-list li > label { flex: 1; min-width: 0; }
.draft-list .discard {
  flex: none; align-self: center; padding: 8px 12px; border: 1px solid var(--gris-2); border-radius: 999px;
  background: #fff; color: var(--texte-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.draft-list .discard:hover { border-color: #c62828; color: #c62828; }
.draft-list .discard.is-armed { background: #c62828; border-color: #c62828; color: #fff; }
.draft-list .discard:disabled { opacity: .6; cursor: default; }
.draft-list .meta { grid-column: 2; color: var(--texte-2); font-size: 13px; }
.draft-list .kind {
  display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 6px;
  background: var(--gris-1); color: var(--texte-2); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}

/* ---------- Tableau de bord ---------- */

.dash { max-width: 1120px; margin: 0 auto; padding: 36px 24px 72px; }
.dash__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 8px; }
.dash__head h1 { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -.035em; }
.dash__section { margin-top: 36px; }
.dash__section h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 20px; font-weight: 600; }

.card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.site-card {
  display: flex; flex-direction: column; gap: 3px; height: 100%;
  padding: 16px 18px 16px;
  background: var(--blanc); border: 1px solid var(--gris-2); border-radius: var(--r-lg);
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.site-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--turquoise); }
.site-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.site-card__name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.site-card__domain { color: var(--texte-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card__meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--texte-2); font-size: 12px; font-weight: 600; }
.site-card__meta .icon { width: 14px; height: 14px; }
.site-card__meta--old { margin-top: 4px; color: #8a5a00; }

.site-avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  background: var(--noir); color: var(--blanc);
  font: 800 17px var(--font-titre);
}
.site-avatar--sm { width: 32px; height: 32px; font-size: 14px; background: var(--gris-1); color: var(--noir); }

.site-list { list-style: none; margin: 0; padding: 0; background: var(--blanc); border: 1px solid var(--gris-2); border-radius: var(--r-lg); overflow: hidden; }
.site-list li + li { border-top: 1px solid var(--gris-1); }
.site-list a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; text-decoration: none; transition: background-color .15s; }
.site-list a:hover { background: #fafafc; }
.site-list a:hover > .icon { color: var(--magenta); transform: translateX(2px); }
.site-list a > .icon { color: var(--gris-3); transition: color .15s, transform .15s var(--ease); }
.site-list a:focus-visible { outline-offset: -2px; }
.site-list__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.site-list__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-list__domain { color: var(--texte-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Écarts ---------- */

.drift { max-width: 900px; margin: 0 auto; padding: 36px 24px 72px; }
.drift h1 { margin: 0 0 12px; font-size: 38px; font-weight: 800; letter-spacing: -.035em; }
.lead { margin: 0 0 24px; color: var(--texte-2); max-width: 680px; line-height: 1.65; }
.drift .notice { margin-bottom: 20px; }
.panel { background: var(--blanc); border: 1px solid var(--gris-2); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 20px; }
.panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--gris-2); }
.panel__head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.drift-list { list-style: none; margin: 0; padding: 0; }
.drift-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 20px; }
.drift-list li + li { border-top: 1px solid var(--gris-1); }
.drift-list code { font: 600 13px ui-monospace, 'SF Mono', Menlo, monospace; overflow-wrap: anywhere; }
.drift-list .desc { grid-column: 1; color: var(--texte-2); font-size: 13px; }
.drift-list .status { grid-row: 1 / 3; grid-column: 2; }
.drift-summary { padding: 12px 20px; margin: 0; color: var(--texte-2); font-size: 14px; background: #fafafc; border-bottom: 1px solid var(--gris-2); }
.status { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status--differs { background: #fff1e0; color: #9a4a00; }
.status--missing { background: #e4f7f8; color: #0a6b73; }
.status--not_smac { background: var(--gris-1); color: var(--texte-2); }
.status--error { background: #fde8ec; color: #a3122f; }
.loading { display: flex; align-items: center; gap: 10px; margin: 0; padding: 22px 20px; color: var(--texte-2); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gris-2); border-top-color: var(--magenta); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.drift__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.drift__actions .section-hint { margin: 0; }
#drift-status:not(:empty) { margin-top: 20px; }

/* ---------- Connexion ---------- */

.screen-login {
  min-height: 100vh; min-height: 100dvh;
  background:
    radial-gradient(900px 520px at 0% -10%, rgba(236, 0, 140, .10), transparent 65%),
    radial-gradient(800px 520px at 110% 110%, rgba(38, 191, 202, .14), transparent 60%),
    var(--gris-1);
}
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login__card {
  width: 100%; max-width: 400px;
  padding: 32px 28px 28px;
  background: var(--blanc); border: 1px solid var(--gris-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.login__card h1 { margin: 22px 0 4px; font-size: 30px; font-weight: 800; }
.login__sub { margin: 0 0 22px; color: var(--texte-2); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.field input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--gris-2); border-radius: var(--r-md); background: #fbfbfc;
  font-size: 16px; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.field input:focus { outline: 0; border-color: var(--magenta); background: var(--blanc); box-shadow: 0 0 0 4px rgba(236, 0, 140, .12); }
.login__card .btn { margin-top: 8px; height: 48px; font-size: 15px; }
.login__foot { margin: 18px 0 0; color: var(--texte-2); font-size: 13px; }

/* ---------- Petits écrans ---------- */

@media (max-width: 820px) {
  .topbar--editor { flex-wrap: wrap; row-gap: 8px; padding: 8px 10px; }
  .topbar--editor .picker, .topbar--editor > .pill--site { flex: 1; min-width: 0; }
  .topbar--editor .pill--site { max-width: none; width: 100%; }
  .topbar--editor .topbar__spacer { display: none; }
  .topbar--editor .topbar__selects { order: 10; flex: 1 1 100%; }
  .topbar--editor .topbar__selects .pill { flex: 1; }
  .topbar--editor .topbar__selects .pill--lang { flex: none; }
  .topbar--editor .pill--select select { max-width: none; width: 100%; }
  .devices { display: none; }
  .stage { padding: 0; }
  .frame, .stage[data-device="mobile"] .frame { width: 100%; border-radius: 0; box-shadow: none; }
  .stage[data-device="mobile"] { padding: 0; }
  .popover { position: fixed; top: 64px; left: 14px; right: 14px; width: auto; max-width: none; }
}

@media (max-width: 560px) {
  .dash, .drift { padding: 24px 16px 56px; }
  .dash__head h1 { font-size: 34px; }
  .drift h1 { font-size: 30px; }
  .search { width: 100%; }
  .card-grid { grid-template-columns: 1fr; }
  .btn-publish { padding-left: 14px; }
  .dialog {
    width: 100%; max-width: 100%;
    margin: auto 0 0; border-radius: 20px 20px 0 0;
    max-height: calc(100dvh - 24px);
  }
  .dialog__head, .dialog__body, .dialog__foot { padding-left: 18px; padding-right: 18px; }
  .dialog .notice { margin-left: 18px; margin-right: 18px; }
  .dialog__foot .btn { flex: 1; }
  .drift-list li { grid-template-columns: 1fr; }
  .drift-list .status { grid-row: auto; grid-column: 1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
