/* ==========================================================
   Aleaf Studios — studio admin
   Same dark palette and Fudd headings as the site; forms use the
   system sans so long editing sessions stay easy to read.
   ========================================================== */

@font-face { font-family: "Fudd"; src: url("../assets/fonts/fudd-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Superior Mono"; src: url("../assets/fonts/superior-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #121212;
  --panel: #191919;
  --raised: #212121;
  --hover: #2a2a2a;
  --ink: #f2efe9;
  --muted: rgba(242, 239, 233, 0.62);
  --faint: rgba(242, 239, 233, 0.4);
  --line: rgba(242, 239, 233, 0.12);
  --line-2: rgba(242, 239, 233, 0.22);
  --danger: #ef5a5a;
  --ok: #5fcf8f;

  --serif: "Fudd", "Helvetica Neue", Arial, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Superior Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 12px;
  --side: 248px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--ui); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.label, .field__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.h-serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--muted); }
.svg { width: 18px; height: 18px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn:hover { background: var(--hover); border-color: rgba(242, 239, 233, 0.35); }
.btn--primary { background: var(--ink); color: #121212; border-color: var(--ink); }
.btn--primary:hover { background: #fff; border-color: #fff; }
.btn--danger { color: var(--danger); border-color: rgba(239, 90, 90, 0.4); }
.btn--danger:hover { background: rgba(239, 90, 90, 0.1); border-color: var(--danger); }
.btn--ghost { border-color: transparent; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; height: 46px; }
.iconbtn {
  width: 36px; height: 36px; border-radius: 999px; display: inline-grid; place-items: center; flex: none;
  color: var(--muted); transition: background 0.2s, color 0.2s;
}
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.iconbtn--danger:hover { color: var(--danger); background: rgba(239, 90, 90, 0.1); }

/* ---------- Fields ---------- */
.field { display: grid; gap: 8px; }
.field input, .field textarea, .field select, .search input {
  width: 100%; background: var(--raised); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 15px; transition: border-color 0.2s, background 0.2s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus, .search input:focus { outline: none; border-color: var(--line-2); background: #262626; }
.field__hint { font-size: 13px; color: var(--muted); }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form { display: grid; gap: 18px; }
.form__section { display: grid; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.form__section:first-child { padding-top: 0; border-top: 0; }
.form__section > h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }

.seg { display: inline-flex; padding: 3px; background: var(--raised); border: 1px solid var(--line); border-radius: 999px; }
.seg button { height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.seg button.is-on { background: var(--ink); color: #121212; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { width: 42px; height: 24px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line-2); position: relative; flex: none; transition: background 0.2s; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform 0.25s var(--ease), background 0.2s; }
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: #121212; }
.switch__text b { display: block; font-weight: 500; }
.switch__text small { color: var(--muted); font-size: 13px; }

.search { position: relative; flex: 1; max-width: 340px; }
.search input { padding-left: 38px; border-radius: 999px; height: 40px; }
.search .svg { position: absolute; left: 13px; top: 11px; color: var(--faint); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.chip.is-on { background: var(--ink); color: #121212; border-color: var(--ink); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(18, 18, 18, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ink);
}
.badge .svg { width: 12px; height: 12px; }
.badge--hidden { background: rgba(239, 90, 90, 0.16); color: #ffb3b3; }

/* ---------- Sign in ---------- */
.login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, #222 0%, var(--bg) 70%); }
.login__card { width: min(400px, 100%); display: grid; gap: 18px; padding: 36px 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.login__mark { width: 52px; }
.login__title { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; margin: 6px 0 0; }
.login__sub { margin: -6px 0 6px; color: var(--muted); }
.login__error { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: rgba(239, 90, 90, 0.12); color: #ffc2c2; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.status .svg { width: 15px; height: 15px; color: var(--ok); }
.status[data-state="error"] { color: var(--danger); }
.login__forgot { justify-self: center; font-size: 13px; color: var(--muted); }
.login__forgot:hover { color: var(--ink); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px; border-right: 1px solid var(--line); background: #0f0f0f;
}
.side__brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 8px; font-family: var(--serif); font-size: 21px; }
.side__brand img { width: 30px; }
.side__nav { display: grid; gap: 2px; }
.navlink {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); font-size: 14.5px; transition: background 0.2s, color 0.2s;
}
.navlink:hover { background: var(--raised); color: var(--ink); }
.navlink.is-on { background: var(--raised); color: var(--ink); }
.navlink__count { margin-left: auto; font-size: 12px; color: var(--faint); }
.side__foot { margin-top: auto; display: grid; gap: 12px; }
.side__site { display: flex; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.side__site:hover { background: var(--raised); }
.side__user { display: flex; align-items: center; gap: 10px; padding: 6px 4px 0 6px; }
.side__user b { display: block; font-weight: 500; font-size: 14px; }
.side__user small { color: var(--muted); font-size: 12px; }
.side__out { height: 40px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #121212; font-weight: 600; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  height: 72px; padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(18, 18, 18, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand { display: none; }
.topbar__out { display: none; }
.topbar__title { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; line-height: 1; }
.topbar__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.view { padding: 28px clamp(16px, 3vw, 40px) 80px; max-width: 1240px; outline: none; }
.view__intro { color: var(--muted); margin: -6px 0 24px; max-width: 640px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .chips { margin-left: auto; }

.tabbar { display: none; }

/* ---------- Overview ---------- */
.hello { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1; margin: 6px 0 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 26px 0 34px; }
.stat { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 6px; transition: border-color 0.2s; }
.stat:hover { border-color: var(--line-2); }
.stat b { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 34px; }
.quick__card {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); text-align: left; transition: border-color 0.2s, background 0.2s;
}
.quick__card:hover { border-color: var(--line-2); background: var(--raised); }
.quick__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--hover); display: grid; place-items: center; flex: none; }
.quick__card b { display: block; font-weight: 500; margin-bottom: 2px; }
.quick__card small { color: var(--muted); font-size: 13px; }
.preview-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.preview-strip figure { margin: 0; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--raised); position: relative; }
.preview-strip img, .preview-strip video { width: 100%; height: 100%; object-fit: cover; }
.tip { display: flex; gap: 12px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); font-size: 14px; margin-top: 30px; }

/* ---------- Media thumbs ---------- */
.thumb { position: relative; overflow: hidden; background: var(--raised); border-radius: 10px; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge { position: absolute; left: 8px; top: 8px; }

/* ---------- Home slides ---------- */
.slides { display: grid; gap: 12px; }
.slide-row {
  display: grid; grid-template-columns: 28px 64px 1fr 1fr auto; gap: 16px; align-items: center;
  padding: 12px 14px 12px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.slide-row.is-intro { border-color: var(--line-2); }
.slide-row__no { font-family: var(--serif); font-size: 26px; text-align: center; color: var(--muted); }
.slide-row__half { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; min-width: 0; }
.slide-row__half .thumb { aspect-ratio: 3 / 4; }
.slide-row__half b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-row__half small { color: var(--muted); font-size: 13px; display: block; }
.slide-row__half .btn { margin-top: 8px; }
.slide-row__actions { display: flex; gap: 2px; }
.handle { color: var(--faint); cursor: grab; display: grid; place-items: center; height: 100%; touch-action: none; }
.handle:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.35; }
.sortable-chosen { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.pin { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* ---------- Work grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.pcard { display: grid; gap: 10px; text-align: left; cursor: pointer; position: relative; }
.pcard .thumb { aspect-ratio: 4 / 5; }
.pcard .thumb img { transition: transform 0.6s var(--ease); }
.pcard:hover .thumb img { transform: scale(1.03); }
.pcard__meta b { display: block; font-weight: 500; }
.pcard__meta small { color: var(--muted); font-size: 13px; }
.pcard .handle { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 8px; background: rgba(18, 18, 18, 0.7); color: var(--ink); }
.pcard.is-hidden-item .thumb img { opacity: 0.4; }
.pcard--new .thumb { display: grid; place-items: center; border: 1.5px dashed var(--line-2); background: transparent; color: var(--muted); }
.pcard--new:hover .thumb { border-color: var(--ink); color: var(--ink); }
.pcard--new .thumb span { display: grid; justify-items: center; gap: 8px; font-size: 14px; }

/* ---------- Project editor ---------- */
.dropzone {
  display: grid; place-items: center; gap: 6px; text-align: center; padding: 26px 16px;
  border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--muted); cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); color: var(--ink); background: rgba(242, 239, 233, 0.03); }
.dropzone b { color: var(--ink); font-weight: 500; }
.dropzone small { font-size: 12.5px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 4 / 5; }
.photo .thumb { position: absolute; inset: 0; }
.photo__bar { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; opacity: 0; transition: opacity 0.2s; }
.photo:hover .photo__bar, .photo:focus-within .photo__bar { opacity: 1; }
.photo__bar .iconbtn { width: 30px; height: 30px; background: rgba(18, 18, 18, 0.78); color: var(--ink); }
.photo .badge--cover { position: absolute; left: 6px; top: 6px; background: var(--ink); color: #121212; }
.uploading { position: absolute; inset: 0; display: grid; place-items: end stretch; padding: 8px; background: rgba(0, 0, 0, 0.45); border-radius: 10px; }
.progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ink); width: 0; transition: width 0.3s; }
.source { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 12px; background: var(--raised); border-radius: var(--r); }
.source .thumb { aspect-ratio: 16 / 9; }
.source b { font-weight: 500; display: block; }
.source small { color: var(--muted); font-size: 13px; }

/* Focus point: tap the picture to choose what stays in frame */
.focus { position: relative; border-radius: var(--r); overflow: hidden; cursor: crosshair; background: var(--raised); }
.focus img, .focus video { width: 100%; max-height: 300px; object-fit: contain; background: #0c0c0c; }
.focus__dot {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(0, 0, 0, 0.35); pointer-events: none;
}
.focus-previews { display: grid; grid-template-columns: repeat(2, 64px); gap: 10px; align-items: end; }
.focus-previews .thumb:first-child { aspect-ratio: 9 / 16; }
.focus-previews .thumb:last-child { aspect-ratio: 4 / 5; }
.focus-wrap { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; border: 1px solid rgba(239, 90, 90, 0.3); border-radius: var(--r); }
.danger-zone b { display: block; font-weight: 500; }
.danger-zone small { color: var(--muted); font-size: 13px; }

/* ---------- Logos ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.logo-tile { display: grid; gap: 10px; text-align: left; position: relative; }
.logo-tile__box { position: relative; overflow: hidden; aspect-ratio: 3 / 2; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; transition: border-color 0.2s; }
.logo-tile:hover .logo-tile__box { border-color: var(--line-2); }
/* Every logo is fitted inside the same safe area, whatever its file's size */
.logo-tile__box img { position: absolute; inset: 22% 16%; width: 68%; height: 56%; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.92; }
.logo-tile__box img.is-grey { filter: grayscale(1) brightness(1.4); }
.logo-tile__name { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.logo-tile .handle { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; }

/* ---------- Media library ---------- */
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.mitem { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.mitem .thumb { aspect-ratio: 1; }
.mitem b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mitem small { color: var(--muted); font-size: 12px; display: block; }
.mitem small.unused { color: #e9b45a; }
.storage { display: grid; gap: 8px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 22px; }
.storage__row { display: flex; justify-content: space-between; font-size: 14px; }
.storage .progress { height: 6px; }

/* ---------- Settings ---------- */
.settings { display: grid; gap: 22px; max-width: 760px; }
.card { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.card > h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card > p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* ---------- Sheet (edit panel) ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.3s; }
.sheet__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%);
  display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.4s var(--ease);
}
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__head { display: flex; align-items: center; gap: 10px; height: 68px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.sheet__head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__actions { display: flex; gap: 8px; }
.sheet__body { overflow-y: auto; padding: 22px 22px 60px; flex: 1; }

/* ---------- Dialog + toasts ---------- */
.dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.6); }
.dialog__card { width: min(420px, 100%); padding: 24px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; }
.dialog__card h2 { margin: 0 0 8px; font-size: 18px; }
.dialog__card p { margin: 0 0 22px; color: var(--muted); }
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }

.toasts { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 12px;
  background: var(--ink); color: #121212; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.35s var(--ease);
}
.toast .svg { color: #1f8a4c; }
.toast button { margin-left: auto; font-weight: 600; text-decoration: underline; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

/* ---------- Phones ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { height: 60px; gap: 12px; }
  .topbar__brand { display: block; }
  .topbar__out { display: inline-grid; }
  .topbar__brand img { width: 28px; }
  .topbar__title { font-size: 24px; }
  .view { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(15, 15, 15, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar .navlink { flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0; font-size: 11px; border-radius: 10px; }
  .tabbar .navlink.is-on { background: none; color: var(--ink); }
  .tabbar .navlink__count { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat b { font-size: 38px; }
  .quick { grid-template-columns: 1fr; gap: 10px; }
  .preview-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slide-row { grid-template-columns: 24px 1fr auto; grid-template-areas: "h no act" "h l l" "h r r"; gap: 10px 10px; padding: 12px 12px 14px 6px; }
  .slide-row .handle { grid-area: h; }
  .slide-row__no { grid-area: no; text-align: left; font-size: 22px; }
  .slide-row__actions { grid-area: act; }
  .slide-row__half:nth-of-type(1) { grid-area: l; }
  .slide-row__half:nth-of-type(2) { grid-area: r; }
  .slide-row__half { grid-template-columns: 64px 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .slide-row__half .badge span { display: none; }
  .slide-row__half .badge { padding: 0 6px; }
  .toolbar .chips { margin-left: 0; }
  .search { max-width: none; flex-basis: 100%; }
  .field__row { grid-template-columns: 1fr; }
  .sheet__panel { width: 100%; top: env(safe-area-inset-top); border-left: 0; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .sheet.is-open .sheet__panel { transform: none; }
  .sheet__body { padding: 18px 16px calc(40px + env(safe-area-inset-bottom)); }
  .photo__bar { opacity: 1; }
  .focus-wrap { grid-template-columns: 1fr; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .topbar__actions .btn span.lg { display: none; }
  .status { display: none; }
}

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