:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --text: #20231f;
  --muted: #70776b;
  --line: #e4e7df;
  --accent: #2f7d66;
  --accent-weak: #e7f2ee;
  --danger: #bd3b3b;
  --shadow: 0 12px 30px rgba(34, 39, 32, 0.08);
  --radius: 8px;
  --container: 1280px;
  --side-width: 240px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151715;
  --surface: #20241f;
  --text: #eef2ea;
  --muted: #aab4a5;
  --line: #323a32;
  --accent: #8bc5a9;
  --accent-weak: #26372f;
  --danger: #ef8a8a;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button[hidden] {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 16px;
}

.topbar,
.top-actions,
.brand,
.search-panel,
.list-meta,
.category-header,
.category-main,
.category-tools,
.site-card,
.modal-header,
.form-actions,
.checkbox-row,
.widget-head,
.widget-actions,
.todo-row,
.calc-grid,
.footer-links {
  display: flex;
  align-items: center;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) auto;
  gap: 14px;
  margin-bottom: 14px;
}

.brand {
  min-width: 150px;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
}

.top-actions {
  justify-content: flex-end;
  gap: 7px;
}

#launchpadButton {
  width: 82px;
  white-space: nowrap;
}

.icon-button,
.text-button,
.primary-button,
.search-button,
select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.icon-button {
  display: grid;
  width: 34px;
  place-items: center;
}

.text-button,
.primary-button,
.search-button {
  padding: 0 12px;
}

.primary-button,
.search-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.danger {
  color: var(--danger);
}

.search-panel {
  justify-self: center;
  width: min(100%, 520px);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(34, 39, 32, 0.06);
}

#searchInput {
  min-width: 0;
  flex: 1;
  height: 34px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0 8px;
}

#engineSelect {
  width: 86px;
  padding: 0 6px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.workspace[hidden],
.list-meta[hidden],
.site-footer[hidden] {
  display: none;
}

.workspace.has-left-widgets {
  grid-template-columns: minmax(0, var(--side-width)) minmax(0, 1fr);
}

.workspace.has-right-widgets {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--side-width));
}

.workspace.has-left-widgets.has-right-widgets {
  grid-template-columns: minmax(0, var(--side-width)) minmax(0, 1fr) minmax(0, var(--side-width));
}

body:not(.is-managing) .workspace:not(.has-left-widgets) #zoneLeft,
body:not(.is-managing) .workspace:not(.has-right-widgets) #zoneRight {
  display: none;
}

.is-managing .workspace:not(.has-left-widgets) #zoneLeft,
.is-managing .workspace:not(.has-right-widgets) #zoneRight {
  display: none;
}

body:not(.is-managing) .workspace.has-right-widgets:not(.has-left-widgets) #zoneRight {
  grid-column: 2;
}

.center-zone {
  min-width: 0;
}

.widget-zone {
  display: grid;
  gap: 12px;
  min-height: 12px;
}

.zone-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.zone-toolbar[hidden] {
  display: none;
}

.strip-zone {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.strip-zone:empty {
  display: none;
}

.is-managing .strip-zone:empty {
  display: grid;
}

.list-meta {
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  color: var(--muted);
  font-size: 13px;
}

.category-list {
  display: grid;
  gap: 14px;
}

.category-card,
.widget-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.category-header {
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 0;
}

.category-main {
  gap: 8px;
  min-width: 0;
}

.category-title {
  min-width: 0;
  margin: 0;
  font-size: 16px;
}

.category-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.category-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.site-card {
  position: relative;
  gap: 10px;
  min-width: 0;
  min-height: 68px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.site-card:hover,
.widget-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.site-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-weak);
}

.select-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.category-card[data-size="compact"] .site-card {
  min-height: 52px;
  padding: 8px;
}

.category-card[data-size="compact"] .site-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.category-card[data-size="compact"] .site-card p {
  display: none;
}

.category-card[data-size="large"] .site-card {
  min-height: 96px;
  padding: 16px;
}

.category-card[data-size="large"] .site-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.site-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--accent-weak);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.site-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.site-text {
  min-width: 0;
}

.site-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-card p,
.empty-state span,
.widget-muted,
.site-footer {
  color: var(--muted);
}

.launchpad-view[hidden] {
  display: none;
}

.launchpad-view {
  min-height: calc(100vh - 88px);
  padding: 30px 0 8px;
  animation: launchFade 260ms ease both;
}

.is-launchpad .page-shell {
  width: min(100%, var(--container));
  min-height: 100vh;
}

.is-launchpad {
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 32rem),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.28), transparent 28rem),
    var(--bg);
}

.is-launchpad #settingsButton,
.is-launchpad #privateButton,
.is-launchpad #addCategoryButton,
.is-launchpad .site-footer {
  display: none;
}

.is-launchpad #launchpadButton {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.launchpad-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.launch-filter {
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  color: var(--text);
  padding: 0 14px;
  backdrop-filter: blur(18px);
}

.launch-filter.is-active {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 700;
}

.launchpad-grid {
  --launch-icon: 64px;
  --launch-gap: 28px;
  display: grid;
  grid-template-columns: repeat(var(--launch-columns, 7), minmax(0, 1fr));
  grid-auto-rows: calc(var(--launch-icon) + 44px);
  gap: var(--launch-gap) 22px;
  max-height: calc((var(--launch-icon) + 44px) * var(--launch-rows, 4) + var(--launch-gap) * (var(--launch-rows, 4) - 1));
  overflow: auto;
  padding: 10px 12px 32px;
  align-content: start;
}

.launchpad-grid[data-size="small"] {
  --launch-icon: 54px;
  --launch-gap: 22px;
}

.launchpad-grid[data-size="large"] {
  --launch-icon: 78px;
  --launch-gap: 34px;
}

.launch-item {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  min-width: 0;
  color: var(--text);
  text-align: center;
  animation: launchItem 360ms ease both;
  animation-delay: var(--launch-delay, 0ms);
  transition: transform 180ms ease;
}

.launch-item:hover {
  transform: scale(1.08);
}

.launch-item .site-icon {
  width: var(--launch-icon);
  height: var(--launch-icon);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
}

.launch-item .site-icon img {
  width: calc(var(--launch-icon) * 0.72);
  height: calc(var(--launch-icon) * 0.72);
  object-fit: contain;
}

.launch-item span:last-child {
  display: block;
  max-width: 96px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 16px color-mix(in srgb, var(--surface) 72%, transparent);
}

@keyframes launchFade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes launchItem {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.site-card p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.widget-card {
  min-width: 0;
  padding: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.widget-card[draggable="true"] {
  cursor: grab;
}

.widget-card.is-disabled {
  opacity: 0.58;
}

.widget-card.is-disabled .widget-body {
  display: none;
}

.zone-add {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--muted);
  font-size: 13px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.zone-add:hover {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent);
}

.widget-head {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.widget-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-actions {
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.widget-time {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.widget-date,
.calendar-grid,
.quick-list,
.todo-list {
  font-size: 13px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-grid span {
  padding: 4px 0;
  border-radius: 6px;
}

.calendar-grid .today {
  background: var(--accent);
  color: #fff;
}

.todo-form,
.quick-form {
  display: flex;
  gap: 6px;
}

.todo-form input,
.quick-form input,
.memo-area,
.calc-display {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.todo-form input,
.quick-form input,
.calc-display {
  min-height: 34px;
  padding: 0 9px;
}

.todo-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.todo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.todo-row span {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.45;
  white-space: normal;
}

.todo-row.is-done span {
  color: var(--muted);
  text-decoration: line-through;
}

.memo-area {
  min-height: 96px;
  resize: vertical;
  padding: 9px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.calc-grid button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.quick-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.quick-list a {
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-managing .category-card,
.is-managing .site-card,
.is-managing .widget-card {
  outline: 1px dashed transparent;
}

.is-managing .category-card:hover,
.is-managing .site-card:hover,
.is-managing .widget-card:hover {
  outline-color: var(--accent);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.hover-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.is-managing .site-card:hover .hover-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mini-button,
.mini-select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}

.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-button.danger,
.text-button.danger {
  color: #c24141;
}

.mini-button.add-button {
  min-width: 32px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 800;
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
}

.site-card .drag-handle {
  border-color: transparent;
  background: transparent;
  padding: 0;
}

.selection-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.selection-toolbar span {
  flex: 1 1 180px;
  color: var(--muted);
  font-size: 13px;
}

.today-line {
  font-size: 17px;
  font-weight: 800;
}

.history-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  display: grid;
  gap: 6px;
  padding: 22px 0 8px;
  font-size: 13px;
  text-align: center;
}

.footer-links {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.modal-panel {
  position: relative;
  width: min(100%, 760px);
  max-height: min(860px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.compact-panel {
  width: min(100%, 520px);
}

.login-panel {
  width: min(100%, 420px);
}

.admin-panel {
  width: min(100%, 920px);
  height: min(680px, 92vh);
  overflow: hidden;
}

.modal-header,
.site-form {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.modal-header {
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2,
.settings-section h3 {
  margin: 0;
  font-size: 18px;
}

.widget-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.widget-pick-button {
  display: grid;
  gap: 4px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.widget-pick-button:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.widget-pick-button span {
  color: var(--muted);
  font-size: 12px;
}

.settings-section h3 {
  font-size: 15px;
}

.site-form,
.settings-section {
  display: grid;
  gap: 12px;
}

.site-editor-layout {
  display: grid;
  gap: 12px;
  align-items: start;
}

.site-main-fields {
  display: grid;
  gap: 12px;
}

.site-side-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.site-side-options .text-button {
  min-height: 30px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 180px;
  min-height: 30px;
  padding: 0;
  border-top: 0;
}

.switch-row span {
  display: grid;
  gap: 3px;
}

.switch-row strong {
  color: var(--text);
  font-size: 13px;
}

.switch-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.switch-row input {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  max-width: 16px;
  flex: 0 0 16px;
  padding: 0;
  accent-color: var(--accent);
}

.site-form .switch-row input[type="checkbox"],
.site-form .compact-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  min-height: 16px;
  padding: 0;
}

.compact-check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}

.compact-check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--accent);
}

.admin-inline-form {
  border-bottom: 0;
  padding: 0;
}

.admin-panel-body {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  height: calc(100% - 57px);
  min-height: 0;
}

.admin-sidebar {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.admin-tab {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
}

.admin-tab:hover,
.admin-tab.is-active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.admin-content {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.admin-section {
  display: none;
  gap: 12px;
}

.admin-section.is-active {
  display: grid;
}

.admin-stat-grid,
.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-stat,
.admin-action {
  display: grid;
  gap: 5px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.admin-stat strong,
.admin-action strong {
  font-size: 15px;
}

.admin-stat span,
.admin-action span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-action:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.login-form {
  border-bottom: 0;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.form-error {
  margin: 0;
  color: #d14545;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.palette-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
}

.palette-button span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--swatch);
}

.site-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.site-form input,
.site-form textarea,
.site-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 0 10px;
}

.site-form textarea {
  padding: 9px 10px;
  resize: vertical;
}

.site-form input[type="color"] {
  height: 40px;
  padding: 4px;
}

.checkbox-row {
  display: flex;
  width: max-content;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.form-actions,
.card-actions {
  justify-content: flex-end;
  gap: 8px;
}

.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;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-zone,
  .strip-zone {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #zoneLeft {
    order: 1;
  }

  .center-zone {
    order: 2;
  }

  #zoneRight {
    order: 3;
  }

  .site-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 12px;
  }

  .brand {
    min-width: 0;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  #engineSelect,
  .search-button {
    width: 100%;
  }

  .site-grid,
  .form-grid,
  .color-grid,
  .site-editor-layout,
  .admin-panel-body,
  .admin-stat-grid,
  .admin-action-grid,
  .side-zone,
  .strip-zone,
  .launchpad-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .launchpad-grid {
    --launch-icon: 62px;
  }

  .category-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-tools,
  .card-actions {
    justify-content: flex-start;
  }

  .hover-actions {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}
