@charset "UTF-8";
/* げんば 第1期 / css/sp.css  ── 画面の幅が 720px 以下のとき（スマホ）だけ効く
 * index.html で media="screen and (max-width:720px)" を付けて読む。印刷には効かない（print.css）。
 * 指で使う前提：押すところは高さ 44px 以上、ナビは親指の届く下、予定は日ごとの一覧、表は札に組み替える。
 */

:root{--hdr-h:60px}
body{font-size:17px;line-height:1.72}

/* ヘッダー：ロゴと「編集／閲覧」だけ */
.hdr{gap:10px;padding:8px 12px;border-bottom-width:2px}
.brand-logo{height:36px}
.brand-copy{padding-left:10px}
.brand-copy b{font-size:17px;letter-spacing:.08em}
.brand-copy small{display:none}
.hdr .who{gap:8px}
.hdr .who b{display:none}
.hdr .who .btn{min-height:38px;padding:5px 10px;font-size:13px}

/* ナビ：画面の下に固定 */
nav{
  position:fixed;right:0;bottom:0;left:0;z-index:50;
  justify-content:space-around;min-height:70px;
  padding:5px 4px calc(5px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(0,94,184,.18);box-shadow:0 -8px 28px rgba(0,46,104,.13);
}
nav button{min-width:0;min-height:60px;flex:1;flex-direction:column;gap:3px;padding:5px 1px;color:#6f7180;border-radius:10px;font-size:11px;line-height:1.15}
nav button i{width:29px;height:29px;font-size:12px}
nav button[aria-selected=true]::after{right:25%;bottom:0;left:25%}

main{padding:18px 12px calc(98px + env(safe-area-inset-bottom))}
h2{padding-left:15px;font-size:23px}
h2::before{width:5px}
.sub{margin-bottom:16px;padding-left:15px;font-size:14px}
.mockbar{margin-bottom:16px;padding:11px 12px 11px 44px}
.mockbar::before{top:12px;left:12px}
.mockwho{display:flex;margin:8px 0 0}
.mockwho select{flex:1}

/* 部品：指で押しやすく */
.bar{gap:9px;margin-bottom:14px;padding:11px;border-radius:14px}
.btn{min-height:50px;padding:10px 15px;font-size:15px}
.btn.sm{min-height:46px;padding:9px 12px;font-size:14px}
select,input{min-height:50px;padding:10px 34px 10px 12px;font-size:16px}   /* 16px 未満だと iPhone が勝手に拡大する */
input{padding-right:12px}
.legend{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px;margin:3px 0 0;padding-top:10px;border-top:1px solid var(--line)}
.pconly{display:none!important}

/* 予定表：カレンダーは出さず、日ごとの一覧にする */
.mnav{width:100%;justify-content:space-between}
.mnav button{width:54px;height:54px;font-size:27px}
.mnav .ym{min-width:0;flex:1;font-size:21px}
#mJump,#filt{min-width:0;flex:1 1 46%}
table.cal{display:none}
.agenda{display:block}
.aitem:active{background:#fff7e8}
body[data-tab="plan"]:not(.ro) .fab{display:inline-flex}
.fab{bottom:calc(84px + env(safe-area-inset-bottom))}
.fab:active{transform:scale(.97)}
.verbar{padding:11px 12px}
.closebar .cact,.closebar input,.closebar .btn{width:100%;flex:1 1 100%}
.verbar .vtx{flex-basis:100%}
.verbar .btn,.verbar input{width:100%;flex:1 1 100%}
.todo{padding:13px}
.todo .tip{display:block;margin:2px 0 0}
.chip{min-height:44px;padding:8px 13px;font-size:14px}

/* 入力シート：下からせり上がる。ボタンは下に貼りつける */
.sheet{align-items:flex-end;padding:0}
.sheet .box{max-height:94dvh;padding:24px 16px calc(20px + env(safe-area-inset-bottom));border:0;border-radius:22px 22px 0 0}
.fld{margin-bottom:14px}
.times{gap:8px}
.acts{position:sticky;bottom:-20px;gap:8px;margin:20px -16px -20px;padding:12px 16px calc(14px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--line);backdrop-filter:blur(10px)}
.acts .btn{height:58px;padding-inline:9px;font-size:16px}

.toast{bottom:calc(92px + env(safe-area-inset-bottom))}

/* 管理表：横に長い表なので、横にすべらせて見る（店の名前は左に止める） */
.tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:2px 1px 5px}
.tabs button{min-height:48px;padding:9px 14px;flex:none;font-size:14px;white-space:nowrap}
.filters>*{min-width:0;flex:1 1 46%}
.filters input[type=search]{flex:1 1 100%}
.filters .chk{flex:1 1 100%}
.filters .cnt{flex:1 1 100%;margin-left:0;text-align:right}
.scroll{-webkit-overflow-scrolling:touch;border-radius:14px}
.shint{display:block}
table.grid th,table.grid td{padding:10px}
table.grid td.mkcell{min-width:46px;height:46px}
table.grid td.cedit{min-width:64px;height:46px}
table.grid td.cedit:active{background:var(--navy-soft)!important}
.cprev{padding:9px 8px;font-size:13px}
.cprev th,.cprev td{padding:3px 4px}

/* ズレ確認・記録：表をやめて、1件ずつの札にする（見出しは data-l から出す） */
.panel.scroll:has(table.cards){overflow:visible;background:transparent;border:0;box-shadow:none}
table.grid.cards,table.grid.cards tbody,table.grid.cards tr,table.grid.cards td{display:block;width:100%}
table.grid.cards{background:transparent;white-space:normal}
table.grid.cards thead{display:none}
table.grid.cards tr{display:flex;flex-direction:column;margin-bottom:10px;padding:12px 14px;background:#fff!important;border:1px solid rgba(0,94,184,.14);border-radius:14px;box-shadow:var(--shadow-sm)}
table.grid.cards td{position:static;min-width:0;padding:3px 0;border:0;background:none!important;box-shadow:none;text-align:left}
table.grid.cards td[data-l]::before{content:attr(data-l);display:inline-block;min-width:4.6em;margin-right:8px;color:var(--muted);font-size:12px;font-weight:800}
table.grid.cards td.head{order:-1;margin-bottom:4px;font-size:16px;font-weight:800}
table.grid.cards td.why{margin-top:4px;padding-top:7px;border-top:1px dashed var(--line);font-size:14px}
table.grid.cards td.none{padding:22px 10px;text-align:center}
table.grid.cards td:empty{display:none}

/* とても狭いスマホ（iPhone SE など） */
@media (max-width:390px){
  .brand-copy b{font-size:15px}
  .hdr .who .wl{font-size:11px}
  nav button span{font-size:10px}
  .aitem .nm{font-size:15px}
  .acts .btn{font-size:15px}
}

/* ログインして右上に ボタンが2つ（パスワード・ログアウト）並ぶと、420px 以下では「げんば管理」の字が入らない。
   そのときはロゴだけにする（画面の名前はタイトルとタブで分かる） */
@media (max-width:420px){
  body:has(#who:not([hidden])) .brand-copy{display:none}
}
