/* Memora Q 社会：同時代年表（js/mq_nenpyo.js）。80回目⑧D・81回目⑤D の札・82回目③A＋83回目①C の「!」。2026-11-23
   地球儀（mq_globe.css の .mqg＝z-index 55）の上に重ねる。動き＝右から入って右へ出る（0.26秒・0.2秒）・札は字の濃さだけ（0.14秒）。 */
.mqn { --mqn-blue: #8DB8F5; --mqn-top: var(--sat, env(safe-area-inset-top, 0px));
  position: fixed; inset: 0; z-index: 58; overflow: hidden; background: #0A0B0E; color: #F2F3F5; color-scheme: dark;
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif); font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  animation: mqnin .4s cubic-bezier(.2,.8,.2,1); }
.mqn.out { animation: mqnout .2s cubic-bezier(.2,.8,.2,1) forwards; pointer-events: none; }
@keyframes mqnin { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }   /* ふわっと浮かぶ（111回目② C・11/27） */
@keyframes mqnout { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(26px) scale(.94); } }
.mqn button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mqn button:focus { outline: none; }
.mqn button:focus-visible { box-shadow: 0 0 0 2px rgba(141,184,245,.85); }
.mqn svg text { font-family: var(--font, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif); }
.mqn svg .n { font-family: var(--num, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif); font-variant-numeric: tabular-nums; }
.mqn .n { font-family: var(--num, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif); font-variant-numeric: tabular-nums; }

/* 上の段：もどる・題（試作 TOP8） */
.mqn-top { position: absolute; left: calc(env(safe-area-inset-left, 0px) + 12px); right: calc(env(safe-area-inset-right, 0px) + 12px); top: var(--mqn-top); height: 44px;
  display: flex; align-items: center; gap: 10px; }
.mqn .mqn-x { flex: none; width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(18,20,25,.58); -webkit-backdrop-filter: blur(22px) saturate(1.25); backdrop-filter: blur(22px) saturate(1.25); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14); }
.mqn .mqn-x:active { transform: scale(.94); }
.mqn-x svg { display: block; }
.mqn-tt { flex: 1; min-width: 0; line-height: 1.2; }
.mqn-tt small { display: block; font-size: 11px; font-weight: 700; color: var(--mqn-blue); }
.mqn-tt b { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; }

/* 時代（11/29〜 全部の時代の年表＝地球儀と同じ6つ）：横いっぱいに6つ並べる。いまの時代は青
   11/30 オーナー「上の切り替えがレイアウトミス」：app.css の button { text-align: inherit } で名前が左に寄っていた → 真ん中に。
   名前の長さ（古代文明・古代帝国は4字）に合わせて幅を分け、どの札も左右のあきを同じにする */
.mqn-eras { position: absolute; left: calc(env(safe-area-inset-left, 0px) + 16px); right: calc(env(safe-area-inset-right, 0px) + 16px); top: calc(var(--mqn-top) + 52px); height: 34px;
  display: flex; gap: 3px; padding: 3px; border-radius: 17px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.12); }
.mqn .mqn-era { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 4px; border-radius: 14px; font-size: 13px; font-weight: 800; color: rgba(242,243,245,.72); white-space: nowrap; text-align: center; }
.mqn .mqn-era.on { background: var(--mqn-blue); color: #0A0B0E; }
.mqn .mqn-era:active { transform: scale(.96); }

/* 地域の札（横に流れる） */
.mqn-chips { position: absolute; left: 0; right: 0; top: calc(var(--mqn-top) + 94px); height: 30px; display: flex; gap: 6px; padding: 0 16px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.mqn-chips::-webkit-scrollbar { display: none; }
.mqn-chips::after { content: ''; flex: none; width: 10px; }
.mqn .mqn-chip { flex: none; height: 30px; padding: 0 13px; border-radius: 15px; display: flex; align-items: center; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14); color: rgba(242,243,245,.86); }
.mqn .mqn-chip.on { background: #F2F3F5; color: #0A0B0E; box-shadow: none; }

/* 年の目盛りといまの年の札（押す・なぞると年が動く） */
.mqn-ax { position: absolute; left: 0; top: calc(var(--mqn-top) + 124px); height: 30px; display: block; overflow: visible; touch-action: none; cursor: ew-resize; }
.mqn-ax .yl { transition: opacity .12s cubic-bezier(.2,.8,.2,1); }
.mqn-ax .yl.hid { opacity: 0; }

/* 年表（縦に流れる・横になぞると年が動く） */
.mqn-sc { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--mqn-top) + 154px); overflow-x: hidden; overflow-y: auto;
  touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mqn-sc::-webkit-scrollbar { display: none; }
.mqn-in { position: relative; padding-bottom: calc(var(--sab, env(safe-area-inset-bottom, 0px)) + 12px); }
.mqn-cv { display: block; overflow: visible; }
.mqn-cv .rb polygon { fill-opacity: .92; stroke-opacity: .92; }
.mqn-cv .rb.off polygon { fill-opacity: .36; stroke-opacity: .36; }
.mqn-cv .rm text { fill-opacity: 1; }
.mqn-cv .rm.off text { fill-opacity: .5; }
.mqn-cv .rm .ev { fill-opacity: .95; }
.mqn-cv .rm.off .ev { fill-opacity: .5; }
.mqn.drag .mqn-sc { cursor: ew-resize; }

/* 変化点の「!」（押せる・44pt） */
.mqn-mk { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.mqn .mqn-ex { position: absolute; width: 44px; height: 44px; border-radius: 22px; }
.mqn-ex svg { display: block; pointer-events: none; }
.mqn-ex .o1 { display: none; }
.mqn-ex.on .o0 { display: none; }
.mqn-ex.on .o1 { display: inline; }

/* 札（81回目⑤D の CARD5D81） */
.mqn-card { position: absolute; z-index: 2; width: 214px; border-radius: 14px; padding: 9px 11px 10px;
  background: rgba(18,20,25,.55); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.16);
  animation: mqnfd .14s cubic-bezier(.2,.8,.2,1); }
.mqn-card[hidden] { display: none; }
@keyframes mqnfd { from { opacity: 0; } to { opacity: 1; } }
.mqn-card .y { font-family: var(--num, -apple-system, sans-serif); font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.mqn-card .y small { font-size: 10px; font-weight: 700; margin-left: 1px; opacity: .7; }
.mqn-card b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.4; margin-top: 2px; }
.mqn-card p { margin: 2px 0 0; font-size: 10.5px; line-height: 1.5; color: rgba(242,243,245,.72); }

/* 動きを減らす：動きなし */
.mqn.rm, .mqn.rm .mqn-card { animation: none; }
.mqn.rm .mqn-ax .yl { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .mqn, .mqn.out, .mqn-card { animation: none; }
  .mqn-ax .yl { transition: none; }
}
