/* ui · shape: Index (student: Heute, Woche, Bestellen) · theme: from nasa.digi-works.org via tokens.css (Plex Sans/Mono + Newsreader, ink primary, colour only for meaning) · nav: bottom dock on the phone, top bar from 768 px · footer: none · tone: utilitarian-warm */
/* Boards "Bestellen · Handy", "Heute · Handy", "Woche · Handy", "Allergene" and "Woche · Laptop" of docs/sketches/vision.html,
   on the card language of library.css. Everything here is scoped to the student shell. */
:root {
  --size-thumb-part: 44px; --size-thumb-row: 72px; --size-thumb-day: 40px;
  --size-week: 1240px;
}

/* Shell: the bottom dock on the phone (app.css); from 768 px the dock moves into the top bar, as on the laptop board */
.role-student .shell-panel > h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.role-student .shell-panel.week-wide { max-width: var(--size-week); width: 100%; }
@media (min-width: 768px) {
  .shell.role-student { grid-template-columns: minmax(0, 1fr) auto; }
  .role-student .shell-head { grid-column: 1; grid-row: 1; }
  .role-student .dock { grid-column: 2; grid-row: 1; grid-auto-flow: column; grid-auto-columns: auto; align-content: center; gap: var(--space-2xs); padding: 0 var(--space-sm); border-right: 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
  .role-student .dock button { padding: 0 var(--space-xs); }
  .role-student .shell-panel { grid-column: 1 / -1; }
}

.role-student .essen { display: grid; gap: var(--space-sm); }
.role-student .stack { gap: var(--space-xs); }
.role-student .sum { font-family: var(--font-voice); font-size: var(--text-lg); line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }

/* Cards (vision.html: photo on top, title with the one key value, a pill, the mono meta row, divider, parts) */
.role-student .mcard { align-content: start; }
.role-student .mcard.is-picked { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-card); }
.role-student .mcard.is-picked:not(.wcard) .ph { aspect-ratio: 2 / 1; }
.role-student .mcard .title { font-size: var(--text-base); font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.role-student .mcard .sub { display: block; font-size: var(--text-sm); color: var(--color-ink-2); overflow-wrap: anywhere; hyphens: auto; }
.role-student .pill.state { background: var(--color-accent); color: var(--color-on-accent); }
.role-student .meta-row { align-items: center; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); }
.role-student .meta-row > span:not(.codes) { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.role-student .ico { width: 16px; height: 16px; flex: none; color: var(--color-ink-3); }
.role-student .card-open { display: grid; gap: 2px; min-height: var(--size-touch); padding: 0; font: inherit; text-align: left; color: var(--color-ink); background: none; border: 0; cursor: pointer; }
.role-student .line-open { min-height: var(--size-touch); width: 100%; padding: 0; font-family: var(--font-mono); text-align: left; background: none; border: 0; cursor: pointer; }
.score { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--color-ink); }
.score svg { width: 14px; height: 14px; fill: var(--color-star); }
.role-student .new { font-size: var(--text-xs); color: var(--color-ink-3); white-space: nowrap; }
.role-student .codes-btn { gap: var(--space-3xs); }
.role-student .codes i { width: 22px; height: 22px; }
.role-student .codes i svg { width: 14px; height: 14px; }

/* Parts inside the picked card: a dropped part keeps its text readable, struck through; only its photo dims */
.part { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-3xs) 0; }
.part .pthumb { width: var(--size-thumb-part); height: var(--size-thumb-part); flex: none; border-radius: 10px; object-fit: cover; display: block; background: var(--color-photo); }
.part .grow { flex: 1; min-width: 0; display: grid; gap: 0; }
.part .label { font-weight: 500; font-size: var(--text-sm); overflow-wrap: anywhere; hyphens: auto; }
.part .line2 { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2xs); }
.part.off .pthumb { opacity: var(--opacity-dropped); filter: grayscale(1); }
.part.off .label { color: var(--color-ink-2); text-decoration: line-through; }
.toggle { display: inline-flex; align-items: center; min-height: var(--size-touch); min-width: var(--size-touch); padding: 0 var(--space-2xs); margin-right: calc(-1 * var(--space-2xs)); font: inherit; font-size: var(--text-sm); color: var(--color-link); background: none; border: 0; cursor: pointer; }
.part.off .toggle { color: var(--color-ink); font-weight: 500; }

/* Compact card: thumbnail left, for the line that is not picked and for the next meals */
.role-student .mcard.row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs); padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-2xs); width: 100%; font: inherit; text-align: left; color: var(--color-ink); }
.role-student button.mcard { cursor: pointer; }
.role-student button.mcard:hover { border-color: var(--color-ink-3); }
.role-student button.mcard:focus-visible, .wcard .pick:focus-visible, .meal-row:focus-visible, .card-open:focus-visible, .line-open:focus-visible { outline: var(--rule-thick) solid var(--color-focus); outline-offset: 2px; }
.role-student .mcard.row .rthumb { width: var(--size-thumb-row); height: var(--size-thumb-row); border-radius: var(--radius-inset); object-fit: cover; display: block; background: var(--color-photo); }
.role-student .mcard.row .grow { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.role-student .mcard.row .label { font-weight: 500; overflow-wrap: anywhere; hyphens: auto; }
.role-student .mcard.row .sub { font-size: var(--text-sm); color: var(--color-ink-2); overflow-wrap: anywhere; hyphens: auto; }
.role-student .mcard.row.text { grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-2xs) var(--space-sm); min-height: calc(var(--size-touch) + var(--space-sm)); }
.role-student .mcard.row .toggle { margin-right: 0; }

/* Order screen */
.deadline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-3xs) var(--space-sm); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); }
.notice { font-size: var(--text-sm); color: var(--color-ink); padding: var(--space-2xs) var(--space-xs); border: var(--rule-hair) solid var(--color-rule); border-left: var(--rule-thick) solid var(--color-ink); border-radius: var(--radius-sm); background: var(--color-card); overflow-wrap: anywhere; }
.notice.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); padding-block: var(--space-3xs); }
.order-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); align-items: center; }
.optout { justify-self: center; }
.role-student .link:disabled { color: var(--color-ink-3); cursor: default; }

/* Week on the phone: one card per day, Mittag and Abend as rows */
.week-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); }
.week-head .title { font-size: var(--text-lg); font-weight: 500; }
.week-head .meta { font-family: var(--font-mono); font-size: var(--text-xs); }
.role-student .nav-btn:disabled { color: var(--color-ink-3); cursor: default; background: none; }
.day-card { padding: var(--space-xs) var(--space-sm); gap: var(--space-3xs); }
.day-card > b { font-size: var(--text-sm); font-weight: 500; font-family: var(--font-mono); }
.meal-row { display: grid; grid-template-columns: var(--size-thumb-day) minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs); min-height: var(--size-touch); padding: var(--space-3xs) 0; width: 100%; font: inherit; font-size: var(--text-sm); text-align: left; color: var(--color-ink); background: none; border: 0; }
button.meal-row { cursor: pointer; }
.meal-row .mthumb, .meal-row .blank { width: var(--size-thumb-day); height: var(--size-thumb-day); border-radius: 10px; object-fit: cover; display: block; }
.meal-row .mthumb.blank { background: var(--color-photo); }
.meal-row > .blank { border: var(--rule-hair) dashed var(--color-rule); }
.meal-row .grow { display: grid; min-width: 0; }
.meal-row .grow span { overflow-wrap: anywhere; hyphens: auto; }
.meal-row .grow .when { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-3); }
/* The notice line of a list row: what the chef changed on an order (removed, emptied, added). Ink, not colour. */
.row-notice { display: block; font-size: var(--text-xs); font-weight: 500; color: var(--color-ink); padding-left: var(--space-2xs); border-left: var(--rule-thick) solid var(--color-ink); overflow-wrap: anywhere; }
.role-student .mcard.row.marked { border-color: var(--color-ink); }
.meal-row .toggle { margin-right: 0; }

/* Week on the laptop: seven day columns on one grid, rows header · Fleisch · Vegan · foot (subgrid), so every vegan card
   starts at the same height */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto auto auto auto; gap: var(--space-xs); }
.day-col { display: grid; grid-row: span 4; grid-template-rows: subgrid; min-width: 0; }
.day-col > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 var(--space-3xs); font-size: var(--text-sm); }
.day-col > header b { font-weight: 500; font-family: var(--font-mono); }
.day-col > header span { font-size: var(--text-xs); color: var(--color-ink-3); }
.day-col > header span.open { color: var(--color-link); font-weight: 500; }
.day-col .none { grid-row: span 3; font-size: var(--text-sm); color: var(--color-ink-3); padding: var(--space-sm) 0; border-top: var(--rule-hair) dashed var(--color-rule); }
.wcard { align-content: start; }
.wcard .pick { display: grid; padding: 0; font: inherit; text-align: left; color: var(--color-ink); background: none; border: 0; cursor: pointer; }
.wcard .pick:disabled { cursor: default; }
.wcard .pick[aria-pressed="true"] { cursor: default; }
.wcard .ph { aspect-ratio: 2 / 1; }
.wcard .ph.empty span { font-size: var(--text-base); }
.wcard .ph .note { font-size: 10px; padding: 0 var(--space-3xs); left: var(--space-3xs); bottom: var(--space-3xs); }
.wcard .body { display: grid; padding: var(--space-2xs) var(--space-xs) 0; gap: var(--space-3xs); }
.wcard .kind { font-size: var(--text-xs); color: var(--color-ink-3); }
.wcard .name { font-weight: 500; font-size: var(--text-sm); line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.wcard .line2 { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2xs); padding: 0 var(--space-xs) var(--space-2xs); }
.wcard .codes i { width: 20px; height: 20px; }
.wcard.not .ph img, .wcard.not .ph.empty { opacity: var(--opacity-dropped); }
.mini-parts { display: grid; margin: 0 var(--space-xs) var(--space-2xs); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-xs); }
.mini-parts > div { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3xs); min-height: var(--size-touch); }
.mini-parts > div > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.mini-parts .t { min-height: var(--size-touch); min-width: var(--size-touch); padding: 0; font: inherit; color: var(--color-link); background: none; border: 0; cursor: pointer; text-align: right; }
.mini-parts .off > span { text-decoration: line-through; color: var(--color-ink-2); }
.mini-parts .off .t { color: var(--color-ink); font-weight: 500; }
.col-foot { display: grid; align-content: start; gap: var(--space-3xs); font-size: var(--text-xs); }
.col-foot .notice { font-size: var(--text-xs); padding: var(--space-3xs) var(--space-2xs); }
.col-foot .error { font-size: var(--text-xs); }
.order-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-xs) var(--space-md); padding-top: var(--space-sm); }
.saved { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); }

/* Allergen sheet: the grab handle of the bottom sheet (the sheet itself is library.css) */
dialog.sheet::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--color-rule); justify-self: center; }
@media (min-width: 768px) { dialog.sheet::before { display: none; } }
