:root {
  --green:#285b45;
  --green-dark:#1c4032;
  --green-soft:#edf3ee;
  --ink:#24362e;
  --muted:#59675e;
  --line:#e5e8df;
  --paper:#fff;
  --canvas:#f6f6f0;
  --amber:#774816;
  --amber-soft:#fcf5e8;
  --meal-font-size:20px;
  font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;
  color:var(--ink);
  background:var(--canvas);
  font-synthesis:none;
  /* 画布底色铺到滚动边界外，避免回弹时露出灰色。 */
  min-height:100%;
  overscroll-behavior-y:none;
  /* 关掉移动端点按高亮，避免出现蓝色闪块。 */
  -webkit-tap-highlight-color:transparent;
}

/* 弹窗自身和页面容器不要浏览器默认的蓝色聚焦描边。 */
dialog:focus,
dialog:focus-visible,
main:focus,
main:focus-visible {
  outline:none;
}


/* 楼层页采用单列手机清单。 */
.floor-page main {
  max-width: 520px;
  padding: 28px 18px;
}
.summary-page main {
  max-width: 640px;
  padding: 28px 18px;
}

.summary-heading,
.summary-actions,
.summary-date-controls {
  display: flex;
  align-items: center;
}

.summary-heading {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.summary-heading-title p {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.summary-heading h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: 0;
  line-height: 1.25;
}

.summary-actions {
  gap: 4px;
}

.summary-actions .button {
  min-height: 44px;
  padding: 8px 9px;
  font-size: 15px;
}

.export-preview-inline {
  position: static;
  width: 100%;
  max-height: none;
  margin: 12px 0 18px;
  scroll-margin-top: 12px;
}

.export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.export-text {
  display: block;
  width: 100%;
  height: clamp(12rem, 42vh, 24rem);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: var(--meal-font-size);
  line-height: 1.55;
  resize: none;
  -webkit-touch-callout: default;
}

.export-actions .button {
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
}

.export-status {
  margin: 0;
  color: var(--green-dark);
  font-size: 16px;
}

.export-status:not(:empty) {
  margin-top: 8px;
}

.summary-date-controls {
  gap: 6px;
  flex-wrap: wrap;
  font-size: 15px;
  white-space: nowrap;
}

.summary-date,
.summary-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
}

.summary-date {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  gap: 9px;
  padding: 6px 11px 6px 7px;
  border: 1px solid #ceddce;
  border-radius: 10px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.summary-date:hover {
  border-color: var(--green);
}

.summary-date[aria-expanded="true"] {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 91, 69, .12);
}

.summary-date-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
}

.summary-date-chevron {
  width: 6px;
  height: 6px;
  margin-left: 3px;
  border-right: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green);
  transform: translateY(-2px) rotate(45deg);
}

.summary-refresh {
  margin-left: auto;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.summary-date-controls .summary-refresh:hover {
  color: var(--green-dark);
}

/* 自定义日期下拉日历。 */
.date-popover {
  position: fixed;
  z-index: 60;
  width: 292px;
  max-width: calc(100vw - 16px);
  padding: 10px 10px 8px;
  border: 1px solid #ceddce;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(24, 48, 36, .16), 0 2px 6px rgba(24, 48, 36, .08);
  color: var(--ink);
}

.date-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}

.date-popover-title {
  margin: 0;
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.date-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-size: 17px;
  line-height: 1;
}

.date-step:hover:not(:disabled) {
  background: var(--green-soft);
}

.date-step:disabled {
  color: #ccd4cb;
  cursor: not-allowed;
}

.date-weekdays,
.date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.date-weekdays span {
  padding: 4px 0 5px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.date-grid {
  gap: 2px;
}

.date-day {
  display: grid;
  place-items: center;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.date-day:hover:not(:disabled) {
  background: var(--green-soft);
}

.date-day:disabled {
  color: #ccd4cb;
  cursor: not-allowed;
}

.date-day.is-today {
  box-shadow: inset 0 0 0 1px #bed6c2;
  color: var(--green);
  font-weight: 600;
}

.date-day.is-selected {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

.date-day.is-selected:hover {
  background: var(--green-dark);
}

.date-day.is-selected.is-today {
  box-shadow: inset 0 0 0 1px var(--green-dark);
}

.date-blank {
  display: block;
  height: 34px;
}

.date-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.date-today,
.date-cancel {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #ceddce;
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 12px;
}

.date-today:hover,
.date-cancel:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.summary-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--green-soft);
}

.summary-switch button {
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 600;
}

.summary-switch button[aria-pressed=true] {
  background: var(--green);
  color: var(--paper);
}

.summary-building-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.summary-building-tabs button {
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 16px;
}

.summary-building-tabs button[aria-pressed=true] {
  border-color: var(--green);
  background: var(--green-soft);
  font-weight: 600;
}

.summary-floor {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.summary-floor + .summary-floor {
  margin-top: 10px;
}

.summary-floor > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green-dark);
  cursor: pointer;
  list-style: none;
}

.summary-floor > summary::-webkit-details-marker {
  display: none;
}

.summary-floor[open] > summary {
  border-radius: 11px 11px 0 0;
  border-bottom: 1px solid var(--line);
}

.summary-floor-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.summary-floor-name::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.summary-toggle {
  padding: 4px 10px;
  border: 1px solid #ceddce;
  border-radius: 999px;
  background: var(--paper);
  color: var(--green);
  font-size: 14px;
}

.summary-floor[open] .toggle-closed,
.summary-floor:not([open]) .toggle-open {
  display: none;
}

.summary-floor .meal-card {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.summary-floor .meal-card + .meal-card {
  border-top: 1px solid var(--line);
}

.summary-floor .meal-card:last-child {
  border-radius: 0 0 11px 11px;
}

.summary-floor .meal-header {
  padding: 12px 14px;
  background: transparent;
}

.summary-floor .meal-title h3 {
  margin: 0;
}

.summary-floor .empty-meal {
  padding: 10px 14px;
  text-align: left;
}

.floor-caption {
  color: var(--green);
  font-size: 15px;
  margin: 0 0 8px;
}

.floor-header h1 {
  font-size: 27px;
  letter-spacing: 0;
  margin-bottom: 12px;
}

/* 楼层页标题区与汇总页一致：左侧标题，右侧二维码和打印。 */
.floor-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.floor-heading-title {
  min-width: 0;
}

.floor-heading h1 {
  margin-bottom: 0;
}

.floor-heading .summary-actions {
  flex-shrink: 0;
  margin-left: auto;
}

/* 楼层页的日期行复用汇总页控件，另加当前时间显示。 */
.floor-date-controls {
  flex-wrap: wrap;
  row-gap: 8px;
  margin-bottom: 12px;
}

.floor-clock,
.summary-clock {
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.floor-date {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.floor-date .button {
  margin-left: auto;
  padding: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.floor-date .demo-badge {
  font-size: 10px;
  padding: 4px 7px;
}

.floor-meal-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 6px;
  padding: 18px 0;
  background: var(--canvas);
}

.floor-meal-tabs button {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: var(--meal-font-size);
  color: var(--muted);
}

.floor-meal-tabs button[aria-pressed=true] {
  background: var(--green);
  border-color: var(--green);
  color: white;
  font-weight: 600;
}

.floor-page .extras .subtle {
  display: none;
}

.floor-menu {
  color: var(--muted);
  font-size: var(--meal-font-size);
  line-height: 1.8;
  margin: 4px 2px 18px;
}

.floor-menu summary {
  cursor: pointer;
  width: fit-content;
}

.floor-menu p {
  padding: 10px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.floor-menu strong, .floor-menu span {
  display: block;
}

.floor-menu strong {
  color: var(--ink);
  font-weight: 500;
}

.separate-items {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  background: #fafbf7;
}

.separate-items h4 {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: inherit;
  font-weight: 600;
}

.separate-items-heading {
  margin-bottom: 10px;
  color: var(--muted);
}

.separate-items-heading h4 {
  margin: 0;
}

.separate-item + .separate-item {
  margin-top: 12px;
}

.separate-items-heading,
.separate-item > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.separate-item > div > span {
  overflow-wrap: anywhere;
}

.with-quantity .separate-items-heading,
.with-quantity .separate-item > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem;
}

.with-quantity.with-units .separate-items-heading,
.with-quantity.with-units .separate-item > div {
  grid-template-columns: minmax(0, 1fr) 4rem 2em;
}

.with-quantity .separate-items-heading > span,
.with-quantity .separate-item strong {
  text-align: center;
}

.separate-item strong {
  color: var(--green);
  white-space: nowrap;
}

.separate-item small {
  margin-left: 5px;
  font-size: inherit;
  font-weight: 400;
}

.with-quantity .separate-item > div > small {
  margin-left: 0;
  overflow-wrap: anywhere;
}

.separate-item .tag {
  margin-left: 7px;
}

.item-note {
  margin: 7px 0 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
  color: var(--amber);
}

.empty-meal {
  color: var(--muted);
  font-size: var(--meal-font-size);
  text-align: center;
  margin: 0;
  padding: 42px 20px;
}

.raw-summary {
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.scan-empty {
  padding-top: 70px;
  text-align: center;
}

.scan-empty h1 {
  font-size: 22px;
}

.scan-empty p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

@media print {
  .summary-page main {
    max-width: none;
    padding: 0;
  }

  .floor-meal-tabs, .floor-date button, .floor-menu,
  .summary-actions, .summary-date-controls, .summary-switch, .summary-building-tabs, .summary-toggle,
  .date-popover {
    display: none;
  }
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  min-height:100vh;
  min-height:100dvh;
  background-color:var(--canvas);
  overscroll-behavior-y:none;
}

button,input,select {
  font:inherit;
}

button,a,input,select,summary {
  -webkit-tap-highlight-color:transparent;
}

button {
  cursor:pointer;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline:3px solid #a8c8a7;
  outline-offset:3px;
}

button {
  color:inherit;
}

a {
  color:inherit;
}

.topbar {
  min-height:96px;
  padding:20px 4.5%;
  display:flex;
  align-items:center;
  gap:32px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-size:21px;
  font-weight:650;
  letter-spacing:2px;
  flex:1;
}

.brand-mark {
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:15px;
  color:#fff;
  background:var(--green);
}

.brand-mark svg {
  width:31px;
  height:31px;
}

.brand small {
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:400;
  letter-spacing:3px;
}

.view-switch {
  display:flex;
  gap:4px;
  background:#f1f3ee;
  border:1px solid #ebeee7;
  padding:5px;
  border-radius:10px;
}

.view-switch button {
  border:0;
  background:transparent;
  padding:10px 24px;
  border-radius:7px;
  color:#788078;
  font-size:14px;
}

.view-switch button[aria-pressed=true] {
  background:#fff;
  color:var(--green);
  box-shadow:0 2px 5px #263e3010;
  font-weight:650;
}

.top-actions {
  flex:1;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
}

.demo-badge {
  font-size:11px;
  color:var(--amber);
  background:var(--amber-soft);
  padding:6px 9px;
  border-radius:5px;
  white-space:nowrap;
}

.button {
  border:1px solid #dce2d8;
  border-radius:8px;
  background:#fff;
  padding:10px 14px;
  font-size:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  line-height:1.4;
  white-space:nowrap;
}

.button:hover {
  background:#f2f5ee;
}

.button.primary {
  color:#fff;
  border-color:var(--green);
  background:var(--green);
}

.button.primary:hover {
  background:var(--green-dark);
}

.button.ghost {
  border-color:transparent;
  background:transparent;
}

svg.icon {
  width:17px;
  height:17px;
  flex-shrink:0;
}

main {
  max-width:1320px;
  padding:40px 44px 20px;
  margin:0 auto;
}

.intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:28px;
}

.eyebrow {
  color:var(--green);
  font-size:10px;
  font-weight:600;
  letter-spacing:2px;
  margin:0 0 12px;
}

.eyebrow span {
  border-left:1px solid #c1cabd;
  margin-left:10px;
  padding-left:14px;
  font-weight:400;
  letter-spacing:2px;
}

h1 {
  font-size:32px;
  font-weight:650;
  letter-spacing:1px;
  margin:0 0 10px;
  line-height:1.5;
}

.intro-description {
  font-size:13px;
  color:var(--muted);
  margin:0;
  line-height:1.7;
}

.intro-symbol {
  color:#a9b9a1;
  margin-right:20px;
  transform:rotate(-8deg);
}

.intro-symbol svg {
  width:102px;
  height:82px;
}

.filters {
  display:flex;
  align-items:center;
  gap:16px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:12px;
  padding:13px 16px;
  flex-wrap:wrap;
}

.date-control {
  display:flex;
  align-items:center;
  gap:10px;
}

.icon-button {
  border:0;
  border-radius:6px;
  background:transparent;
  display:grid;
  place-items:center;
  width:30px;
  height:32px;
  color:#788078;
  font-size:23px;
}

.icon-button:hover {
  background:var(--green-soft);
}

.date-label {
  position:relative;
  font-size:14px;
  font-weight:600;
  min-width:148px;
  text-align:center;
  cursor:pointer;
}

.date-label input {
  position:absolute;
  inset:0;
  width:100%;
  opacity:0;
  cursor:pointer;
}

.date-shortcuts {
  display:flex;
  gap:6px;
  padding-right:16px;
  border-right:1px solid var(--line);
}

.chip {
  background:#fff;
  color:#788078;
  border:0;
  border-radius:6px;
  padding:7px 13px;
  font-size:12px;
}

.chip.active {
  color:var(--green);
  background:var(--green-soft);
  font-weight:600;
}

.location-controls {
  display:flex;
  gap:10px;
}

select {
  border:1px solid #e5e9e1;
  border-radius:7px;
  background:#fff;
  padding:8px 30px 8px 12px;
  color:#4c5d51;
  font-size:13px;
  min-width:108px;
}

.refresh {
  margin-left:auto;
  border:0;
  color:var(--muted);
}

.data-status {
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:#8a9289;
  font-size:11px;
  padding:14px 2px 20px;
}

.data-status i {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#85a97f;
  margin-right:7px;
}

.stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-bottom:30px;
}

.stat {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  padding:20px 24px;
  position:relative;
  overflow:hidden;
}

.stat-heading {
  display:flex;
  align-items:center;
  gap:9px;
  color:#657567;
  font-size:13px;
}

.stat-heading .icon {
  color:#9b9866;
}

.stat:nth-child(2) .stat-heading .icon {
  color:#b2894d;
}

.stat:nth-child(3) .stat-heading .icon {
  color:#7d89a1;
}

.stat-value {
  font-size:38px;
  font-weight:600;
  letter-spacing:-1px;
  line-height:1.4;
  margin:8px 0;
}

.stat-value small {
  margin-left:7px;
  font-size:12px;
  color:var(--muted);
  font-weight:400;
}

.stat-detail {
  display:flex;
  flex-wrap:wrap;
  gap:5px 13px;
  color:var(--muted);
  font-size:11px;
}

.stat-detail b {
  color:#4d6352;
  font-weight:500;
}

.stat-decoration {
  position:absolute;
  right:22px;
  top:31px;
  font-family:Georgia,serif;
  color:#eff3eb;
  font-size:60px;
  line-height:1;
}

.content-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 286px;
  gap:26px;
  align-items:start;
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 15px;
}

.section-heading h2 {
  margin:0;
  font-size:17px;
  font-weight:600;
}

.section-heading p {
  margin:0;
  color:var(--muted);
  font-size:11px;
}

.meal-card {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  margin-bottom:20px;
  overflow:hidden;
  scroll-margin-top:20px;
  font-size:var(--meal-font-size);
  line-height:1.5;
}

.meal-header {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:4px 12px;
  padding:18px 23px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,#fafbf7,#fff);
}

.meal-title {
  display:flex;
  align-items:center;
  gap:11px;
}

.meal-icon {
  display:grid;
  place-items:center;
  border:1px solid #e4e9de;
  border-radius:10px;
  background:#fff;
  width:36px;
  height:36px;
  color:#8b976c;
}

.meal-title h3 {
  font-size:inherit;
  margin:0 0 4px;
  font-weight:600;
}

.meal-title p {
  margin:0;
  color:#93998c;
  letter-spacing:.5px;
}

.meal-total {
  color:var(--muted);
}

.meal-total strong {
  font-weight:600;
  color:var(--green);
  margin:0 5px;
}

.meal-delivery {
  display:flex;
  flex-wrap:wrap;
  gap:8px 20px;
  margin:0;
  padding:12px 20px;
  border-bottom:1px solid var(--line);
  color:var(--muted);
  overflow-wrap:anywhere;
}

.meal-delivery strong {
  color:var(--green);
}

.meal-kind {
  padding: 12px 20px 4px;
}

.meal-kind + .meal-kind {
  border-top: 1px solid var(--line);
}

.meal-kind > h4 {
  display: inline-block;
  margin: 0;
  font-weight: 600;
}

.meal-kind .meal-group {
  padding: 10px 0;
}

.group-list {
  padding:0 24px;
}

.meal-group {
  padding:19px 0;
  border-bottom:1px dashed var(--line);
}

.meal-group:last-child {
  border-bottom:0;
}

.group-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-weight:550;
}

.group-name {
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap;
  overflow-wrap:anywhere;
}

.tag {
  font-size:13px;
  padding:4px 7px;
  border-radius:4px;
  font-weight:400;
  color:#385d3d;
  background:#edf3e8;
}

.meal-card .tag {
  font-size:inherit;
}

.tag.sugarFree {
  color:#a2362e;
  background:#fbe9e6;
}

.tag.staff {
  color:#475f7b;
  background:#eef1f7;
}

.group-quantity {
  font-weight:600;
  white-space:nowrap;
}

.group-quantity small {
  font-size:inherit;
  color:var(--muted);
  font-weight:400;
  margin-left:5px;
}

.rice-line {
  display:flex;
  flex-wrap:wrap;
  gap:4px 12px;
  color:var(--green-dark);
  line-height:1.55;
  margin:9px 0 0;
  overflow-wrap:anywhere;
}

.special-note {
  display:flex;
  align-items:flex-start;
  gap:6px;
  color:var(--amber);
  background:var(--amber-soft);
  border-radius:5px;
  padding:9px 11px;
  line-height:1.6;
  overflow-wrap:anywhere;
  margin-top:11px;
}

.special-note svg {
  margin-top:4px;
  width:17px;
  height:17px;
}

.menu-detail {
  margin-top:10px;
  color:#879181;
  font-size:11px;
}

.menu-detail summary {
  cursor:pointer;
  display:list-item;
  width:fit-content;
}

.menu-detail p {
  margin:9px 0 0;
  line-height:1.9;
  color:#5d6e60;
}

.extras {
  background:#f7f9f3;
  border-top:1px solid #e7ebdf;
  padding:13px 24px;
  display:flex;
  align-items:center;
  gap:20px;
  font-size:12px;
  flex-wrap:wrap;
}

.extras-label {
  color:#7d8975;
  font-size:11px;
}

.extras strong {
  color:var(--green);
  margin-left:5px;
}

.extras .subtle {
  margin-left:auto;
  font-size:10px;
  color:#98a08f;
}

.aside-card {
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:21px;
  margin-bottom:18px;
}

.aside-card h3 {
  font-size:14px;
  margin:0 0 16px;
  display:flex;
  align-items:center;
  gap:8px;
}

.aside-card h3 .icon {
  color:#8ba074;
}

.quick-nav {
  display:flex;
  flex-direction:column;
  gap:7px;
}

.quick-nav a {
  text-decoration:none;
  display:flex;
  justify-content:space-between;
  padding:11px 12px;
  background:#f7f8f3;
  border-radius:6px;
  font-size:12px;
}

.quick-nav a:hover {
  background:var(--green-soft);
}

.quick-nav small {
  color:#8b9587;
}

.notice-card {
  background:#fcfaf3;
  border-color:#ece7d8;
}

.notice-card h3 .icon {
  color:#ae8d50;
}

.notice-item {
  margin-top:14px;
  font-size:12px;
  line-height:1.8;
}

.notice-item small {
  display:block;
  color:#a29a85;
  font-size:10px;
}

.aside-card p {
  font-size:12px;
  line-height:1.9;
  color:#819079;
  margin:0;
}

.aside-card .aside-qr {
  width:100%;
  margin-top:16px;
  color:var(--green);
}

.legend {
  display:flex;
  gap:11px;
  font-size:10px;
  color:#84917f;
}

.legend span:before {
  content:'';
  display:inline-block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#a7bd93;
  margin-right:5px;
}

.legend span:last-child:before {
  background:#d4b677;
}

.kitchen-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.meal-switch {
  display:flex;
  gap:4px;
  padding:4px;
  background:#eceedf;
  border-radius:8px;
}

.meal-switch button {
  border:0;
  background:transparent;
  padding:9px 16px;
  color:#7a8571;
  font-size:12px;
  border-radius:5px;
}

.meal-switch button.active {
  background:#fff;
  color:var(--green);
  font-weight:600;
}

.kitchen-meals {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.kitchen-meals.filtered {
  grid-template-columns:1fr;
}

.kitchen-meals .group-list {
  padding:0 20px;
}

.kitchen-meals .group-title {
  font-size:13px;
}

.kitchen-meals .group-quantity {
  font-size:19px;
}

.kitchen-meals .meal-header {
  padding:17px 18px;
}

.kitchen-meals .extras {
  padding:14px 18px;
  gap:10px;
}

.kitchen-meals .extras .subtle {
  flex-basis:100%;
}

.kitchen-meals .menu-detail p {
  font-size:12px;
}

.table-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  margin-bottom:24px;
}

.table-top {
  padding:21px 24px;
  margin:0;
}

.kitchen-floor-details > details {
  border-top: 1px solid var(--line);
  padding: 14px 24px;
}

.kitchen-floor-details > details > summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
}

.kitchen-floor-details .kitchen-meals {
  margin: 12px 0 0;
}

.table-scroll {
  overflow-x:auto;
}

table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:12px;
  white-space:nowrap;
}

th {
  padding:13px 22px;
  background:#f5f7f0;
  font-size:11px;
  font-weight:500;
  color:#7a8571;
}

td {
  padding:16px 22px;
  border-top:1px solid #edf0e7;
  color:#61715f;
}

td:first-child {
  font-weight:500;
  color:var(--ink);
}

td .building-label {
  color:#929c88;
  margin-right:16px;
  font-weight:400;
}

td:last-child {
  text-align:right;
}

td a {
  text-decoration:none;
  color:var(--green);
  font-size:11px;
}

tfoot td {
  font-weight:600;
  background:#fafbf7;
  color:var(--green);
}

.kitchen-note-list {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px 28px;
}

.kitchen-note-list .notice-item {
  border-bottom:1px dashed var(--line);
  padding-bottom:12px;
  margin-top:0;
}

.page-footer {
  display:flex;
  justify-content:space-between;
  gap:14px;
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:28px;
  color:#9aA18f;
  font-size:10px;
  line-height:1.8;
}

dialog {
  border:1px solid var(--line);
  border-radius:18px;
  padding:0;
  width:min(440px,calc(100% - 32px));
  max-height:90dvh;
  color:var(--ink);
  box-shadow:0 24px 100px #16322533;
  overflow:hidden;
  overscroll-behavior:contain;
}

/* 弹窗打开时锁住背景页，拖动只作用于弹窗本身。 */
body.scroll-locked {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  /* 锁定期间禁止背景层被选中，避免出现蓝色选区。 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.scroll-locked #exportPreview {
  -webkit-user-select: text;
  user-select: text;
}

/* 弹窗拆成固定标题栏 + 独立滚动内容区，滚动时标题和关闭按钮不动。 */
dialog[open] {
  display:flex;
  flex-direction:column;
}

dialog::backdrop {
  background:#142b2366;
  backdrop-filter:blur(4px);
}

.dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex:0 0 auto;
  padding:14px 20px 13px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}

.dialog-head h2 {
  margin:0;
  font-size:19px;
}

.dialog-body {
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:16px 20px 20px;
  -webkit-overflow-scrolling:touch;
}

.muted {
  color:var(--muted);
  font-size:12px;
  line-height:1.8;
}

@media (max-width: 360px) {
  .floor-clock,
  .summary-clock {
    order: 1;
    flex-basis: 100%;
  }
}

.sr-only,.skip-link:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.print-date {
  display:none;
}

@media print {
  .print-date {
    display:block;
    font-size:12px;
    margin:0 0 16px;
  }
}

.skip-link:focus {
  display:block;
  padding:10px;
  background:white;
}

[hidden] {
  display:none!important;
}

@media (min-width:1000px) {
  .sidebar {
    position:sticky;
    top:24px;
  }
}

@media (max-width:1100px) {
  .topbar {
    gap:16px;
    padding:18px 28px;
  }
  .brand {
    font-size:18px;
  }
  .top-actions {
    gap:5px;
  }
  .top-actions .demo-badge {
    display:none;
  }
  .view-switch button {
    padding:9px 15px;
  }
  .content-layout {
    grid-template-columns:minmax(0,1fr) 245px;
    gap:20px;
  }
  main {
    padding:32px 28px 20px;
  }
  .kitchen-meals {
    gap:12px;
  }
  .kitchen-meals .meal-total {
    font-size:10px;
  }
  .kitchen-meals .meal-total strong {
    font-size:20px;
  }
}

@media (max-width:760px) {
  .topbar {
    flex-wrap:wrap;
    padding:16px 20px;
    gap:17px 10px;
  }
  .brand {
    flex:1;
  }
  .brand-mark {
    width:39px;
    height:39px;
    border-radius:12px;
  }
  .brand small {
    font-size:9px;
  }
  .view-switch {
    order:3;
    width:100%;
  }
  .view-switch button {
    flex:1;
  }
  .top-actions {
    flex:0;
  }
  .top-actions .button {
    padding:8px;
    font-size:11px;
  }
  .top-actions .button .icon {
    width:15px;
  }
  .top-actions .button .button-label {
    display:none;
  }
  main {
    padding:27px 18px 20px;
  }
  h1 {
    font-size:25px;
  }
  .intro {
    margin-bottom:22px;
  }
  .intro-description {
    font-size:11px;
  }
  .intro-symbol {
    margin:0;
  }
  .intro-symbol svg {
    width:65px;
    height:60px;
  }
  .eyebrow {
    font-size:8px;
    letter-spacing:1.3px;
  }
  .eyebrow span {
    font-size:9px;
    letter-spacing:1px;
    padding-left:9px;
    margin-left:6px;
  }
  .filters {
    gap:11px;
    padding:12px;
  }
  .date-control {
    gap:0;
  }
  .date-label {
    font-size:12px;
    min-width:133px;
  }
  .date-shortcuts {
    padding:0;
    border:0;
    gap:1px;
  }
  .chip {
    padding:7px 9px;
  }
  .location-controls {
    flex:1;
    order:3;
  }
  .location-controls label {
    flex:1;
  }
  .location-controls select {
    width:100%;
  }
  .refresh {
    order:4;
    padding:9px 6px;
  }
  .filters:has(.location-controls[hidden]) .refresh {
    margin-left:0;
  }
  .data-status {
    font-size:9px;
    padding:12px 1px 17px;
  }
  .stats {
    gap:8px;
    margin-bottom:24px;
  }
  .stat {
    padding:14px 12px;
    border-radius:10px;
  }
  .stat-heading {
    font-size:11px;
    gap:5px;
  }
  .stat-heading .icon {
    width:14px;
  }
  .stat-value {
    font-size:29px;
    margin:8px 0 6px;
  }
  .stat-value small {
    font-size:10px;
    margin-left:3px;
  }
  .stat-detail {
    font-size:9px;
    gap:4px 8px;
  }
  .stat-decoration {
    display:none;
  }
  .content-layout {
    display:block;
  }
  .sidebar {
    display:none;
  }
  .section-heading h2 {
    font-size:15px;
  }
  .section-heading p {
    font-size:10px;
  }
  .legend {
    font-size:9px;
    gap:7px;
  }
  .meal-header {
    padding:16px 18px;
  }
  .group-list {
    padding:0 18px;
  }
  .meal-group {
    padding:17px 0;
  }
  .extras {
    padding:13px 18px;
    gap:10px;
  }
  .extras .subtle {
    flex-basis:100%;
    margin-left:0;
  }
  .kitchen-meals {
    grid-template-columns:1fr;
    gap:0;
  }
  .kitchen-toolbar .section-heading {
    width:100%;
  }
  .meal-switch {
    width:100%;
  }
  .meal-switch button {
    flex:1;
    padding:9px 5px;
  }
  .kitchen-note-list {
    grid-template-columns:1fr;
  }
  .table-top {
    padding:18px;
  }
  .table-top p {
    display:none;
  }
  td,th {
    padding:14px 15px;
  }
  td .building-label {
    margin-right:8px;
  }
  .page-footer {
    display:block;
    font-size:9px;
  }
  .page-footer span {
    display:block;
    margin-bottom:5px;
  }
  .dialog-head {
    padding:13px 16px 12px;
  }
  .dialog-body {
    padding:14px 16px 18px;
  }
}

@media print {
  :root {
    background:white;
    color:#111;
  }
  body {
    background:white;
    font-size:11pt;
  }
  .topbar,.filters,.intro-symbol,.data-status,.sidebar,.page-footer,.meal-switch,.skip-link,.date-popover {
    display:none!important;
  }
  main {
    padding:0;
    max-width:none;
  }
  .intro {
    margin:0 0 15px;
  }
  h1 {
    font-size:22px;
  }
  .intro-description {
    color:#555;
  }
  .eyebrow {
    color:#333;
  }
  .stats {
    gap:10px;
    margin-bottom:18px;
  }
  .stat {
    padding:10px 15px;
  }
  .stat-value {
    font-size:26px;
  }
  .stat-decoration {
    display:none;
  }
  .content-layout {
    display:block;
  }
  .meal-card {
    break-inside:avoid;
    margin-bottom:13px;
  }
  .meal-header {
    padding:10px 16px;
  }
  .group-list {
    padding:0 16px;
  }
  .meal-group {
    padding:10px 0;
  }
  .menu-detail summary {
    display:none;
  }
  .menu-detail p {
    margin-top:4px;
  }
  .special-note {
    color:#573f18;
    background:#faf8f2;
  }
  .extras {
    padding:9px 16px;
  }
  .kitchen-meals {
    display:block;
  }
  .kitchen-meals .meal-card {
    margin-bottom:16px;
  }
  .table-scroll {
    overflow:visible;
  }
  td,th {
    padding:9px 12px;
  }
  .kitchen-note-list {
    display:block;
  }
  .kitchen-note-list .notice-item {
    break-inside:avoid;
    margin-bottom:6px;
  }
  dialog {
    display:none!important;
  }
}
