/* IQテスト(仕様: 仕様書/コンテンツ企画/IQテスト.md)。デザインはモック「IQテスト」の案B:
   方眼の地・丸ゴシック・黒1色＋赤だけ(分野ごとの色は使わず、分野はアイコンと名前で見分ける) */
.iq {
  --iq-ink: #23262E;
  --iq-sub: #5B6170;
  --iq-line: #D9DFE7;
  --iq-grid: #E1E6EE;
  --iq-bg: #F7F9FC;
  --iq-soft: #F1F4F8;
  --iq-red: #D33A2C;
  --iq-red-dark: #9E2A1F;
  /* 再読み込みでスクロール位置を戻す時、ブラウザが動いている部品(入場の動き・背景のかけら)を目印にして、毎回少し下にずれた。
     IQテストの中は目印にさせない(2026-11-11、ユーザー指摘) */
  overflow-anchor: none;
  padding-bottom: 28px;
  background-color: var(--iq-bg);
  background-image: linear-gradient(var(--iq-grid) 1px, transparent 1px), linear-gradient(90deg, var(--iq-grid) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--iq-ink);
  font-family: 'M PLUS Rounded 1c', sans-serif;
  position: relative;
  overflow: hidden;
  overflow: clip;
}

/* 中身は背景(入口の問題カード)より上に */
.iq-hero,
.iq-section {
  position: relative;
  z-index: 1;
}

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

.iq [hidden] {
  display: none !important;
}

.iq p,
.iq h1,
.iq h2,
.iq ul,
.iq ol {
  margin: 0;
}

.iq ul,
.iq ol {
  padding: 0;
  list-style: none;
}

.iq-red {
  color: var(--iq-red);
}

/* 入口: ヒーロー */
.iq-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 16px 20px;
  border-bottom: 2px solid var(--iq-line);
}

/* =====================================================================
   入口のファーストビュー(2026-11-16、デザインは 仕様書/コンテンツ企画/IQtest/iq-index.png、モック「入口: 新デザイン(iq-index.png)」)。
   水色の方眼・後ろに問題カードと光の筋・白ふちの「挑戦者求む!」・赤×白ふち×黒ふち+黒い厚みの「IQテスト」・黄色の丸・白いカードとフクロウ。
   大きさはこの枠の幅(cqw)に合わせる。コンテナクエリが使えないブラウザはpxの値のまま
   ===================================================================== */
.iq-hero {
  container-type: inline-size;
  overflow: hidden;
  gap: 0;
  padding: 0 16px 22px;
  border-bottom: 0;
}

/* 入口はページ全体を水色の方眼に(iq-index.pngと同じ。2026-11-16、ユーザー決定 案A「ランキングから下も」)。問題・結果のページは今までの灰色の方眼のまま */
.iq--entry {
  background-color: #EAF2FD;
  background-image: linear-gradient(#D6E4F8 1px, transparent 1px), linear-gradient(90deg, #D6E4F8 1px, transparent 1px);
  background-size: 18px 18px;
}

.iq-cover__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  overflow-anchor: none;
}

.iq-cover__rays {
  position: absolute;
  left: 50%;
  top: 120px;
  width: 1000px;
  height: 1000px;
  margin: -500px 0 0 -500px;
  background: repeating-conic-gradient(rgba(255, 255, 255, .45) 0deg 8deg, transparent 8deg 22deg);
  /* 真ん中は濃く、外へ行くほど消える */
  -webkit-mask-image: radial-gradient(circle, #000 0, #000 18%, transparent 46%);
  mask-image: radial-gradient(circle, #000 0, #000 18%, transparent 46%);
  /* 開いた直後は出さず、「IQテスト」が落ちて揺れるのに合わせてふわっと出す(2026-11-16、ユーザー指摘「アニメーション前にも出ている・色が濃い」) */
  animation: iq-rays-in .6s ease-out 1.3s both, iq-rays 40s linear 1.3s infinite;
}

@keyframes iq-rays-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes iq-rays {
  to {
    transform: rotate(360deg);
  }
}

/* ファーストビューより下の背景のカード(index.htmlの.iq-bgcards)。ページ全体に重ね、中身(.iq-section、z-index 1)の後ろに */
.iq-bgcards {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  overflow-anchor: none;
}

/* 問題カード: 左右から集まり、その後ふわふわ */
.iq-cover__card {
  position: absolute;
  width: 178px;
  padding: 7px 10px;
  border: 2px solid #A9C6F2;
  border-radius: 8px;
  background: #FFFFFF;
  color: #4E8BE6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  transform: rotate(var(--r));
  animation: iq-card-in .6s cubic-bezier(.2, .8, .3, 1) var(--iq-delay, 0s) both, iq-card-float var(--iq-dur, 3.5s) ease-in-out var(--iq-at, 1s) infinite;
}

.iq-cover__card--still {
  /* 見出し・注意書きなど背景の上にじかにある文字と重なっても読めるよう、うすく */
  opacity: .45;
  animation: none;
}

.iq-cover__card b {
  display: block;
  font-size: 15px;
}

@keyframes iq-card-in {
  from {
    opacity: 0;
    transform: translate(var(--dx), 0) rotate(0);
  }
  to {
    opacity: 1;
    transform: rotate(var(--r));
  }
}

@keyframes iq-card-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r));
  }
  50% {
    transform: translateY(-5px) rotate(var(--r));
  }
}

/* 題字の部分。「IQテスト」が落ちた時にここが揺れる */
.iq-cover {
  position: relative;
  z-index: 1;
  height: 208px;
  height: clamp(204px, 54cqw, 310px);
  animation: iq-cover-shake .35s 1.3s both;
}

@keyframes iq-cover-shake {
  0%,
  100% {
    transform: none;
  }
  20% {
    transform: translate(-5px, 3px);
  }
  40% {
    transform: translate(5px, -2px);
  }
  60% {
    transform: translate(-3px, 2px);
  }
  80% {
    transform: translate(2px, -1px);
  }
}

.iq-cover__kicker,
.iq-cover__title {
  position: absolute;
  margin: 0;
  font-family: 'Dela Gothic One', sans-serif;
  font-weight: 400;
  white-space: nowrap;
}

.iq-cover__kicker span,
.iq-cover__title span span {
  display: inline-block;
}

/* 「挑戦者求む!」: 白い文字・黒の太いふち。1文字ずつ弾んで出る */
.iq-cover__kicker {
  left: 5%;
  top: 34px;
  top: 9cqw;
  font-size: 42px;
  font-size: clamp(34px, 10.8cqw, 60px);
  color: #FFFFFF;
  -webkit-text-stroke: 7px var(--iq-ink);
  paint-order: stroke fill;
  text-shadow: 3px 4px 0 var(--iq-ink);
  transform: rotate(-4deg);
}

.iq-cover__kicker span {
  animation: iq-char-pop .45s cubic-bezier(.2, .8, .3, 1) var(--iq-delay, 0s) both;
}

@keyframes iq-char-pop {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(.4);
  }
  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.15);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* 「IQテスト」: 赤・白ふち・黒ふち・下に黒い厚み。1文字ずつ上から落ちる */
.iq-cover__title {
  left: 0;
  right: 0;
  top: 92px;
  top: 24cqw;
  text-align: center;
  font-size: 80px;
  font-size: clamp(64px, 20.5cqw, 116px);
  line-height: 1.1;
  letter-spacing: -.04em;
  color: #E0402F;
  -webkit-text-stroke: 6px #FFFFFF;
  paint-order: stroke fill;
  filter: drop-shadow(3px 0 0 var(--iq-ink)) drop-shadow(-3px 0 0 var(--iq-ink)) drop-shadow(0 3px 0 var(--iq-ink)) drop-shadow(0 -3px 0 var(--iq-ink)) drop-shadow(-1px 8px 0 var(--iq-ink));
}

.iq-cover__title span span {
  animation: iq-char-slam .4s cubic-bezier(.2, .8, .3, 1) var(--iq-delay, 0s) both;
}

@keyframes iq-char-slam {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(2.2);
  }
  55% {
    opacity: 1;
    transform: translateY(4px) scale(.94);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* 黄色の丸(今日の1位/平均は100)。シールのように貼りつき、その後4秒ごとに揺れる */
.iq-cover__badge {
  position: absolute;
  right: 0;
  top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 102px;
  height: 102px;
  width: clamp(100px, 27cqw, 140px);
  height: clamp(100px, 27cqw, 140px);
  margin: 0;
  border: 3px solid var(--iq-ink);
  border-radius: 50%;
  background: #FFF04A;
  box-shadow: 3px 3px 0 var(--iq-ink);
  color: var(--iq-ink);
  text-align: center;
  font-weight: 800;
  line-height: 1.2;
  transform: rotate(8deg);
  animation: iq-badge-in .6s cubic-bezier(.2, .8, .3, 1) 1.45s both, iq-badge-wiggle 4s ease-in-out 3s infinite;
}

.iq-cover__badge span {
  font-size: 11px;
  white-space: nowrap;
}

.iq-cover__badge b {
  font-family: 'Dela Gothic One', sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.iq-cover__badge em {
  font-style: normal;
  font-size: 15px;
}

@keyframes iq-badge-in {
  0% {
    opacity: 0;
    transform: rotate(-200deg) scale(0);
  }
  70% {
    opacity: 1;
    transform: rotate(14deg) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: rotate(8deg);
  }
}

@keyframes iq-badge-wiggle {
  0%,
  86%,
  100% {
    transform: rotate(8deg);
  }
  90% {
    transform: rotate(-4deg) scale(1.08);
  }
  94% {
    transform: rotate(14deg) scale(1.08);
  }
}

/* 白いカード(1回目=はじめる・2回目以降=おかえり)とフクロウ */
.iq-cover__body {
  position: relative;
  z-index: 1;
}

.iq-cover__box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 3px solid var(--iq-ink);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 5px 0 var(--iq-ink);
  animation: iq-up .45s cubic-bezier(.2, .8, .3, 1) 1.65s both;
}

.iq-cover__box .iq-hero__stats li {
  background: var(--iq-soft);
}

.iq-cover__box .iq-hero__form {
  margin: 0;
}

/* フクロウは右上でカードのふちに乗る。ぴょんと出て、ときどき首をかしげる */
.iq-cover__owl {
  position: absolute;
  right: 2px;
  top: -62px;
  z-index: 2;
  width: 58px;
  animation: iq-owl-hop .5s cubic-bezier(.2, .8, .3, 1) 1.8s both;
  pointer-events: none;
}

.iq-cover__owl-in {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 90%;
  animation: iq-owl-tilt 5s ease-in-out 3.5s infinite;
}

@keyframes iq-owl-hop {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes iq-owl-tilt {
  0%,
  80%,
  100% {
    transform: none;
  }
  86% {
    transform: rotate(-10deg);
  }
  93% {
    transform: rotate(6deg);
  }
}

/* 「はじめる」「挑戦」のボタンに数秒ごとに光が走る */
.iq-cover__box .iq-btn--start {
  position: relative;
  overflow: hidden;
}

.iq-cover__box .iq-btn--start::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: iq-shine 3s ease-in-out 2.6s infinite;
}

@keyframes iq-shine {
  0%,
  60% {
    left: -40%;
  }
  100% {
    left: 130%;
  }
}

/* 結果ページのフェード(以前は背景のかけらと共用だった) */
@keyframes iq-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 動きを減らす設定の端末では、ファーストビューを動かさない(出そろった状態で止める) */
@media (prefers-reduced-motion: reduce) {
  .iq-cover__rays,
  .iq-cover__card,
  .iq-cover,
  .iq-cover__kicker span,
  .iq-cover__title span span,
  .iq-cover__badge,
  .iq-cover__box,
  .iq-cover__owl,
  .iq-cover__owl-in,
  .iq-cover__box .iq-btn--start::after {
    animation: none;
  }

  .iq-cover__box .iq-btn--start::after {
    display: none;
  }
}

.iq-hero__stats {
  display: flex;
  gap: 8px;
}

.iq-hero__stats li {
  flex: 1 1 0;
  padding: 8px 0;
  border-radius: 10px;
  background: #FFFFFF;
  font-size: 12px;
  text-align: center;
}

.iq-hero__stats b {
  font-size: 22px;
  font-weight: 800;
}

.iq-hero__form {
  /* style.cssの共通のform(max-width 500px・灰色の枠・余白)を打ち消す */
  max-width: none;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

/* style.cssの共通の button[type="submit"](白い文字・枠なし・余白)・input[type="text"] より強くするため、ボタンと入力欄は .iq の下に限定して書く */
.iq .iq-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 20px;
  min-height: 60px;
  border: 0;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.iq .iq-btn--start {
  background: var(--iq-red);
  box-shadow: 0 4px 0 var(--iq-red-dark);
  color: #FFFFFF;
  font-size: 19px;
}

.iq .iq-btn--start:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--iq-red-dark);
}

/* セクション・見出し */
.iq-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
}

.iq-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
}

.iq-heading::before {
  content: "";
  flex: 0 0 6px;
  height: 18px;
  border-radius: 3px;
  background: var(--iq-ink);
}

.iq-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--iq-sub);
}

/* 毎日の記録: 直近7日のはんこ(今日が右端。entry.jsが中身を作る) */
.iq-streak {
  margin-left: auto;
  padding: 3px 10px;
  border: 2px solid var(--iq-red);
  border-radius: 50px;
  background: #FFFFFF;
  color: var(--iq-red);
  font-size: 12px;
  font-weight: 800;
}

.iq-week__date {
  font-size: 10px;
  color: var(--iq-sub);
}

.iq-week__day--today .iq-week__stamp:not(.iq-week__stamp--done) {
  border-color: var(--iq-ink);
  color: var(--iq-sub);
  font-size: 10px;
}

/* ---------------- 入口: 2回目以降の「おかえり」の箱・初めての人の見本のはんこ(2026-11-12、モック「入口 案E+D」。ユーザー決定) ---------------- */
.iq-welcome {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 3px solid var(--iq-ink);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 5px 0 var(--iq-ink);
}

.iq-welcome[hidden] {
  display: none;
}

.iq-welcome__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.iq-welcome__title {
  font-size: 18px;
  font-weight: 800;
}

.iq-welcome__streak {
  padding: 4px 10px;
  border-radius: 50px;
  background: var(--iq-red);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
}

.iq-welcome__nums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.iq-welcome__num {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  background: var(--iq-soft);
}

.iq-welcome__label {
  font-size: 11px;
  font-weight: 800;
  color: var(--iq-sub);
}

.iq-welcome__value {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 30px;
  line-height: 1.1;
}

.iq-welcome__num--best {
  background: #FDECEA;
}

.iq-welcome__num--best .iq-welcome__label {
  color: var(--iq-red-dark);
}

.iq-welcome__num--best .iq-welcome__value {
  color: var(--iq-red);
}

.iq-welcome__note {
  font-size: 12px;
  color: var(--iq-sub);
  text-align: center;
}

/* 2回目以降の人は、説明・箱・「はじめる」の代わりに「おかえり」の箱のボタンを使う */
.iq-hero.is-back .iq-hero__main {
  display: none;
}

.iq-heading__sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--iq-sub);
}

/* 初めての人: 7日のマスの代わりに見本のはんこと説明 */
.iq-sample {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-sample[hidden] {
  display: none;
}

.iq-week[hidden] {
  display: none;
}

.iq-sample__stamps {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.iq-sample__stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 3px solid var(--iq-red);
  border-radius: 50%;
  color: var(--iq-red);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  transform: rotate(-8deg);
}

.iq-sample__stamp small {
  font-size: 9px;
}

.iq-sample__text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
  white-space: normal;
}

/* 入口で、背景の問題カードの上にじかに文字がある区画(毎日の記録・IQテストシリーズ)を白い箱に入れる
   (2026-11-17、ユーザー指摘「背景で文字が見えづらい」→案A)。分野のカードと同じ線・角丸。結果ページの_series.htmlは背景カードが無いので変えない */
.iq--entry .iq-section--panel {
  margin: 8px 12px;
  padding: 16px 14px;
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
}

/* 毎日の記録: entry.jsが中身を入れるまで、場所だけ取って見えなくしておく(再読み込みで下にずれないように) */
.iq-section.is-pending {
  visibility: hidden;
}

.iq-week {
  display: flex;
  gap: 2px;
  padding: 10px 6px;
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-week__day {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.iq-week__label {
  font-size: 11px;
  color: var(--iq-sub);
}

.iq-week__day--today .iq-week__label {
  color: var(--iq-ink);
  font-weight: 800;
}

.iq-week__stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px dashed var(--iq-line);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.iq-week__stamp--done {
  border: 2px solid var(--iq-red);
  color: var(--iq-red);
}

/* 出題される分野 */
.iq-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iq-field {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-field__badge {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 70px;
  border: 2px solid var(--iq-ink);
  border-radius: 12px;
  background: #FFFFFF;
}

.iq-field__num {
  font-size: 11px;
  font-weight: 800;
  color: var(--iq-sub);
}

.iq-field-icon {
  display: block;
  color: var(--iq-ink);
}

.iq-field__name {
  font-size: 14px;
  font-weight: 800;
}

.iq-field__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.iq-field__title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.iq-field__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.iq-tag {
  padding: 2px 8px;
  border-radius: 50px;
  background: var(--iq-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--iq-sub);
}

.iq-field__desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--iq-sub);
}

/* このテストについて(白いパネル1枚。顔面偏差値の「この診断について」と同じ組み方) */
.iq-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 16px;
  border: 2px solid var(--iq-ink);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-about__intro {
  font-size: 14px;
  line-height: 1.8;
}

.iq-about__steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.iq-about__steps li {
  display: flex;
  gap: 10px;
}

.iq-about__num {
  flex: 0 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border-radius: 50%;
  background: var(--iq-ink);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}

.iq-about__title {
  margin: 2px 0 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.iq-about__text {
  font-size: 13px;
  line-height: 1.75;
}

.iq-about__note {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--iq-red);
  border-radius: 12px;
}

.iq-about__note-icon {
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 50%;
  background: var(--iq-red);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
}

.iq-about__note-title {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 800;
  color: var(--iq-red);
}

.iq-refs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 2px dashed var(--iq-line);
}

.iq-refs__title {
  font-size: 13px;
  font-weight: 800;
}

.iq-refs__note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--iq-sub);
}

.iq-refs__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.iq-refs__list li {
  display: flex;
  gap: 4px;
  font-size: 11px;
  line-height: 1.6;
}

.iq-refs__num {
  flex: 0 0 auto;
  font-weight: 800;
}

.iq-refs__list a {
  color: var(--iq-sub);
  word-break: break-word;
}

/* よくある質問 */
.iq-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iq-faq__item {
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-faq__item[open] {
  border-color: var(--iq-ink);
}

.iq-faq__item summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.iq-faq__item summary::-webkit-details-marker {
  display: none;
}

.iq-faq__q {
  flex: 0 0 auto;
  font-size: 16px;
  color: var(--iq-red);
}

.iq-faq__text {
  flex: 1;
  min-width: 0;
}

.iq-faq__plus {
  flex: 0 0 auto;
  transition: transform .2s;
}

.iq-faq__item[open] .iq-faq__plus {
  transform: rotate(45deg);
}

.iq-faq__item p {
  padding: 0 14px 14px 40px;
  font-size: 13px;
  line-height: 1.75;
}

/* IQテストシリーズ(内部リンク) */
.iq-series {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.iq-series__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--iq-ink);
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--iq-ink);
  text-decoration: none;
}

.iq-series__card:hover {
  color: var(--iq-ink);
  box-shadow: 0 3px 0 var(--iq-ink);
}

.iq-series__thumb {
  display: block;
  aspect-ratio: 1200 / 630;
  border-bottom: 2px solid var(--iq-ink);
  background: var(--iq-soft);
}

.iq-series__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iq-series__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px;
}

.iq-series__name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.iq-series__desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--iq-sub);
}

/* 入場のアニメーション: 分野のカードが順に出る(.iq-in)・はんこがポン(entry.jsが.iq-ponを付ける)。
   一番上のファーストビューの動きは「入口のファーストビュー」(2026-11-16に作り直し。以前の博士・問題のかけらはやめた) */
.iq-in {
  animation: iq-up .5s ease-out var(--iq-delay, 0s) both;
}

@keyframes iq-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.iq-pon {
  animation: iq-pon .35s ease-out var(--iq-delay, .9s) both;
}

@keyframes iq-pon {
  0% {
    opacity: 0;
    transform: scale(1.8) rotate(-15deg);
  }
  70% {
    opacity: 1;
    transform: scale(.92) rotate(3deg);
  }
  100% {
    transform: none;
  }
}

/* 書体がそろうまで入場の動きを止める(index.htmlのスクリプトがis-waitを外す) */
.iq.is-wait *,
.iq.is-wait *::before,
.iq.is-wait *::after {
  animation-play-state: paused !important;
}

/* 動きを減らす設定の端末では動かさない(ふきだしは出した状態) */
@media (prefers-reduced-motion: reduce) {
  .iq-in,
  .iq-pon {
    animation: none;
  }
}

.iq-alert {
  padding: 10px 12px;
  border: 2px solid var(--iq-red);
  border-radius: 12px;
  background: #FFFFFF;
  font-size: 13px;
  line-height: 1.6;
}

.iq-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- 問題ページ(モック「IQテスト」案Bの問題画面) ---------------- */
/* 下の共通コンテンツ(タグ・新着など)は最初の画面に入れない(2026-11-11、ユーザー指示)。問題の画面で1画面ぶんの高さをとる */
.iq--q {
  min-height: 100vh;
  min-height: 100svh;
}

.iq-qhead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--iq-ink);
  color: #FFFFFF;
}

.iq-qhead__field {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 10px 2px 4px;
  border-radius: 50px;
  background: #FFFFFF;
  color: var(--iq-ink);
  font-size: 13px;
  font-weight: 800;
}

.iq-qhead__no {
  font-size: 15px;
  font-weight: 800;
}

/* 進み具合(ヘッダーの右の「◯ / 15」)と残り時間のバー(モックの「問題画面 案B」) */
.iq-qhead__count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
}

.iq-qhead__count b {
  font-size: 18px;
}

.iq-time {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 0;
  color: var(--iq-ink);
}

.iq-time__icon {
  flex: 0 0 auto;
}

.iq-time__bar {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border: 2px solid var(--iq-line);
  border-radius: 6px;
  background: #FFFFFF;
}

.iq-time__fill {
  display: block;
  height: 100%;
  background: var(--iq-ink);
  transition: width .2s linear;
}

.iq-time__text {
  flex: 0 0 48px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* 10秒を切ったら赤く点滅 */
.iq-time.is-low {
  color: var(--iq-red);
}

.iq-time.is-low .iq-time__fill {
  background: var(--iq-red);
}

.iq-time.is-low .iq-time__fill,
.iq-time.is-low .iq-time__text {
  animation: iq-blink 1s ease-in-out infinite;
}

.iq-time.is-low .iq-time__text {
  font-size: 20px;
}

@keyframes iq-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.iq-qform {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* style.cssの共通のformを打ち消す */
  max-width: none;
  margin: 0;
  padding: 12px 16px 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.iq-qform.is-sending .iq-choice,
.iq-qform.is-sending .iq-key {
  opacity: .6;
}

.iq-screen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  border: 3px solid var(--iq-ink);
  border-radius: 18px;
  background: #FAFBFC;
}

.iq-screen__prompt {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

/* 数列 */
.iq-seq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.iq-seq__comma {
  color: var(--iq-line);
}

.iq-seq__blank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 3px dashed var(--iq-ink);
  border-radius: 10px;
}

/* 図形(3×3) */
.iq-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
}

.iq-matrix__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--iq-line);
  border-radius: 10px;
  background: #FFFFFF;
}

.iq-matrix__cell svg {
  width: 80%;
  height: auto;
}

.iq-matrix__cell--blank {
  border: 3px dashed var(--iq-ink);
  background: none;
  font-size: 30px;
  font-weight: 800;
}

/* 空間 */
.iq-figure {
  display: flex;
  justify-content: center;
}

.iq-figure svg {
  border: 2px solid var(--iq-line);
  border-radius: 10px;
  background: #FFFFFF;
}

/* 言葉 */
.iq-word {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

/* 記憶(モックの「記憶 案A」: ①覚える→②逆の順に入力) */
.iq-mem {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.iq-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
}

.iq-step__num {
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 50%;
  background: var(--iq-ink);
  color: #FFFFFF;
  font-size: 13px;
}

.iq-mem__digits {
  display: flex;
  gap: 6px;
}

.iq-mem__digits span {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border: 2px solid var(--iq-ink);
  border-radius: 10px;
  background: #FFFFFF;
  font-size: 32px;
  font-weight: 800;
}

.iq-mem__count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--iq-red);
  font-size: 14px;
}

.iq-mem__bar {
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--iq-line);
}

.iq-mem__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--iq-red);
}

.iq-slots {
  display: flex;
  gap: 6px;
}

.iq-slot {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border: 2px dashed var(--iq-line);
  border-radius: 10px;
  background: #FFFFFF;
  font-size: 28px;
  font-weight: 800;
}

.iq-slot.is-filled {
  border: 2px solid var(--iq-ink);
}

.iq-slot.is-next {
  border: 2px solid var(--iq-red);
}

.iq-example {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--iq-soft);
  font-size: 13px;
  text-align: center;
}

.iq .iq-digits {
  width: 100%;
  margin: 0;
  padding: 0;
  height: 56px;
  border: 3px solid var(--iq-ink);
  border-radius: 14px;
  background: #FFFFFF;
  color: var(--iq-ink);
  font: 800 30px 'M PLUS Rounded 1c', sans-serif;
  letter-spacing: .3em;
  text-align: center;
}

.iq-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.iq .iq-key {
  min-height: 52px;
  padding: 0;
  border: 3px solid var(--iq-ink);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 3px 0 var(--iq-ink);
  color: var(--iq-ink);
  font: 800 22px 'M PLUS Rounded 1c', sans-serif;
  cursor: pointer;
}

.iq .iq-key--sub {
  background: var(--iq-soft);
  font-size: 14px;
}

.iq .iq-key--go {
  background: var(--iq-red);
  color: #FFFFFF;
  font-size: 15px;
}

/* 答えをえらぶ */
.iq-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--iq-sub);
}

.iq-divider::before,
.iq-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--iq-line);
}

.iq-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.iq-choices--matrix {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.iq .iq-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 6px;
  border: 3px solid var(--iq-ink);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 3px 0 var(--iq-ink);
  color: var(--iq-ink);
  font: 800 22px 'M PLUS Rounded 1c', sans-serif;
  cursor: pointer;
}

.iq .iq-choice:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--iq-ink);
}

.iq-choice__label {
  font-size: 12px;
}

.iq-choices--matrix .iq-choice__label,
.iq-choices--spatial .iq-choice__label {
  position: absolute;
  top: 4px;
  left: 8px;
}

.iq-choices--verbal .iq-choice__text {
  font-size: 18px;
  line-height: 1.3;
}

.iq-choices--matrix svg,
.iq-choices--spatial svg {
  width: 100%;
  max-width: 96px;
  height: auto;
}

.iq .iq-skip {
  align-self: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--iq-sub);
  font: 500 13px 'M PLUS Rounded 1c', sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

.iq-qad {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 28px 0 0;
  min-height: 250px;
}

/* 15問おわり(結果の手前) */
.iq-done {
  align-items: center;
  padding-top: 40px;
  text-align: center;
}

.iq-done__badge {
  padding: 4px 14px;
  border: 2px solid var(--iq-red);
  border-radius: 50px;
  background: #FFFFFF;
  color: var(--iq-red);
  font-size: 13px;
  font-weight: 800;
}

.iq-done__title {
  font-size: 26px;
  font-weight: 800;
}

.iq-done__text {
  font-size: 14px;
}

.iq-done__btn {
  max-width: 320px;
  color: #FFFFFF;
  text-decoration: none;
}

.iq-done__btn:hover {
  color: #FFFFFF;
}

.iq-debug__scroll {
  overflow-x: auto;
}

.iq-debug__table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  font-size: 11px;
}

.iq-debug__table th,
.iq-debug__table td {
  padding: 4px;
  border: 1px solid var(--iq-line);
  white-space: nowrap;
}

/* ---------------- 結果ページ(2026-11-12、「最初の画面=案B 黒い舞台」+「下=パターン2 成績表」。ユーザー決定。モック「IQテスト モック」) ---------------- */
/* 最初の画面の上半分: 黒地(方眼はうすい白)の舞台に、数字を白で大きく。フクロウは右下からのぞく */
.iq-rstage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 380px;
  padding: 34px 16px 56px;
  box-sizing: border-box;
  overflow: hidden;
  background-color: var(--iq-ink);
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 16px 16px;
  color: #FFFFFF;
}

.iq-rstage__lead {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3em;
  color: #B9C1CD;
}

.iq-rstage__num {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 136px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.iq-rstage__bar {
  display: block;
  width: 150px;
  height: 8px;
  border-radius: 4px;
  background: var(--iq-red);
}

.iq-rstage__range {
  margin-top: 12px !important;
  font-size: 13px;
  color: #D9DFE7;
}

/* 平均は100(案B、2026-11-16)。幅の行のすぐ下に小さく */
.iq-rstage__avg {
  margin-top: 2px !important;
  font-size: 12px;
  color: #AEB7C2;
}

.iq-rstage__top {
  margin-top: 12px !important;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--iq-red);
  font-size: 15px;
  font-weight: 800;
  animation: iq-pon .4s ease-out .5s both;
}

.iq-rstage__owl {
  position: absolute;
  right: -18px;
  bottom: -26px;
  line-height: 0;
}

.iq-owlstage {
  display: block;
  width: 108px;
  height: auto;
}

/* 結果を開く時のドラムロール(2026-11-12、モック「アニメ 案B」。result.jsが.iq--result.is-rollと各けたの帯を作る。ローディングから来た1回目だけ)。
   各けたが回って左から順に止まり(--iq-dur)、いちばん右が止まる時刻(--iq-don)に数字が「ドン」と弾み、赤い線・幅・上位%・タイプのカード・ボタンが出る */
/* 読み上げ用(画面には見せない) */
.iq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.iq-rstage__num.is-drum {
  display: flex;
  justify-content: center;
}

.iq-drum {
  display: block;
  height: 1.1em;
  overflow: hidden;
}

.iq-drum__strip {
  display: flex;
  flex-direction: column;
  animation: iq-drum-roll var(--iq-dur, 1s) cubic-bezier(.15, .7, .25, 1) both;
}

.iq-drum__strip span {
  display: block;
  height: 1.1em;
  line-height: 1.1em;
  text-align: center;
}

@keyframes iq-drum-roll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(var(--iq-spins, 20) * -1.1em));
  }
}

@keyframes iq-drum-don {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes iq-bar-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.iq--result.is-roll .iq-rstage__num {
  animation: iq-drum-don .4s ease-out var(--iq-don, 1.9s) both;
}

.iq--result.is-roll .iq-rstage__bar {
  animation: iq-bar-grow .35s ease-out var(--iq-don, 1.9s) both;
}

.iq--result.is-roll .iq-rstage__range,
.iq--result.is-roll .iq-score__diff {
  animation: iq-fade .3s ease-out calc(var(--iq-don, 1.9s) + .15s) both;
}

.iq--result.is-roll .iq-rstage__top {
  animation: iq-pon .4s ease-out calc(var(--iq-don, 1.9s) + .25s) both;
}

.iq--result.is-roll .iq-rtype,
.iq--result.is-roll .iq-rbtns {
  animation: iq-up .4s ease-out calc(var(--iq-don, 1.9s) + .35s) both;
}

/* まわりの人で見る(クラスのタブ)・今日のランキングも、タイプのカードに続いて下から出す(2026-11-16、ユーザー指示「クラスが表示されたままになっている。アニメーションと連動して」) */
.iq--result.is-roll .iq-circle {
  animation: iq-up .4s ease-out calc(var(--iq-don, 1.9s) + .45s) both;
}

.iq--result.is-roll .iq-rank {
  animation: iq-up .4s ease-out calc(var(--iq-don, 1.9s) + .55s) both;
}

/* 書体がそろって見えるまで(is-wait)は止めておき、見え始めてから回す */
.iq--result.is-wait.is-roll .iq-drum__strip,
.iq--result.is-wait.is-roll .iq-rstage__num,
.iq--result.is-wait.is-roll .iq-rstage__bar,
.iq--result.is-wait.is-roll .iq-rstage__range,
.iq--result.is-wait.is-roll .iq-score__diff,
.iq--result.is-wait.is-roll .iq-rstage__top,
.iq--result.is-wait.is-roll .iq-rtype,
.iq--result.is-wait.is-roll .iq-circle,
.iq--result.is-wait.is-roll .iq-rank,
.iq--result.is-wait.is-roll .iq-rbtns {
  animation-play-state: paused;
}

/* 前回より ±N(result.jsが出す)。黒地の上なので白い札 */
.iq-score__diff {
  margin-top: 10px !important;
  padding: 4px 14px;
  border-radius: 50px;
  background: #FFFFFF;
  color: var(--iq-red);
  font-size: 13px;
  font-weight: 800;
}

/* タイプとひとこと: 白いカードを舞台に重ねる */
.iq-rtype {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: -36px 16px 0;
  padding: 16px;
  border: 3px solid var(--iq-ink);
  border-radius: 18px;
  background: #FFFFFF;
}

.iq-rtype__label {
  font-size: 11px;
  font-weight: 800;
  color: var(--iq-sub);
}

.iq-rtype__title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
}

.iq-rtype__comment {
  font-size: 14px;
  line-height: 1.75;
}

/* 答え合わせ・再挑戦(最初の画面に入れる) */
.iq-rbtns {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px 4px;
}

.iq .iq-btn--retry {
  min-height: 52px;
  border: 3px solid var(--iq-red);
  background: #FFFFFF;
  color: var(--iq-red);
  font-size: 16px;
  text-decoration: none;
}

.iq .iq-btn--retry:hover {
  color: var(--iq-red);
}

/* 成績表(パターン2): 答案のような黒ふち+ずらした影 */
.iq-report {
  border: 3px solid var(--iq-ink);
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: 5px 5px 0 var(--iq-ink);
}

.iq-report__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 3px solid var(--iq-ink);
}

.iq-report__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .1em;
}

.iq-report__date {
  font-size: 12px;
  color: var(--iq-sub);
}

.iq-report__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.iq-report__cell {
  padding: 10px 14px;
}

.iq-report__cell:nth-child(odd) {
  border-right: 2px solid var(--iq-line);
}

.iq-report__cell:nth-child(-n+2) {
  border-bottom: 2px solid var(--iq-line);
}

.iq-report__cell dt {
  font-size: 11px;
  color: var(--iq-sub);
}

.iq-report__cell dd {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.iq-report__cell small {
  font-size: 13px;
}

/* 分野ごとの○×(出た順) */
.iq-marks__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.iq-marks__row {
  display: grid;
  grid-template-columns: 52px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--iq-grid);
}

.iq-marks__row:last-child {
  border-bottom: 0;
}

.iq-marks__name {
  font-size: 14px;
  font-weight: 800;
}

.iq-marks__marks {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .3em;
}

.iq-marks__count {
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.iq-marks__row.is-best .iq-marks__name,
.iq-marks__row.is-best .iq-marks__count {
  color: var(--iq-red);
}

.iq-mark-ok {
  color: var(--iq-red);
}

/* ×は青(答え合わせの○×と同じ。赤と明るさもちがう) */
.iq-mark-ng {
  color: #2E5AAC;
}

/* まわりの人で見る(2026-11-16、100人のマスから差し替え)。タブ=クラス/偏差値/役回り。JSなしで、ラジオボタンの:checkedで切り替える。
   見た目は成績表と同じ答案の世界: 黒ふち+ずらした影の紙・紙の上の見出しタブ・数字に赤ペンの丸(AIっぽい丸ボタン・色つきの大きな数字は使わない) */
.iq-circle {
  position: relative;
}

.iq-circle__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.iq-circle__tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin-bottom: -3px;
  padding-left: 8px;
}

.iq-circle__tab {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border: 3px solid var(--iq-ink);
  border-radius: 10px 10px 0 0;
  background: var(--iq-soft);
  color: var(--iq-sub);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#iq-circle-class:checked ~ .iq-circle__tabs [for="iq-circle-class"],
#iq-circle-hensa:checked ~ .iq-circle__tabs [for="iq-circle-hensa"],
#iq-circle-group:checked ~ .iq-circle__tabs [for="iq-circle-group"] {
  border-bottom-color: #FFFFFF;
  background: #FFFFFF;
  color: var(--iq-ink);
}

#iq-circle-class:focus-visible ~ .iq-circle__tabs [for="iq-circle-class"],
#iq-circle-hensa:focus-visible ~ .iq-circle__tabs [for="iq-circle-hensa"],
#iq-circle-group:focus-visible ~ .iq-circle__tabs [for="iq-circle-group"] {
  outline: 3px solid var(--iq-red);
  outline-offset: 2px;
}

.iq-circle__paper {
  padding: 18px 14px 16px;
  border: 3px solid var(--iq-ink);
  border-radius: 0 6px 6px 6px;
  background: #FFFFFF;
  box-shadow: 5px 5px 0 var(--iq-ink);
}

.iq-circle__panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}

#iq-circle-class:checked ~ .iq-circle__paper .iq-circle__panel--class,
#iq-circle-hensa:checked ~ .iq-circle__paper .iq-circle__panel--hensa,
#iq-circle-group:checked ~ .iq-circle__paper .iq-circle__panel--group {
  display: flex;
}

.iq-circle__lead {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.7;
}

.iq-circle__lead small {
  font-size: 12px;
  color: var(--iq-sub);
}

/* 数字に赤ペンの丸(先生が答案に付けるような、少しゆがんで傾いた丸) */
.iq-circle__pen b {
  position: relative;
  display: inline-block;
  margin: 4px 6px 0 4px;
  padding: 0 6px;
  font-size: 30px;
  line-height: 1.15;
  font-feature-settings: "tnum";
}

.iq-circle__pen b::after {
  content: "";
  position: absolute;
  inset: -4px -3px -2px -4px;
  border: 2.5px solid var(--iq-red);
  border-radius: 52% 46% 50% 44% / 60% 52% 46% 42%;
  transform: rotate(-7deg);
}

/* 数字の無い言い方(グループでいちばんの時)は蛍光ペンの線 */
.iq-circle__pen--line {
  background: linear-gradient(transparent 60%, #F8D3CD 60%, #F8D3CD 92%, transparent 92%);
}

.iq-circle__sub {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

/* 教室: 黒板と35の机(5列×7列) */
.iq-room {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 16px;
  border: 2px solid var(--iq-line);
  border-radius: 8px;
  background: #FBF8F1;
}

.iq-room__board {
  width: 100%;
  max-width: 268px;
  padding: 5px 0;
  border: 3px solid #A3784A;
  border-radius: 3px;
  background: #2F5D4A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.iq-room__seats {
  display: grid;
  grid-template-columns: repeat(5, 44px);
  gap: 9px 12px;
}

.iq-room__seat {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border: 2px solid #C9D0DA;
  border-radius: 4px;
  background: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
}

.iq-room__seat.is-above {
  border-color: #F3B9B3;
  background: #F3B9B3;
}

.iq-room__seat.is-you {
  border-color: var(--iq-ink);
  background: var(--iq-red);
  color: #FFFFFF;
}

/* 偏差値(2026-11-16、「話が合う人」から差し替え): 25〜80の目盛りの帯に「あなた」の札、模試の成績表の1行と赤ペンの判定。
   位置はPythonで出した%を --pos で受ける(circle_view の hensa_pos・hensa_ticks) */
.iq-hensa {
  position: relative;
  padding: 30px 6px 0;
}

.iq-hensa__you {
  position: absolute;
  top: 0;
  /* 端(IQ 60以下・133以上)でも札が紙からはみ出さないように */
  left: clamp(26px, calc(6px + (100% - 12px) * var(--pos) / 100), calc(100% - 26px));
  transform: translateX(-50%);
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--iq-red);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.iq-hensa__you::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--iq-red);
}

.iq-hensa__bar {
  display: block;
  height: 14px;
  border: 2px solid var(--iq-ink);
  border-radius: 7px;
  background: linear-gradient(90deg, #FFFFFF calc(var(--pos) * 1%), #F3B9B3 calc(var(--pos) * 1%));
}

.iq-hensa__ticks {
  position: relative;
  display: block;
  height: 18px;
  color: var(--iq-sub);
  font-size: 11px;
  font-weight: 800;
}

.iq-hensa__ticks span {
  position: absolute;
  top: 3px;
  left: calc(var(--pos) * 1%);
  transform: translateX(-50%);
  white-space: nowrap;
}

.iq-hensa__ticks span:last-child {
  transform: translateX(-100%);
}

.iq-hensa__sheet {
  padding: 10px;
  border: 2px solid var(--iq-ink);
  border-radius: 6px;
  background: #FBF8F1;
}

.iq-hensa__sheet-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.iq-hensa__table {
  width: 100%;
  border-collapse: collapse;
}

.iq-hensa__table th,
.iq-hensa__table td {
  padding: 6px 4px;
  border: 2px solid var(--iq-ink);
  text-align: center;
}

.iq-hensa__table th {
  background: var(--iq-soft);
  color: var(--iq-sub);
  font-size: 11px;
  font-weight: 800;
}

.iq-hensa__table td {
  background: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.iq-hensa__table td.is-subject {
  font-size: 12px;
}

.iq-hensa__table td.is-hensa {
  color: var(--iq-red);
}

.iq-hensa__grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--iq-red);
  border-radius: 50%;
  color: var(--iq-red);
  transform: rotate(-8deg);
}

.iq-hensa__legend {
  margin: 8px 0 0;
  color: var(--iq-sub);
  font-size: 11px;
}

/* 役回り(旧グループ): 丸いテーブルを7人で囲む。1人目が真上、時計回りに頭の回転が速い順 */
.iq-table {
  position: relative;
  width: 280px;
  height: 270px;
  margin: 8px auto 0;
}

.iq-table__top {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  margin: -58px 0 0 -58px;
  border: 3px solid #A3784A;
  border-radius: 50%;
  background: #EADFCB;
  color: #7A5A36;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.iq-table__seat {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 72px;
  margin: -30px 0 0 -36px;
  transform: rotate(calc(var(--i) * 360deg / 7)) translateY(-104px) rotate(calc(var(--i) * -360deg / 7));
}

.iq-table__seat em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid #C9D0DA;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--iq-sub);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.iq-table__seat small {
  color: var(--iq-sub);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.iq-table__seat.is-you em {
  border-color: var(--iq-ink);
  background: var(--iq-red);
  color: #FFFFFF;
  font-size: 10px;
}

.iq-table__seat.is-you small {
  color: var(--iq-red);
}

.iq-table__crown {
  position: absolute;
  top: -13px;
  fill: #E8B12E;
  stroke: var(--iq-ink);
  stroke-width: 1.5;
}

.iq-chart {
  padding: 8px;
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
  font-family: 'M PLUS Rounded 1c', sans-serif;
}

/* これまでの記録の棒グラフ(2026-11-12、モック「記録 案B」。result.jsが作る)。今回は赤、前のベストは赤ふち */
.iq-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  padding: 0 6px;
  border-bottom: 2px solid var(--iq-ink);
}

.iq-bars__col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 100%;
  min-width: 0;
}

.iq-bars__tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--iq-red-dark);
  white-space: nowrap;
}

.iq-bars__value {
  font-size: 13px;
  font-weight: 800;
}

/* 棒の高さはresult.jsがpxで決める(いちばん高い棒=BAR_MAX_PX) */
.iq-bars__bar {
  display: block;
  width: 100%;
  max-width: 44px;
  border-radius: 6px 6px 0 0;
  background: #B9C1CD;
}

.iq-bars__col.is-best .iq-bars__bar {
  box-sizing: border-box;
  border: 3px solid var(--iq-red);
  border-bottom: 0;
  background: #FFFFFF;
}

.iq-bars__col.is-current .iq-bars__bar {
  border: 0;
  background: var(--iq-red);
}

.iq-bars__col.is-current .iq-bars__value {
  font-size: 16px;
  color: var(--iq-red);
}

.iq-bars__dates {
  display: flex;
  gap: 10px;
  padding: 4px 6px 0;
}

.iq-bars__dates span {
  flex: 1 1 0;
  min-width: 0;
  font-size: 10px;
  color: var(--iq-sub);
  text-align: center;
}

.iq-bars__dates .is-current {
  font-weight: 800;
  color: var(--iq-red);
}

/* 白い箱(分野ごとの○×・位置・シェア) */
.iq-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border: 2px solid var(--iq-line);
  border-radius: 16px;
  background: #FFFFFF;
}

.iq-card__title {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 800;
}

.iq-actions {
  gap: 10px;
}

/* 答え合わせへの目立つボタン(2026-11-11、ユーザー指示「もっと目立っていい」) */
.iq .iq-reviewcta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 18px;
  border-radius: 16px;
  background: var(--iq-ink);
  box-shadow: 0 4px 0 #000000;
  color: #FFFFFF;
  text-decoration: none;
}

.iq .iq-reviewcta:hover {
  color: #FFFFFF;
  opacity: .92;
}

.iq-reviewcta__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.iq-reviewcta__text b {
  font-size: 17px;
  font-weight: 800;
}

.iq-reviewcta__text small {
  font-size: 11px;
  opacity: .8;
}

.iq-reviewcta__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--iq-red);
  font-size: 18px;
  font-weight: 800;
}

.iq-actions__label {
  font-size: 12px;
  font-weight: 800;
  color: var(--iq-sub);
}

.iq .iq-btn--line {
  min-height: 54px;
  border: 3px solid var(--iq-ink);
  background: #FFFFFF;
  box-shadow: 0 3px 0 var(--iq-ink);
  color: var(--iq-ink);
  font-size: 16px;
  text-decoration: none;
}

.iq .iq-btn--line:hover {
  color: var(--iq-ink);
}

.iq-share {
  display: flex;
  gap: 10px;
}

.iq .iq-btn--x,
.iq .iq-btn--copy {
  flex: 1;
  min-height: 50px;
  font-size: 15px;
}

.iq .iq-btn--x {
  background: #000000;
  color: #FFFFFF;
  text-decoration: none;
}

.iq .iq-btn--x:hover {
  color: #FFFFFF;
}

.iq-share__status:empty {
  display: none;
}

.iq .iq-btn--link {
  min-height: 60px;
  color: #FFFFFF;
  font-size: 18px;
  text-decoration: none;
}

.iq .iq-btn--link:hover {
  color: #FFFFFF;
}

.iq-result__caution {
  font-size: 11px;
}

/* ---------------- 答え合わせ ---------------- */
.iq-review__head {
  gap: 12px;
  padding-bottom: 4px;
}

/* 上の小さなパンくず(答え合わせの上部 案B) */
.iq .iq-crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--iq-sub);
}

.iq .iq-crumb li + li::before {
  content: "›";
  margin-right: 6px;
}

.iq .iq-crumb a {
  color: var(--iq-sub);
  text-decoration: none;
}

.iq .iq-crumb a:hover {
  color: var(--iq-ink);
  text-decoration: underline;
}

.iq .iq-crumb [aria-current] {
  color: var(--iq-ink);
}

/* タイトル・正解数の輪・IQをまとめた箱。中に「結果にもどる」 */
.iq-review__box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 3px solid var(--iq-ink);
  border-radius: 16px;
  background: #FFFFFF;
}

.iq-review__summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.iq-review__ring {
  flex: 0 0 64px;
  font-family: 'M PLUS Rounded 1c', sans-serif;
}

.iq-review__titles {
  min-width: 0;
}

.iq-review__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.iq-review__score {
  margin-top: 2px !important;
  font-size: 13px;
}

.iq .iq-review__back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 2px solid var(--iq-ink);
  border-radius: 50px;
  background: #FFFFFF;
  color: var(--iq-ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.iq .iq-review__back:hover {
  background: var(--iq-ink);
  color: #FFFFFF;
}

.iq-review__filter {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.iq .iq-chip {
  padding: 5px 12px;
  border: 2px solid var(--iq-ink);
  border-radius: 50px;
  background: #FFFFFF;
  color: var(--iq-ink);
  font: 800 12px 'M PLUS Rounded 1c', sans-serif;
  cursor: pointer;
}

.iq .iq-chip.is-on {
  background: var(--iq-ink);
  color: #FFFFFF;
}

.iq-review__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px !important;
}

.iq-review__list.is-wrong-only .is-ok {
  display: none;
}

/* 合間の広告(2か所)。「まちがえた問題」だけの時、前に問題が無くて広告が続くものはreview.jsがis-skipで隠す */
.iq-review__ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 268px;
  padding: 4px 0;
}

.iq-review__list.is-wrong-only .iq-review__ad.is-skip {
  display: none;
}

.iq-review__ad-label {
  font-size: 10px;
  color: var(--iq-sub);
}

.iq-review__ad-slot {
  display: flex;
  justify-content: center;
  min-height: 250px;
}

.iq-review__item {
  padding: 12px;
  border: 2px solid var(--iq-line);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-review__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iq-review__no {
  font-size: 13px;
  font-weight: 800;
  color: var(--iq-sub);
}

.iq-review__field {
  padding: 1px 8px;
  border: 1px solid var(--iq-ink);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
}

.iq-review__mark {
  margin-left: auto;
  line-height: 0;
}

.iq-review__q {
  margin: 6px 0 4px !important;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.iq-review__ans {
  font-size: 13px;
  line-height: 1.6;
}

.iq-review__arrow {
  color: var(--iq-sub);
}

.iq-review__matrix {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  gap: 4px;
  margin: 4px 0 8px;
}

.iq-review__matrix > span {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--iq-line);
  border-radius: 6px;
}

.iq-review__matrix svg {
  width: 90%;
  height: auto;
}

.iq-review__matrix .is-blank {
  border: 2px dashed var(--iq-ink);
  font-weight: 800;
}

.iq-review__figure svg {
  width: 80px;
  height: 80px;
  margin: 4px 0 8px;
}

.iq-review__correct {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.iq-review__correct-label {
  color: var(--iq-red);
  font-size: 13px;
  font-weight: 800;
}

.iq-review__correct-svg svg {
  width: 56px;
  height: 56px;
  border: 2px solid var(--iq-red);
  border-radius: 8px;
}

.iq-review__explain {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--iq-soft);
  font-size: 13px;
  line-height: 1.7;
}

/* 結果ページ: result.jsが「前回より」「これまでの記録」を出し、フォントがそろうまで隠して、ふっと出す(ちらつき対策。result.htmlのスクリプト) */
.iq--result {
  transition: opacity .3s ease-out;
}

.iq--result.is-wait {
  opacity: 0;
}

/* ---------------- 結果の前のローディング(モック「ローディング 案A 採点中」+計算の段) ----------------
   時間割(ページを開いてから): 0.4〜3.2秒 ○×が1問ずつ → 3.7秒 採点の段が消えて計算の段が出る → 3.9〜6.9秒 数字が回って「?」で止まる・
   バーが伸びる・工程の文字が3つ切り替わる(1秒ずつ) → 6.9秒「計算できました!」→ その動きが終わって1.2秒見せてから結果ページへ
   (loading.htmlのスクリプトが.iq-calc__doneのanimationendを待つ。目安の合計はcontents_app.pyのIQ_TEST_LOADING_MS) */
.iq-loading__body {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  /* 上に詰まって見えないよう、画面の上から少しあけて置く(2026-11-11、ユーザー指示) */
  padding: 0 16px;
  padding-top: clamp(40px, 14vh, 140px);
}

.iq-loading__stage {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.iq-loading__stage--grade {
  animation: iq-stage-out .3s ease-in 3.7s both;
}

.iq-loading__stage--calc {
  animation: iq-stage-in .4s ease-out 3.75s both;
}

@keyframes iq-stage-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
  }
}

@keyframes iq-stage-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    visibility: hidden;
  }
  to {
    opacity: 1;
    transform: none;
    visibility: visible;
  }
}

.iq-loading__title {
  /* 右の「...」と同じ幅を左にもあけて、文字を真ん中に保つ */
  padding-left: 1.1em;
  font-size: 20px;
  font-weight: 800;
}

/* 「...」は幅を変えずに3つの点を順に濃くする(文字数を増減させると、真ん中寄せの文字が左右にずれるため。2026-11-11、ユーザー指示) */
.iq-dots {
  display: inline-block;
  width: 1.1em;
  text-align: left;
}

.iq-dots i {
  font-style: normal;
  animation: iq-dot 1.2s ease-in-out infinite;
}

.iq-dots i:nth-child(2) { animation-delay: .2s; }
.iq-dots i:nth-child(3) { animation-delay: .4s; }

@keyframes iq-dot {
  0%, 100% { opacity: .15; }
  40% { opacity: 1; }
}

/* フォントがそろうまでは隠して動きも止める(loading.htmlのスクリプトがis-waitを外す。かくつき対策) */
.iq-loading__body {
  transition: opacity .25s ease-out;
}

.iq-loading.is-wait .iq-loading__body {
  opacity: 0;
}

.iq-loading.is-wait *,
.iq-loading.is-wait *::before,
.iq-loading.is-wait *::after {
  animation-play-state: paused !important;
}

/* 計算の段: 結果ページのIQの枠と同じ形の中で数字が回る */
.iq-calc__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 240px;
  padding: 12px 0 14px;
  border: 3px solid var(--iq-ink);
  border-radius: 22px;
  background: #FFFFFF;
}

.iq-calc__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--iq-sub);
}

.iq-calc__window {
  display: block;
  height: 80px;
  overflow: hidden;
}

.iq-calc__strip {
  display: block;
  font-size: 68px;
  font-weight: 800;
  line-height: 80px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  animation: iq-roll 3s cubic-bezier(.2, .7, .3, 1) 3.9s both;
}

.iq-calc__strip span {
  display: block;
  height: 80px;
}

/* 13個の数字を回して、最後の「?」で止める(12個ぶん上へ) */
@keyframes iq-roll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-960px);
  }
}

.iq-calc__bar {
  display: block;
  width: 240px;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--iq-line);
}

.iq-calc__fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--iq-red);
  animation: iq-fill 3s linear 3.9s both;
}

@keyframes iq-fill {
  to {
    width: 100%;
  }
}

/* 工程の文字: 同じ場所に重ねて、順に入れかえる */
.iq-calc__steps {
  display: grid;
  min-height: 1.6em;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.iq-calc__steps span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: iq-step 1s ease-in-out both;
}

.iq-calc__steps span:nth-child(1) { animation-delay: 3.9s; }
.iq-calc__steps span:nth-child(2) { animation-delay: 4.9s; }
.iq-calc__steps span:nth-child(3) { animation-delay: 5.9s; }

@keyframes iq-step {
  0% { opacity: 0; transform: translateY(6px); }
  20%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-6px); }
}

.iq-calc__steps .iq-calc__done {
  color: var(--iq-red);
  font-weight: 800;
  /* iq-ponの最後のコマはopacityを持たないため、ここで1にしないと上の「opacity: 0」に戻って一瞬で消える(出る前は0%のコマで隠れる) */
  opacity: 1;
  animation: iq-pon .35s ease-out 6.9s both;
}

.iq-sheet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 6px;
  width: 100%;
  max-width: 300px;
  padding: 10px 6px !important;
  border: 3px solid var(--iq-ink);
  border-radius: 14px;
  background: #FFFFFF;
}

.iq-sheet__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
  border-bottom: 1px dashed var(--iq-line);
  font-size: 12px;
  font-weight: 700;
}

.iq-sheet__mark {
  animation: iq-pon .3s ease-out var(--iq-delay, 0s) both;
}

.iq-loading__ad {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  min-height: 250px;
  margin-top: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .iq-sheet__mark,
  .iq-calc__strip,
  .iq-calc__fill {
    animation: none;
  }

  /* 動きを減らす設定では、段・工程の文字の入れかえを同じ時刻に動きなしで行う */
  .iq-loading__stage--grade,
  .iq-loading__stage--calc,
  .iq-calc__steps span {
    animation-duration: .01s;
  }

  .iq-dots i {
    animation: none;
    opacity: 1;
  }

  .iq-rstage__top,
  .iq--result.is-roll .iq-rstage__num,
  .iq--result.is-roll .iq-rstage__bar,
  .iq--result.is-roll .iq-rstage__range,
  .iq--result.is-roll .iq-score__diff,
  .iq--result.is-roll .iq-rstage__top,
  .iq--result.is-roll .iq-rtype,
  .iq--result.is-roll .iq-circle,
  .iq--result.is-roll .iq-rank,
  .iq--result.is-roll .iq-rbtns {
    animation: none;
  }

  .iq--result,
  .iq-loading__body {
    transition: none;
  }
}

/* 開発用(devだけ): ランダムに答えて結果へ */
.iq .iq-dev {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: none;
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 2px dashed #8A6D00;
  border-radius: 12px;
  background: #FFF8DC;
  color: #5C4A00;
  font-size: 12px;
}

.iq-dev__title {
  width: 100%;
  font-weight: 800;
}

.iq .iq-dev__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 700;
}

.iq .iq-dev__btn {
  padding: 6px 12px;
  border: 2px solid #5C4A00;
  border-radius: 50px;
  background: #FFFFFF;
  color: #5C4A00;
  font: 800 12px 'M PLUS Rounded 1c', sans-serif;
  cursor: pointer;
}

.iq-qdev {
  position: relative;
  z-index: 1;
  padding: 16px 16px 0;
}

/* =====================================================================
   参加者のランキング(2026-11-16、モックのページ「参加者のランキング」A+B+C)。見た目は成績表と同じ答案の世界(黒ふち+ずらした影の紙)
   ===================================================================== */
.iq-rank {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 16px;
  border: 3px solid var(--iq-ink);
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: 5px 5px 0 var(--iq-ink);
}

.iq-rank__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.iq-rank__badge {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--iq-ink);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
}

.iq-rank__at,
.iq-rank__count {
  color: var(--iq-sub);
  font-size: 11px;
  font-weight: 700;
}

.iq-rank__name {
  margin: 0;
  color: var(--iq-sub);
  font-size: 12px;
}

.iq-rank__name b {
  color: var(--iq-ink);
}

.iq-rank__more,
.iq-rank__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 3px solid var(--iq-ink);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 3px 3px 0 var(--iq-ink);
  color: var(--iq-ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

/* 表(結果ページ・入口・ランキングページで共通) */
.iq-ranklist {
  margin: 0;
  padding: 0;
  border: 2px solid var(--iq-ink);
  border-radius: 6px;
  overflow: hidden;
  list-style: none;
}

.iq-ranklist__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 10px;
  background: #FFFFFF;
}

.iq-ranklist__row + .iq-ranklist__row {
  border-top: 1px solid var(--iq-line);
}

.iq-ranklist__row.is-me {
  background: var(--iq-red);
  color: #FFFFFF;
}

.iq-ranklist__no {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 2px solid var(--iq-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.iq-ranklist__no.is-top1,
.iq-ranklist__no.is-top2,
.iq-ranklist__no.is-top3 {
  border-color: var(--iq-ink);
  color: var(--iq-ink);
}

.iq-ranklist__no.is-top1 {
  background: #E8B12E;
}

.iq-ranklist__no.is-top2 {
  background: #C9CFD8;
}

.iq-ranklist__no.is-top3 {
  background: #D49A62;
}

/* 名前は省略せず折り返す(結果ページの幅では「#」の後ろが切れたため) */
.iq-ranklist__name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

/* 「#0421」は途中で折り返さない */
.iq-ranklist__tag {
  white-space: nowrap;
}

.iq-ranklist__score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
}

.iq-ranklist__score b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.iq-ranklist__score small {
  font-size: 10px;
  opacity: .8;
}

/* 入口のトップ10: 黒い見出しの帯を紙の上に */
.iq-rank--board {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.iq-rank--board .iq-ranklist {
  border: 0;
  border-radius: 0;
}

.iq-rank__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 14px;
  background: var(--iq-ink);
  color: #FFFFFF;
}

.iq-rank__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.iq-rank--board .iq-rank__count {
  color: #C9CFD8;
}

.iq-rank--board .iq-rank__link {
  border: 0;
  border-top: 3px solid var(--iq-ink);
  border-radius: 0;
  background: var(--iq-soft);
  box-shadow: none;
}

.iq-rank__empty {
  margin: 0;
  padding: 16px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.iq-rank__yesterday {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 800;
}

/* ランキングページ */
.iq-rank__h1 {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 800;
}

.iq-rank__tabs {
  position: relative;
  display: flex;
  gap: 4px;
  margin-bottom: -3px;
  padding-left: 8px;
}

.iq-rank__tab {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 3px solid var(--iq-ink);
  border-radius: 10px 10px 0 0;
  background: var(--iq-soft);
  color: var(--iq-sub);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.iq-rank__tab.is-on {
  border-bottom-color: #FFFFFF;
  background: #FFFFFF;
  color: var(--iq-ink);
}

.iq-rank__paper {
  border: 3px solid var(--iq-ink);
  border-radius: 0 6px 6px 6px;
  background: #FFFFFF;
  box-shadow: 5px 5px 0 var(--iq-ink);
  overflow: hidden;
}

.iq-rank__paper .iq-ranklist {
  border: 0;
  border-top: 1px solid var(--iq-line);
  border-radius: 0;
}

.iq-rank__period {
  margin: 0;
  padding: 10px 14px;
  color: var(--iq-sub);
  font-size: 12px;
  font-weight: 700;
}

.iq-rank__mine {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 3px solid var(--iq-red);
  border-radius: 6px;
  background: #FFF4F2;
}

.iq-rank__mine-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--iq-red);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
}

.iq-rank__mine-text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 800;
}

.iq-rank__mine-text small {
  color: var(--iq-sub);
  font-size: 12px;
  font-weight: 700;
}

.iq-rank__rule {
  padding: 12px 14px;
  border: 2px solid var(--iq-ink);
  border-radius: 6px;
  background: #FFFFFF;
}

.iq-rank__rule-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
}

.iq-rank__rule ol {
  margin: 0 0 8px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
}
