/* スプレッドシート・ドキュメント・スライドの画面(色は app.css のトークンを使う) */
/* 表の見出しの色(--cell-head)などは app.css のトークン(ライト・ダーク)にある */

/* ---------- スプレッドシート ---------- */
/* 表の紙面は Excel と同じく常に白(セルの色をそのまま見せるため) */
#view.v-sheet { overflow: hidden; background: #ffffff; }
.sheet-wrap { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.sheet-grid { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: 26px minmax(0, 1fr); min-height: 0; }
.sg-corner { background: var(--cell-head); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.sg-colhead, .sg-rowhead { position: relative; overflow: hidden; background: var(--cell-head); user-select: none; -webkit-user-select: none; touch-action: none; }
.sg-colhead { border-bottom: 1px solid var(--line); }
.sg-rowhead { border-right: 1px solid var(--line); }
.sg-inner { position: absolute; left: 0; top: 0; will-change: transform; }
.sg-colhead .sg-inner { height: 100%; }
.sg-rowhead .sg-inner { width: 100%; }
.sg-ch, .sg-rh { position: absolute; display: grid; place-items: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; box-sizing: border-box; }
.sg-ch { top: 0; height: 100%; border-right: 1px solid var(--line); }
.sg-rh { left: 0; width: 100%; border-bottom: 1px solid var(--line); }
.sg-rh.hid-b { border-top: 3px double var(--muted); }
.sg-ch.hid-b { border-left: 3px double var(--muted); }
.sg-ch.on, .sg-rh.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.sg-scroll { position: relative; overflow: auto; min-height: 0; background: #ffffff; }
/* 表そのものにフォーカスがある時も、選んでいるセルの枠で場所が分かるので、表全体の枠は出さない */
.sg-scroll:focus { outline: none; }
.sg-content { position: relative; }
.sg-cells { position: absolute; left: 0; top: 0; }
.sg-c { position: absolute; box-sizing: border-box; display: flex; align-items: flex-end; padding: 0 4px 2px; border-right: 1px solid #e2e6ec; border-bottom: 1px solid #e2e6ec; background: #ffffff; color: #1b1b1f;
  font: 13px/1.3 var(--f-ui); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; cursor: cell; }
.sg-c > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sg-c.merged { z-index: 0; }
.sg-c.err { color: #b42318; }
.sg-sel { position: absolute; z-index: 2; pointer-events: none; background: rgba(106, 90, 249, .10); border: 1.5px solid #6a5af9; box-sizing: border-box; }
/* オートフィルの右下の四角(js/sheet.js の placeBoxes)。要素の大きさがつかめる所、見た目の四角は ::before */
.sg-fill { position: absolute; z-index: 2; width: 12px; height: 12px; transform: translate(-50%, -50%); cursor: crosshair; touch-action: none; }
.sg-fill::before { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%); background: #6a5af9; border: 1px solid #fff; box-sizing: content-box; }
.sg-fill.touch { width: 28px; height: 28px; }
.sg-fill.touch::before { width: 10px; height: 10px; border-radius: 2px; }
.sg-fill.frz { z-index: 6; }
/* 引っぱって埋める先の点線の枠 */
.sg-fillprev { position: absolute; z-index: 2; display: none; pointer-events: none; border: 1.5px dashed #6a5af9; box-sizing: border-box; }
.sg-fillprev.frz { z-index: 6; }
.cellin { position: absolute; z-index: 2; box-sizing: border-box; border: 0; margin: 0; padding: 0 4px; font: 13px var(--f-ui); background: transparent; color: transparent; caret-color: transparent; outline: 2px solid #6a5af9; outline-offset: -2px; }
.cellin.editing { background: #ffffff; color: #1b1b1f; caret-color: auto; box-shadow: 0 2px 10px rgba(20, 30, 50, .25); }
.sg-objs { position: absolute; left: 0; top: 0; z-index: 4; }
.sobj { position: absolute; cursor: move; background: transparent; }
.sobj > img { width: 100%; height: 100%; display: block; }
.sobj > svg { width: 100%; height: 100%; background: #fff; border: 1px solid #d3d8e0; }
.sobj .el { position: absolute !important; }
.sobj.selected { outline: 2px solid #6a5af9; }
.sobj .sobj-rh { width: 12px; height: 12px; right: -6px; bottom: -6px; }
.cf-icon { font-style: normal; margin-right: auto; padding-right: 4px; flex: none; }
.dv-btn { position: absolute; z-index: 5; width: 16px; padding: 0; border: 1px solid #b8c0cc; border-radius: 3px; background: #fff; color: #1b2130; font-size: 10px; line-height: 1; }
.dv-tip { position: absolute; z-index: 6; max-width: 260px; background: #fffbe6; border: 1px solid #e0c870; color: #3d3410; font-size: 12px; padding: 6px 8px; border-radius: var(--r-sm); box-shadow: var(--shadow); pointer-events: none; display: flex; flex-direction: column; gap: 2px; }
.cf-sample { flex: none; width: 34px; text-align: center; border-radius: 4px; padding: 2px 0; font-weight: 700; font-size: 12px; }
/* 行・列の固定(js/sheet.js の render)。スクロールしても動かない板(sticky)に、固定したセルをもう一度描く。
   上の板の中の左上の角も sticky にするため、上の板は overflow: clip(スクロールの箱を作らない)にする */
.sg-frz-top { position: sticky; top: 0; z-index: 4; overflow: clip; background: #ffffff; box-shadow: 0 2px 0 #9aa4b8; }
.sg-frz-left { position: sticky; left: 0; z-index: 3; overflow: hidden; background: #ffffff; box-shadow: 2px 0 0 #9aa4b8; }
.sg-frz-corner { position: sticky; left: 0; z-index: 2; overflow: hidden; background: #ffffff; box-shadow: 2px 0 0 #9aa4b8; }
.sg-frz-cells { position: absolute; left: 0; top: 0; }
.sg-frz-ch, .sg-frz-rh { position: absolute; left: 0; top: 0; z-index: 1; background: var(--cell-head); }
.sg-frz-ch { height: 100%; box-shadow: 2px 0 0 #9aa4b8; }
.sg-frz-rh { width: 100%; box-shadow: 0 2px 0 #9aa4b8; }
/* 固定した板の上のセルを選んだ時は、選択の枠・入力欄を板の上に出す */
.cellin.frz, .sg-sel.frz { z-index: 5; }
/* フィルタ: 見出しのセルの「▾」と、絞り込んでいる列の印 */
.flt-btn { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; padding: 0; border: 1px solid #b8c0cc; border-radius: 3px; background: #fff; color: #1b2130; font-size: 10px; line-height: 1; cursor: pointer; }
.flt-btn.on { background: #6a5af9; border-color: #6a5af9; color: #fff; }
.sg-c:has(> .flt-btn) { padding-right: 22px; }
.sg-ch.flt { color: #6a5af9; font-weight: 700; }
.sg-ch.flt::after { content: ' ▼'; font-size: 9px; }
.flt-list { display: flex; flex-direction: column; gap: 2px; max-height: 45vh; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.flt-item { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
#sheet-font { max-width: 9em; }
#sheet-size, #sheet-nf, #sheet-font { padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); }
.fxgroup { flex: 1 1 360px; min-width: 0; }
.namebox { font: 500 12px var(--f-ui); width: 96px; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); text-align: center; font-variant-numeric: tabular-nums; }
.fxlabel { font-style: italic; color: var(--muted); padding: 0 4px; }
.fx { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 8px; background: var(--raised); }
.sheet-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 12px; background: var(--panel); border-top: 1px solid var(--line); overflow-x: auto; }
.stab { border: 1px solid transparent; background: none; padding: 4px 12px; border-radius: var(--r-sm); white-space: nowrap; }
.stab.active { background: var(--raised); border-color: var(--line); color: var(--k-sheet); font-weight: 700; }
.stab.add { font-weight: 700; }
.stab.del { color: var(--muted); font-size: 12px; margin-left: auto; }
.stab-edit { width: 120px; padding: 3px 8px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--raised); }

/* ---------- ドキュメント ---------- */
/* 用紙は常に白。ページの背景(.page-bg)を並べ、その上に本文の編集欄(.docpage)を重ねる */
#view.v-doc { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); }
#view.v-doc.panel-open { grid-template-columns: minmax(0, 1fr) 320px; }
.docdesk { overflow: auto; padding: 28px 16px 60px; min-width: 0; }
.doc-pages { position: relative; margin: 0 auto; }
/* 拡大縮小: 外側の箱(.doc-zoom)が縮めた後の大きさを持ち、中のページを左上を軸に縮める */
.doc-zoom { position: relative; margin: 0 auto; }
.doc-zoom > .doc-pages { margin: 0; transform-origin: 0 0; }
.doc-bgs { position: absolute; inset: 0; }
.page-bg { position: absolute; left: 0; background: #fff; box-shadow: var(--shadow); }
.hf { position: absolute; color: #4a5263; font-size: 12px; line-height: 1.5; min-height: 18px; cursor: default; }
.hf:hover { outline: 1px dashed #b8c0cc; }
.hf p { margin: 0; }
.fn-area { position: absolute; color: #1b1b1f; line-height: 1.5; }
.fn-sep { width: 34%; border-top: 1px solid #8a93a3; margin: 4px 0 4px; }
.fn-item p { display: inline; margin: 0; }
.fn-item sup, .fn-ref { color: #6a5af9; font-size: .75em; padding: 0 1px; cursor: pointer; }
.fn-measure { position: absolute; left: -9999px; top: 0; visibility: hidden; line-height: 1.5; }
.docpage { position: absolute; z-index: 1; color: #1b1b1f; outline: none; line-height: 1.5; overflow-wrap: anywhere; caret-color: #6a5af9; }
.docpage h1 { font-size: 1.9em; line-height: 1.35; margin: 0 0 .5em; }
.docpage h2 { font-size: 1.5em; line-height: 1.35; margin: .8em 0 .4em; }
.docpage h3 { font-size: 1.25em; margin: .7em 0 .3em; }
.docpage p { margin: 0; }
.docpage ul, .docpage ol { margin: 0; padding-left: 2em; }
.docpage img { max-width: 100%; height: auto; }
.docpage table { border-collapse: collapse; width: 100%; margin: 4px 0; }
.docpage td, .docpage th { border: 1px solid #8a93a3; padding: 2px 6px; vertical-align: top; min-width: 32px; }
.docpage table.no-border td { border: 1px dotted #d3d8e0; }
/* 表の列の境目(js/docview.js の colEdgeAt)。ドラッグ中だけ指の動きで画面が動かないようにし、文字も選ばない */
.docpage.col-resize, .docpage.col-resize * { cursor: col-resize; }
.docpage.col-drag, .docpage.col-drag * { touch-action: none; user-select: none; -webkit-user-select: none; }
/* 「表 ▾」のマス目(10 行 × 8 列。なぞった所まで色を付ける。指でなぞってもスクロールしない) */
.tbl-pick { padding: 4px 6px 6px; }
.tbl-grid { display: grid; grid-template-columns: repeat(8, 20px); gap: 3px; touch-action: none; user-select: none; -webkit-user-select: none; }
.tbl-grid span { width: 20px; height: 20px; border: 1px solid var(--line-strong, #b8c0cc); border-radius: 2px; background: var(--raised); cursor: pointer; }
.tbl-grid span.on { background: var(--accent-soft, #e6e3fb); border-color: var(--accent); }
.tbl-size { margin-top: 6px; font-size: 13px; text-align: center; color: var(--muted); }
.menu .tbl-sw { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 1px solid var(--line-strong, #b8c0cc); border-radius: 2px; }
.menu .tbl-sw.none { background: linear-gradient(to top right, transparent 45%, #c62828 45%, #c62828 55%, transparent 55%); }
.tbl-ask { display: grid; gap: 10px; }
.docpage hr { border: 0; border-top: 1px solid #b8c0cc; margin: 12px 0; }
.page-break, .sect-break { height: 0; border-top: 1px dashed #b8c0cc; position: relative; user-select: none; }
.page-break::after, .sect-break::after { content: '改ページ'; position: absolute; right: 0; top: -9px; font-size: 10px; color: #8a93a3; background: #fff; padding: 0 4px; }
.sect-break { border-top-style: double; border-top-width: 3px; }
.sect-break::after { content: 'セクション区切り'; }
.sect-break[data-type="continuous"]::after { content: 'セクション区切り（同じページ）'; }
.pg-split { display: block; user-select: none; }
/* 縦書き(文書全体)。行は上から下、行は右から左へ進み、ページも右から左へ並ぶ。英数字は横に寝かせる(既定) */
.doc-vert .docpage, .doc-vert .fn-area, .doc-vert .fn-measure { writing-mode: vertical-rl; }
.doc-vert .docpage h1, .doc-vert .docpage h2, .doc-vert .docpage h3 { margin: 0; margin-block-end: .5em; }
.doc-vert .docpage ul, .doc-vert .docpage ol { padding-left: 0; padding-top: 2em; }
.doc-vert .docpage img { max-width: none; max-height: 100%; }
.doc-vert .docpage table { width: auto; inline-size: 100%; margin: 0 4px; }
.doc-vert .docpage hr { border-top: 0; border-right: 1px solid #b8c0cc; margin: 0 12px; }
.doc-vert .page-break, .doc-vert .sect-break { height: auto; width: 0; border-top: 0; border-right: 1px dashed #b8c0cc; }
.doc-vert .sect-break { border-right-style: double; border-right-width: 3px; }
.doc-vert .page-break::after, .doc-vert .sect-break::after { right: -9px; top: 0; padding: 4px 0; }
.doc-vert .fn-sep { width: auto; height: 34%; border-top: 0; border-right: 1px solid #8a93a3; margin: 0 4px; }
.doc-vert.printing .page-break, .doc-vert.printing .sect-break { border-right-color: transparent; }
span.trk-fmt { border-bottom: 2px dotted #7a3fb8; }
.trk-fmtl { color: #7a3fb8 !important; }
.printing span.trk-fmt { border-bottom: 0; }
.printing .sect-break { border-top-color: transparent; }
.printing .sect-break::after { display: none; }
.dp-bubble { display: flex; flex-direction: column; gap: 4px; }
.dp-bubble.reply { margin-left: 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.cmt { background: rgba(255, 214, 0, .28); border-bottom: 2px solid rgba(230, 170, 0, .8); cursor: pointer; }
.cmt.cmt-on { background: rgba(255, 196, 0, .6); }
ins.trk { color: #1d7348; text-decoration: underline; text-decoration-color: #1d7348; }
del.trk { color: #b42318; text-decoration: line-through; }
.fmt-b { font-weight: 700; } .fmt-i { font-style: italic; } .fmt-u { text-decoration: underline; } .fmt-s { text-decoration: line-through; }
#doc-block, #doc-font, #doc-size, .doc-panel select { padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); }
.doc-panel { display: none; border-left: 1px solid var(--line); background: var(--panel); min-height: 0; flex-direction: column; }
.panel-open .doc-panel { display: flex; }
.dp-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.dp-tabs button { border: 0; background: none; padding: 6px 8px; font-size: 12px; border-radius: 6px 6px 0 0; color: var(--muted); }
.dp-tabs button[aria-selected="true"] { background: var(--raised); color: var(--accent-text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.dp-close { margin-left: auto; }
.dp-body { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.dp-row input[type="text"] { flex: 1; min-width: 0; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); }
.dp-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.dp-card.done { opacity: .55; }
.dp-card textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; background: var(--bg); font: 13px/1.5 var(--f-ui); }
.dp-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.dp-meta b { color: var(--fg); }
.dp-quote { font-size: 13px; padding: 4px 8px; border-radius: var(--r-sm); background: var(--bg); word-break: break-all; }
.dp-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.dp-edit { min-height: 2.4em; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; background: #fff; color: #1b1b1f; font-size: 13px; outline: none; }
.dp-edit:focus { border-color: var(--accent); }
.dp-edit p { margin: 0; }
.dp-empty { font-size: 12px; color: var(--muted); margin: 0; }
.trk-ins { color: var(--k-sheet) !important; } .trk-del { color: var(--danger) !important; }
.pg-num, .pg-total { background: #e8eefb; border-radius: 3px; padding: 0 3px; }
.page-bg .pg-num, .page-bg .pg-total { background: none; padding: 0; }
@media (max-width: 900px) {
  #view.v-doc.panel-open { grid-template-columns: minmax(0, 1fr); }
  .panel-open .doc-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(320px, 100%); z-index: 5; box-shadow: var(--shadow); }
}

/* ---------- 書き出し用(画面の外で描く) ---------- */
#export-stage { position: fixed; left: -30000px; top: 0; pointer-events: none; }
#export-stage .slide { transform: none; }
.export-sheet { position: relative; background: #fff; }
.printing .cmt, .printing .cmt.cmt-on { background: none; border-bottom: 0; }
.printing .hf:hover { outline: none; }
.printing .page-break { border-top-color: transparent; }
.printing .page-break::after { display: none; }
.printing .fn-ref { cursor: default; }

/* ---------- スライド ---------- */
#view.v-slides { overflow: hidden; display: grid; grid-template-columns: 196px minmax(0, 1fr); }
.thumbs { overflow-y: auto; padding: 12px 10px 24px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); border-right: 1px solid var(--line); }
.thumb { display: flex; gap: 6px; align-items: flex-start; border: 0; background: none; padding: 4px; border-radius: var(--r-md); text-align: left; }
.thumb-no { font-size: 11px; color: var(--muted); width: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.thumb-box { position: relative; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); flex: none; pointer-events: none; }
.thumb.active .thumb-box { box-shadow: 0 0 0 2.5px var(--k-slides); }
.thumb-box .slide, .present-box .slide { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.thumb-ink { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* 拡大した時はスライドの置き場がスクロールする。真ん中に置くのは margin: auto(大きくはみ出しても左上まで戻れるように) */
.stage-wrap { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; padding: 16px; min-width: 0; min-height: 0; overflow: auto; }
.stage-box { position: relative; box-shadow: var(--shadow); flex: none; margin: auto; }
.stage-box > .slide { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.stage-no { align-self: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slide { position: relative; overflow: hidden; background-size: cover; background-position: center; color: #1b2130; font-family: "Yu Gothic", "Hiragino Sans", "Meiryo", "Zen Kaku Gothic New", sans-serif; user-select: none; -webkit-user-select: none; }
.slide .el { position: absolute; box-sizing: border-box; }
.slide .hf-item { position: absolute; box-sizing: border-box; pointer-events: none; white-space: nowrap; overflow: hidden; }
.slide .anim-box { position: absolute; inset: 0; }
.slide .shape { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; display: block; }
.slide img.shape { object-fit: fill; }
.slide svg.shape { overflow: visible; }
.anim-badge { position: absolute; left: -2px; top: -2px; transform: translate(-100%, -100%) scale(calc(1 / var(--k, 1))); transform-origin: 100% 100%; background: #b5591a; color: #fff; font: 700 11px/1 var(--f-ui); padding: 3px 5px; border-radius: 4px; pointer-events: none; }
.anim-badge.exit { background: #b42318; }
.rot { position: absolute; background: #fff; border: 2px solid #6a5af9; border-radius: 50%; cursor: grab; touch-action: none; }
.stage-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.notes { margin: 0 16px 12px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; background: var(--raised); font: 13px/1.5 var(--f-ui); resize: vertical; min-height: 56px; }
.thumb-mark { display: block; color: var(--k-slides); font-size: 10px; }
.modal { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 18px; width: min(560px, 100%); display: flex; flex-direction: column; gap: 10px; }
.modal-box h3 { margin: 0; font-size: 16px; }
.modal-box textarea { width: 100%; font: 13px/1.5 ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; background: var(--bg); }
.modal-box input[type="text"] { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.modal-box select, #anim-effect, #anim-trigger, #slide-transition { padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); }
.modal-actions { justify-content: flex-end; }
.tr-layer { position: absolute; inset: 0; }
.present-notes { position: fixed; left: 16px; right: 16px; bottom: 40px; max-height: 30vh; overflow: auto; background: rgba(20, 24, 32, .88); color: #f1f3f6; padding: 12px 16px; border-radius: var(--r-lg); font-size: 16px; line-height: 1.6; white-space: pre-wrap; cursor: default; }
.slide .txt { position: absolute; inset: 0; display: flex; flex-direction: column; line-height: 1.2; overflow-wrap: anywhere; outline: none; }
.slide .txt[contenteditable="true"] { user-select: text; -webkit-user-select: text; cursor: text; background: rgba(255, 255, 255, .25); }
/* 箇条書きの印(段落の data-bullet。.pptx の箇条書きと同じ印) */
.slide .txt [data-bullet]::before { content: attr(data-bullet) "\00a0"; }
.v-slides .stage-box .el { cursor: move; }
.v-slides .stage-box .el.selected { outline: 2px solid #6a5af9; outline-offset: 0; }
.v-slides .stage-box .el.in-sel:not(.selected) { outline: 2px dashed #6a5af9; outline-offset: 1px; }
.rh { position: absolute; background: #fff; border: 2px solid #6a5af9; border-radius: 3px; cursor: nwse-resize; touch-action: none; }
.inkhost { position: absolute; inset: 0; z-index: 50; pointer-events: none; touch-action: none; }
.ink-on .inkhost { pointer-events: auto; }
/* ペンのみの時の指のスクロールも ink.js の TouchGesture が行う(.inkhost は touch-action: none のまま) */
.inkhost canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.present { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; outline: none; cursor: pointer; }
.present-box { position: relative; overflow: hidden; }
.present-hint { position: fixed; bottom: 12px; right: 16px; color: rgba(255, 255, 255, .55); font-size: 12px; }
@media (max-width: 760px) {
  #view.v-slides { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .thumbs { grid-row: 2; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--line); padding: 8px 12px; }
  .stage-col { grid-row: 1; }
}
.docpage .merge-conflict { border-left: 3px solid #ffad5a; background: rgba(255,173,90,.12); padding-left: 6px; }
/* ドキュメントの機能追加(2026-10-27)。向きにかかわらない書き方(inline-start)にして、縦書きでも印・字下げが上に来るように */
.docpage a[href] { color: #0b57d0; text-decoration: underline; }
.docpage ul.checklist, .docpage ul.checklist ul { list-style: none; padding-left: 0; padding-top: 0; padding-inline-start: 1.7em; }
.docpage ul.checklist li { position: relative; }
.docpage ul.checklist li::before { content: '☐'; position: absolute; inset-inline-start: -1.5em; cursor: pointer; color: #5a6270; }
.docpage ul.checklist li[data-checked="1"]::before { content: '☑'; color: #1d7348; }
.docpage ul.checklist li[data-checked="1"] { color: #8a93a3; text-decoration: line-through; }
.docpage ul.checklist li[data-checked="1"] li:not([data-checked="1"]) { color: #1b1b1f; text-decoration: none; }
.docpage .doc-toc { margin: 4px 0 12px; padding-inline-start: 10px; border-inline-start: 3px solid #c9cfda; user-select: none; }
.docpage .doc-toc p { margin: 0; }
.docpage .doc-toc .toc-title { margin-block-end: 4px; }
.docpage .doc-toc [data-toc] { color: #0b57d0; cursor: pointer; }
.docpage .doc-toc [data-toc]:hover { text-decoration: underline; }
.docpage .doc-toc .toc-empty { color: #8a93a3; font-size: .9em; }
.printing .docpage .doc-toc { border-inline-start-color: transparent; }
.printing .docpage .doc-toc [data-toc] { color: inherit; }
/* 変更を記録中に付けた上付き・下付き(書式の変更の印の中の vertical-align) */
.docpage span[style*="vertical-align: super"], .docpage span[style*="vertical-align: sub"] { font-size: .75em; }
/* 検索と置換で見つけた所(選択は動かさずに色だけ付ける) */
::highlight(doc-find) { background-color: rgba(255, 200, 0, .45); }
::highlight(doc-find-cur) { background-color: rgba(255, 140, 0, .85); color: #000; }
.count-table { border-collapse: collapse; font-size: 14px; }
.count-table th, .count-table td { padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.count-table td { text-align: right; font-variant-numeric: tabular-nums; }
#doc-line { padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); }
/* ページを横に並べる(横書きの文書): 本文を 1 ページ分ずつの列(段組み)に流し、左から右へ並べる。列の高さ・間隔は js/docview.js が決める */
.docpage.doc-cols { column-count: 1; column-fill: auto; orphans: 1; widows: 1; }
