/* ==========================================================================
   FRISCO — WEB LAYER  (additive only)
   Desktop/tablet layout primitives for the website, admin portal and
   shopkeeper portal. This file introduces NEW class names only. It never
   redefines a class from components.css, so the approved app rendering is
   bit-for-bit unaffected. Every value still reads from tokens.css.
   ========================================================================== */

/* ---------- Web frame: rail + content ------------------------------------ */
.appframe {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}
.rail { display: none; }

@media (min-width: 1024px) {
  .appframe { grid-template-columns: 232px 1fr; }
  .appframe.narrow-rail { grid-template-columns: 76px 1fr; }
  .rail {
    display: flex; flex-direction: column; gap: var(--s-2);
    padding: var(--s-5) var(--s-4);
    border-right: 1px solid var(--line);
    background: var(--surface);
    position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  }
}
.rail-brand { display: flex; align-items: center; gap: 9px; padding: 0 var(--s-2) var(--s-5); }
.rail-brand .bm {
  font-family: var(--font-brand); font-weight: 700; font-size: 1.22rem;
  letter-spacing: -.02em; color: var(--text);
}
.rail-brand .bm-sub {
  font-size: var(--t-2xs); font-weight: var(--w-semibold); color: var(--text-muted); display: block; margin-top: -1px;
}
.railbtn {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px var(--s-3); border-radius: var(--r-btn);
  color: var(--text-2); font-size: var(--t-sm); font-weight: var(--w-semibold);
  text-align: left; width: 100%;
  transition: background var(--d-fast), color var(--d-fast);
}
.railbtn svg { width: 19px; height: 19px; flex: none; }
.railbtn:hover { background: var(--bg-sunken); color: var(--text); }
.railbtn[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.railbtn .rb-count {
  margin-left: auto; font-family: var(--font-mono); font-size: var(--t-label);
  background: var(--accent); color: var(--text-on-rose);
  padding: 2px 7px; border-radius: var(--r-chip);
}
.rail-sep { height: 1px; background: var(--line); margin: var(--s-3) var(--s-2); }
.rail-foot { margin-top: auto; padding-top: var(--s-4); }

/* ---------- Page canvas --------------------------------------------------- */
.webmain { min-width: 0; display: flex; flex-direction: column; }
.webhead {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.webhead-title { display: flex; flex-direction: column; min-width: 0; }
.webbody { padding: var(--s-5); }
@media (min-width: 1024px) { .webbody { padding: var(--s-6) var(--s-7); } }
.wrapmax { max-width: 1180px; margin: 0 auto; width: 100%; }
.wrapnarrow { max-width: 760px; margin: 0 auto; width: 100%; }

/* Mobile: the web surfaces fall back to the app's own bottom nav pattern */
.webnav-mobile { display: flex; }
@media (min-width: 1024px) { .webnav-mobile { display: none; } }
/* ---------- Responsive grids --------------------------------------------- */
.grid-auto { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-sm { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-kpi { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Two tiles a row on a phone instead of one, so a dashboard is not a long scroll of single numbers. */
@media (max-width: 520px) { .grid-kpi { grid-template-columns: 1fr 1fr; } }
/* A short explanatory note directly under a section label. */
.card > .t-label + .t-xs.faint { margin: 2px 0 var(--s-3); }

/* Menu + order pages: content column with a sticky companion panel */
.split-main { display: grid; gap: var(--s-5); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px)  { .split-main { grid-template-columns: 1fr 320px; gap: var(--s-6); } }
@media (min-width: 1280px) { .split-main { grid-template-columns: 1fr 360px; } }
.sticky-panel { position: sticky; top: calc(var(--s-7) + 40px); display: flex; flex-direction: column; gap: var(--s-4); }

/* Menu category rail (desktop only) */
.catrail { display: none; }
@media (min-width: 1024px) {
  .catrail {
    display: flex; flex-direction: column; gap: 2px;
    position: sticky; top: calc(var(--s-7) + 40px);
  }
  .catrail button {
    text-align: left; padding: 8px var(--s-3); border-radius: var(--r-btn);
    font-size: var(--t-sm); font-weight: var(--w-semibold); color: var(--text-muted);
  }
  .catrail button:hover { background: var(--bg-sunken); color: var(--text); }
  .catrail button[aria-pressed="true"] { background: var(--surface-blush); color: var(--accent-text); }
  .menu-3col { display: grid; grid-template-columns: 180px 1fr; gap: var(--s-6); align-items: start; }
}

/* ---------- Data table (admin / shop) ------------------------------------ */
.dtable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.dtable { width: 100%; border-collapse: collapse; min-width: 640px; }
.dtable th {
  text-align: left; padding: 11px var(--s-4);
  font-family: var(--font-ui); font-size: var(--t-xs); letter-spacing: var(--ls-label);
  color: var(--text-muted); font-weight: var(--w-semibold);
  background: var(--bg-sunken); border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0;
}
.dtable td { padding: 12px var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; font-size: var(--t-sm); }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--bg-sunken); }
.dtable .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dtable .actions { display: flex; gap: var(--s-2); justify-content: flex-end; }
.rowmuted td { opacity: .55; }

/* ---------- Forms --------------------------------------------------------- */
.formgrid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .formgrid.two { grid-template-columns: 1fr 1fr; } }
.formrow { display: flex; flex-direction: column; gap: 6px; }
.formrow label { font-family: var(--font-ui); font-size: var(--t-label); letter-spacing: var(--ls-label); font-weight: var(--w-semibold); color: var(--text-2); }
.formrow .hint { font-size: var(--t-xs); line-height: var(--lh-meta); color: var(--text-muted); }
select.input { appearance: none; background-image: none; }
textarea.input { resize: vertical; min-height: 72px; }

/* Segmented control */
.seg { display: inline-flex; background: var(--bg-sunken); padding: 3px; border-radius: var(--r-chip); gap: 2px; }
.seg button {
  padding: 7px 15px; border-radius: var(--r-chip); font-size: var(--t-sm);
  font-weight: var(--w-semibold); color: var(--text-muted); white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ---------- Modal (centred, for admin CRUD) ------------------------------- */
.modalwrap { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s-4); }
.modalwrap .scrim-fixed { position: absolute; inset: 0; background: rgba(26,20,22,.55); backdrop-filter: blur(3px); animation: fade var(--d-base) var(--e-out) both; }
.modal {
  position: relative; width: 100%; max-width: 560px; max-height: 88dvh;
  background: var(--bg); border-radius: var(--r-sheet); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalin var(--d-base) var(--e-out) both;
}
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { padding: var(--s-5) var(--s-5) var(--s-3); display: flex; align-items: flex-start; gap: var(--s-3); }
.modal-body { padding: 0 var(--s-5) var(--s-5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-4); }
.modal-foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: var(--s-3); justify-content: flex-end; }

/* ---------- Location tree ------------------------------------------------- */
.tree { display: flex; flex-direction: column; gap: 2px; }
.treenode {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 9px var(--s-3); border-radius: var(--r-btn); width: 100%; text-align: left;
  transition: background var(--d-fast);
}
.treenode:hover { background: var(--bg-sunken); }
.treenode[aria-selected="true"] { background: var(--surface-blush); }
.treenode .tw { width: 20px; display: grid; place-items: center; color: var(--text-faint); flex: none; }
.tree-kind {
  font-family: var(--font-ui); font-size: var(--t-2xs); font-weight: var(--w-semibold);
  color: var(--text-muted);
  border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: var(--r-chip);
}
.tree-children { padding-left: var(--s-5); border-left: 1px dashed var(--line-strong); margin-left: 15px; display: flex; flex-direction: column; gap: 2px; }

/* Breadcrumb for the picked location */
.crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumb span { font-size: var(--t-sm); font-weight: var(--w-semibold); }
.crumb i { color: var(--text-faint); font-style: normal; }

/* ---------- Login surfaces (admin / shop have their own front door) ------- */
.loginwrap { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .loginwrap { grid-template-columns: 1.05fr .95fr; } }
.login-poster {
  display: none; position: relative; overflow: hidden;
  background: var(--surface-blush); padding: var(--s-9) var(--s-8);
  flex-direction: column; justify-content: flex-end; gap: var(--s-4);
}
@media (min-width: 900px) { .login-poster { display: flex; } }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: var(--s-7) var(--s-5); background: var(--bg); }
.login-card { width: 100%; max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-5); }
.userpick {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; text-align: left;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-tile);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color var(--d-fast), background var(--d-fast);
}
.userpick:hover { border-color: var(--accent); background: var(--accent-faint); }

/* ---------- Status board (shopkeeper, tablet-first) ---------------------- */
.board { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px)  { .board { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .board { grid-template-columns: repeat(4, 1fr); } }
.boardcol { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.boardcol-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  padding: 10px var(--s-3); border-radius: var(--r-tile);
  background: var(--surface); border: 1px solid var(--line);
  position: sticky; top: calc(var(--s-6) + 44px); z-index: 5;
}
.boardcol-head .n {
  font-family: var(--font-display); font-weight: var(--w-bold); font-size: 1.15rem;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}

/* ---------- Permission denial (visible proof of server-side enforcement) -- */
.denied {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4); border-radius: var(--r-tile);
  background: var(--danger-bg); border: 1px solid var(--danger);
}
.auditline {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: var(--s-3);
  padding: 7px var(--s-3); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--t-xs); align-items: center;
}
.auditline:last-child { border-bottom: 0; }

/* ---------- Live location ------------------------------------------------- */
.geopanel {
  position: relative; overflow: hidden;
  border-radius: var(--r-card); border: 1px solid var(--line);
  background: var(--surface); padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3); align-items: center; text-align: center;
}
.geopulse {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-size: 1.6rem;
  position: relative;
}
.geopulse.searching::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: .5;
  animation: ripple 1.6s var(--e-out) infinite;
}
@keyframes ripple { from { transform: scale(.85); opacity: .55 } to { transform: scale(1.25); opacity: 0 } }

/* Campus mini-map: schematic, not a literal map ---------------------------- */
.minimap { width: 100%; border-radius: var(--r-tile); background: var(--bg-sunken); overflow: hidden; }
.minimap svg { width: 100%; height: auto; display: block; }

/* ---------- Utility ------------------------------------------------------- */
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: initial; } .hide-desktop { display: none; } }
.scroll-y { overflow-y: auto; }
.divide > * + * { border-top: 1px solid var(--line); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Food photos (additive) ---------------------------------------
   An item with a photo renders it inside the SAME .item-thumb box the app
   already uses; an item without one keeps the emoji glyph exactly as before.
   Nothing above this block is modified.                                    */
.thumb-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-drop {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border-radius: var(--r-tile);
  border: 1.5px dashed var(--line-strong); background: var(--bg-sunken);
  cursor: pointer; transition: border-color var(--d-fast), background var(--d-fast);
}
.photo-drop:hover { border-color: var(--accent); background: var(--accent-faint); }
.photo-preview {
  width: 68px; height: 68px; border-radius: var(--r-tile); flex: none;
  overflow: hidden; background: var(--surface); display: grid; place-items: center;
  font-size: 1.7rem; border: 1px solid var(--line);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Auth surfaces ------------------------------------------------ */
.authnote {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-tile);
  background: var(--bg-sunken); border: 1px dashed var(--line-strong);
}
.authnote code {
  font-family: var(--font-mono); font-size: .78rem;
  background: var(--surface); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line);
}

/* ==========================================================================
   QUAD — LOGIN GATEWAY
   Additive: new class names only, nothing above is redefined. Uses the
   existing tokens so the gateway is recognisably the same product as the
   surfaces behind it.
   ========================================================================== */
.auth-screen{min-height:100dvh;display:grid;place-items:center;padding:24px;
  background:var(--bg,#FFF6F1)}
.auth-card{width:100%;max-width:380px;background:var(--surface,#fff);
  border:1px solid var(--line,rgba(28,25,23,.09));border-radius:18px;
  padding:32px 28px 26px;display:flex;flex-direction:column;gap:14px;
  box-shadow:0 1px 2px rgba(28,25,23,.04),0 12px 32px -12px rgba(28,25,23,.10)}
.auth-title{font-family:var(--font-display);font-weight:700;
  font-size:26px;letter-spacing:-.02em;margin:10px 0 0;color:var(--text,#1C1917)}
.auth-sub{margin:0;font-size:14px;line-height:1.5;color:var(--text-2,#6B6360)}
.auth-field{display:flex;flex-direction:column;gap:7px;margin-top:6px}
/* A field label reads as a label, not as a system banner: sentence case, no
   tracking. The brand's uppercase treatment stays where it belongs, on the
   lockup and the section labels - not on "Password". */
.auth-label{font-size:13px;font-weight:600;letter-spacing:0;
  color:var(--text-2,#6B6360)}
.auth-phone{display:flex;align-items:center;border:1px solid var(--line,rgba(28,25,23,.14));
  border-radius:11px;overflow:hidden;background:var(--bg-sunken,#FFFBF8)}
.auth-phone:focus-within{border-color:var(--rose-500,#E0567A);
  box-shadow:0 0 0 3px rgba(224,86,122,.13)}
.auth-cc{padding:0 12px;font-family:'DM Mono',monospace;font-size:15px;
  color:var(--text-muted,#6B6360);border-right:1px solid var(--line,rgba(28,25,23,.10));
  align-self:stretch;display:flex;align-items:center}
.auth-input{flex:1;border:0;background:transparent;padding:13px 12px;font:inherit;
  font-size:16px;color:var(--text,#1C1917);outline:none;min-width:0}
/* A field on its own (email, password) gets the same box as the phone field;
   inside .auth-phone the wrapper draws it. Without this the password box
   was invisible: no border, no fill. */
.auth-field > .auth-input:not(.auth-code){border:1px solid var(--text-faint,#8C7A7E);border-radius:11px;
  background:var(--bg-sunken,#FFFBF8)}
.auth-field > .auth-input:not(.auth-code):focus{border-color:var(--rose-500,#E0567A);box-shadow:0 0 0 3px rgba(224,86,122,.13)}
.auth-code{border:1px solid var(--line,rgba(28,25,23,.14));border-radius:11px;
  background:var(--bg-sunken,#FFFBF8);font-family:'DM Mono',monospace;
  font-size:26px;letter-spacing:.42em;text-align:center;padding:14px 12px}
.auth-code:focus{border-color:var(--rose-500,#E0567A);
  box-shadow:0 0 0 3px rgba(224,86,122,.13)}
.auth-btn{margin-top:8px;border:0;border-radius:11px;padding:14px;font:inherit;
  font-weight:600;font-size:15px;cursor:pointer;color:#fff;
  background:var(--ink-900,#1C1917);transition:opacity .15s}
.auth-btn:hover{opacity:.88}
.auth-btn:disabled{opacity:.5;cursor:default}
.auth-error{margin:0;font-size:13.5px;line-height:1.45;color:#A8324E;
  background:rgba(224,86,122,.08);border:1px solid rgba(224,86,122,.20);
  border-radius:9px;padding:10px 12px}
.auth-fine{margin:0;font-size:13px;line-height:1.45;color:var(--text-muted,#6B6360);text-align:center}
.auth-alt{display:flex;justify-content:space-between;gap:12px;margin-top:2px}
.auth-link{border:0;background:none;padding:4px 0;font:inherit;font-size:13px;
  font-weight:600;color:var(--text-2,#6B6360);cursor:pointer;text-decoration:underline;
  text-underline-offset:3px}
.auth-link:disabled{opacity:.45;cursor:default;text-decoration:none}
/* A link on its own line under the button - "Forgot password?", "Back" -
   centred under the form rather than pretending to be a second action. */
.auth-card > .auth-link{align-self:center}
/* A plain statement of fact, not an error: the password-reset screen says
   the same thing whether or not the address belongs to an administrator. */
.auth-note{margin:0;font-size:13.5px;line-height:1.45;color:var(--text-2,#6B6360);
  background:var(--bg-sunken,#FFFBF8);border:1px solid var(--line,rgba(28,25,23,.12));
  border-radius:9px;padding:10px 12px}
.auth-link:not(:disabled):hover{color:var(--rose-600,#C7405F)}
/* Truthful unavailable state — a configuration notice, not a dead form. */
.auth-config{border:1px solid var(--line,rgba(28,25,23,.10));border-radius:11px;
  background:var(--bg-sunken,#FFFBF8);padding:13px 14px;display:flex;
  flex-direction:column;gap:5px}
.auth-config-title{margin:0 0 3px;font-size:12px;font-weight:600;letter-spacing:0;
  color:var(--text-muted,#6B6360)}
.auth-config code{font-family:'DM Mono',monospace;font-size:12.5px;
  color:var(--text-2,#3B3633);word-break:break-all}
@media (prefers-color-scheme:dark){
  .auth-screen{background:var(--bg,#17140F)}
  .auth-btn{background:var(--rose-500,#E0567A)}
}

/* Enrolment code entry — grouped like the code it displays, so a code read
   aloud is easy to check as it is typed. */
.auth-enrol{border:1px solid var(--line,rgba(28,25,23,.14));border-radius:11px;
  background:var(--bg-sunken,#FFFBF8);font-family:'DM Mono',monospace;
  font-size:19px;letter-spacing:.14em;text-align:center;text-transform:uppercase;
  padding:13px 12px}
.auth-enrol:focus{border-color:var(--rose-500,#E0567A);
  box-shadow:0 0 0 3px rgba(224,86,122,.13)}
.enrolcode{font-family:'DM Mono',monospace;font-size:26px;letter-spacing:.16em;
  text-align:center;padding:16px 12px;border-radius:12px;
  background:var(--bg-sunken,#FFFBF8);border:1px dashed var(--rose-500,#E0567A);
  color:var(--text,#1C1917);user-select:all}

/* ==========================================================================
   CUSTOMER WEBSITE FRAME  (additive — scoped to .site)
   The customer screens keep their components exactly; this section only
   changes the frame around them: a real page with a header instead of a
   phone canvas on a stage. Desktop gets width (grids, a side column);
   below 1024px it falls back to the app's own bottom-nav layout.
   ========================================================================== */
.site { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }

/* ---------- header ------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-head-in {
  max-width: 1180px; margin: 0 auto; height: 60px;
  display: flex; align-items: center; gap: var(--s-6);
  padding: 0 var(--s-4);
}
.site-brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-brand); font-weight: 700; font-size: 1.1rem;
  letter-spacing: -.02em; color: var(--text); white-space: nowrap;
}
.site-nav { display: none; gap: var(--s-1); }
/* The current page is underlined, not boxed in a pill. */
.site-nav button {
  padding: 8px 10px; border-radius: 0;
  font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--d-fast), border-color var(--d-fast);
}
.site-nav button:hover { color: var(--text); }
.site-nav button[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.site-icon {
  width: 38px; height: 38px; border-radius: var(--r-chip);
  display: grid; place-items: center; color: var(--text-2);
  border: 1px solid var(--line); background: var(--surface);
}
.site-icon:hover { color: var(--text); border-color: var(--line-strong); }
.site-cartbtn {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 8px 14px 8px 12px; border-radius: var(--r-btn);
  background: var(--surface-ink); color: var(--text-on-ink);
  font-size: var(--t-sm); font-weight: var(--w-semibold);
}
.site-cartbtn svg { width: 17px; height: 17px; }
.site-cartbtn .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-chip);
  background: var(--accent); color: var(--text-on-rose);
  font-size: 11px; display: grid; place-items: center;
}

/* ---------- page --------------------------------------------------------- */
.site-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; }
/* The footer below already clears the fixed bottom nav, so the screen itself
   only needs ordinary breathing room; reserving the nav height in both places
   left a doubled empty band at the bottom of every mobile page. */
.site .screen { overflow: visible; padding-bottom: var(--s-6); }
/* A list filter shows which view is active. */
.btn-ghost[aria-pressed="true"] { background: var(--bg-sunken); color: var(--text); }
.site .topbar { position: static; background: transparent; }
.site .bottomnav { position: fixed; }
.site .scrim { position: fixed; }
.site .sheet { position: fixed; }
.site .toast { position: fixed; }
/* On phones the composer sits above the fixed bottom nav, not under it. */
.site .composer { bottom: var(--nav-h); }
.site-foot {
  border-top: 1px solid var(--line);
  padding: var(--s-6) var(--s-4) calc(var(--nav-h) + var(--s-6));
  text-align: center; color: var(--text-muted); font-size: var(--t-xs);
}
.site .only-lg { display: none; }
.site-foot .foot-link {
  color: var(--accent-text); font-weight: var(--w-semibold); font-size: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}

/* The landing page's one link below the fold: icon, words, chevron. */
.partner-tile { display: flex; align-items: center; gap: var(--s-3); width: 100%; text-align: left; }
.partner-tile > svg:last-child { flex: none; color: var(--text-muted); }

/* Layout helpers used by the customer screens. Single column on phones. */
.cafgrid, .menugrid, .livegrid { display: grid; gap: var(--s-3); }
.menugrid { gap: 0; }
.site-split { display: grid; gap: var(--s-4); align-items: start; }
.narrow { max-width: 640px; margin-inline: auto; width: 100%; }
.reading { max-width: 760px; margin-inline: auto; width: 100%; }

@media (min-width: 720px) {
  .cafgrid { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
  .livegrid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .site-head-in { height: 68px; padding: 0 var(--s-6); }
  .site-nav { display: flex; }
  .site .bottomnav { display: none; }
  .site .composer { bottom: 0; }
  .site .only-lg { display: revert; }
  .site .hide-lg { display: none !important; }
  .site .screen { padding-bottom: var(--s-9); }
  .site .pad { padding-inline: var(--s-6); }
  .site .topbar { padding: var(--s-7) var(--s-6) var(--s-4); }
  .site .topbar .t-h2 { font-size: var(--t-h1); font-weight: var(--w-bold); letter-spacing: -.016em; }
  .site-foot { padding-bottom: var(--s-6); }

  .cafgrid { grid-template-columns: repeat(3, 1fr); }
  .menugrid { grid-template-columns: 1fr 1fr; column-gap: var(--s-7); }
  .menugrid > .item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .site-split { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-6); }
  .site-split > aside { position: sticky; top: calc(68px + var(--s-5)); }
  .site-split > aside .actionbar { position: static; background: none; padding: 0; }
  .site .actionbar.cart-mobile { display: none; }

  /* Heroes are page-width banners with the same tint and type. */
  .site .poster.hero-band { border-radius: var(--r-sheet) !important; margin: var(--s-6) var(--s-6) 0; padding: var(--s-7) var(--s-7) var(--s-7); }
  /* The hero and the sign-in card side by side, with nothing listed under
     them: the café grid that commit addf347 added below is gone. The hero
     keeps its natural height; stretching it to the viewport, as before
     addf347, would leave a large empty block now that the decorative arcs
     and grid are gone (removed by the owner-approved quieter UI). */
  .site .welcome { padding: var(--s-7) var(--s-6) var(--s-9); }
  .site .welcome-fold { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--s-6); align-items: center; }
  .site .welcome-fold > .poster { border-radius: var(--r-card) !important; }
  .site .welcome-fold > .welcome-cta { align-self: center; padding: var(--s-6) !important; }
  .site .welcome > .welcome-info { margin-top: var(--s-7); padding: 0 !important; }

  /* Sheets become centred dialogs. */
  .site .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    width: min(560px, 92vw); max-height: 82vh;
    border-radius: var(--r-sheet);
    transform: translate(-50%, -50%);
    animation: dialogin var(--d-base) var(--e-out) both;
  }
  .site .sheet-grab { display: none; }
  .site .sheet-foot { border-radius: 0 0 var(--r-sheet) var(--r-sheet); }
  .site .toast { bottom: var(--s-7); }
}
@keyframes dialogin {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* Icons in the slots emoji glyphs used to fill, and the dish monogram tile. */
.site .ico { display: inline-grid; place-items: center; flex: none; color: var(--accent-text); }
.site .ico svg { width: 100%; height: 100%; }
.site .toast .ico { color: inherit; }
.site .adminrow .ico, .site .tile .ico { color: var(--text-2); }
.site .empty-art .ico { color: var(--accent-text); }
.site .loccard[aria-pressed="true"] .ico { color: inherit; }
.site .campusnote .ico { margin-top: 1px; }
.site .dish-mono {
  font-family: var(--font-display); font-weight: var(--w-bold); font-size: 1.2rem;
  letter-spacing: -.02em; color: var(--accent-text); opacity: .9;
}
.site .item-thumb { background: var(--surface-blush); }

@media (min-width: 1024px) {
  .site .welcome-fold > .welcome-cta {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-card); box-shadow: var(--shadow-1);
  }
}
@media (min-width: 1024px) {
  .site .partner-hero { border-radius: var(--r-sheet); margin: var(--s-6) var(--s-6) 0; }
}
/* On phones the status card (and its one action) comes before the explainer. */
@media (max-width: 1023.98px) { .site .site-split > aside.first-mobile { order: -1; } }

/* ---------- the student email field -------------------------------------
   The domain is not typed. It sits fixed to the right of the box, so the
   student fills in only what is theirs and the commonest sign-in mistake —
   a personal address, or a typo in the domain — cannot be made.

   On a narrow screen the domain drops onto its own line rather than
   squeezing the input: an enrolment number is long, and a field you cannot
   read what you typed into is worse than one that wraps. */
.emailsplit{display:flex;align-items:stretch;flex-wrap:wrap;
  border:1px solid var(--line,rgba(28,25,23,.14));border-radius:12px;
  overflow:hidden;background:var(--bg-sunken,#FFFBF8)}
.emailsplit:focus-within{border-color:var(--rose-500,#E0567A);
  box-shadow:0 0 0 3px rgba(224,86,122,.13)}
.emailsplit .emailsplit-local{flex:1 1 9ch;min-width:0;border:0;border-radius:0;
  background:transparent;box-shadow:none}
.emailsplit .emailsplit-local:focus{border:0;box-shadow:none}
.emailsplit-domain{display:flex;align-items:center;padding:0 12px;
  font-family:'DM Mono',monospace;font-size:14px;white-space:nowrap;
  color:var(--text-muted,#6B6360);background:rgba(28,25,23,.04);
  border-left:1px solid var(--line,rgba(28,25,23,.10))}
@media (max-width:380px){
  .emailsplit-domain{flex-basis:100%;border-left:0;
    border-top:1px solid var(--line,rgba(28,25,23,.10));padding:8px 12px}
}

/* ---------- campus map ---------------------------------------------------
   OpenStreetMap tiles via Leaflet. The pins are drawn here rather than
   fetched as images, so the map needs one network dependency instead of
   several and matches the product's palette. */
.echo-map{height:260px;width:100%;border-radius:14px;overflow:hidden;
  border:1px solid var(--line,rgba(28,25,23,.14));background:var(--bg-sunken,#FFFBF8);z-index:0}
@media (min-width:900px){ .echo-map{height:320px} }
.map-empty{padding:18px;border-radius:14px;border:1px dashed var(--line,rgba(28,25,23,.18));
  background:var(--bg-sunken,#FFFBF8)}
.echo-pin-wrap{background:none;border:0}
.echo-pin{display:flex;align-items:center;justify-content:center;width:30px;height:30px;
  border-radius:50%;background:var(--pin,#1C1917);color:#fff;font-size:14px;line-height:1;
  box-shadow:0 2px 8px rgba(28,25,23,.35);border:2px solid #fff}
/* The chosen delivery point stays green (it is still a delivery point), with a ring. */
.echo-pin.sel{box-shadow:0 0 0 4px rgba(47,125,95,.35),0 2px 8px rgba(28,25,23,.35);transform:scale(1.12)}
/* A partner position older than a minute: grey and faded, so it is never
   read as where they are now (map.js partnerFreshness). */
.echo-pin.echo-pin-stale{opacity:.7;border-style:dashed}
/* Map type and "my location", top right of the picker. */
.echo-map-tools{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.echo-map-bases{display:flex;background:#fff;overflow:hidden}
.echo-map-bases button,.echo-map-recentre{font:inherit;font-size:12px;font-weight:700;border:0;background:#fff;
  color:#1C1917;padding:7px 10px;min-height:32px;cursor:pointer}
.echo-map-bases button+button{border-left:1px solid rgba(28,25,23,.15)}
.echo-map-bases button[aria-pressed="true"]{background:#1C1917;color:#fff}
.echo-map-bases button:disabled{color:#A8A29E;cursor:not-allowed}
.echo-map-notice{max-width:190px;background:#fff;color:#1C1917;font-size:11px;line-height:1.35;padding:6px 8px;border-radius:8px;box-shadow:0 1px 5px rgba(28,25,23,.3)}
.echo-map-recentre{border-radius:8px;box-shadow:0 1px 5px rgba(28,25,23,.3);color:#2563EB}
.echo-map-choose .leaflet-popup-content{margin:10px}
.echo-map-choose .btn{width:100%}
/* The delivery picker: taller, because choosing a spot is the whole job. */
.echo-map.picker{height:320px;cursor:crosshair}
@media (min-width:900px){ .echo-map.picker{height:380px} }
.echo-map-label{background:#fff;border:0;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:700;
  color:#1C1917;box-shadow:0 1px 4px rgba(28,25,23,.25)}
.echo-map-label::before{display:none}
.segrow{display:grid;grid-template-columns:1fr 1fr;gap:8px}
/* What each thing on the picker map means, in words next to its swatch. */
.maplegend{display:flex;flex-wrap:wrap;gap:4px 14px}
.maplegend span{display:inline-flex;align-items:center;gap:6px}
.maplegend .lg{display:inline-block;width:12px;height:12px;border-radius:50%;flex:none}
.maplegend .lg-dest{background:#2F7D5F;border:2px solid #fff;box-shadow:0 0 0 1px rgba(28,25,23,.25)}
.maplegend .lg-pin{background:#E0567A;border:2px solid #fff;box-shadow:0 0 0 1px rgba(28,25,23,.25)}
.maplegend .lg-live{background:#2563EB;border:2px solid #fff;box-shadow:0 0 0 3px rgba(37,99,235,.25)}
.maplegend .lg-area{border-radius:3px;border:2px dashed #E0567A;background:rgba(224,86,122,.08)}

/* The picker sheet on a phone. It is re-rendered while it is open (a tap's
   answer, a chosen point), so a re-render of the same sheet must not slide
   it in again; its scroll stays inside it rather than dragging the page
   behind; and the confirm button clears the home indicator. */
.sheet.still,.scrim.still{animation:none}
.site .sheet-body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0}
.site .sheet{max-height:88dvh}
.site .sheet-foot{padding-bottom:calc(var(--s-4) + env(safe-area-inset-bottom))}
@media (min-width:1024px){ .site .sheet{max-height:82vh} }
/* Leaflet's own controls, toned to the product rather than its defaults. */
.leaflet-container{font:inherit}
.leaflet-control-attribution{font-size:10px;background:rgba(255,255,255,.82)}

/* ---------- the approved logo ---------------------------------------------
   brand/logo.js renders it; these rules only size and place it. The artwork
   sits on its own cream background, so it is shown as a rounded tile and
   never recoloured, stretched or filtered (object-fit keeps proportions). */
.brand-logo, .brand-mark { display: block; flex: none; object-fit: contain; background: #FEF7E7; }
.brand-logo { border-radius: 22%; }
.brand-mark { border-radius: 26%; }
.brand-lockup { display: inline-flex; align-items: center; gap: 9px; }
.brand-lockup .brand-mark { width: var(--brand-h); height: var(--brand-h); }
/* The wordmark: the brand face at its heaviest, set tight, the second ECHO in
   the accent as the echo of the first (brand/logo.js, wordmark). */
.brand-name { font-family: var(--font-brand); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--text); white-space: nowrap; }
.brand-name .brand-echo { color: var(--accent-text); }
.site-brand .brand-name { font-size: 1.375rem; }
@media (max-width: 480px) { .site-brand .brand-name { font-size: 1.25rem; } }
.rail-brand .brand-name { font-size: 1.125rem; }
/* Phones: the hero, then the sign-in card. */
.welcome-fold { display: flex; flex-direction: column; }
/* Navbar and footer: the COMPLETE logo, scaled to fit (never the head crop,
   never cover-cropped). The rounded corners only ever hide the artwork's
   own cream background: measured on the original, 0 artwork pixels fall
   outside even a 26% radius. */
.brand-logo-nav, .brand-logo-foot { object-fit: contain; border-radius: 15%; }
.brand-lockup .brand-logo-nav { width: var(--brand-h); height: var(--brand-h); }
.site-foot .brand-logo-foot { display: inline-block; width: 22px; height: 22px; vertical-align: middle; margin-right: 4px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.auth-brand .brand-name { font-size: 1.5rem; }
/* The assistant's avatar is the mascot itself, not a lettered tile. Its
   artwork has the cream ground of the original, so on the cream page it
   needs an edge to read as a picture: a hairline, and corners rounded only
   as far as that ground goes (a circle would cut into the burger and tea). */
.ai-mark.ai-mark-logo { background: var(--surface); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; }
.ai-mark.ai-mark-logo .brand-mark { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Ask ECHO ECHO: the page title with the mascot beside it, the one-line
   explainer under it, then the conversation in body text. Suggested
   prompts are choices, set at 500 so they do not outweigh the answers. */
.site .ask-head { align-items: center; gap: var(--s-3); }
.site .ask-head p { margin: 2px 0 0; line-height: var(--lh-meta); }
.site .ask-note { margin-top: auto; }
.site .quick button { font-weight: var(--w-medium); color: var(--text-2); }
.site .quick button:hover { color: var(--accent-text); }
.site .quick button.primary { font-weight: var(--w-semibold); color: var(--text-on-rose); }
.site .composer textarea::placeholder { color: var(--text-muted); }

/* ==========================================================================
   OCT 2026 REFRESH - the customer site  (scoped to .site)
   Quieter surfaces, one accent used on purpose, flat buttons, real touch
   targets, and full-contrast text even when a cafe is closed. No glass, no
   glow, no gradient washes. Every value still reads from tokens.css.
   ========================================================================== */
.site { background: var(--bg); }
.site .bottomnav { background: var(--surface); backdrop-filter: none; }
.site .scrim { backdrop-filter: none; background: rgba(20,14,16,.46); }
.site .actionbar { background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .site .actionbar { border-top: 0; } }
.site .composer { background: var(--bg); }

/* Entrance motion on a NEW screen only: a re-render of the same screen
   (after a tap) does not replay it. */
.site.settled .enter > * { animation: none; }

/* ---------- type ---------- */
/* Headings are set in the brand face again, Bricolage Grotesque, as the first
   design (Sept 2026) had them; #19 (25 Oct) moved them to Manrope and the site
   lost its voice. Kept from #19: the whole-pixel scale and the four weights.
   Reading text, dish names, prices, labels and metadata stay in Manrope. */
.site { --font-display: var(--font-brand); }
.site .t-hero { font-weight: 800; letter-spacing: -.032em; }
.site .t-display { font-weight: var(--w-bold); letter-spacing: -.024em; }
.site .t-h1 { letter-spacing: -.02em; }
.site .t-h2 { font-weight: var(--w-semibold); letter-spacing: -.012em; }
/* Section labels step back: they name a group, the content is what is read. */
.site .t-label { color: var(--text-muted); font-weight: var(--w-semibold); letter-spacing: .005em; }
/* What a student decides on stands forward: the price. */
.site .money { font-weight: var(--w-bold); color: var(--text); }

/* ---------- buttons: flat, 44px+ targets ---------- */
.site .btn { min-height: 44px; }
.site .btn-sm { min-height: 38px; }
.site .btn-lg { min-height: 52px; border-radius: 12px; }
.site .btn-primary, .site .btn-ink { box-shadow: none; }
.site .btn-primary:focus-visible, .site .btn-secondary:focus-visible { outline-offset: 3px; }
.site .btn-secondary { border-width: 1px; border-color: var(--line-strong); }
.site .btn-secondary:hover { border-color: var(--text-faint); color: var(--text); background: var(--surface-2); }
.site .btn:disabled { opacity: .5; }
.site .linkish { align-self: flex-start; padding-inline: 0; color: var(--accent-text); font-weight: var(--w-semibold); }
.site .linkish:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- inputs: 16px text so iPhone Safari does not zoom on focus ---------- */
.site .input { font-size: 16px; padding: 12px 14px; min-height: 48px; border-width: 1px; border-color: var(--line-strong); border-radius: 12px; }
.site textarea.input { min-height: 72px; line-height: 1.45; }
.site .input:hover { border-color: var(--text-faint); }
.site .field { gap: 6px; }

/* ---------- surfaces ---------- */
.site .card { border-radius: 16px; border-color: var(--line); }
.site .card-raise { box-shadow: var(--shadow-2); border-color: var(--line); }
.site .tile { border-radius: 14px; border-color: var(--line); transition: border-color var(--d-fast), background var(--d-fast); }
.site button.tile:hover { border-color: var(--line-strong); background: var(--surface-2); }
.site .campusnote { background: var(--surface-2); border-color: var(--line); border-radius: 12px; }
.site .campusnote.is-ok { background: var(--ok-bg); border-color: transparent; }
.site .campusnote.is-ok .ico { color: var(--ok); }
.site .campusnote.is-warn { background: var(--warn-bg); border-color: transparent; }
.site .campusnote.is-warn .ico { color: var(--warn); }
.site .empty-art { background: var(--bg-sunken); }

/* ---------- chips ---------- */
.site .chip { border-radius: 999px; padding: 8px 14px; min-height: 38px; border-color: var(--line-strong); font-weight: 600; }
.site .chip:hover { border-color: var(--text-faint); }
.site .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.site .chip-place .ico { color: var(--accent-text); }
.site .chip-place[aria-pressed="true"] .ico { color: inherit; }

/* ---------- home ---------- */
.homehead { padding: var(--s-5) var(--s-4) var(--s-2); display: flex; flex-direction: column; gap: 6px; }
.homehead h1 { margin: 0; }
.homehead .homehead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); }
@media (min-width: 1024px) { .homehead { padding: var(--s-8) var(--s-6) var(--s-3); } }

/* ---------- cafe cards: name first, status in words, full contrast ---------- */
.site .cafcard { padding: var(--s-4); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.site .cafcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.site .cafcard.closed { opacity: 1; background: var(--surface-2); }
.site .cafcard.closed .cafmark { filter: saturate(.55); }
.site .cafcard-top { display: flex; align-items: center; gap: 12px; }
.site .cafcard .cafmark { width: 48px; height: 48px; border-radius: 14px; font-size: 1.05rem; }
.site .cafcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
/* A café's status and facts (StatusPill, CafFacts in app.js). Told apart by
   weight and colour rather than boxes: the status is stated (600, with a
   green or red dot; "Closed" in red), the next opening is plain readable text (500), the
   hours and prep time are facts (500, secondary ink), and "No ratings yet"
   is a footnote (400, muted). */
.site .caf-status { font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--text-2); margin-top: 2px; }
.site .caf-status.is-open { color: var(--ok); font-weight: var(--w-semibold); }
.site .status {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: var(--t-xs); font-weight: var(--w-semibold); line-height: var(--lh-meta);
}
/* The green measures 4.2:1 on a café's green header tint, so "Open" is set
   in ink and the live dot carries the green. */
.site .status-open { color: var(--text); }
.site .status-open .dot { background: var(--ok); }
.site .status-closed { color: var(--danger); }
/* A remembered café list: neither Open nor Closed until the server says. */
.site .status-checking { color: var(--text-muted); font-weight: var(--w-medium); }
.site .status-checking .dot { background: var(--text-faint, var(--text-muted)); animation: checking-pulse 1.4s ease-in-out infinite; }
@keyframes checking-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .site .status-checking .dot { animation: none; } }
.site .caffacts { display: flex; flex-direction: column; gap: 4px; font-size: var(--t-xs); line-height: var(--lh-meta); }
.site .caffacts-hours { color: var(--text-2); font-weight: var(--w-medium); }
.site .caffacts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s-4); }
.site .caffact { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--text-2); font-weight: var(--w-medium); }
.site .caffact svg { color: var(--warn); }
.site .caffact b { color: var(--text); font-weight: var(--w-semibold); }
.site .caffact-quiet { color: var(--text-muted); font-weight: var(--w-regular); }
.site .cafhero-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: var(--s-4) 0 6px; font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--text-2); }
.site .cafhero-status .status { font-size: var(--t-sm); }

/* A dish's prep time and rating: one line, broken only at a middot. */
.site .meta-line { display: block; line-height: var(--lh-meta); }
.site .meta-sep { color: var(--text-muted); }
.site .meta-line > span:not(.meta-sep) { white-space: nowrap; }
.site .item-meta { font-size: var(--t-xs); color: var(--text-2); font-weight: var(--w-medium); margin-top: 2px; }
/* "Unavailable" on a dish: stated in the muted grey, not boxed in a pill. */
.site .status-off { white-space: nowrap; font-size: var(--t-xs); font-weight: var(--w-medium); color: var(--text-muted); }
/* "Closed" / "Sold out" under a dish photo: a label, not a button. */
.site .item-add-off { border-color: var(--line-strong); color: var(--text-muted); font-weight: var(--w-medium); box-shadow: none; }

/* ---------- cafe and dish photos ----------
   A photo fills a fixed-ratio frame (object-fit: cover), so nothing shifts
   while it loads. The cafe's tint and mark sit underneath and are what show
   if the photo cannot load. */
.site .cafphoto { position: relative; overflow: hidden; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--r-tile); }
.site .cafphoto picture, .site .cafphoto img { position: absolute; inset: 0; width: 100%; height: 100%; }
.site .cafphoto img { display: block; object-fit: cover; transition: transform .5s var(--e-out); }
.site .cafcard:hover .cafphoto img { transform: scale(1.025); }
.site .cafcard.closed .cafphoto img { filter: saturate(.6); }
.site .cafhero { display: grid; gap: var(--s-4); }
.site .cafhero-photo { aspect-ratio: 2 / 1; border-radius: var(--r-card); }
@media (min-width: 720px) {
  .site .hero-band.has-photo .cafhero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: var(--s-6); }
  .site .cafhero-photo { order: 2; max-height: 240px; }
}
@media (prefers-reduced-motion: reduce) { .site .cafphoto img { transition: none; } .site .cafcard:hover .cafphoto img { transform: none; } }
.site .item-thumb { width: 84px; height: 84px; }
.site .item-thumb.has-photo { background: var(--bg-sunken); }
.site .item-thumb .thumb-photo { position: absolute; inset: 0; }

/* ---------- the delivery spot ---------- */
.site .desttile.is-empty { border-style: dashed; border-color: var(--accent); background: var(--accent-faint); }
.site .desttile.is-empty .ico { color: var(--accent-text); }
.spotok { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); }
.spotok .ico { color: var(--ok); margin-top: 1px; }
.gps-status { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.spin { width: 18px; height: 18px; flex: none; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; } }
.site details.named { border-top: 1px solid var(--line); padding-top: var(--s-3); }
.site details.named > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.site details.named > summary::after { content: "+"; font-size: 1.2rem; color: var(--text-muted); }
.site details.named[open] > summary::after { content: "\2013"; }
.site details.named > summary::-webkit-details-marker { display: none; }
.placerow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.placerow:last-child { border-bottom: 0; }
.placerow-ico, .destwords-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-faint); }
.destwords { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0 2px; border-top: 1px solid var(--line); }

/* ---------- the picker map: tall enough to aim, controls big enough to hit ---------- */
.site .echo-map { border-radius: 14px; border-color: var(--line-strong); }
.site .echo-map.picker { height: min(52vh, 360px); cursor: grab; position: relative; }
@media (min-width: 900px) { .site .echo-map.picker { height: 400px; } }
.echo-map-bases button, .echo-map-recentre { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.echo-map-recentre { color: #1C1917; }
.echo-map-recentre:not(.echo-map-pincentre) { color: #2563EB; }
.echo-map-pincentre { background: #1C1917 !important; color: #fff !important; }
.echo-map-cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 450; pointer-events: none; opacity: .55; }
.echo-map-cross::before, .echo-map-cross::after { content: ""; position: absolute; background: #1C1917; }
.echo-map-cross::before { left: 10px; top: 0; width: 2px; height: 22px; }
.echo-map-cross::after { top: 10px; left: 0; height: 2px; width: 22px; }
.leaflet-marker-draggable .echo-pin { cursor: grab; }
.leaflet-container:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.site .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 36px; }

/* ---------- dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site .cafcard.closed { background: var(--surface); }
}
:root[data-theme="dark"] .site .cafcard.closed { background: var(--surface); }
.echo-map-tools-low { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.echo-map-tools-low .echo-map-recentre { box-shadow: 0 1px 5px rgba(28,25,23,.3); }

/* ---- Campus Control: filter bars, pagers, timelines ---------------------
   Server-side filters sit in one wrapping row; on a phone each control takes
   the full width so nothing scrolls sideways. */
.filterbar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-3); }
.filterbar .input { width: auto; min-width: 150px; flex: 0 1 auto; }
.filterbar input[name="q"] { flex: 1 1 220px; }
.filterbar label { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .filterbar > *, .filterbar .input { flex: 1 1 100%; min-width: 0; } }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-2); margin-top: var(--s-3); flex-wrap: wrap; }
.pager .t-xs { margin-right: auto; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline li { padding: 8px 0 8px 12px; border-left: 2px solid var(--line); font-size: var(--t-sm); }
.timeline li .chip { margin: 0 6px; }

/* ---------- published website settings (Campus Control) ------------------
   The announcement bar, featured dishes, banners, a hero photograph and an
   uploaded logo. Each reads the same tokens as the rest of the site, so a
   published theme recolours them with everything else. */
.site-announce {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px;
  padding: 9px var(--s-4); font-size: var(--t-sm); text-align: center;
  background: var(--accent-faint); color: var(--text); border-bottom: 1px solid var(--line);
}
.site-announce.tone-promo { background: var(--accent-soft); }
.site-announce.tone-alert { background: var(--warn-bg); }
.site-announce .announce-link {
  color: var(--accent-text); font-weight: var(--w-semibold); font-size: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.poster.has-hero-img { min-height: 340px; }
.poster.has-hero-img .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.poster.has-hero-img::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, var(--surface-blush) 38%, color-mix(in srgb, var(--surface-blush) 62%, transparent));
}
.poster.has-hero-img > .stack { z-index: 2; }
.brand-logo-custom { width: auto; object-fit: contain; display: block; }
.site-foot .brand-logo-custom { display: inline-block; vertical-align: middle; }
.site-foot .foot-links { display: block; margin-top: var(--s-2); }
.featured-dishes { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.featured-dish { display: flex; align-items: center; gap: var(--s-3); width: 100%; text-align: left; }
.featured-dish-img { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.banner-row { display: grid; gap: var(--s-3); }
.site-banner { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; background: var(--surface-blush); border-color: transparent; }
.site-banner-img { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
@media (min-width: 1024px) { .banner-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Welcome to ECHO ECHO: Student or Employee ----------------------
   Two equal cards side by side, stacked on a phone. The whole card is the
   control: one button (Student) and one link (Employee), keyboard-reachable
   with a visible focus ring. Choosing grants nothing; it only opens that
   audience's own sign-in. */
.role-screen { min-height: calc(100dvh - 140px); display: grid; place-items: center; padding: var(--s-7) var(--s-4) var(--s-9); }
.role-wrap { width: 100%; max-width: 760px; display: grid; gap: var(--s-7); }
.role-head { text-align: center; display: grid; gap: var(--s-2); }
.role-heading { font-family: var(--font-display); font-size: var(--t-display); font-weight: var(--w-bold); letter-spacing: -0.024em; line-height: var(--lh-snug); margin: 0; }
.role-sub { color: var(--text-muted); font-size: var(--t-body); margin: 0; }
.role-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .role-grid { grid-template-columns: 1fr 1fr; } }
.role-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); text-align: left;
  padding: var(--s-6); min-height: 230px; width: 100%;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  cursor: pointer; font: inherit;
}
.role-card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }
.role-card:active { transform: translateY(1px); box-shadow: var(--shadow-press); }
.role-card:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; border-color: var(--accent); }
.role-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-faint); color: var(--accent-text); margin-bottom: var(--s-2); }
.role-icon svg { width: 24px; height: 24px; }
.role-title { font-family: var(--font-display); font-size: var(--t-h2); font-weight: var(--w-bold); }
.role-body { color: var(--text-muted); font-size: var(--t-sm); line-height: var(--lh-body); flex: 1; }
.role-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-3);
  padding: 10px 16px; border-radius: var(--r-btn); background: var(--accent); color: var(--text-on-rose);
  font-weight: var(--w-semibold); font-size: var(--t-sm);
}
.role-arrow { transition: transform .16s ease; }
.role-card:hover .role-arrow, .role-card:focus-visible .role-arrow { transform: translateX(3px); }
.role-foot { text-align: center; color: var(--text-muted); font-size: var(--t-xs); margin: 0; }
.role-foot a { color: var(--accent-text); font-weight: var(--w-semibold); }
@media (prefers-reduced-motion: reduce) { .role-card, .role-arrow { transition: none; } }

/* ---------- Campus Control authenticator enrolment ------------------------
   The QR code and the typed-out key, shown once to the signed-in account. */
.enrol-card { max-width: 420px; }
.enrol-qr { display: grid; place-items: center; padding: 14px; margin: 6px auto; background: #fff; border-radius: 14px;
  border: 1px solid var(--line); width: 232px; max-width: 100%; }
.enrol-qr svg { width: 200px; height: 200px; display: block; }
.enrol-key summary { cursor: pointer; font-size: var(--t-sm); color: var(--accent-text); font-weight: var(--w-semibold); }
.enrol-secret, .enrolcode { display: block; font-family: var(--font-mono); font-size: 1rem; letter-spacing: .08em;
  word-break: break-all; background: var(--bg-sunken); border-radius: 10px; padding: 10px 12px; user-select: all; }
.enrol-recovery { margin-top: 14px; }
.enrol-recovery code { font-family: var(--font-mono); font-size: .85em; }
.invite-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 14px; }
.invite-facts dt { color: var(--muted, inherit); opacity: .75; }
.invite-facts dd { margin: 0; word-break: break-word; }
.invite-perms { margin: 2px 0 10px; padding-left: 18px; font-size: 13px; }

.share-dot { flex: none; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .25); }
