/* ローファイの実験で足した見た目（習作 A〜G と仕上げ）。site.css のあとに読む。切り替えの帯の見た目は、2026-12-03 に帯ごと外した */

/* ───────── 仕上げ（習作とは別。どの習作を入れていても効く） ───────── */
/* 題の太さ（ローファイを入れる前の版は 800）。細くするぶん、字のあいだを少しゆるめる */
:root[data-tw="700"] .intro h1 { font-weight: 700; letter-spacing: -.05em; }
:root[data-tw="600"] .intro h1 { font-weight: 600; letter-spacing: -.045em; }
:root[data-tw="500"] .intro h1 { font-weight: 500; letter-spacing: -.04em; }
/* 記事（ログの詳細）の題の太さ（ローファイを入れる前の版は 800）。こちらも、細くするぶん、字のあいだを少しゆるめる。
   スマホの幅では、もとの字のあいだが少し広い（-.035em）ので、そのぶんを足す */
:root[data-dw="700"] .detail-title { font-weight: 700; letter-spacing: -.04em; }
:root[data-dw="600"] .detail-title { font-weight: 600; letter-spacing: -.035em; }
:root[data-dw="500"] .detail-title { font-weight: 500; letter-spacing: -.03em; }
@media (max-width: 720px) {
  :root[data-dw="700"] .detail-title { letter-spacing: -.03em; }
  :root[data-dw="600"] .detail-title { letter-spacing: -.025em; }
  :root[data-dw="500"] .detail-title { letter-spacing: -.02em; }
}

/* 音のメーター（viz.js）。SOUND のスイッチの左。棒 5 本で、1 本は 3px 角の点を 4 つまで積む（--v が、点の数）。
   点の大きさは、踊る人のドットや、C のつぶと同じ 3px。音がないときは、いちばん下の点だけが、うすい色で見えている */
.viz { display: inline-flex; flex: 0 0 auto; align-items: flex-end; gap: 1px; height: 15px; margin-right: 8px; }
.viz.is-off { display: none; }
.viz i {
  width: 3px;
  height: 15px;
  background-image:
    repeating-linear-gradient(to top, var(--ink) 0 3px, transparent 3px 4px),
    linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-size: 100% calc(var(--v, 0) * 4px), 100% 3px;
  background-position: 0 100%, 0 100%;
}

/* 戻るボタン（動かす時刻は main.js が決める。なめらかには動かさない）。動かし方は 3 つ：
   ・流れる矢印（march）… 「<」を 3 つ並べて、1 つだけ濃くする。濃い「<」が、拍に合わせて、右から左へ移る
   ・大きく動く（hop）… 「<」を、左へ 9px 動かして、4px、もとの位置、と 2 段で戻す
   ・小さく動く（nudge）… 「<」を、左へ 4px（前の版）
   詳細を開いた直後は、ボタンの白黒を入れ替えて、3 回点滅させる（指したときと同じ見た目） */
.back .back-arrow { display: inline-block; font-style: normal; }
.back .back-arrow b { font-weight: inherit; }
.back[data-lit] .back-arrow b { opacity: .26; }
.back[data-lit="0"] .back-arrow b:nth-child(1),
.back[data-lit="1"] .back-arrow b:nth-child(2),
.back[data-lit="2"] .back-arrow b:nth-child(3) { opacity: 1; }
.back.is-nudge .back-arrow { transform: translateX(-4px); }
.back.is-hop .back-arrow { transform: translateX(-9px); }
.back.is-hop-2 .back-arrow { transform: translateX(-4px); }
.back.is-flash .lbl { background: var(--ink); color: var(--paper); }

/* 詳細を開いているあいだも、SOUND のスイッチを押せるようにする（ローファイを入れる前の版は、一覧を見ているときしか押せない） */
.win.is-detail-open:not(.is-live) .win-status { pointer-events: auto; }
.win.is-detail-open:not(.is-live) .sound { cursor: pointer; }
@media (hover: hover) {
  .win.is-detail-open:not(.is-live) .sound:hover { background: var(--ink); color: var(--paper); }
}

/* ───────── A：罫線の波を描く面 ───────── */
.lab-wave { position: absolute; display: block; max-width: none; pointer-events: none; }
.lab-wave-rows { left: 0; top: 0; width: 100%; z-index: 2; }
.lab-wave-bar, .lab-wave-title { left: 0; top: calc(100% - 8px); width: 100%; height: 17px; z-index: 1; }
.lab-wave-top { left: -1px; top: -1px; width: calc(100% + 2px); height: 9px; z-index: 3; }
/* 虹の線の上を走る波（js/wave.js）。虹を敷いた細い帯を、帯の下の線の上（線そのものと、その上の 6px）に重ねて、山の形に切り抜く。
   虹の色と流れは、site.css の虹（.detail-rainbow など）と同じ決まりを使う */
.lab-wave-rainbow { position: absolute; left: 0; top: calc(100% - 6px); width: 100%; height: 7px; z-index: 1; pointer-events: none; }
.win.is-detail-open .lab-wave-rows { display: none; }

/* ───────── C：文字の点を描く面 ───────── */
.lab-dots { position: absolute; left: -1px; top: 0; max-width: none; z-index: 5; pointer-events: none; visibility: hidden; }
.lab-dots.is-on { visibility: visible; }
/* 下書きの面は、画面の上では 1px 角にしておく（中の絵の大きさは変わらない。大きいままだと、ページが横にはみ出す） */
.lab-dots-work { position: absolute; left: 0; top: 0; width: 1px; height: 1px; max-width: none; visibility: hidden; pointer-events: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* 点が動いているあいだ、もとの文字とピンどめの目印は隠す。指して開いていた絵は、すぐにたたむ */
.win.lab-dotting[data-view="list"] .item > .item-date,
.win.lab-dotting[data-view="list"] .item > h2,
.win.lab-dotting[data-view="list"] .item > p,
.win.lab-dotting[data-view="list"] .item[data-kind="pin"]::before { visibility: hidden; }
.win.lab-dotting .item .item-media { height: 0 !important; margin: 0 !important; border-width: 0 !important; transition: none !important; }

/* ───────── D：一覧は重なったカード ───────── */
/* 罫線の引き方を変える。ローファイを入れる前の版は「行と行のすきまから下の墨が見える」方式だが、行を立体として動かすと、
   すきまが広がって墨の面が見えてしまう。ここでは、行が自分の下の線を自分で持つ（影として 1px の線を引く）。 */
.win.lab-pile .foot { background: var(--paper); }
.win.lab-pile .win-title { cursor: grab; touch-action: none; }
.win.lab-pile.is-tilting .win-title, .win.lab-pile.is-pulling .win-title { cursor: grabbing; }
.win.lab-pile[data-view="list"]:not(.is-redrawing) .stack { background: transparent; }
.win.lab-pile[data-view="list"]:not(.is-redrawing) .item,
.win.lab-pile[data-view="list"].is-line-committing .item { box-shadow: 0 1px 0 0 var(--ink); }
.win.lab-pile[data-view="list"] .item:not(.is-folding) { overflow: visible; }
.win.lab-pile[data-view="list"] .body { overflow: hidden; }
.win.lab-pile[data-view="list"].is-tilting .body,
.win.lab-pile[data-view="list"].is-tilt-out .body { overflow: visible; }

/* LIST ⇄ CARD で紙が動くあいだ、線を描く面（deal.js）。ローファイを入れる前の版の点線は出さない */
/* 使っていないあいだは、場所ごと消しておく。見えなくするだけだと、前に使ったときの幅のまま残って、
   あとで画面を狭めたときに、ページが横にはみ出す */
.lab-deal { display: none; position: absolute; left: -1px; top: -1px; max-width: none; z-index: 1; pointer-events: none; }
.lab-deal.is-on { display: block; }
.win.lab-dealing .body { overflow: hidden; }
.win.lab-dealing .item::after { display: none; }
.win.lab-dealing .item .item-media { height: 0 !important; margin: 0 !important; border-width: 0 !important; transition: none !important; }

/* カードの残りの部分。次の行のうしろに隠れている、という扱い。
   傾けていないあいだは、置かずにおく（置いたままだと、いちばん下の行のぶんだけ、一覧の下に空きができる） */
.sheet { display: none; }
.win.lab-pile[data-view="list"] .sheet {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1px);
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0 18px;
  height: 107px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  pointer-events: none;
}
.sheet-img { width: 190px; height: 107px; max-width: none; object-fit: cover; filter: grayscale(1) contrast(1.12); border-right: 1px solid var(--ink); }
.sheet-desc { align-self: start; padding: 14px 18px 0 0; font-family: var(--f-jp); font-size: 12px; font-weight: 500; line-height: 1.7; max-height: 96px; overflow: hidden; }

.win.lab-pile[data-view="list"].is-tilting .sheet,
.win.lab-pile[data-view="list"].is-tilt-out .sheet { display: grid; }
.win.lab-pile[data-view="list"].is-tilting .stack,
.win.lab-pile[data-view="list"].is-tilt-out .stack {
  transform-style: preserve-3d;
  transform-origin: 50% var(--tilt-oy, 50%);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  pointer-events: none;
}
.win.lab-pile[data-view="list"].is-tilting .item,
.win.lab-pile[data-view="list"].is-tilt-out .item {
  transform: translateZ(calc(var(--k, 0) * var(--tilt-dz, 90px)));
  box-shadow: 0 0 0 1px var(--ink);
  transition: none;
}
.win.lab-pile.is-tilting .lab-wave-rows, .win.lab-pile.is-tilt-out .lab-wave-rows, .win.lab-pile.is-pulling .lab-wave-rows { visibility: hidden; }
@media (max-width: 720px) {
  .win.lab-pile[data-view="list"] .sheet { grid-template-columns: 132px minmax(0, 1fr); gap: 0 12px; height: 96px; }
  .sheet-img { width: 132px; height: 96px; }
  .sheet-desc { max-height: 84px; padding-top: 10px; }
}

/* ───────── D：CARD では、絵をはじめから出しておく ───────── */
/* 並びは、日付 → 絵 → 題 → ひとこと（指したとき）。絵は白黒で、指すと色がつく（ローファイを入れる前の版と同じ決まり） */
.win.lab-pile[data-view="card"] .item { min-height: 0; }
.win.lab-pile[data-view="card"] .item-date { order: 0; margin-bottom: 0; }
.win.lab-pile[data-view="card"] .item .item-media,
.win.lab-pile[data-view="card"].is-live .item.is-hot .item-media {
  order: 1;
  height: auto;
  margin: 9px 0 0;
  border-width: 1px;
  opacity: 1;
  transform: none;
  transition: opacity 38ms steps(1, end);
}
/* 並べ方を切り替えた直後だけ、絵は、文字と同じ順に、1 コマに 1 枚ずつ出てくる（印は main.js が付けて、出そろったら外す） */
.win.lab-pile[data-view="card"] .item.is-card-in .item-media { transition-delay: calc(var(--i, 0) * 37.5ms); }
.win.lab-pile[data-view="card"] .item-media-in { height: auto; aspect-ratio: 16 / 9; }
.win.lab-pile[data-view="card"] .item h2 { order: 2; margin: 9px 0 0; }
.win.lab-pile[data-view="card"] .item p { order: 3; }
/* 文字が化けて消えるあいだは、絵も薄くする（ローファイを入れる前の版と同じ） */
.win.lab-pile[data-view="card"] .item.is-dissolved .item-media { opacity: .08; transform: translateX(8px); transition: none; }
/* 高さを測るあいだや、紙が動くあいだも、絵の場所は取っておく（取らないと、あとでカードの高さが変わる） */
.win.lab-pile.is-measuring[data-view="card"] .item .item-media,
.win.lab-pile.lab-dealing[data-view="card"] .item .item-media { height: auto !important; margin: 9px 0 0 !important; border-width: 1px !important; }

/* ───────── D：CARD と LOOSE も、帯をつかんで傾けられる ───────── */
/* カードも札も、そのログの絵の枚数ぶんの紙を重ねた束。傾けると、束が箱として立ち上がって、横の面に紙の重なりが線で見える */
.wall { display: none; }
.win.lab-pile.is-tilting:is([data-view="card"], [data-view="loose"]) .stack,
.win.lab-pile.is-tilt-out:is([data-view="card"], [data-view="loose"]) .stack {
  overflow: visible;
  background: transparent;
  transform-style: preserve-3d;
  transform-origin: 50% var(--tilt-oy, 50%);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  pointer-events: none;
}
.win.lab-pile.is-tilting[data-view="card"] .item,
.win.lab-pile.is-tilt-out[data-view="card"] .item {
  transform: translateZ(calc(var(--bz, 0) * 1px));
  transform-style: preserve-3d;
  overflow: visible;
  box-shadow: 0 0 0 1px var(--ink);
  transition: none;
}
.win.lab-pile.is-tilting[data-view="loose"] .item,
.win.lab-pile.is-tilt-out[data-view="loose"] .item {
  transform: translate3d(var(--x, 0px), var(--y, 0px), calc(var(--bz, 0) * 1px));
  transform-style: preserve-3d;
  overflow: visible;
  transition: none;
}
.win.lab-pile.is-tilting[data-view="card"] .filler,
.win.lab-pile.is-tilt-out[data-view="card"] .filler { visibility: hidden; }
/* 束の横の面。紙 1 枚ごとに、線を 1 本引く */
.win.lab-pile.is-tilting:is([data-view="card"], [data-view="loose"]) .wall,
.win.lab-pile.is-tilt-out:is([data-view="card"], [data-view="loose"]) .wall {
  display: block;
  position: absolute;
  background-color: var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
  opacity: 1;
  transition: none;
}
/* 紙 1 枚の厚み。CARD は 4px、LOOSE は 2px（pile.js の PLY と同じ） */
.win.lab-pile[data-view="card"] .item > .wall { --ply: 4px; }
.win.lab-pile[data-view="loose"] .item > .wall { --ply: 2px; }
/* 向きの指定は、site.css の「.win.is-rebuilding .item > *」（向きを消す決まり）より強くしておく */
.win.lab-pile .item > .wall-t {
  left: 0; right: 0; bottom: 100%;
  height: calc(var(--bh, 0) * 1px);
  transform-origin: 50% 100%;
  transform: rotateX(90deg);
  background-image: repeating-linear-gradient(to top, var(--ink) 0 1px, transparent 1px var(--ply));
}
.win.lab-pile .item > .wall-l {
  top: 0; bottom: 0; right: 100%;
  width: calc(var(--bh, 0) * 1px);
  transform-origin: 100% 50%;
  transform: rotateY(-90deg);
  background-image: repeating-linear-gradient(to left, var(--ink) 0 1px, transparent 1px var(--ply));
}
.win.lab-pile .item > .wall-r {
  top: 0; bottom: 0; left: 100%;
  width: calc(var(--bh, 0) * 1px);
  transform-origin: 0 50%;
  transform: rotateY(90deg);
  background-image: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px var(--ply));
}
/* LOOSE の札には枠線（1px）がある。横の面は、枠線の外側にそろえる */
.win.lab-pile[data-view="loose"] .item > .wall-t { left: -1px; right: -1px; bottom: calc(100% + 1px); }
.win.lab-pile[data-view="loose"] .item > .wall-l { top: -1px; bottom: -1px; right: calc(100% + 1px); }
.win.lab-pile[data-view="loose"] .item > .wall-r { top: -1px; bottom: -1px; left: calc(100% + 1px); }

/* ───────── D：CARD で帯を引くと、カードが裏返る（flip.js） ─────────
   カードは、絵の枚数ぶんの紙を重ねた板（厚みは --bh）。縦の軸で、その場で回る（角度は --flip。15 度きざみ）。
   遠近はつけない。表が細くなり、横の面が見えて、裏が広がる */
.item > .back { display: none; }
.win.lab-pile.is-flipping[data-view="card"] .stack { background: transparent; pointer-events: none; }
.win.lab-pile.is-flipping[data-view="card"] .filler { visibility: hidden; }
.win.lab-pile.is-flipping[data-view="card"] .item {
  /* 回す軸は、板のまんなか。表の面を、厚みの半分だけ手前に出してから回す */
  transform: rotateY(calc(var(--flip, 0) * 1deg)) translateZ(calc(var(--bh, 0) * .5px));
  transform-style: preserve-3d;
  overflow: visible;
  box-shadow: 0 0 0 1px var(--ink);
  transition: none;
}
/* 横の面は、回っている途中だけ、こちらを向く側の 1 枚を出す（向こう側の面は、表か裏に隠れて見えない） */
.win.lab-pile.is-flipping[data-view="card"] .item > .wall { --ply: 3px; }
.win.lab-pile.is-flipping:not(.is-flip-neg)[data-view="card"] .item.is-turning > .wall-l,
.win.lab-pile.is-flipping.is-flip-neg[data-view="card"] .item.is-turning > .wall-r {
  display: block;
  position: absolute;
  background-color: var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
  opacity: 1;
  transition: none;
}
/* 90 度をこえたら、表の中身を消して、裏を出す。
   裏は墨の面なので、ふちの線は引かない（となりの裏とのあいだ 1px に、紙の色が見えて、白い罫線になる） */
.win.lab-pile.is-flipping[data-view="card"] .item.is-back { box-shadow: none; }
.win.lab-pile.is-flipping[data-view="card"] .item.is-back > :not(.back):not(.wall),
.win.lab-pile.is-flipping[data-view="card"] .item.is-back::before { visibility: hidden; }
.win.lab-pile.is-flipping[data-view="card"] .item.is-back > .back {
  display: block;
  position: absolute;
  inset: 0;
  padding: 9px 10px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  opacity: 1;
  /* 板の裏側（厚みのぶん奥）に、うしろ向きに貼る */
  transform: translateZ(calc(var(--bh, 0) * -1px)) rotateY(180deg);
  transition: none;
}
.back-head { margin-bottom: 5px; overflow: hidden; color: var(--on-ink-2); text-overflow: ellipsis; white-space: nowrap; }
.back-row { display: grid; grid-template-columns: 7.5ch minmax(0, 1fr); }
.back-k { color: var(--on-ink-2); }
.back-v { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* スマホの幅では、カードが低いので、字を少し詰めて、ひとことは 1 行にする（8 つの項目が、ぜんぶ入るように） */
@media (max-width: 720px) {
  .win.lab-pile.is-flipping[data-view="card"] .item.is-back > .back { padding: 8px 9px; font-size: 9px; line-height: 1.42; }
  .back-head { margin-bottom: 3px; }
  .back-v-excerpt { -webkit-line-clamp: 1; }
}

/* ───────── D：LOOSE で帯を引くと、札がすべる（slide.js） ─────────
   札の位置（--x・--y）を、1 コマごとに JS が書きかえる。動かしているあいだは、札をつかめない */
.win.lab-pile.is-sliding[data-view="loose"] .stack { pointer-events: none; }
.win.lab-pile.is-sliding[data-view="loose"] .item { transition: none; }

/* ───────── B：立体の踊る人 ───────── */
.dancer.is-3d {
  width: calc(var(--pixel) * 15);
  height: calc(var(--pixel) * 18);
  margin-bottom: calc(var(--pixel) * .6);
  animation: none;
  cursor: grab;
  touch-action: none;
}
body.is-detail .dancer.is-3d, body.is-working .dancer.is-3d { animation: none; }
.dancer.is-3d canvas { width: 100%; height: 100%; max-width: none; image-rendering: pixelated; }

/* 旋律が鳴った行は、その音のあいだだけ、日付が白黒反転する（文字の幅ぶんだけ）。色にはしない */
.item.is-playing .item-date { width: fit-content; background: var(--ink); background-clip: content-box; color: var(--paper); opacity: 1; }
.win.is-live .item.is-hot.is-playing .item-date { background-color: var(--paper); color: var(--ink); opacity: 1; }

/* ───────── B：盛り上がっているあいだの色（fever.js） ─────────
   背景は塗らない。色は、ピンどめした行を指したときの虹と同じもの。
   --fever-x は、虹の位置（JS が 16分音符ごとに 1 段ずらす）。なめらかには流さない */
:root {
  --fever-rainbow: repeating-linear-gradient(90deg,
    hsl(338 100% 64%) 0, hsl(10 100% 62%) 42px, hsl(35 100% 60%) 84px, hsl(56 100% 66%) 126px,
    hsl(104 78% 58%) 174px, hsl(154 74% 54%) 222px, hsl(188 88% 57%) 270px, hsl(220 100% 64%) 328px,
    hsl(262 96% 68%) 386px, hsl(300 96% 67%) 450px, hsl(338 100% 64%) 520px);
}
@supports (background: linear-gradient(in oklch, red, blue)) {
  :root {
    --fever-rainbow: repeating-linear-gradient(90deg in oklch,
      oklch(72% .25 18) 0, oklch(75% .24 38) 42px, oklch(82% .21 62) 84px, oklch(90% .18 94) 126px,
      oklch(78% .22 138) 174px, oklch(76% .20 170) 222px, oklch(80% .18 205) 270px, oklch(70% .23 255) 328px,
      oklch(73% .24 295) 386px, oklch(74% .25 330) 450px, oklch(72% .25 378) 520px);
  }
}

/* 点線のメーター：窓の名前のうしろの点線（1 本がログ 1 つ）の上に、色のマスを重ねる。
   --fever-fill は、左から何本ぶんまで色にするか。--fever-i は、いま鳴っているログが何本めか（そのマスだけ墨で、少し背が高い） */
body.fv-meter .win-dash { position: relative; }
body.fv-meter .win-dash b { position: relative; z-index: 1; }
body.fv-meter .win-dash::before,
body.fv-meter .win-dash::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--fever-fill, 0) * 1ch);
  pointer-events: none;
}
body.fv-meter .win-dash::before { background: var(--paper); }
body.fv-meter .win-dash::after {
  background-image: linear-gradient(var(--ink), var(--ink)), var(--fever-rainbow);
  background-repeat: no-repeat, repeat-x;
  background-size: .72ch 10px, 520px 6px;
  background-position: calc(var(--fever-i, -9) * 1ch) 50%, var(--fever-x, 0px) 50%;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 .72ch, transparent .72ch 1ch);
  mask-image: repeating-linear-gradient(90deg, #000 0 .72ch, transparent .72ch 1ch);
}

/* モード名：「LIST MODE」の上に、色の札「FEVER MODE」をかぶせる（もとの文字は、消さずに透明にしておく）。
   札は 10 文字ぶん。9 文字の「LIST MODE」「CARD MODE」のときも札が入るように、はじめから 10 文字ぶんの幅を取って、
   文字は左（区切りの線の側）にそろえる。--mode-gap は、区切りの線と文字のあいだ（site.css と同じ値） */
body.fv-mode .mode,
body.fv-mode .mode.is-swapping { --mode-gap: 14px; min-width: calc(10ch + 1px + var(--mode-gap)); justify-content: flex-start; }
@media (max-width: 720px) { body.fv-mode .mode, body.fv-mode .mode.is-swapping { --mode-gap: 10px; } }
body.is-fever.fv-mode .mode { position: relative; color: transparent; }
body.is-fever.fv-mode .mode::after {
  content: "FEVER MODE";
  position: absolute;
  left: calc(1px + var(--mode-gap) - 3px);
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 3px 2px;
  white-space: nowrap;
  color: var(--ink);
  background-image: var(--fever-rainbow);
  background-size: 520px 100%;
  background-position: var(--fever-x, 0px) 0;
}

/* 床：踊る人の足もとに、1 小節ぶんの拍（8分音符）のマス。区切りの頭の前は、広くあける。いまの拍のマスだけ墨 */
.dancer .fv-floor {
  position: absolute;
  left: 50%;
  top: 100%;
  display: none;
  gap: var(--pixel);
  margin-top: var(--pixel);
  transform: translateX(-50%);
  pointer-events: none;
}
body.is-fever .dancer .fv-floor { display: flex; }
.dancer .fv-floor b {
  flex: 0 0 auto;
  width: calc(var(--pixel) * 2);
  height: calc(var(--pixel) * 2);
  background-image: var(--fever-rainbow);
  background-size: 520px 100%;
  background-position: calc(var(--fever-x, 0px) - var(--o, 0px)) 0;
}
.dancer .fv-floor b.is-head { margin-left: var(--pixel); }
.dancer .fv-floor b.is-now { background: var(--ink); }

/* ───────── E：命令の欄 ───────── */
.cmd {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 16px;
  padding: 0 16px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
}
.cmd-line { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 34px; cursor: text; }
.cmd-prompt { flex: 0 0 auto; padding: 1px 3px 2px; }
/* 打つ欄に入っているあいだは、> が墨に返る（どこに打っているかの目印） */
.cmd-line:focus-within .cmd-prompt { background: var(--ink); color: var(--paper); }
.cmd-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: .01em;
  outline: none;
  caret-color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.cmd.is-busy .cmd-input { opacity: .5; }
.cmd-status { max-width: 62ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.cmd-status.is-error { padding: 1px 4px 2px; background: var(--ink); color: var(--paper); text-transform: none; }
.cmd-out { grid-column: 1 / -1; margin: 0; padding: 10px 0 9px; border-bottom: 1px solid var(--line); font: inherit; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
/* 窓の名前を押すとひらく、ファイルの説明の行 */
.win-note { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 9px 16px; border-bottom: 1px solid var(--ink); background: var(--paper); font-family: var(--f-mono); font-size: 11px; font-weight: 500; line-height: 1.6; }
.win-note-text { flex: 1 1 240px; min-width: 0; }
/* 行の右のボタン（.enjoy）。地は、虹（ぼんちゃんの案。2026-12-02）。虹の色と流れは、site.css の虹の決まり（.win-note .win-note-btn）から来る。
   指しているあいだは、ほかのボタンと同じく、墨の地に紙の色の字になる（下の :hover） */
.win-note-btn { all: unset; cursor: pointer; padding: 1px 6px 2px; border: 1px solid var(--ink); white-space: nowrap; }
.win-note-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .win-note-btn:hover { background: var(--ink); color: var(--paper); } }
@media (max-width: 720px) { .win-note { padding: 8px 12px; } }
.win-name button { all: unset; cursor: pointer; }
.win-name button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .win-name button:hover { background: var(--ink); color: var(--paper); } }
@media (max-width: 720px) {
  .cmd { grid-template-columns: minmax(0, 1fr); padding: 0 12px; }
  .cmd-input { font-size: 16px; }      /* 16px より小さいと、iPhone は打つときに画面を拡大する */
  .cmd-status { padding-bottom: 8px; white-space: normal; }
}

/* 仕上げ：記事の終わりにも「戻る・前へ・次へ」を置く（下まで読んだあと、いちばん上の帯まで戻らなくてもよいように）。
   黒い面の上なので、紙の色の線と字。押せる所は、指でも押しやすい高さ（44px）にする */
.detail-end { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 10px 16px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--on-ink-3); }
.detail-end button { min-height: 44px; padding: 0 16px; border: 1px solid var(--on-ink-2); color: var(--paper); font-family: var(--f-mono); font-size: 12px; font-weight: 500; }
.detail-end button:disabled { opacity: .35; cursor: default; }
.detail-end button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.detail-end .end-step { display: flex; align-items: center; gap: 12px; }
.detail-end .pos { font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--on-ink-2); }
.detail-end .back-arrow { display: inline-block; font-style: normal; }
.detail-end .back-arrow b { font-weight: inherit; }
.end-back[data-lit] .back-arrow b { opacity: .3; }
.end-back[data-lit="0"] .back-arrow b:nth-child(1),
.end-back[data-lit="1"] .back-arrow b:nth-child(2),
.end-back[data-lit="2"] .back-arrow b:nth-child(3) { opacity: 1; }
@media (hover: hover) {
  .detail-end button:not(:disabled):hover { background: var(--paper); color: var(--ink); }
}
@media (max-width: 720px) {
  .detail-end .end-back { flex: 1 1 100%; }
  .detail-end .end-step { flex: 1 1 100%; justify-content: space-between; }
}
