html { color-scheme: light dark; }
.lovable {
  --page: hsl(45 40% 98%);
  --surface: #fff;
  --control: #f5f4f1;
  --ink: oklch(10% 0 0);
  --secondary-text: oklch(30% .001 107);
  --muted: oklch(50% .001 107);
  --line: #d7d5d1;
  --violet: #8038e8;
  --accent-text: #7130ce;
  background: var(--page);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  accent-color: var(--violet);
  caret-color: var(--accent-text);
}
.lovable ::selection { background: var(--violet); color: #fff; }
.lovable :is(button,a,input,select,[tabindex]):focus-visible { outline-color: var(--violet); outline-offset: 3px; }
.site-header { border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1120px; min-height: 64px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 21px; font-weight: 600; letter-spacing: -.6px; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
main, .lovable > .site-footer { width: min(1252px, calc(100% - 64px)); margin-inline: auto; }
.intro { padding: 48px 0 32px; text-align: center; }
.intro h1 { font-size: 30px; font-weight: 500; line-height: 1.5; letter-spacing: -.6px; margin: 0; }
.collection { scroll-margin-top: 24px; }
.collection-tools { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin-bottom: 24px; }
.collection-count { color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.category-filter { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.category-filter select { min-height: 46px; max-width: 240px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.search { display: flex; align-items: center; gap: 8px; justify-self: end; width: 216px; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); color: var(--muted); }
.search svg { flex-shrink: 0; }
.search:focus-within { outline: 2px solid var(--violet); outline-offset: 2px; }
.search input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search input:focus-visible { outline: none; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
.app-card { min-width: 0; position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.card-preview { width: 100%; height: auto; aspect-ratio: 1.35; object-fit: cover; object-position: top; border-radius: 15px 15px 0 0; background: var(--control); }
.app-card h3 { font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.3px; margin: 12px 20px 4px; }
.app-card h3 a { display: flex; align-items: center; width: 100%; min-height: 44px; text-decoration: none; }
/* A normal link makes the whole card clickable and supports copying/opening tabs. */
.app-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.app-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lovable .app-card h3 a:focus-visible { outline: none; }
.app-card h3 a:focus-visible::after { outline: 3px solid var(--violet); outline-offset: 3px; }
.card-description { margin: 0 20px 24px; color: var(--secondary-text); font-size: 14px; line-height: 1.6; }
.empty-state { padding: 64px 16px; text-align: center; }
.empty-state h3 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }
.empty-state button { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 16px; background: var(--surface); }
.empty-state button:hover { border-color: var(--violet); }
.show-more { display: block; min-height: 46px; margin: 32px auto 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 20px; background: var(--surface); color: var(--ink); }
.show-more:hover { border-color: var(--violet); }
.show-more[hidden] { display: none; }
.directory-list { columns: 3 240px; padding-left: 24px; }
.directory-list li { break-inside: avoid; margin-bottom: 10px; }
.lovable > .site-footer { display: block; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; margin-top: 48px; padding: 24px 0 32px; scroll-margin-top: 24px; }
.site-footer p { margin: 0; }
@media (prefers-color-scheme: dark) {
  .lovable {
    --page: hsl(0 0% 11%);
    --surface: oklch(27.2% .002 107);
    --control: oklch(24.74% .002 107);
    --ink: oklch(100% 0 0);
    --secondary-text: oklch(90.95% .002 107);
    --muted: oklch(72.34% .002 107);
    --line: #373737;
    --violet: #9147ff;
    --accent-text: #bd99ff;
  }
}
@media (max-width: 1200px) {
  .nav-inner { margin-inline: 32px; }
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 940px) {
  .collection-tools { grid-template-columns: 1fr 1fr; gap: 16px; }
  .category-filter { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  main, .lovable > .site-footer { width: calc(100% - 32px); }
  .nav-inner { margin-inline: 16px; gap: 16px; }
  .brand { font-size: 18px; letter-spacing: -.4px; }
  .site-header nav a { max-width: 12ch; text-align: right; line-height: 1.3; }
  .intro { padding: 32px 0 24px; }
  .intro h1 { font-size: 30px; line-height: 1.3; }
  .collection-tools { gap: 16px 8px; }
  .category-filter { max-width: 100%; width: 100%; justify-content: space-between; }
  .category-filter select { min-width: 0; max-width: 220px; }
  .search { width: 100%; }
  .app-grid { grid-template-columns: 1fr; }
}
