/* Shimeji — pastel, anime-friendly, accessible (light & dark) */
:root {
  --bg: #fdf7ff;
  --bg-2: #ffffff;
  --text: #1f2937;
  --muted: #475569;
  --link: #be185d;
  --brand: #ff9adf;
  --brand-2: #92efff;
  --card: #ffffff;
  --ring: #e5e7eb;
  --shadow: 0 8px 24px rgba(31,41,55,.08);

  --badge-border-light: rgba(0,0,0,.22);
  --badge-border-dark: rgba(255,255,255,.28);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f13;
    --bg-2: #14161b;
    --text: #e9eef5;
    --muted: #b6c2d2;
    --link: #f472b6;
    --brand: #f78ac6;
    --brand-2: #5dd8ff;
    --card: #12141a;
    --ring: #2a2f38;
    --shadow: 0 8px 24px rgba(0,0,0,.40);
  }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1100px, 100%); margin-inline: auto; padding: 16px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.75));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ring);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: linear-gradient(180deg, rgba(14,15,19,.95), rgba(14,15,19,.8)); }
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.logo { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.05); }
.brand-text { font-weight: 800; letter-spacing: .3px; font-size: 18px; }
.nav { display: flex; gap: 14px; align-items: center; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--ring);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}
.btn:hover { border-color: #cbd5e1; text-decoration: none; }
.btn-cta {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #0b1020; font-weight: 700; border: none;
}
.btn-lg { padding: 12px 18px; font-size: 16px; border-radius: 14px; }
.btn-share { background: #fff; color: #0b1020; border: 1px solid var(--ring); font-weight: 700; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 32px 0 8px;
  background:
    radial-gradient(1200px 600px at 20% -200px, rgba(255,154,223,.22), transparent),
    radial-gradient(900px 500px at 80% -200px, rgba(146,239,255,.22), transparent);
}
.hero h1 { font-size: clamp(28px, 3.6vw, 48px); margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 12px; }
.lead-aux { color: var(--muted); margin: 0 0 12px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.meta { color: var(--muted); }
.share-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.share-link { font-size: 13px; border: 1px dashed var(--ring); padding: 6px 8px; border-radius: 10px; }

/* Hero layout with screenshot */
.hero-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; }
.hero-copy h1 { margin: 0; }
.hero-shot { justify-self: center; }
@media (min-width: 900px) {
  .hero-wrap { grid-template-columns: 1.35fr .65fr; }
  .hero-shot { justify-self: end; }
}

/* ---------------- Search ---------------- */
.search-wrap { margin: 18px 0; position: relative; }
.search {
  flex: 1; width: 100%;
  padding: 12px 60px 12px 14px; /* space for count + clear */
  border-radius: 12px; border: 1px solid var(--ring);
  background: var(--bg-2); color: var(--text); outline: none;
}
.search::-webkit-search-cancel-button { -webkit-appearance: none; }
.search:focus { border-color: #cbd5e1; box-shadow: 0 0 0 3px rgba(203,213,225,.5); }

.search-count {
  position: absolute; right: 52px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--muted);
  pointer-events: none;
}
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; line-height: 30px; text-align: center;
  border-radius: 8px; border: 1px solid var(--ring);
  background: var(--card); color: var(--muted); font-size: 22px;
  cursor: pointer; display: none;
}
.search-clear:hover { color: var(--text); }

/* underline highlight */
.hl { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- Category Grid (Homepage) ---------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* min 2 columns */
  gap: 14px;
}
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } } /* cap at 4 cols */

.cat-card {
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  cursor: pointer;
}
.cat-card:hover { transform: translateY(-2px); border-color: #cbd5e1; }

.cat-link { text-decoration: none; color: inherit; display: block; }
.cat-title { display: flex; align-items: center; gap: 10px; }

.cat-count {
  display: inline-block;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #0b1020;
  border: 0;
  box-shadow: var(--shadow);
}
.cat-name { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: .2px; }

/* Search results shown under each category card when typing */
.cat-results {
  list-style: none;
  padding: 8px 0 0;
  margin: 8px 0 0;
  border-top: 1px dashed var(--ring);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.cat-results a { color: var(--link); text-decoration: none; }
.cat-results a:hover { text-decoration: underline; }
.cat-results .view-more { margin-top: 2px; font-size: 13px; }
.cat-results .view-more a { font-weight: 700; text-decoration: underline; }

/* Empty state */
.no-results {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px dashed var(--ring);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--muted);
}

/* ---------------- Generic Grid cards (category page items) ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--ring);
  border-radius: 16px; overflow: hidden; text-decoration: none;
  transition: transform .12s ease, border-color .12s ease; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-2px); border-color: #cbd5e1; }
.thumb { aspect-ratio: 1/1; display: block; background: #fafafa; }
@media (prefers-color-scheme: dark) { .thumb { background: #0e0f13; } }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .meta { padding: 8px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.name { margin: 0; font-size: 14px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge {
  display: inline-block; padding: 2px 6px; font-size: 11px; border-radius: 999px;
  border: 1px solid var(--badge-border-light); color: #7c3aed; background: rgba(124,58,237,.08);
}
@media (prefers-color-scheme: dark) { .badge { border-color: var(--badge-border-dark); } }
.badge.super { color: #0369a1; background: rgba(3,105,161,.12); }
.badge.premium { color: #92400e; background: rgba(234,179,8,.14); }

/* ---------------- Mascot detail ---------------- */
.page h1 { font-size: clamp(24px, 3.2vw, 36px); margin: 12px 0; }
.crumbs { color: var(--muted); font-size: 14px; margin-top: 4px; }
.detail { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 820px) { .detail { grid-template-columns: 1fr 1fr; align-items: start; } }
.big-thumb {
  position: relative; background: var(--card); border: 1px solid var(--ring);
  border-radius: 18px; padding: 16px; display: flex; align-items: center; justify-content: center;
}
.big-thumb img { width: 160px; height: 160px; object-fit: contain; }
.badges-on-image {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; gap: 6px; justify-content: flex-end;
}
.badges-on-image .badge {
  backdrop-filter: blur(6px);
  border: 1px solid var(--badge-border-light);
}
@media (prefers-color-scheme: dark) { .badges-on-image .badge { border-color: var(--badge-border-dark); } }

.info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 16px; }
.info dt { color: var(--muted); }
.hint { color: var(--muted); }
.related-grid .card { background: transparent; }

.cta-flex { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------- Request page ---------------- */
.request-wrap .lead { color: var(--muted); }
.req-form { display: grid; gap: 12px; max-width: 520px; }
.req-label { display: grid; gap: 6px; font-weight: 700; }
.req-input {
  padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--ring);
  background: var(--bg-2); color: var(--text); outline: none;
}
.req-input:focus { border-color: #cbd5e1; box-shadow: 0 0 0 3px rgba(203,213,225,.5); }
.small { font-size: 12px; }

/* Honeypot container (fully hidden) */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------------- Consent banner (moved from inline) ---------------- */
.consent-banner{
  position:fixed; left:12px; right:12px; bottom:12px; z-index:50;
  padding:10px; border-radius:12px; background:#fff; color:#111;
  border:1px solid #e5e7eb; box-shadow:0 10px 30px rgba(0,0,0,.15);
  display:none;
}
.consent-banner.is-open{ display:block; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--ring); margin-top: 28px; }
.site-footer p { color: var(--muted); font-size: 13px; }

/* Install ribbon (mobile) */
.install-ribbon{
  position:fixed; left:12px; right:12px; bottom:-200px; z-index:20;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:linear-gradient(90deg,var(--brand),var(--brand-2)); color:#0b1020;
  border-radius:16px; box-shadow:0 10px 30px rgba(0,0,0,.15);
  padding:10px;
  opacity:0; pointer-events:none;
  transition:bottom .2s ease, opacity .2s ease;
}
@media (min-width:821px){ .install-ribbon{ display:none; } }
.install-ribbon .ribbon-cta{ display:inline-block; font-weight:800; background:#fff; border-radius:12px; padding:10px 14px; }
.install-ribbon .ribbon-close{ appearance:none; border:0; background:transparent; font-size:20px; line-height:1; cursor:pointer; color:#0b1020; }
.install-ribbon.show{ bottom:12px; opacity:1; pointer-events:auto; }

/* ---------------- Mini toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: var(--card); color: var(--text); border: 1px solid var(--ring);
  padding: 8px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* keep hero screenshot at ~200px wide */
.hero-shot img { width: 200px; height: auto; }

