/* tarot.gripe shared styles (home page, card library and the 78 card pages) */
:root { --bg:#faf8f5; --fg:#1a1a1a; --muted:#8a8a8a; --soft:#5c5c5c; --line:#e4e0da; --hover:#efebe5; --panel:#f3efe9; --accent:#e5484d;
        --back1:#2b2f5c; --back2:#3d4380; --gold:#d8b45a; --shadow:0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.08) }
@media (prefers-color-scheme: dark) { :root { --bg:#111; --fg:#f2f2f2; --muted:#8a8a8a; --soft:#b5b5b5; --line:#262626; --hover:#1d1d1d; --panel:#171717;
        --back1:#20234a; --back2:#2f3470; --shadow:0 1px 2px rgba(0,0,0,.5), 0 4px 14px rgba(0,0,0,.4) } }
:root { color-scheme:light dark }
* { box-sizing:border-box; margin:0 }
html { -webkit-text-size-adjust:100% }
body { background:var(--bg); color:var(--fg); font:16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
       display:flex; flex-direction:column; min-height:100vh; min-height:100dvh }
#app { flex:1 1 auto; width:100%; max-width:980px; margin:0 auto; padding:clamp(16px,3vw,40px) clamp(16px,3vw,40px) 24px }
a { color:var(--accent) }
img { max-width:100%; height:auto }
button, input, select, textarea { font:inherit; color:inherit }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }
.hidden { display:none !important }
.muted { color:var(--muted) }

/* header */
header.site { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 20px; margin-bottom:18px }
header.site h1, .brand { font-size:clamp(1.6rem,4vw,2.4rem); font-weight:700; letter-spacing:-.03em; line-height:1.2; color:var(--fg); text-decoration:none }
header.site h1 span, .brand span { color:var(--accent) }
.tag { color:var(--muted); font-size:.95rem }
nav.top { display:flex; gap:16px; font-weight:600; font-size:.95rem }
nav.top a { color:var(--fg); text-decoration:none }
nav.top a:hover, nav.top a[aria-current] { color:var(--accent) }

/* buttons, chips */
.btn { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--bg); border-radius:10px; padding:8px 14px;
       cursor:pointer; font-weight:600; font-size:.92rem; text-decoration:none; color:var(--fg) }
button, label, summary, a.btn { touch-action:manipulation }   /* no double-tap zoom on controls */
.btn:hover { border-color:var(--accent) }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff }
.btn.primary:hover { filter:brightness(1.07) }
.btn.danger:hover { color:var(--accent) }
.btn:disabled { opacity:.5; cursor:default }
.chips { display:flex; flex-wrap:wrap; gap:6px; padding:0; list-style:none }
.chips li { font-size:.82rem; padding:2px 9px; border-radius:999px; border:1px solid var(--line); background:var(--panel) }

/* a card image (face or back) */
.tc { display:block; aspect-ratio:600/1040; border-radius:6%/3.5%; overflow:hidden; box-shadow:var(--shadow); background:var(--panel) }
.tc img { display:block; width:100%; height:100%; object-fit:cover }
.tc.rev img { transform:rotate(180deg) }
.back { background:
  radial-gradient(circle at 50% 50%, transparent 0 17%, var(--gold) 17.5% 18.5%, transparent 19% ),
  repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 6px, transparent 6px 12px),
  linear-gradient(160deg, var(--back2), var(--back1));
  border:5px solid #f3efe9; outline:1px solid var(--line) }
@media (prefers-color-scheme: dark) { .back { border-color:#2a2a2a } }

/* card grids (library, suit lists) */
.grid { list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:18px 12px }
@media (max-width:420px) { .grid { grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px 10px } }
.grid a { display:block; color:var(--fg); text-decoration:none; font-size:.85rem; font-weight:600; line-height:1.25; text-align:center }
.grid a .tc { margin-bottom:6px; transition:transform .15s }
.grid a:hover .tc { transform:translateY(-2px) }
.grid a:hover span { color:var(--accent) }
.grid a[aria-current] .tc { outline:2px solid var(--accent); outline-offset:2px }
@media (prefers-reduced-motion: reduce) { .grid a .tc { transition:none } .grid a:hover .tc { transform:none } }

/* card page */
.crumbs { font-size:.88rem; color:var(--muted); margin-bottom:14px }
.crumbs a { color:var(--muted); text-decoration:none } .crumbs a:hover { color:var(--accent); text-decoration:underline }
.cardpage { display:grid; grid-template-columns:minmax(0, 300px) minmax(0, 1fr); gap:28px 36px; align-items:start }
@media (max-width:700px) { .cardpage { grid-template-columns:minmax(0,1fr) } .cardpage .pic { max-width:260px; margin:0 auto; width:100% } }
.cardpage h1 { font-size:clamp(1.8rem,4.5vw,2.6rem); letter-spacing:-.03em; line-height:1.15 }
.cardpage .sub { color:var(--muted); margin:4px 0 18px }
.cardpage h2 { font-size:1.12rem; margin:22px 0 6px }
.cardpage p { max-width:62ch }
.cardpage .kw { display:grid; grid-template-columns:auto 1fr; gap:8px 12px; align-items:baseline; margin:4px 0 6px }
.cardpage .kw b { font-size:.85rem; color:var(--soft) }
.cardpage .pic figcaption { font-size:.8rem; color:var(--muted); margin-top:8px; text-align:center }
.flipbtn { margin-top:12px; width:100%; justify-content:center }
.pn { display:flex; justify-content:space-between; gap:12px; margin:34px 0 0; padding-top:16px; border-top:1px solid var(--line); flex-wrap:wrap }
.pn a { text-decoration:none; font-weight:600 }
.suitlist h2 { font-size:1.1rem; margin:36px 0 14px }
.note { font-size:.85rem; color:var(--muted); margin-top:26px; max-width:70ch }

/* about / FAQ */
.about { max-width:70ch; margin:48px 0 0; padding-top:22px; border-top:1px solid var(--line); color:var(--muted); color:color-mix(in srgb, var(--fg) 68%, var(--bg)); font-size:.93rem; line-height:1.6 }
.about h2 { margin:0 0 2px; font-size:1.15rem; font-weight:650; letter-spacing:-.01em; line-height:1.3; color:var(--fg) }
.about h3 { margin:18px 0 4px; font-size:.98rem; font-weight:600; line-height:1.35; color:var(--fg) }
.about p { margin:0; overflow-wrap:break-word }

/* gripe network badge (same on every site) */
.gn-wrap { display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 16px 22px }
.gn-terms { color:var(--muted,#8a8a8a); font:.8rem/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; text-decoration:none; text-align:center }
.gn-terms:hover { color:var(--accent,#e5484d); text-decoration:underline }
.gn { display:inline-flex; align-items:center; gap:10px; padding:6px 6px 6px 14px; border:1px solid var(--line,#e4e0da); border-radius:999px;
      background:var(--panel,var(--hover,#f3efe9)); color:var(--fg,#1a1a1a); text-decoration:none;
      font:500 .9rem/1.2 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; transition:border-color .15s, transform .15s }
.gn:hover { border-color:var(--accent,#e5484d); transform:translateY(-1px) }
.gn:focus-visible { outline:2px solid var(--accent,#e5484d); outline-offset:2px }
.gn-dot { width:8px; height:8px; border-radius:50%; background:var(--accent,#e5484d); box-shadow:0 0 0 3px color-mix(in srgb, var(--accent,#e5484d) 22%, transparent) }
.gn b { color:var(--accent,#e5484d); font-weight:700 }
.gn-more { padding:5px 11px; border-radius:999px; background:var(--accent,#e5484d); color:#fff; font-size:.8rem; font-weight:600; white-space:nowrap }
@media (prefers-reduced-motion: reduce) { .gn { transition:none } .gn:hover { transform:none } }
