/* The parts the レジ and core's 勤怠 page share (2026-10-24 中村さん, 決まり 1〜4・7): the person window (who-window.js),
   the keypad and its box (keypad.js), the 額の塊 (amount-block.js, 2026-10-26), the search field (find.js), the word at
   the foot (toast.js) and a window holding the page behind it (dom.js holdPage). One source: this file is the レジ's (pos/cloudflare/public/register/) and is copied unchanged to
   core's 勤怠 page (core/cloudflare/public/pos/, core scripts/pos-parts.mjs); both packages' tests check the two are the
   same. Sizes are set here, never by the page: a key, the window and its parts are the same size on every screen. */

/* The room between two buttons side by side or one over the other, in every row of buttons of the レジ and core's 勤怠
   page (.even-boxes, a window's foot): never touching (ボタンどうしは、どの位置でも間を空ける。閉じる・× も同じ, 2026-11-03
   中村さん). The office's is 6px (core shell.css). */
:root { --button-gap: 8px; }

/* 窓の中のスクロールは窓の中だけ (決まり 3): while a window is in front the page behind it does not scroll or bounce, and a
   window's own list scrolls inside it only (never on into the page at its end). */
html[data-held], html[data-held] body { overflow: hidden; overscroll-behavior: none; }
.who .people-grid { overscroll-behavior: contain; }

/* The word at the screen's foot (toast.js, 決まり 6): over the page (nothing moves, nothing makes room), the レジ's and
   勤怠's the same. The iPad's screens only: a 管理画面 that links this file (the レジのアプリ's 売上, office.'s and staff.'s
   person window) keeps the shell's own word at the foot (shell.css .toast, after the frame .shell: its place above the
   phone's tabs), so every rule here is for a .toast not after a .shell (in :where: the rules weigh as before, one
   class, so a page's own toast rule such as pos.css dialog.confirm p still loses or wins as it did). */
.toast:where(:not(.shell ~ *)) { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; margin: 0; padding: 12px 20px;
  border-radius: 12px; background: #1d1d1f; color: #fff; font-size: 18px; line-height: 1.4; max-width: 80vw; pointer-events: none; }
.toast:where(:not(.shell ~ *))[hidden] { display: none; }
/* 勤怠 in the レジ's frame (core's page, html.embedded): at the top of the frame, not its foot (2026-11-06 夜: the frame's
   foot can be out of sight, and a reason said there was never seen). Over the page still, nothing moves. */
.embedded .toast:where(:not(.shell ~ *)) { top: 12px; bottom: auto; }
.toast:where(:not(.shell ~ *)).warn { background: #ef6c00; }
.toast:where(:not(.shell ~ *)).error { background: #c62828; }
/* Its words white on the 警告 and the 赤 too, the same size and room: a page's own .error (red letters, a pale box: app.css,
   pos.css) never wins over the word at the foot (two classes). */
.toast:where(:not(.shell ~ *)).warn, .toast:where(:not(.shell ~ *)).error { color: #fff; margin: 0; padding: 12px 20px; border-radius: 12px; font-size: 18px; line-height: 1.4; }

/* The keypad (決まり 7): every key the size of 精算's 暗証番号 keys, 1 2 3 on top; 000 only on an amount of money (the
   empty place of a count's or a 暗証番号's keeps the 0 and ⌫ where they are). Under them 「次へ」 (「閉じる」 with no box after)
   the keypad's width, every keypad (2026-11-05 中村さん).
   No scrolling or zoom from a finger on it (2026-11-03 review): a key is taken the moment the finger lands (keypad.js
   takeKeysAtTouch), so a finger on the keypad is a key, never the start of a scroll. */
.num-keys { display: grid; grid-template-columns: repeat(3, 84px); grid-auto-rows: 56px; gap: 8px; justify-content: start; align-content: start; touch-action: none; }
.num-keys .key { width: 100%; height: 56px; min-height: 56px; min-width: 0; margin: 0; padding: 0; font-size: 24px; font-variant-numeric: tabular-nums; }
.num-keys .key.next { grid-column: 1 / -1; font-size: 18px; }
.num-keys .key-gap { display: block; }

/* A box the keypad types into (keypad.js numBox, FEEDBACK 問 4): never a text field; the value right aligned, the 「×」 at its
   right end (empties it; its place kept while there is nothing), the box the keys type into marked by its edge only. */
.num-box { position: relative; display: flex; align-items: center; height: 48px; margin: 0; padding: 0 44px 0 12px; border: 1px solid #c7c7cc;
  border-radius: 10px; background: #fff; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; cursor: pointer; }
.num-box.on { border-color: #0a62d0; box-shadow: inset 0 0 0 2px #0a62d0; }
.num-box.off { color: #8e8e93; background: #f2f2f4; cursor: default; }
.num-box[data-over] { color: #c62828; border-color: #c62828; box-shadow: none; }
.num-value { flex: 1; min-width: 0; text-align: right; overflow: hidden; white-space: nowrap; }
.num-clear { position: absolute; top: 0; right: 0; bottom: 0; width: 44px; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 0 10px 10px 0; background: none; color: #8e8e93; font-size: 22px; line-height: 1; }
.num-clear::before { content: "×"; }
.num-clear.empty { visibility: hidden; }

/* 額の塊 (amount-block.js, FEEDBACK 問 5): the head, the box, the keypad and the button one under the other, every one the
   keypad's width (3 keys of 84 and 2 gaps of 8: 268), so their left and right edges are the same on every screen. */
.amount-block { display: grid; grid-template-columns: 268px; gap: 8px; justify-content: start; align-content: start; }
.amount-block > * { width: 100%; min-width: 0; margin: 0; }
.amount-block .amount-head { font-weight: 600; font-size: 15px; line-height: 1.4; min-height: 1.4em; font-variant-numeric: tabular-nums; }

/* The person window (決まり 1; FEEDBACK 問 2): one size whatever it shows (the list, the search, the keypad, a refusal).
   The name of the action on one line (room on its right for the window's 閉じる), the refusal's line kept; on the left
   「名前で探す」 (or the search field in its place) and the people in rows of one size scrolling inside (today's, a line,
   the store's own), on the right the keypad always (the number before a pick, the 暗証番号 after it). */
.who { display: flex; flex-direction: column; gap: 8px; height: 500px; }
.who .who-title { flex: none; height: 44px; margin: -6px 5.5em 0 0; font-size: 22px; line-height: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .who-error { flex: none; height: 1.4em; margin: 0; padding: 0; border-radius: 0; background: none; color: #c62828; line-height: 1.4;
  font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .who-error.quiet { visibility: hidden; }
/* The レジのアプリ's 訂正 (admin who-pick.js) only: its place kept while empty, though office.'s shell.css .error:empty is none. */
.who-pick .who .who-error.quiet { display: block; }
.who-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
/* 「名前で探す」 (or the search field, or 管理画面's number and 「名前で探す」) in a band of its own with a line under it, as
   the 席's タグで探す: the people scroll in the box under that line and are cut at it, 8px under it at the top (2026-11-05
   中村さん: the list seemed to slide up under the search). The band and the line are there before and after the press, so
   nothing moves when it is pressed. */
.who-left { min-height: 0; display: flex; flex-direction: column; gap: 0; }
.who-find-slot { flex: none; box-sizing: content-box; height: 52px; padding: 0 0 8px; border-bottom: 1px solid #d1d1d6; }
.who .who-find, .who .who-search { width: 100%; max-width: none; height: 52px; min-height: 52px; margin: 0; font-size: 18px; }
.who .people-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; align-content: start; gap: 8px;
  min-height: 0; padding: 8px 0 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.who .who-line { grid-column: 1 / -1; height: 0; margin: 2px 0; border-top: 2px solid #c7c7cc; }
.who .person { min-width: 0; height: 60px; min-height: 60px; margin: 0; padding: 2px 8px; overflow: hidden; line-height: 1.2; font-size: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.who .person-name { max-width: 100%; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.who .person-store { max-width: 100%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .person.on { background: #0a62d0; border-color: #0a62d0; color: #fff; }
/* Who is picked (or 「番号」) and the box on rows of their own height, then the keypad, the keypad's width. */
.who-pin { width: 268px; display: grid; grid-template-rows: 24px 48px auto; gap: 8px; align-content: start; }
.who .pin-who { align-self: center; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .pin-dots { text-align: center; font-size: 26px; letter-spacing: 8px; }
/* A 管理画面's window (typed, 数の打ち方): no keypad; the number's field (the device's keyboard) and 「名前で探す」 side by side
   on top of the people, the same height as the search that takes their place. */
.who.typed .who-body { grid-template-columns: minmax(0, 1fr); }
.who-typed-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; height: 52px; }
.who .who-number-field { width: 100%; max-width: none; height: 52px; min-height: 52px; margin: 0; padding: 0 12px; font-size: 18px;
  font-variant-numeric: tabular-nums; }
/* A PC (who-window.js whoOnPc, 2026-11-06 中村さん): one field on top, the candidates in one column, no keypad before a pick
   (after it, in a store with 暗証番号, the keypad on the right as on an iPad). The one marked (↑↓, Enter's) in a light blue. */
.who.pc .who-body { grid-template-columns: minmax(0, 1fr); }
.who.pc.picked .who-body { grid-template-columns: minmax(0, 1fr) auto; }
.who.pc .people-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.who.pc .person { height: 44px; min-height: 44px; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 0 14px;
  font-variant-numeric: tabular-nums; }
.who.pc .person-name { -webkit-line-clamp: 1; }
.who.pc .person:hover:not(:disabled):not(.on) { background: #eef3fb; }
.who.pc .person.active:not(.on) { background: #e3edfb; border-color: #0a62d0; box-shadow: inset 0 0 0 1px #0a62d0; }
.who .who-hint { flex: none; height: 1.4em; margin: 4px 0 0; color: #6e6e73; font-size: 13px; line-height: 1.4; }
/* A phone: the people above, the keypad under them (the window as tall as it needs, within the screen). */
/* The people keep 2 rows at least (128 px) over the keypad of 5 rows (2026-11-05 「次へ」): the window at least 682 px, so a
   phone lower than that scrolls the window's place (the レジ's .sheet-body, 勤怠's dialog.opener), never the people away. */
@media (max-width: 599px) {
  .who { height: max(682px, min(720px, calc(100dvh - 120px))); }
  .who-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(128px, 1fr) auto; }
  .who-pin { justify-self: center; }
}
