:root {
  --bg: #f4f1e8;
  --ink: #1c332c;
  --muted: #66746b;
  --line: #e4e1d6;
  --card: #fbfaf6;
  --side: #1e3a32;
  --shadow: 0 10px 30px rgba(24, 47, 37, 0.06);
  --sans: "DM Sans", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.03em; font-size: 20px; text-decoration: none; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 28px 0 18px; }
h1 { margin: 6px 0 0; font-size: 40px; letter-spacing: -0.045em; }
.kicker { margin: 0; color: var(--muted); }
.tools { display: flex; gap: 10px; }
input, select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
}
#q { min-width: 240px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 190px;
}
.tag { font-size: 12px; color: var(--muted); }
.card h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.card p { margin: 0; color: var(--muted); flex: 1; }
.url { font-size: 12px; word-break: break-all; }
.actions { display: flex; gap: 8px; margin-top: 8px; }
.primary, .ghost {
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  border: 0;
}
.primary { background: var(--side); color: #f4f1e8; }
.ghost { background: transparent; border: 1px solid var(--line); }
.primary[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
dialog {
  width: min(440px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(28, 51, 44, 0.35); }
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.editor-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.dialog-fields { display: grid; gap: 10px; }
.dialog-fields label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.dialog-fields input, .dialog-fields select { width: 100%; background: #fff; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.empty { color: var(--muted); padding: 20px 0; }
.bone {
  border-radius: 8px;
  background: linear-gradient(90deg, #ece8dc 25%, #f7f5ee 37%, #ece8dc 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
}
.skeleton .tag { width: 52px; height: 12px; }
.skeleton .title { width: 58%; height: 22px; margin-top: 6px; }
.skeleton .line { width: 100%; height: 12px; }
.skeleton .line.short { width: 72%; }
.skeleton .url { width: 80%; height: 12px; margin-top: 8px; }
.skeleton .action { width: 72px; height: 32px; border-radius: 999px; margin-top: 12px; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bone { animation: none; }
}
@media (max-width: 800px) {
  .top, .tools { display: grid; }
  h1 { font-size: 32px; }
}
