:root {
  color-scheme: light;
  --ink: #282827;
  --muted: #5b5b58;
  --brand-black: #0e0c10;
  --action: #3f3f3b;
  --selection: #eaeae7;
  --selection-line: #d5d5d1;
  --surface-muted: #f0f0ed;
  --background: #ffffff;
  --surface: #ffffff;
  --line: #e2e2df;
  --field-line: #81817b;
  --shadow: #2323231e;
  --button-ink: #ffffff;
  --button-hover: var(--brand-black);
  --danger-text: #8c2d2e;
  --danger-line: #d8a19e;
  --danger-wash: #fff0ed;
  --success-text: #285541;
  --success-wash: #eaf4ed;
  --training-text: #633b66;
  --training-wash: #f4ebf6;
  --dinner-text: #764a2e;
  --dinner-wash: #faf0e7;
  --travel-text: #4c4b65;
  --travel-wash: #eeedf5;
  --radius: 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #efefec;
  --muted: #b7b7b2;
  --action: #deded9;
  --selection: #343432;
  --selection-line: #555551;
  --surface-muted: #2a2a28;
  --background: #171716;
  --surface: #212120;
  --line: #3b3b39;
  --field-line: #858580;
  --shadow: #00000085;
  --button-ink: #252523;
  --button-hover: #f2f2ef;
  --danger-text: #ffb5ac;
  --danger-line: #9b6962;
  --danger-wash: #392724;
  --success-text: #b6dbc5;
  --success-wash: #22312a;
  --training-text: #e3c7e6;
  --training-wash: #372d3b;
  --dinner-text: #f0cdb1;
  --dinner-wash: #3a3028;
  --travel-text: #ced3eb;
  --travel-wash: #2e3446;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.5; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.042em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: 1.57rem; }
h3 { font-size: 1.27rem; }
a { color: inherit; text-decoration: none; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
p, strong, h1, h2, h3, h4 { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; }
.sr-only, .skip:not(:focus) {
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
.skip:focus { z-index: 5; position: fixed; top: 6px; left: 8px; padding: 10px; background: var(--surface); }
.app { min-height: 100vh; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.surface { min-width: 0; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 23px;
  padding: 27px 18px 20px;
  overflow-y: auto;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  align-self: flex-start;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.075em;
  line-height: 1;
  padding: 3px 4px;
}
.brand-sub { color: var(--muted); font-weight: 600; letter-spacing: -.055em; }
.navigation-brand img {
  flex: none;
  width: 58px;
  height: auto;
  border-radius: 6px;
}
.tour-switch {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 11px;
}
.tour-switch:hover { border-color: var(--field-line); }
.tour-name { display: block; font-size: .9rem; }
.sidebar > .tour-name { padding-inline: 12px; }
.account strong { display: block; font-size: .83rem; }
.tour-switch small, .account small { display: block; color: var(--muted); font-size: .74rem; }
.account-avatar {
  min-width: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: .76rem;
  font-weight: 800;
  background: var(--surface-muted);
  color: var(--muted);
}
.nav { display: grid; gap: 4px; }
.nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 620;
  color: var(--muted);
  font-size: .91rem;
}
.nav a:hover, .nav a[aria-current] { background: var(--selection); color: var(--action); }
.nav a[aria-current] { box-shadow: inset 3px 0 var(--muted); }
.nav a[aria-current] { font-weight: 760; }
.nav-separator { margin: 10px 0; border-bottom: 1px solid var(--line); }
.icon { display: inline-block; height: 16px; width: 16px; flex: 0 0 16px; position: relative; font-style: normal; }
.calendar, .team { border: 1.6px solid currentColor; border-radius: 3px; }
.calendar::before, .team::before { content: ""; position: absolute; inset: 4px 0 auto; border-top: 1.5px solid currentColor; }
.calendar::after { content: ""; position: absolute; width: 5px; left: 4px; top: -3px; height: 4px; border-inline: 1.5px solid currentColor; }
.info { border: 1.6px solid currentColor; border-radius: 50%; }
.info::before { content: "i"; position: absolute; inset: -2px 0 0; text-align: center; font: 700 13px/16px system-ui; }
.stay { border: 1.5px solid currentColor; border-radius: 2px 2px 0 0; height: 9px; margin-top: 4px; }
.stay::before { content: ""; position: absolute; left: -2px; top: -5px; width: 2px; height: 14px; background: currentColor; border-radius: 1px; }
.stay::after { content: ""; position: absolute; left: 3px; top: 1px; width: 4px; height: 3px; border: 1px solid currentColor; border-radius: 2px; }
.people::before { content: ""; position: absolute; inset: 0 auto auto 5px; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.people::after { content: ""; position: absolute; inset: 9px 0 0; border: 1.5px solid currentColor; border-radius: 9px 9px 2px 2px; }
.search-icon { border: 1.6px solid currentColor; border-radius: 50%; height: 13px; width: 13px; flex-basis: 13px; margin: 0 4px 2px 0; }
.search-icon::after { content: ""; position: absolute; top: 10px; left: 9px; width: 6px; height: 1.5px; border-radius: 1px; background: currentColor; transform: rotate(45deg); }
.rail-footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: 13px; }
.quiet { border: 0; background: transparent; color: var(--muted); padding: 8px 11px; font-weight: 650; text-align: start; }
.quiet:hover { color: var(--action); text-decoration: underline; }
.topbar {
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-inline: clamp(20px, 3.2vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.breadcrumb { font-size: .91rem; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); }
.breadcrumb a:hover, .text-link:hover, .edit-link:hover { text-decoration: underline; }
.account { position: relative; }
.account summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.account summary::-webkit-details-marker { display: none; }
.chev { color: var(--muted); }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 25px var(--shadow);
  overflow: hidden;
  min-width: 140px;
}
.account-menu a { display: block; padding: 9px 11px; }
.account-menu a:hover { background: var(--selection); }
.theme-toggle:not([hidden]) {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--action);
}
.theme-toggle:hover { background: var(--selection); }
.theme-icon { display: block; position: relative; width: 20px; height: 20px; }
.theme-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  box-shadow: inset 5px -3px currentColor;
}
:root[data-theme="dark"] .theme-icon::before { inset: 5px; border: 1.5px solid currentColor; box-shadow: none; }
:root[data-theme="dark"] .theme-icon::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  box-shadow: 0 -8px currentColor, 0 8px currentColor, -8px 0 currentColor, 8px 0 currentColor,
    -6px -6px currentColor, 6px -6px currentColor, -6px 6px currentColor, 6px 6px currentColor;
}
.content { width: min(100%, 1450px); margin-inline: auto; padding: 30px clamp(20px,3.2vw,52px) 56px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; margin-bottom: 22px; }
.heading p { color: var(--muted); margin-top: 6px; font-size: .94rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--action);
  color: var(--button-ink);
  font-size: .89rem;
  font-weight: 720;
  text-align: center;
}
.button:hover { background: var(--button-hover); }
.button-light { background: var(--surface); color: var(--action); border-color: var(--field-line); }
.button-light:hover { background: var(--selection); }
.button-danger { background: var(--surface); color: var(--danger-text); border-color: var(--field-line); }
.button-danger:hover { background: var(--danger-wash); }
.text-link, .edit-link { color: var(--action); font-weight: 740; }
.edit-link { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; font-size: .9rem; white-space: nowrap; }
.tile, .empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
  min-width: 0;
}
.tile h2, .tile h3, .empty h2 { margin-bottom: 8px; }
.tile p, .empty p { margin-block: 5px; color: var(--muted); }
.tile .activity-type { margin-bottom: 6px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 320px),1fr)); gap: 17px; }
.tour-tile:hover { border-color: var(--field-line); }
.section-heading { margin-top: 30px; margin-bottom: 13px; }
.empty p { margin-bottom: 11px; }
.compact-heading { margin-bottom: 11px; }
.compact-heading h2 { margin-bottom: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.compact-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); gap: 11px; }
.compact-row p { margin: 2px 0 0; font-size: .89rem; }
.compact-row:last-child { margin-bottom: 9px; }
.list-tile { padding-block: 9px 4px; }
.list-tile .compact-row:first-child { border-top: 0; }
.people-list .compact-row { justify-content: flex-start; }
.row-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.record-note { padding: 8px 10px; background: var(--surface-muted); border-radius: 6px; color: var(--ink); }
.record-note small, .muted { color: var(--muted); }
.mobile-nav, .mobile-brand, .manage-tabs, .nav .mobile-admin { display: none; }

@media (max-width: 750px) {
  .app { display: block; }
  .sidebar, .breadcrumb { display: none; }
  .topbar { position: sticky; top: 0; z-index: 2; height: 60px; padding-inline: 16px; }
  .mobile-brand, .mobile-nav { display: block; }
  .brand { font-size: 22px; }
  .account-label { display: none; }
  .content { padding: 17px 16px 92px; }
  .mobile-nav {
    position: fixed;
    z-index: 2;
    bottom: 0;
    inset-inline: 0;
    padding-bottom: env(safe-area-inset-bottom,0);
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .mobile-nav .nav { display: flex; justify-content: safe center; gap: 2px; padding: 3px 7px; overflow-x: auto; }
  .mobile-nav .nav a { min-width: 77px; width: 100%; padding: 7px; gap: 4px; flex: 0 1 auto; flex-direction: column; justify-content: center; font-size: .71rem; }
  .mobile-nav .nav a[aria-current] { box-shadow: inset 0 -2px var(--muted); }
  .mobile-nav .nav-separator { display: none; }
  .mobile-nav .nav .desktop-admin { display: none; }
  .mobile-nav .nav .mobile-admin { display: flex; }
  .manage-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
  .heading { flex-wrap: wrap; margin-bottom: 16px; }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; flex-shrink: 1; }
  .tile, .empty { padding: 17px; }
}
