:root{--ink:#172321;--muted:#64716e;--brand:#087563;--brand-dark:#075b4e;--paper:#f2f6f4;--card:#fff;--line:#d9e3df;--danger:#b83535;--warning:#9a6412;--radius:16px;--shadow:0 12px 30px rgba(19,58,49,.08)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Yu Gothic",Meiryo,sans-serif}.app-header{position:relative;z-index:20;display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);padding:14px max(18px,calc((100vw - 1180px)/2));backdrop-filter:blur(10px)}.app-header p,.eyebrow{color:var(--brand);font-size:11px;font-weight:900;letter-spacing:.12em;margin:0}.app-header h1{font-size:21px;margin:2px 0}.header-actions,.editor-actions,.inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}main{max-width:1180px;margin:auto;padding:28px 20px 60px}h2{margin:0 0 16px}h3{margin:0 0 12px}p{line-height:1.65}.muted{color:var(--muted);font-size:13px}.welcome,.editor-head,.panel,.shop-card,.product-card,.category-card,.table-card,.order-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.welcome,.editor-head{display:flex;align-items:center;justify-content:space-between;padding:22px;margin-bottom:24px}.welcome h2,.editor-head h2{margin:4px 0}.shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}.shop-card{padding:20px}.shop-card h3{font-size:18px}.shop-card button{width:100%}.status-line{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.badge{display:inline-flex;align-items:center;border-radius:999px;background:#e8efec;color:#43544f;padding:5px 9px;font-size:12px;font-weight:800}.badge.on{background:#dff5ec;color:#08634f}.badge.off{background:#f4e8e8;color:#9b3535}button,.button-link{appearance:none;border:1px solid transparent;border-radius:10px;background:#e1ebe7;color:#084e42;padding:11px 15px;font:inherit;font-size:14px;font-weight:900;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}button:hover,.button-link:hover{filter:brightness(.97)}button:disabled{opacity:.55;cursor:not-allowed}.primary{background:var(--brand);color:#fff}.primary:hover{background:var(--brand-dark)}.ghost{background:#fff;border:1px solid var(--line);color:var(--ink)}.danger{background:#fff0f0;color:var(--danger)}.editor-head{position:relative}.tabs{display:flex;gap:8px;overflow:auto;padding:4px 0 14px;scrollbar-width:thin}.tabs button{white-space:nowrap;background:transparent;color:var(--muted)}.tabs button.active{background:var(--ink);color:#fff}.tab-panel{display:grid;gap:18px}.panel{padding:22px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}.panel-head button{flex-shrink:0}.settings-grid,.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.channel-card{border:1px solid var(--line);border-radius:14px;padding:18px;background:#fbfdfc}.channel-card.master{grid-column:1/-1;border-color:#9ccbc0;background:#eff9f6}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.switch{position:relative;width:48px;height:28px;flex:none}.switch input{opacity:0;width:0;height:0}.switch span{position:absolute;inset:0;background:#bdc8c4;border-radius:999px;transition:.2s}.switch span:after{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 2px 5px #0002;transition:.2s}.switch input:checked+span{background:var(--brand)}.switch input:checked+span:after{transform:translateX(20px)}label{display:grid;gap:7px;color:#40504c;font-size:13px;font-weight:800}input,select,textarea{width:100%;border:1px solid #cbd8d3;border-radius:9px;background:#fff;color:var(--ink);padding:10px 11px;font:inherit;font-size:15px}textarea{resize:vertical}.field-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.category-list,.product-list,.table-grid,.order-list{display:grid;gap:14px}.category-card,.product-card,.table-card,.order-card{padding:17px;box-shadow:none}.product-card{display:grid;grid-template-columns:110px 1fr;gap:18px}.product-image{width:110px;height:110px;border-radius:12px;object-fit:cover;background:#eaf0ed}.product-fields{display:grid;gap:13px}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mode-box{background:#f5f8f7;border-radius:10px;padding:12px}.hours{display:grid;gap:10px}.hours-row{display:grid;grid-template-columns:110px 1fr auto;gap:12px;align-items:start;padding:12px 0;border-bottom:1px solid var(--line)}.hours-ranges{display:grid;gap:8px}.time-range{display:grid;grid-template-columns:1fr auto 1fr auto;gap:8px;align-items:center}.special-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px;align-items:end;margin-top:10px}.table-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.table-card img{width:180px;max-width:100%;display:block;margin:10px auto;background:#fff}.order-card{display:grid;grid-template-columns:1fr auto;gap:16px}.order-card strong{font-size:16px}.order-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:12px}.message{background:#fff3df;color:#7c5316;border:1px solid #eed39d;padding:13px;border-radius:10px;margin-bottom:16px}.toast{position:fixed;right:20px;bottom:20px;max-width:min(420px,calc(100vw - 40px));background:#172321;color:#fff;border-radius:12px;padding:13px 17px;box-shadow:0 15px 35px #0004;opacity:0;transform:translateY(8px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:none}[hidden]{display:none!important}@media(max-width:760px){main{padding:18px 14px 90px}.app-header{padding:12px 14px}.app-header h1{font-size:18px}.welcome,.editor-head{align-items:flex-start;flex-direction:column;padding:17px}.editor-actions{width:100%;align-items:stretch}.editor-actions>*{flex:1 1 auto;white-space:nowrap;min-height:44px}input,select,textarea{font-size:16px}.settings-grid,.form-grid,.field-row,.mode-grid{grid-template-columns:1fr}.product-card{grid-template-columns:1fr}.product-image{width:100%;height:180px}.hours-row{grid-template-columns:1fr}.order-card{grid-template-columns:1fr}}
.billing-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px;padding:16px 18px;border:1px solid #f1b7a5;border-radius:14px;background:#fff4ef;color:#742b15}.billing-banner p{margin:5px 0 0}.billing-banner a{white-space:nowrap;font-weight:700}.billing-card-note{margin:10px 0;color:#8a3b22}.billing-restricted #tab-dashboard :is(input,select,textarea,button),.billing-restricted #tab-information :is(input,select,textarea,button),.billing-restricted #tab-catalog :is(input,select,textarea,button),.billing-restricted #tab-schedule :is(input,select,textarea,button),.billing-restricted #tab-tables :is([data-table-action],#create-table,#new-table-label,#new-table-menu-channel,#default-menu-channel,[data-table-menu-channel]),.billing-restricted #tab-staff :is(input,select,textarea,button){pointer-events:none;opacity:.58}
.contract-menu{position:relative}.contract-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;padding:11px 15px;font:inherit;font-size:14px;font-weight:900;background:#fff;border:1px solid var(--line);color:var(--ink);white-space:nowrap}.contract-menu>summary::-webkit-details-marker{display:none}.contract-menu>summary::after{content:"▾";margin-left:6px;font-size:11px;color:var(--muted)}.contract-menu[open]>summary::after{content:"▴"}.contract-menu>summary:hover{filter:brightness(.97)}.contract-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:min(320px,calc(100vw - 28px));display:grid;gap:10px;padding:16px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.contract-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.contract-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900;background:#e8efec;color:#43544f}.contract-status.good{background:#dff5ec;color:#08634f}.contract-status.warn{background:#fff3df;color:#7c5316}.contract-status.stop{background:#f4e8e8;color:#9b3535}.contract-facts{display:grid;gap:8px;margin:0}.contract-facts>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.contract-facts dt{color:var(--muted);font-size:12px;font-weight:800;white-space:nowrap}.contract-facts dd{margin:0;font-size:13px;font-weight:900;text-align:right}.contract-note{margin:0;padding:10px 12px;border-radius:10px;background:#fff3df;color:#7c5316;font-size:12px;line-height:1.55}.contract-panel .button-link{width:100%}.contract-help{margin:0;color:var(--muted);font-size:11px;line-height:1.55}@media(max-width:760px){.contract-menu{position:static}.contract-panel{left:14px;right:14px;width:auto}}
.table-card>.button-link{width:100%;margin-bottom:10px}.table-group{display:grid;gap:12px}.table-group+.table-group{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}.table-group-head h4{margin:0 0 4px;font-size:15px}.table-group-head p{margin:0}
/* ===== iPad/iPhone Safari 対策：チェックボックスの初期化 =====
   1行目の input,select,textarea{width:100%;padding:10px 11px} が
   input[type=checkbox] にも当たっている。チェックの箱が親幅いっぱいに広がり、
   隣のラベル文字が枠外へ押し出される。
   ★ width:auto では直らない。label{display:grid} の子になったチェックは
     justify-self:stretch でトラック幅まで伸びる。実寸を明示すること。
   ★ padding:0 は必須。box-sizing:border-box なので padding 22px が残ると
     width:16px が効かず 24px になる。
   ★ margin は打ち消さない。<span><input> 月曜日</span> のようにインラインで
     並ぶ箇所は、UA既定の margin だけが文字との間隔になっている。
   ★ border/background/border-radius も打ち消さない。今の見た目を変えないため。 */
input[type="checkbox"],input[type="radio"]{width:16px;height:16px;min-width:0;padding:0;flex:0 0 auto}
/* 上のリセットは .switch input（詳細度 0,1,1）と同点で、後に書いたこちらが勝ってしまう。
   受付ON/OFFのトグルは 0×0 の透明な当たり判定でなければ壊れるので (0,2,1) で取り返す。 */
.switch input[type="checkbox"]{width:0;height:0;opacity:0}

/* ===== ヘッダーのロゴ =====
   ポチっとGETのワードマークの右に、縦線で区切って画面名を置きます（2026-09-21 ユーザー指示）。
   ロゴを置くのは店舗側の画面だけで、お客様の注文画面（/shop/）には置きません。
   img の width/height 属性で縦横比を先に確保しているので、読み込みの前後でヘッダーの高さは変わりません。 */
/* ヘッダー（店舗管理の帯）は上に貼り付けません（2026-10-14、ユーザー指示「スクロールで上に流れるように」）。
   1行目の .app-header は position:relative で、z-index は鈴の吹き出し・契約情報・ハンバーガーの中身を左メニューより上に出すために残しています。
   ★検証環境の帯（bootstrap.php の environment_banner_html()。position:sticky; top:0）は貼り付いたままです（本番と取り違えないための目印）。
     左メニューと全画面の浮かせたボタンは、その帯の下から始めます（admin.js の bindSideNav() が --environment-banner-height を入れる）。 */
.app-brand{display:flex;align-items:center;gap:14px;min-width:0}
.app-logo{display:block;flex:none;width:132px;height:auto}
.app-title{min-width:0;padding-left:14px;border-left:1px solid var(--line)}
@media(max-width:760px){.app-brand{gap:12px}.app-logo{width:112px}.app-title{padding-left:12px}}
@media(max-width:400px){.app-logo{width:96px}}

/* ===== 狭い画面のヘッダー（ハンバーガー） =====
   「店舗一覧」「契約情報」「ログアウト」の3つは iPhone の幅では1行に収まらず、
   .header-actions は flex-wrap なので折り返し、ヘッダーが2段になります。
   以前はここで「店舗一覧」ボタンを display:none で消していましたが、
   店舗を切り替える導線はそのボタンしかなく、スマホからは別の店舗へ移れませんでした。
   消すのではなく、ハンバーガーの中へ畳みます。
   ★ ブレークポイントは他の規則と違い 560px です。3つ並べても 560px あれば1行に収まり、
     iPad（768px）やウィンドウを少し狭めただけの画面まで畳むと、かえって遠くなるためです。 */
.header-menu{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.header-menu-toggle{display:none;width:44px;height:44px;padding:0;flex:none}
.header-menu-bars,.header-menu-bars::before,.header-menu-bars::after{display:block;width:18px;height:2px;border-radius:2px;background:currentColor}
.header-menu-bars{position:relative}
.header-menu-bars::before,.header-menu-bars::after{content:"";position:absolute;left:0}
.header-menu-bars::before{top:-6px}
.header-menu-bars::after{top:6px}
@media(max-width:560px){
.header-actions{position:relative}
.header-menu-toggle{display:inline-flex}
.header-menu{position:absolute;right:0;top:calc(100% + 10px);z-index:30;display:none;width:min(260px,calc(100vw - 28px));padding:12px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.header-actions.open .header-menu{display:grid;gap:8px}
.header-menu>button,.header-menu>.contract-menu,.header-menu>.contract-menu>summary{width:100%}
/* ハンバーガーの中では、契約情報は吹き出しにせずその場で開きます。
   入れ子の position:absolute は親（.header-menu）の高さを基準に top を取るので、
   ボタンから離れた位置へ飛びます。 */
.header-menu .contract-panel{position:static;width:auto;padding:12px 0 0;border:0;border-radius:0;background:transparent;box-shadow:none}
}
.table-order-summary{display:grid;gap:4px;margin:10px 0 12px;padding:12px;border-radius:10px;background:#f5f8f7}.table-order-summary-label{font-size:12px;font-weight:800;color:#40504c}.table-order-summary strong{font-size:17px;color:var(--brand-dark)}.table-order-summary .muted{font-size:12px}
/* 集計ブロックは明細画面への入口（ボタン）です。押せることが分かるよう縁と矢印を出します。 */
button.table-order-summary{width:100%;text-align:left;border:1px solid #cfdcd7;cursor:pointer;font:inherit;color:var(--ink)}button.table-order-summary:hover{border-color:var(--brand);background:#eef8f5}.table-order-summary-link{font-size:13px;font-weight:800;color:var(--brand-dark)}
.table-orders-panel .panel-head h3{margin-top:8px}.table-orders-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0 18px}.table-orders-summary div{background:#f5f8f7;border-radius:10px;padding:12px}.table-orders-summary span{display:block;font-size:12px;font-weight:800;color:#40504c}.table-orders-summary strong{font-size:20px;color:var(--brand-dark)}.table-order-card.is-unpaid{border-color:#e0b46a;background:#fffaf0}.table-order-payment{font-weight:800;color:var(--brand-dark)}.table-order-payment.is-unpaid{color:#a5641c}.table-orders-empty{padding:18px 0}.table-settle-box{margin-top:20px;padding:18px;border:1px solid #9ccbc0;border-radius:14px;background:#eff9f6;display:grid;gap:10px}.table-settle-box>strong{font-size:16px;color:#084e42}.table-settle-box p{margin:0}.table-settle-total{font-size:22px;color:var(--brand-dark)}.table-settle-box .primary{justify-self:start;padding:12px 26px}
.square-review-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px;padding:16px 18px;border:1px solid #9ccbc0;border-radius:14px;background:#eff9f6;color:#084e42}.square-review-banner p{margin:5px 0 0}.square-review-banner button{white-space:nowrap}
/* 新しい注文のお知らせ音（032）。ONなのに音が止まっているときだけ、どのタブでも見える位置に出す帯。 */
.order-sound-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin-bottom:18px;padding:14px 18px;border:1px solid #e3c27a;border-radius:14px;background:#fff8e6;color:#6b4a0c}.order-sound-bar p{margin:0;font-weight:700}.order-sound-bar button{white-space:nowrap}
/* お客様からの呼び出し（2026-10-21、ユーザー指示。index.php の #table-call-bar、admin.js の renderTableCallBar()）。
   どのタブでも #editor のいちばん上に出し、スクロールしても上に貼り付きます（検証環境の帯の下。全画面では浮かせたボタンの下）。
   呼び出しは赤、お客様からの会計の依頼は琥珀（テーブル管理のカードの .seat-call・ハンディの .handy-alert と同じ色）。
   z-index はハンバーガーの中身（30）・全画面の左メニュー（42）と浮かせたボタン（43）より下、ページの中身より上です。
   帯の中身は縮めて折り返し、ボタンは縮めません（スマホの幅でボタンが外へ出ないように）。 */
.table-call-bar{position:sticky;top:var(--environment-banner-height,0px);z-index:20;margin-bottom:18px;padding:6px;border-radius:14px;background:var(--card);box-shadow:var(--shadow)}
body.is-app-fullscreen .table-call-bar{top:calc(var(--environment-banner-height,0px) + 60px)}
.table-call-bar-list{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.table-call-bar-item{display:flex;flex:1 1 300px;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 10px;min-width:0;padding:6px 10px;border:1px solid #f3b4ab;border-radius:10px;background:#fde3df;color:#7a1f14;font-weight:800}
.table-call-bar-item.is-bill{border-color:#f0c26a;background:#fff1d6;color:#6b4400}
.table-call-bar-what{display:flex;flex:1 1 9em;flex-wrap:wrap;align-items:baseline;gap:2px 10px;min-width:0;overflow-wrap:anywhere}
.table-call-bar-what strong{font-size:17px}
.table-call-bar-what small{font-size:13px;font-weight:700}
.table-call-bar-item button{flex:none;min-height:44px;padding:0 16px;border:1px solid currentColor;border-radius:8px;background:#fff;color:inherit;font-weight:900;white-space:nowrap}
.table-call-bar-more-item{display:flex;flex:0 0 auto;align-items:center}
.table-call-bar-more{min-height:44px}
/* お知らせの鈴（2026-10-12、ユーザー指示。index.php の #publication-notice）。「持ち場」の横に置き、
   「保存していない変更」「公開していない変更」があるあいだは点を付けます（未保存は消えてしまう変更なので赤）。
   押すと吹き出し（.publication-bar）を鈴の下に開きます。以前の「ヘッダーの下に固定の帯」はやめました。
   z-index はハンバーガーの中身（.header-menu。30）と同じ。ヘッダーの中なので、左メニュー(15)・もとに戻す(18)より上に出ます。 */
.publication-notice{position:relative;flex:none}
.publication-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0}
.publication-bell svg{width:20px;height:20px}
.publication-bell-dot{position:absolute;top:7px;right:8px;width:10px;height:10px;border-radius:50%;background:var(--warning);box-shadow:0 0 0 2px var(--card)}
.publication-bell.is-unsaved .publication-bell-dot{background:var(--danger)}
.publication-bar{position:absolute;right:0;top:calc(100% + 10px);z-index:30;display:grid;gap:12px;width:min(380px,calc(100vw - 28px));padding:14px 16px;border:1px solid #e3c27a;border-radius:14px;background:#fff8e6;color:#6b4a0c;box-shadow:0 12px 30px rgba(19,58,49,.18);text-align:left;white-space:normal}.publication-bar.is-unsaved{border-color:#f1b7a5;background:#fff4ef;color:#742b15}.publication-bar.is-clear{border-color:var(--line);background:var(--card);color:var(--ink)}.publication-bar-text{min-width:0}.publication-bar-text strong{display:block;font-size:15px}.publication-bar-text p{margin:3px 0 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.publication-bar-help{opacity:.85}.publication-bar-actions{display:flex;gap:8px}.publication-bar-actions button{flex:1 1 0;min-width:0;white-space:nowrap}#publish.has-pending{box-shadow:0 0 0 3px #e3c27a}
/* 560px以下はハンバーガー（.header-actions が position:relative）の右端が基準になるので、画面の幅いっぱいまで広げます。 */
@media(max-width:560px){.publication-notice{position:static}.publication-bar{width:calc(100vw - 28px);padding:12px}}

/* ===== スマホの幅で、中身がページを横に広げないようにする（2026-10-13、ユーザー指示） =====
   iPhone で「上の帯（検証環境の帯＋ヘッダー）と下の中身がずれる」と報告がありました。ヘッダーは画面の幅のままなのに、
   中身のパネルが画面より広くなり、ページごと横に伸びていたためです（まとめて登録で約710px、キッチンで約500px）。
   ★原因は .tab-panel（1列の grid）の列の幅が auto だったことです。auto の列は中身のいちばん広い要素の幅まで広がるので、
     表（.ba-table の min-width:640px）や折り返さないボタンが1つあるだけで、パネルが画面からはみ出しました。
     列を minmax(0,1fr) にして、パネルは画面の幅に収め、広い中身はそれぞれの箱の中（.ba-table-wrap・.resv-scroll・
     .subtabs-row）で横に送ります。商品タブの中の .subtab-panel も同じです（admin-catalog.css）。
   ★見出し（.panel-head。題名と説明文の右にボタン）は、560px以下（ハンバーガーと同じ境目）で縦に積みます
     （ユーザー指示「メニュー区分などは携帯で横に並べるには厳しいので縦に」）。説明文が1行を使い、ボタン・バッジはその下の行に並びます。
     横に並べたままだと、ボタンに場所を取られて説明文が1行5〜6文字の細い列になりました。
   ★ボタンの組（.inline-actions）は縮めません。縮めると、ホールの「ハンディ」がカードの枠から飛び出しました。
   ShopAdminMobileLayoutTest が固定しています。 */
.tab-panel{grid-template-columns:minmax(0,1fr)}
.panel-head>.inline-actions{flex-shrink:0}
@media(max-width:560px){
.panel-head{flex-wrap:wrap}
.panel-head>div:first-child{flex:1 1 100%;min-width:0}
/* 契約の帯・Squareの審査の帯も「文章＋右にボタン」なので、同じく縦に積みます。 */
.billing-banner,.square-review-banner{flex-direction:column;align-items:flex-start;gap:10px}
}

/* ===== 管理項目のメニュー（左固定・アイコン付き） =====
   幅761px以上では画面の左端に固定します（WordPressの管理画面と同じ形。2026-09-18 ユーザー指示）。
   760px以下はいままでどおり横スクロールのタブバーで、ラベルの左に小さなアイコンが付くだけです。
   ★ボタンの色・角丸・余白・太さ、選択中の濃い色（var(--ink)）の白抜きは、上の .tabs の規則のまま使います。
     ここで変えるのは「並ぶ向き」と「置き場所」だけです。
   ★固定の規則はすべて body.has-side-nav の下に書きます。admin.js が店舗を開いたときに付けるクラスで、
     付いていなければ（JSが途中で止まった等）横並びのタブバーに戻るので、中身の上にメニューが重なりません。
   ★開いた／閉じたは body.side-nav-collapsed（admin.js の bindSideNav()）。
     記憶が無ければ 1100px 以下は閉じた帯、それより広ければ項目名つきで始まります。 */
.tab-icon{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabs button{gap:7px}
.side-nav-toggle{display:none}
/* インフォメーションタブの未対応件数（2026-09-18 ユーザー指示）。LINEの未読と同じ、数字だけの赤い丸です。
   ★0件のときは要素ごと hidden で消します（admin.js の renderInformationBadge()）。
     「0」を出すと、済んでいるのに何かが残っているように見えます。
   ★色は既存の --danger。新しい色を足すと、他の警告表示と重さの差が分からなくなります。 */
.tab-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 6px;border-radius:999px;background:var(--danger);color:#fff;font-size:11px;font-weight:900;line-height:1;flex:none}
/* 商品のサブ項目（カテゴリー／メニュー／オプション。2026-09-18 ユーザー指示）。
   ★760px以下では出しません。そちらは商品画面の中の切替バー（admin-catalog.css の .subtabs）が担当です。
     出すのは下の @media(min-width:761px) かつ body.has-side-nav の中だけ。
   ★開いた／閉じた（アコーディオン）は #catalog-nav の hidden 属性で、admin.js の openTab() が付け外しします。
     [hidden]{display:none!important} が下の display:grid に勝つので、CSS側に閉じた状態の指定は要りません。 */
.side-nav-sub,.side-nav-caret{display:none}
@media(min-width:761px){
body.has-side-nav{--side-nav-width:220px}
body.has-side-nav.side-nav-collapsed{--side-nav-width:64px}
/* 残りの幅の中で、いままでと同じ 1180px の中央寄せにします。 */
body.has-side-nav main{margin-left:max(var(--side-nav-width),calc((100vw + var(--side-nav-width) - 1180px)/2));margin-right:auto}
/* ロゴ（ポチっとGET｜店舗管理）はメニューの真上、右のボタンは中身の右端に揃えます。 */
body.has-side-nav .app-header{padding-left:18px;padding-right:max(18px,calc((100vw - var(--side-nav-width) - 1180px)/2))}
/* top はヘッダーの下端（admin.js が --app-header-bottom に入れる。検証環境の帯の分も含む）。
   z-index はヘッダー（20）と契約情報の吹き出し（30）より下です。 */
body.has-side-nav .side-nav{position:fixed;left:0;top:var(--app-header-bottom,81px);bottom:0;z-index:15;width:var(--side-nav-width);display:flex;flex-direction:column;gap:12px;padding:14px 12px;background:rgba(255,255,255,.96);border-right:1px solid var(--line);overflow-y:auto}
body.has-side-nav .tabs{flex-direction:column;gap:4px;overflow:visible;padding:0}
body.has-side-nav .tabs button,body.has-side-nav .side-nav-toggle{position:relative;width:100%;justify-content:flex-start;gap:10px}
body.has-side-nav .tab-icon{width:18px;height:18px}
body.has-side-nav .side-nav-toggle{display:inline-flex;margin-top:auto;background:transparent;color:var(--muted);font-size:13px;white-space:nowrap}
body.has-side-nav .side-nav-toggle:hover{color:var(--ink)}
/* 閉じた帯（アイコンだけ）。項目名は読み上げのために残し、見た目だけ隠します。 */
body.has-side-nav.side-nav-collapsed .side-nav{padding:14px 8px;overflow:visible}
body.has-side-nav.side-nav-collapsed .tabs button,body.has-side-nav.side-nav-collapsed .side-nav-toggle{justify-content:center;min-height:44px;padding:11px 0}
body.has-side-nav.side-nav-collapsed .side-nav-toggle-icon{transform:scaleX(-1)}
body.has-side-nav.side-nav-collapsed .tab-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* マウスを乗せる・キーボードで移ると、項目名を右側に吹き出しで出します。 */
body.has-side-nav.side-nav-collapsed :is(.tabs button,.side-nav-toggle):is(:hover,:focus-visible) .tab-label{left:calc(100% + 10px);top:50%;transform:translateY(-50%);width:auto;height:auto;overflow:visible;clip-path:none;padding:7px 11px;border-radius:10px;background:var(--ink);color:#fff;font-size:13px;box-shadow:var(--shadow);pointer-events:none}
/* 未対応件数は、項目名つきのメニューでも閉じた帯でも、アイコンの右上に重ねます
   （閉じた帯では項目名が消えるので、数字だけは見えている必要があります）。
   ★行の中（項目名の右）には並べません。「インフォメーション」（9文字）＋数字は 220px のメニューに入りきらず、
     数字が約17pxはみ出して、左メニューの下に横スクロールバーが出ていました（2026-09-20 実測、2026-09-21 修正）。
     商品のサブ項目が開いて縦スクロールバーが出ると、項目名の右には約12pxしか残りません。
     行の右端・右上のどこへ置いても最後の文字に重なり、項目名を「…」で切ると何のタブか読めなくなります。
   ★position:absolute を外さないこと（flex の並びへ戻すと、行の幅に数字が足されて、また はみ出します）。
   ★右端を項目名の手前（41px＝ボタンの左余白15＋アイコン18＋すき間10−2）に固定し、桁が増えたら左（アイコンの上）へ伸ばします。
     left で固定すると、2桁になったときに項目名の1文字目へ重なります。 */
body.has-side-nav .tabs button .tab-badge{position:absolute;top:5px;right:calc(100% - 41px)}
body.has-side-nav.side-nav-collapsed .tabs button .tab-badge{right:8px}
/* 商品のサブ項目。上位の項目より一段浅い見た目（小さい文字・アイコン、左を1段深く）にして、
   「商品」の下にぶら下がっていることを見せます。選択中の濃い色の白抜きは .tabs button.active のままです。 */
body.has-side-nav .side-nav-sub{display:grid;gap:2px;margin:2px 0 2px 6px;padding-left:8px;border-left:1px solid var(--line);animation:side-nav-sub-open .18s ease}
body.has-side-nav .side-nav-sub button{font-size:13px;padding:9px 8px;gap:8px}
/* 「カテゴリーに入れる」のような長い項目名は、はみ出させずに折り返します（はみ出すと左メニューが横にスクロールします）。 */
body.has-side-nav:not(.side-nav-collapsed) .side-nav-sub .tab-label{white-space:normal;text-align:left;line-height:1.35}
body.has-side-nav .side-nav-sub .tab-icon{width:16px;height:16px}
/* サブ項目の見出し（つくる／ひもづける。2026-09-20）。button にしません。押せるものに見せないためと、
   ShopAdminSideNavUiTest がメニューのボタンの個数を数えているためです。 */
body.has-side-nav .side-nav-group{margin:8px 0 2px;padding:0 12px;color:var(--muted);font-size:11px;font-weight:900;letter-spacing:.06em}
body.has-side-nav .side-nav-group:first-child{margin-top:2px}
/* 開閉の合図。開いているあいだは下向きにします。 */
body.has-side-nav .side-nav-caret{display:block;width:14px;height:14px;margin-left:auto;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease}
body.has-side-nav .tabs button[aria-expanded="true"] .side-nav-caret{transform:rotate(90deg)}
@keyframes side-nav-sub-open{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){
body.has-side-nav .side-nav-sub{animation:none}
body.has-side-nav .side-nav-caret{transition:none}
}
/* 畳んだ帯（アイコンだけ）。サブ項目も44pxの行にして、項目名は上の .tab-label の規則に乗せます
   （マウス・キーボードで右に吹き出す）。畳んだ帯でも3画面へ行けるようにするためです（2026-09-18 ユーザー選択）。 */
body.has-side-nav.side-nav-collapsed .side-nav-sub{margin:2px 0;padding-left:0;border-left:0}
body.has-side-nav.side-nav-collapsed .side-nav-sub button{padding:9px 0;min-height:38px}
/* 畳んだ帯では見出しの文字が入らないので、区切りの線だけを残します。 */
body.has-side-nav.side-nav-collapsed .side-nav-group{height:1px;margin:6px 10px;padding:0;overflow:hidden;background:var(--line);font-size:0}
body.has-side-nav.side-nav-collapsed .side-nav-caret{display:none}
}

/* ===== 全画面（2026-10-14、ユーザー指示） =====
   帯（ヘッダー）の「全画面」（index.php の #app-fullscreen-open）で、どの画面でも全画面にできます。admin.js の renderAppFullscreen() が
   body.is-app-fullscreen を付け外しします（店舗を開いているあいだだけ。タブを移っても続く）。
   - 帯と左メニューを隠し、左上に「メニュー」（#fullscreen-menu-toggle）、右上に「全画面をやめる」（#fullscreen-exit）を浮かせます。
     上の60pxは、浮かせたボタンが中身に重ならないよう main の余白で空けます（キッチン・予約管理の詰めた配置も同じ。admin-orders.css・admin-reservations.css）。
   - 左メニューは「引き出し」になります。ふだんは画面の左の外に隠し、body.is-fullscreen-menu-open のときだけ左から出します。
     外を押して閉じられるよう、後ろに幕（#fullscreen-scrim）を敷きます。幕＜引き出し＜浮かせたボタンの順に重ねます
     （左上の「メニュー」は引き出しの上に残り、開いているあいだは閉じるボタンになります）。
   - 760px以下（ふだんは横スクロールのタブバー）でも、引き出しの中は縦に並べ、商品のサブ項目も出します。
   - 検証環境の帯（上に貼り付いたまま）の下から始めます（--environment-banner-height。admin.js の bindSideNav()）。
   ★引き出しでは項目名つき（開いた形）で出します。閉じた帯の記憶は、admin.js の bindSideNav() が全画面のあいだだけ外します。
   ★ここの規則は、左メニューの規則（上の @media(min-width:761px) の body.has-side-nav …）と同じ詳細度で、後に書いて勝たせています。 */
body.is-app-fullscreen .app-header{display:none}
body.is-app-fullscreen main{padding-top:60px}
body.has-side-nav.is-app-fullscreen main{margin-left:auto;margin-right:auto}
/* 幅いっぱいのボード（admin-boards.css の body.has-side-nav.is-board-wide main は左メニューの幅だけ空ける）も、左を空けません。 */
body.has-side-nav.is-board-wide.is-app-fullscreen main{margin-left:0;margin-right:0}
body.is-app-fullscreen .side-nav{position:fixed;left:0;top:var(--environment-banner-height,0px);bottom:0;z-index:42;width:min(260px,85vw);display:flex;flex-direction:column;gap:12px;padding:64px 12px 14px;background:var(--card);border-right:1px solid var(--line);box-shadow:var(--shadow);overflow-y:auto;transform:translateX(-100%);visibility:hidden;transition:transform .2s ease,visibility 0s linear .2s}
body.is-app-fullscreen.is-fullscreen-menu-open .side-nav{transform:none;visibility:visible;transition:transform .2s ease}
body.is-app-fullscreen .tabs{flex-direction:column;gap:4px;overflow:visible;padding:0}
body.is-app-fullscreen .tabs button{position:relative;width:100%;justify-content:flex-start;gap:10px}
body.is-app-fullscreen .side-nav-toggle{display:none}
.fullscreen-float{position:fixed;top:calc(var(--environment-banner-height,0px) + 8px);z-index:43;min-height:44px;padding:9px 14px;gap:8px;box-shadow:var(--shadow);white-space:nowrap}
.fullscreen-menu-toggle{left:10px}
.fullscreen-exit{right:10px}
.fullscreen-scrim{position:fixed;inset:0;z-index:41;background:rgba(23,35,33,.38)}
@media(max-width:760px){
body.is-app-fullscreen .side-nav-sub{display:grid;gap:2px;margin:2px 0 2px 10px;padding-left:10px;border-left:1px solid var(--line)}
body.is-app-fullscreen .side-nav-sub button{font-size:13px;padding:9px 12px}
body.is-app-fullscreen .side-nav-sub .tab-label{white-space:normal;text-align:left;line-height:1.35}
body.is-app-fullscreen .side-nav-group{margin:8px 0 2px;padding:0 12px;color:var(--muted);font-size:11px;font-weight:900;letter-spacing:.06em}
}
@media(prefers-reduced-motion:reduce){
body.is-app-fullscreen .side-nav,body.is-app-fullscreen.is-fullscreen-menu-open .side-nav{transition:none}
}

/* ===== 画面の幅ごとの崩れ（2026-10-15、ユーザー指示「PC・iPad・iPhoneで画面崩れが無いか」） =====
   1行目の規則のうち、次の4つはこの日に変えました（1行目は詰めて書いてあるので、理由はここに書きます）。
   ・button,.button-link の枠を border:0 から 1px の透明な枠にしました。.ghost（白地に1pxの枠）だけ箱が2px大きく、
     同じ行の「下書きプレビュー」と「公開する」、「複製」と「削除」などで高さがそろっていませんでした。
   ・.panel-head button の小さい指定（余白7px・13px）をやめました。「注文を追加」「商品を追加」だけ35pxで、ほかのボタン（44px）と違っていました。
   ・760px以下の .editor-actions>* を flex:1 から「文字の幅で伸ばし、折り返さない」にしました。flex:1 は3つを必ず1行に詰めるので、
     「下書きプレビュー」「下書き保存」が2行に折れて 68／67px、「公開する」だけ44pxになっていました。入らないボタンは次の行の全幅になります。
   ・760px以下は入力欄・プルダウンを16pxにしました。16px未満だと iPhone の Safari がタップしたときに画面を拡大し、
     拡大したまま戻らないので、画面が横にはみ出したように見えます。ほかのファイルで小さくしている欄も、それぞれのファイルで16pxにしています。 */

/* iPad縦（561〜900px）のヘッダーは、ロゴと題名の行と、ボタンの行の2段にします。
   1段のまま折り返すと、ボタン（持ち場・全画面・店舗一覧・契約情報・夜の配色・ログアウト・お知らせ）が3段に分かれ、
   題名が縮められて「店舗／管理」と2行に折れていました（768px で高さ181px）。560px以下はハンバーガーです（上の @media(max-width:560px)）。 */
@media(min-width:561px) and (max-width:900px){
.app-header{flex-wrap:wrap;row-gap:10px}
.app-brand{flex:none}
.app-title h1{white-space:nowrap}
.header-actions{flex:1 1 100%;justify-content:flex-end}
}

/* チェックと文字を横に並べます。label の既定（display:grid）のままだと、チェックが文字の上の行に出ていました。 */
.product-quick,.product-course,.inline-actions>label{display:flex;align-items:center;gap:7px}

/* スマホで縦に積んだボタンの幅をそろえます。文字の幅のままだと「名前を変更」と「担当者から外す」、
   「お客様向け画面」と「会計済みにする」のように、上下で幅が違って見えていました。
   1つが半分の幅より広いときは、そのボタンだけで1行を使い、残りは同じ幅に並びます。
   ★見出しの横のボタン（.panel-head>.inline-actions）は対象にしません。そちらは縮めない作りです（上の flex-shrink:0）。 */
@media(max-width:560px){
.inline-actions:not(.panel-head>.inline-actions)>:is(button,.button-link,label),.order-page-link>:is(button,.button-link),.staff-card-actions>*,.order-status-filter-actions>*{flex:1 1 auto;min-width:calc(50% - 4px)}
}

/* ポップアップ（<dialog> の showModal()）を開いているあいだは、後ろのページをスクロールさせません（2026-10-16、ユーザー指示
   「スマホでハンディにすると、下にスクロールしたときにポップアップとは別に下の画面もスクロールでき、半分だけ動く」）。
   ブラウザは、ポップアップの中のスクロールが端まで行くと（中がスクロールしないときは最初から）、続きを後ろのページへ渡します。
   PC では後ろのページが動いても position:fixed の小窓は1ミリも動かず、画面いっぱいの小窓が後ろを隠すので気づきません。
   iPhone（Safari・ホーム画面のアプリ）は、そのとき小窓も指に引きずられてずれるので、画面いっぱいのハンディ（#hall-handy）や
   お客様向け画面（#checkout-display）の下からホールの画面が見え、会計（#settle-dialog）などの小窓も後ろと一緒に動いていました。
   ・止めるのはページ（html）だけです。body に overflow を付けると、検証環境の帯（sticky）の基準が body に変わって帯が消えます。
   ・scrollbar-gutter: stable は、PC でスクロールバーが消えて後ろの中身が横にずれないためです。
   ・小窓の中のスクロールは端で止め、後ろへ渡しません（overscroll-behavior: contain）。
   ・全画面のときに左上から引き出す左メニュー（body.is-fullscreen-menu-open）も、ページの上に重ねて出すので同じに止めます。
   ・お客様の注文画面のシートは、もとから body.sheet-open で止めています（shop/demo/assets/site.css）。 */
html:has(dialog:modal),html:has(body.is-fullscreen-menu-open){overflow:hidden;overscroll-behavior:none;scrollbar-gutter:stable}
dialog:modal{overscroll-behavior:contain}

/* 画面を下に引っぱって更新（2026-10-16、ユーザー指示。pull-to-refresh.js）。いちばん上で指を下へ引くと、上から丸い札が下りてきます。
   「下に引くと更新」→ 札が --pull-distance まで下りて「離すと更新」→ 離すと「更新しています…」で読み直します。
   ★ 色は変数だけで取ります（夜の配色は admin-dark.css が変数を切り替える）。札は指を受けません（pointer-events:none）。 */
.pull-refresh{position:fixed;left:50%;top:6px;z-index:70;display:flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);box-shadow:var(--shadow);font-size:13px;font-weight:900;white-space:nowrap;pointer-events:none;opacity:0;transform:translate(-50%,calc(var(--pull-distance,0px) - 100% - 12px));transition:opacity .15s ease,transform .2s ease}
.pull-refresh.is-pulling{opacity:1;transition:opacity .15s ease}
.pull-refresh.is-refreshing{opacity:1}
.pull-refresh-icon{width:18px;height:18px;flex:none;color:var(--brand);transform:rotate(var(--pull-turn,0deg))}
.pull-refresh.is-ready .pull-refresh-label{color:var(--brand)}
.pull-refresh.is-refreshing .pull-refresh-icon{animation:pull-refresh-spin .8s linear infinite}
@keyframes pull-refresh-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.pull-refresh{transition:none}.pull-refresh.is-refreshing .pull-refresh-icon{animation:none}}
