/* Base styles + design tokens (docs/04-ui-ux-guidelines.md). Re-theme by editing :root only. */
:root {
  --primary: #0F766E; --primary-dark: #115E59; --primary-soft: #CCFBF1;
  --accent: #F97316; --accent-soft: #FFEDD5;
  --bg: #FFF8F1; --surface: #FFFFFF; --text: #1F2937; --muted: #6B7280; --border: #E5E7EB;
  --success: #16A34A; --warning: #D97706; --danger: #DC2626; --neutral: #9CA3AF;
  --radius: 14px; --radius-sm: 8px;
  --shadow: 0 4px 14px rgba(15, 118, 110, .08);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --speed: 200ms;
  --head-bg: #F0FDFA; --chip: #F3F4F6; --track: #E5E7EB; --bg-admin: #F6F7F5; --hl: #FFFBEB;
  --warn-bg: #FEF3C7; --warn-fg: #92400E; --danger-bg: #FEE2E2; --danger-fg: #991B1B; --ok-bg: #DCFCE7; --ok-fg: #166534;
  --sky1: #7DD3FC; --sky2: #BAE6FD;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 .4em; line-height: 1.25; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.hide { display: none !important; }
[hidden] { display: none !important; }
.btn.ghost.danger-text { color: var(--danger); border-color: var(--danger); } .btn.ghost.danger-text:hover { background: var(--danger-bg); }   /* employee + admin pages */   /* the hidden attribute must win over .btn / .badge display rules */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 2px solid transparent; border-radius: 999px; background: var(--primary); color: #fff; font: 600 1rem var(--font-body); cursor: pointer; text-decoration: none; transition: transform var(--speed), background var(--speed), box-shadow var(--speed); }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.accent { background: var(--accent); } .btn.accent:hover { background: #EA580C; }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--primary); } .btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: var(--danger); } .btn.sm { min-height: 44px; padding: 0 14px; font-size: .9rem; }
.btn.icon { padding: 0; width: 44px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }

/* Cards, badges */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--border); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--chip); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.success { background: var(--ok-bg); color: var(--ok-fg); } .badge.warning { background: var(--warn-bg); color: var(--warn-fg); }
.badge.danger { background: var(--danger-bg); color: var(--danger-fg); } .badge.neutral { background: var(--chip); color: #4B5563; }
.badge.info { background: var(--primary-soft); color: var(--primary-dark); } .badge.accent { background: var(--accent-soft); color: #9A3412; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
input, select, textarea { width: 100%; min-height: 44px; padding: 8px 12px; font: 1rem var(--font-body); color: var(--text); background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-sm); transition: border-color var(--speed); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.err { color: var(--danger); font-size: .85rem; margin-top: 4px; display: none; } .field.invalid .err { display: block; }
.pw { position: relative; } .pw button { position: absolute; right: 2px; top: 0; height: 44px; width: 44px; background: none; border: 0; color: var(--muted); cursor: pointer; }
.pw input { padding-right: 48px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.switch input { width: 48px; height: 28px; min-height: 0; appearance: none; background: var(--border); border-radius: 999px; position: relative; border: 0; cursor: pointer; transition: background var(--speed); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: transform var(--speed); }
.switch input:checked { background: var(--primary); } .switch input:checked::after { transform: translateX(20px); }
.grid2 { display: grid; gap: 14px; } .grid3 { display: grid; gap: 14px; } .grid4 { display: grid; gap: 14px; }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(2, 1fr); } .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid3 { grid-template-columns: repeat(3, 1fr); } .grid4 { grid-template-columns: repeat(4, 1fr); } }

/* Meal session colour: tag (L1 on its colour) and dot. Colour comes from --sc (set inline per session). */
.stag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--sc, var(--primary)); color: #fff; font: 700 .85em var(--font-body); letter-spacing: .03em; line-height: 1.5; vertical-align: 1px; white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sc, var(--primary)); margin-right: 6px; vertical-align: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* Menu food items as bullets (admin Meals page + employee meal cards) */
ul.items { margin: 6px 0 4px; padding-left: 18px; font-size: .85rem; color: var(--muted); line-height: 1.45; }
ul.items li { margin: 1px 0; } ul.items li::marker { color: var(--primary); }
/* Food item editor: one input per bullet */
ul.item-edit { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
ul.item-edit li { display: flex; align-items: center; gap: 6px; }
ul.item-edit li::before { content: "•"; color: var(--primary); font-weight: 700; width: 10px; flex: none; }
ul.item-edit input { min-height: 38px; padding: 6px 10px; }
ul.item-edit .btn.icon { min-height: 34px; width: 34px; flex: none; border-width: 1px; }

/* Toasts, dialogs, sheet */
#toasts { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: pop 220ms ease; max-width: 420px; display: flex; gap: 8px; align-items: center; }
.toast.success { background: var(--success); } .toast.error { background: var(--danger); }
.overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .5); z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; }
.overlay.open { display: flex; }
.dialog { background: var(--surface); border-radius: var(--radius); padding: 22px; width: 100%; max-width: 420px; animation: pop 200ms ease; }
.dialog.wide { max-width: 640px; max-height: 90vh; overflow: auto; }
.sheet-wrap { align-items: flex-end; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 22px 18px 24px; animation: slideup 240ms ease; max-height: 92vh; overflow: auto; }
@media (min-width: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: var(--radius); } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Tabs, banner, empty, skeleton */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.tab { flex: none; min-height: 44px; padding: 0 16px; border: 2px solid var(--border); background: var(--surface); border-radius: 999px; font: 600 .95rem var(--font-body); color: var(--muted); cursor: pointer; transition: all var(--speed); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.banner { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.banner.closed { background: var(--danger-bg); color: var(--danger-fg); } .banner.info { background: var(--primary-soft); color: var(--primary-dark); } .banner.warn { background: var(--warn-bg); color: var(--warn-fg); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); } .empty svg.ill { width: 150px; margin: 0 auto 10px; }
.skeleton { background: linear-gradient(90deg, #eee 25%, #f7f7f7 37%, #eee 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 74px; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.hero { background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 60%, var(--bg) 100%); position: relative; overflow: hidden; }
.hero svg.scene { display: block; width: 100%; height: auto; }

/* Table → cards on phone */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .93rem; }
.tbl th { text-align: left; background: var(--head-bg); color: var(--primary-dark); padding: 10px 12px; font-weight: 600; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.tbl tr.hl td { background: var(--hl); } .tbl tr.void td { text-decoration: line-through; color: var(--neutral); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl tfoot td { font-weight: 700; background: var(--head-bg); }
@media (max-width: 599px) {
  table.tbl, .tbl thead, .tbl tbody, .tbl tfoot, .tbl tr, .tbl td { display: block; }
  .tbl thead { display: none; }
  .tbl tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 12px; box-shadow: var(--shadow); }
  .tbl td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .tbl td.num { text-align: right; }
}
@media (min-width: 600px) and (max-width: 1023px) { .tbl th:first-child, .tbl td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; } .tbl th:first-child { background: var(--head-bg); } }

/* Progress / charts */
.bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width 500ms; }
.bar.accent > i { background: var(--accent); }
.ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--track) 0); font-size: .7rem; font-weight: 700; position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 5px; background: var(--surface); border-radius: 50%; } .ring span { position: relative; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font: 700 .95rem var(--font-head); flex: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Prototype index + auth pages */
.wrap { max-width: 1280px; margin: 0 auto; padding: 16px; }
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth .hero { padding-top: 24px; text-align: center; }
.auth .box { max-width: 420px; width: calc(100% - 32px); margin: -40px auto 24px; position: relative; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 1.1rem var(--font-head); color: var(--primary-dark); }
.logo b { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; }

/* Brand */
.brand-logo { background: #fff; border-radius: 10px; padding: 3px 6px; box-shadow: var(--shadow); object-fit: contain; }
.tagline { font-size: .8rem; color: var(--muted); }
.brandrow { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
/* Radio-based options (keyboard + screen-reader friendly) */
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: pointer; }
.opt input:focus-visible + .pill, .opt input:focus-visible + .mcard { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt input:checked + .pill { background: var(--primary); color: var(--bg); border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.opt input:checked + .pill::after { content: "✓"; position: absolute; top: -8px; right: -6px; width: 18px; height: 18px; background: var(--accent); color: #fff; border-radius: 50%; font-size: .65rem; display: grid; place-items: center; }
.opt input:checked + .mcard { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.opt input:checked + .mcard::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.opt .pill, .opt .mcard { display: block; width: 100%; pointer-events: none; }
.pill small { display: block; font-weight: 400; font-size: .7rem; color: inherit; opacity: .8; }
.pill .em { display: block; font-size: 1.2rem; line-height: 1.2; }
.pill.tall { min-height: 76px; padding-top: 6px; }
@media print { body { background: #fff; color: #000; } .topbar, .summary, .noprint, .btn { display: none !important; } }

.pw button { width: auto; padding: 0 12px; font: 600 .8rem var(--font-body); }
.pw input { padding-right: 64px; }

.hero.has-banner .logo, .hero.has-banner .tagline, .hero.has-banner h1 { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }

/* DD/MM/YYYY date fields (see dateInputs() in app.js) */
.dwrap { position: relative; }
.dwrap input[data-dmy] { padding-right: 52px; }
.dcal { position: absolute; right: 2px; top: 0; width: 46px; height: 100%; min-height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--primary); cursor: pointer; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; transition: background var(--speed); }
.dcal:hover, .dcal:focus-visible { background: var(--primary-soft); }
.dnative { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* Date of birth: Day · Month · Year dropdowns (App.dobField) */
.dob { display: grid; grid-template-columns: 1fr 1.1fr 1.3fr; gap: 6px; }
.dob select { min-width: 0; padding: 8px 2px 8px 8px; }

/* ================================================================ account menu (admin + employee top bars)
   Opens on hover, click or keyboard (assets/js/app.js). */
.acct { position: relative; }
/* ---------------------------------------------------------------- account menu (top right): opens on hover, click or keyboard */
.acct-btn { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 12px 4px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font: inherit; color: inherit;
  transition: border-color var(--speed), box-shadow var(--speed), transform var(--speed); }
.acct-btn:hover, .acct-btn:focus-visible, .acct-btn[aria-expanded="true"] { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 118, 110, .12), 0 6px 16px rgba(15, 118, 110, .14); }
.acct-btn:hover { transform: translateY(-1px); }
.acct-btn .avatar { width: 38px; height: 38px; font-size: .85rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; transition: transform var(--speed), box-shadow var(--speed); }
.acct-btn:hover .avatar, .acct-btn[aria-expanded="true"] .avatar { transform: scale(1.07); box-shadow: 0 0 0 3px var(--primary-soft); }
.acct-btn .who { display: none; text-align: left; line-height: 1.15; max-width: 170px; }
.acct-btn .who b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-btn .who small { color: var(--muted); font-size: .72rem; }
.acct-btn .caret { width: 16px; height: 16px; color: var(--muted); transition: transform var(--speed), color var(--speed); }
.acct-btn:hover .caret, .acct-btn[aria-expanded="true"] .caret { color: var(--primary); }
.acct-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
@media (min-width: 760px) { .acct-btn .who { display: block; } }
@media (max-width: 759px) { .acct-btn { padding-right: 8px; gap: 4px; } }

/* The panel. Its top padding is an invisible "bridge" so the pointer can travel from the button to the card without closing it. */
.menu { position: absolute; right: 0; top: 100%; z-index: 200; width: max-content; min-width: 262px; max-width: min(320px, calc(100vw - 24px)); padding-top: 12px;
  visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms; }
.menu.open { visibility: visible; opacity: 1; transform: none; transition: opacity 160ms ease, transform 200ms cubic-bezier(.2, .9, .3, 1.2), visibility 0s; }
/* the account card is ".acard" (".mcard" is the meal-menu option card on the registration pages) */
.menu .acard { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 56px rgba(8, 47, 73, .24), 0 2px 8px rgba(8, 47, 73, .08); }
.menu .acard::before { content: ""; position: absolute; top: -6px; right: 22px; width: 12px; height: 12px; background: var(--primary-dark); transform: rotate(45deg); z-index: 0; }

.mhead { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff; z-index: 1;
  background: radial-gradient(circle at 105% -30%, rgba(253, 186, 116, .55) 0, rgba(253, 186, 116, 0) 55%), linear-gradient(135deg, #0F766E 0%, #115E59 100%); }
.mhead .avatar { width: 46px; height: 46px; background: rgba(255, 255, 255, .18); color: #fff; border: 2px solid rgba(255, 255, 255, .55); }
.mwho b { display: block; line-height: 1.2; overflow-wrap: anywhere; }
.mwho small { display: block; opacity: .82; font-size: .78rem; margin: 1px 0 5px; }
.mwho .role { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); }

.mlist { padding: 6px; }
.mlist a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 10px; color: var(--text); text-decoration: none; border-radius: 12px; overflow: hidden;
  transition: background var(--speed), transform var(--speed), color var(--speed); }
.mlist a::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); transform: scaleY(0); transition: transform var(--speed); }
.mlist a .ic { width: 20px; height: 20px; padding: 8px; box-sizing: content-box; flex: none; border-radius: 12px; color: var(--primary); background: var(--primary-soft); transition: background var(--speed), color var(--speed), transform var(--speed); }
.mlist a .tx { flex: 1; min-width: 0; }
.mlist a .t { display: block; font-weight: 600; line-height: 1.25; }
.mlist a .d { display: block; font-size: .76rem; color: var(--muted); line-height: 1.25; }
.mlist a .go { width: 16px; height: 16px; flex: none; color: var(--primary); opacity: 0; transform: translateX(-8px); transition: opacity var(--speed), transform var(--speed); }
/* hover and keyboard focus look the same */
.mlist a:hover, .mlist a:focus-visible { background: linear-gradient(90deg, var(--primary-soft), rgba(204, 251, 241, 0)); transform: translateX(3px); outline: none; }
.mlist a:hover::before, .mlist a:focus-visible::before { transform: scaleY(1); }
.mlist a:hover .ic, .mlist a:focus-visible .ic { background: var(--primary); color: #fff; transform: rotate(-8deg) scale(1.1); }
.mlist a:hover .go, .mlist a:focus-visible .go { opacity: 1; transform: none; }
.mlist .msep { height: 1px; margin: 6px 8px; background: var(--border); }
.mlist a.out .ic { color: var(--danger); background: var(--danger-bg); }
.mlist a.out .go { color: var(--danger); } .mlist a.out::before { background: var(--danger); }
.mlist a.out:hover, .mlist a.out:focus-visible { background: linear-gradient(90deg, var(--danger-bg), rgba(254, 226, 226, 0)); }
.mlist a.out:hover .ic, .mlist a.out:focus-visible .ic { background: var(--danger); color: #fff; }
.mlist a.out:hover .t, .mlist a.out:focus-visible .t { color: var(--danger-fg); }

/* the entries slide in one after another when the card opens */
.menu.open .mhead, .menu.open .mlist > * { animation: itemIn 260ms cubic-bezier(.2, .8, .2, 1) both; }
.menu.open .mlist > :nth-child(1) { animation-delay: 40ms; } .menu.open .mlist > :nth-child(2) { animation-delay: 80ms; } .menu.open .mlist > :nth-child(3) { animation-delay: 110ms; } .menu.open .mlist > :nth-child(4) { animation-delay: 140ms; }
@keyframes itemIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* Slim account menu: small "signed in as" line + compact single-line items (overrides the larger card above) */
.menu:has(.acard.slim) { min-width: 0; width: 210px; padding-top: 8px; }
.acard.slim { border-radius: 12px; box-shadow: 0 12px 32px rgba(8, 47, 73, .18), 0 1px 4px rgba(8, 47, 73, .08); }
.acard.slim::before { display: none; }
.acard.slim .mwho-line { padding: 9px 12px 7px; font-size: .75rem; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard.slim .mwho-line b { color: var(--text); font-weight: 600; }
.acard.slim .mlist { padding: 4px; }
.acard.slim .mlist a { min-height: 36px; gap: 10px; padding: 6px 10px; border-radius: 8px; font-size: .9rem; }
.acard.slim .mlist a .t { font-weight: 500; }
.acard.slim .mlist a .ic { width: 16px; height: 16px; padding: 0; background: none; border-radius: 0; color: var(--muted); }
.acard.slim .mlist a::before { display: none; }
.acard.slim .mlist a:hover, .acard.slim .mlist a:focus-visible { background: var(--primary-soft); transform: none; }
.acard.slim .mlist a:hover .ic, .acard.slim .mlist a:focus-visible .ic { background: none; color: var(--primary); transform: none; }
.acard.slim .mlist a.out .ic { background: none; color: var(--danger); }
.acard.slim .mlist a.out:hover, .acard.slim .mlist a.out:focus-visible { background: var(--danger-bg); }
.acard.slim .mlist a.out:hover .ic { background: none; color: var(--danger); }
.acard.slim .mlist .msep { margin: 4px 6px; }
@media (prefers-reduced-motion: reduce) { .menu, .menu.open { transition: none; transform: none; } .menu.open .mhead, .menu.open .mlist > * { animation: none; } .mlist a:hover, .mlist a:focus-visible, .acct-btn:hover { transform: none; } .mlist a:hover .ic { transform: none; } }
@media print { .menu { display: none; } }

/* ================================================================ journey countdown (includes/countdown.php, ticks in app.js)
   A panel: "Journey starts in", four tiles (days · hours · minutes · seconds) with a progress line, and the departure
   date + time. Numbers roll when they change. .cdt-glass = on the dark login scenery, .cdt-light = on the light home banner. */
.cdt-box { width: max-content; max-width: 100%; padding: 14px 16px 12px; border-radius: 24px; }
.cdt-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.cdt-head .live { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; animation: cdtPing 1.8s infinite; }
.cdt { display: flex; gap: 10px; }
.cdt .u { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 12px 8px 13px; border-radius: 16px; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, rgba(4, 47, 62, .55), rgba(4, 47, 62, .3)); border: 1px solid rgba(255, 255, 255, .16); }
.cdt .u::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255, 255, 255, .08); }   /* split-flap line */
.cdt .u .dg { position: relative; display: block; overflow: hidden; padding: 2px 2px 4px; margin: -2px -2px -4px; }
.cdt .u b { display: block; font: 800 2.6rem/1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFFFFF 30%, #FDE68A); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .35)); }
.cdt .u small { margin-top: 6px; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
/* progress line: scaled (GPU) every frame by app.js, so it glides instead of stepping */
.cdt .u .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; border-radius: 0 3px 3px 0; transform-origin: left center; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #FDBA74, #F97316); box-shadow: 0 0 8px rgba(249, 115, 22, .6); will-change: transform; }
.cdt .u-d { background: linear-gradient(180deg, rgba(249, 115, 22, .55), rgba(234, 88, 12, .32)); border-color: rgba(253, 186, 116, .55); }   /* days stand out */
.cdt .u-d b { background: linear-gradient(180deg, #FFFFFF 40%, #FFEDD5); -webkit-background-clip: text; background-clip: text; }
.cdt .u b.in { animation: cdtIn .6s cubic-bezier(.22, 1, .36, 1) both; }
.cdt .u b.old { position: absolute; left: 0; right: 0; top: 2px; text-align: center; animation: cdtOut .6s cubic-bezier(.22, 1, .36, 1) both; }
.cdt-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 2px 0; font-size: .84rem; font-weight: 600; opacity: .92; }
.cdt-box.done .cdt { opacity: .55; } .cdt-box.done .live { background: #FBBF24; }
/* on the dark login scenery: frosted glass, white text */
.cdt-glass { color: #fff; background: linear-gradient(140deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 24px 60px rgba(3, 30, 48, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
/* on the light home banner: milky glass, solid teal tiles, dark text; a little smaller */
.cdt-light { color: var(--primary-dark); padding: 10px 12px 9px; border-radius: 20px; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 14px 34px rgba(15, 118, 110, .18); }
.cdt-light .cdt-head { margin-bottom: 7px; font-size: .68rem; }
.cdt-light .cdt { gap: 7px; }
.cdt-light .cdt .u { min-width: 60px; padding: 8px 6px 10px; border-radius: 13px; background: linear-gradient(180deg, #0F766E, #115E59); border-color: rgba(15, 118, 110, .4); }
.cdt-light .cdt .u-d { background: linear-gradient(180deg, #F97316, #EA580C); border-color: rgba(234, 88, 12, .5); }
.cdt-light .cdt .u b { font-size: 1.85rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.cdt-light .cdt .u small { margin-top: 4px; font-size: .58rem; }
.cdt-light .cdt-foot { margin-top: 7px; font-size: .78rem; color: var(--text); }
@media (max-width: 420px) { .cdt-light .cdt .u { min-width: 0; flex: 1; } .cdt-light { width: 100%; } }
@keyframes cdtIn { from { opacity: 0; transform: translateY(70%); filter: blur(2px) drop-shadow(0 3px 10px rgba(0, 0, 0, .35)); } to { opacity: 1; transform: none; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .35)); } }
@keyframes cdtOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-70%); filter: blur(2px); } }
@keyframes cdtPing { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); } 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .cdt-head .live, .cdt .u b { animation: none !important; } }