/* Favorites page — shares the static-page system with a green theme. */
:root {
  --accent: #16a34a;
  --accent-dark: #15803d;
  --accent-soft: #eaf5ee;
  --green-soft: #eaf5ee;
}

html[data-theme="dark"] {
  --accent: #5ee08c;
  --accent-dark: #86efac;
  --accent-soft: #183724;
  --green-soft: #183724;
}

.brand-mark { color: var(--green); }
.sidebar-list a.active { background: var(--green-soft); }
.theme-toggle:hover { border-color: var(--border-strong); }

.favorites-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 26px 0 28px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--green-soft);
}
.favorites-hero-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
}
.favorites-hero-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.favorites-hero h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}
.favorites-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Summary / clear panel */
.library-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.library-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green);
}
.library-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.library-copy {
  flex: 1;
  min-width: 0;
}
.library-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.library-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}
.danger-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--red-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.danger-button:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
@media (max-width: 520px) {
  .library-panel { flex-wrap: wrap; }
  .danger-button { width: 100%; }
}

/* Bookmark list */
.bookmark-list {
  display: grid;
  gap: 10px;
}
.bookmark-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.bookmark-open {
  flex: 1;
  min-width: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bookmark-open:focus-visible { border-radius: var(--radius-sm); }
.bookmark-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.bookmark-card:active { transform: scale(0.99); }
.bookmark-copy {
  flex: 1;
  min-width: 0;
}
.bookmark-title {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bookmark-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--hover);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  max-width: 100%;
}
.meta-item svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.delete-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  color: var(--red);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.delete-btn:hover { background: var(--red); color: #fff; }
.delete-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Empty state */
.empty-state {
  padding: 42px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-align: center;
}
.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green);
}
.empty-icon svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.empty-state p {
  max-width: 380px;
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.empty-state .button { border-color: var(--green); color: var(--green); }
.empty-state .button:hover { background: var(--green-soft); }
