/* CatLoversShare — warm editorial theme */
:root {
  --bg: #FBF6EF;
  --surface: #FFFDF9;
  --surface-2: #F4ECE1;
  --ink: #2B211C;
  --ink-2: #5E5049;
  --muted: #8A7B72;
  --line: #EADFD2;
  --accent: #C8553D;
  --accent-ink: #FFFFFF;
  --accent-soft: #F6E0D6;
  --focus: #2F6FB0;
  --blob: #F6DCCB;
  --blob-2: #E3EBDD;
  --paw: #E7C9B4;
  --tile-terra: #F6DCCB;
  --tile-sky: #DCE8F2;
  --tile-sage: #E1EAD9;
  --tile-mustard: #F7E7C2;
  --tile-night: #3A3F5C;
  --ig-band: #2B211C;
  --ig-band-ink: #FBF6EF;
  --shadow: 0 1px 2px rgba(60, 35, 20, .06), 0 8px 24px rgba(60, 35, 20, .07);
  --radius: 20px;
  --radius-s: 12px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1714; --surface: #251F1B; --surface-2: #2E2723; --ink: #F3EAE0; --ink-2: #D2C4B8; --muted: #A8998E;
    --line: #3A312C; --accent: #E5765C; --accent-ink: #1C1714; --accent-soft: #3D2A23; --focus: #8DB8E8;
    --blob: #3A2A22; --blob-2: #2D3328; --paw: #4A3A31;
    --tile-terra: #4A3127; --tile-sky: #273442; --tile-sage: #2E3829; --tile-mustard: #463A20; --tile-night: #262A40;
    --ig-band: #F3EAE0; --ig-band-ink: #1C1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1714; --surface: #251F1B; --surface-2: #2E2723; --ink: #F3EAE0; --ink-2: #D2C4B8; --muted: #A8998E;
  --line: #3A312C; --accent: #E5765C; --accent-ink: #1C1714; --accent-soft: #3D2A23; --focus: #8DB8E8;
  --blob: #3A2A22; --blob-2: #2D3328; --paw: #4A3A31;
  --tile-terra: #4A3127; --tile-sky: #273442; --tile-sage: #2E3829; --tile-mustard: #463A20; --tile-night: #262A40;
  --ig-band: #F3EAE0; --ig-band-ink: #1C1714;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 760px; }
.center { text-align: center; justify-content: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.kicker { font: 700 .8rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--ink-2); margin-top: 14px; max-width: 62ch; }
.note { font-size: .92rem; color: var(--muted); margin-top: 14px; }
.hint { font-size: .9rem; color: var(--muted); }

/* buttons & chips */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 13px 24px; font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease; min-height: 46px;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); filter: none; }
.btn-light { background: var(--ig-band-ink); color: var(--ig-band); }
.btn-small { padding: 9px 16px; font-size: .92rem; min-height: 38px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 500 .9rem/1 var(--sans); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--ink); }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 700 1.15rem/1 var(--serif); color: var(--ink); }
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.brand b { color: var(--accent); font-weight: 800; }
.nav { display: flex; gap: 2px; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) {
  .nav { order: 0; width: auto; margin: 0 0 0 18px; }
}
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px; font: 700 .85rem/1 var(--sans); padding: 10px 12px; border-radius: 999px; border: 1.5px solid var(--line); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 12px; height: 12px; }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); z-index: 30; }
.langs a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; }
.langs a:hover, .langs a[aria-current] { background: var(--surface-2); }
.ig-btn { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 999px; font: 700 .88rem/1 var(--sans); }
.ig-btn svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .ig-btn span { display: none; } .ig-btn { padding: 9px; } }

/* hero */
.hero { display: grid; gap: 24px; align-items: center; padding-top: 36px; padding-bottom: 20px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; padding-top: 64px; } }
.hero h1 { max-width: 14ch; }
.hero-art svg { width: 100%; max-width: 520px; margin: 0 auto; }
.ig-proof { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.ig-proof svg { width: 18px; height: 18px; }
.ig-proof b { color: var(--ink); }

/* sections */
.section { padding-top: 40px; padding-bottom: 20px; }
@media (min-width: 860px) { .section { padding-top: 64px; } }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head p { color: var(--ink-2); margin-top: 6px; }
.more { font-weight: 700; text-decoration: none; color: var(--accent); white-space: nowrap; }
.more:hover { text-decoration: underline; }
.page-head { padding-top: 28px; padding-bottom: 8px; }
@media (min-width: 860px) { .page-head { padding-top: 48px; } }

.crumbs ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .6; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--ink); }

/* cards */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); }
.card-art svg { width: 100%; height: auto; aspect-ratio: 200 / 130; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body p { color: var(--ink-2); flex: 1; }
.card-cta { font-weight: 700; color: var(--accent); margin-top: 8px; }

.posts { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.post-card { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease; }
.post-card:hover { transform: translateY(-3px); }
.post-card:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-art svg { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.post-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post-body p:last-child { color: var(--ink-2); font-size: .97rem; }
.meta { font-size: .85rem; color: var(--muted); }

/* fact */
.fact { background: var(--surface-2); border-radius: var(--radius); padding: 28px 24px; display: grid; gap: 14px; justify-items: start; position: relative; overflow: hidden; }
@media (min-width: 700px) { .fact { padding: 40px 48px; } }
.fact-text { font: 600 clamp(1.3rem, 3.4vw, 1.9rem)/1.3 var(--serif); max-width: 30ch; transition: opacity .25s ease; }

/* Instagram band */
.ig-band { background: var(--ig-band); color: var(--ig-band-ink); border-radius: var(--radius); padding: 28px 24px; display: grid; gap: 18px; align-items: center; }
.ig-band p { opacity: .85; margin-top: 8px; max-width: 52ch; }
.ig-band-art svg { width: 80px; height: 80px; color: var(--accent); }
@media (min-width: 800px) { .ig-band { grid-template-columns: auto 1fr auto; padding: 36px 44px; gap: 28px; } }

/* picks */
.picks { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.pick p { color: var(--ink-2); flex: 1; font-size: .98rem; }
.pick .btn { align-self: flex-start; }
.pick-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: var(--ink); }
.pick-icon svg { width: 34px; height: 34px; }
.tone-terra .pick-icon { background: var(--tile-terra); }
.tone-sky .pick-icon { background: var(--tile-sky); }
.tone-sage .pick-icon { background: var(--tile-sage); }
.tone-mustard .pick-icon { background: var(--tile-mustard); }
.pick-small { padding: 18px; box-shadow: none; }

/* forms & tools */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 8px; }
@media (min-width: 700px) { .panel { padding: 30px; } }
.tool-form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > span, .chips legend { font-weight: 700; }
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.field-row.tight { grid-template-columns: 1fr 96px; }
input, select {
  font: 500 1.05rem/1.2 var(--sans); color: var(--ink); background: var(--bg); width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; min-height: 48px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tool-form .btn { justify-self: start; }
.result { background: var(--accent-soft); border-radius: var(--radius-s); padding: 20px; display: grid; gap: 6px; }
.result[hidden] { display: none; }
.result .big { font: 800 clamp(2rem, 7vw, 2.8rem)/1.05 var(--serif); color: var(--ink); }
.result .tag { display: inline-block; justify-self: start; background: var(--surface); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .9rem; }
.table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--surface-2); font-size: .9rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.narrow > h2 { margin-top: 40px; }

.faq-block { margin-top: 40px; }
.faq-block h2 { margin-bottom: 14px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem/1 var(--sans); color: var(--accent); }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 0 18px; color: var(--ink-2); }

.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 10px; padding: 0; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 500; }
.chip-radio input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.name-btn { font: 700 1.15rem/1.2 var(--serif); background: var(--surface-2); color: var(--ink); border: 1.5px solid transparent; border-radius: var(--radius-s); padding: 16px 12px; cursor: pointer; text-align: center; transition: transform .12s ease; animation: pop .3s ease both; }
.name-btn:hover { border-color: var(--accent); }
.name-btn.saved { background: var(--accent); color: var(--accent-ink); }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.shortlist { margin-top: 18px; display: grid; gap: 12px; justify-items: start; }
.saved { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.saved li button { font: 700 1rem/1 var(--serif); background: var(--accent-soft); color: var(--ink); border: 0; border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.saved li button::after { content: " ×"; color: var(--muted); }

/* share */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.share-label { font-weight: 700; margin-right: 4px; }

/* article */
.article { padding-top: 28px; }
@media (min-width: 860px) { .article { padding-top: 48px; } }
.article-head h1 { font-size: clamp(2rem, 5.4vw, 3rem); }
.byline { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 500; color: var(--ink-2); }
.byline svg { width: 22px; height: 22px; color: var(--accent); }
.article-art { margin: 30px 0 10px; border-radius: var(--radius); overflow: hidden; }
.article-art svg { width: 100%; height: auto; }
.prose { font-size: 1.1rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.35rem, 3vw, 1.65rem); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); }
.article-picks { margin-top: 44px; background: var(--surface-2); border-radius: var(--radius); padding: 24px; }
.article-picks h2 { font-size: 1.3rem; margin-bottom: 16px; }

/* games */
.game-wrap { padding-top: 16px; }
.game { position: relative; max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.hud { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--ink-2); }
.hud b { font: 800 1.15rem/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 4px; }
.stage { position: relative; height: min(68vh, 520px); min-height: 340px; }
.game-laser .stage { background: radial-gradient(circle at 50% 120%, #4A3F39, #2E2724 70%); cursor: crosshair; touch-action: none; }
.game-yarn .stage { background: linear-gradient(var(--tile-sky), var(--surface)); touch-action: none; }
.game-yarn canvas { width: 100%; height: 100%; display: block; }
.game-pairs .stage { height: auto; min-height: 0; padding: 14px; background: var(--tile-sage); }
.overlay { position: absolute; inset: 0; top: 47px; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(3px); z-index: 5; }
.overlay[hidden] { display: none; }
.overlay-card { background: var(--surface); border-radius: var(--radius); padding: 26px 24px; text-align: center; max-width: 360px; box-shadow: var(--shadow); display: grid; gap: 12px; justify-items: center; }
.overlay-card h2 { font-size: 1.7rem; }
.overlay-card p { color: var(--ink-2); }
.ov-share[hidden] { display: none; }
.dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #FF4D4D; box-shadow: 0 0 0 8px rgba(255, 77, 77, .22), 0 0 26px 10px rgba(255, 77, 77, .45); transition: left .18s ease-out, top .18s ease-out; cursor: pointer; }
.dot::before { content: ""; position: absolute; inset: -22px; border-radius: 50%; }
.pawmark { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; color: #F1E3CF; pointer-events: none; animation: fade .6s ease forwards; }
.pawmark.miss { color: #8A7B72; }
@keyframes fade { from { opacity: .95; transform: scale(1); } to { opacity: 0; transform: scale(1.3); } }
.pairs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.pcard { aspect-ratio: 3 / 4; perspective: 600px; border: 0; padding: 0; background: none; cursor: pointer; }
.pcard-inner { position: relative; width: 100%; height: 100%; transition: transform .35s ease; transform-style: preserve-3d; }
.pcard.flipped .pcard-inner, .pcard.matched .pcard-inner { transform: rotateY(180deg); }
.pcard-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.pcard-back { background: var(--accent); color: rgba(255, 255, 255, .5); }
.pcard-back svg { width: 40%; }
.pcard-front { background: var(--surface); transform: rotateY(180deg); padding: 10%; }
.pcard.matched .pcard-front { box-shadow: inset 0 0 0 3px #7E9670; }

/* 404 */
.nf { text-align: center; padding-top: 40px; padding-bottom: 40px; }
.nf-art { max-width: 420px; margin: 0 auto 24px; border-radius: var(--radius); overflow: hidden; }
.nf .lead { margin-left: auto; margin-right: auto; }

/* language suggestion */
.lang-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 520px; margin: 0 auto; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 12px 12px 12px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.lang-bar a { color: inherit; font-weight: 700; flex: 1; }
.lang-bar button { background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }

/* footer */
.site-footer { margin-top: 64px; background: var(--surface-2); padding: 44px 0 28px; font-size: .95rem; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; display: grid; gap: 12px; justify-items: start; max-width: 42ch; color: var(--ink-2); }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .foot-brand { grid-column: auto; } }
.site-footer h2 { font: 700 .8rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.ig-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.ig-line svg { width: 20px; height: 20px; }
.foot-note { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
