/* =========================================================
   マジカ!?サイエンス  — style.css
   ポップ×知的。太い線とオフセット影の「ネオ・ブルータル」+ 動くビジュアル
   ========================================================= */

:root {
  --bg: #fffbf0;
  --bg2: #fff3d1;
  --card: #ffffff;
  --ink: #15131f;
  --ink2: #5b586f;
  --line: #15131f;
  --ink-fixed: #15131f;
  --pop: #ffe14d;
  --pink: #ff3d7f;
  --blue: #2f6bff;
  --green: #00b894;
  --red: #e8414f;
  --shadow: 4px 4px 0 var(--line);
  --shadow-lg: 7px 7px 0 var(--line);
  --r: 18px;
  --r-sm: 12px;
  --font: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', Meiryo, system-ui, sans-serif;
  --display: 'Dela Gothic One', 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  --header-h: 112px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e0d16;
    --bg2: #17152a;
    --card: #1b1930;
    --ink: #f5f3ff;
    --ink2: #b5b1d6;
    --line: #3d3a5c;
    --shadow: 4px 4px 0 #000;
    --shadow-lg: 7px 7px 0 #000;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0e0d16;
  --bg2: #17152a;
  --card: #1b1930;
  --ink: #f5f3ff;
  --ink2: #b5b1d6;
  --line: #3d3a5c;
  --shadow: 4px 4px 0 #000;
  --shadow-lg: 7px 7px 0 #000;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
img,
svg {
  max-width: 100%;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: 0.01em;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
}
.wrap-narrow {
  width: min(760px, 100% - 32px);
  margin-inline: auto;
}
.wrap-wide {
  width: min(1100px, 100% - 32px);
  margin-inline: auto;
}
.center {
  text-align: center;
  margin: 32px 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--pop);
  color: var(--ink-fixed);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}

/* ---------- 読書プログレス ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 60;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--pink), var(--pop), var(--blue));
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 2px solid var(--line);
  transition: transform 0.3s ease;
}
.site-header.hide {
  transform: translateY(-100%);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark svg {
  width: 40px;
  height: 40px;
  display: block;
  animation: wobble 4s ease-in-out infinite;
  font-family: var(--display);
}
.logo-mark circle {
  stroke: var(--line);
  stroke-width: 2.5;
}
.logo-text {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo-q {
  color: var(--pink);
  display: inline-block;
  animation: pop-q 2.6s ease-in-out infinite;
}
.logo-text small {
  font-size: 12px;
  font-family: var(--font);
  font-weight: 900;
  margin-left: 6px;
  padding: 3px 7px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  letter-spacing: 0.1em;
}
.main-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.main-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s;
}
.main-nav a:hover,
.main-nav a.on {
  background: var(--pop);
  color: var(--ink-fixed);
}
.header-tools {
  display: flex;
  gap: 6px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 2px 2px 0 var(--line);
  transition: transform 0.15s, box-shadow 0.15s;
}
.icon-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--line);
}
.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--line);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cat-nav {
  border-top: 1px solid color-mix(in srgb, var(--line) 25%, transparent);
}
.cat-nav-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.cat-nav-inner::-webkit-scrollbar {
  display: none;
}
.cat-nav a {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.cat-nav a:hover,
.cat-nav a.on {
  border-color: var(--cat);
  background: color-mix(in srgb, var(--cat) 16%, transparent);
}

/* ---------- ティッカー ---------- */
.ticker {
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
}
.ticker-label {
  flex-shrink: 0;
  background: var(--pink);
  color: #fff;
  font-weight: 900;
  padding: 8px 14px;
  z-index: 1;
}
.ticker-track {
  overflow: hidden;
  flex: 1;
}
.ticker-move {
  display: flex;
  gap: 36px;
  width: max-content;
  animation: marquee 90s linear infinite;
  padding-left: 24px;
}
.ticker:hover .ticker-move {
  animation-play-state: paused;
}
.ticker a {
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.92;
}
.ticker a:hover {
  opacity: 1;
  text-decoration: underline;
}
.ticker b {
  color: var(--pop);
  margin-right: 8px;
  font-weight: 700;
}

/* ---------- チップ・バッジ ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat, var(--pop)) 18%, var(--card));
  color: var(--ink);
  border: 1.5px solid color-mix(in srgb, var(--cat, var(--pop)) 70%, var(--line));
  white-space: nowrap;
}
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 900;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink-fixed);
  box-shadow: 2px 2px 0 var(--line);
}
.v-true {
  background: #c9f7e5;
}
.v-false {
  background: #ffd3d6;
}
.v-half {
  background: #fff0b3;
}
.verdict-big {
  font-size: 16px;
  padding: 6px 14px;
  transform: rotate(-4deg);
  animation: stamp 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) 0.3s both;
}
.card-media .verdict {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 12px;
}
.new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--pink);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 2px solid var(--line);
  animation: pulse-badge 0.8s ease-in-out 2;
}
.rank-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  font-family: var(--display);
  font-size: 22px;
  background: var(--pop);
  color: var(--ink-fixed);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line);
}

/* マジか度メーター */
.maji {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 11px;
  font-weight: 900;
}
.maji-label {
  margin-right: 4px;
  color: var(--ink2);
  font-size: 11px;
}
.maji i {
  font-style: normal;
  font-family: var(--display);
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 18%, transparent);
  letter-spacing: -0.08em;
}
.maji i.on {
  color: var(--pink);
}
.maji-big {
  padding: 4px 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
}
.maji-big i {
  font-size: 15px;
}
.maji-big i.on {
  display: inline-block;
  animation: maji-pop 0.5s cubic-bezier(0.2, 1.8, 0.4, 1) both;
  animation-delay: calc(0.4s + var(--i) * 0.09s);
}

/* ---------- ビジュアル（モーション画像） ---------- */
.visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg2);
  isolation: isolate;
}
.visual svg.motion {
  display: block;
  width: 100%;
  height: 100%;
}
.visual.has-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.visual.has-img img.bg {
  animation: kenburns 22s ease-in-out infinite alternate;
}
.visual.has-fg img.fg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  animation: ma-float 6s ease-in-out infinite;
  --d: 6s;
}
.visual::after {
  display: none;
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: shine 6s ease-in-out infinite;
  mix-blend-mode: soft-light;
}
/* カードはホバー時だけ動かす（トップの描画を軽く）。ヒーロー・図・特集カードは常時モーション */
.card .visual svg *,
.rk-vis .visual svg * {
  animation-play-state: paused;
}
.card:hover .visual svg *,
.card:focus-within .visual svg *,
.card-xl .visual svg *,
.rk-vis:hover .visual svg * {
  animation-play-state: running;
}
.card:hover .visual::after,
.article-hero .visual::after,
.card-xl .visual::after {
  display: block;
}
/* 画面外のアニメは一時停止して軽く */
.visual:not(.in-view) *,
.visual:not(.in-view)::after {
  animation-play-state: paused !important;
}

/* ---------- カード ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.2s;
}
.card:hover {
  transform: translate(-3px, -3px) rotate(-0.4deg);
  box-shadow: var(--shadow-lg);
}
.card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}
.card-media {
  position: relative;
  border-bottom: 2px solid var(--line);
}
.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-title {
  font-size: 16.5px;
  font-weight: 900;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title {
  text-decoration: underline;
  text-decoration-color: var(--cat);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.card-sum {
  margin: 0;
  color: var(--ink2);
  font-size: 14px;
  line-height: 1.7;
}
.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink2);
}
.card-meta .read::before {
  content: '⏱ ';
}
.card-xl .card-title {
  font-size: clamp(20px, 2.6vw, 28px);
  -webkit-line-clamp: 4;
}
.card-xl .card-body {
  padding: 18px 22px 22px;
}
.card-row .card-link {
  flex-direction: row;
}
.card-row .card-media {
  width: 42%;
  flex-shrink: 0;
  border-bottom: 0;
  border-right: 2px solid var(--line);
}
.card-row .card-media .visual {
  height: 100%;
  min-height: 112px;
  aspect-ratio: auto;
}
.card-row .card-media .visual svg.motion {
  position: absolute;
  inset: 0;
}
.card-row .card-media .verdict,
.card-row .new-badge {
  transform: scale(0.85);
}
.card-row .card-title {
  font-size: 14.5px;
}
.card-row .card-body {
  padding: 10px 12px;
}
.card-row .maji-label {
  display: none;
}
.card-sm {
  width: 270px;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.card-sm .card-title {
  font-size: 15px;
}

/* ---------- トップ ---------- */
.hero-home {
  padding: 28px 0 8px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  align-items: start;
}
.hero-side {
  display: grid;
  gap: 14px;
  padding-top: 38px;
}
.hero-kicker {
  margin: 0 0 10px;
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blink-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 var(--pink);
  animation: ping 1.6s infinite;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 56px 0 18px;
  flex-wrap: wrap;
}
.sec-title {
  font-weight: 900;
  font-size: 20px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-title.big {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  margin: 0;
}
.sec-head .sec-title.big {
  margin: 0;
}
.related .sec-title.big {
  margin: 56px 0 20px;
}
.sec-note {
  color: var(--ink2);
  font-size: 13px;
}
.more {
  font-weight: 900;
  text-decoration: none;
  border-bottom: 3px solid var(--pop);
}

/* 3秒クイズ */
.quick-quiz {
  margin-top: 40px;
}
.qq-inner {
  position: relative;
  background: var(--pop);
  color: var(--ink-fixed);
  border: 2px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 28px clamp(18px, 4vw, 44px);
  text-align: center;
  overflow: hidden;
}
.qq-inner::before,
.qq-inner::after {
  content: '?';
  position: absolute;
  font-family: var(--display);
  font-size: 160px;
  opacity: 0.08;
  top: -30px;
  left: 2%;
  animation: ma-float 5s ease-in-out infinite;
}
.qq-inner::after {
  content: '!';
  left: auto;
  right: 4%;
  top: auto;
  bottom: -50px;
  animation-delay: -2s;
}
.qq-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 32px);
  margin: 6px 0 0;
}
.qq-badge {
  display: inline-block;
  background: var(--ink-fixed);
  color: var(--pop);
  font-weight: 900;
  font-size: 13px;
  padding: 3px 12px;
  border-radius: 999px;
}
.qq-q {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 900;
  margin: 18px auto;
  max-width: 720px;
  min-height: 2.8em;
}
.qq-btns,
.mq-btns,
.qg-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-true,
.btn-false {
  font-weight: 900;
  font-size: 18px;
  padding: 12px 28px;
  border-radius: 16px;
  border: 2px solid var(--ink-fixed);
  box-shadow: 4px 4px 0 var(--ink-fixed);
  min-width: 150px;
  color: var(--ink-fixed);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-true {
  background: #c9f7e5;
}
.btn-false {
  background: #ffd3d6;
}
.btn-true:hover,
.btn-false:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink-fixed);
}
.btn-true:active,
.btn-false:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink-fixed);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none !important;
}
.qq-res {
  margin-top: 16px;
  animation: rise-in 0.4s ease both;
}
.qq-res p {
  font-weight: 700;
  margin: 0 auto 10px;
  max-width: 680px;
}
.qq-read {
  font-weight: 900;
  margin-right: 14px;
}
.qq-next {
  border: 2px solid var(--ink-fixed);
  background: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 900;
  color: var(--ink-fixed);
}
.qq-more {
  display: inline-block;
  margin-top: 18px;
  font-weight: 900;
  font-size: 14px;
}
.correct-flash {
  animation: correct 0.6s ease;
}
.wrong-shake {
  animation: shake 0.45s ease;
}

/* ランキング */
.ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.ranking a {
  display: grid;
  grid-template-columns: 54px 120px 1fr;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px 10px 10px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.ranking a:hover {
  transform: translateX(4px);
}
.rk-num {
  font-family: var(--display);
  font-size: 34px;
  text-align: center;
  color: var(--ink);
  -webkit-text-stroke: 1px var(--line);
}
.ranking li:nth-child(1) .rk-num {
  color: #f5b800;
  font-size: 42px;
}
.ranking li:nth-child(2) .rk-num {
  color: #a9b4c2;
  font-size: 38px;
}
.ranking li:nth-child(3) .rk-num {
  color: #d68a4a;
  font-size: 36px;
}
.rk-vis .visual {
  border-radius: 10px;
  border: 2px solid var(--line);
}
.rk-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.rk-body strong {
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* カテゴリタイル */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 18px 18px 16px;
  border-radius: var(--r);
  border: 2px solid var(--line);
  background: linear-gradient(150deg, color-mix(in srgb, var(--cat) 26%, var(--card)), var(--card) 70%);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s;
}
.cat-tile:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
}
.cat-emoji {
  font-size: 34px;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.2, 1.8, 0.4, 1);
}
.cat-tile:hover .cat-emoji {
  transform: scale(1.3) rotate(-10deg);
}
.cat-tile strong {
  font-size: 17px;
  font-weight: 900;
}
.cat-tile small {
  color: var(--ink2);
  font-size: 12.5px;
  line-height: 1.6;
}
.cat-count {
  position: absolute;
  top: 14px;
  right: 14px;
  font-weight: 900;
  font-size: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 1px 8px;
  border-radius: 999px;
}

/* 横スクロール */
.hscroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 8px 18px 4px;
  scrollbar-width: thin;
}

/* プロモ */
.promo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.promo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 22px;
  border-radius: var(--r);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink-fixed);
  transition: transform 0.2s;
}
.promo:hover {
  transform: translate(-2px, -2px);
}
.promo span {
  font-size: 36px;
}
.promo strong {
  font-size: 20px;
  font-weight: 900;
}
.promo small {
  font-size: 13px;
}
.promo-papers {
  background: #cfe0ff;
}
.promo-news {
  background: #c9f7f5;
}
.promo-quiz {
  background: #ffd6e5;
}

.btn-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  font-size: 17px;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-big:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.btn-big:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--line);
}
.btn-ghost {
  background: var(--card);
  color: var(--ink);
}
.btn-x {
  background: #15131f;
  color: #fff;
}

/* ---------- 一覧ヒーロー ---------- */
.list-hero {
  position: relative;
  padding: 48px 0 40px;
  margin-bottom: 32px;
  text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cat, var(--pop)) 30%, var(--bg)), var(--bg));
  border-bottom: 2px solid var(--line);
  overflow: hidden;
}
.list-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 46px);
  margin: 8px 0;
}
.list-hero p {
  max-width: 680px;
  margin: 8px auto;
  color: var(--ink2);
}
.list-emoji {
  display: inline-block;
  font-size: 56px;
  animation: ma-float 3s ease-in-out infinite;
  --d: 3s;
}
.list-count {
  display: inline-block !important;
  font-weight: 900;
  color: var(--ink) !important;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 16px;
}
.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 36px 0;
  flex-wrap: wrap;
}
.pager a,
.pager span {
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  background: var(--card);
}
.pager .pg-step {
  padding: 0 14px;
}
.pager .pg-gap {
  min-width: 20px;
  border: 0;
  background: none;
  color: var(--ink2);
}
.grid > .card[hidden] {
  display: none;
}
.pager .on {
  background: var(--pop);
  color: var(--ink-fixed);
}

/* ---------- 記事 ---------- */
.crumbs {
  font-size: 13px;
  color: var(--ink2);
  display: flex;
  gap: 8px;
  margin: 22px 0 10px;
  flex-wrap: wrap;
}
.crumbs a {
  text-decoration: none;
}
.crumbs a:hover {
  text-decoration: underline;
}
.head-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-title {
  font-weight: 900;
  font-size: clamp(25px, 4.6vw, 40px);
  line-height: 1.4;
  margin: 14px 0 16px;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--ink2);
}
.article-hero {
  margin: 26px auto 0;
  position: relative;
}
.article-hero .visual {
  border-radius: 24px;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.vis-note {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
}
.tldr {
  position: relative;
  margin: 34px 0 20px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 26px 22px 18px;
  box-shadow: var(--shadow);
}
.tldr-badge {
  position: absolute;
  top: -15px;
  left: 18px;
  background: var(--pink);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 3px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
}
.tldr-text {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
  line-height: 1.7;
}
.tldr-easy {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 2px dashed color-mix(in srgb, var(--line) 30%, transparent);
  font-weight: 700;
  font-size: 15px;
}
.tldr-easy span {
  display: inline-block;
  background: var(--pop);
  color: var(--ink-fixed);
  font-size: 12px;
  font-weight: 900;
  padding: 1px 8px;
  border-radius: 6px;
  margin-right: 8px;
}

/* 共有ボタン */
.share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.sh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
  background: var(--card);
  box-shadow: 2px 2px 0 var(--line);
  transition: transform 0.12s, box-shadow 0.12s;
}
.sh:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--line);
}
.sh svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.sh-x {
  background: #15131f;
  color: #fff;
}
.sh-line {
  background: #06c755;
  color: #fff;
}
.sh-hatena {
  background: #00a4de;
  color: #fff;
}
.share-compact .sh {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.sh-native {
  display: none;
}
.can-share .sh-native {
  display: inline-flex;
}

.toc {
  margin: 22px 0 8px;
  background: var(--bg2);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 12px 18px;
}
.toc summary {
  font-weight: 900;
  cursor: pointer;
}
.toc ol {
  margin: 8px 0 4px;
  padding-left: 1.4em;
}
.toc a {
  text-decoration: none;
  font-weight: 700;
}
.toc a:hover {
  text-decoration: underline;
}

/* 本文 */
.prose {
  font-size: 17px;
  line-height: 2;
}
.prose p {
  margin: 0 0 1.4em;
}
.prose h2 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: clamp(21px, 3.4vw, 26px);
  font-weight: 900;
  margin: 2.6em 0 1em;
  padding: 0 0 12px;
  border-bottom: 3px solid var(--line);
  position: relative;
}
.prose h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 30%;
  height: 3px;
  background: var(--cat, var(--pink));
}
.h-num {
  flex-shrink: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  background: var(--cat, var(--pop));
  color: #fff;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 2px 8px;
  margin-top: 4px;
  text-shadow: 1px 1px 0 var(--ink-fixed);
}
.prose h3 {
  font-size: 19px;
  font-weight: 900;
  margin: 2em 0 0.8em;
  padding-left: 12px;
  border-left: 6px solid var(--cat, var(--pop));
}
.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.5em;
}
.prose li {
  margin: 0.3em 0;
}
.prose strong {
  font-weight: 900;
}
.prose mark {
  background: linear-gradient(transparent 55%, var(--pop) 55%);
  color: inherit;
  padding: 0 2px;
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.9s ease;
}
.prose mark.lit {
  background-size: 100% 100%;
}
:root[data-theme='dark'] .prose mark {
  background-image: linear-gradient(transparent 55%, rgba(255, 225, 77, 0.45) 55%);
}
.prose a {
  color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 5px solid var(--ink2);
  background: var(--bg2);
  border-radius: 0 12px 12px 0;
  color: var(--ink2);
}
.prose code {
  background: var(--bg2);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}
.prose hr {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 2em 0;
}

/* ボックス */
.box {
  margin: 1.8em 0;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  padding: 10px 16px;
  border-bottom: 2px solid var(--line);
  color: var(--ink-fixed);
}
.box-icon {
  font-size: 20px;
}
.box-body {
  padding: 14px 18px 4px;
  font-size: 16px;
  line-height: 1.9;
}
.box-body p {
  margin: 0 0 1em;
}
.box-point .box-head {
  background: #ffe14d;
}
.box-fact .box-head {
  background: #bcd4ff;
}
.box-myth .box-head {
  background: #ffc2cf;
}
.box-warn .box-head {
  background: #ffd8a8;
}
.box-note .box-head {
  background: #e0e0e8;
}
.box-expert .box-head {
  background: #d9cfff;
}
.box-term .box-head {
  background: #c9f0e4;
}
.box-debate .box-head {
  background: #ffb8a0;
}
.box-open .box-head {
  background: #e6e1d3;
}

.fig {
  margin: 2em 0;
}
.fig .visual {
  border-radius: var(--r);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
}
.fig figcaption {
  font-size: 13px;
  color: var(--ink2);
  text-align: center;
  margin-top: 10px;
}

.manga {
  margin: 2.4em 0;
  text-align: center;
}
.manga img {
  max-width: 420px;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

/* ポストカード */
.post-card {
  margin: 48px 0 24px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 24px;
  padding: 24px clamp(18px, 4vw, 34px);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.post-label {
  margin: 0 0 6px;
  font-weight: 900;
  color: var(--pop);
}
.post-text {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
}
.post-card .sh {
  border-color: var(--bg);
}
/* コピー・共有ボタンは背景が白なので、文字は常に濃い色に（暗い枠の中でも読めるように） */
.sh-copy,
.sh-native {
  background: #fff;
  color: #15131f;
}

/* マジか！ボタン */
.react {
  text-align: center;
  margin: 26px 0;
}
.react-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  padding: 12px 30px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.react-btn:hover {
  transform: scale(1.05) rotate(-2deg);
}
.react-btn .react-emoji {
  font-size: 28px;
  display: inline-block;
}
.react-btn.on {
  background: var(--pink);
  color: #fff;
}
.react-btn.on .react-emoji {
  animation: maji-pop 0.6s cubic-bezier(0.2, 1.8, 0.4, 1);
}
.react-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink2);
}
.confetti {
  position: fixed;
  pointer-events: none;
  z-index: 90;
  font-size: 22px;
  animation: confetti 1.1s ease-out forwards;
}

/* 記事内クイズ */
.mini-quiz {
  margin: 40px 0;
  padding: 24px;
  border-radius: var(--r);
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
  box-shadow: var(--shadow);
  text-align: center;
}
.mini-quiz .sec-title {
  justify-content: center;
}
.mq-q {
  font-size: 18px;
  font-weight: 900;
}
.mq-explain {
  margin: 16px 0 0;
  font-weight: 700;
  animation: rise-in 0.4s ease both;
}

/* 出典 */
.sources {
  margin: 44px 0 20px;
}
.sources ol {
  padding-left: 1.4em;
  margin: 0 0 18px;
}
.sources li {
  margin: 8px 0;
  font-size: 14.5px;
  line-height: 1.6;
  word-break: break-word;
}
.sources li a {
  color: var(--blue);
  font-weight: 700;
}
.src-host {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  color: var(--ink2);
  background: var(--bg2);
  padding: 0 6px;
  border-radius: 4px;
}
.evidence-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.ev-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.ev-btn:hover {
  transform: translate(-2px, -2px);
}
.ev-btn strong {
  display: block;
  font-size: 15px;
}
.ev-btn small {
  display: block;
  font-size: 12px;
  color: var(--ink2);
}
.ev-ico {
  font-size: 28px;
}
.ev-consensus {
  background: linear-gradient(135deg, color-mix(in srgb, #2f6bff 18%, var(--card)), var(--card));
}
.copyright-note {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.8;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg2);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
}
.tags a {
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
}
.tags a:hover {
  background: var(--pop);
  color: var(--ink-fixed);
}
.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 30px 0;
}
.pn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
}
.pn small {
  color: var(--ink2);
  font-weight: 900;
}
.pn-next {
  text-align: right;
}
.pn:hover {
  background: var(--bg2);
}

/* スマホ下部の共有バー */
.float-share {
  display: none;
}

/* ---------- クイズゲーム ---------- */
.quiz-game {
  padding: 40px 0 60px;
  text-align: center;
}
.qg-start,
.qg-play,
.qg-end {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 28px;
  padding: 36px clamp(18px, 4vw, 40px);
  box-shadow: var(--shadow-lg);
}
.qg-emoji {
  font-size: 64px;
  display: inline-block;
  animation: ma-float 3s ease-in-out infinite;
  --d: 3s;
}
.qg-start h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 6vw, 54px);
  margin: 10px 0;
  line-height: 1.25;
}
.qg-top {
  display: flex;
  justify-content: space-between;
  font-weight: 900;
}
.qg-bar {
  height: 10px;
  background: var(--bg2);
  border-radius: 999px;
  margin: 12px 0 24px;
  overflow: hidden;
  border: 2px solid var(--line);
}
.qg-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--pop));
  width: 0;
  transition: width 0.4s;
}
.qg-q {
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 900;
  min-height: 3em;
  margin: 0 0 24px;
}
.qg-res {
  margin-top: 22px;
  animation: rise-in 0.4s ease both;
}
.qg-judge {
  font-family: var(--display);
  font-size: 34px;
  margin: 0;
}
.qg-res a {
  display: inline-block;
  margin: 4px 0 16px;
  font-weight: 900;
  color: var(--blue);
}
.qg-rank {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 44px);
  margin: 0;
}
.qg-final {
  font-size: 22px;
  font-weight: 900;
}
.qg-final b {
  font-family: var(--display);
  font-size: 64px;
  color: var(--pink);
  font-weight: 400;
}
.qg-end-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ---------- 論文ライブラリ・速報 ---------- */
.papers,
.news-list {
  padding-bottom: 40px;
}
.news-ja {
  font-size: 16px;
  font-weight: 900;
}
.news-say {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink2);
}
.news-fire {
  margin-left: auto;
  font-size: 11px;
}
.news-en summary {
  cursor: pointer;
  font-size: 11.5px;
  color: var(--ink2);
}
.news-en span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink2);
  font-family: Georgia, serif;
  letter-spacing: 0;
}
.host-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.host-cloud span {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--line);
}
.host-cloud b {
  color: var(--pink);
}
.papers-filter input,
.search-form input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.papers-filter {
  margin-bottom: 22px;
}
.paper-group {
  margin: 14px 0;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
}
.paper-group summary {
  cursor: pointer;
  font-weight: 900;
  padding: 12px 18px;
  background: color-mix(in srgb, var(--cat, var(--pop)) 20%, var(--card));
  border-bottom: 2px solid var(--line);
}
.paper-group summary small {
  font-weight: 700;
  color: var(--ink2);
  margin-left: 6px;
}
.paper-group ul {
  margin: 0;
  padding: 6px 18px 12px 34px;
}
.paper-group li {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.paper-group li > a {
  font-weight: 700;
  color: var(--blue);
}
.paper-from,
.paper-en {
  display: block;
  font-size: 12px;
  color: var(--ink2);
}
.paper-from a {
  color: inherit;
}
.empty {
  text-align: center;
  color: var(--ink2);
  padding: 30px 0;
}

/* 検索 */
.search-form {
  display: flex;
  gap: 8px;
  max-width: 640px;
  margin: 18px auto 0;
}
.search-form button {
  flex-shrink: 0;
  font-weight: 900;
  padding: 0 22px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
  box-shadow: var(--shadow);
}
.search-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.search-suggest a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
}
.search-count {
  font-weight: 900;
}

/* 静的ページ */
.static {
  padding-bottom: 40px;
}

/* ---------- フッター ---------- */
.site-footer {
  margin-top: 80px;
  background: var(--ink);
  color: var(--bg);
  border-top: 2px solid var(--line);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.site-footer h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--pop);
}
.site-footer ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 14px;
}
.site-footer li {
  margin: 6px 0;
}
.site-footer a {
  text-decoration: none;
  opacity: 0.88;
}
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}
.logo-foot .logo-text small {
  background: var(--bg);
  color: var(--ink);
}
.foot-tag {
  font-weight: 900;
  margin: 12px 0 6px;
}
.foot-small {
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.8;
}
.foot-bottom {
  border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent);
  margin-top: 24px;
  padding-top: 18px;
  font-size: 12px;
  opacity: 0.85;
}

/* トースト */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 95;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- スクロール出現 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal].shown {
  opacity: 1;
  transform: none;
}
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ---------- モーションSVG用アニメーション ---------- */
.ma-twinkle,
.ma-float,
.ma-rise,
.ma-spin,
.ma-spin-rev,
.ma-pulse,
.ma-sway,
.ma-dash,
.ma-draw,
.ma-drift,
.ma-blink,
.ma-flip,
.ma-beat,
.ma-smoke,
.ma-slide,
.ma-search {
  animation-duration: var(--d, 3s);
  animation-delay: var(--dl, 0s);
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  transform-box: fill-box;
  transform-origin: center;
}
.ma-twinkle {
  animation-name: ma-twinkle;
}
.ma-float {
  animation-name: ma-float;
}
.ma-rise {
  animation-name: ma-rise;
  animation-timing-function: linear;
}
.ma-spin {
  animation-name: ma-spin;
  animation-timing-function: linear;
}
.ma-spin-rev {
  animation-name: ma-spin;
  animation-direction: reverse;
  animation-timing-function: linear;
}
.ma-pulse {
  animation-name: ma-pulse;
}
.ma-sway {
  animation-name: ma-sway;
}
.ma-dash {
  animation-name: ma-dash;
  animation-timing-function: linear;
}
.ma-draw {
  animation-name: ma-draw;
}
.ma-drift {
  animation-name: ma-drift;
  animation-timing-function: linear;
}
.ma-blink {
  animation-name: ma-blink;
}
.ma-flip {
  animation-name: ma-flip;
}
.ma-beat {
  animation-name: ma-beat;
}
.ma-smoke {
  animation-name: ma-smoke;
  animation-timing-function: ease-out;
}
.ma-slide {
  animation-name: ma-slide;
  animation-timing-function: linear;
}
.ma-search {
  animation-name: ma-search;
}

@keyframes ma-twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
@keyframes ma-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes ma-rise {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-90px);
    opacity: 0;
  }
}
@keyframes ma-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ma-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}
@keyframes ma-sway {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}
@keyframes ma-dash {
  from {
    stroke-dashoffset: 420;
  }
  to {
    stroke-dashoffset: -420;
  }
}
@keyframes ma-draw {
  0% {
    stroke-dashoffset: 1200;
  }
  60%,
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes ma-drift {
  from {
    transform: translateX(-60px);
  }
  to {
    transform: translateX(60px);
  }
}
@keyframes ma-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  95% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes ma-flip {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.1);
  }
}
@keyframes ma-beat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.18);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
  }
}
@keyframes ma-smoke {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: translate(30px, -120px) scale(2);
    opacity: 0;
  }
}
@keyframes ma-slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-260px);
  }
}
@keyframes ma-search {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  25% {
    transform: translate(60px, 20px) rotate(8deg);
  }
  50% {
    transform: translate(120px, -10px) rotate(-4deg);
  }
  75% {
    transform: translate(40px, -30px) rotate(6deg);
  }
}

/* UIアニメ */
@keyframes wobble {
  0%,
  100% {
    transform: rotate(0);
  }
  10% {
    transform: rotate(-12deg);
  }
  20% {
    transform: rotate(9deg);
  }
  30% {
    transform: rotate(0);
  }
}
@keyframes pop-q {
  0%,
  70%,
  100% {
    transform: translateY(0) scale(1);
  }
  80% {
    transform: translateY(-5px) scale(1.25) rotate(8deg);
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes kenburns {
  from {
    transform: scale(1.02) translate(0, 0);
  }
  to {
    transform: scale(1.14) translate(-2%, -1.5%);
  }
}
@keyframes shine {
  0%,
  70% {
    background-position: 150% 0;
  }
  100% {
    background-position: -50% 0;
  }
}
@keyframes stamp {
  0% {
    transform: scale(2.4) rotate(-14deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(-4deg);
    opacity: 1;
  }
}
@keyframes maji-pop {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 70%, transparent);
  }
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}
@keyframes pulse-badge {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes correct {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px rgba(0, 184, 148, 0.35);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}
@keyframes confetti {
  0% {
    transform: translate(0, 0) rotate(0) scale(0.6);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1.1);
    opacity: 0;
  }
}

/* ---------- レスポンシブ ---------- */
/* ヘッダー1行（ロゴ+ナビ6本+ツール）は約1170px必要。狭い幅で横スクロールを生まないよう段階的に畳む */
@media (max-width: 1220px) {
  .main-nav {
    gap: 2px;
  }
  .main-nav a {
    font-size: 13px;
    padding: 8px 9px;
  }
}
@media (max-width: 1120px) {
  .main-nav {
    display: none;
  }
  .header-tools {
    margin-left: auto;
  }
}
@media (max-width: 960px) {
  .main-nav {
    display: none;
  }
  .header-tools {
    margin-left: auto;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-side {
    padding-top: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 15.5px;
  }
  .header-inner {
    height: 56px;
    gap: 8px;
  }
  .logo-mark svg {
    width: 34px;
    height: 34px;
  }
  .logo-text {
    font-size: 19px;
  }
  .logo-text small {
    display: none;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
  }
  .grid {
    gap: 18px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .ranking {
    grid-template-columns: 1fr;
  }
  .ranking a {
    grid-template-columns: 38px 88px 1fr;
    gap: 10px;
  }
  .rk-num {
    font-size: 26px;
  }
  .ranking li:nth-child(-n + 3) .rk-num {
    font-size: 30px;
  }
  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cat-tile small {
    display: none;
  }
  .prose {
    font-size: 16.5px;
  }
  .article-hero .visual {
    border-radius: 16px;
  }
  .prevnext {
    grid-template-columns: 1fr;
  }
  .pn-next {
    text-align: left;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-sm {
    width: 240px;
  }
  .btn-true,
  .btn-false {
    min-width: 0;
    flex: 1;
    padding: 12px 10px;
  }
  .page-article .float-share {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--line);
    transform: translateY(110%);
    transition: transform 0.3s;
  }
  .page-article .float-share.show {
    transform: none;
  }
  .float-share .share {
    margin: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .float-share .sh {
    flex: 1;
    justify-content: center;
    padding: 0 6px;
  }
  .float-share .sh-hatena {
    display: none;
  }
  .page-article .site-footer {
    padding-bottom: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* AI画像ラベル・研究カード */
.ai-label {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 3;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 7px;
  border-radius: 6px;
}
.card .ai-label {
  font-size: 9.5px;
}
.study-card {
  margin: 22px 0 0;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
}
.sc-head {
  font-weight: 900;
  padding: 8px 16px;
  background: #bcd4ff;
  color: var(--ink-fixed);
  border-bottom: 2px solid var(--line);
}
.study-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.study-card dl > div {
  padding: 10px 16px;
  border-right: 1px dashed color-mix(in srgb, var(--line) 35%, transparent);
}
.study-card dt {
  font-size: 11px;
  color: var(--ink2);
  font-weight: 700;
}
.study-card dd {
  margin: 0;
  font-weight: 900;
  font-size: 14px;
}
.page-article .mini-quiz {
  margin: 28px 0 0;
}
.card-row .new-badge {
  display: none;
}
.card-row .card-media .verdict {
  top: auto;
  bottom: 8px;
  right: 8px;
}

/* =========================================================
   v2: ブランド・ハンバーガー・TOPボタン・メガヒーロー
   ========================================================= */
.logo-stack {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-pre {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--ink2);
  margin: 0 0 3px 2px;
}
.cat-nav-inner {
  flex-wrap: wrap;
  overflow: visible;
  mask-image: none;
  justify-content: center;
  gap: 4px 6px;
}
.hscroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  overflow: visible;
}

/* ハンバーガー */
.burger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: center;
}
.burger span {
  display: block;
  width: 18px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s;
}
.burger:hover span:nth-child(1) {
  transform: translateX(-2px);
}
.burger:hover span:nth-child(3) {
  transform: translateX(2px);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 8, 25, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s;
}
.drawer-backdrop.open {
  opacity: 1;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  width: min(380px, 92vw);
  background: var(--bg);
  border-left: 2px solid var(--line);
  box-shadow: -8px 0 0 var(--line);
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.drawer.open {
  transform: none;
}
body.menu-open {
  overflow: hidden;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.drawer-head .icon-btn svg {
  stroke-width: 2.6;
}
.drawer-search {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.drawer-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.drawer-search button {
  border: 2px solid var(--line);
  background: var(--pop);
  border-radius: 12px;
  padding: 0 14px;
}
.drawer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.drawer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: 2px 2px 0 var(--line);
}
.drawer-links a span {
  font-size: 18px;
}
.drawer-label {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink2);
  letter-spacing: 0.12em;
}
.drawer-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.drawer-cats a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cat) 16%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--cat) 60%, var(--line));
}
.drawer-series {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-series a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 4px;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 30%, transparent);
}
.drawer-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 20px;
  font-size: 13px;
}
.drawer-theme {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 900;
}

/* TOPへ戻る（右下に浮上） */
.to-top {
  position: fixed;
  right: 18px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 45;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px) scale(0.6);
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  animation: tt-float 3s ease-in-out 0.5s infinite;
}
.to-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.to-top span {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-top: -2px;
}
.to-top:hover {
  background: var(--pink);
  color: #fff;
}
@keyframes tt-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* メガヒーロー */
.mega-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 500px at 80% -10%, #3b2f9e 0%, transparent 60%), radial-gradient(900px 500px at 0% 110%, #7a1e5c 0%, transparent 55%), #0e0b22;
  color: #fff;
  border-bottom: 2px solid var(--line);
}
.mh-bg i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(6px * var(--s));
  height: calc(6px * var(--s));
  border-radius: 50%;
  background: #ffe14d;
  box-shadow: 0 0 12px #ffe14d;
  opacity: 0.55;
  animation: ma-twinkle var(--d) ease-in-out infinite;
}
.mh-bg i:nth-child(3n) {
  background: #ff3d7f;
  box-shadow: 0 0 12px #ff3d7f;
}
.mh-bg i:nth-child(4n) {
  background: #7fd6ff;
  box-shadow: 0 0 12px #7fd6ff;
}
.mh-inner {
  position: relative;
  padding: clamp(40px, 7vw, 84px) 0 clamp(36px, 6vw, 70px);
}
.mh-pre {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: #ffe14d;
  font-size: 14px;
}
.mh-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 7.4vw, 84px);
  line-height: 1.12;
  margin: 10px 0 18px;
  letter-spacing: 0.01em;
}
.mh-line {
  display: block;
  animation: rise-in 0.8s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.mh-line + .mh-line {
  animation-delay: 0.15s;
}
.mh-title em {
  font-style: normal;
  background: linear-gradient(90deg, #ffe14d, #ff7aa8 60%, #7fd6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mh-title .mh-q {
  display: inline-block;
  font-weight: 400;
  color: #ffe14d;
  margin: 0 0.04em;
  transform-origin: 50% 80%;
  animation: pop-q 2.4s ease-in-out infinite;
}
.mh-lead {
  max-width: 640px;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.9;
  opacity: 0.92;
  margin: 0 0 24px;
}
.mh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}
.mh-stats div {
  padding: 10px 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
}
.mh-stats b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  color: #ffe14d;
  line-height: 1.1;
}
.mh-stats span {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}
.mh-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mega-hero .btn-big {
  border-color: #000;
  box-shadow: 4px 4px 0 #000;
}
.mega-hero .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

/* =========================================================
   English Corner
   ========================================================= */
.english-corner {
  margin: 44px 0 24px;
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, #2f6bff 14%, var(--card)), var(--card) 55%);
  box-shadow: var(--shadow-lg);
  padding: 22px clamp(16px, 4vw, 30px) 20px;
}
.ec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ec-flag {
  font-size: 36px;
}
.ec-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--blue);
}
.ec-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}
.ec-summary {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.ec-en p {
  margin: 0 0 1.1em;
}
.ec-en p:last-child {
  margin-bottom: 0;
}
.ec-en {
  flex: 1;
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17.5px;
  line-height: 1.75;
  letter-spacing: 0;
}
.speak-btn {
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 2px 2px 0 var(--line);
}
.speak-btn.sm {
  padding: 2px 8px;
  font-size: 12px;
}
.speak-btn.xs {
  padding: 0 6px;
  font-size: 11px;
  box-shadow: none;
  margin-left: 6px;
  border-width: 1.5px;
}
.speak-btn.speaking {
  background: var(--pink);
  color: #fff;
}
.ec-ja {
  margin: 10px 0 0;
}
.ec-ja summary {
  cursor: pointer;
  font-weight: 900;
  font-size: 14px;
  color: var(--blue);
}
.ec-ja p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.9;
}
.ec-ja p + p {
  margin-top: 12px;
}
.ec-label {
  margin: 18px 0 8px;
  font-weight: 900;
  font-size: 14px;
}
.vocab-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.vocab-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.vc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.vc-top strong {
  font-family: Georgia, serif;
  font-size: 17px;
  letter-spacing: 0;
}
.vc-pos {
  font-size: 11px;
  color: var(--ink2);
}
.vc-ja {
  font-weight: 900;
  font-size: 14px;
}
.vc-ex {
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--ink2);
  letter-spacing: 0;
  line-height: 1.6;
}
.ec-more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 900;
  color: var(--blue);
}

/* 動画・公式リンク・ガイド導線 */
.videos,
.official-links {
  margin: 36px 0;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.yt {
  margin: 0;
}
.yt-play {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.yt-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.yt-play:hover img {
  transform: scale(1.05);
}
.yt-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 46px;
  border-radius: 14px;
  background: #ff0033;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.yt iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--line);
  border-radius: 16px;
  display: block;
}
.yt figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 700;
}
.official-links ul {
  padding-left: 1.2em;
}
.official-links li {
  margin: 8px 0;
  font-size: 15px;
}
.official-links a {
  color: var(--blue);
  font-weight: 700;
}
.guide-links {
  margin: 30px 0;
  padding: 16px 18px;
  border-radius: var(--r);
  border: 2px dashed var(--line);
  background: var(--bg2);
}
.guide-links p {
  margin: 0 0 6px;
  font-weight: 900;
}
.guide-links a {
  display: block;
  font-weight: 700;
  color: var(--blue);
  margin: 4px 0;
}

/* =========================================================
   論文ライブラリ（見やすく）
   ========================================================= */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.stat {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 2px 2px 0 var(--line);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
}
.stat span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
}
.papers-tools {
  position: sticky;
  top: calc(var(--header-h) - 8px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  margin-bottom: 14px;
}
.papers-tools input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 13px 18px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.pfilter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.pfilter button {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
}
.pfilter button small {
  color: var(--ink2);
  font-weight: 700;
}
.pfilter button.on {
  background: var(--ink);
  color: var(--bg);
}
.pfilter button.on small {
  color: inherit;
  opacity: 0.7;
}
.papers-count {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink2);
}
.paper-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.paper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--line);
  border-left: 6px solid var(--cat);
  border-radius: 14px;
  padding: 14px 16px;
}
.paper[hidden] {
  display: none;
}
.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11.5px;
}
.ptype {
  font-weight: 900;
  padding: 1px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--line);
  color: var(--ink-fixed);
}
.st-doi {
  background: #bcd4ff;
}
.st-pubmed {
  background: #c9f7e5;
}
.st-arxiv {
  background: #ffd3d6;
}
.st-gov {
  background: #ffe14d;
}
.st-univ {
  background: #e5d4ff;
}
.st-other {
  background: #eee;
}
.pyear {
  font-weight: 900;
  font-family: var(--display);
  font-size: 13px;
}
.phost {
  color: var(--ink2);
}
.paper-title {
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}
.paper-title:hover {
  color: var(--blue);
  text-decoration: underline;
}
.paper-arts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px dashed color-mix(in srgb, var(--line) 30%, transparent);
  padding-top: 8px;
}
.paper-arts a {
  font-size: 12.5px;
  color: var(--ink2);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.paper-arts a:hover {
  color: var(--blue);
}

/* =========================================================
   英語ハブ（/english/）
   ========================================================= */
.en-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 80px) 0;
  margin-bottom: 30px;
  background: radial-gradient(800px 400px at 90% 0%, #2f6bff55, transparent 60%), radial-gradient(700px 400px at 0% 100%, #e8439355, transparent 60%), var(--bg2);
  border-bottom: 2px solid var(--line);
}
.en-kicker {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--blue);
}
.en-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 5.6vw, 60px);
  line-height: 1.2;
  margin: 10px 0 16px;
}
.en-hero h1 span {
  color: var(--pink);
}
.en-hero p {
  max-width: 640px;
}
.en-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.flash {
  max-width: 640px;
  margin: 0 auto;
}
.flash-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.flash-tools select,
.flash-tools button,
.flash-nav button:not(.speak-btn) {
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.flash-count {
  margin-left: auto;
  font-weight: 900;
  color: var(--ink2);
}
.flash-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 250px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  perspective: 1200px;
  padding: 0;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.3, 1.2, 0.4, 1);
}
.flash-card.flipped {
  transform: rotateY(180deg);
}
.fc-front,
.fc-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  backface-visibility: hidden;
  border-radius: 22px;
}
.fc-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--pop) 35%, var(--card)), var(--card));
}
.fc-word {
  font-family: Georgia, serif;
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: 0;
}
.fc-hint {
  font-size: 12px;
  color: var(--ink2);
}
.fc-pos {
  font-size: 13px;
  color: var(--ink2);
}
.fc-ja {
  font-size: 24px;
  font-weight: 900;
}
.fc-ex {
  font-family: Georgia, serif;
  font-size: 15px;
  color: var(--ink2);
  text-align: center;
  letter-spacing: 0;
}
.fc-src {
  font-size: 12px;
  color: var(--blue);
}
.flash-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}
.word-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px 18px;
}
.word-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 25%, transparent);
  font-size: 14px;
}
.word-list li[hidden] {
  display: none;
}
.word-list strong {
  font-family: Georgia, serif;
  letter-spacing: 0;
}
.wl-ja {
  flex: 1;
  color: var(--ink2);
}
.word-list a {
  font-size: 12px;
  white-space: nowrap;
}

/* =========================================================
   まとめガイド
   ========================================================= */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.guide-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 20px;
  border-radius: var(--r);
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.guide-tile:hover {
  transform: translate(-2px, -2px);
}
.guide-tile strong {
  font-size: 18px;
  font-weight: 900;
}
.guide-tile small {
  color: var(--ink2);
  font-size: 13px;
}
.guide-tile span {
  margin-top: auto;
  font-weight: 900;
  color: var(--blue);
  font-size: 13px;
}
.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.guide-sec {
  margin-bottom: 30px;
}
.faq {
  margin: 40px 0;
}
.faq .sec-title.big {
  margin-bottom: 14px;
}
.faq-item {
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  margin: 10px 0;
  padding: 12px 16px;
}
.faq-item summary {
  font-weight: 900;
  cursor: pointer;
}
.faq-item p {
  margin: 10px 0 0;
}

/* レスポンシブ（v2） */
.hide-sm {
}
@media (max-width: 960px) {
  .cat-nav {
    display: none;
  }
  :root {
    --header-h: 64px;
  }
}
@media (max-width: 640px) {
  .hide-sm {
    display: none !important;
  }
  .logo-pre {
    font-size: 9.5px;
  }
  .paper-grid {
    grid-template-columns: 1fr;
  }
  /* スマホでは固定しない（画面の1/3を覆い、内側スクロールと二重になるため） */
  .papers-tools {
    position: static;
    background: none;
    backdrop-filter: none;
    padding: 4px 0;
  }
  .page-article .to-top {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .to-top {
    width: 50px;
    height: 50px;
    right: 12px;
  }
  .ec-summary {
    flex-direction: column;
  }
  .mh-stats div {
    flex: 1 1 30%;
    padding: 8px 10px;
  }
}


/* ===== English Corner v2（レベル・4択・印刷） ===== */
.meta-en {
  text-decoration: none;
  font-weight: 900;
  color: var(--blue) !important;
}
.ec-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg2);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 14px;
}
.ec-levels button {
  border: 0;
  border-radius: 10px;
  padding: 9px 6px;
  font-weight: 900;
  font-size: 14px;
  background: transparent;
  color: var(--ink);
}
.ec-levels button.on {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 2px 2px 0 var(--pink);
}
.ec-wc {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--ink2);
  font-weight: 700;
}
.vc-lv {
  font-size: 10.5px;
  font-weight: 900;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  margin-left: auto;
}
.vc-note {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.6;
  background: var(--bg2);
  border-radius: 8px;
  padding: 4px 8px;
}
.ec-quiz {
  margin-top: 6px;
}
.ecq {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}
.ecq-q {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.6;
}
.ecq-q span {
  font-family: Georgia, serif;
  letter-spacing: 0;
}
.ecq-choices {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.ecq-choices button {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 9px 12px;
  font-family: Georgia, serif;
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.5;
  min-height: 44px;
  transition: background 0.15s, transform 0.1s;
}
.ecq-choices button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--pop) 35%, var(--bg));
}
.ecq-choices button:active:not(:disabled) {
  transform: scale(0.98);
}
.ecq-mark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-weight: 900;
  font-size: 12px;
  background: var(--ink);
  color: var(--bg);
}
.ecq-choices button.right {
  background: #c9f7e5;
  color: var(--ink-fixed);
  border-color: #00b894;
  opacity: 1;
}
.ecq-choices button.wrong {
  background: #ffd3d6;
  color: var(--ink-fixed);
  border-color: #e8414f;
  opacity: 1;
}
.ecq-explain {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  animation: rise-in 0.3s ease both;
}
.ecq-score {
  font-weight: 900;
  text-align: center;
  font-size: 16px;
  margin: 12px 0 0;
}
.ec-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 18px;
}
.ec-actions .btn-big {
  font-size: 15px;
  padding: 11px 20px;
}
.worksheet {
  display: none;
}

/* ===== スマホ最適化（v2） ===== */
@media (max-width: 640px) {
  .wrap,
  .wrap-narrow,
  .wrap-wide {
    width: calc(100% - 28px);
  }
  .site-header .header-inner {
    height: 58px;
  }
  .logo-text {
    font-size: 18px;
  }
  .logo-mark svg {
    width: 32px;
    height: 32px;
  }
  .article-title {
    font-size: clamp(22px, 6.4vw, 28px);
    line-height: 1.45;
  }
  .article-meta {
    gap: 6px 10px;
    font-size: 12px;
  }
  .article-hero {
    margin-top: 16px;
  }
  .prose {
    font-size: 16.5px;
    line-height: 1.95;
  }
  .prose h2 {
    font-size: 20px;
  }
  .box-body {
    padding: 12px 14px 2px;
    font-size: 15.5px;
  }
  .tldr {
    padding: 22px 16px 14px;
  }
  .tldr-text {
    font-size: 16.5px;
  }
  .share {
    gap: 6px;
  }
  .sh {
    height: 38px;
    padding: 0 11px;
    font-size: 13px;
  }
  .english-corner {
    padding: 18px 14px 16px;
    border-radius: 18px;
  }
  .ec-en {
    font-size: 16.5px;
  }
  .ec-levels button {
    font-size: 12.5px;
    padding: 9px 2px;
  }
  .vocab-list {
    grid-template-columns: 1fr;
  }
  .ec-actions .btn-big {
    width: 100%;
  }
  .card-body {
    padding: 12px 14px 14px;
  }
  .card-title {
    font-size: 16px;
  }
  .hero-home {
    padding-top: 18px;
  }
  .card-row .card-media {
    width: 38%;
  }
  .qq-inner {
    padding: 22px 16px;
    border-radius: 20px;
  }
  .sec-head {
    margin: 40px 0 14px;
  }
  .list-hero {
    padding: 34px 0 28px;
  }
  .mh-cta .btn-big {
    flex: 1 1 100%;
  }
  .btn-big {
    padding: 13px 22px;
    font-size: 16px;
  }
  .ranking a {
    padding: 8px 10px 8px 8px;
  }
  .rk-body strong {
    font-size: 13.5px;
  }
  .flash-card {
    min-height: 230px;
  }
  .word-list {
    grid-template-columns: 1fr;
  }
  .pfilter {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .pfilter button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  input,
  select,
  textarea {
    font-size: 16px !important; /* iOS のズーム防止 */
  }
}
@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
}

/* =========================================================
   印刷（記事をきれいに・英語プリントは A4 ワークシート）
   ========================================================= */
@media print {
  @page {
    size: A4;
    margin: 14mm 14mm 16mm;
  }
  :root {
    --bg: #fff;
    --bg2: #f4f4f4;
    --card: #fff;
    --ink: #111;
    --ink2: #444;
    --line: #222;
    --shadow: none;
    --shadow-lg: none;
  }
  body {
    background: #fff !important;
    color: #111;
    font-size: 11pt;
    line-height: 1.7;
  }
  .site-header,
  .site-footer,
  .progress,
  .drawer,
  .drawer-backdrop,
  .to-top,
  .float-share,
  .share,
  .react,
  .post-card,
  .mini-quiz,
  .related,
  .prevnext,
  .tags,
  .toc,
  .evidence-btns,
  .ec-actions,
  .videos,
  .toast,
  .skip,
  .ticker,
  .speak-btn {
    display: none !important;
  }
  .visual::after {
    display: none !important;
  }
  .visual svg * {
    animation: none !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .article-hero .visual {
    box-shadow: none;
    max-height: 70mm;
  }
  .box,
  .tldr,
  .study-card,
  .english-corner,
  .ecq {
    box-shadow: none !important;
    break-inside: avoid;
  }
  .prose h2 {
    break-after: avoid;
  }
  a {
    color: #111;
    text-decoration: none;
  }
  .sources a::after {
    content: ' <' attr(href) '>';
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }
  .ec-panel[hidden] {
    display: block !important;
  }

  /* ---- 英語プリント（ワークシートだけを印刷） ---- */
  body.print-english > *:not(main) {
    display: none !important;
  }
  body.print-english main > *:not(.worksheet) {
    display: none !important;
  }
  body.print-english .worksheet {
    display: block !important;
  }
  body.print-english .ws {
    display: none;
  }
  body[data-print-level='A2'].print-english .ws[data-ws-level='A2'],
  body[data-print-level='B1'].print-english .ws[data-ws-level='B1'],
  body[data-print-level='B2'].print-english .ws[data-ws-level='B2'] {
    display: block;
  }
  .ws-page {
    break-after: page;
    font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  }
  .ws-page:last-child {
    break-after: auto;
  }
  .ws-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10mm;
    border-bottom: 2.5pt solid #111;
    padding-bottom: 3mm;
    margin-bottom: 4mm;
  }
  .ws-brand {
    margin: 0;
    font-size: 8.5pt;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #444;
  }
  .ws-head h1 {
    margin: 1mm 0 0;
    font-size: 14pt;
    line-height: 1.4;
  }
  .ws-badge {
    flex-shrink: 0;
    border: 2pt solid #111;
    border-radius: 3mm;
    padding: 1.5mm 4mm;
    text-align: center;
    font-size: 8pt;
    font-weight: 900;
    line-height: 1.2;
  }
  .ws-badge b {
    font-size: 18pt;
  }
  .ws-name {
    font-size: 10pt;
    margin: 0 0 4mm;
  }
  .ws-page h2 {
    font-size: 11pt;
    margin: 5mm 0 2mm;
    padding: 1mm 3mm;
    background: #111;
    color: #fff;
    display: inline-block;
    border-radius: 1.5mm;
  }
  .ws-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12.5pt;
    line-height: 2;
    letter-spacing: 0;
    margin: 0;
    padding: 4mm 5mm;
    border: 1pt solid #999;
    border-radius: 2mm;
  }
  .ws-q {
    break-inside: avoid;
    margin: 3mm 0;
    font-family: Georgia, serif;
    font-size: 11pt;
    letter-spacing: 0;
  }
  .ws-q p {
    margin: 0 0 1mm;
  }
  .ws-q ol {
    margin: 0;
    padding-left: 9mm;
  }
  .ws-q li {
    margin: 0.6mm 0;
  }
  .ws-vocab {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    margin-top: 2mm;
  }
  .ws-vocab td {
    border-bottom: 0.6pt solid #999;
    padding: 1.6mm 2mm;
    vertical-align: top;
  }
  .ws-vocab td:first-child {
    font-family: Georgia, serif;
    width: 32%;
  }
  .ws-ans {
    margin: 2mm 0;
    font-size: 10.5pt;
  }
  .ws-ja {
    font-size: 10.5pt;
    line-height: 1.9;
  }
  .ws-text p,
  .ws-ja p {
    margin: 0 0 3mm;
  }
  .ws-text p:last-child,
  .ws-ja p:last-child {
    margin-bottom: 0;
  }
  .ws-foot {
    margin-top: 6mm;
    font-size: 8pt;
    color: #666;
    border-top: 0.6pt solid #999;
    padding-top: 2mm;
    word-break: break-all;
  }
}


.ec-flag {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 17px !important;
  color: #fff;
  background: linear-gradient(135deg, #2f6bff, #e84393);
  border: 2px solid var(--line);
  box-shadow: 2px 2px 0 var(--line);
}

/* =========================================================
   v3: コンパクトUI（タブ・行カード・アイコングリッド・アコーディオン）
   ========================================================= */
.home-tabs {
  margin-top: 36px;
}
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tab-bar button {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 900;
  font-size: 14px;
  transition: transform 0.15s;
}
.tab-bar button:hover {
  transform: translateY(-1px);
}
.tab-bar button.on {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 3px 3px 0 var(--pink);
}
.tab-panel {
  animation: rise-in 0.35s ease both;
}
.tab-more {
  margin: 18px 0 0;
}
.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.card-compact .card-title {
  font-size: 15px;
}
.card-compact .card-body {
  padding: 12px 14px 14px;
}
.cat-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.cat-icons a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 12px 12px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 24%, var(--card)), var(--card));
  box-shadow: 2px 2px 0 var(--line);
  font-weight: 900;
  font-size: 14px;
  transition: transform 0.15s;
}
.cat-icons a:hover {
  transform: translate(-1px, -1px);
}
.ci-emoji {
  font-size: 24px;
  line-height: 1;
}
.ci-n {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink2);
}
.promo-en {
  background: linear-gradient(135deg, #cfe0ff, #ffd6e5);
}

/* アコーディオン（スマホでは閉じた状態から） */
.src-details > summary,
.ec-details > summary {
  list-style: none;
  cursor: pointer;
}
.src-details > summary::-webkit-details-marker,
.ec-details > summary::-webkit-details-marker {
  display: none;
}
.src-details > summary::after {
  content: '▾';
  margin-left: auto;
  transition: transform 0.2s;
}
.src-details:not([open]) > summary::after {
  transform: rotate(-90deg);
}
.ec-summary-bar {
  display: none;
}
@media (max-width: 640px) {
  .ec-details:not([open]) {
    margin: -6px -2px;
  }
  .ec-summary-bar {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .ec-details[open] .ec-summary-bar {
    margin-bottom: 14px;
  }
  .ec-details[open] .ec-summary-bar ~ .ec-head {
    display: none;
  }
  .ecs-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
  }
  .ecs-text b {
    font-size: 15px;
  }
  .ecs-text small {
    font-size: 11.5px;
    color: var(--ink2);
  }
  .ecs-open {
    margin-left: auto;
    font-size: 12px;
    font-weight: 900;
    background: var(--ink);
    color: var(--bg);
    padding: 4px 10px;
    border-radius: 999px;
  }
  .ec-details[open] .ecs-open {
    background: var(--bg2);
    color: var(--ink);
  }
  .ec-details[open] .ecs-open::before {
    content: '閉じる';
  }
  .ec-details[open] .ecs-open {
    font-size: 0;
  }
  .ec-details[open] .ecs-open::before {
    font-size: 12px;
  }

  /* 一覧カードはスマホで横長の行カードにして縦の長さを半分に */
  .grid-3 .card,
  .grid-4 .card,
  .grid-2 .card {
    border-radius: 14px;
    box-shadow: 3px 3px 0 var(--line);
  }
  .grid-3 .card-link,
  .grid-4 .card-link,
  .grid-2 .card-link {
    flex-direction: row;
  }
  .grid-3 .card-media,
  .grid-4 .card-media,
  .grid-2 .card-media {
    width: 36%;
    flex-shrink: 0;
    border-bottom: 0;
    border-right: 2px solid var(--line);
  }
  .grid-3 .card-media .visual,
  .grid-4 .card-media .visual,
  .grid-2 .card-media .visual {
    height: 100%;
    min-height: 96px;
    aspect-ratio: auto;
  }
  .grid-3 .card-media .visual svg.motion,
  .grid-4 .card-media .visual svg.motion,
  .grid-2 .card-media .visual svg.motion {
    position: absolute;
    inset: 0;
  }
  .grid-3 .card-body,
  .grid-4 .card-body,
  .grid-2 .card-body {
    padding: 9px 11px 10px;
    gap: 5px;
  }
  .grid-3 .card-title,
  .grid-4 .card-title,
  .grid-2 .card-title {
    font-size: 14px;
    line-height: 1.5;
  }
  .grid-3 .card-sum,
  .grid-4 .card-sum {
    display: none;
  }
  .grid-3 .chip,
  .grid-4 .chip,
  .grid-2 .chip {
    font-size: 10.5px;
    padding: 0 7px;
  }
  .grid-3 .maji-label,
  .grid-4 .maji-label,
  .grid-2 .maji-label {
    display: none;
  }
  .grid-3 .card-media .verdict,
  .grid-4 .card-media .verdict,
  .grid-2 .card-media .verdict {
    top: auto;
    bottom: 6px;
    right: 6px;
    font-size: 10.5px;
    padding: 1px 6px;
  }
  .grid-3 .new-badge,
  .grid-4 .new-badge {
    display: none;
  }
  .grid-3 .rank-badge,
  .grid-4 .rank-badge {
    width: 30px;
    height: 30px;
    font-size: 16px;
    left: 6px;
    bottom: auto;
    top: 6px;
  }
  .grid-3,
  .grid-4,
  .grid-2 {
    gap: 10px;
  }
  .hero-side {
    gap: 10px;
  }
  .hero-side .card-row:nth-child(n + 4) {
    display: none;
  }
  .tab-bar {
    gap: 5px;
  }
  .tab-bar button {
    font-size: 12.5px;
    padding: 6px 10px;
  }
  .cat-icons {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .cat-icons a {
    flex-direction: column;
    gap: 2px;
    padding: 10px 4px 8px;
    font-size: 12px;
    text-align: center;
  }
  .ci-n {
    margin: 0;
  }
  .promo-row {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 36px;
  }
  .promo {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 2px 10px;
  }
  .promo span {
    font-size: 26px;
  }
  .promo strong {
    font-size: 16px;
  }
  .promo small {
    flex-basis: 100%;
  }
  .mega-hero .mh-inner {
    padding: 26px 0 24px;
  }
  .mh-title {
    font-size: 34px;
    margin: 6px 0 10px;
  }
  .mh-lead {
    font-size: 13.5px;
    margin-bottom: 14px;
  }
  .mh-stats {
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
  }
  .mh-stats div {
    flex: 1;
    padding: 6px 8px;
    text-align: center;
  }
  .mh-stats b {
    font-size: 20px;
  }
  .mh-stats span {
    font-size: 10.5px;
  }
  .mh-cta {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .mh-cta .btn-big {
    flex: 1;
    padding: 11px 8px;
    font-size: 14px;
  }
  .quick-quiz {
    margin-top: 30px;
  }
  .qq-q {
    font-size: 16px;
    margin: 12px auto;
    min-height: 0;
  }
  .related .sec-title.big {
    margin: 36px 0 14px;
  }
  .list-hero .list-emoji {
    font-size: 40px;
  }
  .list-hero h1 {
    font-size: 26px;
  }
  .study-card dl {
    grid-template-columns: 1fr 1fr;
  }
  .study-card dl > div {
    padding: 8px 12px;
  }
  .mini-quiz {
    padding: 16px 14px;
  }
  .mini-quiz .sec-title {
    font-size: 16px;
  }
  .mq-q {
    font-size: 15.5px;
  }
}
.fc-ex {
  white-space: pre-line;
}
.wl-g {
  font-size: 11px;
  font-weight: 900;
  color: var(--ink2);
}

/* エビデンス番付 */
.promo-evidence {
  background: #fff1b8;
}
.banzuke {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.bz-side {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px;
}
.bz-side h2 {
  font-family: var(--display);
  font-size: 20px;
  margin: 0 0 4px;
}
.bz-note {
  color: var(--ink2);
  font-size: 13px;
  margin: 0 0 12px;
}
.bz-side ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bz-side li a {
  display: grid;
  grid-template-columns: 4.6em 1fr;
  gap: 2px 10px;
  padding: 10px 0;
  border-top: 1px dashed color-mix(in srgb, var(--line) 30%, transparent);
  color: var(--ink);
  text-decoration: none;
}
.bz-side li:first-child a {
  border-top: 0;
}
.bz-rank {
  grid-row: span 2;
  align-self: center;
  text-align: center;
  font-weight: 900;
  font-size: 13px;
  padding: 6px 4px;
  border-radius: var(--r-sm);
  border: 2px solid var(--line);
}
.bz-east .bz-rank {
  background: var(--pop);
  color: var(--ink-fixed);
}
.bz-west .bz-rank {
  background: color-mix(in srgb, var(--red) 22%, var(--card));
}
.bz-title {
  font-weight: 700;
  line-height: 1.45;
}
.bz-stars,
.ev-stars {
  color: #e6a700;
  font-size: 13px;
  letter-spacing: 1px;
}
.ev-list {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ev-list li[hidden] {
  display: none;
}
.ev-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
}
.ev-list a:hover {
  box-shadow: var(--shadow);
}
.ev-badge .verdict {
  position: static;
}
.ev-main strong {
  display: block;
  line-height: 1.45;
}
.ev-main small {
  display: block;
  color: var(--ink2);
  font-size: 12.5px;
  margin-top: 2px;
}
.ev-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.ev-kind {
  color: var(--ink2);
  font-size: 11.5px;
  max-width: 12em;
}
@media (max-width: 640px) {
  .ev-list a {
    grid-template-columns: 1fr;
  }
  .ev-meta {
    align-items: flex-start;
    text-align: left;
  }
}

/* =========================================================
   英単語リスト v2（入試に出る順・カテゴリー別・レベル別）
   ========================================================= */
.en-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
}
.en-stats li {
  display: flex;
  flex-direction: column;
  min-width: 108px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow);
}
.en-stats b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
}
.en-stats span {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink2);
}
.wl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.wl-tabs button {
  font: inherit;
  font-weight: 900;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.wl-tabs button.on {
  background: var(--pop);
  color: var(--ink-fixed);
}
.wl-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.wl-cats[hidden] {
  display: none;
}
.wl-cat {
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 8px;
  align-items: center;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.wl-cat span {
  grid-row: span 2;
  font-size: 22px;
}
.wl-cat strong {
  font-size: 14px;
  line-height: 1.3;
}
.wl-cat small {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink2);
}
.wl-cat.on {
  background: var(--ink);
  color: var(--bg);
}
.wl-cat.on small {
  color: inherit;
  opacity: 0.75;
}
.wl-tools .pfilter {
  margin-top: 8px;
}
.wl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 10px;
  font-size: 13px;
}
.wl-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  cursor: pointer;
}
.wl-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
}
.wl-print {
  margin-left: auto;
  font-weight: 900;
  text-decoration: none;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--pop);
  color: var(--ink-fixed);
}
.word-list.wl-v2 {
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  counter-reset: wl;
}
.wl-v2 li {
  align-items: center;
  flex-wrap: wrap;
}
.wl-v2.numbered li:not([hidden])::before {
  counter-increment: wl;
  content: counter(wl);
  min-width: 2.4em;
  font-size: 11px;
  font-weight: 900;
  color: var(--ink2);
  text-align: right;
}
.wl-main {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wl-main .wl-ja {
  font-size: 13px;
}
.wl-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rk {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 12px;
  font-weight: 900;
  color: #e8414f;
  white-space: nowrap;
  letter-spacing: -0.05em;
}
.rk small {
  font-size: 10px;
  letter-spacing: 0;
  color: var(--ink2);
}
.rk-A {
  color: #ff7a00;
}
.rk-B {
  color: #2f6bff;
}
.rk-C {
  color: var(--ink2);
}
.rk-N {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 40%, transparent);
  color: var(--ink2);
}
.wl-lv {
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg2);
  color: var(--ink2);
}
.wl-v2 .wl-g {
  font-size: 11px;
  white-space: nowrap;
}
.wl-ted {
  color: #e62b1e !important;
  font-weight: 900;
}
.wl-known {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--line) 45%, transparent);
  background: var(--card);
  color: var(--ink2);
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.wl-v2 li.known .wl-known {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.wl-v2 li.known strong {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.wl-v2.hide-ja .wl-ja {
  color: transparent;
  background: color-mix(in srgb, var(--pink) 18%, var(--bg2));
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}
.wl-v2.hide-ja .wl-ja.peek {
  color: var(--ink2);
  background: none;
}
.wl-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink2);
  max-width: 820px;
  margin: 12px auto 40px;
  padding: 12px 16px;
  border: 1.5px dashed color-mix(in srgb, var(--line) 35%, transparent);
  border-radius: var(--r-sm);
}
@media (max-width: 640px) {
  .word-list.wl-v2 {
    grid-template-columns: 1fr;
  }
  .wl-cats {
    grid-template-columns: 1fr 1fr;
  }
  .wl-print {
    margin-left: 0;
  }
  .rk small {
    display: none;
  }
}

/* ---------- 印刷の案内 ---------- */
.print-promo-in {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  margin: 10px 0 40px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(120deg, color-mix(in srgb, var(--blue) 14%, var(--card)), var(--card));
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}
.pp-icon {
  font-size: 44px;
}
.pp-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pp-text strong {
  font-size: 19px;
  font-weight: 900;
}
.pp-text small {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.7;
}
.pp-go {
  font-weight: 900;
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
}
@media (max-width: 640px) {
  .print-promo-in {
    flex-wrap: wrap;
    padding: 18px;
  }
  .pp-icon {
    font-size: 34px;
  }
}

/* ---------- TED HACK 連携 ---------- */
.ted-lead {
  font-size: 14px;
  color: var(--ink2);
  max-width: 760px;
  margin: 0 0 14px;
}
/* TED HACK は目立たせ、運営の原田英語は控えめに */
.ted-hack-link {
  font-size: 1.15em;
  font-weight: 900;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a.ted-hack-link:hover {
  opacity: 0.8;
}
.ted-by {
  font-size: 12px;
  color: var(--ink2);
  opacity: 0.8;
}
.ted-by .hq-link {
  font-weight: 400;
  text-decoration: none;
}
.ted-by .hq-link:hover {
  text-decoration: underline;
}
.ted-tabs {
  margin: 0 0 14px;
}
.ted-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.ted-grid[hidden] {
  display: none;
}
.ted-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.ted-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ted-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.ted-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #111;
  border-bottom: 2px solid var(--line);
}
.ted-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ted-dur,
.ted-src {
  position: absolute;
  bottom: 6px;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  color: #fff;
}
.ted-dur {
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
}
.ted-src {
  left: 6px;
  background: #e62b1e;
}
.ted-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
}
.ted-body em {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  color: #e62b1e;
}
.ted-body strong {
  font-size: 15px;
  line-height: 1.45;
}
.ted-body small {
  font-size: 12px;
  color: var(--ink2);
}
.ted-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink2);
}
.ted-themes {
  margin: 20px 0 40px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg2);
}
.ted-themes p {
  margin: 0 0 10px;
  font-weight: 900;
}
.ted-themes div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ted-themes a {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.ted-link {
  margin: 36px 0;
}

/* ---------- 原田英語の姉妹サイト ---------- */
.sister-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}
.sister {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.sister:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.sister-emoji {
  font-size: 30px;
}
.sister strong {
  font-size: 17px;
  font-weight: 900;
}
.sister small {
  flex: 1;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.6;
}
.sister-go {
  font-size: 13px;
  font-weight: 900;
  color: var(--blue);
}
/* 文中の「原田英語」「haradaeigo.com」→ 本家へのリンク */
.hq-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.hq-link:hover {
  color: var(--blue);
}

/* =========================================================
   印刷できる単語帳（/english/wordbook/）
   ========================================================= */
.wb {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
  align-items: start;
}
.wb-panel {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
}
.wb-panel fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}
.wb-panel legend {
  font-weight: 900;
  font-size: 15px;
  margin-bottom: 8px;
}
.wb-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.wb-modes label {
  position: relative;
  cursor: pointer;
}
.wb-modes input {
  position: absolute;
  opacity: 0;
}
.wb-modes span {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px 10px;
  border: 2px solid color-mix(in srgb, var(--line) 30%, transparent);
  border-radius: var(--r-sm);
}
.wb-modes b {
  font-size: 13px;
}
.wb-modes small {
  font-size: 10.5px;
  color: var(--ink2);
  line-height: 1.4;
}
.wb-modes input:checked + span {
  border-color: var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
}
.wb-modes input:checked + span small {
  color: #444;
}
.wb-modes input:focus-visible + span {
  outline: 3px solid var(--blue);
}
.wb-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}
.wb-field select,
.wb-field input {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  width: 64%;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.wb-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  cursor: pointer;
}
.wb-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--pink);
}
.wb-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wb-count {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink2);
}
.wb-tip {
  font-size: 11.5px;
  color: var(--ink2);
  line-height: 1.7;
  margin: 12px 0 0;
}
/* プレビュー：紙っぽく */
.wb-preview {
  min-width: 0;
}
.wb-sheet {
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  padding: 28px 30px;
  margin-bottom: 20px;
  font-weight: 500;
}
.wb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 2.5px solid #111;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.wb-brand {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  color: #666;
}
.wb-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 900;
}
.wb-head h2 small {
  font-size: 11px;
  color: #555;
  font-weight: 700;
}
.wb-name {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: #444;
}
.wb-name span {
  min-width: 90px;
  border-bottom: 1px solid #888;
  padding-bottom: 2px;
}
.wb-list,
.wb-test,
.wb-ans {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wb-list li {
  display: grid;
  grid-template-columns: 2.6em 36% 1fr auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
  break-inside: avoid;
  page-break-inside: avoid;
  align-items: start;
}
.wb-no {
  font-size: 10px;
  color: #777;
  text-align: right;
  padding-top: 3px;
}
.wb-w b {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  margin-right: 6px;
}
.wb-w small {
  font-size: 9px;
  color: #555;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 0 4px;
}
.wb-rk {
  font-size: 10px;
  color: #e8414f;
  margin-right: 4px;
  letter-spacing: -0.05em;
}
.wb-freq {
  display: block;
  font-size: 9px;
  color: #777;
}
.wb-j i {
  font-style: normal;
  font-size: 10px;
  color: #666;
  margin-right: 6px;
}
.wb-ja {
  font-size: 13.5px;
  font-weight: 700;
}
.wb-j p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #333;
  font-family: Georgia, 'Times New Roman', serif;
}
.wb-xj {
  font-family: var(--font);
  font-size: 10px;
  color: #666;
}
.wb-box {
  font-size: 12px;
  color: #aaa;
  letter-spacing: 1px;
}
[data-mode="red"] .wb-ja {
  color: #e8414f;
}
[data-mode="red"] .wb-xj {
  color: #f08a93;
}
.wb-test {
  columns: 2;
  column-gap: 26px;
}
.wb-test li,
.wb-ans li {
  display: grid;
  grid-template-columns: 2.4em auto 1fr;
  gap: 6px;
  align-items: baseline;
  break-inside: avoid;
  padding: 7px 0;
}
.wb-test b,
.wb-ans b {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
}
.wb-test i {
  display: none;
}
.wb-blank {
  border-bottom: 1px solid #888;
  min-height: 1.4em;
}
.wb-ans {
  columns: 3;
  column-gap: 18px;
  font-size: 11px;
}
.wb-ans li {
  grid-template-columns: 2.2em 1fr;
  padding: 3px 0;
}
.wb-ans li span:last-child {
  grid-column: 2;
}
.wb-ans b {
  font-size: 12px;
}
.wb-foot {
  font-size: 9px;
  color: #777;
  margin: 10px 0 0;
}
.wb-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 52mm;
  padding: 0;
  border: 0;
}
.wbc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px dashed #999;
  text-align: center;
  overflow: hidden;
}
.wbc-f b {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
}
.wbc-f small {
  font-size: 10px;
  color: #666;
}
.wbc-b b {
  font-size: 17px;
}
.wbc-b i {
  font-style: normal;
  font-size: 10px;
  color: #666;
}
.wbc-b small {
  font-size: 10px;
  line-height: 1.45;
  color: #444;
  font-family: Georgia, 'Times New Roman', serif;
}
.wbc-no {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 9px;
  color: #999;
}
.wbc-rk {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  color: #e8414f;
}
@media (max-width: 860px) {
  .wb {
    grid-template-columns: 1fr;
  }
  .wb-panel {
    position: static;
  }
  .wb-sheet {
    padding: 16px;
  }
  .wb-list li {
    grid-template-columns: 2.2em 1fr auto;
  }
  .wb-list .wb-j {
    grid-column: 2 / 4;
  }
  .wb-test,
  .wb-ans {
    columns: 1;
  }
  .wb-name {
    display: none;
  }
}
@media print {
  .page-wordbook .wb-hero,
  .page-wordbook .wb-panel,
  .page-wordbook .no-print {
    display: none !important;
  }
  .page-wordbook main,
  .page-wordbook .wrap,
  .page-wordbook .wb {
    display: block;
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .page-wordbook .wb-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    break-after: page;
    page-break-after: always;
  }
  .page-wordbook .wb-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .page-wordbook .wb-cards {
    height: 265mm;
    grid-auto-rows: 53mm;
  }
  .page-wordbook .wb-test {
    columns: 2;
  }
  .page-wordbook .wb-ans {
    columns: 3;
  }
  .page-english .wl-tools,
  .page-english .wl-tabs,
  .page-english .wl-cats,
  .page-english .wl-known {
    display: none !important;
  }
}

/* ---------- マジカ!?ゼミ（玄人向け） ---------- */
.chip-zemi {
  --cat: #1f3a5f;
  text-decoration: none;
  background: #1f3a5f;
  color: #fff;
  border-color: var(--line);
}
.card .chip-zemi {
  margin-left: 6px;
}
.promo-zemi {
  background: #1f3a5f;
  color: #fff;
}
.zemi-hero h1 small {
  display: block;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.42em;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink2);
  margin-top: 6px;
}
.zemi-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.zemi-fields a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
}
.zemi-fields a b {
  font-size: 12px;
  background: #1f3a5f;
  color: #fff;
  border-radius: 999px;
  padding: 0 7px;
}
.zemi-how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.zemi-how div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
}
.zemi-how span,
.zemi-desc {
  font-size: 13px;
  color: var(--ink2);
}
.zemi-sec {
  margin-top: 40px;
  scroll-margin-top: 120px;
}
.zemi-desc {
  margin: -6px 0 16px;
}
.zemi-note {
  margin-top: 40px;
  font-size: 13px;
  color: var(--ink2);
}
.zemi-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-left: 8px solid #1f3a5f;
  border-radius: var(--r);
  background: color-mix(in srgb, #1f3a5f 10%, var(--card));
  font-size: 14px;
}
.zemi-notice a {
  font-weight: 900;
  font-size: 13px;
}

/* ゼミ：難易度の星 */
.zemi-stars {
  font-style: normal;
  letter-spacing: -0.05em;
  margin-left: 4px;
  color: #ffd84d;
}

/* ゼミ記事の冒頭パネル */
.zemi-guide {
  margin: 18px 0;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-left: 8px solid #1f3a5f;
  border-radius: var(--r);
  background: color-mix(in srgb, #1f3a5f 8%, var(--card));
  box-shadow: var(--shadow);
}
.zg-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.zg-top strong {
  font-size: 15px;
}
.zg-lv {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink2);
}
.zg-lv i {
  font-style: normal;
  color: #d99a00;
  letter-spacing: -0.05em;
}
.zg-prereq {
  margin: 10px 0 0;
  font-size: 14px;
}
.zg-prereq b,
.zg-cap {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #1f3a5f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.zg-points {
  margin-top: 12px;
}
.zg-cap {
  margin: 0 0 6px;
}
.zg-points ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.zg-points li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 15px;
  line-height: 1.7;
}
.zg-points li b {
  flex: none;
  min-width: 3em;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  background: #c9f0e4;
  color: var(--ink-fixed);
}
.zg-points li:nth-child(2) b {
  background: #bcd4ff;
}
.zg-points li:nth-child(3) b {
  background: #ffe14d;
}
.zg-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.zg-route a {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.zg-route a:hover {
  transform: translateY(-1px);
}
.zg-route small {
  font-size: 11px;
  color: var(--ink2);
}
.zr {
  font-size: 13px;
  font-weight: 900;
}
.zr::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  background: #2bb673;
}
.zr-2::before {
  background: #1f3a5f;
}
.zr-3::before {
  background: #8a5cf6;
}
.zr-4::before {
  background: #d99a00;
}
.zg-arrow {
  color: var(--ink2);
  font-weight: 900;
}
.zg-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink2);
}

/* 論文スペック表 */
.zemi-spec {
  margin: 18px 0;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
  scroll-margin-top: 100px;
}
.zemi-spec summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 16px;
  background: #d9cfff;
  color: var(--ink-fixed);
  font-weight: 900;
}
.zemi-spec summary small {
  font-size: 12px;
  font-weight: 700;
}
.zemi-spec dl {
  margin: 0;
  padding: 6px 16px 10px;
}
.zemi-spec dl div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.zemi-spec dl div:last-child {
  border-bottom: 0;
}
.zemi-spec dt {
  font-weight: 900;
  font-size: 13px;
  color: var(--ink2);
}
.zemi-spec dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}
@media (max-width: 560px) {
  .zemi-spec dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* 入門ゾーン → 玄人ゾーンの区切り */
.zone-divider {
  margin: 2.6em 0 1.4em;
  padding: 14px 18px;
  border-radius: var(--r);
  background: #1f3a5f;
  color: #fff;
  text-align: center;
  scroll-margin-top: 100px;
}
.zd-badge {
  display: inline-block;
  padding: 2px 14px;
  border-radius: 999px;
  background: #ffd84d;
  color: #1f3a5f;
  font-weight: 900;
  font-size: 14px;
}
.zone-divider p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: #fff;
}

/* 研究の年表 */
.box-timeline .box-head {
  background: #f4e1b8;
}
.box-seminar .box-head {
  background: #ffd0e6;
}
.tl {
  list-style: none;
  margin: 0 0 12px;
  padding: 0 0 0 4px;
}
.tl li {
  position: relative;
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 12px;
  padding: 0 0 12px 18px;
  border-left: 3px solid #d9b56a;
}
.tl li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.tl li::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 3px solid #d9b56a;
  background: var(--card);
}
.tl-year {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.tl-text {
  line-height: 1.7;
}

/* ゼミの課題 */
.sem {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: sem;
}
.sem li {
  counter-increment: sem;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
}
.sem-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  padding: 1px 8px;
  border-radius: 999px;
  color: var(--ink-fixed);
}
.sem-tag::before {
  content: 'Q' counter(sem) '　';
}
.sem-lv1 {
  background: #c9f0e4;
}
.sem-lv2 {
  background: #bcd4ff;
}
.sem-lv3 {
  background: #ffb8a0;
}
.sem-q {
  margin: 6px 0 4px !important;
  font-weight: 700;
}
.sem-hint summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink2);
}
.sem-hint p {
  margin: 6px 0 2px !important;
  font-size: 14px;
}

/* 用語ポップアップ（ボックス内でも切れないように） */
.box:has(.gl) {
  overflow: visible;
}
.box:has(.gl) .box-head {
  border-radius: calc(var(--r) - 2px) calc(var(--r) - 2px) 0 0;
}
.gl {
  position: relative;
  cursor: help;
  text-decoration: underline dotted 2px;
  text-decoration-color: #2bb673;
  text-underline-offset: 4px;
}
.gl:not(.gl-demo)::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 6px);
  width: min(320px, 80vw);
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s;
}
.gl.on::after,
.gl:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
@media (hover: hover) {
  .gl:hover::after {
    opacity: 1;
    visibility: visible;
  }
}
@media (max-width: 640px) {
  .gl:not(.gl-demo)::after {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    max-width: none;
    width: auto;
    font-size: 14px;
  }
}

/* 原典ガイド（出典の注釈） */
.src-guide-lead {
  font-size: 13px;
  color: var(--ink2);
  margin: 4px 0 8px;
}
.rd {
  display: inline-block;
  margin-right: 6px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  color: var(--ink-fixed);
  background: #e0e0e8;
  vertical-align: 1px;
}
.rd-入門 {
  background: #c9f0e4;
}
.rd-必読 {
  background: #ffe14d;
}
.rd-発展 {
  background: #d9cfff;
}
.src-note {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.6;
}

/* ゼミトップ */
.zemi-start .card {
  border-color: #1f3a5f;
}
.zemi-route {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: zr;
}
.zemi-route li {
  counter-increment: zr;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 13px;
  line-height: 1.5;
}
.zemi-route li strong {
  display: block;
  font-size: 14px;
}
.zemi-route li strong::before {
  content: counter(zr) '. ';
  color: #1f3a5f;
}
.zemi-route .pro-zone {
  background: color-mix(in srgb, #1f3a5f 12%, var(--card));
}
.zemi-lv-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
}
.zemi-lv-filter span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--line);
  font-weight: 700;
}

.wl-ns {
  font-size: 11px;
  color: #c2410c;
  font-weight: 700;
}
.wb-ns {
  display: block;
  font-size: 9.5px;
  color: #c2410c;
}
.fc-ja {
  white-space: pre-line;
}

/* 単語リスト：絞り込み欄は貼り付けない（スマホで一覧が隠れるため）・スマホの行は2段に */
.wl-tools {
  position: static;
  backdrop-filter: none;
  background: none;
}
@media (max-width: 640px) {
  .wl-v2 li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
  }
  .wl-v2.numbered li {
    grid-template-columns: auto auto 1fr;
  }
  .wl-v2 .wl-side {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 34px;
  }
  .wl-v2.numbered .wl-side {
    padding-left: 68px;
  }
}

/* ===== English Corner：スマホで閉じているときの「開きたくなる」バー（2026-10-05） ===== */
.ecs-top,
.ecs-peek,
.ecs-chips,
.src-hint {
  display: none;
}
@media (max-width: 640px) {
  .ec-details:not([open]) {
    margin: 0;
  }
  .ec-details:not([open]) > .ec-summary-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, rgba(47, 107, 255, 0.14), rgba(232, 67, 147, 0.16));
  }
  .ec-details:not([open]) > .ec-summary-bar:active .ecs-open {
    transform: translate(2px, 2px);
    box-shadow: none;
  }
  .ec-summary-bar .ecs-top {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .ec-summary-bar .ecs-text b {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 400;
  }
  .ec-details:not([open]) .ecs-peek {
    display: block;
    font-size: 14.5px;
    line-height: 1.6;
    font-style: italic;
    color: var(--ink);
    padding: 10px 12px;
    background: var(--card);
    border: 2px dashed var(--ink2);
    border-radius: var(--r-sm);
  }
  .ec-details:not([open]) .ecs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .ecs-chips span {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--pop);
    color: var(--ink-fixed);
    border: 2px solid var(--line);
  }
  .ec-details:not([open]) .ecs-open {
    margin: 0;
    justify-self: stretch;
    text-align: center;
    font-size: 15px;
    padding: 10px 14px;
    background: var(--pink);
    color: #fff;
    border: 2px solid var(--line);
    box-shadow: 2px 2px 0 var(--line);
  }
  .ec-details:not([open]) .ecs-open::after {
    content: ' ▼';
  }
  .ec-details:not([open]) .ecs-open.ecs-pulse {
    animation: ecs-pulse 1.2s ease-in-out 3;
  }
  /* 開いた後のバーは従来どおり小さく（「閉じる」） */
  .ec-details[open] > .ec-summary-bar .ecs-top {
    flex: 1;
  }
  .ec-details[open] > .ec-summary-bar .ecs-text b {
    font-size: 15px;
  }
  .src-details:not([open]) .src-hint {
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--pop);
    color: var(--ink-fixed);
    border: 2px solid var(--line);
    vertical-align: middle;
  }
}
@keyframes ecs-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .ec-details:not([open]) .ecs-open.ecs-pulse {
    animation: none;
  }
}

/* ===== ロゴ下の「何のサイトか」一言・トップの「使い方3ステップ／目的をえらぶ」（2026-10-05） ===== */
.logo-tag {
  display: block;
  margin: 4px 0 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink2);
  white-space: nowrap;
}
.logo-foot .logo-tag,
.logo-drawer .logo-tag {
  font-size: 11.5px;
}
@media (max-width: 640px) {
  .logo-tag {
    font-size: 9.5px;
    margin-top: 3px;
  }
}
.mh-lead b {
  color: #ffe14d;
  font-weight: 900;
}
.start-guide {
  padding: clamp(28px, 5vw, 48px) 0 8px;
  scroll-margin-top: calc(var(--header-h) + 8px);
}
.sg-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1.35;
  margin: 0 0 18px;
}
.sg-title em {
  font-style: normal;
  color: var(--pink);
}
.sg-title small {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  margin-left: 6px;
}
.sg-title2 {
  margin-top: clamp(28px, 4vw, 40px);
}
.sg-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: none;
}
.sg-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.sg-no {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
}
.sg-steps strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
}
.sg-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink2);
  flex: 1;
}
.sg-get {
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 900;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--pop);
  color: var(--ink-fixed);
  border: 2px solid var(--line);
}
.sg-goals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.sg-goals a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 14px;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.12s, box-shadow 0.12s;
}
.sg-goals a:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 var(--line);
}
.sg-goals a:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}
.sg-goals span {
  grid-row: 1 / 3;
  font-size: 28px;
  line-height: 1;
}
.sg-goals b {
  font-size: 14.5px;
  line-height: 1.4;
}
.sg-goals small {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.4;
}
@media (max-width: 900px) {
  .sg-goals {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .sg-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sg-steps li {
    padding: 14px;
  }
  .sg-steps strong {
    font-size: 19px;
  }
  .sg-goals {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .sg-goals a {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 4px;
    align-content: start;
    padding: 12px 10px;
  }
  .sg-goals span {
    grid-row: auto;
    font-size: 24px;
  }
  .sg-goals b {
    font-size: 13.5px;
  }
  .sg-goals small {
    font-size: 11px;
  }
}

/* =========================================================
   英語ハブ：ヒーロー刷新（2カラム＋力だめしクイズ＋3ステップ）
   ========================================================= */
.en-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.en-hero-grid .en-lead {
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.85;
}
.en-lead b {
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--pop) 80%, transparent) 60%);
}
.en-stats-cap {
  margin: 22px 0 0;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--ink2);
}
.en-hero-grid .en-stats {
  margin-top: 8px;
}
.en-stats li {
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.en-stats li:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.en-stats li button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--ink);
}
.en-stats li button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* クイズカード */
.en-quiz {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.qz-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.qz-start p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink2);
}
.qz-start p b {
  color: var(--ink);
}
.qz-start small {
  font-size: 12px;
  color: var(--ink2);
}
.qz-badge {
  font-size: 13px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pop);
  color: var(--ink-fixed);
  border: 2px solid var(--line);
}
.qz-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
}
.qz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.qz-no {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.qz-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--bg2);
  overflow: hidden;
}
.qz-bar i {
  display: block;
  height: 100%;
  background: var(--pink);
  transition: width 0.3s;
}
.qz-word {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qz-word b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.qz-q {
  margin: 4px 0 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink2);
}
.qz-pos {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 12px;
  color: var(--ink);
}
.qz-choices {
  display: grid;
  gap: 8px;
}
.qz-choice {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
.qz-choice i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--line);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.qz-choice:not(:disabled):hover {
  transform: translateX(3px);
  background: var(--bg2);
}
.qz-choice:disabled {
  cursor: default;
}
.qz-choice.right {
  background: color-mix(in srgb, var(--green) 28%, var(--card));
  border-color: var(--green);
}
.qz-choice.wrong {
  background: color-mix(in srgb, var(--red) 24%, var(--card));
  border-color: var(--red);
}
.qz-fb {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}
.qz-fb p {
  margin: 0 0 8px;
  font-size: 14px;
  max-width: none;
}
.qz-res {
  font-weight: 900;
  font-size: 16px !important;
}
.qz-res.ok {
  color: var(--green);
}
.qz-res.ng {
  color: var(--red);
}
.qz-freq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px !important;
  color: var(--ink2);
}
.qz-freq b {
  color: var(--ink);
}
.qz-ex {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--bg2);
  font-size: 13.5px !important;
  line-height: 1.6;
}
.qz-ex span {
  color: var(--ink2);
  font-size: 12.5px;
}
.qz-fb .btn-big {
  width: 100%;
  margin-top: 4px;
  padding: 11px 20px;
  font-size: 15px;
}
.qz-result {
  text-align: center;
}
.qz-emoji {
  margin: 0;
  font-size: 44px;
  line-height: 1;
}
.qz-score {
  margin: 6px 0 2px;
}
.qz-score b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  color: var(--pink);
}
.qz-score span {
  font-weight: 900;
  color: var(--ink2);
}
.qz-rname {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
}
.qz-msg {
  margin: 8px auto 14px;
  max-width: 28em;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink2);
}
.qz-missed {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--bg2);
  text-align: left;
}
.qz-missed h3 {
  margin: 0 0 6px;
  font-size: 13px;
}
.qz-missed ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.qz-missed li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.qz-missed li b {
  min-width: 6.5em;
}
.qz-missed li span {
  color: var(--ink2);
  font-size: 13px;
}
.qz-actions {
  display: grid;
  gap: 8px;
}
.qz-actions .btn-big {
  padding: 11px 18px;
  font-size: 15px;
}

/* 3ステップ */
.en-steps {
  margin-bottom: 36px;
}
.en-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.en-steps a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px 18px 16px 62px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.en-steps a:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.st-n {
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--pop);
  color: var(--ink-fixed);
  font-family: var(--display);
  font-size: 18px;
}
.en-steps strong {
  font-size: 16px;
  line-height: 1.4;
}
.en-steps small {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink2);
}
@media (max-width: 900px) {
  .en-hero-grid {
    grid-template-columns: 1fr;
  }
  .en-quiz {
    min-height: 0;
  }
  .en-steps ol {
    grid-template-columns: 1fr;
  }
}

/* Codex が描いたアイコン（絵文字の置き換え。大きさは周りの文字サイズに追従） */
.ic {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.25em;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}
.main-nav .ic,
.cat-nav .ic {
  width: 1.45em;
  height: 1.45em;
  vertical-align: -0.38em;
  margin-right: 0.1em;
}
.list-emoji .ic,
.qg-emoji .ic,
.cat-emoji .ic {
  width: 1.15em;
  height: 1.15em;
  vertical-align: middle;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18));
}
.ci-emoji .ic,
.sister-emoji .ic,
.wl-cat span .ic {
  width: 1.15em;
  height: 1.15em;
  vertical-align: middle;
}
.burst-ic {
  width: 1em;
  height: 1em;
  pointer-events: none;
}
.icon-btn .ic {
  width: 26px;
  height: 26px;
  vertical-align: middle;
}
.drawer-search button .ic,
.drawer-theme .ic {
  width: 1.3em;
  height: 1.3em;
}

/* ---------- マジか!?ことば ---------- */
.chip-kotoba {
  --cat: #6c2bd9;
  text-decoration: none;
  background: #6c2bd9;
  color: #fff;
  border-color: var(--line);
}
.card .chip-kotoba {
  margin-left: 6px;
}
.promo-kotoba {
  background: linear-gradient(120deg, #6c2bd9, #ff3d7f);
  color: #fff;
}
.kotoba-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(900px 420px at 85% -10%, #ff3d7f55 0%, transparent 60%), radial-gradient(900px 500px at 0% 110%, #2f6bff55 0%, transparent 55%), #1d0b3f;
  color: #fff;
  border-bottom: 2px solid var(--line);
}
.kh-bg i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--display);
  font-style: normal;
  font-size: calc(28px * var(--s));
  color: #fff;
  opacity: 0.13;
  transform: rotate(var(--r));
  animation: kh-float var(--d) ease-in-out infinite;
  user-select: none;
}
.kh-bg i:nth-child(3n) {
  color: #ffe14d;
  opacity: 0.22;
}
.kh-bg i:nth-child(4n) {
  color: #7fd6ff;
}
@keyframes kh-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r));
  }
  50% {
    transform: translateY(-14px) rotate(calc(var(--r) * -1));
  }
}
.kh-inner {
  position: relative;
  padding: clamp(40px, 7vw, 80px) 0 clamp(32px, 6vw, 64px);
  text-align: center;
}
.kh-pre {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: #ffe14d;
  font-size: 13px;
}
.kh-title {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  margin: 12px 0 10px;
}
.kh-line {
  display: block;
  font-size: clamp(30px, 5.5vw, 56px);
  animation: rise-in 0.8s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
.kh-line .mh-q {
  display: inline-block;
  color: #ffe14d;
  transform-origin: 50% 80%;
  animation: pop-q 2.4s ease-in-out infinite;
}
.kh-big {
  font-size: clamp(64px, 14vw, 150px);
  animation-delay: 0.15s;
  background: linear-gradient(90deg, #ffe14d, #ff7aa8 55%, #7fd6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kh-sub {
  margin: 0 0 14px;
  font-weight: 900;
  font-size: clamp(16px, 2.2vw, 22px);
}
.kh-lead {
  max-width: 680px;
  margin: 0 auto 22px;
  line-height: 1.9;
  font-size: clamp(14px, 1.7vw, 16px);
  opacity: 0.92;
}
.kh-stats {
  justify-content: center;
}
.kh-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.kh-langs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
}
.kh-langs a:hover {
  background: #fff;
  color: #1d0b3f;
}
.kh-langs a b {
  font-size: 12px;
  background: #ffe14d;
  color: var(--ink-fixed);
  border-radius: 999px;
  padding: 0 7px;
}
.kotoba-sec {
  margin-top: 44px;
  scroll-margin-top: 120px;
}
.kotoba-quiz .qq-inner {
  background: #e9ddff;
}
.neta-list {
  list-style: none;
  counter-reset: neta;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.neta-list li {
  counter-increment: neta;
}
.neta-list a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 16px 18px 14px 56px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.neta-list a:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.neta-list a::before {
  content: '💬';
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 24px;
}
.neta-say {
  font-weight: 900;
  line-height: 1.6;
}
.neta-list small {
  color: var(--ink2);
  font-size: 12px;
}
.kotoba-soon {
  margin-top: 48px;
  padding: 24px clamp(18px, 4vw, 36px);
  border: 2px dashed var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, #6c2bd9 8%, var(--card));
  text-align: center;
}
.kotoba-soon h2 {
  font-family: var(--display);
  font-weight: 400;
  margin: 0 0 8px;
}
.kotoba-soon p {
  margin: 0 0 12px;
  color: var(--ink2);
}
.ks-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ks-chips span {
  padding: 4px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-weight: 900;
  font-size: 14px;
  opacity: 0.75;
}
.ks-chips .ks-more {
  border-style: dashed;
}
.ks-req {
  font-size: 13px;
}
@media (prefers-reduced-motion: reduce) {
  .kh-bg i,
  .kh-line,
  .kh-line .mh-q {
    animation: none;
  }
}

/* ---------- What's New（更新情報） ---------- */
.whats-new {
  margin-top: 40px;
}
.wn-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.wn-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: 0.02em;
}
.wn-head h2 small {
  margin-left: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  color: var(--ink2);
}
.wn-list {
  list-style: none;
  margin: 0;
  padding: 6px 18px;
  border: 2px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--shadow);
}
.wn-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  line-height: 1.55;
}
.wn-list li:last-child {
  border-bottom: 0;
}
.wn-list time {
  flex: none;
  min-width: 3.2em;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink2);
}
.wn-tag {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}
.wn-new {
  background: var(--pink);
}
.wn-up {
  background: var(--blue);
}
.wn-site {
  background: var(--green);
}
.wn-txt {
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
}
a.wn-txt {
  text-decoration: none;
}
a.wn-txt:hover {
  text-decoration: underline;
}
@media (max-width: 560px) {
  .wn-list li {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .wn-txt {
    flex-basis: 100%;
  }
}
