/* Shared top nav + admin left menu (markup from server/src/services/site-chrome.ts).
   Mobile first: phones get a two-row nav (brand + actions, then the five links spread
   across the width, never scrolling)
   and the admin menu as a drawer. Colors come only from theme.css tokens, so light and
   dark mode both follow the theme switcher. */

.oc-nav, .oc-nav *, .oc-side, .oc-side * { box-sizing: border-box; }

.oc-nav {
  --oc-nav-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  position: sticky;
  top: 0;
  z-index: 900;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-family: var(--oc-nav-font);
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-primary);
  text-align: left;
}

.oc-nav__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "menu brand actions"
    "links links links";
  align-items: center;
  column-gap: 6px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 6px 12px 0;
}
.oc-nav__bar:not(:has(.oc-nav__menu)) { grid-template-areas: "brand brand actions" "links links links"; }

.oc-nav__menu { grid-area: menu; }

.oc-nav__brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: 'Montserrat', var(--oc-nav-font);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.2px;
}
.oc-nav__brand img { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; object-fit: contain; }
.oc-nav__brand span { white-space: nowrap; }
/* Only below 360px, narrower than any phone we design for, may the name shorten. */
@media (max-width: 359px) {
  .oc-nav__brand span { overflow: hidden; text-overflow: ellipsis; }
}

.oc-nav__links {
  grid-area: links;
  display: flex;
  justify-content: space-between;
  min-width: 0;
  margin: 0 -8px;
}
/* Phones: the five links share the row evenly; they fit at 360px and up, so it never scrolls
   (14px and tight padding below 960px, see the phone block). */
.oc-nav__links :is(a, .oc-nav__places) {
  position: relative;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 8px;
}
.oc-nav__links :is(a, .oc-nav__places)::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}
.oc-nav__links :is(a, .oc-nav__places):hover { color: var(--text-primary); }
.oc-nav__links :is(a, .oc-nav__places).is-active { color: var(--text-primary); font-weight: 700; }
.oc-nav__links :is(a, .oc-nav__places).is-active::after { background: var(--accent); }

.oc-nav__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 6px;
}

.oc-nav__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
}
.oc-nav__icon-btn:hover { color: var(--text-primary); background: var(--bg-hover); }
.oc-nav__icon-btn svg { display: block; }

.oc-nav__account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.oc-nav__account:hover { background: var(--bg-hover); }
.oc-nav__account.is-active .oc-nav__avatar { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent); }
.oc-nav__account-label { display: none; }

.oc-nav__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.oc-nav__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.oc-nav__signin {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  /* Darker than --accent so white text passes contrast in both themes. */
  background: #a86519;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.oc-nav__signin:hover { filter: brightness(1.08); }

.oc-nav a:focus-visible, .oc-nav button:focus-visible,
.oc-side a:focus-visible, .oc-side button:focus-visible, .oc-side summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Phones: row 1 holds the admin menu button, logo and full name, Messages and the avatar,
   so the gaps stay small enough for all of it at 360px. */
@media (max-width: 959px) {
  .oc-nav__bar { column-gap: 2px; padding-left: 8px; padding-right: 8px; }
  .oc-nav__links { margin: 0 -4px; }
  .oc-nav__links :is(a, .oc-nav__places) { padding: 0 2px; font-size: 14px; }
  .oc-nav__links :is(a, .oc-nav__places)::after { left: 4px; right: 4px; }
  .oc-nav__brand { gap: 8px; }
  .oc-nav__actions { gap: 2px; }
  .oc-nav__account { padding: 0 4px; }
}
/* Wide enough for every link: one row. Phones and tablets keep the two-row layout. */
@media (min-width: 960px) {
  .oc-nav__bar,
  .oc-nav__bar:not(:has(.oc-nav__menu)) {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "menu brand links actions";
    column-gap: 8px;
    min-height: 64px;
    padding: 0 20px;
  }
  .oc-nav__bar:not(:has(.oc-nav__menu)) { grid-template-areas: "brand brand links actions"; }
  .oc-nav__links { justify-content: flex-start; gap: 2px; margin: 0 0 0 12px; align-self: stretch; }
  .oc-nav__links :is(a, .oc-nav__places) { flex: 0 0 auto; min-height: 64px; padding: 0 12px; }
  .oc-nav__links :is(a, .oc-nav__places)::after { left: 12px; right: 12px; }
  .oc-nav__links :is(a, .oc-nav__places).is-active::after { bottom: 0; }
}
@media (min-width: 1100px) {
  body:not(.has-admin-sidebar) .oc-nav__account-label,
  body.has-admin-sidebar.admin-sidebar-collapsed .oc-nav__account-label { display: inline; }
  body:not(.has-admin-sidebar) .oc-nav__account,
  body.has-admin-sidebar.admin-sidebar-collapsed .oc-nav__account { padding: 0 14px 0 5px; border: 1px solid var(--border); }
}

/* ---------------------------------------------------------------------------
   Admin left menu
   --------------------------------------------------------------------------- */
:root { --admin-sidebar-width: 280px; --admin-rail-width: 56px; }

.oc-side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  width: min(var(--admin-sidebar-width), 86vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}
.oc-side.is-open {
  transform: translateX(0);
  visibility: visible;
  box-shadow: var(--shadow-md);
  transition: transform 0.22s ease, visibility 0s;
}

.oc-side__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.oc-side__backdrop.is-open { opacity: 1; pointer-events: auto; }

.oc-side__head {
  /* The menu scrolls inside itself when it is taller than the screen; the header stays. */
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--border);
}
.oc-side__who { flex: 1; min-width: 0; }
.oc-side__name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oc-side__role { font-size: 13px; font-weight: 600; color: var(--accent-text, var(--accent)); }
.oc-side__role-switch {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
}
.oc-side__role-switch:hover { color: var(--text-primary); }
.oc-side__role-switch:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.oc-side__role-error { font-size: 12px; font-weight: 600; color: var(--danger, #e55353); margin-top: 2px; }
.oc-side__role-error:empty { display: none; }

.oc-side__nav { padding: 2px 0 12px; }

/* Dense rows: 32px with a mouse, 40px on touch (brand.md "Admin menu exception"). */
.oc-side__group { border-bottom: 1px solid var(--border); }
.oc-side__group:last-child { border-bottom: none; }
.oc-side__group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 0 16px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.oc-side__group > summary::-webkit-details-marker { display: none; }
.oc-side__group > summary:hover { color: var(--text-primary); background: var(--bg-hover); }
.oc-side__chev { flex-shrink: 0; transition: transform 0.18s ease; }
.oc-side__group[open] > summary .oc-side__chev { transform: rotate(90deg); }

.oc-side__group ul { list-style: none; margin: 0; padding: 0 6px 6px; }
.oc-side__group li { margin: 0; padding: 0; }
.oc-side__group a, .oc-side__action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-primary);
  text-decoration: none;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
}
.oc-side__group a > span, .oc-side__action > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Lucide icons, always neutral: never accent or danger colored. */
.oc-side__icon { flex: 0 0 16px; width: 16px; height: 16px; stroke-width: 1.75; color: var(--text-secondary); }
.oc-side__group a:hover, .oc-side__action:hover { background: var(--bg-hover); }
.oc-side__group a:hover .oc-side__icon, .oc-side__action:hover .oc-side__icon,
.oc-side__group a.is-active .oc-side__icon { color: var(--text-primary); }
.oc-side__group a.is-active {
  background: var(--accent-dim);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
/* Create actions read "Add <thing>" in the accent text color. */
.oc-side__group a.is-add, .oc-side__action.is-add { color: var(--accent-text, var(--accent)); font-weight: 600; }

/* Laptop and up: the menu is pinned beside the page unless the admin hides it.
   Keep this breakpoint in step with WIDE in admin-sidebar.js. */
@media (min-width: 1024px) {
  body.has-admin-sidebar .oc-side {
    transform: none;
    visibility: visible;
    box-shadow: none;
    transition: transform 0.22s ease, visibility 0s;
  }
  body.has-admin-sidebar.admin-sidebar-collapsed .oc-side {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  /* --admin-offset is how much room the menu takes; fixed overlays (toasts, sheets) use it. */
  body.has-admin-sidebar { --admin-offset: var(--admin-sidebar-width); }
  body.has-admin-sidebar.admin-sidebar-rail { --admin-offset: var(--admin-rail-width); }
  body.has-admin-sidebar.admin-sidebar-collapsed { --admin-offset: 0px; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed) {
    padding-left: var(--admin-offset) !important;
  }
  .oc-side__backdrop { display: none; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed) .oc-side__close { display: none; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed) .oc-side__mode { display: inline-flex; }

  /* Icons only: a narrow rail of the same links, labels as tooltips. */
  body.admin-sidebar-rail .oc-side { width: var(--admin-rail-width); overflow-x: hidden; }
  body.admin-sidebar-rail .oc-side__head { flex-direction: column; gap: 4px; padding: 8px 0; }
  body.admin-sidebar-rail .oc-side__who { display: none; }
  body.admin-sidebar-rail .oc-side__group > summary,
  body.admin-sidebar-rail .oc-side__branch > details,
  body.admin-sidebar-rail .oc-side__tag { display: none; }
  body.admin-sidebar-rail .oc-side__group ul { padding: 4px 6px; }
  body.admin-sidebar-rail .oc-side__group a,
  body.admin-sidebar-rail .oc-side__action { justify-content: center; gap: 0; padding: 0; min-height: 36px; }
  body.admin-sidebar-rail .oc-side__branch > a { padding-right: 0; }
  body.admin-sidebar-rail .oc-side__icon { flex-basis: 18px; width: 18px; height: 18px; }
  body.admin-sidebar-rail .oc-side__group a > span,
  body.admin-sidebar-rail .oc-side__action > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  body.admin-sidebar-rail .oc-side__mode svg { transform: scaleX(-1); }
}
.oc-side__mode { display: none; flex-shrink: 0; }
/* With the menu pinned there is less room: the links sit closer together. The brand
   name stays, since the five links fit beside it. */
@media (min-width: 1024px) and (max-width: 1439px) {
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__bar { padding: 0 12px; column-gap: 4px; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__links { margin-left: 4px; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__links :is(a, .oc-nav__places) { padding: 0 10px; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__links :is(a, .oc-nav__places)::after { left: 10px; right: 10px; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__actions { gap: 2px; }
}
/* The tightest band: pinned menu plus the Messages icon. */
@media (min-width: 1024px) and (max-width: 1119px) {
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__links :is(a, .oc-nav__places) { padding: 0 4px; font-size: 14px; }
  body.has-admin-sidebar:not(.admin-sidebar-collapsed):not(.admin-sidebar-rail) .oc-nav__links :is(a, .oc-nav__places)::after { left: 4px; right: 4px; }
}
@media (min-width: 1440px) {
  body.has-admin-sidebar .oc-nav__account-label { display: inline; }
  body.has-admin-sidebar .oc-nav__account { padding: 0 14px 0 5px; border: 1px solid var(--border); }
}

/* Phone drawer open: keep the page underneath from scrolling. */
html.oc-drawer-open, body.oc-drawer-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .oc-side, .oc-side__backdrop, .oc-side__chev { transition: none !important; }
}

@media print {
  .oc-nav, .oc-side, .oc-side__backdrop { display: none !important; }
  body.has-admin-sidebar { padding-left: 0 !important; }
}

/* =========================================================================
   Places tree (/STATE/City/Venue/Room) and "This place" actions in the admin menu
   ========================================================================= */
.oc-side__branch { position: relative; }
.oc-side__branch > a { padding-right: 36px; }
.oc-side__branch > details > summary {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-secondary);
}
.oc-side__branch > details > summary::-webkit-details-marker { display: none; }
.oc-side__branch > details > summary:hover { background: var(--bg-hover); color: var(--text-primary); }
.oc-side__branch > details[open] > summary .oc-side__chev { transform: rotate(90deg); }
/* Each level indents so its line sits under the parent's icon. */
.oc-side__group .oc-side__places ul {
  margin: 0 0 2px 13px;
  padding: 0 0 0 6px;
  border-left: 1px solid var(--border);
}
.oc-side__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  vertical-align: 1px;
}
.oc-side__action.is-danger { color: #f47067; }
[data-theme="light"] .oc-side__action.is-danger { color: #b42318; }
/* Delete comes last, after a divider, so it's hard to tap by mistake. */
.oc-side__danger { margin-top: 4px !important; padding-top: 4px !important; border-top: 1px solid var(--border); }
.oc-side__group--here > summary { color: var(--accent-text, var(--accent)); }

@media (pointer: coarse) {
  .oc-side__group > summary { min-height: 40px; }
  .oc-side__group a, .oc-side__action { min-height: 40px; font-size: 15px; }
  .oc-side__branch > a { padding-right: 44px; }
  .oc-side__branch > details > summary { width: 40px; height: 40px; }
}

/* Place editor dialog (admin-sidebar.js) */
.oc-place-dialog {
  position: fixed;
  inset: 0;
  margin: auto; /* pages reset * { margin: 0 }, which would pin the dialog top-left */
  height: fit-content;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.oc-place-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.oc-place-dialog form { padding: 22px 22px 18px; }
.oc-place-dialog h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.oc-place-dialog .oc-place-where { margin: 0 0 18px; font-size: 14px; color: var(--text-secondary); }
.oc-place-field { display: block; margin-bottom: 16px; }
.oc-place-field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.oc-place-field input[type="text"], .oc-place-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
}
.oc-place-field input:focus, .oc-place-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.oc-place-field small { display: block; margin-top: 6px; font-size: 13px; color: var(--text-secondary); word-break: break-all; }
.oc-place-check { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; cursor: pointer; }
.oc-place-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.oc-place-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.oc-place-msg[hidden] { display: none; }
.oc-place-msg.is-error { background: rgba(248, 81, 73, 0.12); border: 1px solid rgba(248, 81, 73, 0.4); color: #f47067; }
[data-theme="light"] .oc-place-msg.is-error { color: #b42318; }
.oc-place-warn { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.oc-place-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.oc-place-actions button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.oc-place-actions .is-primary { background: #a86519; border-color: #a86519; color: #fff; }
.oc-place-actions .is-danger { background: #b42318; border-color: #b42318; color: #fff; }
.oc-place-actions button:disabled { opacity: 0.6; cursor: wait; }
.oc-place-dialog [hidden] { display: none !important; }

/* Tables & people dialog */
.oc-tables-body { padding: 22px 22px 18px; }
.oc-tables-list { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--border); }
.oc-tables-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.oc-tables-name { font-size: 16px; font-weight: 700; min-width: 0; flex: 1 1 180px; }
.oc-tables-name small { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.oc-tables-row-actions { display: flex; gap: 6px; }
.oc-tables-row-actions button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.oc-tables-row-actions .is-danger-text { color: #f47067; }
[data-theme="light"] .oc-tables-row-actions .is-danger-text { color: #b42318; }
.oc-tables-empty { color: var(--text-secondary); font-size: 15px; justify-content: flex-start !important; }
.oc-tables-count { margin: 0 0 8px; font-size: 14px; color: var(--text-secondary); }
.oc-tables-seat { margin-top: 12px; }
.oc-place-field input[type="number"], .oc-place-field input[type="search"], .oc-place-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
}
.oc-tables-seat select { margin-top: 8px; padding: 4px; }
.oc-tables-seat select option { padding: 8px; }
.oc-place-dialog button:disabled { opacity: 0.55; cursor: not-allowed; }

/* =========================================================================
   Places button + panel (member-facing states, cities, venues)
   ========================================================================= */
.oc-nav__links .oc-nav__places {
  gap: 4px;
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.oc-nav__caret { transition: transform 0.18s ease; }
.oc-nav__places[aria-expanded="true"], .oc-nav__places.is-open { color: var(--text-primary); }
.oc-nav__places[aria-expanded="true"] .oc-nav__caret, .oc-nav__places.is-open .oc-nav__caret { transform: rotate(180deg); }

.oc-places {
  position: fixed;
  inset: auto;
  top: var(--oc-places-top, 96px);
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100dvh - var(--oc-places-top, 96px));
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--oc-nav-font, inherit);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.oc-places::backdrop { background: rgba(0, 0, 0, 0.45); }
[data-theme="light"] .oc-places::backdrop { background: rgba(0, 0, 0, 0.3); }
.oc-places__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 6px 0 16px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 700;
}
.oc-places__body { display: block; padding: 8px 12px 16px; }
.oc-places a, .oc-places-page a { text-decoration: none; }
.oc-places a:focus-visible, .oc-places summary:focus-visible, .oc-places button:focus-visible,
.oc-places-page a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.oc-places__shortcut {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  margin: 4px 0 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--text-primary);
}
.oc-places__shortcut-title { font-size: 16px; font-weight: 700; }
.oc-places__shortcut-sub { font-size: 14px; color: var(--text-secondary); }

.oc-places__group { padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }
.oc-places__group:first-child { border-top: 0; margin-top: 0; }
.oc-places__group--fold { position: relative; }
.oc-places__group--fold > details > summary {
  position: absolute;
  top: 8px;
  right: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  border-radius: 10px;
  color: var(--text-secondary);
}
.oc-places__group--fold > details > summary::-webkit-details-marker { display: none; }
.oc-places__group--fold > details[open] > summary .oc-side__chev { transform: rotate(90deg); }
.oc-places__group--fold > .oc-places__state { padding-right: 52px; }

.oc-places ul, .oc-places-page ul { list-style: none; margin: 0; padding: 0; }
.oc-places__state, .oc-places__city, .oc-places__venue {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-primary);
}
.oc-places__state { font-weight: 700; }
.oc-places__city { font-weight: 600; }
.oc-places__venue { padding: 6px 12px; font-weight: 500; color: var(--text-secondary); }
.oc-places__venues { margin: 0 0 4px 16px !important; padding-left: 6px !important; border-left: 1px solid var(--border); }
.oc-places__more { font-weight: 600; }
.oc-places :is(.oc-places__state, .oc-places__city, .oc-places__venue):hover,
.oc-places-page :is(.oc-places__state, .oc-places__city, .oc-places__venue):hover { background: var(--bg-hover); color: var(--text-primary); }
.is-trail { color: var(--text-primary); font-weight: 600; }
.oc-places .is-current, .oc-places-page .is-current {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--text-primary);
  font-weight: 700;
}
.oc-places__all {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
[data-theme="light"] .oc-places__all { color: #8a5210; }
.oc-places__empty { padding: 8px 12px; font-size: 15px; color: var(--text-secondary); }
.oc-places-page { margin-top: 8px; }

@media (min-width: 960px) {
  .oc-places {
    top: 70px;
    left: var(--oc-places-left, 16px);
    right: auto;
    width: 400px;
    max-height: calc(100dvh - 80px);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md, 0 12px 32px rgba(0, 0, 0, 0.3));
  }
  .oc-places::backdrop { background: transparent; }
  [data-theme="light"] .oc-places::backdrop { background: transparent; }
  .oc-places__head { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .oc-nav__caret { transition: none; }
}
.oc-places__cities { margin-left: 12px !important; }
.oc-tables-body form { padding: 0; }

/* Messages icon + unread badge */
.oc-nav__msg { position: relative; text-decoration: none; }
.oc-nav__msg.is-active { color: var(--text-primary); background: var(--accent-dim); }
.oc-nav__msg-badge {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-surface);
}
.oc-nav__msg-badge[hidden] { display: none; }

/* ── Platform footer (<!--SITE_FOOT-->, renderSiteFoot() in site-chrome.ts) ──
   The same on every page: name · tagline, then © year · Theme · Cookie preferences.
   Short on purpose: about 100px on a phone, one 60px row on wide screens. */
.oc-foot {
  box-sizing: border-box;
  width: 100%;
  align-self: stretch;
  margin-top: 24px;
  padding: 12px 16px 4px;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text-secondary);
  font: 400 13px/1.5 'Poppins', system-ui, sans-serif;
  text-align: center;
}
.oc-foot *, .oc-foot *::before, .oc-foot *::after { box-sizing: border-box; }
.oc-foot__line { margin: 0; }
.oc-foot__name { color: var(--text-primary); font-weight: 600; }
.oc-foot__tagline::before { content: "\00b7"; margin: 0 6px; }
.oc-foot__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
.oc-foot__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.oc-foot__dot { margin: 0 2px; }
.oc-foot__link:hover, .oc-foot__link:focus-visible { color: var(--accent-text); }
.oc-foot__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Narrow phones: the year gets its own line, then Theme · Cookie preferences, so no
   separator dangles at a line end. */
@media (max-width: 479px) {
  .oc-foot__legal > span:first-child { flex-basis: 100%; }
  .oc-foot__legal > .oc-foot__dot:nth-child(2) { display: none; }
}
@media (min-width: 820px) {
  .oc-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 24px;
    padding: 8px 24px;
    text-align: left;
  }
}
@media print { .oc-foot { display: none; } }

/* Acting admin role, one line under the nav for admins (site-chrome.ts renderRoleBar). Platform
   admin is a warning because every change reaches the whole platform; group admin is calm. */
.oc-role-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 2px;
  padding: 4px 16px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.oc-role-bar__text { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 0; }
.oc-role-bar__text .oc-side__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-secondary); }
.oc-role-bar--platform { background: var(--amber-dim); border-bottom-color: var(--amber); }
.oc-role-bar--platform .oc-role-bar__text .oc-side__icon { color: var(--amber); }
/* The amber tint lowers the accent link's contrast in light mode, so the link uses the text color here. */
.oc-role-bar--platform .oc-role-bar__switch { color: var(--text-primary); }
.oc-role-bar__error { flex-basis: 100%; font-weight: 600; }
.oc-role-bar__error:empty { display: none; }
.oc-role-bar__switch {
  min-height: 44px;
  margin-left: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.oc-role-bar__switch:disabled { cursor: progress; opacity: 0.6; }
.oc-role-bar__switch:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* Phones: the button sits beside the text as just "Switch", so the line stays two lines (59px at 360px). */
@media (max-width: 600px) {
  .oc-role-bar:not(.has-error) { flex-wrap: nowrap; }
  .oc-role-bar__long { display: none; }
  .oc-role-bar__switch { flex-shrink: 0; padding: 0 8px; }
}
