:root {
  --bg: #EEF0F3; --card: #FFFFFF; --ink: #1F2328; --ink2: #3D444D; --muted: #5B6470; --faint: #8A9099;
  --line: #DDE1E7; --line2: #EEF0F3; --goods: #1D6F6A; --food: #B9541A;
  --warn-bg: #FFF1E6; --warn-ink: #7A3410; --accent: #9A4413;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
.page {
  max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left));
}
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { background: #2B2F36; color: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; letter-spacing: .08em; font-size: 18px; }
.store-pick { display: flex; flex-direction: column; gap: 2px; }
.store-pick label { font-size: 12px; color: var(--muted); }
.store-pick select {
  font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid #C9CED6; border-radius: 8px;
  background: #fff; color: var(--ink); min-height: 44px;
}
.store-name { font-size: 18px; font-weight: 700; }
.when { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.6; }

.message { background: var(--card); border-radius: 14px; padding: 22px; font-size: 15px; line-height: 1.8; }

.card { background: var(--card); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-size: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.sub { font-size: 13px; color: var(--muted); }
.note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw.goods { background: var(--goods); } .sw.food { background: var(--food); }

.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.day { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.day.today { background: #FBFCFD; border-color: #C9CED6; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.day-head h3 { margin: 0; font-size: 17px; }
.day-head h3.off { color: var(--accent); }
.day-head span { font-size: 13px; color: var(--muted); }
.big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line2); }
.bar .goods { background: var(--goods); } .bar .food { background: var(--food); }
.split { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; font-variant-numeric: tabular-nums; }
.split dt { font-weight: 700; } .split dt.goods { color: var(--goods); } .split dt.food { color: var(--food); }
.split dd { margin: 0; text-align: right; }
.vs { font-size: 13px; color: var(--ink2); border-top: 1px solid var(--line2); padding-top: 8px; }
.alert { font-size: 13px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 8px 10px; line-height: 1.6; }
.closed { font-size: 22px; font-weight: 700; color: var(--faint); }

.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.shift { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
thead tr { text-align: left; color: var(--muted); font-size: 12px; }
thead th { padding: 8px 6px; font-weight: 500; white-space: nowrap; }
.num { text-align: right; }
.shift-table { min-width: 560px; }
.shift-table tbody tr { border-top: 1px solid var(--line2); }
.shift-table tbody tr.week2 { border-top: 2px solid var(--line); }
.shift-table th[scope=row] { padding: 9px 6px; text-align: left; font-weight: 700; white-space: nowrap; }
.shift-table th[scope=row].off { color: var(--accent); }
.shift-table td { padding: 9px 6px; white-space: nowrap; }
.shift-table td.w { color: var(--ink2); }
.shift-table td.staff { color: var(--faint); font-size: 12px; }
.shift-table tr.far td, .shift-table tr.far th { background: #FAFBFC; }
.lv { display: flex; align-items: center; gap: 8px; }
.cells { display: flex; gap: 3px; }
.cells i { width: 14px; height: 14px; border-radius: 3px; background: var(--line2); display: block; }
.lv span { font-size: 12px; color: var(--ink2); }

.effects { display: flex; flex-direction: column; gap: 12px; }
.effect-row { display: flex; justify-content: space-between; font-size: 14px; }
.effect-bar { height: 8px; background: var(--line2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.effect-bar div { height: 8px; }

.acc-table thead tr { text-align: right; }
.acc-table thead th:first-child { text-align: left; }
.acc-table tbody tr { border-top: 1px solid var(--line2); text-align: right; }
.acc-table tbody th { text-align: left; padding: 8px 0; font-weight: 500; white-space: nowrap; }
.acc-table td { padding: 8px 0 8px 8px; white-space: nowrap; }
.acc-table tr.memo-row { border-top: none; text-align: left; }
.acc-table tr.memo-row td { white-space: normal; padding: 0 0 10px; font-size: 13px; color: var(--ink2); }
.memo { background: var(--line2); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; line-height: 1.6; }
.memo b { font-weight: 500; color: var(--muted); margin-left: 6px; font-size: 12px; }
.memo-btn { background: none; border: none; color: var(--accent); font: inherit; font-size: 13px; padding: 0; min-height: 44px; cursor: pointer; text-decoration: underline; }
.memo-form { display: flex; flex-direction: column; gap: 8px; }
.memo-form textarea { font: inherit; font-size: 16px; border: 1px solid #C9CED6; border-radius: 8px; padding: 8px; min-height: 72px; resize: vertical; }
.memo-form div { display: flex; gap: 8px; }
.memo-form button { font: inherit; font-size: 14px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid #C9CED6; background: #fff; color: var(--ink); cursor: pointer; }
.memo-form button.save { background: #2B2F36; border-color: #2B2F36; color: #fff; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; text-align: left; }

.foot { display: flex; justify-content: flex-end; gap: 16px; font-size: 12px; color: var(--muted); align-items: center; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; }

@media (hover: hover) {
  .memo-btn:hover, a:hover { color: #6E300C; }
}
@media (max-width: 520px) {
  .card { padding: 18px 16px; }
  .big { font-size: 26px; }
  .when { text-align: left; }
  /* スマホでは、横にずらさなくても売上まで見えるよう、人数の列と混み具合の言葉を省く */
  .shift-table { min-width: 0; font-size: 13px; }
  .shift-table .staff, .shift-table th.staff-h, .lv span { display: none; }
  .shift-table td, .shift-table th[scope=row] { padding: 9px 3px; }
  .cells i { width: 11px; height: 11px; }
}
