/* おもちゃえらび — やわらかく、すっきり */

:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --ink: #3b3631;
  --muted: #8a8279;
  --line: #f0e6d9;
  --coral: #f2836b;
  --coral-deep: #c95a43;
  --coral-soft: #fde9e3;
  --mint: #7cc6b4;
  --mint-soft: #e3f4ef;
  --sun: #f6c768;
  --sun-soft: #fdf2d9;
  --xmas: #3f8f6f;
  --xmas-soft: #e6f3ec;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 2px 10px rgba(91, 70, 45, .06);
  --font-round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-round); line-height: 1.45; margin: 0; }
small { font-size: .78em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sp { display: none; }
@media (max-width: 600px) { .sp { display: inline; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.block { margin-top: 48px; }

/* ── ヘッダー・フッター ── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-round); font-weight: 800; font-size: 20px; }
.logo-mark { width: 28px; height: 28px; }
.header-nav { display: flex; gap: 16px; font-size: 14px; font-weight: 500; }
.header-nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.logo span { white-space: nowrap; }
.logo-sub { 
  font-size: 10px;
  color: var(--muted);
  font-weight: normal;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  padding: 2px 0 0 0;
 }
@media (max-width: 600px) {
  .logo { font-size: 18px; }
  .header-nav { gap: 12px; font-size: 13px; }
}
.header-nav a:hover { color: var(--coral-deep); }

.site-footer { margin-top: 72px; padding: 40px 0 32px; background: var(--surface); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-ages { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 20px; }
.footer-ages a { text-decoration: none; }
.footer-ages a:hover { color: var(--coral-deep); }
.footer-note { margin: 0 0 12px; }
.footer-links { display: flex; gap: 16px; margin: 0 0 12px; }
.pr-note { margin: 0 0 8px; font-size: 11px; }
.copyright { margin: 0; }

/* ── トップ ── */
.hero { padding: 48px 0 40px; background: radial-gradient(120% 90% at 50% 0%, var(--coral-soft) 0%, var(--bg) 70%); text-align: center; }
.hero-title { font-size: clamp(28px, 6vw, 42px); font-weight: 800; letter-spacing: .02em; }
.hero-lead { margin: 12px auto 28px; max-width: 34em; color: var(--muted); }

/* 年齢チップ */
.hero .age-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 10px; max-width: 600px; margin: 0 auto; }
.hero .age-chip { width: calc((100% - 60px) / 7); }
@media (max-width: 600px) { .hero .age-chip { width: calc((100% - 40px) / 5); } }
.age-nav { display: grid; gap: 10px; }
.age-chip {
  display: flex; align-items: center; justify-content: center; gap: 1px;
  aspect-ratio: 1;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
  text-decoration: none; font-family: var(--font-round); box-shadow: var(--shadow);
  transition: transform .15s, border-color .15s;
}
.age-chip b { font-size: 22px; font-weight: 800; color: var(--coral-deep); }
.age-chip span { font-size: 12px; color: var(--muted); }
.age-chip:hover { transform: translateY(-2px); border-color: var(--coral); }
.age-chip.is-current { background: var(--coral); border-color: var(--coral); }
.age-chip.is-current b, .age-chip.is-current span { color: #fff; }
.page-head + .age-nav { margin: 24px 0 0; max-width: none; grid-template-columns: repeat(13, 1fr); }
@media (max-width: 900px) { .page-head + .age-nav { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 600px) { .page-head + .age-nav { grid-template-columns: repeat(5, 1fr); } }
.page-head + .age-nav .age-chip b { font-size: 18px; }

/* バナー */
.banner {
  display: block; padding: 24px; border-radius: var(--radius);
  background: var(--mint-soft); text-decoration: none; transition: transform .15s;
}
.banner:hover { transform: translateY(-2px); }
.banner strong { display: block; font-family: var(--font-round); font-size: 20px; }
.banner-kicker { font-family: var(--font-round); font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--xmas); text-transform: uppercase; }
.banner-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.banner-xmas { background: var(--xmas-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%233f8f6f' opacity='.12'%3E%3Cpath d='M90 14l18 30H96l14 22H70l14-22H72z'/%3E%3Crect x='86' y='66' width='8' height='10'/%3E%3C/g%3E%3C/svg%3E") no-repeat right 8px center; }
.xmas-ages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xmas-ages a, .chip {
  padding: 4px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; text-decoration: none;
}
.xmas-ages a:hover, .chip:hover { border-color: var(--xmas); color: var(--xmas); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.block-head h2, .block > h2 { font-size: 22px; }
.block > h2 { margin-bottom: 16px; }
.more { font-size: 14px; font-weight: 500; color: var(--coral-deep); text-decoration: none; white-space: nowrap; }
.more::after { content: " ›"; }

.about-box { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.about-box h2 { font-size: 18px; margin-bottom: 8px; }
.about-box p { margin: 0; color: var(--muted); font-size: 14px; }

/* ── 商品カード ── */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.card {
  position: relative; display: flex; flex-direction: column;
  padding: 12px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card-link { text-decoration: none; flex: 1; }
.card-img { aspect-ratio: 1; padding: 8px; border-radius: var(--radius-s); background: #fff; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-title {
  margin-top: 10px; font-family: var(--font-body); font-size: 13px; font-weight: 500; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-link:hover .card-title { color: var(--coral-deep); }
.card-price { margin: 8px 0 10px; font-weight: 700; font-size: 16px; }
.card-price small { font-weight: 400; color: var(--muted); }
.card-price .muted { font-size: 12px; font-weight: 400; }

.rank {
  position: absolute; top: -8px; left: -8px; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
  font-family: var(--font-round); font-weight: 800; font-size: 16px; line-height: 1;
}
.rank small { font-size: 9px; margin-top: -10px; }
.rank-1 { background: #f6c768; border-color: #f6c768; color: #6b4a08; }
.rank-2 { background: #dfe3e8; border-color: #dfe3e8; color: #4a5260; }
.rank-3 { background: #ecc3a4; border-color: #ecc3a4; color: #6a3d1d; }

/* ── ボタン ── */
.shops { display: grid; gap: 6px; }
.btn {
  display: block; width: 100%; padding: 10px 12px; border-radius: 999px; border: 0;
  font: 700 14px/1.2 var(--font-round); text-align: center; text-decoration: none; cursor: pointer;
  transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.btn-amazon { background: var(--coral); color: #fff; }
.btn-rakuten { background: var(--surface); color: #bf3a3a; border: 1.5px solid #f0c9c9; }
.prose .btn { display: inline-block; width: auto; padding: 12px 32px; }

/* ── ランキングページ ── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 0 0; font-size: 12px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--coral-deep); }

.page-head { margin-top: 20px; padding: 28px 24px; border-radius: var(--radius); background: var(--coral-soft); }
.page-head.is-xmas { background: var(--xmas-soft); }
.page-kicker { margin: 0 0 4px; font-family: var(--font-round); font-weight: 700; font-size: 13px; color: var(--coral-deep); }
.is-xmas .page-kicker { color: var(--xmas); }
.page-head h1 { font-size: clamp(22px, 4.6vw, 30px); }
.updated { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

.tabs { display: flex; gap: 8px; margin-top: 24px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); width: fit-content; }
.tab { padding: 6px 20px; border-radius: 999px; text-decoration: none; font-family: var(--font-round); font-weight: 700; font-size: 14px; color: var(--muted); }
.tab.is-current { background: var(--ink); color: #fff; }

.guide { margin: 24px 0 32px; padding: 20px 24px; border-left: 4px solid var(--sun); border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--sun-soft); }
.guide h2 { font-size: 16px; margin-bottom: 4px; }
.guide p { margin: 0; font-size: 15px; }

.pager { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
.more, .pager-prev {
  display: inline-block; padding: 12px 40px; border-radius: 999px; background: var(--surface);
  border: 1.5px solid var(--line); font: 700 14px/1.2 var(--font-round); text-decoration: none;
}
.more:hover, .pager-prev:hover { color: var(--coral-deep); }
.more.is-loading { color: var(--muted); pointer-events: none; }

.cross-link { margin-top: 40px; }
.note { margin-top: 24px; font-size: 12px; color: var(--muted); }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* ── 商品ページ ── */
.item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; margin-top: 20px; }
@media (max-width: 760px) { .item { grid-template-columns: 1fr; gap: 20px; } }
.item-img { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; }
.item-img img { max-height: 420px; width: auto; }
.item-age { display: inline-block; margin: 0 0 8px; padding: 2px 12px; border-radius: 999px; background: var(--mint-soft); color: #2f7d6a; font-size: 13px; font-weight: 700; }
.item-title { font-family: var(--font-body); font-size: 20px; font-weight: 700; line-height: 1.6; }
.item-price { margin: 20px 0 16px; }
.price { margin: 0; font-size: 28px; font-weight: 700; }
.price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.saving { margin: 4px 0 0; color: var(--coral-deep); font-weight: 700; font-size: 14px; }
.item-body .shops { max-width: 360px; }
.item-body .btn { padding: 14px; font-size: 16px; }
.features { margin-top: 28px; }
.features h2 { font-size: 16px; margin-bottom: 8px; }
.features ul { margin: 0; padding-left: 1.2em; font-size: 14px; }
.features li + li { margin-top: 6px; }

.chart { margin: 0; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.chart svg { width: 100%; height: auto; }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-line { fill: none; stroke: var(--coral); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--coral); }
.chart-label { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.chart figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.sticky-buy { display: none; }
@media (max-width: 760px) {
  .sticky-buy {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 250, 243, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  }
  .sticky-buy .btn { padding: 14px; font-size: 16px; }
  body:has(.sticky-buy) .site-footer { padding-bottom: 96px; }
}

/* ── 固定ページ ── */
.prose { max-width: 760px; padding-top: 32px; }
.prose h1 { font-size: 26px; margin-bottom: 24px; }
.prose h2 { font-size: 18px; margin: 32px 0 8px; }
.prose p { margin: 0 0 12px; }
.info { display: grid; grid-template-columns: 8em 1fr; gap: 8px 16px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }

/* ── トースト ── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translate(-50%, 16px);
  width: max-content; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { body:has(.sticky-buy) .toast { bottom: 96px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
