/* レゴ 廃盤予定リスト(lego.ai-income.jp)のスタイル。scripts/lego/build_lego_site.py がページを組み立てる。
   本番の CSP(style-src 'self')でインラインの style は使えないので、見た目はすべてこのファイルに書く。
   色: レゴの赤と黄を差し色に、白と墨色を基調にする。スマートフォンを先に考え、広い画面で列を増やす */
:root {
  --red: #e3000b;
  --red-ink: #b80009;
  --yellow: #ffcf00;
  --blue: #006cb7;
  --ink: #16181d;
  --muted: #5d6472;
  --line: #e7e4dc;
  --bg: #faf9f6;
  --card: #ffffff;
  --soft: #f3f1ea;
  --shadow: 0 1px 2px rgba(22, 24, 29, .05), 0 8px 24px rgba(22, 24, 29, .06);
  --shadow-hover: 0 2px 4px rgba(22, 24, 29, .06), 0 16px 36px rgba(22, 24, 29, .12);
  --radius: 18px;
  --wrap: 1160px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f2f4;
    --muted: #a9afbb;
    --line: #2a2e36;
    --bg: #0e1014;
    --card: #171a20;
    --soft: #1e2129;
    --red-ink: #ff5a5f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 16px 36px rgba(0, 0, 0, .5);
  }
}
*, *::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-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #6cb6ff; } }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: .01em; }
h2 { font-size: 1.35rem; margin: 2.4em 0 .8em; }
h3 { font-size: 1.08rem; margin: 1.8em 0 .5em; }
p { margin: 0 0 1em; }
small, .meta { color: var(--muted); font-size: .86rem; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.02rem; }
.site-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--soft); }
.site-nav a[aria-current] { color: var(--ink); background: var(--soft); box-shadow: inset 0 -2px 0 var(--red); }
@media (max-width: 640px) {
  .site-nav { width: 100%; margin: 0 -6px 8px; }
}

/* ---------- PR 表記 */
.pr-notice { background: var(--soft); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.pr-notice .wrap { padding-top: 6px; padding-bottom: 6px; }
.pr-notice strong { display: inline-block; background: var(--ink); color: var(--bg); border-radius: 4px; padding: 0 6px; margin-right: 6px; font-size: .72rem; letter-spacing: .06em; }

/* ---------- ヒーロー */
.hero {
  position: relative; overflow: hidden;
  margin: 22px 0 8px; padding: 40px 24px 34px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, .22) 0 5px, transparent 6px) 0 0 / 28px 28px,
    linear-gradient(135deg, #e3000b 0%, #c4000a 55%, #9e0008 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; border-radius: 40px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .12) 0 22px, transparent 23px) 0 0 / 73px 73px, var(--yellow);
  transform: rotate(-14deg); opacity: .95;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; opacity: .92; }
.hero h1 { font-size: clamp(1.9rem, 6.4vw, 3.1rem); margin: 0 0 12px; font-weight: 900; letter-spacing: .02em; max-width: 15em; }
.hero h1 .hl { background: linear-gradient(transparent 62%, rgba(255, 207, 0, .85) 62%); padding: 0 2px; }
.hero .lead { font-size: 1.02rem; max-width: 36em; margin: 0 0 22px; opacity: .96; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 780px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats li {
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 14px; padding: 8px 14px; line-height: 1.35; min-width: 0;
}
.stats b { display: block; font-size: 1.45rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.stats span { font-size: .78rem; opacity: .9; }
@media (max-width: 639px) {
  .hero::after { width: 150px; height: 150px; right: -50px; bottom: -60px; opacity: .9; }
}
@media (min-width: 640px) {
  .hero .lead, .hero h1 { max-width: min(36em, 64%); }
  .stats { max-width: 70%; }
}
@media (max-width: 639px) {
  .hero { padding: 30px 20px 26px; border-radius: 22px; }
}
@media (min-width: 900px) {
  .hero { padding: 56px 52px 48px; }
  .hero::after { right: 40px; bottom: -60px; width: 280px; height: 280px; }
}

/* ---------- 操作(絞り込み・並べ替え) */
.toolbar {
  position: sticky; top: 60px; z-index: 10;
  margin: 26px 0 14px; padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 640px) { .toolbar { position: static; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip {
  flex: none; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
  color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .c { font-weight: 600; opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.controls input, .controls select {
  font: inherit; font-size: .92rem; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px;
}
.controls input { flex: 1 1 220px; min-width: 0; }
.result-count { color: var(--muted); font-size: .86rem; margin-left: auto; }

/* ---------- カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card[hidden] { display: none; }
.card .thumb { display: block; position: relative; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--line); }
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.thumb-ph {
  position: absolute; inset: 0; display: grid; place-items: center; color: #b9b4a6; font-weight: 900; font-size: 1.6rem; letter-spacing: .06em;
  background: radial-gradient(circle at 14px 14px, #efece3 0 6px, transparent 7px) 0 0 / 30px 30px, #faf8f2;
}
.badge-new {
  position: absolute; left: 12px; top: 12px; background: var(--yellow); color: #16181d; font-size: .72rem; font-weight: 900;
  letter-spacing: .08em; padding: 2px 9px; border-radius: 999px;
}
.card .body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card .theme { font-size: .76rem; font-weight: 800; color: var(--red-ink); letter-spacing: .04em; }
.card h3 { font-size: 1.02rem; margin: 0; line-height: 1.45; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .code { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .price { font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; margin: 2px 0 0; }
.card .price small { font-size: .74rem; font-weight: 600; margin-left: 4px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .8rem; color: var(--muted); margin: 4px 0 10px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.btns { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  font-weight: 800; font-size: .92rem; text-decoration: none; border-radius: 12px; padding: 8px 14px;
  transition: transform .12s ease, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-rakuten { background: var(--red); color: #fff; box-shadow: 0 4px 0 #9e0008; }
.btn-rakuten:hover { background: #f0101b; color: #fff; }
.btn-official { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-official:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: var(--soft); color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* ---------- 消えたセット */
.gone-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.gone-list li {
  display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.gone-list img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; flex: none; filter: grayscale(.6); }
.gone-list .g-body { min-width: 0; flex: 1; line-height: 1.5; }
.gone-list a { color: var(--ink); font-weight: 700; text-decoration: none; }
.gone-list a:hover { text-decoration: underline; }

/* ---------- 汎用ブロック */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .4em; }
.note {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--yellow);
  border-radius: 14px; padding: 16px 18px; margin: 18px 0; box-shadow: var(--shadow);
}
.note.warn { border-left-color: var(--red); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 18px 0; }
.prose { max-width: 760px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 0; margin: 18px 0 6px; font-size: .82rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; opacity: .6; }
.breadcrumb a { color: var(--muted); }
.page-title { font-size: clamp(1.45rem, 4.6vw, 2.1rem); margin: 8px 0 14px; font-weight: 900; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; white-space: nowrap; }
td.num, th.num { text-align: right; }
.related { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.related a { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .86rem; color: var(--ink); text-decoration: none; }
.related a:hover { border-color: var(--ink); }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin: 18px 0; }
.cta-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.cta-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--ink); }
.cta-card b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.cta-card span { color: var(--muted); font-size: .88rem; }
.cta-card .ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--yellow); color: #16181d; font-weight: 900; margin-bottom: 10px; }

/* ---------- セットのページ */
.set-hero { display: grid; gap: 22px; align-items: start; margin-top: 8px; }
.set-hero .photo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1 / 1; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.set-hero .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 22px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .86rem; padding: 4px 12px; border-radius: 999px; }
.status.on { background: #fff2b8; color: #6b4e00; }
.status.off { background: var(--soft); color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.affiliate { margin: 18px 0; }
.affiliate .btns { grid-template-columns: 1fr; }
@media (min-width: 560px) { .affiliate .btns { grid-template-columns: 1fr 1fr; } }
@media (min-width: 820px) {
  .set-hero { grid-template-columns: 360px 1fr; gap: 34px; }
}

/* ---------- 計算機 */
.calc { display: grid; gap: 18px; }
@media (min-width: 820px) { .calc { grid-template-columns: 1fr 1fr; align-items: start; } }
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .92rem; }
.field input {
  font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
.field .hint { font-size: .8rem; color: var(--muted); }
.out { display: grid; gap: 10px; margin: 0; }
.out div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.out dt { color: var(--muted); font-weight: 700; }
.out dd { margin: 0; font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.out .big dd { font-size: 1.9rem; }
.out .neg { color: var(--red-ink); }
.calc-warn[hidden] { display: none; }

/* ---------- フッター */
.site-footer { margin-top: 64px; padding: 34px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.site-footer a { color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; margin-bottom: 10px; }
.foot-brand svg { width: 26px; height: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; list-style: none; margin: 0 0 12px; }

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

/* ---------- ユキ(AI キャラクター)の案内 */
.hero-yuki { margin: 22px 0 0; display: flex; align-items: center; gap: 12px; }
.hero-yuki img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); background: #fff; }
.hero-yuki figcaption { font-size: .78rem; opacity: .9; }
@media (min-width: 900px) {
  .hero { padding-right: 330px; }
  .hero-yuki { position: absolute; right: 34px; bottom: 26px; margin: 0; flex-direction: column; z-index: 2; }
  .hero-yuki img { width: 260px; height: 260px; border-width: 6px; }
  .hero-yuki figcaption { text-align: center; }
}
.yuki-tip { display: flex; gap: 14px; align-items: center; margin: 4px 0 18px; padding: 14px 16px; border-radius: 18px; background: var(--card, #fff); box-shadow: var(--shadow); }
.yuki-tip img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.yuki-tip p { margin: 0; font-size: .95rem; }
.yuki-tip b { display: block; font-size: .8rem; color: #e3000b; margin-bottom: 2px; }
.yuki-tip small { display: block; margin-top: 4px; opacity: .7; font-size: .72rem; }

/* トップの「まもなく廃盤の注目 5 セット」(2026-11-17) */
.picks { margin: 22px 0 26px; }
.pk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pk { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.pk-no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--yellow); color: #16181d; }
.pk-body h3 { margin: 2px 0; font-size: 1rem; line-height: 1.35; }
.pk-body h3 a { color: var(--ink); text-decoration: none; }
.pk-body h3 a:hover { text-decoration: underline; }
.pk-meta { margin: 0; font-size: .86rem; opacity: .85; }
.pk-ref { margin: 4px 0 0; font-size: .92rem; }
.pk-ref b { color: var(--red-ink); font-size: 1.05rem; }
.pk-ref small { display: block; font-size: .78rem; opacity: .8; }
.pk-theme { margin: 2px 0 0; font-size: .78rem; opacity: .8; }
.pk-note { font-size: .8rem; opacity: .85; margin-top: 10px; }
.pk-note p { margin: 6px 0; }
.pk-buy { white-space: nowrap; }
@media (max-width: 640px) {
  .pk { grid-template-columns: 34px 1fr; }
  .pk-buy { grid-column: 1 / -1; justify-content: center; }
}

/* スマホ: 見出しの枠を詰めて、「注目の 5 セット」を開いてすぐ見える位置に(2026-11-17。前は 1 画面目が見出しの枠だけだった) */
@media (max-width: 639px) {
  .hero { margin-top: 12px; padding: 18px 16px 16px; }
  .hero .eyebrow { display: none; }
  .hero h1 { font-size: 1.75rem; margin-bottom: 6px; }
  .hero .lead { font-size: .88rem; line-height: 1.6; margin-bottom: 12px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .stats li { padding: 6px 6px; border-radius: 10px; }
  .stats b { font-size: 1.05rem; }
  .stats span { font-size: .62rem; line-height: 1.25; display: block; }
  .hero-yuki { margin: 10px 0 0; gap: 8px; }
  .hero-yuki img { width: 44px; height: 44px; border-width: 2px; }
  .hero-yuki figcaption { font-size: .68rem; }
  .hero::after { display: none; }
  .picks { margin-top: 14px; }
}
@media (max-width: 639px) {
  .pk { padding: 10px 12px; gap: 8px 10px; }
  .pk-theme { display: none; }
  .pk-ref small { display: inline; }
  .pk-buy { padding-top: 8px; padding-bottom: 8px; }
}

/* セットのページの「廃盤 2 年後の参考価格」(2026-11-17) */
.ref-box { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--yellow); }
.ref-h { margin: 0 0 2px; font-size: .8rem; font-weight: 800; opacity: .8; }
.ref-main { margin: 0; }
.ref-main b { font-size: 1.35rem; color: var(--red-ink); }
.ref-main small { display: block; font-size: .8rem; opacity: .85; }
.ref-theme { margin: 4px 0 0; font-size: .82rem; }
.ref-box .meta { margin: 6px 0 0; font-size: .74rem; }

/* ---------- 図解(2026-11-17。文字ばかりで見づらいとオーナー。SVG は CSP のため属性で描き、色はここで付ける) */
.pk-banner { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 22px 20px; margin: 0 0 14px;
  background: radial-gradient(circle at 12px 12px, rgba(0, 0, 0, .08) 0 5px, transparent 6px) 0 0 / 28px 28px, var(--yellow); color: #16181d; }
.pk-kicker { margin: 0 0 4px; font-size: .78rem; font-weight: 900; letter-spacing: .08em; }
.pk-banner h2 { margin: 0; font-size: clamp(1.3rem, 4.6vw, 2rem); font-weight: 900; line-height: 1.25; }
.pk-big { display: inline-block; font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 1; color: var(--red); letter-spacing: -.02em;
  text-shadow: 3px 3px 0 #16181d; vertical-align: -.12em; margin: 0 4px; }
.pk-banner h2 small { display: block; font-size: .78rem; font-weight: 800; margin-top: 2px; }
.pk-sub { margin: 8px 0 0; font-size: .9rem; font-weight: 700; }
.pk-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.pk { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; padding: 16px; border-radius: 18px; border: 2px solid var(--line); box-shadow: var(--shadow); }
.pk:first-child { border-color: var(--red); }
.pk-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pk-tg { margin-left: auto; font-size: .72rem; font-weight: 800; color: #16181d; background: var(--yellow); border-radius: 999px; padding: 2px 9px; }
.pk h3 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.pk h3 a { color: var(--ink); text-decoration: none; }
.pk-prices { display: grid; grid-template-columns: auto auto 1fr; align-items: end; gap: 4px 10px; }
.pk-prices small { display: block; font-size: .7rem; opacity: .75; }
.pk-now b { font-size: 1rem; }
.pk-arrow { font-size: 1.4rem; font-weight: 900; color: var(--red); line-height: 1.4; }
.pk-then b { font-size: 1.45rem; font-weight: 900; color: var(--red-ink); }
.pk-gain { grid-column: 1 / -1; justify-self: start; width: max-content; font-weight: 900; font-size: .95rem; color: #fff; background: var(--red); border-radius: 999px; padding: 3px 12px; }
.pk-range { margin: 0; font-size: .76rem; opacity: .8; }
.pk-buy { margin-top: auto; justify-content: center; }
.rb { width: 100%; height: auto; display: block; overflow: visible; }
.rb-track { fill: var(--soft); }
.rb-band { fill: var(--yellow); opacity: .75; }
.rb-base { fill: var(--ink); opacity: .85; }
.rb-mid { fill: var(--red); }
.rb-t { font-size: 9px; fill: var(--muted); font-weight: 700; }
.rb-tm { fill: var(--red-ink); }
.data-viz { margin: 26px 0; }
.dv-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.dv-card { margin: 0; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dv-card figcaption b { display: block; font-size: 1.05rem; }
.dv-card figcaption span { display: block; font-size: .76rem; opacity: .75; margin-bottom: 6px; }
.dv-point { margin: 8px 0 0; font-size: .86rem; }
.dv-point b { background: linear-gradient(transparent 60%, rgba(255, 207, 0, .7) 60%); }
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ax { font-size: 13px; fill: var(--muted); }
.ch-band { fill: var(--yellow); opacity: .45; }
.ch-line { fill: none; stroke: var(--red); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--card); stroke: var(--red); stroke-width: 3; }
.ch-lab { font-size: 15px; font-weight: 900; fill: var(--red-ink); }
.tb-bar { fill: var(--muted); opacity: .45; }
.tb-hi { fill: var(--red); opacity: .7; }
.tb-top { fill: var(--red); opacity: 1; }
.tb-v { font-size: 14px; }
.tb-all { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 4; }
@media (max-width: 639px) {
  .pk-banner { padding: 16px; }
  .pk { padding: 12px; }
  .pk-then b { font-size: 1.25rem; }
}

/* ---------- いま公式より安いセット(楽天の最安値。2026-11-17。scripts/lego/lego_prices.py) */
.drops { margin: 22px 0 26px; }
.dr-head { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 22px 18px; margin: 0 0 14px; color: #fff;
  background: radial-gradient(circle at 12px 12px, rgba(255, 255, 255, .12) 0 5px, transparent 6px) 0 0 / 28px 28px,
    linear-gradient(135deg, #e3000b 0%, #b80009 100%); }
.dr-kicker { margin: 0 0 4px; font-size: .76rem; font-weight: 900; letter-spacing: .08em; opacity: .92; }
.dr-head h2 { margin: 0; font-size: clamp(1.35rem, 4.8vw, 2.05rem); font-weight: 900; line-height: 1.25; }
.dr-sub { margin: 6px 0 0; font-size: .88rem; font-weight: 700; opacity: .95; }
.dr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.dr { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--card);
  border: 2px solid var(--line); box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.dr:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.dr:first-child { border-color: var(--red); }
.dr-badge { margin: 0; align-self: flex-start; display: inline-flex; align-items: baseline; gap: 2px; padding: 4px 14px 5px; border-radius: 999px;
  background: var(--yellow); color: #16181d; font-weight: 900; font-size: .95rem; box-shadow: 3px 3px 0 #16181d; }
.dr-badge b { font-size: 1.9rem; line-height: 1; color: var(--red); letter-spacing: -.02em; }
.dr-badge small { font-size: .82rem; font-weight: 800; margin-left: 4px; }
.dr-body h3 { margin: 2px 0 4px; font-size: 1.05rem; line-height: 1.35; }
.dr-body h3 a { color: var(--ink); text-decoration: none; }
.dr-body h3 a:hover { text-decoration: underline; }
.dr-prices { margin: 0; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.dr-prices small { display: block; font-size: .7rem; opacity: .75; }
.dr-off s { font-size: .98rem; color: var(--muted); }
.dr-arrow { font-size: 1.3rem; font-weight: 900; color: var(--red); line-height: 1.5; }
.dr-now b { font-size: 1.55rem; font-weight: 900; color: var(--red-ink); }
.dr-meta { margin: 4px 0 0; font-size: .76rem; color: var(--muted); }
.dr-buy { margin-top: auto; justify-content: center; }
.dr-note { margin-top: 10px; font-size: .78rem; }
.rk-box { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--red); }
.rk-h { margin: 0 0 2px; font-size: .8rem; font-weight: 800; opacity: .8; }
.rk-main { margin: 0; }
.rk-main b { font-size: 1.35rem; color: var(--red-ink); margin-right: 8px; }
.rk-main small { display: block; font-size: .8rem; opacity: .85; }
.rk-drop { display: inline-block; font-weight: 900; font-size: .85rem; color: #16181d; background: var(--yellow); border-radius: 999px; padding: 2px 10px; vertical-align: .15em; }
.rk-box .meta { margin: 6px 0 8px; font-size: .74rem; }
@media (max-width: 639px) {
  .dr-head { padding: 16px; }
  .dr { padding: 12px; }
  .dr-now b { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { .dr:hover { transform: none; } }
/* テーマ別のページへのリンク(トップ・テーマのページ) */
.related .c { font-weight: 600; opacity: .6; margin-left: 6px; font-variant-numeric: tabular-nums; }
.theme-nav { margin: 22px 0 6px; }
.theme-nav-h { font-size: .86rem; font-weight: 800; color: var(--muted); margin: 0 0 8px; }
.theme-nav-h a { font-weight: 600; }
.theme-nav .related { margin: 0; }
