/* =========================================================
   タブレット前提のレイアウト（application.css / lessons.css のあとに読む）
     スマホ   〜767px   : 下のタブバー
     タブレット 768〜1279px: 左に大きなアイコンのレール（縦向き iPad 810px / 横向き 1180px）
     PC     1280px〜   : 左に名前つきのサイドメニュー
   イラストは「文字の大きさ」ではなく、見て分かる大きさで出す
   ========================================================= */
:root {
  --top-h: 64px;
  --nav-h: 72px;
  --rail-w: 108px;
  --tap: 48px;           /* 指で押しやすい最小サイズ */
}

/* ---------- 共通: 押しやすさ ---------- */
.btn { min-height: var(--tap); padding: 10px 18px; border-radius: 14px; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .9rem; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; font-size: .92rem; }
.tabs .illust-icon { width: 28px; height: 28px; vertical-align: middle; }
input[type=text], input[type=password], input[type=search], select { min-height: var(--tap); }

/* ---------- ヘッダー ---------- */
.topbar { gap: 10px; }
.brand { font-size: 1.15rem; gap: 10px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; }
.brand-mark:has(img) { background: none; }
.brand-mark .illust-icon { width: 44px; height: 44px; vertical-align: top; }
.top-streak { display: inline-flex; align-items: center; gap: 4px; font-size: 1rem; }
.top-streak .illust-icon { width: 30px; height: 30px; }
.top-user .avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); overflow: hidden; font-size: 26px; }
.top-user .avatar .illust-icon { width: 44px; height: 44px; vertical-align: top; }
.top-toggle { min-height: 40px; padding: 4px 12px; font-size: .85rem; }
@media (max-width: 520px) {
  .brand > span:last-child { display: none; }      /* スマホは名前を省いてロゴだけ */
}

/* ---------- スマホ: 下のタブバー ---------- */
.tabbar a { font-size: .72rem; gap: 3px; }
.tabbar a .ico { font-size: 1.6rem; }
.tabbar .illust-icon { width: 34px; height: 34px; vertical-align: top; }
.tabbar a.active .ico { transform: scale(1.08); }

/* ---------- タブレット: アイコンレール ---------- */
@media (min-width: 768px) {
  body { font-size: 17px; }
  .layout { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .sidenav { padding: 10px 8px; }
  .sidenav a {
    flex-direction: column; justify-content: center; gap: 4px; padding: 10px 4px; min-height: 84px;
    text-align: center; font-size: .74rem; line-height: 1.25; border-radius: 16px; margin-bottom: 4px;
  }
  .sidenav .ico { width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.9rem; }
  .sidenav .illust-icon { width: 52px; height: 52px; vertical-align: top; }
  .sidenav a.active { box-shadow: inset 0 0 0 2px var(--primary); }
  .sidenav .section { font-size: 0; height: 2px; background: var(--border); margin: 10px 14px; border-radius: 2px; }
  .sidenav form { padding: 0 !important; }
  .sidenav form .btn { width: 100%; padding: 6px 4px; font-size: .74rem; flex-direction: column; gap: 0; min-height: 56px; }
  .main { padding: 20px 24px 40px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .card { padding: 20px; border-radius: 20px; }
}

/* ---------- PC: 名前つきサイドメニュー ---------- */
@media (min-width: 1280px) {
  :root { --rail-w: 248px; }
  .sidenav { padding: 16px 12px; }
  .sidenav a { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; min-height: 56px; padding: 8px 12px; font-size: .98rem; }
  .sidenav .ico, .sidenav .illust-icon { width: 40px; height: 40px; }
  .sidenav .section { font-size: .75rem; height: auto; background: none; margin: 16px 12px 6px; }
  .sidenav form .btn { flex-direction: row; font-size: .9rem; min-height: 44px; gap: 6px; }
}

/* ---------- ホーム ---------- */
.hero .avatar-xl { width: 96px; height: 96px; border-radius: 24px; overflow: hidden; font-size: 56px; }
.hero .avatar-xl .illust-icon { width: 96px; height: 96px; vertical-align: top; }
.hero .name { font-size: 1.35rem; }
.guide-hello .guide-img { width: 120px; height: 120px; }
.guide-hello .bubble { font-size: 1rem; padding: 10px 14px; margin-bottom: 40px; }
@media (min-width: 768px) {
  .hero { padding: 22px 24px; border-radius: 24px; }
  .hero .avatar-xl { width: 128px; height: 128px; border-radius: 28px; }
  .hero .avatar-xl .illust-icon { width: 128px; height: 128px; }
  .hero .name { font-size: 1.6rem; }
  .guide-hello .guide-img { width: 160px; height: 160px; }
  .guide-hello .bubble { font-size: 1.15rem; }
}

/* ---------- 教科タイル ---------- */
.tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.tile { padding: 14px; text-align: center; border-radius: 20px; }
.tile .ico { height: 96px; display: grid; place-items: center; font-size: 3.2rem; }
.tile .ico .illust-icon { width: 96px; height: 96px; }
.tile .nm { font-size: 1.1rem; }
.tile .row { justify-content: space-between; }
@media (min-width: 768px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
  .tile .ico { height: 128px; }
  .tile .ico .illust-icon { width: 128px; height: 128px; }
}

/* 教科ページ: 科目の見出し・単元リスト */
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.card-head h2 .illust-icon, h1 .illust-icon { width: 56px; height: 56px; vertical-align: middle; }
.unit-item { padding: 14px 6px; min-height: 64px; }
.unit-item .state { width: 48px; height: 48px; font-size: 1.3rem; overflow: hidden; }
.unit-item .state .illust-icon { width: 44px; height: 44px; vertical-align: top; }
.unit-item .nm { font-size: 1.05rem; }
.unit-item .meta { font-size: .85rem; }

/* ---------- 職業 ---------- */
.career-card .ico { width: 72px; height: 72px; border-radius: 18px; font-size: 2.4rem; overflow: hidden; }
.career-card .ico .illust-icon { width: 72px; height: 72px; vertical-align: top; }
.career-card .ico.ico-xl { width: 160px; height: 160px; border-radius: 28px; font-size: 5rem; }
.career-card .ico.ico-xl .illust-icon { width: 160px; height: 160px; }
@media (max-width: 599px) { .career-card .ico.ico-xl, .career-card .ico.ico-xl .illust-icon { width: 112px; height: 112px; } }

/* 職業一覧: 絵が主役のカード */
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (min-width: 768px) { .pic-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; } }
.pic-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 12px 14px;
  color: var(--text); text-decoration: none; transition: transform .15s;
}
.pic-card:hover { text-decoration: none; transform: translateY(-2px); }
.pic-card:active { transform: scale(.98); }
.pic-card .pic { width: 128px; height: 128px; border-radius: 24px; background: var(--surface-2); display: grid; place-items: center; font-size: 4rem; overflow: hidden; }
.pic-card .pic .illust-icon { width: 128px; height: 128px; vertical-align: top; }
@media (min-width: 768px) { .pic-card .pic, .pic-card .pic .illust-icon { width: 150px; height: 150px; } }
.pic-card .nm { font-weight: 800; font-size: 1.08rem; line-height: 1.35; }
.pic-card .sub { font-size: .8rem; color: var(--muted); }
.pic-card .desc { font-size: .82rem; color: var(--muted); margin: 0; }
.pic-card .bar { width: 100%; }
.pic-grid.compact .pic, .pic-grid.compact .pic .illust-icon { width: 96px; height: 96px; }

/* ---------- バッジ ---------- */
.badges { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.badge-item { padding: 14px 8px; border-radius: 18px; }
.badge-item .ico { height: 96px; display: grid; place-items: center; font-size: 3rem; }
.badge-item .ico .illust-icon { width: 96px; height: 96px; }
.badge-item .nm { font-size: .9rem; }
@media (min-width: 768px) {
  .badges { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .badge-item .ico { height: 120px; }
  .badge-item .ico .illust-icon { width: 120px; height: 120px; }
}

/* ランキングなどのアバター */
.rank .av { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.rank .av .illust-icon { width: 44px; height: 44px; vertical-align: top; }
.rank li { min-height: 60px; }

/* ---------- 単元ページ ---------- */
.unit-head { display: flex; gap: 16px; align-items: center; }
.unit-head-ico { flex: none; width: 88px; height: 88px; border-radius: 22px; background: var(--surface-2); display: grid; place-items: center; font-size: 3rem; overflow: hidden; }
.unit-head-ico .illust-icon { width: 88px; height: 88px; vertical-align: top; }
.unit-head .body { flex: 1; min-width: 0; }
@media (min-width: 768px) { .unit-head-ico, .unit-head-ico .illust-icon { width: 120px; height: 120px; } }
.chip .illust-icon { width: 22px; height: 22px; }
.unit-nav a .illust-icon { width: 32px; height: 32px; }
.essence { font-size: 1.08rem; }
@media (min-width: 768px) { .essence { font-size: 1.15rem; line-height: 2; } .key-points li { font-size: 1.05rem; padding: 12px 14px 12px 48px; } }
.lesson-guide { width: 64px; height: 64px; }
@media (min-width: 768px) { .lesson-guide { width: 88px; height: 88px; } }

/* 理解度の顔ボタン */
.faces label { padding: 10px 4px; font-size: .75rem; min-height: 96px; justify-content: center; }
.faces label .f { font-size: 2rem; }
.faces label .f .illust-icon { width: 48px; height: 48px; }
@media (min-width: 768px) { .faces label { font-size: .85rem; } .faces label .f .illust-icon { width: 64px; height: 64px; } }

/* ---------- 4コマ漫画: 絵を大きく、全部見えるように ---------- */
.comic { max-width: 1040px; }
.comic-title { font-size: 1.2rem; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
@media (min-width: 1100px) { .comic-strip { grid-template-columns: 1fr 1fr; } }
/* 1コマまるごとの絵: 絵は切らずに 3:2 で全部見せ、せりふは絵の下に */
.koma.has-img { padding: 0; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; background: #fff; }
.koma.has-img .koma-bg { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.koma.has-img .img-bubbles { padding: 10px; border-top: 3px solid #111; background: #fff; flex-wrap: wrap; }
.koma.has-img .img-bubbles .bubble { font-size: .95rem; min-width: 40%; }
.koma.has-img .img-bubbles .bubble .who { font-size: .78rem; }
.koma.has-img .narration { font-size: .85rem; }
.koma.has-img .koma-no { background: #fff; border: 2px solid #111; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; top: 6px; right: 6px; }
/* 背景の絵 + キャラ: コマを高くしてキャラを大きく */
@media (min-width: 600px) {
  .koma { min-height: 340px; padding: 40px 12px 6px; }
  .chara { width: 140px; height: 168px; }
  .bubble { font-size: 1rem; padding: 9px 13px; }
  .narration { font-size: .9rem; }
  .actor-name { font-size: .78rem; }
}
@media (min-width: 1100px) { .koma { min-height: 380px; } }

/* ---------- ドリル ---------- */
.drill { max-width: 880px; }
.drill-q { font-size: 1.3rem; }
.drill-choice { min-height: 68px; font-size: 1.1rem; padding: 14px 16px; border-radius: 16px; }
.drill-choice .mark { width: 34px; height: 34px; font-size: 1.05rem; }
.drill-tf .drill-choice { min-height: 130px; font-size: 3rem; }
.drill-input input { font-size: 1.4rem; min-height: 60px; }
.drill-mode .illust-icon { width: 32px; height: 32px; vertical-align: middle; }
.boss { font-size: 5rem; }
.boss .illust-icon { width: 160px; height: 160px; vertical-align: top; }
.fb-guide { width: 112px; height: 112px; }
.guide-result { width: 200px; height: 200px; }
.reward .big .guide-img { width: 180px; height: 180px; }
@media (min-width: 768px) {
  .drill-q { font-size: 1.5rem; }
  .drill-card { padding: 24px; border-radius: 24px; }
  .drill-choice { min-height: 80px; font-size: 1.25rem; }
  .boss .illust-icon { width: 200px; height: 200px; }
  .fb-guide { width: 140px; height: 140px; }
  .guide-result { width: 260px; height: 260px; }
}
.drill-back { min-height: var(--tap); padding: 8px 18px; font-size: 1rem; }

/* 手書きパッドの道具 */
.hw-tools .btn { min-height: 44px; }
.pic-grid.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* タブレット: 背景＋キャラのコマもキャラを大きく（コマの横幅が広いため） */
@media (min-width: 768px) {
  .koma { min-height: 400px; }
  .chara { width: 170px; height: 204px; }
  .actors.n1 .chara { width: 210px; height: 252px; }
  .pro-badge { width: 40px; height: 40px; font-size: 1.4rem; bottom: 24px; }
}
@media (min-width: 1100px) { .chara { width: 150px; height: 180px; } .actors.n1 .chara { width: 180px; height: 216px; } }
@media (max-width: 599px) {
  .pic-grid, .pic-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pic-card { padding: 12px 8px; }
  .pic-card .pic, .pic-card .pic .illust-icon { width: 104px; height: 104px; }
  .pic-grid.compact .pic, .pic-grid.compact .pic .illust-icon { width: 88px; height: 88px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* プロフィール: アバターと年齢をえらぶ（大きなボタン） */
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.avatar-pick input, .age-pick input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-pick label { display: grid; place-items: center; aspect-ratio: 1; border: 3px solid var(--border); border-radius: 20px; cursor: pointer; font-size: 2.6rem; overflow: hidden; background: var(--surface-2); }
.avatar-pick label .illust-icon { width: 100%; height: 100%; vertical-align: top; }
.avatar-pick input:checked + label { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); transform: scale(1.04); }
.age-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.age-pick label { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; text-align: center; padding: 6px; line-height: 1.3; }
.age-pick label b { font-size: 1.05rem; }
.age-pick label small { font-size: .75rem; }
.age-pick input:checked + label { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.age-pick input:focus-visible + label, .avatar-pick input:focus-visible + label { outline: 3px solid var(--primary); }

/* =========================================================
   いっしょに育つキャラ
   ========================================================= */
.buddy-figure { --s: 1; --box: 200px; position: relative; width: var(--box); height: var(--box); display: grid; place-items: center; flex: none; }
.buddy-figure.size-lg { --box: 260px; }
.buddy-figure.size-sm { --box: 112px; }
@media (min-width: 768px) { .buddy-figure.size-lg { --box: 320px; } .buddy-figure.size-sm { --box: 128px; } }
.buddy-aura { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, #fff 0 45%, #e0e7ff 70%, transparent 71%); }
.stage-junior .buddy-aura { background: radial-gradient(circle, #fff 0 45%, #bae6fd 70%, transparent 71%); }
.stage-hero .buddy-aura { background: radial-gradient(circle, #fff 0 40%, #fde68a 68%, transparent 71%); box-shadow: 0 0 30px #fcd34d; }
.stage-legend .buddy-aura { background: conic-gradient(from 0deg, #f472b6, #fbbf24, #34d399, #60a5fa, #a78bfa, #f472b6); filter: blur(1px); animation: buddy-spin 8s linear infinite; }
.stage-legend .buddy-aura::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: #fff; }
.buddy-body { position: relative; width: calc(var(--box) * .78 * var(--s)); height: calc(var(--box) * .78 * var(--s)); display: grid; place-items: center; font-size: calc(var(--box) * .5 * var(--s)); animation: buddy-bob 2.6s ease-in-out infinite; }
.buddy-body .illust-icon { width: 100%; height: 100%; vertical-align: top; border-radius: 22%; }
.mood-lonely .buddy-body, .mood-sleepy .buddy-body { animation-duration: 5s; filter: saturate(.75); }
.mood-sleepy .buddy-body { transform: rotate(-6deg); }
.buddy-egg { position: relative; width: calc(var(--box) * .58); height: calc(var(--box) * .74); border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%; background: linear-gradient(160deg, #fff 0%, #fef3c7 60%, #fde68a 100%); border: 3px solid #f59e0b; display: grid; place-items: center; overflow: hidden; animation: buddy-wobble 3s ease-in-out infinite; box-shadow: inset -8px -10px 0 rgba(245,158,11,.15); }
.buddy-egg .peek { width: 60%; height: 60%; display: grid; place-items: center; font-size: calc(var(--box) * .2); opacity: .9; clip-path: inset(0 0 35% 0); transform: translateY(18%); }
.buddy-egg .peek .illust-icon { width: 100%; height: 100%; }
.buddy-egg::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 12px; background: repeating-linear-gradient(135deg, transparent 0 8px, #f59e0b 8px 10px, transparent 10px 16px); }
.buddy-deco { position: absolute; right: 4%; top: 2%; font-size: calc(var(--box) * .18); filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.buddy-mood { position: absolute; left: 4%; bottom: 6%; font-size: calc(var(--box) * .14); background: #fff; border-radius: 50%; box-shadow: var(--shadow); width: calc(var(--box) * .22); height: calc(var(--box) * .22); display: grid; place-items: center; }
@keyframes buddy-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
@keyframes buddy-wobble { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-6deg); } 90% { transform: rotate(6deg); } 95% { transform: rotate(-3deg); } }
@keyframes buddy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .buddy-body, .buddy-egg, .stage-legend .buddy-aura { animation: none; } }

.buddy-stage { display: grid; gap: 16px; align-items: center; }
@media (min-width: 900px) { .buddy-stage { grid-template-columns: auto 1fr; } }
.buddy-main { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.buddy-talk { font-size: 1.05rem; max-width: 340px; text-align: center; }
.buddy-talk::after { bottom: auto; top: -11px; border-top-color: transparent; border-bottom: 9px solid #111; border-top: 0; }
.buddy-name { font-size: 1.8rem; margin: 6px 0 10px; }
.buddy-meter { margin-bottom: 14px; }
.hearts { letter-spacing: 1px; }
.buddy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 12px; }
.buddy-actions form { display: block; }
.buddy-btn { width: 100%; min-height: 76px; flex-direction: column; font-size: 1.15rem; gap: 2px; }
.buddy-btn small { font-size: .78rem; font-weight: 600; opacity: .9; }
.buddy-road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.buddy-road li { text-align: center; background: var(--surface-2); border-radius: 16px; padding: 12px 6px; display: flex; flex-direction: column; gap: 2px; }
.buddy-road .deco { font-size: 2.2rem; }
.buddy-road li.now { background: var(--primary-soft); box-shadow: inset 0 0 0 3px var(--primary); }
.buddy-road li.locked { opacity: .5; }
.buddy-road small { color: var(--muted); font-size: .75rem; }
/* ホームの小さなカード */
.buddy-mini { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.buddy-mini:hover { text-decoration: none; }
.buddy-mini .body { flex: 1; min-width: 0; }
.buddy-mini .nm { font-size: 1.2rem; }
.buddy-mini .say { margin: 4px 0; font-weight: 700; }
.buddy-mini .go { font-weight: 800; color: var(--primary-dark); white-space: nowrap; }
@media (max-width: 599px) { .buddy-mini .go { display: none; } }

/* =========================================================
   おうちの人に見せる
   ========================================================= */
.share-main { max-width: 1040px; }
.share-page .main { padding-bottom: 40px; }
.share-hero { display: flex; align-items: center; gap: 16px; }
.share-hero .body { flex: 1; min-width: 0; }
.share-qr-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.share-qr-row .body { flex: 1; min-width: 240px; }
.share-qr { background: #fff; padding: 12px; border-radius: 16px; border: 2px solid var(--border); }
.share-qr svg.qr { width: 220px; height: 220px; display: block; }
.share-new { border: 3px solid #6ee7b7; }
.share-tips ul { padding-left: 20px; }
.share-tips li { margin-bottom: 6px; }
ul.chips { list-style: none; padding: 0; margin: 0; }

/* =========================================================
   雑学クイズ
   ========================================================= */
.quiz-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, #f97316, #ec4899 55%, #8b5cf6); color: #fff; border-radius: 24px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 8px 24px rgba(236,72,153,.25); }
.quiz-hero > div:first-child { flex: 1 1 280px; }
.quiz-hero h1 { color: #fff; }
.quiz-stat { background: rgba(255,255,255,.18); border-radius: 16px; padding: 10px 16px; text-align: center; min-width: 110px; }
.quiz-stat b { display: block; font-size: 1.6rem; line-height: 1.2; }
.quiz-stat small { color: rgba(255,255,255,.9); }
.quiz-daily { border: 3px solid #fcd34d; background: linear-gradient(135deg, #fffbeb, #fff); }
.quiz-daily-q { font-size: 1.25rem; font-weight: 800; margin: 10px 0 14px; }
.quiz-genre .pic { font-size: 4.2rem; }
.quiz-genre.mix { background: linear-gradient(160deg, #eef2ff, #fdf2f8); }
.quiz-wow { margin-top: 8px; background: #fef9c3; border-radius: 12px; padding: 8px 12px; font-weight: 700; }
.quiz-study { margin-top: 10px; background: #eff6ff; border: 2px solid #93c5fd; border-radius: 14px; padding: 10px 12px; }
.quiz-study-title { font-weight: 900; color: #1d4ed8; margin-bottom: 4px; }
.quiz-learn-list { display: grid; gap: 8px; margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.quiz-learn { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); min-height: 60px; }
.quiz-learn:hover { text-decoration: none; background: var(--primary-soft); }
.quiz-learn .ico { width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.8rem; flex: none; }
.quiz-learn .ico .illust-icon { width: 48px; height: 48px; }
.quiz-learn small { display: block; color: var(--muted); font-size: .75rem; }
.quiz-more summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); margin-top: 8px; min-height: 40px; display: flex; align-items: center; }
.quiz-tip { margin-top: 6px; background: #eff6ff; border-radius: 10px; padding: 6px 10px; font-size: .92rem; }
.quiz-result.perfect { background: linear-gradient(135deg, #fef3c7, #fff); border: 3px solid #fbbf24; }
.quiz-daily-mini { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; border: 3px solid #fcd34d; background: linear-gradient(135deg, #fffbeb, #fff); }
.quiz-daily-mini:hover { text-decoration: none; }
.quiz-daily-mini .ico { font-size: 2.6rem; }
.quiz-daily-mini .body { flex: 1; min-width: 0; font-size: 1.05rem; }
.quiz-daily-mini .go { font-weight: 800; color: #c2410c; white-space: nowrap; }

/* =========================================================
   世界の国ずかん・企業ずかん
   ========================================================= */
.atlas-tabs a { font-size: 1rem; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.country-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; min-height: 120px; }
.country-card:hover { text-decoration: none; background: var(--primary-soft); }
.country-card .flag { font-size: 3rem; line-height: 1.1; }
.country-card .nm { font-weight: 800; font-size: .98rem; line-height: 1.3; }
.country-card .sub { font-size: .75rem; color: var(--muted); }
.country-hero { display: flex; align-items: center; gap: 18px; }
.country-hero .flag-xl { font-size: 6rem; line-height: 1; width: 128px; height: 128px; display: grid; place-items: center; flex: none; }
.country-hero .flag-xl .illust-icon { width: 128px; height: 128px; }
.country-hero .body { flex: 1; min-width: 0; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.company-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--surface-2); color: var(--text); text-decoration: none; min-height: 112px; }
.company-card:hover { text-decoration: none; background: var(--primary-soft); }
.company-card .nm { font-size: 1.05rem; }
.company-card .flag { font-size: 1.6rem; }
.company-card .sub { font-size: .75rem; color: var(--muted); }
.company-card .what { font-size: .85rem; }
.industry-grid .pic-card.is-active { box-shadow: inset 0 0 0 3px var(--primary); }
.card-head h2 .illust-icon { width: 44px; height: 44px; }
.buddy-mini.is-evolved { border: 3px solid #fbbf24; animation: buddy-glow 1.6s ease-in-out infinite; }
@keyframes buddy-glow { 0%, 100% { box-shadow: 0 0 0 rgba(251,191,36,0); } 50% { box-shadow: 0 0 24px rgba(251,191,36,.7); } }
@media (prefers-reduced-motion: reduce) { .buddy-mini.is-evolved { animation: none; } }

/* =========================================================
   ずかん
   ========================================================= */
.zukan-hero { background: linear-gradient(135deg, #10b981, #0ea5e9 55%, #6366f1); box-shadow: 0 8px 24px rgba(14,165,233,.25); }
.zukan-book .pic { font-size: 4.2rem; }
.zukan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
@media (min-width: 768px) { .zukan-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.zukan-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 6px; border-radius: 18px; background: var(--surface-2); color: var(--text); text-decoration: none; min-height: 150px; position: relative; }
.zukan-card:hover { text-decoration: none; background: var(--primary-soft); }
.zukan-card .pic { width: 88px; height: 88px; display: grid; place-items: center; font-size: 3.2rem; filter: grayscale(.85) opacity(.55); }
.zukan-card .pic .illust-icon { width: 88px; height: 88px; }
.zukan-card.is-got { background: #ecfdf5; box-shadow: inset 0 0 0 2px #6ee7b7; }
.zukan-card.is-got .pic { filter: none; }
.zukan-card .nm { font-weight: 800; font-size: .95rem; line-height: 1.3; }
.zukan-card .stamp { font-size: .72rem; color: var(--muted); font-weight: 700; }
.zukan-card.is-got .stamp { color: #047857; }
.zukan-get { background: linear-gradient(135deg, #fef3c7, #fde68a); border: 3px solid #f59e0b; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 1.05rem; }
.zukan-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.zukan-fields .kpi b { font-size: 1.05rem; display: block; line-height: 1.5; }
