/* 形 — THE OTHER FORMS OF ONE PATTERN (js/manabi-pattern-family.js; approved 2026-11-05, TODO row 15).
   The sheet IS the grammar table's sheet (css/manabi-grammar-table.css) — this file only adds the button,
   the rows and the one layer rule. Every colour is an app token, so light / dark / 文字の大きさ follow. */

/* the button: a quiet brass pill under the pattern — one line, never a new block of text */
.mnb-pf-btn {
  display: inline-flex; align-items: center; gap: 0.32em;
  margin: 6px 0 2px; padding: 0.22em 0.72em 0.24em 0.62em;
  background: none; border: 1px solid var(--brass); border-radius: 999px;
  color: var(--brass); font-family: var(--font-ui); font-size: 12.5px; font-weight: 500; line-height: 1.3;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mnb-pf-btn .pf-kan { font-family: var(--font-jp); font-size: 1.08em; }
.mnb-pf-btn .pf-chev { font-size: 1.3em; line-height: 0.8; margin-left: 0.05em; }
.mnb-pf-btn:active, .mnb-pf-btn.is-on { background: rgba(201, 164, 100, 0.16); }
.mnb-pf-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.cc-head .mnb-pf-btn { display: flex; width: max-content; margin-bottom: 9px; }
.bunpou-head .mnb-pf-btn { align-self: center; margin: 8px auto 0; }

/* opened from a grammar card: ABOVE the card overlay (90), still under both bars */
.mnb-gt-dim.is-over-card { z-index: 95; }

.mnb-pf-glyph { color: var(--brass); font-family: var(--font-jp); font-size: 1.15em; }

/* THE iPAD DOCK LAYER (js/manabi-pattern-family.js, his 2026-11-05 catch): on ③本文 the list opens INSIDE the
   right panel, in the card's own box (css/card-dock.css lists .pf-dock-layer on the goi-jump layer's box), above
   the grammar card — the 文 table in the middle is never touched. A form with its own card opens as a further
   layer. Tokens only, so both themes and 文字の大きさ follow. */
/* ⚠ the docked card itself sits at z-index 100 (goi-back-face.css `.domino` base) — a layer at 6 opened BEHIND
   it, invisible (seen on the iPad simulator, 2026-11-05). The dock's other layers (the goi-jump cards) use 1320. */
#sec-honbun .honbun-card-dock > .pf-dock-layer { z-index: 1320; }
/* ⇒ A SHEET IN THE PANEL (his second look, 2026-11-05): no ×; a handle; it rises SLOWLY from the panel's foot, only as
   tall as its forms; the grammar card beneath dims and softens; handle / swipe down / a tap on the shade / ← close it. */
.pf-dock-layer.is-forms { overflow: hidden; border-radius: 14px; }
.pfd-shade {
  position: absolute; inset: 0;
  background: rgba(8, 12, 22, 0.46);
  -webkit-backdrop-filter: blur(3px) saturate(0.8); backdrop-filter: blur(3px) saturate(0.8);
  transition: opacity 0.5s ease;
}
body[data-theme="light"] .pfd-shade { background: rgba(24, 36, 56, 0.24); }
.pfd-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 100%;
  display: flex; flex-direction: column;
  background: var(--canvas-elev); color: var(--text);
  border: 1px solid var(--rule); border-bottom: 0; border-radius: 18px 18px 14px 14px;
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.30);
  font-size: 15px;
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1);    /* slower than the 文 table's 0.42s, as asked */
  will-change: transform;
}
body[data-textsize="large"] .pfd-sheet { font-size: 17.5px; }
body[data-textsize="xl"] .pfd-sheet { font-size: 20px; }
.pf-dock-layer.is-entering .pfd-sheet, .pf-dock-layer.is-leaving .pfd-sheet { transform: translateY(calc(100% + 24px)); }
.pf-dock-layer.is-entering .pfd-shade, .pf-dock-layer.is-leaving .pfd-shade { opacity: 0; }
.pf-dock-layer.is-leaving { pointer-events: none; }
.pf-dock-layer.is-leaving .pfd-sheet { transition: transform 0.3s cubic-bezier(0.4, 0, 1, 1); }
.pf-dock-layer.is-leaving .pfd-shade { transition: opacity 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .pfd-sheet, .pfd-shade { transition: none !important; } }
.pfd-handle {
  flex: none; display: grid; place-items: center;
  width: 100%; height: 26px; margin: 0; padding: 0;
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pfd-grip { width: 42px; height: 5px; border-radius: 5px; background: var(--text-faint); }
.pfd-handle:active .pfd-grip { background: var(--text-soft); }
.pfd-title .mnb-pf-glyph { margin-right: 0.35em; }
.pfd-title { flex: none; padding: 0 16px 8px; font-family: var(--font-ui); font-size: 0.9em; font-weight: 600; color: var(--text-soft); line-height: 1.35; }
.pfd-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 12px 16px; }

/* the sheet's content */
.pf-lead { padding: 4px 2px 6px; }
.pf-title { font-family: var(--font-jp); font-size: 1.12em; font-weight: 600; color: var(--text); line-height: 1.4; }
.pf-sub { margin-top: 0.2em; font-family: var(--font-ui); font-size: 0.8em; color: var(--text-soft); line-height: 1.45; }
.pf-grp { margin-top: 14px; }
.pf-sec {
  margin: 0 2px 6px; font-family: var(--font-ui); font-size: 0.76em; font-weight: 500;
  letter-spacing: 0.04em; color: var(--text-soft);
}
.pf-sec-kan { font-family: var(--font-jp); margin-right: 0.45em; color: var(--brass); }
.pf-speech .pf-sec-kan { color: var(--hanada); }
body[data-theme="dark"] .pf-speech .pf-sec-kan { color: #86a9da; }
.pf-casual .pf-sec-kan { color: var(--vermilion, #c0573e); }

/* a row: the form, then one short line. Only rows with a card of their own are buttons. */
.pf-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  text-align: left; margin: 0 0 6px; padding: 0.55em 12px 0.6em 14px;
  background: var(--card-inset); border: 0; border-radius: 12px;
  color: var(--text); font: inherit;
}
.pf-row.is-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* .is-sel = the form whose card is open beside / above the list (the 文 table's deck-row mark) */
.pf-row.is-link:active, .pf-row.is-sel { background: rgba(255, 255, 255, 0.11); }
body[data-theme="light"] .pf-row.is-link:active, body[data-theme="light"] .pf-row.is-sel { background: rgba(43, 38, 32, 0.12); }
.pf-row.is-this { box-shadow: inset 3px 0 0 var(--brass); }
.pf-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pf-form { font-family: var(--font-jp); font-size: 1.08em; line-height: 1.45; color: var(--text); }
.pf-line { font-family: var(--font-ui); font-size: 0.78em; line-height: 1.4; color: var(--text-soft); }
.pf-this { color: var(--brass); }
.pf-mark { flex: none; color: var(--brass); font-family: var(--font-ui); }
.pf-go { color: var(--text-faint); font-size: 1.45em; line-height: 1; }

/* a minimal pair of this book that already teaches two of the forms — link, never re-explain */
.pf-pair {
  width: 100%; display: flex; align-items: center; gap: 10px;
  text-align: left; margin: 0 0 6px; padding: 0.6em 12px;
  background: none; border: 1px solid var(--rule); border-radius: 12px;
  color: var(--text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pf-pair:active { background: rgba(201, 164, 100, 0.12); }
.pf-pair-t { flex: 1 1 auto; font-family: var(--font-jp); font-size: 0.92em; line-height: 1.45; }
.pf-pair-why { flex: none; font-family: var(--font-jp); font-size: 0.82em; color: var(--brass); }
