:root {
  color-scheme: light;
  --mj-bg: #f4f1eb;
  --mj-bg-top: #f8f6f1;
  --mj-surface: rgba(255, 255, 255, 0.72);
  --mj-surface-solid: #fbfaf7;
  --mj-text: #171815;
  --mj-muted: #696b65;
  --mj-placeholder: #93958e;
  --mj-line: rgba(23, 24, 21, 0.13);
  --mj-line-strong: rgba(23, 24, 21, 0.22);
  --mj-accent: #2f4a3c;
  --mj-accent-hover: #3d5d4d;
  --mj-accent-soft: rgba(47, 74, 60, 0.09);
  --mj-danger: #9b3f36;
  --mj-radius-control: 6px;
  --mj-radius-panel: 8px;
  --mj-shadow-panel: 0 20px 60px rgba(30, 31, 28, 0.07);
  --mj-shadow-menu: 0 18px 45px rgba(30, 31, 28, 0.13);
  --mj-width-product: 1120px;
  --mj-gutter: 20px;
  --mj-fast: 160ms;
  --mj-reveal: 420ms;
  --mj-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(47, 74, 60, 0.07), transparent 30rem),
    linear-gradient(180deg, var(--mj-bg-top) 0%, var(--mj-bg) 100%);
  color: var(--mj-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(47, 74, 60, 0.22);
  outline-offset: 2px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--mj-text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
}

.brand-mark span {
  position: absolute;
  border: 1px solid var(--mj-accent);
  border-radius: 50%;
}
.brand-mark span:nth-child(1) { width: 31px; height: 31px; opacity: .35; }
.brand-mark span:nth-child(2) { width: 21px; height: 21px; opacity: .65; }
.brand-mark span:nth-child(3) { width: 9px; height: 9px; background: var(--mj-accent); }
.brand-name { font-size: 18px; font-weight: 680; }
.brand-by { color: var(--mj-muted); font-size: 13px; }

.button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--mj-radius-control);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition: background var(--mj-fast) ease, border-color var(--mj-fast) ease, color var(--mj-fast) ease, transform var(--mj-fast) ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .62; }
.button-primary { background: var(--mj-accent); color: white; }
.button-primary:hover { background: var(--mj-accent-hover); }
.button-secondary { background: transparent; border-color: var(--mj-line-strong); }
.button-secondary:hover { background: rgba(255,255,255,.62); border-color: var(--mj-accent); }
.button-danger { background: transparent; border-color: rgba(155,63,54,.3); color: var(--mj-danger); }
.button-danger:hover { background: rgba(155,63,54,.07); }
.button-icon-text { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.button-icon-text svg { width: 18px; height: 18px; }

.icon-button {
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--mj-line);
  border-radius: var(--mj-radius-control);
  background: rgba(255,255,255,.42);
  cursor: pointer;
  transition: background var(--mj-fast) ease, border-color var(--mj-fast) ease, color var(--mj-fast) ease;
}
.icon-button:hover { background: white; border-color: var(--mj-line-strong); color: var(--mj-accent); }
.icon-button-small { width: 36px; height: 36px; flex-basis: 36px; }
.icon-button-small svg { width: 17px; height: 17px; }

.eyebrow {
  margin: 0 0 7px;
  color: var(--mj-accent);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.2;
  text-transform: uppercase;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 82px;
  border-bottom: 1px solid var(--mj-line);
  background: rgba(248, 246, 241, .86);
  backdrop-filter: blur(16px);
}
.header-inner {
  display: grid;
  grid-template-columns: 220px minmax(260px, 520px) 1fr;
  align-items: center;
  gap: 28px;
  width: min(100% - 40px, 1400px);
  height: 100%;
  margin: 0 auto;
}
.mobile-menu-button { display: none; }
.search-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.search-control > svg { position: absolute; left: 15px; width: 18px; color: var(--mj-muted); pointer-events: none; }
.search-control input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 44px;
  border: 1px solid var(--mj-line);
  border-radius: var(--mj-radius-control);
  background: rgba(255,255,255,.62);
  color: var(--mj-text);
  outline: 0;
  transition: border-color var(--mj-fast) ease, box-shadow var(--mj-fast) ease, background var(--mj-fast) ease;
}
.search-control input::placeholder { color: var(--mj-placeholder); }
.search-control input:focus { border-color: var(--mj-accent); background: white; box-shadow: 0 0 0 3px rgba(47,74,60,.12); }
.search-clear { position: absolute; right: 5px; display: grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 0; background: transparent; color: var(--mj-muted); cursor: pointer; }
.search-clear svg { width: 17px; }
.header-add-button { justify-self: end; }

.workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 42px;
  width: min(100% - 40px, 1400px);
  min-height: calc(100vh - 82px);
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: 82px;
  display: flex;
  height: calc(100vh - 82px);
  min-height: 520px;
  flex-direction: column;
  padding: 34px 0 20px;
  border-right: 1px solid var(--mj-line);
}
.sidebar-mobile-head, .sidebar-backdrop { display: none; }
.primary-nav { display: grid; gap: 4px; padding-right: 20px; }
.nav-item, .folder-item {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--mj-radius-control);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--mj-fast) ease, color var(--mj-fast) ease, border-color var(--mj-fast) ease;
}
.nav-item:hover, .folder-item:hover { background: rgba(255,255,255,.48); }
.nav-item.is-active, .folder-item.is-active { background: var(--mj-accent-soft); color: var(--mj-accent); font-weight: 650; }
.nav-item.is-drag-over, .folder-item.is-drag-over { border-color: var(--mj-accent); background: var(--mj-accent-soft); }
.nav-item svg, .folder-item svg { width: 18px; height: 18px; }
.nav-count { color: var(--mj-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.folder-section { min-height: 0; margin-top: 28px; padding-right: 20px; overflow: auto; }
.sidebar-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 4px 8px 10px; color: var(--mj-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.folder-tree { display: grid; gap: 2px; }
.folder-row { position: relative; }
.folder-item { padding-left: calc(10px + var(--folder-depth, 0) * 16px); }
.folder-item .folder-menu { visibility: hidden; opacity: 0; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.folder-item:hover .folder-menu, .folder-item:focus-within .folder-menu { visibility: visible; opacity: 1; }
.folder-menu svg { width: 16px; }
.folder-empty { padding: 16px 10px; color: var(--mj-muted); font-size: 13px; line-height: 1.5; }
.extension-download {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  margin: 20px 20px 16px 0;
  padding: 11px 10px;
  border: 1px solid var(--mj-line);
  border-radius: var(--mj-radius-control);
  background: rgba(255,255,255,.38);
  text-decoration: none;
  transition: background var(--mj-fast) ease, border-color var(--mj-fast) ease;
}
.extension-download:hover { border-color: var(--mj-line-strong); background: rgba(255,255,255,.72); }
.extension-download-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--mj-accent-soft); color: var(--mj-accent); }
.extension-download-icon svg { width: 18px; }
.extension-download strong, .extension-download small { display: block; }
.extension-download strong { font-size: 12px; }
.extension-download small { margin-top: 3px; color: var(--mj-muted); font-size: 11px; }
.extension-download > svg { width: 17px; color: var(--mj-muted); }
.sidebar-account { display: grid; grid-template-columns: 38px minmax(0,1fr) 36px; align-items: center; gap: 10px; margin-top: auto; padding: 20px 20px 0 0; border-top: 1px solid var(--mj-line); }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--mj-accent); color: white; font-size: 13px; font-weight: 700; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 13px; }
.account-copy small { margin-top: 3px; color: var(--mj-muted); font-size: 11px; }

.content-area { min-width: 0; padding: 52px 0 88px; }
.content-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.view-heading h1 { margin: 0; font-size: 28px; font-weight: 590; line-height: 1.15; }
.view-count { margin: 7px 0 0; color: var(--mj-muted); font-size: 13px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.sort-control { position: relative; display: flex; align-items: center; }
.sort-control > svg { position: absolute; left: 12px; width: 16px; color: var(--mj-muted); pointer-events: none; }
.sort-control select { width: 148px; height: 44px; padding: 0 10px 0 36px; border: 1px solid var(--mj-line); border-radius: var(--mj-radius-control); background: rgba(255,255,255,.42); color: var(--mj-text); cursor: pointer; outline: 0; }
.sort-control select:hover { border-color: var(--mj-line-strong); background: rgba(255,255,255,.7); }
.sort-control select:focus { border-color: var(--mj-accent); box-shadow: 0 0 0 3px rgba(47,74,60,.12); }
.filter-button { position: relative; }
.filter-button.is-active { border-color: rgba(47,74,60,.34); background: var(--mj-accent-soft); color: var(--mj-accent); }
.filter-button [data-filter-count] { position: absolute; top: -5px; right: -5px; display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; border: 2px solid var(--mj-bg-top); border-radius: 10px; background: var(--mj-accent); color: white; font-size: 10px; font-weight: 700; }
.segmented-control { display: grid; grid-template-columns: 42px 42px; height: 44px; padding: 3px; border: 1px solid var(--mj-line); border-radius: var(--mj-radius-control); background: rgba(255,255,255,.42); }
.segmented-control button { display: grid; padding: 0; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--mj-muted); cursor: pointer; }
.segmented-control button.is-active { background: var(--mj-surface-solid); color: var(--mj-accent); box-shadow: 0 1px 4px rgba(23,24,21,.08); }
.segmented-control svg { width: 17px; }

.bookmark-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bookmark-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--mj-line);
  border-radius: var(--mj-radius-panel);
  background: var(--mj-surface);
  box-shadow: 0 10px 30px rgba(30,31,28,.035);
  transition: transform var(--mj-fast) ease, border-color var(--mj-fast) ease, box-shadow var(--mj-fast) ease, opacity var(--mj-fast) ease;
  animation: reveal var(--mj-reveal) var(--mj-ease-out) both;
}
.bookmark-card:hover { transform: translateY(-2px); border-color: var(--mj-line-strong); box-shadow: 0 16px 34px rgba(30,31,28,.07); }
.bookmark-card.is-dragging { opacity: .42; }
.bookmark-card.is-drag-over { border-color: var(--mj-accent); box-shadow: 0 0 0 2px rgba(47,74,60,.12); }
.bookmark-preview { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--mj-line); background: #e9ebe6; text-decoration: none; }
.bookmark-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms ease; }
.bookmark-card:hover .bookmark-preview img { transform: scale(1.018); }
.preview-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(145deg, #eef0eb, #dfe5df); color: var(--mj-accent); font-size: 28px; font-weight: 650; }
.preview-fallback::before, .preview-fallback::after { content: ""; position: absolute; border: 1px solid rgba(47,74,60,.16); border-radius: 50%; }
.preview-fallback::before { width: 82px; height: 82px; }
.preview-fallback::after { width: 54px; height: 54px; }
.preview-fallback span { position: relative; z-index: 1; }
.bookmark-copy { min-height: 120px; padding: 16px 92px 16px 16px; }
.bookmark-domain { display: block; margin-bottom: 8px; overflow: hidden; color: var(--mj-muted); font-size: 11px; font-weight: 670; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.bookmark-title { display: -webkit-box; margin: 0; overflow: hidden; font-size: 15px; font-weight: 650; line-height: 1.42; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.bookmark-title a { text-decoration: none; }
.bookmark-title a:hover { color: var(--mj-accent); }
.bookmark-description { display: -webkit-box; margin: 8px 0 0; overflow: hidden; color: var(--mj-muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-actions { position: absolute; right: 9px; bottom: 10px; display: flex; gap: 2px; }
.card-actions .icon-button { width: 36px; height: 36px; flex-basis: 36px; border-color: transparent; background: transparent; }
.card-actions svg { width: 17px; }
.favorite-button.is-active { color: var(--mj-accent); }
.favorite-button.is-active svg { fill: currentColor; }

.bookmark-grid.is-list { grid-template-columns: minmax(0,1fr); gap: 8px; }
.bookmark-grid.is-list .bookmark-card { display: grid; grid-template-columns: 132px minmax(0,1fr); min-height: 88px; }
.bookmark-grid.is-list .bookmark-preview { height: 100%; aspect-ratio: auto; border-right: 1px solid var(--mj-line); border-bottom: 0; }
.bookmark-grid.is-list .bookmark-copy { min-height: 88px; padding: 14px 92px 14px 16px; }
.bookmark-grid.is-list .bookmark-description { -webkit-line-clamp: 1; }

.loading-state { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.loading-state span { aspect-ratio: 1.12; border: 1px solid var(--mj-line); border-radius: var(--mj-radius-panel); background: linear-gradient(100deg, rgba(255,255,255,.3) 30%, rgba(255,255,255,.72) 50%, rgba(255,255,255,.3) 70%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
.empty-state { display: grid; min-height: 360px; place-items: center; align-content: center; padding: 34px; border: 1px dashed rgba(47,74,60,.28); border-radius: var(--mj-radius-panel); background: rgba(255,255,255,.25); text-align: center; }
.empty-icon { display: grid; width: 58px; height: 58px; margin-bottom: 18px; place-items: center; border: 1px solid rgba(47,74,60,.18); border-radius: 50%; color: var(--mj-accent); }
.empty-state h2 { margin: 0; font-size: 18px; }
.empty-state p { margin: 8px 0 22px; color: var(--mj-muted); font-size: 14px; }

.auth-shell { display: grid; min-height: 100vh; padding: 34px 20px; place-items: center; }
.auth-panel { width: min(100%, 440px); padding: 34px; border: 1px solid var(--mj-line); border-radius: var(--mj-radius-panel); background: var(--mj-surface); box-shadow: var(--mj-shadow-panel); }
.auth-heading { margin: 54px 0 28px; }
.auth-heading h1 { margin: 0; font-size: 28px; font-weight: 590; }
.auth-heading p:not(.eyebrow) { margin: 10px 0 0; color: var(--mj-muted); font-size: 14px; }
.form-stack { display: grid; }
.field-label { display: flex; justify-content: space-between; margin: 0 0 8px; font-size: 12px; font-weight: 680; }
.field-label:not(:first-of-type) { margin-top: 18px; }
.field-label span { color: var(--mj-muted); font-weight: 500; }
.text-input, .select-input, .textarea-input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--mj-line-strong); border-radius: var(--mj-radius-control); background: var(--mj-surface-solid); color: var(--mj-text); outline: 0; }
.textarea-input { min-height: 112px; padding: 12px 13px; line-height: 1.5; resize: vertical; }
.text-input:focus, .select-input:focus, .textarea-input:focus { border-color: var(--mj-accent); box-shadow: 0 0 0 3px rgba(47,74,60,.12); }
.form-stack .button { margin-top: 24px; }
.auth-note { margin: 22px 0 0; color: var(--mj-muted); font-size: 13px; text-align: center; }
.auth-download { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 8px; color: var(--mj-accent); font-size: 12px; font-weight: 650; text-decoration: none; }
.auth-download:hover { text-decoration: underline; }
.auth-download svg { width: 16px; }
.alert { margin-bottom: 20px; padding: 12px 14px; border: 1px solid; border-radius: var(--mj-radius-control); font-size: 13px; line-height: 1.5; }
.alert-error { border-color: rgba(155,63,54,.3); background: rgba(155,63,54,.06); color: var(--mj-danger); }
.connect-panel { text-align: center; }
.connect-panel .brand-lockup { display: flex; justify-content: center; }
.connect-icon { display: grid; width: 58px; height: 58px; margin: 48px auto 0; place-items: center; border: 1px solid var(--mj-line); border-radius: 50%; background: var(--mj-surface-solid); color: var(--mj-accent); }
.connect-panel .auth-heading { margin: 20px 0 26px; }
.connect-panel .button { width: 100%; }

.modal { width: 100%; max-width: none; height: 100%; max-height: none; padding: 20px; border: 0; background: transparent; }
.modal::backdrop { background: rgba(23,24,21,.34); backdrop-filter: blur(3px); }
.modal[open] { display: grid; place-items: center; }
.modal-panel { width: min(100%, 520px); max-height: calc(100vh - 40px); padding: 28px; overflow: auto; border: 1px solid var(--mj-line); border-radius: var(--mj-radius-panel); background: var(--mj-surface-solid); box-shadow: var(--mj-shadow-menu); animation: modal-in 220ms var(--mj-ease-out) both; }
.filter-panel { width: min(100%, 460px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.modal-head h2 { margin: 0; font-size: 22px; font-weight: 590; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.modal-actions-split { display: grid; grid-template-columns: auto 1fr auto auto; }
.form-error { margin-top: 16px; color: var(--mj-danger); font-size: 13px; }

.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: min(380px, calc(100vw - 28px)); padding: 11px 14px; border: 1px solid var(--mj-line-strong); border-radius: 7px; background: var(--mj-surface-solid); box-shadow: var(--mj-shadow-menu); font-size: 13px; animation: toast-in 220ms var(--mj-ease-out) both; }
.toast svg { width: 18px; color: var(--mj-accent); }
.toast.is-error svg { color: var(--mj-danger); }

@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position-x: -220%; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .header-inner { grid-template-columns: 190px minmax(240px, 1fr) auto; }
  .workspace { grid-template-columns: 220px minmax(0,1fr); gap: 28px; }
  .bookmark-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .app-header { height: 70px; }
  .header-inner { grid-template-columns: 48px minmax(0,1fr) 48px; gap: 8px; width: calc(100% - 28px); }
  .mobile-menu-button { display: grid; }
  .app-brand { display: none; }
  .header-add-button { width: 48px; padding: 0; }
  .header-add-button span { display: none; }
  .search-control input { height: 46px; }
  .workspace { display: block; width: 100%; min-height: calc(100vh - 70px); }
  .sidebar-backdrop { position: fixed; z-index: 29; inset: 70px 0 0; display: block; visibility: hidden; background: rgba(23,24,21,.28); opacity: 0; transition: opacity var(--mj-fast) ease, visibility var(--mj-fast) ease; }
  .sidebar { position: fixed; z-index: 30; top: 70px; bottom: 0; left: 0; width: min(310px, calc(100vw - 46px)); height: auto; min-height: 0; padding: 14px 0 14px 14px; border-right: 1px solid var(--mj-line); background: var(--mj-surface-solid); box-shadow: var(--mj-shadow-menu); transform: translateX(-102%); transition: transform 220ms var(--mj-ease-out); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { visibility: visible; opacity: 1; }
  .sidebar-mobile-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 10px; padding-right: 14px; font-size: 14px; font-weight: 680; }
  .primary-nav, .folder-section { padding-right: 14px; }
  .sidebar-account { padding-right: 14px; }
  .extension-download { margin-right: 14px; }
  .content-area { padding: 34px 14px 72px; }
  .content-toolbar { align-items: center; margin-bottom: 22px; }
  .view-heading h1 { font-size: 24px; }
  .bookmark-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .bookmark-copy { min-height: 112px; padding: 13px 86px 13px 13px; }
  .bookmark-description { display: none; }
  .loading-state { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .auth-shell { padding: 14px; }
  .auth-panel { padding: 24px 20px; }
  .auth-heading { margin-top: 42px; }
  .modal { padding: 14px; }
  .modal-panel { max-height: calc(100vh - 28px); padding: 22px 18px; }
  .modal-actions-split { grid-template-columns: auto 1fr auto; }
  .modal-actions-split span { display: none; }
  .modal-actions-split .button-secondary { display: none; }
  .modal-actions-split .filter-reset { display: inline-flex; }
  .toast-region { right: 14px; bottom: 14px; }
}

@media (max-width: 480px) {
  .bookmark-grid { grid-template-columns: minmax(0,1fr); }
  .bookmark-grid:not(.is-list) .bookmark-card { display: grid; grid-template-columns: 116px minmax(0,1fr); min-height: 100px; }
  .bookmark-grid:not(.is-list) .bookmark-preview { height: 100%; aspect-ratio: auto; border-right: 1px solid var(--mj-line); border-bottom: 0; }
  .bookmark-grid:not(.is-list) .bookmark-copy { min-height: 100px; }
  .loading-state { grid-template-columns: minmax(0,1fr); }
  .loading-state span { aspect-ratio: 2.8; }
  .brand-by { display: none; }
  .segmented-control { display: none; }
  .sort-control select { width: 132px; }
}

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