/* ui · shape: Index (student Bewerten) + Workbench (chef Feedback) · theme: from nasa.digi-works.org via tokens.css (Plex Sans/Mono + Newsreader, ink primary, yellow only for stars) · nav: dock (app.css, student.css) · footer: none · tone: utilitarian-warm */
/* Board "Bewerten · Handy" of docs/sketches/vision.html (photo-top card, one row per kept card, outlined empty stars,
   one comment box) and the content of docs/sketches/feedback.html on the same card language. */
:root { --size-star: 28px; --size-thumb-fb: 56px; --size-comment: 96px; }

/* Dock: the open count next to "Bewerten" (mono number, no colour) */
.dock .count { margin-left: var(--space-3xs); font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--color-ink); }

/* Bewerten */
.bewerten { display: grid; gap: var(--space-sm); }
.bewerten .when { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-3); }
.rate-card .ph { aspect-ratio: 2 / 1; }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-2xs); min-height: var(--size-touch); }
.rate-row .who { min-width: 0; font-weight: 500; font-size: var(--text-sm); overflow-wrap: anywhere; hyphens: auto; }

/* Stars: a radiogroup of five 44 px buttons; empty stars are outlined in ink-3 (≥ 3:1 on the card), checked ones filled */
.stars { display: flex; margin-right: calc(-1 * var(--space-2xs)); }
.stars button { display: grid; place-items: center; width: var(--size-touch); height: var(--size-touch); padding: 0; color: var(--color-ink-3); background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.stars button svg { width: var(--size-star); height: var(--size-star); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.stars button.on { color: var(--color-star); }
.stars button.on svg { fill: currentColor; }
.stars button:hover:not(:disabled):not(.on) { color: var(--color-ink-2); }
.stars button:active:not(:disabled) svg { transform: scale(0.92); }
.stars button:focus-visible { outline: var(--rule-thick) solid var(--color-focus); outline-offset: -2px; }
.stars button:disabled { cursor: progress; opacity: 0.6; }

.comment-field { font-size: var(--text-sm); color: var(--color-ink-2); }
.bewerten textarea { width: 100%; min-height: var(--size-comment); margin-top: calc(-1 * var(--space-2xs)); padding: var(--space-2xs) var(--space-xs); font: inherit; color: var(--color-ink); background: var(--color-card); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-md); resize: vertical; }
.bewerten textarea:hover:not(:disabled) { border-color: var(--color-ink-3); }
.bewerten textarea:focus-visible { outline: var(--rule-thick) solid var(--color-focus); outline-offset: 2px; }
.bewerten textarea:disabled { opacity: 0.6; }
.counter { justify-self: end; margin-top: calc(-1 * var(--space-2xs)); font-family: var(--font-mono); font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: var(--color-ink-3); }
.bewerten .actions .btn { flex: 1 1 auto; }
.rate-status:empty { display: none; }

/* Feedback (chef): the dish list, and the dish beside it from 900 px */
.feedback { display: grid; gap: var(--space-sm); align-items: start; }
.feedback > .sum { font-family: var(--font-voice); font-size: var(--text-lg); line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.fb-list { display: grid; gap: var(--space-xs); }
.fb-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-xs); min-height: var(--size-touch); padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-2xs); font: inherit; text-align: left; color: var(--color-ink); background: var(--color-card); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); cursor: pointer; }
.fb-row:hover { border-color: var(--color-ink-3); }
.fb-row:focus-visible { outline: var(--rule-thick) solid var(--color-focus); outline-offset: 2px; }
.fb-row[aria-pressed="true"] { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-card); }
.fb-thumb { width: var(--size-thumb-fb); height: var(--size-thumb-fb); border-radius: var(--radius-inset); object-fit: cover; display: block; background: var(--color-photo); }
.fb-row .grow { display: grid; gap: 2px; min-width: 0; }
.fb-row .label { font-weight: 500; overflow-wrap: anywhere; hyphens: auto; }
.fb-row .sub, .fb-serving .sub { font-size: var(--text-sm); color: var(--color-ink-2); }
.feedback .new { font-size: var(--text-xs); color: var(--color-ink-3); white-space: nowrap; }
.feedback .score { font-size: var(--text-base); }

.fb-detail { display: grid; gap: var(--space-xs); padding: var(--space-sm); background: var(--color-card); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.fb-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2xs) var(--space-sm); }
.fb-head h2 { font-size: var(--text-lg); font-weight: 500; overflow-wrap: anywhere; hyphens: auto; }
.fb-rows { display: grid; }
.fb-serving { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-sm); min-height: var(--size-touch); border-top: var(--rule-hair) solid var(--color-rule); }
.fb-serving .when { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-2); overflow-wrap: anywhere; }
.fb-comment { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-2xs) 0; border-top: var(--rule-hair) solid var(--color-rule); }
.fb-comment .grow { display: grid; gap: 2px; min-width: 0; }
.fb-comment .grow > p:first-child { overflow-wrap: anywhere; white-space: pre-line; }
.fb-comment .link { flex: none; }
.fb-comment .link:disabled { color: var(--color-ink-3); cursor: progress; }

/* Narrow phones: the count goes under the date, the average stays on the right */
@media (max-width: 399px) {
  .fb-serving { grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--space-sm); padding: var(--space-3xs) 0; }
  .fb-serving .sub { grid-column: 1; grid-row: 2; }
  .fb-serving > :last-child { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 899px) {
  .feedback:not(.picked) .fb-detail { display: none; }
  .feedback.picked .fb-list, .feedback.picked > .sum { display: none; }
}
@media (min-width: 900px) {
  .feedback { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .feedback > .sum { grid-column: 1 / -1; }
  .fb-detail .back { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stars button:active:not(:disabled) svg { transform: none; }
}
