@import url("https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&display=swap");

:root{
  --paper:#f5f4f0; --surface:#ffffff; --surface-2:#faf9f6;
  --ink:#1c1c1a; --ink-soft:#5f5e58; --ink-faint:#8f8e87;
  --line:#ded9cf; --line-soft:#ece8df;
  --ai:#23496e; --ai-deep:#17324c; --ai-tint:#e8eef4;
  --kaki:#c65a2c; --kaki-tint:#f7e7dd;
  --ok:#2f7a4d; --ok-tint:#e5f0e8;
  --gold:#e2ac2f;
  --shadow:0 1px 2px rgba(28,28,26,.06), 0 4px 16px rgba(28,28,26,.05);
  --radius:12px;
}
:root[data-theme="dark"]{
  --paper:#15171a; --surface:#1e2126; --surface-2:#22262c;
  --ink:#ececea; --ink-soft:#adaca6; --ink-faint:#7c7b76;
  --line:#343941; --line-soft:#2a2e34;
  --ai:#7aacd9; --ai-deep:#9cc2e6; --ai-tint:#20303f;
  --kaki:#e08a5c; --kaki-tint:#3a2820;
  --ok:#63b483; --ok-tint:#1f2f26;
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.28);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#15171a; --surface:#1e2126; --surface-2:#22262c;
    --ink:#ececea; --ink-soft:#adaca6; --ink-faint:#7c7b76;
    --line:#343941; --line-soft:#2a2e34;
    --ai:#7aacd9; --ai-deep:#9cc2e6; --ai-tint:#20303f;
    --kaki:#e08a5c; --kaki-tint:#3a2820;
    --ok:#63b483; --ok-tint:#1f2f26;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.28);
  }
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--paper);color:var(--ink);font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;padding-bottom:88px}
h1,h2,h3{margin:0}
button{font-family:inherit;cursor:pointer}
select,input{font-family:inherit;font-size:15px}

.topbar{position:sticky;top:0;z-index:40;background:var(--ai-deep);color:#fff;border-bottom:3px solid var(--kaki)}
.topbar .row{max-width:1180px;margin:0 auto;padding:11px 18px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.brand{display:flex;align-items:baseline;gap:9px}
.brand .name{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:900;font-size:20px}
.brand .sub{font-size:12.5px;color:#c9d7e6;font-weight:500}
.spacer{flex:1}
.ctrl{display:flex;align-items:center;gap:6px;color:#dbe4ee;font-size:12.5px}
.ctrl select{background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.28);border-radius:8px;padding:6px 10px;font-weight:500}
.ctrl select option{color:#1c1c1a}
.theme-btn{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);color:#fff;border-radius:8px;width:34px;height:34px;font-size:15px;display:grid;place-items:center}

.tabwrap{border-bottom:1px solid var(--line);background:var(--surface);position:sticky;top:53px;z-index:30}
.tabs{max-width:1180px;margin:0 auto;padding:0 18px;display:flex;gap:2px;overflow-x:auto}
.tab{background:transparent;border:none;padding:13px 18px 11px;font-size:15px;font-weight:700;color:var(--ink-soft);border-bottom:3px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tab.active{color:var(--ai);border-bottom-color:var(--kaki)}
.tab:hover{color:var(--ink)}
.modes{max-width:1180px;margin:0 auto;padding:9px 18px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.modebtns{display:flex;gap:8px;flex-wrap:wrap}
.modectrls{margin-left:auto;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.modes .field{display:flex;flex-direction:row;align-items:center;gap:6px}
.modes .field label{font-size:12px;color:var(--ink-soft);font-weight:700}
.modes .field select,.modes .field input{padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500}
.modes .field input[type=date]{min-width:148px}
.mode{background:var(--surface-2);border:1px solid var(--line);border-radius:11px;padding:11px 18px;font-size:15px;font-weight:700;color:var(--ink-soft);cursor:pointer}
.mode:hover{border-color:var(--ai)}
.mode.active{background:var(--ai);border-color:var(--ai);color:#fff}
.admintabs{border-top:1px solid var(--line-soft)}

.wrap{max-width:1180px;margin:0 auto;padding:20px 18px 40px}
.panel{display:none}
.panel.active{display:block}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.card-h{padding:14px 18px;border-bottom:1px solid var(--line-soft);display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.card-h h2{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:17px;font-weight:700}
.card-b{padding:16px 18px}

.whobar{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px;margin-bottom:16px}
.field{display:flex;flex-direction:column;gap:5px}
.field label{font-size:12px;color:var(--ink-soft);font-weight:700}
.field .req{color:var(--kaki)}
.field select,.field input{background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:10px 12px;color:var(--ink)}
.field input[type=date]{min-width:168px}
#empSel{min-width:240px;font-weight:700;font-size:16px}
#empSel.err{border-color:var(--kaki);background:var(--kaki-tint)}
.whohint{font-size:12px;color:var(--ink-faint);flex-basis:100%;margin-top:-2px}

.sec{margin:22px 0 10px;display:flex;align-items:center;gap:10px}
.sec h3{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:16px;color:var(--ai)}
.sec .rule{flex:1;height:1px;background:var(--line)}
.menu-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
@media(max-width:640px){.menu-grid{gap:10px}}
.mcard{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow);transition:border-color .12s;cursor:pointer}
.mcard.on{border-color:var(--ai);box-shadow:0 0 0 2px var(--ai-tint),var(--shadow)}
.mcard .photo{aspect-ratio:4/3;background:var(--surface-2);position:relative}
.mcard .photo img{width:100%;height:100%;object-fit:cover;display:block}
.mcard .noimg{width:100%;height:100%;display:grid;place-items:center;background:linear-gradient(135deg,var(--ai-tint),var(--surface-2));color:var(--ai);font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:900;font-size:22px}
.mcard .qbadge{position:absolute;top:8px;right:8px;background:var(--kaki);color:#fff;font-weight:900;min-width:26px;height:26px;border-radius:13px;display:none;place-items:center;font-size:14px;padding:0 6px}
.mcard.on .qbadge{display:grid}
.mcard .body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:8px;flex:1}
.mcard .nm{font-weight:700;font-size:15px;line-height:1.3}
.mcard .pr{color:var(--ink-soft);font-size:13px;font-weight:700}
.mcard .grow{flex:1}
.stepper{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;align-self:stretch}
.stepper button{flex:0 0 42px;height:40px;border:none;background:var(--surface-2);color:var(--ai);font-size:20px;font-weight:900;display:grid;place-items:center}
.stepper button:hover{background:var(--ai-tint)}
.stepper .n{flex:1;text-align:center;font-weight:900;font-size:16px;font-variant-numeric:tabular-nums;color:var(--ink)}
.stepper.zero .minus{color:var(--ink-faint)}
.mcard.drink .photo{aspect-ratio:16/9}

.cartbar{position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--ai-deep);color:#fff;border-top:3px solid var(--kaki);box-shadow:0 -4px 20px rgba(0,0,0,.15)}
.cartbar .in{max-width:1180px;margin:0 auto;padding:12px 18px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.cartbar .who{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:700}
.cartbar .who .em{color:var(--gold)}
.cartbar .tot{display:flex;align-items:baseline;gap:6px}
.cartbar .tot b{font-size:24px;font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif}
.cartbar .tot span{font-size:12.5px;color:#c9d7e6}
.cartbar .list{font-size:12.5px;color:#c9d7e6;flex:1;min-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:9px;padding:10px 16px;font-weight:700;font-size:14px}
.btn:hover{background:var(--surface-2)}
.btn.primary{background:var(--ai);border-color:var(--ai);color:#fff}
.btn.ghost{background:transparent}
.btn.kaki{background:var(--kaki);border:1px solid var(--kaki);color:#fff}
.btn.kaki:hover{filter:brightness(.96)}
.btn:disabled{opacity:.4;cursor:not-allowed}
.cartbar .btn.light{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25);color:#fff}

.legend{display:flex;gap:9px 15px;flex-wrap:wrap;font-size:12.5px;color:var(--ink-soft);margin-bottom:12px}
.legend b{color:var(--ink)}
.legend .lg{display:inline-flex;gap:5px;align-items:center}
.legend code{background:var(--ai-tint);color:var(--ai-deep);border-radius:5px;padding:1px 6px;font-weight:700;font-size:12px}
:root[data-theme="dark"] .legend code{color:var(--ai)}
.sheetscroll{overflow:auto;max-height:calc(100vh - 215px);border:1px solid var(--line);border-radius:10px}
table.sheet{border-collapse:collapse;width:100%;font-size:13px;background:var(--surface)}
table.sheet th,table.sheet td{border:1px solid var(--line);padding:5px 4px;text-align:center;white-space:nowrap}
table.sheet thead th{position:sticky;top:0;background:var(--ai-deep);color:#fff;font-weight:700;z-index:2;font-size:12.5px}
table.sheet thead th.corner{left:0;z-index:3}
table.sheet .datecol{position:sticky;left:0;background:var(--surface-2);font-weight:700;z-index:1;min-width:62px;color:var(--ink)}
table.sheet .datecol .dow{font-size:10.5px;color:var(--ink-faint);margin-left:3px;font-weight:500}
table.sheet td.cell{min-width:44px;cursor:default;font-weight:900;color:var(--ai-deep);font-size:16px}
table.sheet td.cell.on{background:var(--ai-tint)}
table.sheet td.cell:hover{background:transparent}
table.sheet td.cell.on:hover{background:var(--ai-tint)}
table.sheet tfoot td.yenrow{background:var(--ai-deep);color:#fff;font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif}
:root[data-theme="dark"] table.sheet td.cell{color:var(--ai)}
table.sheet td.cell .dk{display:block;font-size:10px;color:var(--kaki);font-weight:700;margin-top:1px}
table.sheet td.cell:hover{background:var(--ai-tint)}
table.sheet td.cell.empty{color:var(--line);cursor:default}
table.sheet tr.rest .datecol{background:#f0e6e6;color:#a24a4a}
:root[data-theme="dark"] table.sheet tr.rest .datecol{background:#2e2222;color:#d09a9a}
table.sheet td.rowtot{background:var(--surface-2);font-weight:700;color:var(--ai);font-variant-numeric:tabular-nums}
table.sheet tfoot td{background:var(--ai-tint);font-weight:700;color:var(--ai-deep);font-variant-numeric:tabular-nums}
:root[data-theme="dark"] table.sheet tfoot td{color:var(--ai)}
table.sheet tfoot td.grand{background:var(--kaki);color:#fff}

.payroll{width:100%;border-collapse:collapse;font-size:14px}
.payroll th{text-align:left;font-size:12px;color:var(--ink-soft);padding:9px 12px;border-bottom:1px solid var(--line)}
.payroll td{padding:9px 12px;border-bottom:1px solid var(--line-soft)}
.payroll td.n,.payroll th.n{text-align:right;font-variant-numeric:tabular-nums}
.payroll .nm{font-weight:700}
.payroll tr:hover td{background:var(--surface-2)}
.payroll tfoot td{font-weight:900;color:var(--ai);border-top:2px solid var(--line);border-bottom:none;background:var(--surface-2)}
.grid2{display:grid;grid-template-columns:1.4fr 1fr;gap:16px;margin-top:16px}
@media(max-width:820px){.grid2{grid-template-columns:1fr}}
.brk{width:100%;border-collapse:collapse;font-size:13.5px}
.brk th,.brk td{padding:7px 10px;border-bottom:1px solid var(--line-soft);text-align:left}
.brk td.n,.brk th.n{text-align:right;font-variant-numeric:tabular-nums}
.brk .catrow td{background:var(--surface-2);font-weight:700;font-size:12px;color:var(--ink-soft)}
.money{background:var(--ai-deep);color:#fff;border-radius:12px;padding:18px;display:flex;flex-direction:column;justify-content:center;gap:6px}
.money .lbl{font-size:13px;color:#c9d7e6}
.money .amt{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:30px;font-weight:900}
.money .sub2{font-size:12.5px;color:#a9bccf}

table.menuedit{width:100%;border-collapse:collapse;font-size:14px}
table.menuedit th{text-align:left;font-size:12px;color:var(--ink-soft);padding:8px 10px;border-bottom:1px solid var(--line)}
table.menuedit td{padding:8px 10px;border-bottom:1px solid var(--line-soft)}
table.menuedit .catrow td{background:var(--surface-2);font-weight:700;color:var(--ink-soft);font-size:12.5px}
table.menuedit input.price{width:90px;text-align:right;border:1px solid var(--line);border-radius:7px;padding:6px 8px;background:var(--surface);color:var(--ink)}
table.menuedit input.code{width:56px;text-align:center;border:1px solid var(--line);border-radius:7px;padding:6px 8px;background:var(--surface);color:var(--ink)}
.btn.small{padding:6px 11px;font-size:12.5px}
.toggle{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--ink-soft)}
.paused{opacity:.5}
.hint{font-size:12.5px;color:var(--ink-faint)}
.foot-note{margin-top:22px;font-size:12.5px;color:var(--ink-faint);line-height:1.7}
.foot-note code{background:var(--surface-2);padding:1px 6px;border-radius:5px;border:1px solid var(--line-soft);font-size:12px}
.chip{font-size:12px;font-weight:700;padding:5px 11px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line)}
.chip.rest{background:#f0e0e0;border-color:#c98b8b;color:#a24a4a}
:root[data-theme="dark"] .chip.rest{background:#3a2626;border-color:#7a4a4a;color:#e0a0a0}

.toast{position:fixed;left:50%;bottom:100px;transform:translateX(-50%) translateY(12px);background:var(--ok);color:#fff;padding:12px 22px;border-radius:999px;font-weight:700;box-shadow:0 6px 24px rgba(0,0,0,.2);opacity:0;pointer-events:none;transition:.25s;z-index:60}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

.namepick{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:12px 14px;margin-bottom:10px}
.namepick.err{border-color:var(--kaki);box-shadow:0 0 0 2px var(--kaki-tint),var(--shadow)}
.pick-label{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:700;font-size:16px;color:var(--ai);margin-bottom:10px}
.ebtn-grid{display:flex;flex-wrap:wrap;gap:6px}
.ebtn{font-size:14.5px;font-weight:700;padding:8px 13px;border:2px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);min-height:40px;cursor:pointer}
.ebtn:hover{border-color:var(--ai)}
.ebtn.on{background:var(--ai);border-color:var(--ai);color:#fff}
.ordergrid{display:grid;grid-template-columns:minmax(0,0.95fr) minmax(0,1.05fr);gap:18px;align-items:start}
@media(max-width:860px){.ordergrid{grid-template-columns:1fr}}
.menuposter{position:sticky;top:118px}
.menuposter img{width:100%;border-radius:14px;border:1px solid var(--line);box-shadow:var(--shadow);display:block}
@media(max-width:860px){.menuposter{position:static}}
.isec{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:700;color:var(--ai);margin:16px 0 8px;font-size:15px}
.ibtn-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(max-width:420px){.ibtn-grid{grid-template-columns:1fr}}
.ibtn{position:relative;text-align:left;background:var(--surface);border:2px solid var(--line);border-radius:10px;padding:8px 12px;display:flex;flex-direction:row;align-items:center;gap:10px;min-height:44px;cursor:pointer;color:var(--ink)}
.ibtn:hover{border-color:var(--ai)}
.ibtn.on{border-color:var(--ai);background:var(--ai-tint)}
.ibtn .inm{flex:1;font-weight:700;font-size:15px;line-height:1.25}
.ibtn.on .inm::before{content:"✓ ";color:var(--kaki);font-weight:900}
.ibtn .ipr{font-size:13.5px;color:var(--ink-soft);font-weight:700;white-space:nowrap}
.ibtn.on .ipr{color:var(--ai)}
.ibtn .iqty{display:inline-flex;align-items:center;border:1px solid var(--ai);border-radius:8px;overflow:hidden}
.ibtn .iqty span[data-act]{width:32px;height:30px;display:grid;place-items:center;background:var(--surface);color:var(--ai);font-size:17px;font-weight:900}
.ibtn .iqty b{min-width:28px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
.mcard .qty{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-top:2px}
.mcard .qty button{flex:0 0 40px;height:38px;border:none;background:var(--surface-2);color:var(--ai);font-size:20px;font-weight:900}
.mcard .qty button:hover{background:var(--ai-tint)}
.mcard .qty span{flex:1;text-align:center;font-weight:900;font-variant-numeric:tabular-nums}
.doneOverlay{position:fixed;inset:0;z-index:70;background:rgba(23,50,76,.5);display:none;place-items:center;padding:24px}
.doneOverlay.show{display:grid}
.doneCard{background:var(--surface);border-radius:20px;padding:34px 40px;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.3);max-width:440px}
.doneCard .ic{font-size:56px;line-height:1}
.doneCard .msg{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:900;font-size:24px;color:var(--ai);margin:10px 0 4px}
.doneCard .sub{font-size:18px;color:var(--ink-soft);font-weight:700}
#rosterRows input{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:var(--surface);color:var(--ink);font-size:15px}
#rosterRows .rcode{width:96px;text-align:center;font-weight:700}
#rosterRows .rname{width:230px}
.btn.del{color:#a24a4a;border-color:#d9b3b3}
.btn.del:hover{background:#f7ecec}
:root[data-theme="dark"] .btn.del{color:#e0a0a0;border-color:#6a4a4a}
:root[data-theme="dark"] .btn.del:hover{background:#3a2626}
.kitbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.kitbar input[type=date]{border:1px solid var(--line);border-radius:9px;padding:9px 12px;background:var(--surface);color:var(--ink);font-size:16px;font-weight:700}
.kithead{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:900;font-size:22px;color:var(--ink);display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin-bottom:4px}
.kithead .kbig{color:var(--kaki);font-size:30px}
.kititems{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
.kitem{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px;box-shadow:var(--shadow)}
.kitem .kimg{width:64px;height:64px;border-radius:10px;overflow:hidden;flex:0 0 64px;background:var(--surface-2);display:grid;place-items:center;font-size:26px;font-weight:900;color:var(--ai)}
.kitem .kimg img{width:100%;height:100%;object-fit:cover}
.kitem .knm{font-weight:700;font-size:15px;line-height:1.3}
.kitem .kct{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-weight:900;font-size:26px;color:var(--ai)}
.facgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.faccard{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:var(--shadow)}
.faccard .facname{font-weight:900;font-size:16px;display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px}
.faccard .facname span{color:var(--kaki);font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:18px}
.faccard .facitems{font-size:13.5px;color:var(--ink-soft);line-height:1.75}

@media print{
  .topbar,.tabwrap,.cartbar,.no-print,.foot-note,.legend{display:none!important}
  body{background:#fff;padding:0}
  .wrap{padding:0;max-width:none}
  .card{box-shadow:none;border:none}
  table.sheet thead th{position:static}
  table.sheet thead th,table.sheet tfoot td,table.sheet td.rowtot,.money,.payroll tfoot td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ===== 管理：PDF風 注文履歴表 ===== */
#panel-sheet{max-width:1120px;margin:0 auto}
.sheet-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:0 2px}
.sheet-actions h2{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:19px;color:var(--ink)}
.sheet-actions .hint{margin:2px 0 0}
.history-paper{background:#fff;color:#1d1d1b;border:1px solid #cfcfc9;border-radius:8px;box-shadow:0 5px 22px rgba(28,28,26,.08);padding:22px 22px 18px;overflow:hidden}
.paper-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:16px;margin-bottom:10px;color:#1d1d1b}
.paper-shop{display:flex;flex-direction:column;line-height:1.15}
.paper-shop .paper-kicker{font-size:11px;font-weight:700;letter-spacing:.08em;color:#666}
.paper-shop .paper-sub{font-size:10px;color:#666;margin-top:3px}
.paper-title{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:22px;font-weight:900;letter-spacing:.12em;text-align:center;white-space:nowrap}
.paper-meta{grid-column:3;grid-row:1;display:flex;flex-direction:column;align-items:flex-end;line-height:1.25;min-width:150px}
.paper-meta b{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:20px}
.paper-meta span{font-size:11.5px;color:#555;margin-top:3px;text-align:right}
.history-paper .legend{border-top:2px solid #222;border-bottom:1px solid #777;margin:0;padding:7px 4px 8px;gap:5px 12px;font-size:10.5px;color:#333;line-height:1.45}
.history-paper .legend b{color:#111}
.history-paper .legend code{background:transparent;color:#111;border:1px solid #999;border-radius:2px;padding:0 3px;font-size:10px}
.history-paper .sheetscroll{overflow:auto;max-height:calc(100vh - 300px);border:0;border-radius:0;background:#fff;scrollbar-gutter:stable}
.history-paper table.sheet{border-collapse:collapse;width:max-content;min-width:100%;font-size:11px;background:#fff;color:#111;table-layout:fixed}
.history-paper table.sheet th,.history-paper table.sheet td{border:1px solid #777;padding:2px 3px;height:28px;text-align:center;white-space:normal;line-height:1.1}
.history-paper table.sheet thead th{position:sticky;top:0;background:#f3f3ef;color:#111;font-weight:800;z-index:2;font-size:10.5px;border-top:1.5px solid #333;border-bottom:1.5px solid #333}
.history-paper table.sheet thead th.corner{left:0;z-index:4}
.history-paper table.sheet .datecol{position:sticky;left:0;background:#fafaf7;color:#111;font-weight:800;z-index:1;width:58px;min-width:58px}
.history-paper table.sheet .datecol .dow{font-size:9px;color:#666;margin-left:3px;font-weight:600}
.history-paper table.sheet th.empcol,.history-paper table.sheet td.cell{width:68px;min-width:68px;max-width:68px}
.history-paper table.sheet th.empcol{height:54px;vertical-align:middle;word-break:keep-all;overflow-wrap:normal}
.history-paper table.sheet .totalcol,.history-paper table.sheet td.rowtot{width:46px;min-width:46px;background:#f7f7f4;font-weight:800}
.history-paper table.sheet td.cell{font-size:12px;font-weight:800;color:#111;background:#fff;vertical-align:middle}
.history-paper table.sheet td.cell.on{background:#fff}
.history-paper table.sheet td.cell .main{display:block}
.history-paper table.sheet td.cell .dk{display:block;font-size:8.5px;color:#555;font-weight:700;margin-top:1px}
.history-paper table.sheet td.cell.drinkonly{background:#fcfcfa}
.history-paper table.sheet td.cell.empty{color:transparent;background:#fff}
.history-paper table.sheet tr.rest td{background:#f7f2f2}
.history-paper table.sheet tr.rest .datecol{background:#efe3e3;color:#944}
.history-paper table.sheet td.rowtot{color:#111;font-variant-numeric:tabular-nums}
.history-paper table.sheet tfoot td{background:#f3f3ef;color:#111;font-weight:800;font-variant-numeric:tabular-nums;border-top:1.5px solid #333}
.history-paper table.sheet tfoot td.grand{background:#e8e8e2;color:#111}
.history-paper table.sheet tfoot td.yenrow{background:#fff;color:#111;font-family:inherit;font-size:9px;border-top:1px solid #777}
.history-paper table.sheet tfoot td.grandyen{font-weight:900}
.history-paper table.sheet .total-label{background:#f3f3ef}
.paper-note{font-size:10px;color:#666;margin:8px 2px 0;line-height:1.45}
:root[data-theme="dark"] .history-paper{background:#fefefe;color:#111}
:root[data-theme="dark"] .history-paper .legend,:root[data-theme="dark"] .history-paper .legend b,:root[data-theme="dark"] .history-paper .legend code{color:#111}

/* 以前の全画面表示を解除 */
#panel-sheet .card{width:auto;margin-left:0;border-radius:var(--radius);border:1px solid var(--line)}
#panel-sheet .card-b{padding:16px 18px}

@media(max-width:720px){
  #panel-sheet{max-width:none}
  .history-paper{padding:14px 10px 12px;border-radius:6px}
  .paper-head{grid-template-columns:1fr auto;align-items:center;gap:8px}
  .paper-title{grid-column:1 / -1;grid-row:2;font-size:18px;letter-spacing:.08em}
  .paper-meta{grid-column:2;grid-row:1;min-width:auto;align-items:flex-end}
  .paper-meta b{font-size:17px}
  .paper-meta span{font-size:10px;text-align:right}
  .history-paper .sheetscroll{max-height:calc(100vh - 270px)}
}

@media print{
  @page{size:A4;margin:7mm}
  #panel-sheet{max-width:none!important}
  .history-paper{border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important}
  .history-paper .sheetscroll{overflow:visible!important;max-height:none!important}
  .history-paper table.sheet{width:100%!important;min-width:0!important;font-size:8.5px!important}
  .history-paper table.sheet th.empcol,.history-paper table.sheet td.cell{width:auto!important;min-width:0!important;max-width:none!important}
  .history-paper table.sheet .datecol{position:static!important;width:42px!important;min-width:42px!important}
  .history-paper table.sheet th,.history-paper table.sheet td{height:20px!important;padding:1px 2px!important}
  .history-paper table.sheet thead th{position:static!important;font-size:8px!important;height:35px!important}
  .paper-head{margin-bottom:5px!important}
  .paper-title{font-size:16px!important}
  .paper-meta b{font-size:14px!important}
  .history-paper .legend{display:flex!important;font-size:8px!important;padding:3px 2px 4px!important}
  .history-paper .legend code{font-size:7.5px!important}
  .paper-note{font-size:7.5px!important;margin-top:4px!important}
}

/* ===== 注文履歴：クロスヘッダー固定 =====
   縦スクロールでも見出し、横スクロールでも日付・合計を見失わない。
   さらに下端に月間合計（食／金額）を固定表示する。 */
@media screen{
  /* 右端の日別合計を常時表示 */
  .history-paper table.sheet thead th.totalcol,
  .history-paper table.sheet td.rowtot{
    position:sticky;
    right:0;
    z-index:3;
    background:#f1f1ec;
    border-left:2px solid #555;
    box-shadow:-4px 0 7px rgba(0,0,0,.05);
  }
  .history-paper table.sheet thead th.totalcol{
    z-index:6;
    background:#e8e8e2;
  }

  /* 下端の月間合計を常時表示 */
  .history-paper table.sheet tfoot tr:first-child td{
    position:sticky;
    bottom:28px;
    z-index:4;
    background:#f0f0eb;
  }
  .history-paper table.sheet tfoot tr:last-child td{
    position:sticky;
    bottom:0;
    z-index:4;
    background:#fff;
    border-bottom:1.5px solid #333;
  }

  /* 左下（日付見出し）と右下（総合計）の交点を最前面に */
  .history-paper table.sheet tfoot td.datecol{
    z-index:7;
  }
  .history-paper table.sheet tfoot tr:first-child td.grand,
  .history-paper table.sheet tfoot tr:last-child td.grandyen{
    position:sticky;
    right:0;
    z-index:8;
    border-left:2px solid #555;
    box-shadow:-4px 0 7px rgba(0,0,0,.05);
  }
  .history-paper table.sheet tfoot tr:first-child td.grand{
    background:#deded7;
  }
  .history-paper table.sheet tfoot tr:last-child td.grandyen{
    background:#f4f4ef;
  }
}

@media print{
  /* 印刷・PDFでは固定を解除して通常の帳票として出力 */
  .history-paper table.sheet .totalcol,
  .history-paper table.sheet td.rowtot,
  .history-paper table.sheet tfoot td{
    position:static!important;
    right:auto!important;
    bottom:auto!important;
    box-shadow:none!important;
  }
}


/* ===== 管理履歴 v3：上部操作帯 + 画面内スクロール + 縦列クリック強調 ===== */
.admin-sheetbar{
  max-width:1180px;
  margin:0 auto;
  padding:8px 18px 10px;
  display:flex;
  align-items:center;
  gap:14px;
  border-top:1px solid var(--line-soft);
  background:var(--surface);
}
.admin-sheetinfo{min-width:0;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.admin-sheetinfo h2{font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;font-size:16px;line-height:1.25;color:var(--ink);white-space:nowrap}
.admin-sheetinfo .hint{margin:0;line-height:1.35}
.admin-sheetactions{margin-left:auto;display:flex;gap:8px;flex:0 0 auto;align-items:center}
.admin-sheetactions .btn{padding:7px 12px;font-size:12.5px}
.print-orientation{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--ink-muted);white-space:nowrap}
.print-orientation select{height:34px;padding:0 28px 0 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit}

@media screen{
  body.admin-sheet-mode{overflow:hidden;padding-bottom:0}
  body.admin-sheet-mode .wrap{
    height:var(--admin-sheet-viewport,calc(100dvh - 220px));
    max-height:var(--admin-sheet-viewport,calc(100dvh - 220px));
    overflow:hidden;
    padding-top:10px;
    padding-bottom:8px;
  }
  body.admin-sheet-mode #panel-sheet{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
  }
  body.admin-sheet-mode #panel-sheet .history-paper{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding-bottom:10px;
  }
  body.admin-sheet-mode #panel-sheet .paper-head,
  body.admin-sheet-mode #panel-sheet .legend,
  body.admin-sheet-mode #panel-sheet .paper-note{flex:0 0 auto}
  body.admin-sheet-mode #panel-sheet .sheetscroll{
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    overscroll-behavior:contain;
  }
  body.admin-sheet-mode .foot-note{display:none}

  /* 従業員の縦列は、氏名・セル・下部集計のどこを押しても同じ列を強調 */
  .history-paper table.sheet .col-clickable{cursor:pointer}
  .history-paper table.sheet tbody td.cell.col-focus,
  .history-paper table.sheet tfoot td.col-focus{
    background:#e7f1f9!important;
    box-shadow:inset 2px 0 #6b98bd,inset -2px 0 #6b98bd;
  }
  .history-paper table.sheet thead th.empcol.col-focus{
    background:#315d82!important;
    color:#fff!important;
    box-shadow:inset 2px 0 #c65a2c,inset -2px 0 #c65a2c;
  }
  .history-paper table.sheet tr.rest td.cell.col-focus{background:#e4edf5!important}
  .history-paper table.sheet tfoot tr:first-child td.col-focus{background:#dceaf4!important}
  .history-paper table.sheet tfoot tr:last-child td.col-focus{background:#edf5fa!important}
}

@media(max-width:760px){
  .admin-sheetbar{align-items:flex-start;gap:8px;padding:8px 10px}
  .admin-sheetinfo{display:block;flex:1}
  .admin-sheetinfo h2{font-size:14px;white-space:normal}
  .admin-sheetinfo .hint{font-size:10.5px;margin-top:2px}
  .admin-sheetactions{gap:5px}
  .admin-sheetactions .btn{padding:6px 8px;font-size:11px}
}

@media print{
  .history-paper table.sheet .col-focus{box-shadow:none!important}
}

/* ===== 管理メニュー：メニュー表画像だけを差し替え ===== */
.poster-admin{display:grid;grid-template-columns:minmax(180px,300px) minmax(0,1fr);gap:22px;align-items:center}
.poster-admin-preview{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:8px;max-height:320px;overflow:auto}
.poster-admin-preview img{display:block;width:100%;height:auto;border-radius:8px}
.poster-admin-tools{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.poster-admin-title{font-weight:700;font-size:16px;color:var(--ink)}
.poster-admin-tools .hint{margin:0;line-height:1.65}
@media(max-width:700px){.poster-admin{grid-template-columns:1fr}.poster-admin-preview{max-width:420px;max-height:360px}}

/* ===== 工場注文：PC 1画面完結モード =====
   画面全体を縦スクロールさせず、メニュー画像と注文操作を同じ1画面に収める。
   スマホ・タブレット縦持ちは従来どおり通常スクロール。 */
@media screen and (min-width:861px){
  body.order-screen-mode{
    height:100dvh;
    overflow:hidden;
    padding-bottom:0;
  }
  body.order-screen-mode .wrap{
    height:var(--order-viewport,calc(100dvh - 190px));
    max-height:var(--order-viewport,calc(100dvh - 190px));
    padding-top:8px;
    padding-bottom:8px;
    overflow:hidden;
  }
  body.order-screen-mode #panel-order{
    height:100%;
    min-height:0;
  }
  body.order-screen-mode .ordergrid{
    height:100%;
    min-height:0;
    grid-template-columns:minmax(330px,.86fr) minmax(0,1.14fr);
    gap:14px;
    align-items:stretch;
  }

  /* 左の紙メニューは、残り高さに合わせて自動縮小。全体が必ず見える。 */
  body.order-screen-mode .menuposter{
    position:static;
    height:100%;
    min-height:0;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    overflow:hidden;
  }
  body.order-screen-mode .menuposter img{
    width:100%;
    height:100%;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    object-position:top center;
    border-radius:12px;
  }

  /* 右側は縦余白を圧縮し、商品を3列にしてスクロールをなくす。 */
  body.order-screen-mode .orderpane{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  body.order-screen-mode .namepick{
    flex:0 0 auto;
    padding:9px 11px;
    margin-bottom:5px;
    border-radius:12px;
  }
  body.order-screen-mode .pick-label{
    font-size:clamp(13px,1.15vw,15px);
    line-height:1.25;
    margin-bottom:7px;
  }
  body.order-screen-mode .ebtn-grid{gap:4px 5px}
  body.order-screen-mode .ebtn{
    min-height:34px;
    padding:5px 10px;
    border-width:1.5px;
    border-radius:9px;
    font-size:clamp(12px,1.02vw,14px);
    line-height:1.2;
  }
  body.order-screen-mode #menuArea{
    flex:1 1 auto;
    min-height:0;
    overflow:hidden;
  }
  body.order-screen-mode .isec{
    margin:6px 0 4px;
    font-size:clamp(12.5px,1.05vw,14px);
    line-height:1.25;
  }
  body.order-screen-mode .ibtn-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px 6px;
  }
  body.order-screen-mode .ibtn{
    min-height:38px;
    padding:5px 8px;
    gap:6px;
    border-width:1.5px;
    border-radius:9px;
  }
  body.order-screen-mode .ibtn .inm{
    font-size:clamp(12px,1vw,14px);
    line-height:1.15;
  }
  body.order-screen-mode .ibtn .ipr{
    font-size:clamp(11px,.95vw,13px);
  }
  body.order-screen-mode .ibtn .iqty{
    border-radius:6px;
  }
  body.order-screen-mode .ibtn .iqty span{
    width:24px;
    height:24px;
    font-size:15px;
  }
  body.order-screen-mode .ibtn .iqty b{
    min-width:22px;
    font-size:12px;
  }

  /* 下部の注文確定帯も少しだけ薄くして作業領域を確保。 */
  body.order-screen-mode .cartbar .in{
    padding:8px 18px;
    gap:11px;
    flex-wrap:nowrap;
  }
  body.order-screen-mode .cartbar .tot b{font-size:22px}
  body.order-screen-mode .cartbar .btn{padding:8px 13px}
  body.order-screen-mode .cartbar .list{min-width:80px}
  body.order-screen-mode .foot-note{display:none}
}

/* 高さが低めのノートPCではさらに少しだけ圧縮。 */
@media screen and (min-width:861px) and (max-height:760px){
  body.order-screen-mode .topbar .row{padding-top:7px;padding-bottom:7px}
  body.order-screen-mode .modes{padding-top:6px;padding-bottom:6px}
  body.order-screen-mode .mode{padding:8px 14px}
  body.order-screen-mode .modes .field select,
  body.order-screen-mode .modes .field input{padding-top:5px;padding-bottom:5px}
  body.order-screen-mode .namepick{padding:7px 9px}
  body.order-screen-mode .pick-label{margin-bottom:5px}
  body.order-screen-mode .ebtn{min-height:30px;padding:4px 8px}
  body.order-screen-mode .isec{margin:4px 0 3px}
  body.order-screen-mode .ibtn-grid{gap:4px 5px}
  body.order-screen-mode .ibtn{min-height:34px;padding:4px 7px}
  body.order-screen-mode .cartbar .in{padding-top:6px;padding-bottom:6px}
}


/* ===== 3画面分離（工場員 / 厨房 / 管理者） ===== */
body[data-screen] .screen-role{
  display:inline-flex;align-items:center;min-height:38px;padding:8px 15px;
  border-radius:10px;background:var(--ai);color:#fff;font-weight:700;
  white-space:nowrap;
}
/* 専用画面では画面切替ナビを出さない */
body[data-screen] .modebtns{display:none!important}

/* 工場員：注文に不要な操作を隠す。工場・注文日だけ残す。 */
body[data-screen="order"] .topbar .ctrl,
body[data-screen="order"] .theme-btn,
body[data-screen="order"] #adminTabs,
body[data-screen="order"] #adminSheetBar{display:none!important}
body[data-screen="order"] .modes{min-height:50px}
body[data-screen="order"] .screen-role{background:var(--ai-deep)}

/* 厨房：本日の注文確認だけ。上部の期間・工場・注文日は操作させない。 */
body[data-screen="kitchen"] .topbar .ctrl,
body[data-screen="kitchen"] .theme-btn,
body[data-screen="kitchen"] .modectrls,
body[data-screen="kitchen"] #adminTabs,
body[data-screen="kitchen"] #adminSheetBar{display:none!important}
body[data-screen="kitchen"] .modes{min-height:50px}
body[data-screen="kitchen"] .screen-role{background:var(--kaki)}

/* 管理者：期間・工場と管理タブだけ表示。注文日欄は不要。 */
body[data-screen="admin"] #dateField{display:none!important}
body[data-screen="admin"] .screen-role{background:var(--ai-deep)}

@media(max-width:700px){
  body[data-screen] .screen-role{font-size:13px;padding:7px 11px;min-height:34px}
}


/* ===== 3画面分離 v2: HTMLごとに表示UIを強制固定 =====
   JS読込前・ブラウザキャッシュ時でも別画面が混ざらないようにする。 */
body[data-screen="order"] .panel{display:none!important}
body[data-screen="order"] #panel-order{display:block!important}
body[data-screen="order"] .cartbar{display:block!important}
body[data-screen="order"] .foot-note{display:none!important}

body[data-screen="kitchen"] .panel{display:none!important}
/* 厨房は「本日の注文」と「メニュー管理」を切替表示する。
   以前の #panel-kitchen{display:block!important} が切替を妨げていたため、
   body の kitchen-menu-mode で表示先を明示的に切り替える。 */
body[data-screen="kitchen"] #panel-kitchen,
body[data-screen="kitchen"] #panel-menu{display:none!important}
body[data-screen="kitchen"]:not(.kitchen-menu-mode) #panel-kitchen{display:block!important}
body[data-screen="kitchen"].kitchen-menu-mode #panel-menu{display:block!important}
body[data-screen="kitchen"] .cartbar,
body[data-screen="kitchen"] .doneOverlay{display:none!important}
body[data-screen="kitchen"] .wrap{padding-bottom:26px}

/* 管理画面は注文・厨房UIを絶対に出さず、管理タブだけ切替可能 */
body[data-screen="admin"] #panel-order,
body[data-screen="admin"] #panel-kitchen{display:none!important}
body[data-screen="admin"] .cartbar,
body[data-screen="admin"] .doneOverlay{display:none!important}
body[data-screen="admin"] #adminTabs{display:flex!important}
body[data-screen="admin"] .wrap{padding-bottom:26px}


/* ===== 厨房・管理 注文データ自動更新 ===== */
.live-status{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;font-weight:700;color:var(--ink-soft);padding:6px 9px;border:1px solid var(--line-soft);border-radius:999px;background:var(--surface-2);font-variant-numeric:tabular-nums}
.live-dot{width:8px;height:8px;border-radius:50%;background:#35a66f;box-shadow:0 0 0 3px rgba(53,166,111,.12);flex:0 0 auto}
.live-status.loading .live-dot{background:#d29a30;box-shadow:0 0 0 3px rgba(210,154,48,.12);animation:livePulse .9s ease-in-out infinite}
.live-status.error{color:#a34f4f;background:#fff4f4;border-color:#e7c5c5}
.live-status.error .live-dot{background:#cf5b5b;box-shadow:0 0 0 3px rgba(207,91,91,.12)}
@keyframes livePulse{0%,100%{opacity:.45;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}
.kitbar .live-status{margin-left:auto}
.kitbar .spacer + .live-status{margin-left:0}
@media(max-width:900px){.kitbar{flex-wrap:wrap}.kitbar .live-status{order:5;width:100%;justify-content:center;margin-top:2px}.admin-sheetactions{flex-wrap:wrap;justify-content:flex-end}.admin-sheetactions .live-status{width:100%;justify-content:flex-end;border:0;background:transparent;padding:2px 0}}
@media print{.live-status,#kitRefresh,#adminRefresh{display:none!important}}


/* ===== 管理画面：他UIへの確認リンク ===== */
body[data-screen="admin"] .screen-links{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
body[data-screen="admin"] .screen-link{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:38px;padding:7px 13px;border-radius:10px;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);
  font-weight:700;font-size:13px;text-decoration:none;white-space:nowrap;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
body[data-screen="admin"] .screen-link:hover{
  border-color:var(--ai);background:var(--surface-2);
}
body[data-screen="admin"] .screen-link.order-link{
  border-color:rgba(36,92,142,.28);
}
body[data-screen="admin"] .screen-link.kitchen-link{
  border-color:rgba(181,132,31,.38);
}
@media(max-width:700px){
  body[data-screen="admin"] .screen-links{width:100%;order:3}
  body[data-screen="admin"] .screen-link{flex:1;min-width:132px}
}


/* ===== 全工場 注文受付 停止／再開 ===== */
.reception-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.reception-state{display:inline-flex;align-items:center;min-height:34px;padding:6px 10px;border-radius:999px;background:#eef8f2;border:1px solid #b9dec8;color:#23663f;font-size:12px;font-weight:900;white-space:nowrap}
.reception-state.closed{background:#fff0f0;border-color:#e7b6b6;color:#a13d3d}
.reception-toggle{background:#fff1f1!important;border:1px solid #dfa9a9!important;color:#a33131!important;font-weight:900!important}
.reception-toggle:hover{background:#ffe4e4!important}
.reception-toggle.reopen{background:#eaf8ef!important;border-color:#9fd0b0!important;color:#176b39!important}
.reception-toggle.reopen:hover{background:#dcf4e5!important}
.reception-toggle:disabled{opacity:.55;cursor:wait}

/* 工場員側：受付停止中は大きな案内を最前面に表示。 */
body[data-screen="order"] .wrap{position:relative}
.order-closed-overlay{position:absolute;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(245,247,249,.94);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.order-closed-overlay[hidden]{display:none!important}
.order-closed-card{width:min(680px,92vw);padding:34px 28px;border-radius:22px;background:#fff;border:2px solid #e0a7a7;box-shadow:0 18px 50px rgba(87,43,43,.18);text-align:center}
.order-closed-icon{font-size:58px;line-height:1;margin-bottom:12px}
.order-closed-title{font-size:clamp(22px,2.2vw,32px);font-weight:900;color:#a33d3d;line-height:1.35}
.order-closed-text{margin-top:14px;font-size:clamp(15px,1.35vw,18px);font-weight:700;color:var(--ink);line-height:1.65}
.order-closed-note{display:inline-flex;margin-top:18px;padding:8px 14px;border-radius:999px;background:#f4f6f8;color:var(--ink-soft);font-size:13px;font-weight:700}
body.reception-closed[data-screen="order"] .cartbar{filter:grayscale(.35);opacity:.65}
body.reception-closed[data-screen="order"] .cartbar button{pointer-events:none}

@media(max-width:1000px){
  .kitbar .reception-control{width:100%;justify-content:flex-end;order:4}
}
@media(max-width:700px){
  .kitbar .reception-control{justify-content:stretch}
  .reception-control .reception-state{flex:1;justify-content:center}
  .reception-control .reception-toggle{width:100%}
  .order-closed-card{padding:28px 18px}
}
@media print{.reception-control,.order-closed-overlay{display:none!important}}


/* ===== 店側：本日累計・累計詳細 ===== */
.stats-open{background:var(--ai)!important;border-color:var(--ai)!important;color:#fff!important;font-weight:900!important;white-space:nowrap}
.kitchen-summary-bar{display:grid;grid-template-columns:minmax(210px,1.35fr) repeat(4,minmax(120px,1fr));gap:10px;margin:0 0 16px}
.ks-title,.ks-metric{background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);min-height:72px;padding:11px 14px;display:flex;flex-direction:column;justify-content:center}
.ks-title span{font-size:11.5px;color:var(--ink-faint);font-weight:700}.ks-title b{font-size:16px;color:var(--ai);margin-top:2px}
.ks-metric span{font-size:11.5px;color:var(--ink-soft);font-weight:700}.ks-metric b{font-size:24px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--ink)}.ks-metric b small{font-size:12px;margin-left:3px;color:var(--ink-soft)}.ks-metric.sales b{color:var(--kaki)}
.stats-overlay{position:fixed;inset:0;z-index:120;background:rgba(13,18,24,.66);display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.stats-overlay[hidden]{display:none!important}body.stats-open{overflow:hidden}
.stats-panel{width:min(1180px,98vw);height:min(92vh,920px);background:var(--paper);border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.32);display:flex;flex-direction:column;overflow:hidden}
.stats-head{flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:14px 18px;background:var(--ai-deep);color:#fff;border-bottom:3px solid var(--kaki)}
.stats-head>div:first-child{flex:1}.stats-kicker{font-size:11.5px;color:#c9d7e6;font-weight:700}.stats-head h2{font-size:20px;margin-top:1px}.stats-close{background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.3)!important;color:#fff!important}
.stats-tools{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;padding:11px 16px;background:var(--surface);border-bottom:1px solid var(--line)}
.stats-presets{display:flex;gap:5px}.stats-preset.active{background:var(--ai)!important;border-color:var(--ai)!important;color:#fff!important}
.stats-date{display:flex;flex-direction:column;gap:2px}.stats-date span{font-size:10.5px;color:var(--ink-faint);font-weight:700}.stats-date input{padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-family:inherit}.stats-wave{padding-bottom:7px;color:var(--ink-faint)}
.stats-range-label{padding:8px 16px;background:var(--surface-2);border-bottom:1px solid var(--line-soft);font-size:12.5px;font-weight:700;color:var(--ink-soft)}
.stats-scroll{flex:1;min-height:0;overflow:auto;padding:14px 16px 24px}
.stats-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:14px}.stats-kpi{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:10px 12px;box-shadow:var(--shadow)}.stats-kpi span{display:block;font-size:11px;color:var(--ink-soft);font-weight:700}.stats-kpi b{display:block;font-size:22px;line-height:1.25;margin-top:2px;font-variant-numeric:tabular-nums}.stats-kpi b small{font-size:11px;color:var(--ink-soft);margin-left:3px}.stats-kpi.sales b{color:var(--kaki)}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.stats-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);margin-bottom:12px;overflow:hidden}.stats-card-head{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;padding:11px 13px;border-bottom:1px solid var(--line-soft);background:var(--surface-2)}.stats-card-head h3{font-size:15px;color:var(--ai)}.stats-card-head span{font-size:11px;color:var(--ink-faint)}
.stats-table-wrap{overflow:auto;max-height:310px}.stats-detail-wrap{max-height:390px}.stats-table{width:100%;border-collapse:collapse;font-size:12.5px}.stats-table th{position:sticky;top:0;z-index:1;background:var(--ai-deep);color:#fff;text-align:left;padding:7px 9px;white-space:nowrap}.stats-table td{padding:7px 9px;border-bottom:1px solid var(--line-soft);vertical-align:top}.stats-table tr:nth-child(even) td{background:var(--surface-2)}.stats-table th.n,.stats-table td.n{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.stats-table .money-cell{font-weight:700}.stats-code{display:block;font-size:10.5px;color:var(--ink-faint);margin-top:1px}.stats-empty{text-align:center!important;color:var(--ink-faint);padding:22px!important}
@media(max-width:1050px){.kitchen-summary-bar{grid-template-columns:repeat(4,1fr)}.ks-title{grid-column:1/-1;min-height:54px}.stats-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.stats-overlay{padding:0}.stats-panel{width:100vw;height:100vh;border-radius:0}.stats-head{padding:10px 12px}.stats-head h2{font-size:17px}.stats-tools{padding:9px 10px}.stats-tools .spacer{display:none}.stats-tools #statsExcel{margin-left:auto}.stats-grid{grid-template-columns:1fr}.stats-kpis{grid-template-columns:repeat(2,1fr)}.kitchen-summary-bar{grid-template-columns:repeat(2,1fr)}.ks-title{grid-column:1/-1}.stats-date input{max-width:145px}}
@media(max-width:520px){.stats-presets{width:100%}.stats-presets .btn{flex:1}.stats-date{flex:1}.stats-date input{width:100%;max-width:none}.stats-wave{display:none}.stats-tools #statsApply{width:100%}.stats-tools #statsExcel{width:100%;margin-left:0}.stats-kpis{grid-template-columns:1fr 1fr}.ks-metric b{font-size:21px}}
@media print{.kitchen-summary-bar{display:grid!important}.stats-overlay,.stats-open{display:none!important}}


/* ======================================================================
   工場注文画面 PRO UI 2026-09-20
   注文ロジックは変更せず、order画面だけを商品カード型UIへ刷新。
   ====================================================================== */
body[data-screen="order"]{
  --order-red:#c9151e;
  --order-red-deep:#a80f16;
  --order-red-soft:#fff0f1;
  --order-green:#2f9e44;
  --order-bg:#f6f7f9;
  --order-card:#ffffff;
  --order-text:#20242b;
  --order-muted:#69707a;
  --order-line:#e4e7eb;
  background:var(--order-bg);
}
body[data-screen="order"] .topbar{
  background:linear-gradient(90deg,#b70e16 0%,#cf1b23 58%,#b70e16 100%);
  border-bottom:0;
  box-shadow:0 2px 12px rgba(128,12,18,.18);
}
body[data-screen="order"] .topbar .row{max-width:1440px;padding:10px 18px}
body[data-screen="order"] .brand{gap:14px;align-items:center}
body[data-screen="order"] .brand .name{font-size:clamp(20px,1.75vw,28px);font-weight:900;letter-spacing:.02em}
body[data-screen="order"] .brand .sub{font-size:13px;color:#fff;font-weight:700;opacity:.92;border-left:1px solid rgba(255,255,255,.45);padding-left:14px}
body[data-screen="order"] .tabwrap{top:52px;background:#fff;border-bottom:1px solid #e6e7ea;box-shadow:0 2px 10px rgba(22,27,32,.04)}
body[data-screen="order"] .modes{max-width:1440px;padding:9px 18px;gap:12px}
body[data-screen="order"] .screen-role{
  background:transparent!important;color:var(--order-text)!important;border:0;padding:0;min-height:auto;display:flex;align-items:center;gap:9px;
}
body[data-screen="order"] .screen-role .role-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--order-red-soft);font-size:20px}
body[data-screen="order"] .screen-role>span:last-child{display:flex;flex-direction:column;line-height:1.15}
body[data-screen="order"] .screen-role b{font-size:14px}
body[data-screen="order"] .screen-role small{font-size:10.5px;color:var(--order-muted);font-weight:700;margin-top:2px}
body[data-screen="order"] .modectrls{gap:8px;margin-left:auto}
body[data-screen="order"] .modes .field{background:#f8f9fb;border:1px solid var(--order-line);border-radius:10px;padding:4px 7px 4px 9px;gap:7px}
body[data-screen="order"] .modes .field label{font-size:10.5px;color:var(--order-muted)}
body[data-screen="order"] .modes .field select,
body[data-screen="order"] .modes .field input{border:0;background:transparent;padding:4px 2px;font-size:13px;font-weight:800;color:var(--order-text);outline:none}
body[data-screen="order"] .reception-state{min-height:38px;border-radius:10px;padding:7px 13px;background:#eaf8ef;border:1px solid #9fd4af;color:#23763d;font-size:12px}
body[data-screen="order"] .reception-state.closed{background:#fff0f0;border-color:#efb4b7;color:#a83138}

body[data-screen="order"] .wrap{max-width:1440px}
body[data-screen="order"] .ordergrid{grid-template-columns:minmax(300px,.78fr) minmax(0,1.42fr);gap:16px}
body[data-screen="order"] .menuposter{background:#fff;border:1px solid var(--order-line);border-radius:14px;padding:7px;box-shadow:0 5px 20px rgba(30,35,40,.06)}
body[data-screen="order"] .menuposter img{border:0!important;box-shadow:none!important;border-radius:9px!important}
body[data-screen="order"] .orderpane{gap:0}

body[data-screen="order"] .namepick{background:#fff;border:1px solid var(--order-line);box-shadow:0 4px 16px rgba(30,35,40,.055);border-radius:14px}
body[data-screen="order"] .namepick.err{border-color:#e0676d;box-shadow:0 0 0 3px rgba(201,21,30,.08)}
body[data-screen="order"] .pick-label,
body[data-screen="order"] .menu-select-title{display:flex;align-items:center;gap:10px;color:var(--order-text);margin:0}
body[data-screen="order"] .pick-label .step-no,
body[data-screen="order"] .menu-select-title .step-no{flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:var(--order-red);color:#fff;display:grid;place-items:center;font-size:16px;font-weight:900;box-shadow:0 3px 8px rgba(201,21,30,.22)}
body[data-screen="order"] .pick-label>span:last-child,
body[data-screen="order"] .menu-select-title>span:last-child{display:flex;align-items:baseline;gap:10px;min-width:0}
body[data-screen="order"] .pick-label b,
body[data-screen="order"] .menu-select-title b{font-size:16px;font-weight:900;white-space:nowrap}
body[data-screen="order"] .pick-label small,
body[data-screen="order"] .menu-select-title small{font-size:10.5px;color:var(--order-muted);font-weight:700;white-space:nowrap}
body[data-screen="order"] .ebtn-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:9px}
body[data-screen="order"] .ebtn{min-height:38px;border:1px solid var(--order-line);border-radius:9px;background:#fff;color:var(--order-text);font-size:13px;font-weight:800;padding:6px 8px;box-shadow:0 1px 2px rgba(20,24,29,.025)}
body[data-screen="order"] .ebtn:hover{border-color:#e67a80;background:#fff8f8}
body[data-screen="order"] .ebtn.on{background:linear-gradient(180deg,#d51d25,#be1119);border-color:#b90f17;color:#fff;box-shadow:0 4px 10px rgba(190,17,25,.2)}
body[data-screen="order"] .ebtn.on::before{content:"✓";margin-right:5px;font-weight:900}

body[data-screen="order"] #menuArea{display:flex;flex-direction:column;min-height:0}
body[data-screen="order"] .menu-select-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 6px;flex:0 0 auto}
body[data-screen="order"] .menu-rest{margin-left:auto}
body[data-screen="order"] .menu-rest .chip{font-size:10.5px;padding:3px 8px}
body[data-screen="order"] .product-section{flex:0 0 auto;margin:0 0 6px}
body[data-screen="order"] .product-section .isec{display:flex;align-items:center;gap:8px;margin:1px 0 4px!important;color:var(--order-text)!important;font-size:11px!important;font-weight:900!important}
body[data-screen="order"] .product-section .isec::after{content:"";height:1px;background:var(--order-line);flex:1}
body[data-screen="order"] .product-grid{display:grid;gap:6px}
body[data-screen="order"] .product-section.featured .product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-screen="order"] .product-section.compact .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body[data-screen="order"] .product-section.drink .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}

body[data-screen="order"] .product-card{position:relative;width:100%;min-width:0;border:1px solid var(--order-line);border-radius:11px;background:#fff;color:var(--order-text);padding:6px;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;row-gap:2px;text-align:left;box-shadow:0 2px 8px rgba(20,24,29,.035);transition:border-color .12s,box-shadow .12s,transform .08s}
body[data-screen="order"] .product-card:hover{border-color:#e07379;box-shadow:0 4px 13px rgba(112,20,25,.08)}
body[data-screen="order"] .product-card:active{transform:translateY(1px)}
body[data-screen="order"] .product-card.on{border-color:#df535a;background:linear-gradient(180deg,#fff,#fff8f8);box-shadow:0 0 0 2px rgba(201,21,30,.07),0 4px 12px rgba(91,20,24,.06)}
body[data-screen="order"] .product-media{grid-row:1/3;grid-column:1;position:relative;display:block;overflow:hidden;border-radius:8px;background:#f2f3f5;align-self:stretch}
body[data-screen="order"] .product-media img{display:block;width:100%;height:100%;object-fit:cover}
body[data-screen="order"] .product-noimg{display:grid;width:100%;height:100%;place-items:center;font-size:24px;background:#f5f5f5}
body[data-screen="order"] .feature-card .product-media{width:76px;height:58px}
body[data-screen="order"] .compact-card .product-media,
body[data-screen="order"] .drink-card .product-media{width:48px;height:48px}
body[data-screen="order"] .qbadge{position:absolute;right:4px;top:4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--order-red);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:900;border:2px solid #fff}
body[data-screen="order"] .product-info{grid-column:2;grid-row:1;display:flex;align-items:flex-start;justify-content:space-between;gap:5px;min-width:0}
body[data-screen="order"] .product-name{font-size:12px;font-weight:900;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body[data-screen="order"] .product-price{font-size:12px;font-weight:900;line-height:1.2;color:var(--order-red);white-space:nowrap;font-variant-numeric:tabular-nums}
body[data-screen="order"] .product-ctrl{grid-column:2;grid-row:2;display:flex;align-items:end;justify-content:flex-end;min-width:0}
body[data-screen="order"] .pick-cta{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:2px 8px;border-radius:7px;background:#fff3f3;color:var(--order-red);font-size:10.5px;font-weight:900;border:1px solid #f1c0c3}
body[data-screen="order"] .product-card .iqty{display:inline-flex;align-items:center;height:26px;border:1px solid #e1b0b3;border-radius:7px;overflow:hidden;background:#fff}
body[data-screen="order"] .product-card .iqty span[data-act]{width:26px;height:24px;display:grid;place-items:center;background:#fff7f7;color:var(--order-red);font-size:15px;font-weight:900}
body[data-screen="order"] .product-card .iqty b{min-width:24px;text-align:center;font-size:11px;font-weight:900;color:var(--order-text);font-variant-numeric:tabular-nums}
body[data-screen="order"] .compact-card{min-height:60px}
body[data-screen="order"] .compact-card .product-name,
body[data-screen="order"] .drink-card .product-name{font-size:11.5px}
body[data-screen="order"] .compact-card .product-price,
body[data-screen="order"] .drink-card .product-price{font-size:11.5px}

body[data-screen="order"] .cartbar{background:#fff;color:var(--order-text);border-top:3px solid var(--order-red);box-shadow:0 -7px 24px rgba(22,27,32,.13)}
body[data-screen="order"] .cartbar .in{max-width:1440px;gap:12px}
body[data-screen="order"] .cart-label{display:block;font-size:9.5px;line-height:1.1;color:var(--order-muted);font-weight:800;margin-bottom:3px;white-space:nowrap}
body[data-screen="order"] .cartbar .who{min-width:180px;font-weight:700}
body[data-screen="order"] .cart-person{display:flex;align-items:baseline;gap:4px}
body[data-screen="order"] .cartbar .who .em{font-size:20px;color:var(--order-red);font-weight:900}
body[data-screen="order"] .cart-person small{font-size:11px;color:var(--order-muted)}
body[data-screen="order"] .cartbar .listwrap{flex:1;min-width:160px;padding:0 12px;border-left:1px solid var(--order-line);border-right:1px solid var(--order-line)}
body[data-screen="order"] .cartbar .list{font-size:11px;color:var(--order-text);font-weight:700;min-width:0}
body[data-screen="order"] .cartbar .tot{display:block;min-width:116px}
body[data-screen="order"] .cartbar .tot>div{display:flex;align-items:baseline;gap:6px}
body[data-screen="order"] .cartbar .tot b{font-size:25px;color:var(--order-red);font-weight:900}
body[data-screen="order"] .cartbar .tot span{font-size:10px;color:var(--order-muted);font-weight:700}
body[data-screen="order"] .cartbar .btn.light{background:#fff;border-color:var(--order-line);color:#4d535b;box-shadow:none}
body[data-screen="order"] .cartbar .btn.light:hover{background:#f7f8fa}
body[data-screen="order"] #cartDelete{color:#a13a3f;border-color:#efc7c9;background:#fff8f8}
body[data-screen="order"] #cartSave{min-width:190px;min-height:48px;border-radius:10px;background:linear-gradient(180deg,#d91e27,#bd1018);border-color:#b50d15;color:#fff;font-size:15px;font-weight:900;box-shadow:0 5px 14px rgba(190,16,24,.22);display:inline-flex;align-items:center;justify-content:center;gap:8px}
body[data-screen="order"] #cartSave:hover{filter:none;background:linear-gradient(180deg,#e0232c,#c7121a)}
body[data-screen="order"] #cartSave:disabled{background:#d7d9dd;border-color:#d7d9dd;color:#8d939b;box-shadow:none;opacity:1}
body[data-screen="order"] .cart-icon{font-size:16px}
body[data-screen="order"] .cart-arrow{font-size:24px;line-height:.7;margin-left:2px}

@media screen and (min-width:861px){
  body.order-screen-mode .wrap{padding-top:8px;padding-bottom:7px}
  body.order-screen-mode .ordergrid{grid-template-columns:minmax(300px,.78fr) minmax(0,1.42fr);gap:14px}
  body.order-screen-mode .namepick{padding:8px 10px;margin-bottom:4px}
  body.order-screen-mode .pick-label{margin-bottom:0}
  body.order-screen-mode .ebtn-grid{gap:5px;margin-top:7px}
  body.order-screen-mode .ebtn{min-height:34px;padding:4px 7px;font-size:clamp(11.5px,.9vw,13px)}
  body.order-screen-mode #menuArea{overflow:hidden}
  body.order-screen-mode .menu-select-head{padding:5px 2px 4px}
  body.order-screen-mode .product-section{margin-bottom:4px}
  body.order-screen-mode .product-grid{gap:5px}
  body.order-screen-mode .feature-card .product-media{width:70px;height:54px}
  body.order-screen-mode .compact-card .product-media,
  body.order-screen-mode .drink-card .product-media{width:44px;height:44px}
  body.order-screen-mode .product-card{padding:5px;column-gap:6px;border-radius:9px}
  body.order-screen-mode .product-name{font-size:11.5px}
  body.order-screen-mode .product-price{font-size:11.5px}
  body.order-screen-mode .compact-card{min-height:54px}
  body.order-screen-mode .cartbar .in{padding:7px 18px;gap:10px}
  body.order-screen-mode #cartSave{min-height:44px}
}

@media screen and (min-width:861px) and (max-height:760px){
  body.order-screen-mode .brand .name{font-size:20px}
  body.order-screen-mode .topbar .row{padding-top:6px;padding-bottom:6px}
  body.order-screen-mode .modes{padding-top:5px;padding-bottom:5px}
  body.order-screen-mode .screen-role .role-icon{width:31px;height:31px;font-size:17px}
  body.order-screen-mode .namepick{padding:6px 8px}
  body.order-screen-mode .pick-label .step-no,
  body.order-screen-mode .menu-select-title .step-no{width:25px;height:25px;flex-basis:25px;font-size:13px}
  body.order-screen-mode .pick-label b,
  body.order-screen-mode .menu-select-title b{font-size:14px}
  body.order-screen-mode .ebtn{min-height:30px;padding:3px 6px}
  body.order-screen-mode .feature-card .product-media{width:62px;height:47px}
  body.order-screen-mode .compact-card .product-media,
  body.order-screen-mode .drink-card .product-media{width:39px;height:39px}
  body.order-screen-mode .product-card{padding:4px}
  body.order-screen-mode .product-section{margin-bottom:3px}
  body.order-screen-mode .product-section .isec{margin:0 0 3px!important}
  body.order-screen-mode .cartbar .in{padding-top:5px;padding-bottom:5px}
  body.order-screen-mode #cartSave{min-height:40px}
}

@media(max-width:860px){
  body[data-screen="order"] .topbar .row{padding:9px 12px}
  body[data-screen="order"] .brand .sub{display:none}
  body[data-screen="order"] .modes{padding:8px 12px}
  body[data-screen="order"] .screen-role{display:none}
  body[data-screen="order"] .modectrls{margin-left:0;width:100%}
  body[data-screen="order"] .modes .field{flex:1;min-width:145px}
  body[data-screen="order"] .reception-state{margin-left:auto}
  body[data-screen="order"] .wrap{padding:12px 10px 150px}
  body[data-screen="order"] .ordergrid{grid-template-columns:1fr}
  body[data-screen="order"] .menuposter{position:static;max-height:62vh;overflow:hidden}
  body[data-screen="order"] .menuposter img{width:100%;height:100%;object-fit:contain}
  body[data-screen="order"] .ebtn-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-screen="order"] .pick-label>span:last-child,
  body[data-screen="order"] .menu-select-title>span:last-child{display:block}
  body[data-screen="order"] .pick-label small,
  body[data-screen="order"] .menu-select-title small{display:block;margin-top:2px;white-space:normal}
  body[data-screen="order"] .product-section.featured .product-grid,
  body[data-screen="order"] .product-section.compact .product-grid,
  body[data-screen="order"] .product-section.drink .product-grid{grid-template-columns:1fr 1fr}
  body[data-screen="order"] .feature-card .product-media{width:72px;height:58px}
  body[data-screen="order"] .cartbar .in{padding:8px 10px;display:grid;grid-template-columns:1fr auto auto;gap:7px}
  body[data-screen="order"] .cartbar .who{min-width:0}
  body[data-screen="order"] .cartbar .listwrap{grid-column:1/-1;grid-row:2;padding:6px 0 0;border:0;border-top:1px solid var(--order-line)}
  body[data-screen="order"] .cartbar .tot{min-width:90px}
  body[data-screen="order"] #cartDelete{display:none!important}
  body[data-screen="order"] #cartClear{grid-column:2}
  body[data-screen="order"] #cartSave{grid-column:3;min-width:145px}
}

@media(max-width:520px){
  body[data-screen="order"] .reception-state{width:100%;justify-content:center}
  body[data-screen="order"] .product-section.featured .product-grid,
  body[data-screen="order"] .product-section.compact .product-grid,
  body[data-screen="order"] .product-section.drink .product-grid{grid-template-columns:1fr}
  body[data-screen="order"] .cartbar .in{grid-template-columns:1fr 1fr}
  body[data-screen="order"] .cartbar .who{grid-column:1}
  body[data-screen="order"] .cartbar .tot{grid-column:2;text-align:right}
  body[data-screen="order"] .cartbar .listwrap{grid-column:1/-1}
  body[data-screen="order"] #cartClear{grid-column:1}
  body[data-screen="order"] #cartSave{grid-column:2;min-width:0;width:100%}
}


/* ===== 商品画像拡大プレビュー ===== */
body.preview-open{overflow:hidden}
body[data-screen="order"] .product-media[data-preview-code]{cursor:zoom-in}
body[data-screen="order"] .product-media[data-preview-code]:hover img{transform:scale(1.025)}
body[data-screen="order"] .product-media img{transition:transform .16s ease}
body[data-screen="order"] .zoom-badge{
  position:absolute;right:4px;bottom:4px;width:22px;height:22px;border-radius:50%;
  display:grid;place-items:center;background:rgba(20,24,29,.76);color:#fff;
  font-size:15px;font-weight:900;line-height:1;box-shadow:0 2px 7px rgba(0,0,0,.18);
  pointer-events:none;
}
body[data-screen="order"] .qbadge{z-index:2}
.product-preview-overlay[hidden]{display:none!important}
.product-preview-overlay{
  position:fixed;inset:0;z-index:120;background:rgba(10,13,17,.74);
  display:grid;place-items:center;padding:18px;backdrop-filter:blur(3px);
}
.product-preview-card{
  position:relative;width:min(760px,94vw);max-height:92vh;background:#fff;color:#1d1d1d;
  border-radius:20px;overflow:hidden;box-shadow:0 24px 80px rgba(0,0,0,.36);
  display:grid;grid-template-rows:minmax(0,1fr) auto auto;
}
.product-preview-close{
  position:absolute;top:12px;right:12px;z-index:3;width:42px;height:42px;border:0;border-radius:50%;
  background:rgba(20,24,29,.78);color:#fff;font-size:28px;line-height:1;display:grid;place-items:center;
  box-shadow:0 3px 12px rgba(0,0,0,.22);cursor:pointer;
}
.product-preview-image{min-height:0;background:#f3f3f1;display:flex;align-items:center;justify-content:center;overflow:hidden}
.product-preview-image img{display:block;width:100%;height:100%;max-height:68vh;object-fit:contain;background:#f3f3f1}
.product-preview-meta{display:flex;align-items:baseline;justify-content:space-between;gap:20px;padding:15px 20px 10px;border-top:1px solid #eee}
.product-preview-name{font-size:clamp(21px,3vw,30px);font-weight:900;line-height:1.25}
.product-preview-price{font-size:clamp(24px,3.2vw,34px);font-weight:900;color:#c9151e;white-space:nowrap}
.product-preview-qty{display:grid;grid-template-columns:72px 1fr 72px;align-items:stretch;margin:0 20px 20px;border:1px solid #e4b7ba;border-radius:14px;overflow:hidden;background:#fff8f8}
.product-preview-qty button{border:0;background:#fff0f1;color:#c9151e;font-size:32px;font-weight:900;min-height:58px;cursor:pointer}
.product-preview-qty button:hover{background:#ffe5e7}
.product-preview-qty button:disabled{color:#c8c8c8;background:#f5f5f5;cursor:default}
.product-preview-qty>div{display:flex;align-items:center;justify-content:center;gap:12px;border-left:1px solid #efd0d2;border-right:1px solid #efd0d2}
.product-preview-qty span{font-size:13px;color:#777;font-weight:700}
.product-preview-count{font-size:25px;font-weight:900;font-variant-numeric:tabular-nums}
@media(max-width:640px){
  .product-preview-overlay{padding:10px}
  .product-preview-card{width:96vw;border-radius:16px}
  .product-preview-image img{max-height:60vh}
  .product-preview-meta{padding:13px 15px 8px}
  .product-preview-qty{margin:0 15px 15px;grid-template-columns:64px 1fr 64px}
}


/* ===== 日替わり弁当 告知 ===== */
.daily-notice-setting{margin-top:16px}
.daily-notice-setting .card-h{justify-content:space-between}
.daily-admin-status{margin-left:auto;display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border-radius:999px;background:var(--ok-tint);color:var(--ok);border:1px solid color-mix(in srgb,var(--ok) 35%,transparent);font-size:12px;font-weight:700}
.daily-admin-status.off{background:var(--surface-2);color:var(--ink-faint);border-color:var(--line)}
.daily-admin-grid{display:grid;grid-template-columns:minmax(170px,.55fr) minmax(280px,1.45fr);gap:12px}
.daily-admin-grid .field span{font-size:12px;color:var(--ink-soft);font-weight:700}
.daily-admin-grid textarea{width:100%;resize:vertical;min-height:72px;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:10px 12px;color:var(--ink);font:inherit;line-height:1.55}
.daily-detail-field{grid-column:1/-1}
.daily-admin-actions{display:flex;align-items:center;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line-soft)}
.daily-admin-actions .hint{margin:0 auto 0 0}
@media(max-width:760px){.daily-admin-grid{grid-template-columns:1fr}.daily-detail-field{grid-column:auto}.daily-admin-actions{align-items:stretch;flex-direction:column}.daily-admin-actions .hint{margin:0}.daily-admin-actions .btn{width:100%}}

body[data-screen="order"] .product-title-stack{display:flex;flex-direction:column;min-width:0;gap:2px}
body[data-screen="order"] .daily-announced{border-color:#e0a5a8;background:linear-gradient(180deg,#fff,#fffafa)}
body[data-screen="order"] .daily-order-copy{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:2px 5px;min-width:0;margin-top:1px;line-height:1.12}
body[data-screen="order"] .daily-order-copy b{grid-column:1;background:#fff0f0;color:var(--order-red);border:1px solid #f1c0c3;border-radius:5px;padding:1px 4px;font-size:8.5px;white-space:nowrap}
body[data-screen="order"] .daily-order-copy strong{grid-column:2;font-size:9.5px;color:#7d171d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-screen="order"] .daily-order-copy small{grid-column:1/-1;font-size:8.5px;color:var(--order-muted);font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.order-screen-mode .daily-order-copy small{display:none}
@media(max-width:900px){body[data-screen="order"] .daily-order-copy small{display:none}}


/* ===== 日替わり告知 UI fix v2 ===== */
#dailyNoticeSetting .daily-detail-field{display:flex!important;grid-column:1/-1!important;width:100%!important}
#dailyNoticeSetting #dailyNoticeDetail{display:block!important;width:100%!important;min-height:88px!important;visibility:visible!important;opacity:1!important}

/* ===== 日替わり弁当：内容・おかずを注文画面にも表示 v3 ===== */
body[data-screen="order"] .daily-order-copy small,
body.order-screen-mode .daily-order-copy small{
  display:-webkit-box !important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  white-space:normal !important;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.25;
  font-size:8.5px;
  color:var(--order-muted);
  font-weight:700;
  grid-column:1/-1;
}
@media(max-width:900px){
  body[data-screen="order"] .daily-order-copy small,
  body.order-screen-mode .daily-order-copy small{
    display:-webkit-box !important;
  }
}

/* ===== 日替わり弁当：告知テキスト拡大 v4 ===== */
body[data-screen="order"] .daily-order-copy{
  gap:4px 7px;
  margin-top:3px;
  line-height:1.25;
}
body[data-screen="order"] .daily-order-copy b{
  font-size:10.5px !important;
  padding:2px 6px;
  border-radius:6px;
  line-height:1.3;
}
body[data-screen="order"] .daily-order-copy strong{
  font-size:13px !important;
  line-height:1.3;
  font-weight:900;
  color:#7d171d;
}
body[data-screen="order"] .daily-order-copy small,
body.order-screen-mode .daily-order-copy small{
  font-size:11.5px !important;
  line-height:1.4 !important;
  -webkit-line-clamp:2;
  font-weight:700;
}


/* ===== 商品名・価格の文字サイズ拡大 ===== */
body[data-screen="order"] .product-name{
  font-size:14px;
  line-height:1.25;
}
body[data-screen="order"] .product-price{
  font-size:14px;
  line-height:1.2;
}
body[data-screen="order"] .compact-card .product-name,
body[data-screen="order"] .drink-card .product-name{
  font-size:13.5px;
}
body[data-screen="order"] .compact-card .product-price,
body[data-screen="order"] .drink-card .product-price{
  font-size:13.5px;
}
body[data-screen="order"] .pick-cta{
  font-size:11.5px;
}
body[data-screen="order"] .product-card .iqty b{
  font-size:12px;
}
body[data-screen="order"] .compact-card,
body[data-screen="order"] .drink-card{
  min-height:66px;
}
body.order-screen-mode .product-name{
  font-size:13px;
}
body.order-screen-mode .product-price{
  font-size:13px;
}
body.order-screen-mode .compact-card,
body.order-screen-mode .drink-card{
  min-height:60px;
}
body.order-screen-mode .pick-cta{
  font-size:11px;
}

/* ===== 日替わり弁当：3段表示レイアウト ===== */
body[data-screen="order"] .daily-announced{
  min-height:92px;
}
body[data-screen="order"] .daily-announced .product-info{
  align-items:flex-start;
  gap:8px;
}
body[data-screen="order"] .daily-announced .product-title-stack{
  gap:4px;
  flex:1 1 auto;
}
body[data-screen="order"] .daily-announced .daily-order-copy{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:3px !important;
  margin-top:4px !important;
  line-height:1.25;
}
body[data-screen="order"] .daily-announced .daily-order-copy b,
body[data-screen="order"] .daily-announced .daily-order-copy strong,
body[data-screen="order"] .daily-announced .daily-order-copy small{
  grid-column:1 / -1 !important;
  display:block !important;
  white-space:normal !important;
  overflow:hidden;
  text-overflow:ellipsis;
}
body[data-screen="order"] .daily-announced .daily-order-copy b{
  width:max-content;
  font-size:10.5px !important;
  padding:2px 6px;
}
body[data-screen="order"] .daily-announced .daily-order-copy strong{
  font-size:13px !important;
  line-height:1.35 !important;
  font-weight:900;
}
body[data-screen="order"] .daily-announced .daily-order-copy small{
  font-size:11.5px !important;
  line-height:1.35 !important;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  display:-webkit-box !important;
}
body.order-screen-mode .daily-announced{
  min-height:98px;
}
body.order-screen-mode .daily-announced .daily-order-copy small{
  display:-webkit-box !important;
  -webkit-line-clamp:2;
}


/* ===== 厨房：注文 / メニュー管理 切替 ===== */
body[data-screen="kitchen"] .kitchen-view-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,260px));gap:10px;margin:0 0 16px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);width:max-content;max-width:100%}
body[data-screen="kitchen"] .kitchen-view-tab{border:1px solid transparent;background:transparent;color:var(--ink-soft);border-radius:10px;min-height:54px;padding:8px 16px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:9px;text-align:left;align-items:center;font-family:inherit;cursor:pointer}
body[data-screen="kitchen"] .kitchen-view-tab>span{grid-row:1/3;font-size:22px}
body[data-screen="kitchen"] .kitchen-view-tab b{font-size:15px;color:var(--ink);line-height:1.2}
body[data-screen="kitchen"] .kitchen-view-tab small{font-size:10.5px;color:var(--ink-faint);font-weight:700;line-height:1.2}
body[data-screen="kitchen"] .kitchen-view-tab.active{background:var(--ai-deep);border-color:var(--ai-deep);color:#fff;box-shadow:0 3px 10px rgba(23,50,76,.16)}
body[data-screen="kitchen"] .kitchen-view-tab.active b,body[data-screen="kitchen"] .kitchen-view-tab.active small{color:#fff}
body[data-screen="kitchen"].kitchen-menu-mode #panel-menu{display:block!important}
body[data-screen="kitchen"] #panel-menu .price{font-weight:900;font-size:15px;color:var(--kaki);background:#fffdfb}
body[data-screen="kitchen"] #panel-menu .menuedit td:last-child{white-space:nowrap}
body[data-screen="kitchen"] #panel-menu .poster-setting{margin-top:0}
@media(max-width:620px){body[data-screen="kitchen"] .kitchen-view-tabs{width:100%;grid-template-columns:1fr 1fr}body[data-screen="kitchen"] .kitchen-view-tab{padding:8px 10px}}


/* =========================================================
   2026-09-20 注文画面：商品カード大型化（注文しやすさ重視）
   ========================================================= */
@media screen and (min-width:861px){
  /* 商品エリア：余白を少し詰め、その分カード内を大きく */
  body[data-screen="order"].order-screen-mode .product-grid{
    gap:7px;
  }
  body[data-screen="order"].order-screen-mode .product-section{
    margin-bottom:6px;
  }
  body[data-screen="order"].order-screen-mode .product-section .isec{
    margin:1px 0 5px !important;
    font-size:13.5px;
    font-weight:900;
  }

  /* カード本体 */
  body[data-screen="order"].order-screen-mode .product-card{
    padding:7px 8px;
    column-gap:9px;
    row-gap:4px;
    border-radius:11px;
    min-height:76px;
    align-items:center;
  }
  body[data-screen="order"].order-screen-mode .feature-card{
    min-height:88px;
  }
  body[data-screen="order"].order-screen-mode .compact-card{
    min-height:72px;
  }
  body[data-screen="order"].order-screen-mode .drink-card{
    min-height:68px;
  }

  /* サムネイルを大きく */
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:94px;
    height:70px;
    border-radius:9px;
    align-self:center;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:62px;
    height:58px;
    border-radius:9px;
    align-self:center;
  }
  body[data-screen="order"].order-screen-mode .drink-card .product-media{
    width:58px;
    height:54px;
    border-radius:9px;
    align-self:center;
  }

  /* 商品名・価格 */
  body[data-screen="order"].order-screen-mode .product-info{
    gap:8px;
    align-items:flex-start;
  }
  body[data-screen="order"].order-screen-mode .product-name{
    font-size:15px;
    line-height:1.28;
    font-weight:900;
  }
  body[data-screen="order"].order-screen-mode .product-price{
    font-size:16px;
    line-height:1.15;
    font-weight:900;
    letter-spacing:.01em;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-name,
  body[data-screen="order"].order-screen-mode .drink-card .product-name{
    font-size:14.5px;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-price,
  body[data-screen="order"].order-screen-mode .drink-card .product-price{
    font-size:15.5px;
  }

  /* 選択ボタンを押しやすく */
  body[data-screen="order"].order-screen-mode .product-ctrl{
    align-items:flex-end;
  }
  body[data-screen="order"].order-screen-mode .pick-cta{
    min-height:30px;
    padding:4px 11px;
    border-radius:8px;
    font-size:12.5px;
    line-height:1;
  }
  body[data-screen="order"].order-screen-mode .product-card .iqty{
    height:32px;
    border-radius:8px;
  }
  body[data-screen="order"].order-screen-mode .product-card .iqty span[data-act]{
    width:31px;
    height:30px;
    font-size:17px;
  }
  body[data-screen="order"].order-screen-mode .product-card .iqty b{
    min-width:29px;
    font-size:13px;
  }

  /* 日替わりは3段告知を読みやすく */
  body[data-screen="order"].order-screen-mode .daily-announced{
    min-height:118px;
    padding-top:8px;
    padding-bottom:8px;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .product-media{
    align-self:center;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy{
    gap:4px !important;
    margin-top:5px !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy b{
    font-size:11px !important;
    padding:2px 6px;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy strong{
    font-size:13.5px !important;
    line-height:1.3 !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy small{
    font-size:12px !important;
    line-height:1.35 !important;
    -webkit-line-clamp:2;
  }
}

/* 高さが低めのPCでも、今回の大型カードを極端に縮めない */
@media screen and (min-width:861px) and (max-height:760px){
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:82px;
    height:62px;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:56px;
    height:52px;
  }
  body[data-screen="order"].order-screen-mode .drink-card .product-media{
    width:52px;
    height:48px;
  }
  body[data-screen="order"].order-screen-mode .product-card{
    padding:6px 7px;
  }
  body[data-screen="order"].order-screen-mode .product-name{
    font-size:14px;
  }
  body[data-screen="order"].order-screen-mode .product-price{
    font-size:15px;
  }
  body[data-screen="order"].order-screen-mode .compact-card,
  body[data-screen="order"].order-screen-mode .drink-card{
    min-height:64px;
  }
  body[data-screen="order"].order-screen-mode .daily-announced{
    min-height:108px;
  }
}


/* =========================================================
   2026-09-20 B2：丼サムネ＋カテゴリ見出し拡大
   ========================================================= */
@media screen and (min-width:861px){
  /* 「お弁当 / 丼 / ドリンク」をはっきり大きく */
  body[data-screen="order"].order-screen-mode .product-section .isec{
    font-size:15px !important;
    line-height:1.25 !important;
    font-weight:900 !important;
    margin:3px 0 6px !important;
    letter-spacing:.01em;
  }

  /* 丼もの（compact）のサムネをもう一回り拡大 */
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:74px !important;
    height:66px !important;
    border-radius:10px;
  }
  body[data-screen="order"].order-screen-mode .compact-card{
    min-height:80px;
  }

  /* 丼の商品名・価格も画像サイズとのバランスを取る */
  body[data-screen="order"].order-screen-mode .compact-card .product-name{
    font-size:15px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-price{
    font-size:16px !important;
  }
}

/* 高さが低めのPCでは少しだけ抑えて1画面を維持 */
@media screen and (min-width:861px) and (max-height:760px){
  body[data-screen="order"].order-screen-mode .product-section .isec{
    font-size:14px !important;
    margin:2px 0 4px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:66px !important;
    height:60px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card{
    min-height:70px;
  }
}


/* =========================================================
   2026-09-20 社員注文画面：赤ヘッダー1段化
   白い操作帯を廃止し、工場・注文日・受付状態を赤帯へ統合
   ========================================================= */
body[data-screen="order"] .order-hidden-tabwrap{
  display:none !important;
}

body[data-screen="order"] .order-topbar-compact{
  position:sticky;
  top:0;
  z-index:60;
}
body[data-screen="order"] .order-topbar-compact .row{
  max-width:1536px;
  min-height:58px;
  padding:7px 18px !important;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:nowrap;
}
body[data-screen="order"] .order-topbar-compact .brand{
  flex:0 0 auto;
  gap:12px;
  white-space:nowrap;
}
body[data-screen="order"] .order-topbar-compact .brand .name{
  font-size:25px;
  line-height:1;
}
body[data-screen="order"] .order-topbar-compact .brand .sub{
  font-size:12.5px;
  line-height:1;
  padding-left:12px;
}

body[data-screen="order"] .order-employee-role{
  display:inline-flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  min-height:38px;
  padding:5px 10px;
  border-left:1px solid rgba(255,255,255,.24);
  color:#fff;
  white-space:nowrap;
}
body[data-screen="order"] .order-employee-role .role-icon{
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  border-radius:8px;
  background:rgba(255,255,255,.14);
  font-size:16px;
}
body[data-screen="order"] .order-employee-role b{
  font-size:13.5px;
  font-weight:900;
  letter-spacing:.01em;
}

/* 注文画面では期間・テーマ切替は従来通り非表示 */
body[data-screen="order"] .order-topbar-compact .ctrl,
body[data-screen="order"] .order-topbar-compact .theme-btn{
  display:none !important;
}

body[data-screen="order"] .order-topbar-compact .order-head-controls{
  margin-left:auto;
  display:flex !important;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  color:#fff;
}
body[data-screen="order"] .order-topbar-compact .field{
  display:flex !important;
  flex-direction:row;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:4px 8px 4px 10px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.72);
  border-radius:9px;
  box-shadow:0 1px 4px rgba(70,0,4,.10);
}
body[data-screen="order"] .order-topbar-compact .field label{
  margin:0;
  font-size:10.5px;
  line-height:1;
  color:#68707a;
  font-weight:800;
  white-space:nowrap;
}
body[data-screen="order"] .order-topbar-compact .field select,
body[data-screen="order"] .order-topbar-compact .field input{
  min-width:0;
  padding:4px 2px;
  border:0;
  outline:0;
  background:transparent;
  color:#20242b;
  font-size:13px;
  font-weight:900;
  line-height:1.1;
}
body[data-screen="order"] .order-topbar-compact #factorySel{
  min-width:155px;
}
body[data-screen="order"] .order-topbar-compact #orderDate{
  width:142px;
}
body[data-screen="order"] .order-topbar-compact .reception-state{
  display:inline-flex !important;
  align-items:center;
  min-height:38px;
  margin:0;
  padding:6px 12px;
  border-radius:9px;
  background:#eaf8ef;
  border:1px solid #9fd4af;
  color:#23763d;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
body[data-screen="order"] .order-topbar-compact .reception-state.closed{
  background:#fff0f0;
  border-color:#efb4b7;
  color:#a83138;
}

/* 2段目が消えたぶん、注文エリアを上へ詰めてドリンクまで見せやすく */
body[data-screen="order"].order-screen-mode .wrap{
  padding-top:8px !important;
}
body[data-screen="order"].order-screen-mode .menuposter{
  top:66px !important;
}

/* 画面幅が少し狭いPCでは役割表示を圧縮して1列を維持 */
@media screen and (max-width:1180px) and (min-width:861px){
  body[data-screen="order"] .order-topbar-compact .row{gap:8px;padding-left:10px !important;padding-right:10px !important}
  body[data-screen="order"] .order-topbar-compact .brand .sub{display:none}
  body[data-screen="order"] .order-employee-role{padding-left:7px;padding-right:7px}
  body[data-screen="order"] .order-topbar-compact #factorySel{min-width:125px}
  body[data-screen="order"] .order-topbar-compact #orderDate{width:132px}
}

@media screen and (max-width:860px){
  body[data-screen="order"] .order-topbar-compact .row{
    flex-wrap:wrap;
    padding:7px 10px !important;
  }
  body[data-screen="order"] .order-employee-role{border-left:0;padding-left:0}
  body[data-screen="order"] .order-topbar-compact .order-head-controls{
    width:100%;
    margin-left:0;
  }
  body[data-screen="order"] .order-topbar-compact .field{flex:1 1 auto}
}


/* ===== 2026-09-21 商品ポップアップ：数量確認後に反映 ===== */
.product-preview-card{
  grid-template-rows:minmax(0,1fr) auto auto auto auto !important;
  overflow:auto !important;
}
.product-preview-image img{
  max-height:52vh !important;
}
.product-preview-daily[hidden]{display:none!important}
.product-preview-daily{
  margin:0 20px 14px;
  padding:12px 14px;
  border:1px solid #f0c7c9;
  border-radius:12px;
  background:#fff8f8;
}
.product-preview-daily-label{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin-bottom:5px;
  padding:2px 7px;
  border-radius:6px;
  background:#fff0f0;
  border:1px solid #f1c0c3;
  color:#c9151e;
  font-size:12px;
  font-weight:900;
}
.product-preview-daily-title{
  color:#7d171d;
  font-size:18px;
  line-height:1.35;
  font-weight:900;
  margin-bottom:6px;
}
.product-preview-daily-detail{
  white-space:pre-wrap;
  color:#4f4f4f;
  font-size:15px;
  line-height:1.65;
  font-weight:700;
}
.product-preview-qty{
  margin-bottom:12px !important;
}
.product-preview-actions{
  padding:0 20px 20px;
}
.product-preview-note{
  margin:0 0 8px;
  color:#777;
  font-size:12px;
  line-height:1.4;
  font-weight:700;
  text-align:center;
}
.product-preview-apply{
  width:100%;
  min-height:56px;
  border:0;
  border-radius:12px;
  background:linear-gradient(180deg,#d91e27,#bd1018);
  color:#fff;
  font-size:17px;
  font-weight:900;
  box-shadow:0 5px 14px rgba(190,16,24,.22);
  cursor:pointer;
}
.product-preview-apply:hover{filter:brightness(.97)}
.product-preview-apply:disabled{
  background:#d9dde2;
  color:#7d838a;
  box-shadow:none;
  cursor:default;
}
@media(max-width:640px){
  .product-preview-image img{max-height:42vh !important}
  .product-preview-daily{margin:0 15px 12px;padding:10px 12px}
  .product-preview-daily-title{font-size:16px}
  .product-preview-daily-detail{font-size:14px}
  .product-preview-actions{padding:0 15px 15px}
  .product-preview-apply{min-height:52px;font-size:16px}
}


/* =========================================================
   2026-09-21 V2：注文画面カード高さを確実に圧縮
   768px前後のPCでドリンク欄まで表示するため、min-heightではなくheightを固定。
   ========================================================= */
@media screen and (min-width:861px){
  body[data-screen="order"].order-screen-mode .menu-select-head{
    padding:1px 2px 2px !important;
    min-height:32px !important;
  }
  body[data-screen="order"].order-screen-mode .product-section{
    margin-bottom:2px !important;
  }
  body[data-screen="order"].order-screen-mode .product-grid{
    gap:5px !important;
  }
  body[data-screen="order"].order-screen-mode .product-section .isec{
    font-size:13px !important;
    line-height:1.05 !important;
    margin:1px 0 3px !important;
  }

  /* お弁当：2段合計をしっかり縮める */
  body[data-screen="order"].order-screen-mode .feature-card{
    height:68px !important;
    min-height:68px !important;
    padding:4px 6px !important;
    column-gap:7px !important;
    row-gap:1px !important;
    overflow:hidden !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:78px !important;
    height:58px !important;
    align-self:center !important;
  }

  /* 丼：画像は見やすさを残しつつ高さを縮小 */
  body[data-screen="order"].order-screen-mode .compact-card{
    height:58px !important;
    min-height:58px !important;
    padding:3px 6px !important;
    column-gap:7px !important;
    row-gap:0 !important;
    overflow:hidden !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:58px !important;
    height:50px !important;
    align-self:center !important;
  }

  /* ドリンク */
  body[data-screen="order"].order-screen-mode .drink-card{
    height:54px !important;
    min-height:54px !important;
    padding:3px 6px !important;
    column-gap:7px !important;
    row-gap:0 !important;
    overflow:hidden !important;
  }
  body[data-screen="order"].order-screen-mode .drink-card .product-media{
    width:50px !important;
    height:46px !important;
    align-self:center !important;
  }

  /* 文字は十分読めるサイズを維持 */
  body[data-screen="order"].order-screen-mode .product-name{
    font-size:13.5px !important;
    line-height:1.15 !important;
  }
  body[data-screen="order"].order-screen-mode .product-price{
    font-size:15px !important;
    line-height:1.05 !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-name,
  body[data-screen="order"].order-screen-mode .drink-card .product-name{
    font-size:13px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-price,
  body[data-screen="order"].order-screen-mode .drink-card .product-price{
    font-size:14.5px !important;
  }
  body[data-screen="order"].order-screen-mode .pick-cta{
    min-height:24px !important;
    padding:2px 9px !important;
    font-size:11px !important;
    line-height:1 !important;
  }
  body[data-screen="order"].order-screen-mode .product-card .iqty{
    height:27px !important;
  }
  body[data-screen="order"].order-screen-mode .product-card .iqty span[data-act]{
    width:27px !important;
    height:25px !important;
    font-size:15px !important;
  }
  body[data-screen="order"].order-screen-mode .product-card .iqty b{
    min-width:26px !important;
    font-size:12px !important;
  }

  /* 日替わりは通常弁当と同じ高さ。長い内容はポップアップ専用 */
  body[data-screen="order"].order-screen-mode .daily-announced{
    height:68px !important;
    min-height:68px !important;
    padding:4px 6px !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .product-title-stack{
    gap:1px !important;
    max-height:38px !important;
    overflow:hidden !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy{
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    gap:1px 4px !important;
    margin-top:1px !important;
    min-width:0 !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy b{
    grid-column:1 !important;
    font-size:8.5px !important;
    padding:1px 4px !important;
    line-height:1.1 !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy strong{
    grid-column:2 !important;
    font-size:10.5px !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy small{
    display:none !important;
  }
}


/* =========================================================
   2026-09-21 V3：カード高さバランス再調整
   V2の固定圧縮を少し戻し、下余白を減らす。
   画面高が低いPCでは自動的にコンパクトへ戻す。
   ========================================================= */
@media screen and (min-width:861px){
  /* 通常PC：余っている縦スペースを商品カードへ戻す */
  body[data-screen="order"].order-screen-mode .feature-card{
    height:86px !important;
    min-height:86px !important;
    padding:5px 7px !important;
    column-gap:9px !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:96px !important;
    height:72px !important;
  }

  body[data-screen="order"].order-screen-mode .compact-card{
    height:72px !important;
    min-height:72px !important;
    padding:4px 7px !important;
    column-gap:9px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:70px !important;
    height:60px !important;
  }

  body[data-screen="order"].order-screen-mode .drink-card{
    height:64px !important;
    min-height:64px !important;
    padding:4px 7px !important;
    column-gap:9px !important;
  }
  body[data-screen="order"].order-screen-mode .drink-card .product-media{
    width:58px !important;
    height:52px !important;
  }

  body[data-screen="order"].order-screen-mode .product-name{
    font-size:14px !important;
  }
  body[data-screen="order"].order-screen-mode .product-price{
    font-size:15.5px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-name,
  body[data-screen="order"].order-screen-mode .drink-card .product-name{
    font-size:13.5px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-price,
  body[data-screen="order"].order-screen-mode .drink-card .product-price{
    font-size:15px !important;
  }

  body[data-screen="order"].order-screen-mode .product-section .isec{
    font-size:14px !important;
    margin:2px 0 4px !important;
  }

  /* 日替わりも通常弁当と同じ高さ。詳細はポップアップへ */
  body[data-screen="order"].order-screen-mode .daily-announced{
    height:86px !important;
    min-height:86px !important;
    padding:5px 7px !important;
  }
  body[data-screen="order"].order-screen-mode .daily-announced .product-title-stack{
    max-height:54px !important;
  }
}

/* 高さが低いモニターでは、ドリンクが見切れないよう中間サイズへ自動縮小 */
@media screen and (min-width:861px) and (max-height:790px){
  body[data-screen="order"].order-screen-mode .feature-card,
  body[data-screen="order"].order-screen-mode .daily-announced{
    height:76px !important;
    min-height:76px !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:86px !important;
    height:64px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card{
    height:64px !important;
    min-height:64px !important;
  }
  body[data-screen="order"].order-screen-mode .compact-card .product-media{
    width:62px !important;
    height:54px !important;
  }
  body[data-screen="order"].order-screen-mode .drink-card{
    height:58px !important;
    min-height:58px !important;
  }
  body[data-screen="order"].order-screen-mode .drink-card .product-media{
    width:54px !important;
    height:48px !important;
  }
}


/* ===== 厨房：注文受付 開始／停止を最優先で見せる v1 ===== */
body[data-screen="kitchen"] .reception-control{
  gap:10px;
  padding:8px 10px;
  border:2px solid #cfd7d2;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 14px rgba(20,28,24,.10);
}

/* 現在：受付中 */
body[data-screen="kitchen"]:not(.reception-closed) .reception-state{
  min-height:46px;
  padding:9px 16px;
  border:2px solid #17733c;
  border-radius:11px;
  background:#198447;
  color:#fff;
  font-size:16px;
  font-weight:900;
  letter-spacing:.02em;
  box-shadow:0 3px 10px rgba(25,132,71,.22);
}

/* 現在：受付停止中 */
body[data-screen="kitchen"].reception-closed .reception-control{
  border-color:#d64a4f;
  background:#fff4f4;
  box-shadow:0 0 0 3px rgba(201,21,30,.07),0 4px 14px rgba(120,20,25,.12);
}
body[data-screen="kitchen"] .reception-state.closed{
  min-height:46px;
  padding:9px 16px;
  border:2px solid #a60e16;
  border-radius:11px;
  background:#c9151e;
  color:#fff;
  font-size:16px;
  font-weight:900;
  letter-spacing:.02em;
  box-shadow:0 3px 10px rgba(201,21,30,.22);
}

/* 受付中のときは「停止」ボタンを強い赤に */
body[data-screen="kitchen"] .reception-toggle{
  min-height:46px;
  padding:9px 18px !important;
  border:2px solid #a80e16 !important;
  border-radius:11px !important;
  background:#d71920 !important;
  color:#fff !important;
  font-size:15px !important;
  font-weight:900 !important;
  letter-spacing:.01em;
  box-shadow:0 4px 12px rgba(201,21,30,.20);
  white-space:nowrap;
}
body[data-screen="kitchen"] .reception-toggle:hover{
  background:#bf1017 !important;
}

/* 受付停止中のときは「再開」ボタンを強い緑に */
body[data-screen="kitchen"] .reception-toggle.reopen{
  border-color:#126b35 !important;
  background:#178445 !important;
  color:#fff !important;
  box-shadow:0 4px 12px rgba(23,132,69,.20);
}
body[data-screen="kitchen"] .reception-toggle.reopen:hover{
  background:#116f39 !important;
}

/* 状態をさらに一目で分かるように、厨房だけ状態表示に先頭ラベル */
body[data-screen="kitchen"] .reception-state::before{
  content:"現在 ";
  margin-right:4px;
  font-size:11px;
  font-weight:700;
  opacity:.86;
}

@media(max-width:900px){
  body[data-screen="kitchen"] .reception-control{
    width:100%;
    justify-content:flex-end;
  }
}
@media(max-width:700px){
  body[data-screen="kitchen"] .reception-control{
    padding:8px;
  }
  body[data-screen="kitchen"] .reception-state,
  body[data-screen="kitchen"] .reception-toggle{
    width:100%;
    justify-content:center;
    text-align:center;
  }
}

/* 厨房：累計・詳細の文字を確実に表示 */
body[data-screen="kitchen"] .stats-panel,
body[data-screen="kitchen"] .stats-scroll,
body[data-screen="kitchen"] .stats-card,
body[data-screen="kitchen"] .stats-kpi {
  color:#1c1c1a !important;
}

body[data-screen="kitchen"] .stats-kpi b {
  color:#1c1c1a !important;
  font-size:24px;
  font-weight:900;
}

body[data-screen="kitchen"] .stats-kpi.sales b {
  color:var(--kaki) !important;
}

body[data-screen="kitchen"] .stats-table td,
body[data-screen="kitchen"] .stats-table td b {
  color:#1c1c1a !important;
}

body[data-screen="kitchen"] .stats-code {
  color:#777 !important;
}

body[data-screen="kitchen"] .stats-table .money-cell {
  color:#1c1c1a !important;
  font-weight:800;
}

/* ===== 厨房：累計画面は全体を縦スクロールさせず、注文者詳細だけ内部スクロール ===== */

/* 累計モーダル内の外側スクロールを止める */
body[data-screen="kitchen"] .stats-scroll{
  overflow:hidden !important;
}

/* 上段の集計カード類はそのまま表示 */
body[data-screen="kitchen"] .stats-kpis,
body[data-screen="kitchen"] .stats-grid,
body[data-screen="kitchen"] .stats-card{
  flex:0 0 auto;
}

/* 注文者詳細だけ高さを固定し、件数が増えたらここだけスクロール */
body[data-screen="kitchen"] .stats-detail-wrap{
  max-height:210px !important;
  overflow-y:auto !important;
  overflow-x:auto !important;
  scrollbar-gutter:stable;
}

/* 注文者詳細の見出し行を固定 */
body[data-screen="kitchen"] .stats-detail-table thead th{
  position:sticky !important;
  top:0;
  z-index:3;
}

/* 少し低い画面ではさらに収まりやすく */
@media (max-height:820px){
  body[data-screen="kitchen"] .stats-detail-wrap{
    max-height:170px !important;
  }
}

/* スマホは通常スクロールの方が扱いやすい */
@media (max-width:760px){
  body[data-screen="kitchen"] .stats-scroll{
    overflow:auto !important;
  }
  body[data-screen="kitchen"] .stats-detail-wrap{
    max-height:320px !important;
  }
}

/* ======================================================================
   2026-09-21 厨房 累計・詳細：固定サマリー＋4タブ設計
   工場数・商品数・日数・注文者数が増えても他の表を押しつぶさない。
   ====================================================================== */
body[data-screen="kitchen"] .stats-panel{
  overflow:hidden !important;
}
body[data-screen="kitchen"] .stats-scroll{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  padding:12px 16px 14px !important;
}
body[data-screen="kitchen"] .stats-kpis{
  flex:0 0 auto !important;
  margin-bottom:10px !important;
}
body[data-screen="kitchen"] .stats-view-tabs{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  padding:5px;
  margin:0 0 10px;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:12px;
}
body[data-screen="kitchen"] .stats-view-tab{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#46515d;
  font-family:inherit;
  font-size:13.5px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
body[data-screen="kitchen"] .stats-view-tab:hover{
  background:#fff;
  border-color:var(--line);
}
body[data-screen="kitchen"] .stats-view-tab.active{
  background:var(--ai-deep);
  border-color:var(--ai-deep);
  color:#fff;
  box-shadow:0 2px 8px rgba(23,50,76,.16);
}
body[data-screen="kitchen"] .stats-tab-count{
  min-width:24px;
  height:22px;
  display:inline-grid;
  place-items:center;
  padding:0 6px;
  border-radius:999px;
  background:rgba(23,50,76,.10);
  color:inherit;
  font-size:11px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
body[data-screen="kitchen"] .stats-view-tab.active .stats-tab-count{
  background:rgba(255,255,255,.18);
  color:#fff;
}
body[data-screen="kitchen"] .stats-view-stage{
  flex:1 1 auto !important;
  min-height:0 !important;
  position:relative;
  overflow:hidden !important;
}
body[data-screen="kitchen"] .stats-view-panel{
  display:none !important;
  height:100% !important;
  min-height:0 !important;
  margin:0 !important;
  flex-direction:column !important;
  overflow:hidden !important;
}
body[data-screen="kitchen"] .stats-view-panel.active:not([hidden]){
  display:flex !important;
}
body[data-screen="kitchen"] .stats-view-panel .stats-card-head{
  flex:0 0 auto !important;
}
body[data-screen="kitchen"] .stats-view-panel .stats-table-wrap,
body[data-screen="kitchen"] .stats-view-panel .stats-detail-wrap{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow:auto !important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
body[data-screen="kitchen"] .stats-view-panel .stats-table thead th{
  position:sticky !important;
  top:0 !important;
  z-index:4 !important;
}
/* 旧「注文者詳細だけスクロール」指定を完全に上書き */
body[data-screen="kitchen"] .stats-scroll > .stats-card:last-child{
  min-height:0 !important;
}

@media(max-width:760px){
  body[data-screen="kitchen"] .stats-scroll{
    display:flex !important;
    overflow:hidden !important;
    padding:10px !important;
  }
  body[data-screen="kitchen"] .stats-view-tabs{
    grid-template-columns:1fr 1fr;
  }
  body[data-screen="kitchen"] .stats-view-tab{
    min-height:40px;
    font-size:12.5px;
  }
  body[data-screen="kitchen"] .stats-view-stage{
    min-height:280px !important;
  }
}


/* =========================================================
   2026-09-24 ごはん大盛チェック（カード内・商品ごと）
   カードは高さ固定＋overflow:hidden のため、新しい段は足さず
   下段（選択ボタンの行）の左側にチェックを置く。
   ========================================================= */
body[data-screen="order"] .product-ctrl.has-osa{justify-content:space-between !important;align-items:center !important;gap:6px}
body[data-screen="order"] .osa-check{
  display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;
  min-height:30px;padding:3px 8px 3px 5px;border-radius:8px;
  border:2px solid #e8b27a;background:#fffaf4;color:#9a5410;
  font-size:13px;font-weight:900;line-height:1;white-space:nowrap;cursor:pointer;user-select:none;
}
body[data-screen="order"] .osa-check:hover{background:#fff1e0}
body[data-screen="order"] .osa-box{
  display:inline-grid;place-items:center;width:18px;height:18px;border-radius:4px;
  border:2px solid #d48a3e;background:#fff;color:#fff;font-size:13px;font-weight:900;line-height:1;
}
body[data-screen="order"] .osa-check.on{background:#e0812f;border-color:#c9661a;color:#fff}
body[data-screen="order"] .osa-check.on .osa-box{background:#fff;border-color:#fff;color:#c9661a}
/* スマホ（カード高さ可変）では狭いとき2段に折り返す */
@media screen and (max-width:860px){
  body[data-screen="order"] .product-ctrl.has-osa{flex-wrap:wrap;row-gap:4px}
}

/* 商品プレビュー内の大きい大盛ボタン */
.product-preview-osa[hidden]{display:none!important}
.product-preview-osa{
  display:block;width:calc(100% - 40px);margin:0 20px 14px;min-height:52px;
  border:2px solid #e8a15c;border-radius:14px;background:#fff;color:#a85a12;
  font-family:inherit;font-size:17px;font-weight:900;cursor:pointer;
}
.product-preview-osa.on{background:#e0812f;border-color:#c9661a;color:#fff}
@media(max-width:560px){.product-preview-osa{width:calc(100% - 30px);margin:0 15px 12px}}

/* =========================================================
   2026-09-24 注文画面：工場ごとの注文履歴
   ========================================================= */
body[data-screen="order"] .hist-open-btn{
  min-height:38px;padding:6px 14px;border-radius:9px;border:1px solid rgba(255,255,255,.8);
  background:#fff;color:#8c1a20;font-family:inherit;font-size:14px;font-weight:900;white-space:nowrap;cursor:pointer;
  box-shadow:0 1px 4px rgba(70,0,4,.12);
}
body[data-screen="order"] .hist-open-btn:hover{background:#fff4f4}
body.hist-open{overflow:hidden}
.hist-overlay[hidden]{display:none!important}
.hist-overlay{position:fixed;inset:0;z-index:130;background:rgba(10,13,17,.62);display:grid;place-items:center;padding:16px;backdrop-filter:blur(2px)}
.hist-card{width:min(920px,100%);max-height:calc(100vh - 32px);display:flex;flex-direction:column;background:#fff;color:#1f2328;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden}
.hist-head{display:flex;align-items:center;gap:10px;padding:14px 18px;background:#b3141c;color:#fff}
.hist-title{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:900;flex:1;min-width:0}
.hist-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist-close{min-height:42px;padding:6px 16px;border-radius:10px;border:2px solid #fff;background:transparent;color:#fff;font-family:inherit;font-size:15px;font-weight:900;cursor:pointer}
.hist-close:hover{background:rgba(255,255,255,.14)}
.hist-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 18px 0}
.hist-tab{min-height:48px;border:2px solid #e2d9d9;border-radius:12px;background:#fafafa;color:#555;font-family:inherit;font-size:17px;font-weight:900;cursor:pointer}
.hist-tab.active{border-color:#b3141c;background:#fff1f1;color:#b3141c}
.hist-ctrl[hidden]{display:none!important}
.hist-ctrl{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 18px 0}
.hist-ctrl input[type=date],.hist-ctrl select{min-height:46px;padding:6px 10px;border:2px solid #d8dde3;border-radius:10px;font-family:inherit;font-size:17px;font-weight:800;background:#fff;color:#1f2328}
.hist-ctrl select{min-width:280px}
.hist-nav{min-height:46px;padding:6px 14px;border:2px solid #d8dde3;border-radius:10px;background:#fff;font-family:inherit;font-size:15px;font-weight:900;color:#333;cursor:pointer}
.hist-nav.today{border-color:#b3141c;color:#b3141c}
.hist-summary{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;padding:12px 18px}
.hs-date{display:flex;align-items:center;font-size:19px;font-weight:900;margin-right:auto}
.hs-m{display:flex;flex-direction:column;justify-content:center;min-width:110px;padding:6px 12px;border-radius:10px;background:#f6f7f9;border:1px solid #e6e8eb}
.hs-m span{font-size:12px;font-weight:800;color:#6a717a}
.hs-m b{font-size:22px;font-weight:900;line-height:1.1}
.hs-m small{font-size:13px;margin-left:2px}
.hist-body{overflow:auto;padding:0 18px 18px;flex:1;min-height:120px}
.hist-table{width:100%;border-collapse:collapse;font-size:17px}
.hist-table th{position:sticky;top:0;background:#fff;text-align:left;font-size:13px;color:#6a717a;padding:8px 10px;border-bottom:2px solid #e6e8eb}
.hist-table td{padding:10px;border-bottom:1px solid #eef0f2;vertical-align:middle}
.hist-table .hn b,.hist-person .hn b{display:block;font-size:17px;font-weight:900}
.hist-table .hn small,.hist-person .hn small{font-size:11.5px;color:#8a9199}
.hist-table .hi{font-weight:700}
.hist-table .hy,.hist-table th:last-child{text-align:right;white-space:nowrap;font-weight:900}
.hist-empty{padding:40px 10px;text-align:center;font-size:18px;font-weight:800;color:#8a9199}
.hist-month-head,.hist-person summary{display:grid;grid-template-columns:minmax(0,1.4fr) 70px minmax(0,1.1fr) 100px 66px;align-items:center;gap:8px}
.hist-month-head{position:sticky;top:0;background:#fff;padding:8px 10px;border-bottom:2px solid #e6e8eb;font-size:13px;font-weight:800;color:#6a717a;z-index:1}
.hist-month-head span:nth-child(4){text-align:right}
.hist-person{border-bottom:1px solid #eef0f2}
.hist-person summary{list-style:none;padding:10px;cursor:pointer;font-size:16px}
.hist-person summary::-webkit-details-marker{display:none}
.hist-person summary:hover{background:#fafafa}
.hist-person .hm{font-weight:800}
.hist-person .hy{text-align:right;font-weight:900;font-size:17px}
.hist-person .hopen{font-size:12px;font-weight:800;color:#b3141c;text-align:right}
.hist-person[open] .hopen{opacity:.6}
.hist-person ul{list-style:none;margin:0 0 10px;padding:6px 10px;background:#fbfbfc;border-radius:10px}
.hist-person li{display:grid;grid-template-columns:100px minmax(0,1fr) 80px;gap:8px;padding:6px 0;border-bottom:1px dashed #e6e8eb;font-size:15px}
.hist-person li:last-child{border-bottom:0}
.hist-person li span:last-child{text-align:right;font-weight:800}
.hist-note{margin:12px 0 0;font-size:12.5px;color:#8a9199}
@media(max-width:640px){
  .hist-overlay{padding:0}
  .hist-card{max-height:100vh;height:100vh;border-radius:0}
  .hist-month-head{display:none}
  .hist-person summary{grid-template-columns:minmax(0,1fr) auto;row-gap:2px}
  .hist-person .hm{font-size:13px;color:#555}
  .hist-person .hopen{display:none}
  .hist-ctrl select{min-width:0;width:100%}
  .hist-person li{grid-template-columns:80px minmax(0,1fr) 64px;font-size:14px}
}
@media print{.hist-overlay{display:none!important}}
@media screen and (max-width:860px){
  body[data-screen="order"] .order-topbar-compact .order-head-controls{flex-wrap:wrap !important}
  body[data-screen="order"] .order-topbar-compact .field{flex:1 1 150px;min-width:0}
  body[data-screen="order"] .order-topbar-compact .field select,
  body[data-screen="order"] .order-topbar-compact #orderDate{min-width:0;width:100%}
  body[data-screen="order"] .hist-open-btn{flex:1 1 140px}
  body[data-screen="order"] .order-topbar-compact .reception-state{flex:1 1 140px;justify-content:center;margin-left:0}
}

/* =========================================================
   2026-09-24 代表者のまとめて注文（当日のみ）
   ========================================================= */
/* 赤ヘッダー上でアイコン(👥)が沈まないよう白地のボタンにする */
body[data-screen="order"] .bulk-open-btn{color:#8c1a20;background:#fff;border:2px solid #ffd54a}
body[data-screen="order"] .bulk-open-btn:hover{background:#fffbe6}
/* 赤いタイトル帯のアイコンは白い丸の上に載せる */
.bulk-title>span:first-child,.hist-title>span:first-child{
  display:inline-grid;place-items:center;flex:0 0 auto;width:34px;height:34px;border-radius:50%;
  background:#fff;font-size:19px;line-height:1;box-shadow:0 1px 4px rgba(0,0,0,.15);
}
body.bulk-open{overflow:hidden}
.bulk-overlay[hidden]{display:none!important}
.bulk-overlay{position:fixed;inset:0;z-index:125;background:rgba(10,13,17,.62);display:grid;place-items:center;padding:12px;backdrop-filter:blur(2px)}
.bulk-card{width:min(1500px,100%);height:calc(100vh - 24px);display:flex;flex-direction:column;background:#fff;color:#1f2328;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden}
.bulk-head{display:flex;align-items:center;gap:10px;padding:12px 18px;background:#b3141c;color:#fff}
.bulk-title{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:900;flex:1;min-width:0}
.bulk-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bulk-close{min-height:42px;padding:6px 16px;border-radius:10px;border:2px solid #fff;background:transparent;color:#fff;font-family:inherit;font-size:15px;font-weight:900;cursor:pointer}
.bulk-guide{display:flex;flex-wrap:wrap;gap:6px 18px;padding:10px 18px;background:#fff8f0;border-bottom:1px solid #f1dfcb;font-size:14px;font-weight:800;color:#5a4630}
.bulk-step{display:inline-flex;align-items:center;gap:6px}
.bulk-step b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#b3141c;color:#fff;font-size:12px}
.bulk-scroll{flex:1;overflow:auto;padding:0 12px}
.bulk-table{border-collapse:separate;border-spacing:0;min-width:100%;font-size:15px}
.bulk-table th,.bulk-table td{border-right:1px solid #e6e8eb;border-bottom:1px solid #e6e8eb;text-align:center}
.bulk-table thead th{position:sticky;background:#f6f7f9;z-index:2;font-weight:900}
.bulk-table thead tr.bulk-grp th{top:0;height:30px;font-size:13px;color:#555}
.bulk-table thead tr.bulk-items th{top:30px;height:58px;padding:4px 3px;min-width:62px;max-width:78px;font-size:12px;line-height:1.2;vertical-align:middle}
.bulk-table thead tr.bulk-items th span{display:block;word-break:keep-all;overflow-wrap:anywhere}
.bulk-table thead tr.bulk-items th small{display:block;margin-top:2px;font-size:10.5px;color:#8a9199;font-weight:700}
.bulk-table thead th.bn{z-index:3}
.bulk-table .bn{position:sticky;left:0;z-index:1;background:#fff;text-align:left;padding:6px 10px;min-width:190px;white-space:nowrap}
.bulk-table thead .bn{background:#f6f7f9;top:0}
.bulk-table td.bn b{font-size:16px}
.bulk-table td.bn em{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:6px;font-style:normal;font-size:11px;font-weight:900;vertical-align:middle}
.bulk-table em.t-done{background:#eaf6ee;color:#23763d}
.bulk-table em.t-edit{background:#fff0d9;color:#a85a12}
.bulk-table td.bc{height:46px;min-width:62px;cursor:pointer;font-size:20px;font-weight:900;color:#b3141c;background:#fff;user-select:none}
.bulk-table td.bc:hover{background:#fff4f4}
.bulk-table td.bc.on{background:#ffe3e4;color:#b3141c}
.bulk-table td.bc.c-drink.on{background:#e6f3ff;color:#1b5e9c}
.bulk-table th.c-osa,.bulk-table th.g-osa{background:#fff1e0!important;color:#a85a12}
.bulk-table td.c-osa{color:#fff}
.bulk-table td.c-osa.on{background:#e0812f;color:#fff}
.bulk-table td.c-osa.dis{background:#f7f7f7;cursor:not-allowed}
.bulk-table tbody tr:hover td{box-shadow:inset 0 -2px 0 #f0c3c5}
.bulk-table tbody tr.has td.bn{background:#fffafa}
.bulk-table tbody tr.changed td.bn{box-shadow:inset 4px 0 0 #e0812f}
.bulk-table .by{min-width:80px;padding:0 10px;text-align:right;font-weight:900;white-space:nowrap}
.bulk-table tfoot td{position:sticky;bottom:0;background:#f6f7f9;height:38px;font-weight:900;border-top:2px solid #d8dde3}
.bulk-table tfoot td.bn{z-index:2}
.bulk-foot{display:flex;align-items:center;gap:10px;padding:12px 18px;border-top:1px solid #e6e8eb;background:#fff}
.bulk-sum{display:flex;flex-wrap:wrap;gap:6px 18px;flex:1;font-size:15px;font-weight:800;color:#555}
.bulk-sum b{font-size:20px;color:#1f2328}
.bulk-sum .ch{color:#a85a12}.bulk-sum .ch b{color:#a85a12}
.bulk-reset{min-height:50px;padding:6px 16px;border-radius:12px;border:2px solid #d8dde3;background:#fff;font-family:inherit;font-size:15px;font-weight:900;cursor:pointer}
.bulk-save{min-height:54px;padding:6px 26px;border-radius:12px;border:0;background:#c9151e;color:#fff;font-family:inherit;font-size:18px;font-weight:900;cursor:pointer;box-shadow:0 4px 12px rgba(201,21,30,.28)}
.bulk-save:disabled,.bulk-reset:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.via-bulk{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:5px;background:#f3eefe;color:#5b3aa6;font-size:10.5px;font-weight:900}
@media(max-width:640px){
  .bulk-overlay{padding:0}.bulk-card{height:100vh;border-radius:0}
  .bulk-title{font-size:16px}
  .bulk-guide{font-size:12.5px}
  .bulk-table .bn{min-width:112px;width:112px;max-width:112px;white-space:normal;padding:5px 6px}
  .bulk-table td.bn b{display:block;font-size:13px;line-height:1.25}
  .bulk-table td.bn em{margin:2px 0 0}
  .bulk-foot{flex-wrap:wrap;padding:10px 12px}
  .bulk-sum{flex:1 1 100%;gap:4px 14px;font-size:13px}
  .bulk-sum b{font-size:17px}
  .bulk-reset{flex:0 0 auto;min-height:48px;font-size:13px;padding:6px 10px}
  .bulk-save{flex:1;min-height:50px;font-size:16px;padding:6px 10px}
}
@media print{.bulk-overlay{display:none!important}}

/* =========================================================
   2026-09-24 工場選択を目立たせる（不慣れな方向け）
   ========================================================= */
/* ヘッダーの工場欄：黄色で強調 */
body[data-screen="order"] .order-topbar-compact #facField{
  background:#fff6c7 !important;border:2px solid #ffd54a !important;
  box-shadow:0 0 0 2px rgba(255,213,74,.35),0 1px 4px rgba(70,0,4,.12) !important;
}
body[data-screen="order"] .order-topbar-compact #facField label{font-size:12px !important;color:#7a5a00 !important;font-weight:900 !important}
body[data-screen="order"] .order-topbar-compact #factorySel{font-size:15px !important;color:#1f2328 !important;cursor:pointer}

/* 「お名前を選択」行の右端に大きな工場表示 */
body[data-screen="order"] .pick-label .fac-pill{
  order:9;margin-left:auto;flex:0 0 auto;
  display:inline-flex;align-items:center;gap:8px;
  min-height:44px;padding:4px 6px 4px 10px;border-radius:12px;
  border:2px solid #ffd54a;background:#fff6c7;color:#1f2328;
  font-family:inherit;cursor:pointer;box-shadow:0 2px 8px rgba(160,120,0,.14);
}
body[data-screen="order"] .pick-label .fac-pill:hover{background:#ffefa3}
body[data-screen="order"] .fac-pill .fp-ic{font-size:20px;line-height:1}
body[data-screen="order"] .fac-pill .fp-txt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.1}
body[data-screen="order"] .fac-pill .fp-txt small{font-size:10.5px;font-weight:800;color:#7a5a00}
body[data-screen="order"] .fac-pill .fp-txt b{font-size:18px;font-weight:900;white-space:nowrap}
body[data-screen="order"] .fac-pill .fp-chg{
  display:inline-flex;align-items:center;min-height:34px;padding:4px 10px;border-radius:9px;
  background:#1f2328;color:#fff;font-size:12.5px;font-weight:900;white-space:nowrap;
}
body[data-screen="order"] .fac-pill[hidden]{display:none!important}

/* 工場えらびの大きいボタン画面 */
body.facpick-open{overflow:hidden}
.facpick-overlay[hidden]{display:none!important}
.facpick-overlay{position:fixed;inset:0;z-index:135;background:rgba(10,13,17,.62);display:grid;place-items:center;padding:16px;backdrop-filter:blur(2px)}
.facpick-card{width:min(760px,100%);max-height:calc(100vh - 32px);overflow:auto;background:#fff;border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.facpick-head{display:flex;align-items:center;gap:10px;padding:16px 20px;background:#b3141c;color:#fff}
.facpick-head b{flex:1;font-size:21px;font-weight:900}
.facpick-close{min-height:42px;padding:6px 14px;border-radius:10px;border:2px solid #fff;background:transparent;color:#fff;font-family:inherit;font-size:15px;font-weight:900;cursor:pointer}
.facpick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px}
.facpick-btn{position:relative;min-height:84px;padding:10px 14px;border-radius:14px;border:3px solid #e2d9d9;background:#fff;color:#1f2328;font-family:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.facpick-btn:hover{border-color:#ffd54a;background:#fffbe6}
.facpick-btn b{font-size:22px;font-weight:900}
.facpick-btn small{font-size:13px;font-weight:800;color:#6a717a}
.facpick-btn.on{border-color:#e0a800;background:#fff6c7}
.facpick-btn em{position:absolute;top:6px;right:8px;font-style:normal;font-size:11px;font-weight:900;color:#7a5a00;background:#ffe27a;padding:2px 7px;border-radius:6px}
@media(max-width:560px){
  .facpick-grid{grid-template-columns:1fr;padding:14px}
  .facpick-btn{min-height:68px}
  body[data-screen="order"] .pick-label{flex-wrap:wrap}
  body[data-screen="order"] .pick-label .fac-pill{order:-1;width:100%;margin:0 0 8px}
  body[data-screen="order"] .fac-pill .fp-chg{margin-left:auto}
}

/* =========================================================
   2026-09-24 スマホ表示の見直し
   ・ヘッダーは固定せずスクロールで流す（画面の1/4を占有していたため）
   ・「注文受付中」は小さく1行に（停止中は全画面の案内が出る）
   ・名前選択を先に。メニュー表画像は一番下へ
   ・まとめて注文のタイトルは2行まで折り返して日付を見せる
   ========================================================= */
@media screen and (max-width:860px){
  body[data-screen="order"] .topbar{position:relative !important;top:auto !important}
  body[data-screen="order"] .order-topbar-compact .reception-state{
    flex:1 1 100% !important;min-height:28px !important;padding:3px 10px !important;font-size:11.5px !important;
  }
  body[data-screen="order"] .ordergrid{display:flex !important;flex-direction:column}
  body[data-screen="order"] .ordergrid .orderpane{order:1}
  body[data-screen="order"] .ordergrid .menuposter{order:2;margin-top:12px}
  .bulk-title b,.hist-title b{white-space:normal !important;line-height:1.25;overflow:visible}
}
@media(max-width:640px){
  .bulk-title{font-size:15px}
  .bulk-title>span:first-child,.hist-title>span:first-child{width:30px;height:30px;font-size:17px}
  .bulk-guide{padding:8px 12px;gap:4px 12px}
  .hist-ctrl{gap:6px}
  .hist-nav{padding:6px 10px;font-size:14px}
  .hist-ctrl input[type=date]{flex:1 1 150px;min-width:0}
}

/* =========================================================
   2026-09-24 v5（最終上書き）：日替わりの「内容・おかず」を
   注文画面のカードにも表示する。従来はキオスク表示で
   display:none にして詳細をポップアップ専用にしていたが、
   カード上でも本日の内容が読めるようにする。
   ※ この弁当カードだけ高さを自動にして2行分を確保。
   ========================================================= */
body[data-screen="order"] .daily-announced .daily-order-copy small,
body[data-screen="order"].order-screen-mode .daily-announced .daily-order-copy small,
body.order-screen-mode .daily-announced .daily-order-copy small{
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  grid-column:1 / -1 !important;
  font-size:11px !important;
  line-height:1.3 !important;
  font-weight:700 !important;
  color:var(--order-muted) !important;
}
body[data-screen="order"] .daily-announced,
body[data-screen="order"].order-screen-mode .daily-announced{
  height:auto !important;
  min-height:104px !important;
  padding:6px 8px !important;
}
body[data-screen="order"] .daily-announced .product-title-stack,
body[data-screen="order"].order-screen-mode .daily-announced .product-title-stack{
  max-height:none !important;
  overflow:visible !important;
}
@media(max-width:900px){
  body[data-screen="order"] .daily-announced .daily-order-copy small{
    display:-webkit-box !important;
  }
}
/* =========================================================
   2026-10-01 受付状態バー（注文画面）／受付時間の設定（厨房）
   受付中・停止中が離れた席からでも色だけで分かるよう、赤ヘッダーの
   直下に全幅の帯を出す。締切30分前からは残り時間を1分ごとに更新。
   ========================================================= */
.rband{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:7px 18px;
  font-family:"BIZ UDPGothic","BIZ UDPゴシック","Yu Gothic",Meiryo,sans-serif;
  line-height:1.25;
  border-bottom:1px solid rgba(0,0,0,.14);
}
.rband .rb-icon{font-size:17px;line-height:1;flex:0 0 auto}
.rband .rb-main{font-size:20px;font-weight:900;letter-spacing:.02em;white-space:nowrap}
.rband .rb-sub{font-size:15px;font-weight:800;opacity:.92;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 受付中：緑 */
.rband.is-open{background:#178445;color:#fff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.14)}
/* 残り30分：黄色。文字は濃色にして屋内照明でも読めるようにする */
.rband.is-warn{background:#ffd34d;color:#4a3000;box-shadow:inset 0 -3px 0 rgba(120,80,0,.22)}
/* 残り5分：オレンジ。点滅はさせない（見づらく、急かされるため） */
.rband.is-urgent{background:#ff9a1f;color:#3a1d00;box-shadow:inset 0 -3px 0 rgba(120,60,0,.26)}
.rband.is-urgent .rb-sub{font-size:17px;font-weight:900;opacity:1}
/* 停止中・休業日・時間外：赤 */
.rband.is-closed{background:#b3141c;color:#fff;box-shadow:inset 0 -3px 0 rgba(0,0,0,.18)}

/* 注文画面はヘッダー直下に固定し、スクロールしても状態を見失わない */
body[data-screen="order"] .rband{position:sticky;top:58px;z-index:55}
@media screen and (max-width:860px){
  body[data-screen="order"] .rband{position:relative;top:auto;min-height:40px;padding:6px 12px;gap:7px}
  .rband .rb-main{font-size:16px}
  .rband .rb-sub{font-size:13px}
  .rband.is-urgent .rb-sub{font-size:14px}
}
@media(max-width:520px){
  .rband{flex-wrap:wrap;row-gap:1px}
  .rband .rb-sub{flex-basis:100%;white-space:normal}
}
/* 帯が出ている画面では、ヘッダー内の小さな受付バッジは重複するので隠す */
body[data-screen="order"] .reception-state,
body[data-screen="order"] .order-topbar-compact .reception-state{display:none!important}
@media print{.rband{display:none!important}}

/* 厨房：毎日の受付開始・締切時刻の設定 */
.sched-setting{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  width:100%;
  margin-top:8px;
  padding:9px 12px;
  border:2px solid #cfd7d2;
  border-radius:14px;
  background:#fff;
  box-shadow:0 2px 8px rgba(20,28,24,.07);
}
.sched-setting .sched-title{font-size:14px;font-weight:900;color:var(--ink);white-space:nowrap}
.sched-setting input[type=time]{
  min-height:42px;padding:4px 10px;border:2px solid #d8dde3;border-radius:10px;
  background:#fff;color:#1f2328;font-family:inherit;font-size:19px;font-weight:900;
  font-variant-numeric:tabular-nums;
}
.sched-setting .sched-sep{font-size:17px;font-weight:900;color:var(--ink-soft)}
.sched-setting .btn.small{min-height:42px;padding:8px 14px;font-size:13.5px;font-weight:900}
.sched-setting .sched-hint{font-size:12px;font-weight:700;color:var(--ink-faint);margin-left:auto;white-space:nowrap}
@media(max-width:760px){
  .sched-setting{gap:6px;padding:8px}
  .sched-setting .sched-title{width:100%}
  .sched-setting input[type=time]{flex:1;min-width:0;font-size:17px}
  .sched-setting .btn.small{width:100%}
  .sched-setting .sched-hint{margin-left:0;white-space:normal}
}
@media print{.sched-setting{display:none!important}}

/* 画面高の低いPCでは帯を少し薄くして、ドリンク欄が見切れないようにする */
@media screen and (min-width:861px) and (max-height:790px){
  body[data-screen="order"] .rband{min-height:38px;padding:4px 18px}
  body[data-screen="order"] .rband .rb-main{font-size:17px}
  body[data-screen="order"] .rband .rb-sub{font-size:13.5px}
}

/* =========================================================
   2026-10-01 厨房：受付パネル（状態ランプ＋操作ボタン）
   状態とボタンが同じ形・同じ色で並ぶと「どっちが今か」で迷うため、
   状態は「受付中／停止中」の2つのランプ（片方だけ点灯＋「いま」札）、
   操作は濃いグレーの押せるボタン、と見た目から別物にする。
   ========================================================= */
.rpanel{
  width:100%;
  display:grid;
  gap:9px;
  padding:13px 15px 12px;
  border:3px solid #cfd7d2;
  border-radius:16px;
  background:#fff;
  box-shadow:0 4px 14px rgba(20,28,24,.10);
}
.rpanel.is-open{border-color:#178445;background:#f2faf5}
.rpanel.is-closed{border-color:#c9151e;background:#fff5f5;box-shadow:0 0 0 3px rgba(201,21,30,.07),0 4px 14px rgba(120,20,25,.12)}
.rp-head{font-size:12.5px;font-weight:900;letter-spacing:.06em;color:#5a6069}

.rp-lamps{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rp-lamp{
  position:relative;
  display:flex;align-items:center;gap:10px;
  min-height:60px;padding:9px 14px;
  border:2px dashed #d5d9de;border-radius:13px;
  background:#fafbfc;color:#a2a9b1;
}
.rp-lamp>span.rp-mark{flex:0 0 auto;width:17px;height:17px;border-radius:50%;background:#d7dbe0}
.rp-lamp b{font-size:21px;font-weight:900;line-height:1.1}
.rp-lamp small{font-size:11.5px;font-weight:700;line-height:1.2}
.rp-lamp>b{margin-right:2px}
.rp-lamp small{color:inherit;opacity:.85}
/* 点灯しているほうだけ、色・太枠・「いま」札で浮かせる */
.rp-lamp.on::after{
  content:"いま";position:absolute;top:-11px;left:11px;
  padding:1px 9px;border-radius:999px;background:#1f2328;color:#fff;
  font-size:11px;font-weight:900;letter-spacing:.04em;
}
.rpanel.is-open .rp-lamp.on{border:2px solid #0f6b37;background:#178445;color:#fff;box-shadow:0 4px 12px rgba(23,132,69,.26)}
.rpanel.is-closed .rp-lamp.on{border:2px solid #9d0f16;background:#c9151e;color:#fff;box-shadow:0 4px 12px rgba(201,21,30,.24)}
.rp-lamp.on>span.rp-mark{background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.3)}

.rp-note{font-size:14.5px;font-weight:800;color:#39404a;line-height:1.45}
.rp-action{
  display:flex;align-items:center;gap:13px;flex-wrap:wrap;
  padding-top:10px;border-top:1px dashed #d4d9de;
}
.rp-actionhint{font-size:12.5px;font-weight:800;color:#6a717a;line-height:1.35}

/* ボタンは「状態の色」を持たせない。押せる見た目（濃いグレー＋影）に統一する */
body[data-screen="kitchen"] .rp-action .reception-toggle,
body[data-screen="kitchen"] .rp-action .reception-toggle.reopen{
  min-height:54px!important;
  padding:9px 22px!important;
  border:2px solid #1b2026!important;
  border-radius:12px!important;
  background:#2f3740!important;
  color:#fff!important;
  box-shadow:0 4px 0 #1b2026,0 7px 16px rgba(0,0,0,.16)!important;
  white-space:nowrap;
}
body[data-screen="kitchen"] .rp-action .reception-toggle:hover,
body[data-screen="kitchen"] .rp-action .reception-toggle.reopen:hover{background:#3b444e!important}
body[data-screen="kitchen"] .rp-action .reception-toggle:active{transform:translateY(3px);box-shadow:0 1px 0 #1b2026!important}
body[data-screen="kitchen"] .rp-action .reception-toggle::before{content:"▶";margin-right:9px;font-size:11px;opacity:.75}
body[data-screen="kitchen"] .rp-action .reception-toggle b{font-size:16.5px;font-weight:900}
body[data-screen="kitchen"] .rp-action .reception-toggle:disabled{opacity:.5;box-shadow:none!important;transform:none}

@media(max-width:760px){
  .rpanel{padding:11px 11px 10px;gap:8px}
  .rp-lamp{min-height:54px;padding:8px 11px;gap:8px}
  .rp-lamp b{font-size:18px}
  .rp-lamp small{display:none}
  .rp-note{font-size:13.5px}
  .rp-action{flex-direction:column;align-items:stretch;gap:7px}
  body[data-screen="kitchen"] .rp-action .reception-toggle{width:100%;white-space:normal}
  .rp-actionhint{text-align:center}
}
@media print{.rpanel{display:none!important}}

/* =========================================================
   2026-10-04 お弁当4列表示 微調整
   商品名の「…」と「選択」の縦折返しを防止
   ========================================================= */
@media screen and (min-width:861px){
  body[data-screen="order"].order-screen-mode .product-section.featured .product-grid{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }

  /* 4列でも文字・操作部の横幅を確保 */
  body[data-screen="order"].order-screen-mode .feature-card{
    padding-left:5px !important;
    padding-right:5px !important;
    column-gap:6px !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:72px !important;
    height:60px !important;
    flex:0 0 72px !important;
  }

  /* 品名は省略記号にせず、1行で表示 */
  body[data-screen="order"].order-screen-mode .feature-card .product-name{
    font-size:12.5px !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    letter-spacing:-.03em !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-price{
    font-size:14.5px !important;
    line-height:1.1 !important;
    flex:0 0 auto !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-info{
    gap:4px !important;
    align-items:center !important;
  }

  /* 大盛＋選択が同じ行に収まるよう少しコンパクト化 */
  body[data-screen="order"].order-screen-mode .feature-card .product-ctrl.has-osa{
    gap:4px !important;
    flex-wrap:nowrap !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .osa-check{
    min-height:26px !important;
    padding:2px 5px 2px 4px !important;
    gap:3px !important;
    font-size:11px !important;
    border-width:1.5px !important;
    border-radius:7px !important;
    white-space:nowrap !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .osa-box{
    width:16px !important;
    height:16px !important;
    border-width:2px !important;
    font-size:11px !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .pick-cta{
    min-height:26px !important;
    padding:2px 6px !important;
    font-size:10.5px !important;
    line-height:1 !important;
    white-space:nowrap !important;
    word-break:keep-all !important;
    flex:0 0 auto !important;
  }
}

/* 高さが低いPCでも同じ4列レイアウトを維持 */
@media screen and (min-width:861px) and (max-height:790px){
  body[data-screen="order"].order-screen-mode .feature-card .product-media{
    width:68px !important;
    height:58px !important;
    flex-basis:68px !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-name{
    font-size:12px !important;
  }
  body[data-screen="order"].order-screen-mode .feature-card .product-price{
    font-size:14px !important;
  }
}


/* =========================================================
   2026-10-04 注文画面：受付表示を赤ヘッダーへ統合
   + 従業員選択を最大2段固定
   ========================================================= */
@media screen and (min-width:861px){
  body[data-screen="order"] .rband{display:none !important}

  body[data-screen="order"] .topbar .row{
    flex-wrap:nowrap !important;
    gap:8px !important;
    padding-top:7px !important;
    padding-bottom:7px !important;
  }

  body[data-screen="order"] .brand{flex:0 0 auto;gap:8px !important}
  body[data-screen="order"] .brand .name{font-size:20px !important;white-space:nowrap}
  body[data-screen="order"] .brand .sub{
    font-size:11px !important;padding-left:8px !important;white-space:nowrap
  }

  body[data-screen="order"] .order-employee-role{
    flex:0 0 auto;white-space:nowrap;font-size:12px
  }

  body[data-screen="order"] .order-head-controls{
    flex:0 1 auto;min-width:0;gap:6px !important;flex-wrap:nowrap !important;align-items:center
  }

  body[data-screen="order"] .order-head-controls .field{
    padding:2px 5px 2px 7px !important;min-width:0;white-space:nowrap
  }
  body[data-screen="order"] .order-head-controls .field select,
  body[data-screen="order"] .order-head-controls .field input{
    font-size:12px !important;padding:3px 1px !important
  }
  body[data-screen="order"] #factorySel{max-width:160px}
  body[data-screen="order"] #orderDate{width:128px;min-width:128px}

  body[data-screen="order"] .hist-open-btn{
    min-height:34px !important;padding:5px 9px !important;
    font-size:11.5px !important;white-space:nowrap
  }

  body[data-screen="order"] #receptionState{
    display:flex !important;align-items:center;gap:7px;
    min-height:34px !important;padding:5px 9px !important;border-radius:9px !important;
    background:rgba(255,255,255,.13) !important;
    border:1px solid rgba(255,255,255,.35) !important;
    color:#fff !important;font-size:11px !important;line-height:1.15;
    white-space:nowrap;max-width:none
  }
  body[data-screen="order"] #receptionState.closed{
    background:rgba(70,0,0,.28) !important;
    border-color:rgba(255,255,255,.35) !important;color:#fff !important
  }
  body[data-screen="order"] .head-reception-main{font-weight:900;color:#fff}
  body[data-screen="order"] .head-reception-sub{color:#fff;font-weight:700;opacity:.96}
  body[data-screen="order"] .head-menu-link{
    display:inline-flex;align-items:center;min-height:24px;padding:2px 7px;
    border-radius:6px;background:#fff;color:#b70e16;font-weight:900;
    text-decoration:none;white-space:nowrap
  }

}

@media screen and (min-width:861px) and (max-width:1280px){
  body[data-screen="order"] .brand .sub,
  body[data-screen="order"] .order-employee-role{display:none !important}
  body[data-screen="order"] .head-reception-sub{
    max-width:245px;overflow:hidden;text-overflow:ellipsis
  }
}

@media(max-width:860px){
  body[data-screen="order"] .rband{display:none !important}
  body[data-screen="order"] #receptionState{
    display:flex !important;align-items:center;gap:5px
  }
  body[data-screen="order"] .head-reception-sub{display:none}
  body[data-screen="order"] .head-menu-link{
    margin-left:auto;padding:3px 7px;border-radius:6px;background:#fff;
    color:#b70e16;font-size:11px;font-weight:900
  }
}


/* =========================================================
   2026-10-04 受付中ヘッダー表示を緑色に
   停止中は従来どおり赤系
   ========================================================= */
body[data-screen="order"] #receptionState:not(.closed){
  background:#2f9e44 !important;
  border-color:#27873a !important;
  color:#fff !important;
  box-shadow:0 2px 8px rgba(24,110,47,.22);
}

body[data-screen="order"] #receptionState:not(.closed) .head-reception-main,
body[data-screen="order"] #receptionState:not(.closed) .head-reception-sub{
  color:#fff !important;
}

body[data-screen="order"] #receptionState.closed{
  background:#a80f16 !important;
  border-color:#8f0c12 !important;
  color:#fff !important;
}

/* メニュー表ボタンは白のまま残して見やすく */
body[data-screen="order"] #receptionState .head-menu-link{
  background:#fff !important;
  color:#b70e16 !important;
}

/* 受付停止モーダル：次回の受付開始 */
.order-closed-next{display:inline-flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:4px 12px;margin-top:16px;padding:12px 20px;border-radius:14px;background:#eaf4ea;border:2px solid #9fcca5;color:#1f4a2a}
.order-closed-next[hidden]{display:none!important}
.order-closed-next .ocn-k{font-size:14px;font-weight:800;opacity:.85}
.order-closed-next .ocn-v{font-size:clamp(20px,2vw,26px);font-weight:900;letter-spacing:.02em}

/* ===== 管理画面：スマホ表示（確認用） =====
   ・上の操作ボタンは折り返して画面内に収める
   ・PC用の「画面の高さに固定」をやめ、ページ全体を縦にスクロール
   ・注文履歴表は枠の中で上下左右にスクロール（日付列・氏名行は固定のまま） */
@media screen and (max-width:760px){
  /* 上の見出し・操作帯は固定しない（スマホでは表が見える範囲が狭くなるため） */
  body[data-screen="admin"] .topbar,
  body[data-screen="admin"] .tabwrap{position:static}
  body[data-screen="admin"] .admin-sheetbar{flex-direction:column;align-items:stretch;gap:6px}
  body[data-screen="admin"] .admin-sheetinfo h2{font-size:15px}
  body[data-screen="admin"] .admin-sheetactions{margin-left:0;flex:1 1 auto;flex-wrap:wrap;justify-content:flex-start;gap:6px}
  body[data-screen="admin"] .admin-sheetactions .live-status{width:100%;justify-content:flex-start}
  body[data-screen="admin"] .print-orientation select{height:30px}

  body[data-screen="admin"].admin-sheet-mode{overflow:auto}
  body[data-screen="admin"].admin-sheet-mode .wrap{height:auto!important;max-height:none!important;overflow:visible;padding-left:8px;padding-right:8px}
  body[data-screen="admin"].admin-sheet-mode #panel-sheet,
  body[data-screen="admin"].admin-sheet-mode #panel-sheet .history-paper{height:auto;display:block}
  body[data-screen="admin"] #panel-sheet .history-paper{padding:10px 8px}
  body[data-screen="admin"] #panel-sheet .sheetscroll{
    max-height:72vh!important;overflow:auto;-webkit-overflow-scrolling:touch;
    border:1px solid var(--line-soft);border-radius:8px}

  /* 名簿管理：表は横スクロール、入力欄は縦並び */
  body[data-screen="admin"] #panel-roster .card-h{flex-wrap:wrap;gap:8px}
  body[data-screen="admin"] #panel-roster .card-b{overflow-x:auto}
  body[data-screen="admin"] #panel-roster .card-b .field{min-width:0!important;flex:1 1 100%}
}

/* 履歴表を横スクロールしたとき、下の「合計（食）」「金額」が他のマスに隠れていたのを修正
   （下端固定の z-index 指定のほうが強く効いていた） */
@media screen{
  .history-paper table.sheet tfoot tr:first-child td.datecol,
  .history-paper table.sheet tfoot tr:last-child td.datecol{z-index:7}
}

/* ===== 日替わり弁当：月〜金の曜日登録 + 押すとポップアップ (2026-10-08 daily-week) ===== */
.daily-week-table{display:grid;gap:8px}
.daily-week-row{display:grid;grid-template-columns:44px minmax(160px,.8fr) minmax(220px,1.4fr);gap:8px;align-items:center;padding:6px;border:1px solid var(--line-soft);border-radius:10px;background:var(--surface)}
.daily-week-row.today{border-color:#e0a5a8;background:#fff8f8}
.daily-week-day{display:flex;align-items:center;justify-content:center;height:40px;border-radius:8px;background:var(--surface-2);font-weight:800;font-size:17px;color:var(--ink)}
.daily-week-row.today .daily-week-day{background:#c8333b;color:#fff}
.daily-week-row input{width:100%;min-height:40px;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:8px 10px;color:var(--ink);font:inherit}
.daily-special{margin-top:14px;padding-top:12px;border-top:1px dashed var(--line)}
.daily-special summary{cursor:pointer;font-weight:700;color:var(--ink-soft);margin-bottom:10px}
@media(max-width:760px){.daily-week-row{grid-template-columns:40px 1fr}.daily-week-row .dw-detail{grid-column:1/-1}}
/* 注文画面：カードは今まで通りの大きさ。小さな案内だけ出す */
body[data-screen="order"] .daily-card .product-media{position:relative}
body[data-screen="order"] .daily-today-badge{position:absolute;left:3px;top:3px;padding:1px 5px;border-radius:5px;background:#c8333b;color:#fff;font-size:9px;font-weight:800;line-height:1.4;white-space:nowrap;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.product-preview-image[hidden]{display:none!important}
