/* ===== Theme (調整しやすいように変数化) ===== */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --fg: #0f172a;
  --muted: #475569;

  --radius: 16px;
  --shadow: 0 6px 22px rgba(15, 23, 42, 0.08);

  /* デフォルトのアクセント（未指定カード用） */
  --accent: #0ea5e9;
}

/* カード別アクセント */
.card[data-theme="keihin"] { --accent: #ef4444; } /* red */
.card[data-theme="gift"]   { --accent: #10b981; } /* green */
.card[data-theme="faq"]    { --accent: #6366f1; } /* indigo */

/* ===== Reset-ish ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--fg);
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(99,102,241,.08), transparent 60%),
    radial-gradient(1200px 800px at 110% 10%, rgba(16,185,129,.06), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6vh 20px 8vh;
}

.site-header {
  text-align: center;
  margin-bottom: 28px;
}
.site-header h1 {
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: .02em;
}
.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 16px);
}

/* ===== Grid of cards ===== */
.link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

@media (min-width: 680px) {
  .link-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .link-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Card ===== */
.card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #fff) padding-box,
              linear-gradient(135deg, color-mix(in srgb, var(--accent), #fff 70%), #ffffff) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  position: relative;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius) + 2px);
  background: radial-gradient(200px 120px at 80% -20%, color-mix(in srgb, var(--accent), #fff 70%), transparent 70%);
  opacity: .0;
  transition: opacity .2s ease;
  pointer-events: none;
  z-index: -1;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.card:hover::after { opacity: .6; }
.card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), #fff 20%);
  outline-offset: 3px;
}

.card-title {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.25;
}
.card-title small {
  font-size: .85em;
  color: var(--muted);
  font-weight: 600;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  min-height: 2.6em; /* 2行確保（可読性確保） */
}

.cta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
  transition: filter .2s ease, transform .2s ease;
}
.card:hover .cta { filter: brightness(1.05); transform: translateY(-1px); }

/* ===== Footer ===== */
.site-footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ===== Dark mode ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --card: #0f172a;
    --fg: #e5e7eb;
    --muted: #9aa4b2;
    --shadow: 0 6px 22px rgba(0,0,0,.35);
  }
  .card {
    background: linear-gradient(180deg, #0f172a, #0f172a) padding-box,
                linear-gradient(135deg, color-mix(in srgb, var(--accent), #000 70%), #0f172a) border-box;
  }
  .card-desc { color: #cbd5e1; }
  .cta { color: #0b1020; }
}
