/* 第 41 回 OSME-J のスライドだけの調整。見た目の元は uoh-slide.js（触らない）で、ここでは位置だけを変える */

/* 本文は、文節で折らず行もならさずに、右端まで詰めて折り返す（雛形は word-break: auto-phrase と text-wrap: pretty） */
:is(p, item, .bb, note, down, figcaption) { word-break: normal; text-wrap: wrap }

/* 数式（KaTeX）の読み上げ用の MathML を隠す。編集モード（⌘E）で数式を含む文を選んでコピーしたとき、数式の字が改行付きで
   2〜3 回入る（「正 \nn\nn 角柱」）のを防ぐため（「正 n 角柱」になる）。見た目は変わらない。
   uoh-slide.js の KaTeX に output: "html" を足しても同じになるが、そちらは触らない */
.katex .katex-mathml { display: none }

/* スマホ（指で触る画面）でページを送る ◀ ▶ のボタン（41OSME-J.js が作る）。指で触る画面（hover: none）だけ出し、印刷には出さない。
   形は 6 枚目の再生ボタンと同じ（角を丸めた白の四角に、青の細い枠と青の三角）。指で押しやすいよう、少し大きくする。
   縦に持つと、スライドの下の余白の真ん中に 2 つ並べる。横に持つと、左右の余白の上下の真ん中に 1 つずつ置く。
   左下の操作のボタン（uoh-slide.js の .tools）とは重ならない */
.tap-nav { display: none }
@media (hover: none) {
  .tap-nav { display: block; position: fixed; z-index: 40; width: 64px; height: 44px; padding: 0; border: none; border-radius: 8px;
             background: #fff; box-shadow: inset 0 0 0 2px var(--blue); -webkit-tap-highlight-color: transparent; touch-action: manipulation }
  .tap-nav::before { content: ""; position: absolute; top: 12px; border-top: 10px solid transparent; border-bottom: 10px solid transparent }
  .tap-prev::before { left: 23px; border-right: 17px solid var(--blue) }
  .tap-next::before { left: 25px; border-left: 17px solid var(--blue) }
  .tap-nav:active { background: #e8f2fd }
  .tap-prev { left: calc(50% - 76px); bottom: 24px }
  .tap-next { left: calc(50% + 12px); bottom: 24px }
}
@media (hover: none) and (orientation: landscape) {
  .tap-prev { left: 12px; bottom: auto; top: calc(50% - 22px) }
  .tap-next { left: auto; right: 12px; bottom: auto; top: calc(50% - 22px) }
}
@media print { .tap-nav { display: none !important } }

/* 箱の見出し（定義１ など）は太字。太字は字が上に伸びて上下の空きがずれるので、帯の上に 2.5px 足して真ん中に戻す */
.bt > span { font-weight: 700 }
/* 題のない箱（出典だけの箱）は、空の題を出さない。
   出すと、見出しの帯は題と出典の間に gap（.4em）をあけるので、出典が左の端からずれる */
.bt > span:empty { display: none }
.bt { padding-top: 2.5px }
/* 箱の中身の下の余白：雛形の 12px だと、字の下の空き（約 22px）が上の空き（約 12px）より目立って長いので、3px にしてそろえる */
.bb { padding-bottom: 3px }

/* 表紙：会の名前と題目をひとまとまりにして、上の帯と下の線の間の上下の真ん中に置く。
   日付は著者との間を少し空けて、左端を著者の名前にそろえる */
cover meeting { bottom: 568px }     /* 雛形は 591.7px */
cover headline { bottom: 405px }    /* 雛形は 396px */
cover .authors { top: 408px }       /* 雛形は 401.9px */
cover date { left: 90.8px;          /* 雛形は 82.8px（著者の名前は 90.8px から） */
             top: 604.8px }         /* 雛形は 598.8px */

/* キャプションは 24pt（雛形は 20pt） */
figcaption { font-size: var(--pt24) }
/* キャプションの紺の字。<navy> と違って太字にしない */
.navy-normal { color: var(--navy) }

/* 2 枚目：立方体が開くきっかけの目印（何も表示しない step）は、行の高さを取らないようにする */
.unfold-mark { display: none }
/* 2 枚目：(a)(b) のキャプションは、2 つの図の下にまとめて置き、それぞれの図の真ん中にそろえる。図が開くのと同じクリックで出す */
.unfold-captions figcaption { text-align: center }
.unfold-captions { opacity: 0; transition: opacity var(--fade) }
slide:has(.unfold-mark.on) .unfold-captions { opacity: 1 }
/* 2 枚目：最後のクリック（キャプションの次）で、(a) の展開図とキャプションをまとめて赤の角丸の枠で囲む（線 5px（約 3.75pt）・角の丸みは短い辺の約 6.7%）。
   位置はスライドの中の座標：開き終えた (a) の展開図は横 92〜348px・縦 245〜437px、キャプションは縦 476〜518px。
   上の「各立方体を …」の行は縦 206px まで、下の帯は縦 545.6px から。枠は展開図の真ん中（横 220px）にそろえる */
.unfold-frame { position: absolute; left: 28px; top: 213px; width: 384px; height: 314px; box-sizing: border-box;
                border: 5px solid var(--red); border-radius: 21px; pointer-events: none }

/* 3 枚目：定義の 1 行目が「辺展開できない」で終わるよう、箱の右の余白を少し詰める（1 行目の幅は 869px、雛形の余白では 868px しかない） */
.ununf-def .bb { padding-right: 11px }
/* 3 枚目：図はドラッグで回せる（bern.js）。開くきっかけと赤で塗るきっかけの目印（何も表示しない step）は、行の高さを取らないようにする */
#bern { cursor: grab; touch-action: none; user-select: none }
#bern:active { cursor: grabbing }
.bern-mark, .bern-red { display: none }
/* 重なる部分（赤）。面の組ごとの多角形なので、同じ色の線で継ぎ目を埋める */
.ov-layer { opacity: 0; transition: opacity var(--fade) }
.ov-layer.show { opacity: 1 }
.ov-part { fill: var(--red); stroke: var(--red); stroke-width: 1; stroke-linejoin: round }

/* 4 枚目：先行研究の表（色と形は AL210 の表と同じ。見出しは濃い色の地に白の字、行は 1 行おきに薄い色）。
   クリックの順：最小の 4 行だけを残して上へ詰める（rec-mark）→ 4 つの多面体を出す → 下に予想を出す */
.rec-table { --rh: 47px; border-collapse: separate; border-spacing: 0; margin: 0 auto; line-height: 1.3 }
.rec-table th, .rec-table td { padding: 0 18px; white-space: nowrap }
.rec-table tr { height: var(--rh) }
.rec-table thead tr { background: var(--blue) }
.rec-table th { font-weight: 400; color: #fff; text-align: center }
.rec-table td { text-align: center }
.rec-table td:last-child { text-align: left }
.rec-table td:nth-child(2), .rec-table td:nth-child(3) { font-family: KaTeX_Main; font-variant-numeric: tabular-nums }
.rec-table tbody tr { transition: transform 1.2s cubic-bezier(.3, 0, .2, 1), opacity .4s, background-color .4s }
.rec-table tbody tr:nth-child(even) { background: #e8f5fc }
.rec-table tbody tr:last-child td { border-bottom: 1.5px solid var(--blue) }
.rec-mark { display: none }
slide:has(.rec-mark.on) .rec-orig tbody tr:is(:nth-child(1), :nth-child(2), :nth-child(4)) { opacity: 0 }
slide:has(.rec-mark.on) .rec-orig tbody tr:nth-child(3) { transform: translateY(calc(-2 * var(--rh))) }
slide:has(.rec-mark.on) .rec-orig tbody tr:is(:nth-child(5), :nth-child(6), :nth-child(7)) { transform: translateY(calc(-3 * var(--rh))) }
slide:has(.rec-mark.on) .rec-orig tbody tr:is(:nth-child(5), :nth-child(7)) { background: #e8f5fc }
slide:has(.rec-mark.on) .rec-orig tbody tr:nth-child(6) { background: none }
.rec-models { position: absolute; left: 0; top: 244px; width: 904px; display: flex; justify-content: space-between }
.rec-models figure { margin: 0 }
:is(.rec-models, .res-models, .res-row, .dur-row) svg { cursor: grab; touch-action: none; user-select: none }
:is(.rec-models, .res-models, .res-row, .dur-row) svg:active { cursor: grabbing }
.rec-models figcaption { font-size: var(--pt20); margin-top: 0 }
.rec-conj { position: absolute; left: 0; width: 904px; top: 426px; margin: 0 }
.step-back .rec-table tbody tr { transition: none !important }

/* 4 枚目の続き：本研究の成果。目印（mv-mark）が出たら、figs/results.js が次の順に続けて動かす：
   文献の列を消す → 表を左右の真ん中へ寄せる → 赤の矢印を出す → この研究の「頂点・面」の表を出す → 4 つの図を消してから 3 つの図を出す。
   表は、動かすために、もとの表（.rec-orig）の 4 行の形と同じ 3 つの表（左の表・文献の列・右の表）に分けてあり（.mv）、目印が出たら入れ替える。
   ここに書くのは、動き終えた形（ページの写し・印刷でも、この形になる）。
   そのあとクリックで、予想の箱に重ねて「この予想を反証」→ 5・5 の 2 行を赤の枠で囲み、右に「最小の形」
   → 3 つの図のキャプションの上に重ねて名前（CF7・T7・Q）を出す。
   位置はスライドの中の座標。もとの表は横 82px から（列の幅 164・100・68・408px、行の高さ 47px）。
   動き終えた表は、左の表（332px）・矢印の欄（96px）・右の表（180px）を合わせて左右の真ん中に置く（横 148〜756px）。
   右の表の 2 列は同じ幅にして、5・5 を囲む枠が 2 つの数字の真ん中に来るようにする */
.mv-mark { display: none }
.mv { position: absolute; left: 0; top: 0; width: 904px; height: 235px; visibility: hidden }
slide:has(.mv-mark.on) .mv { visibility: visible }
slide:has(.mv-mark.on) .rec-orig { visibility: hidden }
.mv table { position: absolute; top: 0; margin: 0; table-layout: fixed }
.mv-left { left: 148px; width: 332px }
.mv-cite { left: 414px; width: 408px; opacity: 0 }
.mv-new { left: 576px; width: 180px }
.mv-new :is(th, td) { padding: 0 13px }
.mv :is(.mv-left, .mv-new) td:last-child { text-align: center }
.mv-new td { font-family: KaTeX_Main; font-variant-numeric: tabular-nums }
.mv-arrow { position: absolute; left: 504px; top: 117px; fill: var(--red) }     /* 矢印の欄（横 480〜576px）と 4 行（縦 47〜235px）の真ん中 */
slide:has(.mv-mark.on) .rec-models { opacity: 0; pointer-events: none }
.res-models { position: absolute; left: 0; top: 244px; width: 904px; display: flex; justify-content: space-around; opacity: 0; pointer-events: none }
slide:has(.mv-mark.on) .res-models { opacity: 1; pointer-events: auto }
.res-models figure { margin: 0 }
.res-models figcaption { font-size: var(--pt20); margin-top: 0 }
.res-refute-stamp { position: absolute; left: 50%; top: 452px; transform: translateX(-50%) rotate(-4deg); padding: 6px 28px;
                    background: #fff; border: 5px solid var(--red); border-radius: 14px; color: var(--red); font-weight: 700; white-space: nowrap }
/* 枠は、右の表の 5・5 の 2 行（横 576〜756px・縦 141〜235px）の外側に、上下左右とも 4px あけて置く */
.res-min-frame { position: absolute; left: 572px; top: 137px; width: 188px; height: 102px; box-sizing: border-box;
                 border: 5px solid var(--red); border-radius: 14px; pointer-events: none }
.res-min-label { position: absolute; left: 772px; top: 168px; color: var(--red); white-space: nowrap }
/* 名前：3 つの図のキャプション（字は縦 382〜413px）の上に、上下の真ん中をそろえて重ねて出す。
   並びは .res-models と同じ（幅 215px の 3 つを space-around） */
.res-names { position: absolute; left: 0; top: 379px; width: 904px; display: flex; justify-content: space-around; pointer-events: none }
.res-names > div { width: 215px; text-align: center }
/* 名前の札は、字の大きさをキャプションと同じにして、高さをキャプションの字とほぼ同じにする。
   3 つとも同じ幅にして、下のキャプション（いちばん長い「7 頂点 10 面」、幅 142px）を隠しきる */
.res-name { display: inline-block; box-sizing: border-box; width: 154px; padding: 0; font-size: var(--pt20); line-height: 1.2; text-align: center;
            background: #fff; border: 3px solid var(--blue); border-radius: 10px; color: var(--navy); white-space: nowrap }

/* 8 枚目：左に定理、右に回る多面体の並び */
.res-row { display: flex; align-items: center; gap: 12px; height: 256px }
.res-row + .res-row { margin-top: 14px }
.res-text { flex: 1 }
.res-text block { margin: 0 0 6px }
.res-text item cite { display: block; text-align: right; white-space: nowrap }
.res-row figure { flex: none; margin: 0 }

/* 8 枚目：曲率が負の頂点に着目した結果。デューラーの問題を先に出し、クリックで「500 年以上続く未解決問題」
   → 正二十面体（回る）→ その頂点が 1 つ凹む（目印 pop-mark、figs/models.js）→ 定義（曲率が負の頂点）
   → 正三角形 7 枚で囲んだ頂点（420°）をもつ多面体（回る）→ 定理と回る多面体 ON7 の順に出す */
.dur-box { margin: 0 0 4px }
.dur-list { margin: 0 0 6px }
/* 定義と定理の箱は同じ幅（472px）で左をそろえ、図は右の欄（横 484〜904px）を 2 つに分けた、それぞれの真ん中に置く。
   出す順（HTML の順）は、正二十面体 → 凹ませる（pop-mark）→ 定義 → 420° の頂点をもつ多面体。置く場所は、定義が左、図が右 */
.dur-row { display: grid; grid-template-columns: 472px 1fr 1fr; column-gap: 12px; align-items: center; margin: 0 0 10px }
.dur-row block { grid-column: 1; grid-row: 1; box-sizing: border-box; margin: 0 }
.dur-ico { grid-column: 2; grid-row: 1; justify-self: center; margin: 0 }
.dur-v7 { grid-column: 3; grid-row: 1; justify-self: center; margin: 0 }
.pop-mark { display: none }
.res-on7 { height: auto }
.res-on7 .res-text { flex: none; width: 472px }
.res-on7 .res-text block { box-sizing: border-box; margin: 0 }

/* 5 枚目：多面体 Q の全ての辺展開（figs/q45.js）。クリックで一度に開き、次のクリックで重なる部分を赤で塗る */
.q45-fig { position: relative; margin: 0 }
/* 4 枚目から進んだときだけ、Q を左上へ動かして 45 マスに広げる間、45 個の図の上に重ねて描く（figs/q45.js） */
.q45-fly { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none }
.q45-mark, .q45-red { display: none }
.q45-part { stroke-width: 1.5 }

/* 6・7 枚目：多面体 Q の最小性 */
.proof-head { margin-left: -10px; font-weight: 700 }
/* 証明の終わりの ■ は、最後の行の右端に置く */
.qed-row { display: flex; justify-content: space-between; align-items: baseline }
/* 証明の 3 段目は、1 段下げて番号（紺）を付ける。2 行目以降は字の頭にそろえる */
.proof-sub { position: relative; margin: 4px 0 0 34px; padding-left: 32px }
.proof-sub::before { content: attr(data-n); position: absolute; left: 0; top: 0; color: var(--navy); font-family: KaTeX_Main }
/* 四面体の図は、DiBiase の行の右に置き、1 つ目の箇条書きと一緒に出す（回る。ドラッグでも回せる） */
.tet-fig { position: absolute; right: 4px; top: 196px; margin: 0; opacity: 0; transition: opacity var(--fade) }
slide:has(.proof-first.on) .tet-fig { opacity: 1 }
.tet-fig svg { cursor: grab; touch-action: none; user-select: none }
.tet-fig svg:active { cursor: grabbing }

/* 9 枚目：おわりに。4 つの多面体を横に並べ、その下に今後の課題（文とその下の表（4 枚目と同じ見た目）、右に Demaine et al. の多面体）を置く。
   図は回る。ドラッグでも回せる */
.end-models { display: flex; justify-content: space-around; margin: 0 0 10px }
.end-models figure, .end-fw figure { margin: 0 }
:is(.end-models, .end-fw) svg { cursor: grab; touch-action: none; user-select: none }
:is(.end-models, .end-fw) svg:active { cursor: grabbing }
.end-models figcaption { margin-top: 0 }
.end-fw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.end-fw-text { flex: 1 }
.end-fw figure { flex: none }
.end-fw-table { --rh: 44px; margin: 12px 0 0 }
.end-fw-table td:nth-child(1), .end-fw-table td:nth-child(2) { font-family: KaTeX_Main; font-variant-numeric: tabular-nums }
.end-fw-table td:nth-child(3) { font-family: inherit }
.end-fw { margin-top: 22px }
