/* Colors: light by default; dark follows the device ("Automatic") unless the ☰ menu picks Light or Dark.
   --accent-l / --accent-d come from the shop's branding (set once at setup, /brand.json). */
:root { --accent-l:#3A6B8C; --accent-d:#6FA3C7;
        --bg:#f5f3ef; --ink:#1d1b18; --muted:#6b655c; --card:#fff; --line:#ddd6cb; --chip:#e8e2d8;
        --accent:var(--accent-l); --on-accent:#fff;
        --go:#2f7d4f; --stop:#9b2c2c; --pause:#8a6d1f; --radius:14px; color-scheme:light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg:#161514; --ink:#f1ede6; --muted:#a59d90; --card:#211f1d; --line:#3a3632;
        --chip:#34302c; --accent:var(--accent-d); --on-accent:#161514; color-scheme:dark; }
}
:root[data-theme="dark"] { --bg:#161514; --ink:#f1ede6; --muted:#a59d90; --card:#211f1d; --line:#3a3632;
        --chip:#34302c; --accent:var(--accent-d); --on-accent:#161514; color-scheme:dark; }

* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:18px/1.35 -apple-system, system-ui, sans-serif; }
main { max-width:1100px; margin:0 auto; padding:16px 16px 84px; }
.hidden { display:none !important; }
button { font:inherit; border:0; border-radius:var(--radius); padding:14px 18px; background:var(--chip); color:var(--ink);
         min-height:56px; cursor:pointer; }
button.go { background:var(--go); color:#fff; } button.stop { background:var(--stop); color:#fff; }
button.pause { background:var(--pause); color:#fff; } button.brand { background:var(--accent); color:var(--on-accent); }
input:focus-visible, button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* one-line text that shrinks to fit (app.js fitText), then ends in "…" */
.fit { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }

/* the shop's logo: light-mode and dark-mode versions, only the right one shows */
.hlogo img, .llogo img { display:block; width:auto; }
.hlogo img { height:52px; }
img.logo-d { display:none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.logo-l { display:none; }
                                       :root:not([data-theme="light"]) img.logo-d { display:block; } }
:root[data-theme="dark"] img.logo-l { display:none; } :root[data-theme="dark"] img.logo-d { display:block; }
.llogo { display:flex; justify-content:center; margin:8px 0 18px; }
.llogo img { height:min(26vh, 200px); }
.wordmark { font-weight:800; color:var(--accent); letter-spacing:.02em; }
.hlogo.wordmark { font-size:18px; }
.llogo.wordmark { font-size:32px; }

/* header: logo · who's signed in · ☰ */
header { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; margin-bottom:14px; }
header .hlogo { justify-self:start; }
header h1 { margin:0; font-size:22px; text-align:center; max-width:60vw; }
.menu-btn { justify-self:end; min-height:48px; min-width:52px; padding:6px 12px; font-size:24px; line-height:1;
            background:transparent; color:var(--ink); }
.menu-wrap { position:fixed; inset:0; background:rgba(0,0,0,.25); z-index:20; }
.menu { position:absolute; top:12px; right:12px; width:min(300px, calc(100vw - 24px)); background:var(--card);
        border:1px solid var(--line); border-radius:var(--radius); padding:6px; display:grid; gap:4px;
        box-shadow:0 10px 30px rgba(0,0,0,.25); }
.mitem { text-align:left; background:transparent; min-height:52px; padding:12px 14px; font-size:18px; }
.mitem:hover { background:var(--chip); }
.mitem.quiet { color:var(--muted); border-top:1px solid var(--line); border-radius:0 0 10px 10px; }

/* department tabs: an even grid that reflows to the screen */
.tabs { display:grid; grid-template-columns:repeat(auto-fit, minmax(104px, 1fr)); gap:8px; margin-bottom:14px; }
.tabs button { min-height:46px; padding:8px 6px; font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tabs button.on { background:var(--accent); color:var(--on-accent); font-weight:600; }
.tabs button.htab { grid-column:1 / -1; }

/* job cards: title · what the piece is · (small, italic) artist and due date */
.list { display:grid; gap:10px; }
.row { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; text-align:left;
       display:grid; gap:4px; width:100%; min-height:68px; align-content:center; }
.row .rtitle { font-weight:700; font-size:20px; }
.row .desc { font-size:16px; color:var(--ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
             overflow:hidden; }
.row .rmeta { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:14px;
              font-style:italic; min-width:0; margin-top:2px; }
.row .rmeta span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row .rmeta span:last-child { flex-shrink:0; }
.row.brand { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
h2 { font-size:16px; color:var(--muted); margin:20px 0 8px; text-transform:uppercase; letter-spacing:.04em; }
input[type=search] { width:100%; font:inherit; padding:14px; border-radius:var(--radius); border:1px solid var(--line);
                     background:var(--card); color:var(--ink); }
.searchbar { margin-bottom:10px; }
.results:not(:empty) { margin-bottom:14px; }

/* in a job */
.job { text-align:center; padding-top:8px; }
.job .piece { font-size:34px; font-weight:700; } .job .who { color:var(--muted); font-size:20px; }
.timer { font-size:clamp(56px, 17vw, 88px); font-variant-numeric:tabular-nums; margin:16px 0 6px; letter-spacing:.02em; }
.sub { font-size:20px; color:var(--muted); margin:0 0 18px; font-variant-numeric:tabular-nums; }
.actions { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; margin-top:12px; }
button.big { font-size:24px; min-height:84px; }
.actions.three { grid-template-columns:repeat(3, 1fr); }
.actions.three button.big { font-size:20px; min-height:64px; padding:10px 6px; }

/* the last Complete, undoable for 5 minutes */
.undo { display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--go);
        border-radius:var(--radius); padding:8px 8px 8px 14px; margin-bottom:10px; }
.undo span { flex:1; color:var(--go); font-weight:600; }
.undo button { min-height:44px; padding:8px 16px; font-size:16px; flex-shrink:0; }

/* sign in */
.pad { display:grid; grid-template-columns:repeat(3, minmax(80px, 110px)); gap:12px; justify-content:center; margin:24px 0; }
.pad button { font-size:32px; min-height:84px; }
.pad button.go { background:var(--accent); color:var(--on-accent); }
.pin { font-size:40px; letter-spacing:.4em; text-align:center; min-height:56px; }

.banner { background:#fff4d6; border-bottom:1px solid #e8d38c; padding:12px 16px; text-align:center; }
:root[data-theme="dark"] .banner { background:#3b3220; border-color:#5b4b25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner { background:#3b3220; border-color:#5b4b25; } }
.toast { position:fixed; left:50%; bottom:72px; transform:translateX(-50%); background:var(--ink); color:var(--bg);
         padding:14px 20px; border-radius:var(--radius); max-width:90%; z-index:30; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:20; }
.modal > div { background:var(--card); border-radius:var(--radius); padding:24px; width:min(520px, 92%); }
.hours div { display:flex; justify-content:space-between; font-size:22px; padding:8px 0; border-bottom:1px solid var(--line); }
.foot { position:fixed; left:0; right:0; bottom:0; display:flex; justify-content:center; gap:32px;
        padding:10px 16px calc(10px + env(safe-area-inset-bottom)); font-size:15px; color:var(--muted);
        background:var(--bg); border-top:1px solid var(--line); font-variant-numeric:tabular-nums; }
.foot b { color:var(--ink); font-weight:600; }

/* phones */
@media (max-width: 640px) {
  main { padding:12px 12px 84px; }
  header { gap:8px; }
  .hlogo img { height:44px; }
  header h1 { font-size:19px; }
  .tabs { grid-template-columns:repeat(3, 1fr); }
  .tabs button { font-size:15px; min-height:42px; }
  .row .rtitle { font-size:18px; }
  .row .desc { font-size:15px; }
  .row .rmeta { font-size:13px; }
  .job .piece { font-size:28px; } .job .who { font-size:17px; }
  .sub { font-size:17px; }
  .actions { grid-template-columns:repeat(2, 1fr); gap:10px; }
  button.big { font-size:20px; min-height:68px; }
  .actions.three button.big { font-size:17px; min-height:58px; }
}
