/* スタッフの画面（常駐・雇用。外回りは field.css を足す）
   親指が届く下端に記録のボタンを固定し、上には「あいさつ・今日の日付・いまの時刻」と、今日の店舗の札を並べる */
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
.top { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.title-sec { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 2px max(16px, env(safe-area-inset-left, 0px)); }
.sub-title { font-weight: 700; font-size: 20px; }
/* ホームの上：あいさつと日付、右にいまの時刻 */
.clock-sec { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 2px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 2px; }
.greet { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.when { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.when > span { font-size: 13px; color: var(--muted); padding-bottom: 3px; }
.clock { display: flex; align-items: baseline; gap: 2px; font-weight: 700; line-height: 1; flex: none; }
.clock b { font-size: 34px; font-weight: 700; letter-spacing: .01em; }
.clock span { font-size: 15px; color: var(--muted); }
.clock span::before { content: ":"; }
.main { padding: 14px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.main.home { padding-top: 12px; padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px)); }
.main.page { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
/* 白い札に、項目と中身を1行ずつ */
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.rows .line { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); width: 100%; text-align: left; }
.rows .line:last-child { border-bottom: 0; }
.rows .line > span:first-child { color: var(--muted); flex: none; font-size: 14px; }
.rows .line strong { text-align: right; overflow-wrap: anywhere; }
.rows .line .locd { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.line-btn { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; font-weight: 700; margin-left: 10px; min-height: 32px; }
.keep-note { padding: 2px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
/* 見てほしいこと：白い札の左にピンクの目印（広い面はピンクにしない） */
.alarm { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: var(--r-card); padding: 12px 14px; display: grid; gap: 3px; font-size: 13px; }
.alarm b { font-size: 15px; }
.alarm span { color: var(--muted); }
.alarm.bad b { color: var(--mark-strong); }
/* 下に固定する記録のボタン */
.dock { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); background: rgba(246, 248, 249, .96); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); z-index: 10; }
.punch { border-radius: var(--r-card); min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; font-size: 21px; transition: transform .08s; position: relative; background: var(--ink); color: var(--on-ink); padding: 8px 12px; }
.punch small { font-weight: 400; font-size: 12px; opacity: .85; }
.punch:active:not(:disabled) { transform: scale(.98); }
.punch:disabled { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); cursor: default; font-size: 18px; }
.punch .spin + small { margin-top: 6px; }
/* 終わりのボタンは、始めと見分けられるよう、白地に黒の太い線 */
.punch.end { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.punch.end small { opacity: 1; color: var(--muted); }
/* 下のタブ：今いる画面だけピンク */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; background: var(--surface); box-shadow: 0 -1px 0 var(--line); display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); z-index: 11; }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); font-size: 11px; border-radius: 8px; position: relative; }
.tabs button[aria-current="page"] { color: var(--mark); font-weight: 700; }
.tabs.four { grid-template-columns: repeat(4, 1fr); }
.tabs.five { grid-template-columns: repeat(5, 1fr); }
.tabs.five button { font-size: 10px; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--mark); color: #FFFFFF; font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.page-title { font-weight: 700; font-size: 20px; }
.card { background: var(--surface); border-radius: var(--r-card); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; border: 1px solid var(--line); }
/* だれが見られるかの説明など（中立の灰色） */
.safe { background: var(--sunken); color: var(--muted); border-radius: 10px; padding: 11px 14px; font-size: 13px; }
.hist-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.hist-row:last-child { border-bottom: 0; }
.hist-row .r { text-align: right; display: grid; justify-items: end; gap: 2px; }
.hist-row .r .line-btn { margin-left: 0; }
.pick { width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); min-height: 52px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-weight: 700; background: var(--surface); }
.pick small { font-weight: 400; color: var(--muted); }
.pick small.blk { display: block; margin-top: 2px; }
.pick[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gps-points { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 14px; }
.kv { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 8px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.center-msg { padding: 40px 20px; display: grid; gap: 14px; text-align: center; justify-items: center; }
/* 履歴・アカウントの画面では、知らせを下のタブの上に出す */
.snack.low { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
/* ホームの「棚卸しが届いています」（まだのもの） */
.linkcard { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 14px; background: var(--surface); color: var(--ink); font-weight: 700; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: var(--r-card); }
.linkcard span { display: inline-flex; align-items: center; gap: 8px; }
.linkcard > .ic:last-child { color: var(--muted); }
/* 棚卸し */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.back-link svg { transform: rotate(180deg); }
.inv-item { gap: 10px; }
.inv-shot { display: grid; place-items: center; gap: 6px; min-height: 64px; background: var(--sunken); border-radius: 10px; padding: 8px; text-align: center; }
.inv-shot.has { padding: 0; background: none; }
.inv-shot img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--sunken); }
.inv-cam { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; text-align: center; gap: 8px; }
.stepper .btn { min-height: 48px; font-size: 22px; font-weight: 700; padding: 0; }
.stepper b { font-size: 26px; }
.inv-diff { color: var(--mark); font-weight: 700; }
.inv-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.inv-row:last-child { border-bottom: 0; }

/* 雇用の人の打刻（常駐・外回りで共通） */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px 14px; display: grid; gap: 10px; }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-head b { font-size: 16px; }
.pc-alarm { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; font-size: 13px; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; }
.pp { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.pp:last-child { border-bottom: 0; }
.pp span { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp.void b, .pp.void span { color: var(--muted); text-decoration: line-through; }
.pp.void small { text-decoration: none; }
.pp small { font-size: 11px; font-weight: 700; padding: 0 8px; border-radius: 999px; background: var(--sunken); color: var(--muted); }
.pc-undo { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--sunken); border-radius: 10px; padding: 8px 10px; }
.pc-undo .btn { flex: none; white-space: nowrap; }
.pc-btns { display: grid; gap: 8px; }
.pc-btns .pend { background: var(--surface); border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.month-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.month-nav b { font-size: 17px; }
.month-nav .btn { min-width: 44px; }
.fx-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.fx-row .r { display: grid; justify-items: end; gap: 2px; flex: none; align-content: start; }
.fx-row .r .line-btn { margin-left: 0; }
.fx-row.dim > div:first-child { color: var(--muted); }
.pday { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.pday:last-child { border-bottom: 0; }
.pday-h { display: flex; justify-content: space-between; gap: 8px; }
.pday-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pday-f .line-btn { margin-left: auto; }
.formrow2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.pf-next { padding-bottom: 10px; }
.pstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px; }
.pstats > div { background: var(--sunken); border-radius: 8px; padding: 6px 8px; }
.pstats small { display: block; color: var(--muted); font-size: 11px; }
.pstats b { font-size: 18px; }
.pstats em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 2px; }

/* 雇用の人の有給休暇（勤怠の画面の中） */
.lcard { display: grid; gap: 8px; }
.lc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lc-head > b { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.lc-head > b svg { color: var(--muted); }
.lc-bal { font-size: 14px; white-space: nowrap; }
.lc-bal b { font-size: 26px; color: var(--ink); margin: 0 2px; }
.lc-ob { background: var(--sunken); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.lc-ob.warn { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--mark); }
.lc-list { display: grid; }
.lc-more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.lc-more > div { padding: 2px 0; }

/* アルコールチェック（お願いされている人だけ）：目立ちすぎない形で、今日の店舗の札の下に出す */
.pre-card .pre-right { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pre-card .pre-body { display: grid; gap: 8px; padding: 4px 14px 12px; }
.pre-card .pre-body p { margin: 0; }
.pre-card .pre-cam { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.pre-card .pre-back { display: grid; gap: 2px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--mark); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.pre-card .pre-note { margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: 12px; }
/* 送ったあとは1行だけ（写真も出さない） */
.pre-card.pre-mini .line > span { color: var(--muted); font-size: 13px; }
.pre-card .pre-redo { margin-left: 0; cursor: pointer; display: inline-flex; align-items: center; }
