/* Stundenzettel — made for a phone held in one hand; a desk gets the same column, centred. */
:root {
  --ink: #0e0f13; --ink-2: #3b3d45; --muted: #6f727c; --line: #e3e4e8; --bg: #f6f6f3; --paper: #fff;
  --brand: #ffc400; --brand-ink: #1c1606; --ok: #1e7a3c; --warn: #9a5b00; --bad: #b3261e;
  --r: 14px; --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 560px; margin: 0 auto; padding: 0 14px calc(28px + env(safe-area-inset-bottom)); }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.laden { padding: 40px 0; text-align: center; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* buttons */
.btn { min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; }
.btn-voll { width: 100%; }
.btn-haupt { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-gelb { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-leise { border-color: transparent; background: transparent; color: var(--ink-2); font-weight: 500; }
.btn-rot { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .tag:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* head */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 10px; }
.kopf b { font-size: 17px; }
.kopf small { display: block; color: var(--muted); font-size: 13px; }
.reiter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.reiter button { flex: 1 1 auto; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; }
.reiter button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* cards */
.karte { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.karte h2 { font-size: 16px; margin-bottom: 10px; }
.zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.leise { color: var(--muted); font-size: 14px; }

/* the week */
.woche-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.woche-nav .btn { min-width: var(--tap); padding: 0 12px; }
.woche-nav div { text-align: center; }
.woche-nav b { display: block; }
.tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.tag { min-height: 62px; padding: 6px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); text-align: center; font-size: 12.5px; line-height: 1.25; }
.tag b { display: block; font-size: 14px; }
.tag .num { color: var(--muted); }
.tag.heute { border-color: var(--ink); }
.tag[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tag[aria-current="true"] .num { color: var(--brand-ink); }
.tag.zu { opacity: .55; }

/* a day */
.block { display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--tap); padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-align: left; }
.block .zeit { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.block .wo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block .dauer { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.block.pause { background: var(--bg); color: var(--ink-2); }
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.chips button { min-height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 600; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.summe { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.summe b { font-size: 20px; font-variant-numeric: tabular-nums; }
.hinweis { margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: #fff4d6; color: var(--warn); font-size: 14px; }
.status { font-size: 14px; font-weight: 600; }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); } .status.aus { color: var(--muted); }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 12px 0 5px; }
input, select { width: 100%; min-height: var(--tap); padding: 0 12px; border: 1px solid #c9cbd2; border-radius: 12px; background: #fff; }
/* iOS Safari gives time fields a width of their own and lets them stick out of the card. */
input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }
input[type="time"]::-webkit-date-and-time-value { text-align: left; min-height: 1.45em; }
.paar > * { min-width: 0; }
.fehler { margin-top: 10px; color: var(--bad); font-size: 14px; font-weight: 600; min-height: 1.2em; }
.anmelden { padding-top: 12vh; }
.anmelden h1 { font-size: 24px; }
.anmelden .btn { margin-top: 18px; }

/* sheets */
dialog { width: min(560px, 100%); max-width: 100%; max-height: 92vh; margin: auto auto 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 0; border-radius: 20px 20px 0 0; overflow-y: auto; }
dialog::backdrop { background: rgba(14, 15, 19, .5); }
dialog h2 { font-size: 18px; margin-bottom: 4px; }
dialog .knoepfe { display: flex; gap: 8px; margin-top: 18px; }
dialog .knoepfe .btn { flex: 1; }
@media (min-width: 700px) { dialog { margin: auto; border-radius: 20px; } }
canvas.unterschrift { display: block; width: 100%; aspect-ratio: 3 / 1; border: 1px dashed #b9bbc3; border-radius: 12px; background: #fff; touch-action: none; }

/* tables of the Chef */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 7px 4px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr.gesamt td { font-weight: 700; border-bottom: 0; }
tr.klick { cursor: pointer; }
.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #c9cbd2; }
.punkt.ok { background: var(--ok); } .punkt.warn { background: #e08a00; }
.marke { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #fff4d6; color: var(--warn); font-size: 11.5px; font-weight: 700; }
.legende { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.legende .punkt { margin-left: 8px; }
.legende .punkt:first-child { margin-left: 0; }
.liste > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.liste > div:last-child { border-bottom: 0; }
.liste .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.rollbar { overflow-x: auto; }

#meldung { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 90vw; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#meldung.da { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #meldung { transition: none; } }

/* rows with buttons: the buttons stay together in one line, the name gives way and wraps */
.liste > div > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.liste .gruppe { flex: none; display: flex; gap: 6px; }
.liste .gruppe .btn { white-space: nowrap; }
/* three buttons do not fit beside a name on a phone: name above, buttons below at equal width */
.liste > div.gestapelt { display: block; }
.liste > div.gestapelt .gruppe { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 8px; }
