/* PlainUgly.com — whimsical but readable; half-size cards */
:root {
  --ink: #1c1520;
  --paper: #fff8f0;
  --card: #ffffff;
  --accent: #e85d4c;
  --accent-dark: #c44536;
  --mint: #3d9b8f;
  --gold: #e6a817;
  --muted: #5c5360;
  --line: #ead9c8;
  --shadow: 0 6px 18px rgba(40, 20, 30, 0.07);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 10% 0%, #ffe8d6 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, #e8f6f3 0%, transparent 40%),
    var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); }
a:hover { color: var(--accent-dark); }

.wrap { width: min(1180px, 94vw); margin: 0 auto; }

.site-header {
  padding: 1rem 0 0.4rem;
  border-bottom: 2px dashed var(--line);
  margin-bottom: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}
.logo-slot {
  min-height: 64px;
  max-width: min(900px, 94vw);
  border-radius: 14px;
  background: #0a0a0a;
  border: 2px solid #1a1a1a;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  padding: 0.35rem 0.55rem;
}
.logo-slot img {
  width: 100%;
  height: auto;
  max-height: 190px;
  object-fit: contain;
}
.logo-slot .logo-fallback {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  letter-spacing: -0.02em;
  text-align: left;
  color: var(--ink);
  line-height: 1.1;
  padding: 0.45rem 0.7rem;
}
.logo-slot .logo-fallback span { color: var(--accent); }
.brand-text { display: none; }
.brand.has-fallback .brand-text { display: block; }
.brand.has-fallback .logo-slot {
  background: linear-gradient(145deg, #fff, #ffe6da);
  border-color: var(--line);
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}
.wordmark span { color: var(--accent); }
.tagline {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero {
  display: grid;
  gap: 0.55rem;
  margin: 1.1rem 0 1rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  margin: 0;
  line-height: 1.2;
}
.hero p { margin: 0; color: var(--muted); max-width: 46rem; font-size: 0.98rem; }

.cat-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0 0.65rem;
  margin: 0 0 1.25rem;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px dashed var(--line);
}
.cat-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(40,20,30,0.04);
}
.cat-nav a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.category-section {
  margin: 0 0 1.75rem;
  scroll-margin-top: 3.2rem;
}
.category-heading {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.7rem;
  display: inline-block;
  background: linear-gradient(120deg, #ffe6da, #e8f6f3 60%, #fff3c4);
  border: 2px dashed var(--ink);
  border-radius: 999px;
  line-height: 1.25;
  transform: rotate(-0.6deg);
  box-shadow: var(--shadow);
}
.category-heading span {
  color: var(--accent);
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(40, 20, 30, 0.11);
}
.card-media {
  background: #f7f0e8;
  aspect-ratio: 1;
  max-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  width: 100%;
  box-sizing: border-box;
}
.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
  mix-blend-mode: multiply;
}
.card-body {
  padding: 0.55rem 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.card-title {
  font-size: 0.82rem;
  margin: 0;
  line-height: 1.25;
  font-family: var(--display);
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--accent-dark); }
.rating {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.stars { color: var(--gold); letter-spacing: 0.04em; font-size: 0.7rem; }
.blurb {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.2rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  border: none;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-dark); }

.site-footer {
  border-top: 2px dashed var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer p { margin: 0 0 0.55rem; max-width: 46rem; }
.site-footer .disclosure { color: var(--ink); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.7rem 0; }
.site-footer a { color: var(--mint); }

@media (max-width: 520px) {
  .logo-slot { max-width: 92vw; }
  .card-media {
    padding: 0.35rem;
    max-height: none;
    aspect-ratio: 1;
  }
  .card-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 0.6rem; }
  .cat-nav a { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
}
