/* CIPES Delegate App — "Credential / boarding-pass" theme.
   Navy + parchment-beige palette from the YEF Frankfurt brand. Light & dark modes.
   Mobile: stacked screens, bottom nav, slide-in drawers.
   Desktop (>=960px): real 3-column website — sidebar · main · right rail. */

:root {
  --paper: #F9F9F9;
  --paper-soft: #F4F7F9;
  --ink: #111111;
  --ink-soft: #333333;
  --muted: rgba(0,18,36,0.55);
  --muted-strong: rgba(0,18,36,0.72);
  --brass: #D1C5A9;
  --brass-deep: #C4B593;
  --signal: #001224;
  --signal-deep: #002244;
  --signal-soft: rgba(0,18,36,0.08);
  --surface: #FFFFFF;
  --surface-2: #001224;
  --on-surface-2: #F9F9F9;
  --hairline: rgba(0,18,36,0.10);
  --hairline-strong: rgba(0,18,36,0.20);
  --shadow: 0 10px 30px rgba(0,18,36,0.10);
  --shadow-strong: 0 26px 60px rgba(0,18,36,0.22);
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}
[data-theme="dark"] {
  --paper: #080D12;
  --paper-soft: #0D1520;
  --ink: #F9F9F9;
  --ink-soft: #CCCCCC;
  --muted: rgba(249,249,249,0.50);
  --muted-strong: rgba(249,249,249,0.72);
  --brass: #E5DBC2;
  --brass-deep: #D1C5A9;
  --signal: #E5DBC2;
  --signal-deep: #D1C5A9;
  --signal-soft: rgba(229,219,194,0.15);
  --surface: #0D1520;
  --surface-2: #060A0F;
  --on-surface-2: #F9F9F9;
  --hairline: rgba(229,219,194,0.12);
  --hairline-strong: rgba(229,219,194,0.22);
  --shadow: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-strong: 0 30px 70px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* prevent content-wider-than-viewport from zooming the page */
  overflow-x: hidden;
}
html, body { margin: 0; }
body {
  background: var(--paper);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* prevent horizontal scroll/zoom on mobile */
  overflow-x: hidden;
  width: 100%;
  transition: background .3s ease, color .3s ease;
}
/* images/media never overflow their container */
img, video, svg { max-width: 100%; }
button { font-family: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

/* seals & brand */
.seal {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #002244 0%, #001224 72%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35), inset 0 1px 1px rgba(255,255,255,0.12);
  flex-shrink: 0;
}
.seal svg { stroke: #E5DBC2; fill: none; stroke-width: 1.6; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
  padding: 28px 18px;
  background: var(--paper);
}
.login-above { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.login-above .brand-logo { height: 44px; }
.login-above .brand-sub { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface-2); color: var(--on-surface-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}
.login-perf {
  height: 1px; margin: 0 24px;
  background: repeating-linear-gradient(to right, rgba(255,255,255,0.22) 0 6px, transparent 6px 12px);
}
.login-body { padding: 22px 26px 28px; }
.login-body h1 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.login-body .tag { font-family: var(--font-serif); font-style: italic; font-size: 16px; opacity: 0.82; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 12px 13px; font-size: 15px; font-family: var(--font-body);
  color: var(--on-surface-2);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus { outline: none; border-color: #E5DBC2; }
/* password show/hide toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 10px; cursor: pointer;
  color: rgba(249,249,249,0.5); display: flex; align-items: center; justify-content: center;
  transition: color .15s ease; min-width: 44px; min-height: 44px;
}
.pw-eye:hover { color: rgba(249,249,249,0.9); }
.pw-eye svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; font-weight: 700; font-size: 14px; padding: 13px 16px;
  border: none; border-radius: var(--radius-sm);
  background: var(--signal); color: #fff;
  box-shadow: 0 10px 22px rgba(0,18,36,0.25);
  transition: transform .06s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--hairline-strong); box-shadow: none; }
.btn.brass { background: var(--brass); color: #001224; box-shadow: 0 10px 22px rgba(209,197,169,0.35); }
.btn.small { width: auto; font-size: 12px; padding: 9px 14px; }
.login-body .btn { background: #E5DBC2; color: #001224; box-shadow: 0 10px 22px rgba(229,219,194,0.3); }
.login-body .btn.ghost { background: transparent; color: var(--on-surface-2); border-color: rgba(255,255,255,0.22); box-shadow: none; }
.link-btn { background: none; border: none; color: #E5DBC2; text-decoration: underline; font-size: 13px; padding: 10px 0 0; width: 100%; }
.form-msg { font-size: 13px; min-height: 18px; margin: 8px 0; }
.form-msg.error { color: #c0392b; font-weight: 700; }
.login-body .form-msg.error { color: #FF8A8A; }
.form-msg.ok { color: var(--brass); font-weight: 700; }
.login-body .form-msg.ok { color: #a8e6cf; }

/* ============ APP LAYOUT ============ */
.layout { min-height: 100vh; }

/* ---- Sidebar (desktop) ---- */
.sidebar { display: none; }

/* ---- Topbar (mobile) ---- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--paper); border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-sub { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 52px; height: 29px; border-radius: 16px;
  background: var(--paper-soft); border: 1px solid var(--hairline-strong);
  position: relative; flex-shrink: 0; padding: 0;
}
.theme-toggle .knob {
  position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
  transition: left .25s cubic-bezier(.4,0,.2,1), background .25s ease;
}
[data-theme="dark"] .theme-toggle .knob { left: 27px; background: var(--brass); }
.theme-toggle .knob svg { width: 13px; height: 13px; stroke-width: 2; }
.theme-toggle .knob svg.sun { stroke: var(--paper); fill: none; display: block; }
.theme-toggle .knob svg.moon { stroke: #001224; fill: none; display: none; }
[data-theme="dark"] .theme-toggle .knob svg.sun { display: none; }
[data-theme="dark"] .theme-toggle .knob svg.moon { display: block; }

.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--hairline); flex-shrink: 0;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.bell-dot {
  position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal); border: 2px solid var(--paper); display: none;
  animation: pulse 2s infinite;
}
.bell-dot.show { display: block; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,18,36,0.45); } 50% { box-shadow: 0 0 0 5px rgba(0,18,36,0); } }

/* ---- Main column ---- */
.main { padding: 0; }
.main-inner { padding: 0 16px 110px; }

/* ============ BOARDING-PASS HERO ============ */
.pass {
  margin: 14px 16px 0;
  background: var(--surface-2); color: var(--on-surface-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.pass-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 20px 14px; gap: 16px; }
.pass-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.55; margin-bottom: 6px; }
.pass-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: 0.01em; line-height: 1.15; }
.pass-sub { font-family: var(--font-serif); font-style: italic; font-size: 15px; opacity: 0.85; margin-top: 5px; }
.pass-seal { width: 46px; height: 46px; }
.pass-seal span { font-family: var(--font-display); font-size: 8px; font-weight: 700; color: #E5DBC2; text-align: center; line-height: 1.1; letter-spacing: 0.05em; }
.pass-perf {
  position: relative; height: 1px; margin: 0 20px;
  background: repeating-linear-gradient(to right, rgba(255,255,255,0.22) 0 6px, transparent 6px 12px);
}
.pass-perf::before, .pass-perf::after { content: ''; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); }
.pass-perf::before { left: -29px; }
.pass-perf::after { right: -29px; }
.pass-bottom { display: flex; padding: 14px 20px 18px; gap: 18px; flex-wrap: wrap; }
.pass-field { flex: 1; min-width: 90px; }
.pass-field-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5; margin-bottom: 4px; }
.pass-field-value { font-size: 13px; font-weight: 700; }
.pass-field-value.signal { color: var(--signal); }

/* ============ SCREENS ============ */
.screen-stack { margin-top: 14px; }
.screen { display: none; padding: 0 16px; }
.screen.active { display: block; animation: slide-right .2s cubic-bezier(.25,.46,.45,.94); will-change: transform, opacity; }
.screen.active.dir-left { animation: slide-left .2s cubic-bezier(.25,.46,.45,.94); }
@keyframes slide-right { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes slide-left  { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* compact pass hero (non-dashboard screens) */
.pass--compact .pass-bottom { display: none; }
.pass--compact .pass-perf { display: none; }
.pass--compact .pass-sub { display: none; }
.pass--compact .pass-top { padding: 13px 18px; }
.pass--compact .pass-title { font-size: 17px; }

/* skeleton loading shimmer */
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
.skel { border-radius: 6px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--paper-soft) 0%, var(--hairline-strong) 50%, var(--paper-soft) 100%);
  background-size: 400px 100%; animation: shimmer 1.4s linear infinite; }
.skel.h12 { height: 12px; }
.skel.h16 { height: 16px; }
.skel.h28 { height: 28px; border-radius: 10px; }
.skel.w100 { width: 100%; }
.skel.w70  { width: 70%; }
.skel.w45  { width: 45%; }

.section-label {
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-strong);
  margin: 22px 0 13px; font-weight: 800; display: flex; align-items: center; gap: 8px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--hairline-strong); }

/* Frankfurt clock */
.dash-clock {
  border-radius: var(--radius);
  background: #001224;
  color: #fff;
  padding: 16px 20px 14px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(0,18,36,0.22);
  position: relative; overflow: hidden;
}
.dash-clock::after {
  content: ''; position: absolute; right: -20px; top: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.dash-clock-left { display: flex; flex-direction: column; gap: 3px; }
.dash-clock-city {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; opacity: 0.55;
}
.dash-clock-time {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1; color: #fff;
}
.dash-clock-time small {
  font-size: 16px; font-weight: 500; opacity: 0.75; margin-left: 3px;
}
.dash-clock-right { text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.dash-clock-date {
  font-size: 13px; font-weight: 600; opacity: 0.9;
}
.dash-clock-day {
  font-size: 11px; opacity: 0.5; letter-spacing: 0.04em;
}

/* live strip */
.live-strip {
  background: var(--signal); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px;
  color: #fff; box-shadow: 0 12px 26px rgba(0,18,36,0.28); position: relative; overflow: hidden;
}
.live-strip::before { content: ''; position: absolute; top: -30%; right: -10%; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.live-strip-tag { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; opacity: 0.92; }
.live-strip-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: flicker 1.5s infinite; }
@keyframes flicker { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-strip-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; line-height: 1.3; }
.live-strip-meta { font-size: 12.5px; opacity: 0.88; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card-eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-strong); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.card-eyebrow a, .card-eyebrow .link { color: var(--signal); font-size: 11px; font-weight: 800; }

.next-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.next-item:last-child { border-bottom: none; padding-bottom: 0; }
.next-time { font-size: 12.5px; font-weight: 800; width: 58px; flex-shrink: 0; color: var(--ink-soft); padding-top: 2px; }
.next-time small { font-size: 11px; color: var(--muted); font-weight: 700; display: block; }
.next-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; line-height: 1.35; }
.next-venue { font-size: 12.5px; color: var(--muted-strong); }

.ann-title { font-size: 14px; font-weight: 800; margin-bottom: 5px; }
.ann-body { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.ann-time { font-size: 12px; color: var(--muted); margin-top: 9px; }

/* ============ RUNDOWN ============ */
.day-tabs { display: flex; gap: 8px; margin: 18px 0 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { font-size: 12.5px; font-weight: 700; padding: 9px 16px; border-radius: 20px; border: 1.5px solid var(--hairline-strong); color: var(--muted-strong); background: transparent; white-space: nowrap; flex-shrink: 0; transition: all .15s ease; }
.day-tab.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.timeline { position: relative; padding-left: 82px; }
.timeline::before { content: ''; position: absolute; left: 62px; top: 6px; bottom: 6px; width: 2px; background: var(--hairline-strong); }
.t-item { position: relative; padding-bottom: 38px; }
.t-item:last-child { padding-bottom: 0; }
.t-time { position: absolute; left: -82px; top: 0; width: 48px; text-align: right; font-size: 12.5px; font-weight: 800; color: var(--ink-soft); line-height: 1.3; }
.t-time small { font-size: 11px; color: var(--muted); font-weight: 700; display: block; margin-top: 1px; }
.t-dot { position: absolute; left: -24.5px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-soft); }
.t-item.is-now .t-dot { width: 13px; height: 13px; left: -26.5px; top: 0.5px; background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 5px var(--signal-soft); }
.t-item.is-now .t-time { color: var(--signal); }
.t-content { padding-left: 6px; }
.t-item.is-now .t-content { background: var(--signal-soft); margin-left: -12px; padding: 10px 12px; border-radius: 12px; }
.t-type { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #001224; background: var(--brass); border-radius: 5px; padding: 3px 9px; margin-bottom: 7px; }
.t-type svg { width: 10px; height: 10px; fill: none; stroke: #001224; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.t-type.subtle { background: transparent; border: 1.5px solid var(--hairline-strong); color: var(--muted-strong); }
.t-type.subtle svg { stroke: var(--muted-strong); }
.live-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--signal); border-radius: 5px; padding: 3px 9px; margin-left: 6px; margin-bottom: 7px; }
.live-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: flicker 1.5s infinite; }
.t-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; line-height: 1.35; }
.t-venue { font-size: 12.5px; color: var(--muted-strong); }
.t-gather { font-size: 12px; color: var(--signal-deep); margin-top: 6px; font-weight: 800; display: flex; align-items: center; gap: 5px; }
[data-theme="dark"] .t-gather { color: var(--signal); }
.t-gather::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }
.t-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--hairline-strong); color: var(--ink); cursor: pointer; font-family: inherit; text-decoration: none; }
.chip.primary { background: var(--signal); color: #fff; border-color: var(--signal); }
.chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cal-picker { position: absolute; bottom: calc(100% + 6px); left: 0; background: var(--surface); border: 1.5px solid var(--hairline-strong); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.14); z-index: 200; min-width: 180px; overflow: hidden; display: flex; flex-direction: column; }
.cal-picker a { padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.cal-picker a:hover { background: var(--hairline); }
.star-btn { background: none; border: none; font-size: 18px; line-height: 1; padding: 10px 8px; margin-left: auto; color: var(--brass-deep); min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* ============ VISITS / SPEAKERS / CONTACT ============ */
.tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.tile-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.tile-meta { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tile-body { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.spk { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.spk .avatar { width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 35% 30%, #002244 0%, #001224 75%); color: #E5DBC2; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 16px; object-fit: cover; }
.spk-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.spk-title { font-size: 12px; color: var(--muted-strong); margin-top: 2px; }
.spk-topic { font-size: 12.5px; color: var(--signal-deep); font-weight: 700; margin-top: 5px; }
[data-theme="dark"] .spk-topic { color: var(--signal); }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--muted-strong); display: flex; align-items: center; gap: 7px; }
.info-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; opacity: .65; }
.info-val { font-size: 14px; font-weight: 800; text-align: right; }
.back-btn { background: none; border: none; color: var(--muted-strong); font-weight: 700; font-size: 13px; margin: 4px 0 12px; min-height: 44px; display: flex; align-items: center; gap: 4px; padding: 0 4px; }

/* ============ HOTEL ============ */
.hk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.hk-field { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: 13px 14px; }
.hk-field-icon { display: block; width: 17px; height: 17px; fill: none; stroke: var(--brass); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.hk-field-label { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
.hk-field-value { font-size: 14px; font-weight: 800; }
.hk-actions { display: flex; gap: 9px; margin: 16px 0 4px; }
.hk-action { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 800; padding: 13px 0; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--hairline-strong); color: var(--ink); }
.hk-action.primary { background: var(--signal); color: #fff; border-color: var(--signal); box-shadow: 0 8px 18px rgba(0,18,36,0.22); }
.hk-action svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.guide-step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hairline); align-items: flex-start; }
.guide-step:last-child { border-bottom: none; }
.guide-num { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: #001224; width: 26px; height: 26px; border-radius: 50%; background: var(--brass); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.guide-text { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); padding-top: 3px; }
.guide-text b { color: var(--ink); }
.meal-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.meal-row:last-child { border-bottom: none; }
.meal-row span:first-child { color: var(--muted-strong); }
.meal-row span:last-child { font-weight: 800; }

/* placeholder / empty */
.placeholder, .empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 56px 20px 0; color: var(--muted-strong); }
.placeholder .ph-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--hairline); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.placeholder .ph-icon svg { width: 23px; height: 23px; stroke: var(--signal); fill: none; }
.placeholder p, .empty { font-size: 13.5px; line-height: 1.6; max-width: 240px; }
.placeholder b { color: var(--ink); }

/* ============ MY SCHEDULE ============ */
.sched-meta-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0 18px; font-size: 12px; font-weight: 700; color: var(--muted-strong);
}
.sched-count-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--brass); color: #001224; font-size: 11px; font-weight: 800;
  border-radius: 20px; padding: 4px 12px;
}
.sched-day-section { margin-bottom: 22px; }
.sched-day-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 14px 0 10px; border-bottom: 2px solid var(--brass); margin-bottom: 2px;
}
.sched-day-label {
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brass);
}
.sched-day-date { font-size: .72rem; color: var(--muted); margin-left: auto; }
.sched-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--hairline);
}
.sched-row:last-child { border-bottom: none; }
.sched-time {
  min-width: 52px; font-size: .78rem; font-weight: 800; color: var(--ink-soft);
  padding-top: 3px; line-height: 1.2; flex-shrink: 0;
}
.sched-time small { display: block; font-size: .65rem; font-weight: 600; color: var(--muted); }
.sched-body { flex: 1; min-width: 0; }
.sched-title { font-size: .92rem; font-weight: 700; color: var(--ink); line-height: 1.35; margin-top: 5px; }
.sched-venue { font-size: .75rem; color: var(--muted-strong); margin-top: 2px; }
.sched-remove {
  background: none; border: none; font-size: 1.1rem; color: var(--brass);
  cursor: pointer; padding: 10px 8px; line-height: 1; flex-shrink: 0;
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
  opacity: .75; transition: opacity .15s ease, color .15s ease;
}
.sched-remove:hover { opacity: 1; color: var(--signal); }
.sched-empty { text-align: center; padding: 56px 24px; color: var(--muted-strong); }
.sched-empty-icon { font-size: 3rem; margin-bottom: 14px; display: block; opacity: .35; }
.sched-empty p { font-size: 14px; line-height: 1.6; margin: 0 auto; max-width: 240px; }
.sched-empty small { font-size: 12.5px; color: var(--muted); display: block; margin-top: 8px; }

/* ============ BOTTOM NAV (mobile) ============ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto;
  background: var(--paper); border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-around; padding: 8px 4px env(safe-area-inset-bottom, 10px); z-index: 25;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); flex: 1; position: relative; padding-top: 4px; background: none; border: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; position: relative; z-index: 1; }
.nav-item > span:last-child { font-size: 11px; font-weight: 700; position: relative; z-index: 1; }
.nav-item.active { color: var(--signal); }
[data-theme="dark"] .nav-item.active { color: var(--signal); }
/* pill indicator behind the icon (replaces top bar) */
.nav-item .nav-indicator {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 30px; border-radius: 20px;
  background: var(--signal-soft); opacity: 0;
  transition: opacity .2s ease; z-index: 0;
}
.nav-item.active .nav-indicator { opacity: 1; }

/* ============ DRAWERS (updates rail + menu) ============ */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 40; }
.backdrop.open { opacity: 1; pointer-events: auto; }

.rail {
  position: fixed; top: 0; right: 0; width: 76%; max-width: 340px; height: 100%;
  background: var(--paper); border-left: 1px solid var(--hairline);
  box-shadow: -12px 0 40px rgba(0,0,0,0.2);
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 41; display: flex; flex-direction: column;
}
.rail.open { transform: translateX(0); }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 14px; border-bottom: 1px solid var(--hairline); flex-shrink: 0; }
.rail-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0; }
.rail-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 18px 30px; }
.update-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--hairline); }
.update-item:last-child { border-bottom: none; }
.u-dot-wrap { position: relative; flex-shrink: 0; }
.u-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--hairline); display: flex; align-items: center; justify-content: center; }
.u-icon svg { width: 15px; height: 15px; stroke: var(--ink-soft); fill: none; stroke-width: 1.8; }
.update-item.unread .u-icon { border-color: var(--signal); background: var(--signal-soft); }
.update-item.unread .u-icon svg { stroke: var(--signal-deep); }
.u-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); position: absolute; top: -2px; right: -2px; border: 2px solid var(--paper); }
.u-title { font-size: 13px; font-weight: 800; margin-bottom: 3px; line-height: 1.4; }
.u-body { font-size: 12.5px; color: var(--muted-strong); line-height: 1.5; margin-bottom: 5px; }
.u-meta { font-size: 12px; color: var(--muted); font-weight: 600; }

/* menu drawer (left, mobile) */
.menu-drawer {
  position: fixed; top: 0; left: 0; width: 72%; max-width: 300px; height: 100%;
  background: var(--paper); border-right: 1px solid var(--hairline);
  box-shadow: 12px 0 40px rgba(0,0,0,0.2);
  transform: translateX(-100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 41; display: flex; flex-direction: column;
}
.menu-drawer.open { transform: translateX(0); }
.menu-body { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.menu-user { font-family: var(--font-display); font-size: 16px; font-weight: 600; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }
.menu-user span { display: block; font-family: var(--font-body); font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.menu-link { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--hairline); padding: 16px 2px; font-size: 15px; font-weight: 700; color: var(--ink); }
.menu-link svg { width: 20px; height: 20px; stroke: var(--ink-soft); fill: none; stroke-width: 1.7; }
.menu-body .btn { margin-top: auto; }

/* ============ MODAL ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 60; display: none; align-items: center; justify-content: center; padding: 26px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-strong); padding: 24px; max-width: 360px; width: 100%; }
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 10px; }
.modal p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; }

/* ============ DESKTOP (>=960px): real 3-column website ============ */
@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: 256px minmax(0, 1fr) 348px; }
  .topbar { display: none; }
  .bottom-nav { display: none; }
  .backdrop { display: none; }

  /* sidebar */
  .sidebar {
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    border-right: 1px solid var(--hairline); background: var(--paper);
    padding: 26px 18px;
  }
  .sidebar .brand { margin-bottom: 30px; padding: 0 6px; flex-wrap: wrap; }
  .sidebar .brand-logo { height: 36px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; }
  .nav-link { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; color: var(--muted-strong); font-size: 14px; font-weight: 700; background: none; border: none; text-align: left; width: 100%; }
  .nav-link svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
  .nav-link:hover { background: var(--paper-soft); color: var(--ink); }
  .nav-link.active { background: var(--signal-soft); color: var(--signal-deep); }
  [data-theme="dark"] .nav-link.active { color: var(--signal); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding-top: 16px; border-top: 1px solid var(--hairline); }
  .side-user { font-size: 13px; }
  .side-user b { font-family: var(--font-display); font-weight: 600; display: block; font-size: 14px; }
  .side-user span { color: var(--muted); font-size: 11.5px; }
  .side-foot .theme-toggle { align-self: flex-start; }

  /* main */
  .main { min-width: 0; }
  .main-inner { max-width: 760px; margin: 0 auto; padding: 28px 28px 60px; }
  .pass { margin: 0; }
  .pass-bottom { gap: 28px; }
  .screen { padding: 0; }

  /* dashboard 2-column inside main */
  .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .dash-grid .span-2 { grid-column: 1 / -1; }

  /* right rail: always visible, static */
  .rail {
    position: sticky; top: 0; height: 100vh;
    width: auto; max-width: none; transform: none; box-shadow: none;
    border-left: 1px solid var(--hairline);
  }
  .rail .rail-close { display: none; }

  /* menu drawer not used on desktop */
  .menu-drawer { display: none; }
}

/* keep dashboard single-column on mobile */
@media (max-width: 959px) {
  .dash-grid { display: block; }
  .sidebar { display: none; }
  .rail-static-only { display: none; }
}
