:root {
  --canvas: #f5f5f5;
  --ink: #171717;
  --muted: #737373;
  --line: #e5e5e5;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  overflow: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; display: block; }

.icon { width: 1em; height: 1em; display: block; }
.icon-spin { animation: spin 0.8s linear infinite; }
.ico { display: inline-flex; width: 1em; height: 1em; }
.ico .icon { width: 100%; height: 100%; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  50% { transform: translateY(-7px); }
}

.app {
  position: relative;
  height: 100%;
  overflow: hidden;
  background-color: var(--canvas);
  background-image: radial-gradient(#d1d1d1 1px, transparent 0);
  background-size: 24px 24px;
}

.header {
  position: absolute;
  z-index: 30;
  inset: 0 0 auto 0;
  padding: 16px 16px 8px;
  pointer-events: none;
}
.header-mask {
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background: linear-gradient(#f5f5f5, rgba(245, 245, 245, 0.9), transparent);
  pointer-events: none;
}
.header-row, .filters, .view-toggle, .avatar, .menu { pointer-events: auto; }
.header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.header h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.header-actions { display: flex; align-items: center; gap: 10px; }

.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 229, 229, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.view-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #737373;
}
.view-toggle button .ico { font-size: 15px; }
.view-toggle button.is-active { background: #171717; color: #fff; }

.avatar-wrap { position: relative; }
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(229, 229, 229, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.avatar img:not([hidden]) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  grid-area: 1 / 1;
}
#avatar-mark { grid-area: 1 / 1; }
.menu-name:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.menu-name img:not([hidden]) {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}
.menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  padding: 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f5f5f5;
  box-shadow: var(--shadow);
}
.menu button:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #525252;
  text-align: left;
}
.menu button:hover { background: #f5f5f5; color: #000; }
.menu .ico { font-size: 16px; }

.filters { position: relative; display: flex; justify-content: center; gap: 8px; }
.filters button {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(229, 229, 229, 0.7);
  color: #525252;
}
.filters button.is-active { background: #000; color: #fff; }

.stage { position: absolute; inset: 0; }
.stage-scroll { overflow: auto; padding: 128px 16px 140px; }

.canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background-image: radial-gradient(#d1d1d1 1px, transparent 0);
  background-size: 24px 24px;
  background-color: var(--canvas);
}
.canvas.is-grabbing { cursor: grabbing; }
.canvas-surface {
  position: absolute;
  inset: 0;
  min-width: 1200px;
  min-height: 850px;
}
.canvas-hint {
  position: absolute;
  top: 88px;
  right: 24px;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(229, 229, 229, 0.7);
  color: #a3a3a3;
  font-size: 10px;
  font-weight: 500;
  pointer-events: none;
}
.node { position: absolute; transform: translate(-50%, -50%); }

.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 170px;
  text-align: center;
}
.folder-art { position: relative; width: 150px; height: 100px; transition: transform 0.3s ease; }
.folder:hover .folder-art { transform: translateY(-4px) scale(1.04); }
.tab {
  position: absolute;
  top: -8px;
  height: 24px;
  border-radius: 12px 12px 0 0;
}
.tab-l { left: 12px; width: 45%; transform: rotate(-4deg); transform-origin: bottom left; }
.tab-r { right: 12px; width: 40%; transform: rotate(4deg); transform-origin: bottom right; }
.folder-face {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.glow {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.7;
}
.squircle {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #f5f5f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 26px;
}
.folder-label { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.folder-title { font-size: 13px; font-weight: 600; }
.count {
  font-size: 11px;
  color: #737373;
  background: rgba(245, 245, 245, 0.9);
  border-radius: 999px;
  padding: 2px 6px;
}
.folder-meta { font-size: 11px; color: #a3a3a3; }

.grid {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  justify-items: center;
}

.feed { width: min(760px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.feed-label { display: flex; align-items: center; gap: 14px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: #a3a3a3; }
.feed-label span:last-child { flex: 1; height: 1px; background: rgba(229, 229, 229, 0.8); }
.feed-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #fafafa;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  text-align: left;
  animation: rise 0.45s ease both;
}
.feed-row:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.feed-time { display: flex; justify-content: space-between; font-size: 12px; color: #a3a3a3; }
.feed-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.feed-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fafafa;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}
.feed-copy { min-width: 0; }
.feed-copy strong, .feed-copy span { display: block; }
.feed-copy strong { font-size: 14px; }
.feed-copy span { font-size: 12px; color: #737373; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fafafa;
  border: 1px solid #f5f5f5;
  color: #525252;
}

.command {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
}
.command-dim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}
.command-bar,
.popover { z-index: 1; }
.command-bar { position: relative; }
.popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 12px);
  max-height: 65vh;
  overflow: auto;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f5f5f5;
  box-shadow: var(--shadow);
}
.popover h3 {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a3a3a3;
}
.result, .link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  text-align: left;
  text-decoration: none;
  color: inherit;
}
.result:hover, .link-row:hover { background: #fafafa; }
.result-ico, .ai-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: none;
}
.result-copy { flex: 1; min-width: 0; }
.result-copy strong, .result-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy strong { font-size: 14px; }
.result-copy span { font-size: 12px; color: #737373; }
.result-go { color: #d4d4d4; font-size: 16px; }
.command-bar {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 8px 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #f5f5f5;
  box-shadow: var(--shadow);
}
.command-bar:focus-within { border-color: #d4d4d4; }
.command-search { color: #a3a3a3; font-size: 16px; }
.command-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 10px;
  font-size: 14px;
}
.create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #141414;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.create:hover { background: #000; }
.create-spark { color: #7dd3fc; font-size: 16px; }
.ai-card {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.7);
  border: 1px solid #dbeafe;
}
.ai-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #1e3a8a; font-size: 12px; font-weight: 700; }
.ai-card p { margin: 0; font-size: 14px; line-height: 1.5; color: #404040; }
.ai-wait { display: flex; align-items: center; gap: 10px; color: #737373; font-size: 14px; }
.ai-wait .ico { font-size: 16px; color: #3b82f6; }
.ai-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.link-row {
  background: #fff;
  border: 1px solid #e5e5e5;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}
.fade-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(transparent, #f5f5f5);
  pointer-events: none;
  z-index: 10;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  animation: rise 0.35s ease;
}
.overlay-mask {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#d1d1d1 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.5;
  pointer-events: none;
}
.overlay-head, .overlay-body { position: relative; z-index: 1; }
.overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 8px;
}
.crumb { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb h2 { margin: 0; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb h2 b { font-weight: 700; }
.crumb h2 em { font-style: normal; color: #a3a3a3; margin: 0 6px; }
.back {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #f5f5f5;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex: none;
  font-size: 18px;
}
.head-actions { display: flex; gap: 8px; flex: none; }
.btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(229, 229, 229, 0.7);
  color: #404040;
}
.btn-dark { background: #141414; color: #fff; }
.btn-light { background: #fff; border: 1px solid #e5e5e5; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn-tiny { background: #f5f5f5; color: #525252; }

.overlay-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 8px 16px 20px;
  overflow: auto;
}
.side { display: flex; flex-direction: column; gap: 18px; }
.side h3, .panel-block h3 {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a3a3a3;
}
.doc {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  text-align: left;
}
.doc.is-active { border-color: #171717; }
.doc-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: none;
}
.doc strong, .doc span { display: block; }
.doc strong { font-size: 14px; }
.doc span { font-size: 11px; color: #a3a3a3; }
.panel {
  flex: 1;
  min-height: 420px;
  background: #fff;
  border-radius: 28px;
  border: 1px solid #f5f5f5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-head, .panel-body { padding: 20px 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.panel-tools { display: flex; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 28px 12px; border: 1px solid #f5f5f5; border-radius: 20px; }
.swatch {
  width: 72px;
  height: 120px;
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  color: #fff;
  font: 700 10px/1 ui-monospace, monospace;
}
.note {
  padding: 16px;
  border-radius: 16px;
  background: #fff8e6;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 14px;
}
.note-plain { background: #fff; border: 1px solid #f5f5f5; color: #404040; }
.note-plain ul { margin: 8px 0 0; padding-left: 18px; }

.masonry { columns: 1; gap: 16px; }
.pin { break-inside: avoid; margin-bottom: 16px; width: 100%; text-align: left; }
.pin-img { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.05); }
.pin-img img { width: 100%; height: 100%; object-fit: cover; }
.h-sm { height: 220px; }
.h-md { height: 250px; }
.h-lg { height: 320px; }
.pin-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.pin-badge.light { background: rgba(255, 255, 255, 0.92); color: #404040; }
.pin-badge.dark { background: rgba(0, 0, 0, 0.88); color: #fff; }
.pin h3 { margin: 8px 0 0; font-size: 13px; }
.pin p { margin: 2px 0 0; font-size: 11px; color: #a3a3a3; }
.inspire-search {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  width: min(420px, calc(100% - 32px));
}
.inspire-search label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #f5f5f5;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.inspire-search input { flex: 1; min-width: 0; border: 0; outline: none; }
.inspire-add {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: none;
}
.frame { position: relative; flex: 1; min-height: 420px; padding: 0; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 28px; }

.tabs { display: flex; gap: 8px; overflow: auto; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #737373;
  white-space: nowrap;
}
.tab-btn.is-active { background: #fff; color: #171717; border: 1px solid #171717; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }
.tab-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f5f5f5;
  font-size: 16px;
}
.tab-btn.is-active .tab-ico { background: #141414; color: #fff; }
.member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #fafafa;
}
.member:last-child { border-bottom: 0; }
.member-id { display: flex; align-items: center; gap: 12px; }
.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.member strong, .member span { display: block; }
.member span { font-size: 13px; color: #a3a3a3; }
.role { padding: 6px 10px; border-radius: 8px; background: #f5f5f5; font-size: 12px; font-weight: 600; color: #525252; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.chip.is-selected { outline: 2px solid #171717; outline-offset: 2px; }
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 8px 0;
}
.toggle strong, .toggle span { display: block; }
.toggle span { font-size: 12px; color: #737373; margin-top: 2px; }
.switch { width: 48px; height: 24px; border-radius: 999px; background: #e5e5e5; padding: 4px; flex: none; }
.switch i { display: block; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: transform 0.2s ease; }
.switch.is-on { background: #000; }
.switch.is-on i { transform: translateX(24px); }
.lead { margin: 0 0 8px; color: #737373; font-size: 14px; }

.empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; }
.empty-copy { text-align: center; max-width: 420px; margin: 24px 16px; }
.empty-copy h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.03em; }
.empty-copy p { margin: 0; color: #737373; font-size: 14px; }
.empty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: min(720px, 100%); padding: 0 16px 24px; }
.ghost .folder-title { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #a3a3a3; }

.c-pink { background: #fce7f3; }
.c-blue { background: #dbeafe; }
.c-neutral { background: #f5f5f5; }
.c-green { background: #dcfce7; }
.c-amber { background: #fef3c7; }
.c-emerald { background: #d1fae5; }
.c-teal { background: #ccfbf1; }
.c-violet { background: #ede9fe; }
.c-purple { background: #f3e8ff; }
.c-orange { background: #ffedd5; }
.c-indigo { background: #e0e7ff; }
.g-figma { background: linear-gradient(to top right, #f9a8d4, #6ee7b7); }
.g-indigo { background: #a5b4fc; }
.g-amber { background: #fde68a; }
.g-blue { background: #93c5fd; }
.g-warm { background: linear-gradient(to top right, #fecdd3, #fde68a); }
.g-teal { background: #99f6e4; }
.g-violet { background: #c4b5fd; }
.g-orange { background: #fdba74; }
.ink-pink { color: #ec4899; }
.ink-indigo { color: #4f46e5; }
.ink-dark { color: #171717; }
.ink-blue { color: #2563eb; }
.ink-teal { color: #0f766e; }
.ink-violet { color: #7c3aed; }
.ink-orange { color: #ea580c; }
.tone-blue { color: #3b82f6; }
.tone-green { color: #22c55e; }
.tone-orange { color: #f97316; }
.tone-purple { color: #a855f7; }
.tone-red { color: #ef4444; }
.tone-indigo { color: #6366f1; }
.avatar-green { background: #dcfce7; color: #15803d; }
.avatar-blue { background: #dbeafe; color: #1d4ed8; }
.avatar-gray { background: #e5e5e5; color: #404040; }
.bg-green { background: #f0fdf4; color: #16a34a; }
.bg-red { background: #fef2f2; color: #ef4444; }
.bg-gray { background: #f5f5f5; color: #737373; }
.bg-dark { background: #141414; color: #f9a8d4; }

@media (min-width: 640px) {
  .header { padding: 28px 32px 8px; }
  .header h1 { font-size: 1.7rem; }
  .feed-row { flex-direction: row; align-items: center; padding: 16px 20px; }
  .feed-time { width: 96px; display: block; }
  .feed-cat-mobile { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .masonry { columns: 2; }
}

@media (min-width: 800px) {
  .overlay-body { flex-direction: row; overflow: hidden; }
  .side { width: 320px; flex: none; overflow: auto; }
  .panel { min-height: 0; }
  .panel-body { overflow: auto; }
  .tabs { flex-direction: column; width: 280px; flex: none; overflow: auto; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .canvas-hint { display: flex; }
  .stage-scroll { padding-top: 150px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .masonry { columns: 3; }
  .empty-desktop { position: relative; }
  .empty-desktop .empty-copy {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -50%);
    margin: 0;
    pointer-events: none;
  }
  .empty-desktop .ghost { position: absolute; }
  .empty-desktop .t1 { top: 22%; left: 14%; transform: rotate(-4deg); }
  .empty-desktop .t2 { top: 12%; right: 16%; transform: rotate(6deg); }
  .empty-desktop .t3 { bottom: 18%; left: 20%; transform: rotate(3deg); }
  .empty-desktop .t4 { bottom: 14%; right: 14%; transform: rotate(-5deg); }
}

@media (min-width: 1280px) {
  .masonry { columns: 4; }
  .header { padding: 48px 48px 8px; }
  .header h1 { font-size: 1.875rem; }
}

.only-mobile { display: none; }

@media (max-width: 639px) {
  .feed-cat-desktop { display: none; }
  .only-desktop { display: none; }
  .only-mobile { display: inline; }
}

.reduce-motion .folder-art,
.reduce-motion .canvas .folder,
.reduce-motion .overlay,
.reduce-motion .feed-row,
.reduce-motion .icon-spin {
  animation: none !important;
}

.canvas .folder { animation: floaty 3.2s ease-in-out infinite; }
.canvas .folder:nth-child(2n) { animation-delay: 0.4s; }
.canvas .folder:nth-child(3n) { animation-delay: 0.9s; }

.hide-scroll { scrollbar-width: none; }
.hide-scroll::-webkit-scrollbar { display: none; }

.app.is-pending .header,
.app.is-pending .stage,
.app.is-pending #overlay,
.app.is-pending #command,
.app.is-pending .fade-bottom,
.app.is-locked .header,
.app.is-locked .stage,
.app.is-locked #overlay,
.app.is-locked #command,
.app.is-locked .fade-bottom {
  visibility: hidden;
}

.gate {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(420px, 100%);
  padding: 32px 28px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f5f5f5;
  box-shadow: var(--shadow);
  text-align: center;
  animation: rise 0.45s ease;
}
.gate-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.gate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.gate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: #141414;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.gate-button .ico { font-size: 16px; }
.gate-button:hover { background: #000; }
.gate-button:disabled { opacity: 0.55; cursor: default; }
.gate-error {
  margin-top: 14px !important;
  color: #b91c1c !important;
  font-weight: 600;
}
.gate-note { margin-top: 16px !important; font-size: 12px !important; }
.reduce-motion .gate-card { animation: none; }
