/* Memora Q 社会：ホーム（js/mq_home.js）。88回目①D の決まった形（黒い地・金・白）。2026-11-22。
   手本＝世界史_一問一答/案/out82q/g1d.png（作り＝op80/s80.js の HM80・SW80／op82/i85_1.js の LOGO85／op82q/i87q_1.js の RB87／i88q_1.js の G88.d）。
   値は手本のまま（上の行 上から 62px＝端の下 8px・タブ 106px・題の下の行 438px・行 48px・右の点 16px）。章の絵＝www/img/home/（決まった絵）。絵のない科目は、テーマの画面と同じ光の地。 */
.mqh {
  --mq-bg: #0A0B0E; --mq-w: #F2F3F5; --mq-sub: rgba(255,255,255,.6); --mq-dim: rgba(255,255,255,.42); --mq-ln: rgba(255,255,255,.14);
  --mq-g: #FFD46A; --mq-g2: #E3B35C; --mq-blue: #8DB8F5;
}
.mqh { color-scheme: dark; }
body.mqh-on, body.mqh-on #app { background: #0A0B0E; }
#s-home.mqh { padding: 0; overflow: hidden; background: #0A0B0E; color: var(--mq-w); }
.mqh button { color: inherit; }

/* ---------- 1章1枚を縦にめくる ---------- */
/* 外は指では動かない（overflow:hidden）。1枚ずつめくるのは js の「めくり方」が scrollTop を動かす（11/30・前は scroll-snap で、背の高い1枚の中の送りと指を取り合っていた） */
.mqh-pager { position: absolute; inset: 0; z-index: 1; overflow: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.mqh-pager::-webkit-scrollbar { display: none; }
.mqh-pager.mqh-in { animation: mqhin .22s ease; }
@keyframes mqhin { from { opacity: .25; } to { opacity: 1; } }
/* 1枚は画面の高さちょうど。背の高い1枚は、その1枚の中をいつものスクロールで送る（端ではずむだけで外へは渡さない＝contain）。
   端まで来てから、もう1回、端の向こうへ引くと js が1枚めくる。画面に入る1枚は .fit＝送らない */
.mqh-pg { position: relative; height: 100%; display: flex; flex-direction: column; isolation: isolate;
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; scrollbar-width: none; }
.mqh-pg::-webkit-scrollbar { display: none; }
.mqh-pg.fit { overflow: hidden; }
/* 地：章の絵の代わりに、テーマの画面（memq.css の .mq-art）と同じ青と金の光。絵があれば暗くして敷く（HM80 の IMG80） */
.mqh-art { position: absolute; left: 0; right: 0; top: 0; z-index: -1; height: min(86vh, calc(var(--sat) + 640px)); pointer-events: none; overflow: hidden;
  background: radial-gradient(78% 52% at 76% 40%, rgba(141,184,245,.17), rgba(141,184,245,0) 70%), radial-gradient(70% 46% at 14% 58%, rgba(255,212,106,.10), rgba(255,212,106,0) 72%), linear-gradient(180deg, #151923, #0A0B0E); }
.mqh-art img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.55) saturate(.8); }
.mqh-art::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background: linear-gradient(to bottom, rgba(10,11,14,0), rgba(10,11,14,.92) 70%, #0A0B0E); }
/* 章の絵のある1枚（HM80 の作りのまま）：絵は画面いっぱい（見本の .ph＝393×852 の枠）・暗くする（IMG80）・下は 852 のうち 560px で地へ落とす（FADE80）。
   背の高い画面（Pro Max など）は題の下（.mqh-hero）が「端＋384px」で止まるので、絵も見本の 852:438 の比で止める（顔と題の間が見本と同じになる）。
   上のずらし（PIC の3つ目）は js で transform に入れる。ずらしてあいた下は地の色 */
.mqh-art.pic { height: min(100vh, calc((var(--sat) + 384px) * 1.945)); background: #0A0B0E; }
.mqh-art.pic::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: calc(var(--sat) + 66px); background: linear-gradient(to top, rgba(10,11,14,0), rgba(10,11,14,.75)); }
.mqh-art.pic::after { z-index: 1; height: 65.7%; }
.mqh-hero { flex: none; height: max(calc(var(--sat) + 236px), min(calc(var(--sat) + 384px), 51.4vh)); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 50px 24px 24px; }
.mqh-tt { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; }
.mqh-tt:active .mqh-h1 { opacity: .7; }
.mqh-no { font-size: 17px; font-weight: 700; color: var(--mq-blue); }
.mqh-h1 { display: block; margin-top: 6px; font-size: 56px; font-weight: 900; line-height: 1.08; letter-spacing: -.03em; color: #fff; white-space: nowrap; }
.mqh-h1.wrap { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.mqh-ms { position: absolute; left: -9999px; top: 0; visibility: hidden; margin: 0; font-size: 56px; pointer-events: none; }
.mqh-h2 { display: block; margin-top: 8px; font-size: 19px; font-weight: 800; line-height: 1.3; color: rgba(255,255,255,.92); word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }   /* 文節の間だけで改行（js の wbr・11/29 総点検） */
.mqh-era { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.72); }

/* テーマの行（HM80：高さ 48px・上に細い線・左に点）。下は、ホームのバー（safe area）にかからないだけあける（前の「次の章」の代わり・28px は js の fitPages も使う） */
.mqh-rows { padding: 0 50px calc(var(--sab) + 28px) 24px; }
.mqh-row { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--mq-ln); text-align: left; font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.mqh-row .dt { flex: none; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); }
.mqh-row.cur .dt { background: var(--mq-blue); }
.mqh-row b { flex: 1; min-width: 0; font-weight: 700; text-wrap: balance; }   /* 2行の題の行の長さをそろえる（「…巻き返／し」・11/29 総点検） */
.mqh-row:active b { opacity: .6; }
.mqh-go { flex: none; margin-left: 8px; font-size: 12.5px; font-weight: 500; color: var(--mq-blue); white-space: nowrap; }
.mqh-ok { flex: none; display: flex; color: var(--mq-g); }
.mqh-mid { flex: none; font-size: 12px; font-weight: 600; color: var(--mq-dim); white-space: nowrap; }
.mqh-lk { flex: none; display: flex; color: var(--mq-dim); }
.mqh-row .mq-prem { margin-left: 6px; }

/* ---------- 上（ロゴ・科目・見たテーマの数／タブ・地球儀・記録）。めくる中身の上に重ねる ---------- */
/* 帯は置かない（11/23 オーナー「スワイプする時に上が暗くなるのはいらない」）。絵の上は、その1枚の絵の暗いぼかし（.mqh-art.pic::before）と、字の細い影だけで読ませる */
.mqh-head { position: absolute; left: 0; right: 0; top: 0; z-index: 4; height: calc(var(--sat) + 148px); padding: calc(var(--sat) + 8px) 20px 0 24px; pointer-events: none;
  background: none; text-shadow: 0 0 2px rgba(10,11,14,.85), 0 1px 10px rgba(10,11,14,.6); }
.mqh-head .mqh-mkw, .mqh-head .mqh-rb svg { filter: drop-shadow(0 0 1.5px rgba(10,11,14,.8)) drop-shadow(0 1px 5px rgba(10,11,14,.5)); }
.mqh-head > * { pointer-events: auto; }
/* 背の高い1枚を下へ送っている間は、上をふっと消す（js の headHide・11/29 総点検：題や行がロゴ・タブに重なった） */
.mqh-head { transition: opacity .2s ease, visibility 0s linear 0s; }
.mqh-head.mqh-away { opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility 0s linear .16s; }
.mqh-head.mqh-away > * { pointer-events: none; }
.mqh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 28px; padding-right: 4px; }
.mqh-logo { display: flex; align-items: center; height: 28px; margin-left: 1px; min-width: 0; }
.mqh-mkw { display: flex; flex: none; }
.mqh-mk { width: 27px; height: 27px; display: block; overflow: visible; }
.mqh-wm { margin: 0 -.3em 0 10px; font: 400 15px/1 Inter, var(--num); letter-spacing: .3em; color: #fff; white-space: nowrap; }
.mqh-vl { display: block; flex: none; width: 1px; height: 13px; margin: 0 1px 0 12px; background: rgba(255,255,255,.28); }
/* 科目（押すと科目をえらぶ）。押せる所を上下に広げる */
.mqh-sj { display: inline-flex; align-items: center; gap: 5px; margin: -8px 0; padding: 8px 4px 8px 10px; font-size: 13px; font-weight: 500; line-height: 1; letter-spacing: .14em;
  color: var(--mq-g) !important; white-space: nowrap; }
.mqh-sj .cv { display: inline-flex; opacity: .9; margin-left: -.14em; }
.mqh-sj:active { opacity: .6; }
.mqh-cnt { font-size: 15px; font-weight: 700; letter-spacing: -.03em; color: rgba(255,255,255,.8); white-space: nowrap; }
.mqh-sw { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 16px; }
.mqh-tabs { display: flex; gap: 16px; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: 15px; font-weight: 700; }
.mqh-tabs::-webkit-scrollbar { display: none; }
/* 小さい iPhone（375 幅など）でも3つのタブが切れないように */
@media (max-width: 384px) { .mqh-tabs { gap: 12px; font-size: 14px; } .mqh-btns { gap: 6px; } }
.mqh-tabs button { flex: none; padding: 0 0 6px; border-bottom: 2px solid transparent; color: rgba(255,255,255,.55) !important; white-space: nowrap; }
.mqh-tabs button.on { color: #fff !important; border-bottom-color: #fff; }
.mqh-btns { flex: none; display: flex; align-items: center; gap: 8px; margin: -8px 0 0 12px; }
.mqh-rb { flex: none; width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.22); }
.mqh-rb svg { display: block; }
.mqh-rb:active { transform: scale(.94); }

/* 右の「目次」の札（125回目①A・12/3）：前の右の点を、押せる札に入れた（今の1枚は長い点・下に「何枚目/全部」）。押すと目次のシート。
   題と行は右に 50px あけてあるので、札（右 9px・はば 32px）は字に重ならない */
.mqh-toc { position: absolute; right: 9px; top: calc(var(--sat) + 172px); z-index: 3; width: 32px; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 0 10px; border-radius: 16px;
  color: #fff; background: rgba(18,20,25,.62); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.mqh-toc::before { content: ''; position: absolute; inset: -6px -9px -6px -8px; }   /* 押せる所を少し広く */
.mqh-toc[hidden] { display: none; }
.mqh-toc:active { transform: scale(.94); }
.mqh-toc .ic { display: flex; }
.mqh-toc .t { writing-mode: vertical-rl; font-size: 12px; font-weight: 800; letter-spacing: .18em; line-height: 1; }
.mqh-dots { display: grid; gap: 6px; margin: 2px 0; }
.mqh-dots i { display: block; width: 5px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.32); transition: height .2s ease, background .2s ease; }
.mqh-dots i.on { height: 16px; background: #fff; }
.mqh-dots i.sm { transform: scale(.67); }
.mqh-toc .n { font-size: 11px; font-weight: 800; color: var(--mq-g); line-height: 1; }
.mqh-toc .n small { font-size: 9px; font-weight: 700; color: rgba(255,255,255,.55); }
/* 目次のシート：全部の章（今のタブの1枚）。今の章は金と「今ここ」 */
.mqh-tsub { margin: -2px 46px 12px 6px; font-size: 13px; font-weight: 700; color: var(--mq-sub); }
.mqh-tl { max-height: min(64vh, calc(100dvh - var(--sat) - 190px)); overflow-y: auto; overscroll-behavior: contain; margin: 0 -16px; }
.mqh-tr { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 7px 20px 7px 18px; border-top: 1px solid rgba(255,255,255,.08); text-align: left; color: #fff; }
.mqh-tr .no { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: rgba(255,255,255,.75); background: rgba(255,255,255,.08); }
.mqh-tr .nm { flex: 1; min-width: 0; }
.mqh-tr .nm b { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.mqh-tr .nm small { display: block; font-size: 12.5px; font-weight: 700; color: var(--mq-sub); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mqh-tr .nm small:empty { display: none; }
.mqh-tr .pr { flex: none; font-size: 12.5px; font-weight: 800; color: var(--mq-dim); white-space: nowrap; }
.mqh-tr.on { background: rgba(255,212,106,.09); box-shadow: inset 3px 0 0 var(--mq-g); }
.mqh-tr.on .no { background: var(--mq-g); color: #1A1406; }
.mqh-tr.on .pr { color: var(--mq-blue); }
.mqh-tr:active .nm { opacity: .6; }

/* ---------- 科目をえらぶ（暗いシート） ---------- */
.mqh-sl { margin: 6px 2px 0; }
.mqh-srow { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-top: 1px solid var(--mq-ln); text-align: left; color: #fff; }
.mqh-srow:first-child { border-top: 0; }
.mqh-srow .si { flex: none; width: 38px; height: 38px; border-radius: 19px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.2); }
.mqh-srow .si svg { width: 19px; height: 19px; }
.mqh-srow.on .si { color: var(--mq-g); background: rgba(255,212,106,.08); box-shadow: inset 0 0 0 .6px rgba(255,212,106,.5); }
.mqh-srow b { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; }
.mqh-srow small { flex: none; font-size: 13px; color: var(--mq-sub); }
.mqh-srow .mk { flex: none; width: 22px; display: flex; justify-content: center; color: var(--mq-g); }
.mqh-srow .mk.lk { color: var(--mq-dim); }
.mqh-srow:active b { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .mqh-pager.mqh-in { animation: none; } .mqh-dots i { transition: none; } }
