/* spielerei.dev 共通スタイル（外部CSS・外部フォントなし） */
:root {
  --bg: #fffaf0;
  --paper: #ffffff;
  --ink: #1d1b2e;
  --muted: #5f5b73;
  --line: #e8e0cf;
  --coral: #ff6b5b;
  --sky: #2f8cff;
  --lemon: #ffcf33;
  --mint: #1fbf9f;
  --link: #1f57d6;
  --night: #0f1b33;
  --night-2: #1d2f57;
  --radius: 18px;
  --shadow: 0 2px 0 var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131f;
    --paper: #1e1b2c;
    --ink: #f4f1ff;
    --muted: #b1acc6;
    --line: #33304a;
    --link: #8fb4ff;
    --night: #0a1226;
    --night-2: #162645;
    --shadow: 0 2px 0 #000;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  overflow-x: hidden;
}
a { color: var(--link); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 99; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand b { color: var(--coral); }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .92rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--coral); }

/* ヒーロー */
.hero { position: relative; padding: 72px 0 56px; }
.hero .shape { position: absolute; z-index: 0; border: 3px solid var(--ink); }
.hero .s1 { width: 74px; height: 74px; border-radius: 50%; background: var(--lemon); top: 36px; right: 8%; animation: float 7s ease-in-out infinite; }
.hero .s2 { width: 54px; height: 54px; background: var(--sky); top: 190px; right: 24%; transform: rotate(14deg); animation: float 9s ease-in-out -2s infinite; }
.hero .s3 { width: 0; height: 0; border: 0; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 52px solid var(--coral); top: 70px; right: 30%; animation: float 8s ease-in-out -4s infinite; }
.hero .s4 { width: 40px; height: 40px; border-radius: 50%; background: var(--mint); bottom: 30px; right: 12%; animation: float 6s ease-in-out -1s infinite; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.hero .inner { position: relative; z-index: 1; }
.kicker { display: inline-block; font-weight: 700; font-size: .85rem; border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 14px; background: var(--lemon); color: #1d1b2e; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.2rem); line-height: 1.08; letter-spacing: -.04em; margin: 18px 0 14px; font-weight: 900; }
.hero h1 .dev { color: var(--coral); }
.hero .lede { font-size: clamp(1.02rem, 2.6vw, 1.25rem); max-width: 640px; margin: 0 0 8px; }
.hero .etym { max-width: 640px; color: var(--muted); font-size: .95rem; margin: 0 0 24px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; font-weight: 700; text-decoration: none; color: #1d1b2e; background: var(--lemon);
  border: 2px solid var(--ink); border-radius: 12px; padding: 10px 20px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
.btn.alt { background: var(--paper); color: var(--ink); }

/* セクション */
section { padding: 44px 0; }
.eyebrow { font-weight: 800; font-size: .8rem; letter-spacing: .12em; color: var(--coral); text-transform: uppercase; margin: 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.3; margin: 4px 0 8px; letter-spacing: -.02em; }
h3 { font-size: 1.1rem; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; max-width: 680px; }

/* アプリカード */
.apps { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .apps { grid-template-columns: 1fr 1fr; } }
.app { position: relative; border: 3px solid var(--ink); border-radius: 22px; padding: 26px; box-shadow: 6px 6px 0 var(--ink);
  display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.app h3 { font-size: 1.5rem; }
.app .tag { font-size: .8rem; font-weight: 700; opacity: .85; }
.app ul { margin: 6px 0 10px; padding-left: 1.2em; }
.app li { margin: 2px 0; }
.app .go { margin-top: auto; align-self: flex-start; }
.app.night { background: linear-gradient(170deg, var(--night) 0%, var(--night-2) 100%); color: #eaf0ff; }
.app.night .tag { color: #9fb8ff; }
.app.night .moon { position: absolute; right: 22px; top: 18px; width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8d6, #f3d778); box-shadow: 0 0 28px rgba(255,236,160,.45); }
.app.night .wave { height: 16px; margin: 4px 0 2px; background:
  radial-gradient(circle at 10px 0, transparent 9px, #5f8bff 10px, #5f8bff 12px, transparent 13px) 0 0 / 20px 16px repeat-x; opacity: .7; }
.app.night .btn { background: #ffe58a; color: #0f1b33; border-color: #ffe58a; box-shadow: none; }
.app.night a:not(.btn) { color: #a8c2ff; }
.app.tools { background: var(--paper); }
.app.tools .tag { color: var(--coral); }
.app.fit { background: var(--paper); }
.app.fit .tag { color: var(--mint); }
@media (min-width: 820px) { .app.fit { grid-column: 1 / -1; } }

/* ツール一覧 */
.group { margin: 0 0 26px; }
.group h3 { display: inline-block; font-size: 1rem; border-bottom: 4px solid var(--lemon); margin-bottom: 12px; }
.group:nth-of-type(2) h3 { border-color: var(--sky); }
.group:nth-of-type(3) h3 { border-color: var(--mint); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tool { display: block; text-decoration: none; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 14px; padding: 12px 14px; transition: transform .12s, box-shadow .12s; }
.tool:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 4px 4px 0 var(--ink); }
.tool strong { display: block; font-size: .98rem; }
.tool span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.6; margin-top: 2px; }

/* 約束カード */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card .dot { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.card:nth-child(1) .dot { background: var(--coral); }
.card:nth-child(2) .dot { background: var(--sky); }
.card:nth-child(3) .dot { background: var(--lemon); }
.card:nth-child(4) .dot { background: var(--mint); }
.card p { margin: 6px 0 0; color: var(--muted); font-size: .94rem; }

/* お知らせ・FAQ */
.news { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.news li { display: flex; gap: 18px; padding: 12px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.news time { font-weight: 700; min-width: 7.5em; color: var(--coral); font-variant-numeric: tabular-nums; }
details { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 4px 16px; margin: 0 0 10px; }
summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
details p { margin: 0 0 12px; color: var(--muted); }

/* 本文ページ（about / privacy） */
.doc { max-width: 760px; padding-top: 40px; padding-bottom: 20px; }
.doc h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.3; margin: 6px 0 6px; }
.doc h2 { font-size: 1.2rem; margin: 34px 0 6px; padding-left: 12px; border-left: 6px solid var(--lemon); }
.doc .meta { color: var(--muted); font-size: .9rem; }

/* フッター */
.site-footer { border-top: 2px solid var(--ink); margin-top: 40px; padding: 28px 0 44px; font-size: .92rem; color: var(--muted); }
.site-footer .links { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .shape { animation: none; }
  .btn, .tool { transition: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 48px; }
  .hero .s2, .hero .s3 { display: none; }
  .app { padding: 20px; box-shadow: 4px 4px 0 var(--ink); }
}
