:root {
  --bg: #0A0C13;
  --surface: #10131C;
  --card: #161A26;
  --card-elevated: #1E2434;
  --border: #293044;
  --text: #EDF0F7;
  --text-secondary: #94A0B8;
  --text-muted: #5E6980;
  --accent: #5B7FE8;
  --accent-dim: #1B2340;
  --gold: #D6AE63;
  --like: #E8566B;
  --success: #3DBA8C;
  --font: "Segoe UI", "Helvetica Neue", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, #1B2340 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, #2A2412 0%, transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--gold); }

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}

.boot img {
  border-radius: 16px;
}

.main {
  padding: 1.25rem 1.5rem 3rem;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  grid-row: 2;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.side {
  grid-row: 2;
  border-right: 1px solid var(--border);
  background: rgba(16, 19, 28, 0.92);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
}

.brand {
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  font-weight: 700;
}

.nav-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--text-secondary);
}
.nav-link.active, .nav-link:hover {
  background: var(--accent-dim);
  color: var(--text);
}

.main {
  padding: 1.25rem 1.5rem 3rem;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.muted { color: var(--text-secondary); }
.muted-sm { color: var(--text-muted); font-size: 0.85rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.stack { display: grid; gap: 0.75rem; }

.list-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.6rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.list-row:hover { border-color: var(--accent); }

.avatar, .avatar-lg, .avatar-sm {
  position: relative;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.avatar { width: 40px; height: 40px; font-size: 0.75rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.4rem; margin: 0 auto 0.75rem; }

.notif-unread { border-left: 3px solid var(--accent); }

.chat-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}
.chat-page .topbar {
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}
.chat-peer-identity {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.chat-peer-identity:hover .page-title,
.chat-peer-identity:hover .muted-sm {
  color: var(--gold);
}
.chat-layout {
  display: flex;
  flex-direction: column;
  height: min(70vh, 640px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  min-height: 0;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 0.75rem;
  min-height: 0;
}
.bubble-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: fit-content;
  max-width: 80%;
}
.bubble-block.mine { align-self: flex-end; align-items: flex-end; }
.bubble-block.theirs { align-self: flex-start; align-items: flex-start; }
.bubble-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
  padding: 0 0.35rem;
  white-space: nowrap;
}
.bubble.mine {
  background: var(--accent-dim);
  border-color: rgba(91, 127, 232, 0.4);
}
.date-header {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
}
.chat-compose {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

#map-root {
  width: 100%;
  overflow: hidden;
}
.map-canvas {
  height: min(65vh, 520px);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.map-pin-form { margin-top: 1rem; }
.map-pin-list {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}
#map-root .maplibregl-canvas-container,
#map-root .maplibregl-map {
  height: 100%;
}
.maplibregl-popup.aw-map-popup .maplibregl-popup-content {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  padding: 0.7rem 0.85rem;
}
.maplibregl-popup.aw-map-popup .maplibregl-popup-tip {
  border-top-color: var(--card);
}
.maplibregl-ctrl-attrib {
  background: rgba(16, 19, 28, 0.85) !important;
  color: var(--text-muted);
}
.aircraft-marker {
  color: var(--gold);
  width: 22px;
  height: 22px;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}
.aircraft-marker-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card-elevated);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  font: inherit;
}
.btn:hover { border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { border-color: var(--like); color: var(--like); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}
.post-actions-leading,
.post-actions-trailing {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.post-action {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  line-height: 1;
}
a.post-action:hover { color: var(--text); }
.post-action:hover { color: var(--text); }
.post-action:disabled { opacity: 0.55; cursor: default; }
.post-action:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.post-action-glyph {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex-shrink: 0;
}
.post-action-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.post-action.is-liked,
.post-action.is-liked:hover,
a.post-action.is-liked:hover { color: var(--gold); }
.post-action.is-bookmarked,
.post-action.is-bookmarked:hover { color: var(--gold); }
.post-action.is-muted { color: var(--text-muted); }

.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.textarea { min-height: 120px; resize: vertical; }
.field { display: grid; gap: 0.35rem; margin-bottom: 0.85rem; }
.field label { color: var(--text-secondary); font-size: 0.9rem; }

.error {
  color: var(--like);
  background: rgba(232, 86, 107, 0.12);
  border: 1px solid rgba(232, 86, 107, 0.35);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.85rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(420px, 100%);
  background: rgba(22, 26, 38, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.auth-card h1 {
  margin: 0 0 0.35rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.post-media {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0.75rem 0;
  background: var(--surface);
}
.post-gallery {
  position: relative;
  margin: 0.75rem 0;
  user-select: none;
}
.post-gallery-viewport {
  touch-action: pan-y;
  cursor: zoom-in;
}
.post-gallery .post-media {
  margin: 0;
}
.post-gallery-slide {
  display: block;
  pointer-events: none;
}
.post-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
}
.post-gallery-dot {
  pointer-events: auto;
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.post-gallery-dot.active {
  background: var(--gold);
  transform: scale(1.15);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip-auto { background: rgba(214, 174, 99, 0.18); }
.chip-error { background: rgba(232, 86, 107, 0.16); color: var(--like); }
.chip-warning { background: rgba(214, 174, 99, 0.18); color: var(--gold); }

.report-thumb {
  max-width: 12rem;
  max-height: 8rem;
  object-fit: cover;
  border-radius: 0.4rem;
}

.score-list { display: grid; gap: 0.2rem; }
.score-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.score-hot { color: var(--like); font-weight: 600; }

.like { color: var(--like); }

.post-card { cursor: pointer; transition: transform 180ms ease, border-color 180ms ease; }
.post-card:hover { transform: translateY(-1px); border-color: rgba(214, 174, 99, 0.45); }
.post-card-menu-open {
  position: relative;
  z-index: 40;
}
.post-author {
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.5rem;
}
.post-author-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.post-menu { flex-shrink: 0; position: relative; }
.post-menu-dismiss {
  position: fixed;
  inset: 0;
  z-index: 39;
}
.post-menu-btn {
  width: 2.1rem;
  height: 2.1rem;
  color: var(--text-muted);
}
.post-menu-btn:hover { color: var(--text); }
.overflow-panel button.nav-link {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.overflow-panel button.nav-link:hover {
  background: var(--accent-dim);
  color: var(--text);
}
.author-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  min-width: 0;
}
.author-text { display: grid; line-height: 1.2; }
.author-text strong { color: var(--text); }
.post-caption { margin: 0.65rem 0 0.35rem; white-space: pre-wrap; }
.post-caption-solo { margin-bottom: 1.1rem; }
.inline-link {
  color: var(--gold);
  text-decoration: underline;
  word-break: break-word;
}
.inline-link:hover { color: var(--gold); opacity: 0.85; }
.maplibregl-popup.aw-map-popup a {
  color: var(--gold);
  text-decoration: underline;
}

.avatar-btn {
  padding: 0;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: 50%;
  line-height: 0;
}
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

.notif-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  color: var(--gold);
}

.notif-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 7, 12, 0.88);
  display: grid;
  place-items: center;
  animation: fadeIn 180ms ease;
}
.lightbox-img {
  max-width: min(92vw, 1100px);
  max-height: 85vh;
  object-fit: contain;
  transition: transform 120ms ease;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}
.lightbox-controls {
  position: absolute;
  bottom: 1.25rem;
  display: flex;
  gap: 0.5rem;
}

.emoji-drawer {
  border: 1px solid var(--border);
  background: var(--card-elevated);
  border-radius: 12px;
  padding: 0.65rem;
  margin-top: 0.5rem;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.25rem;
  max-height: 216px;
  overflow-y: auto;
}
.emoji-cell {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.45rem;
  padding: 0.35rem;
  cursor: pointer;
  border-radius: 8px;
}
.emoji-cell:hover { background: var(--accent-dim); }

.user-search { position: relative; min-width: 220px; }
.user-search-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
}
.user-search-item {
  width: 100%;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
}
.user-search-item:hover { background: var(--accent-dim); }

.bubble {
  position: relative;
  max-width: 100%;
  width: fit-content;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--card-elevated);
  border: 1px solid var(--border);
  user-select: none;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}
.bubble a { color: var(--gold); }
.bubble-text,
.comment-text,
.profile-about {
  margin: 0;
  white-space: pre-wrap;
  user-select: text;
}
.bubble:has(.bubble-reactions) {
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
}
.bubble > :not(.bubble-reactions) {
  align-self: stretch;
}
.bubble-reactions {
  position: relative;
  display: flex;
  gap: 0.25rem;
  z-index: 1;
  margin-top: 0.45rem;
}
/* Inner bottom corner of the bubble (toward the thread center). */
.bubble.mine .bubble-reactions { align-self: flex-start; }
.bubble.theirs .bubble-reactions { align-self: flex-end; }
.reaction-chip {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.reaction-chip.mine { border-color: var(--gold); }
.chat-compose-input {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 2.5rem;
  resize: none;
  overflow-y: hidden;
  line-height: 1.35;
}
.chat-compose-icon {
  appearance: none;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.chat-compose-icon:hover,
.chat-compose-icon.active {
  color: var(--text);
  background: var(--accent-dim);
}
.chat-compose-icon.send { color: var(--gold); }
.chat-compose-icon.send:hover,
.chat-compose-icon.send:focus-visible {
  color: var(--gold);
  background: var(--accent-dim);
}
.chat-compose-icon:disabled {
  opacity: 0.4;
  cursor: default;
  background: transparent;
}
.chat-compose-glyph {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.brand-logo { width: 28px; height: 28px; }
.brand-text { color: var(--gold); }
.nav-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}
.top-chrome-icons .icon-link {
  color: var(--gold);
  font-size: inherit;
}
.top-chrome-icons .icon-link.active,
.top-chrome-icons .icon-link:hover {
  color: var(--gold);
  background: var(--accent-dim);
}
.bottom-link .nav-icon { width: 1.4rem; height: 1.4rem; }
.online-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3ecf8e;
  box-shadow: 0 0 0 2px rgba(62, 207, 142, 0.25);
  flex-shrink: 0;
}
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.admin-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-elevated);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}
.admin-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  color: inherit;
}
.admin-card-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.admin-card-disabled:hover {
  transform: none;
  border-color: var(--border);
}
.admin-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.admin-home-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-height: 6.5rem;
  padding: 1.05rem 1.15rem;
  overflow: visible;
}
.admin-home-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.admin-home-card .admin-card-label {
  line-height: 1.25;
}
.admin-home-card .muted-sm {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-home-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 16px;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 16%, var(--card));
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}
.admin-home-icon .agent-icon {
  width: 2.35rem;
  height: 2.35rem;
}
.admin-home-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
}
.admin-home-badge.is-alert {
  color: var(--text);
  background: var(--like);
  border-color: transparent;
}
.admin-home-card:hover .admin-home-icon {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.admin-home-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 800px) {
  .admin-home-card {
    gap: 0.75rem;
    min-height: 0;
    padding: 0.85rem 0.9rem;
  }
  .admin-home-card:has(.admin-home-badge) { padding-right: 2.4rem; }
  .admin-home-icon {
    position: static;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
  }
  .admin-home-icon .agent-icon {
    width: 1.35rem;
    height: 1.35rem;
  }
  .admin-home-badge {
    top: 0.4rem;
    right: 0.5rem;
    min-width: 1.1rem;
    height: 1.1rem;
    font-size: 0.65rem;
  }
}
@media (max-width: 640px) {
  .admin-home-grid { grid-template-columns: 1fr; }
}
.admin-official-note {
  margin: -0.35rem 0 1rem;
}

/* Official calendar (admin) */
.main:has(.admin-cal) {
  max-width: 1120px;
}
.admin-cal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: opacity 180ms ease;
}
.admin-cal.is-loading {
  opacity: 0.72;
  pointer-events: none;
}
.admin-cal-topbar {
  margin-bottom: 0.85rem;
}
.admin-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(22, 26, 38, 0.72);
  animation: calToolbarIn 280ms ease both;
}
.admin-cal-seg {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-width: 10rem;
  background: rgba(10, 12, 19, 0.45);
}
.admin-cal-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.admin-cal-seg button:hover:not(:disabled) {
  color: var(--text);
}
.admin-cal-seg button.is-active {
  background: rgba(214, 174, 99, 0.2);
  color: var(--gold);
}
.admin-cal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.admin-cal-chevron {
  min-width: 2.4rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-size: 1.15rem;
  line-height: 1;
}
.admin-cal-heading {
  font-weight: 650;
  margin-left: 0.35rem;
  color: var(--text);
  letter-spacing: 0.01em;
}
.admin-cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 0.85fr);
  gap: 1rem;
  align-items: start;
}
.admin-cal-layout.is-day {
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.9fr);
}
.admin-cal-main,
.admin-cal-side {
  min-width: 0;
}
.admin-cal-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.admin-cal-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(30, 36, 52, 0.35), transparent 42%),
    rgba(16, 19, 28, 0.72);
  animation: calPanelIn 260ms ease both;
}
.admin-cal-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.admin-cal-section-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--gold);
  margin: 0 0 0.55rem;
}
.admin-cal-section-head .admin-cal-section-title {
  margin: 0;
}
.admin-cal-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}
.admin-cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.85rem;
}
.admin-cal-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--text-muted);
  padding: 0.2rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-cal-cell {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 12px;
  min-height: 3.25rem;
  padding: 0.4rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}
.admin-cal-cell:hover:not(:disabled) {
  border-color: rgba(214, 174, 99, 0.55);
  transform: translateY(-1px);
}
.admin-cal-cell:active:not(:disabled) {
  transform: translateY(0);
}
.admin-cal-cell.is-outside {
  opacity: 0.42;
}
.admin-cal-cell.has-items {
  border-color: rgba(214, 174, 99, 0.4);
}
.admin-cal-cell.is-today .admin-cal-daynum {
  color: var(--gold);
}
.admin-cal-cell.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgba(214, 174, 99, 0.28);
}
.admin-cal-cell.is-selected {
  border-color: var(--gold);
  background: rgba(214, 174, 99, 0.16);
  box-shadow: 0 0 0 1px rgba(214, 174, 99, 0.25);
  animation: calSelectPulse 320ms ease;
}
.admin-cal-daynum {
  font-size: 0.92rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.admin-cal-markers {
  display: flex;
  gap: 0.22rem;
  align-self: center;
  margin-top: 0.1rem;
}
.admin-cal-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--gold);
}
.admin-cal-dot.is-pending { background: var(--gold); }
.admin-cal-dot.is-live { background: var(--success); }
.admin-cal-day-agenda {
  min-height: 12rem;
}
.admin-cal-row {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  border-radius: 11px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  display: grid;
  gap: 0.25rem;
  animation: calRowIn 240ms ease both;
  animation-delay: calc(var(--stagger, 0) * 28ms);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.admin-cal-agenda-row {
  grid-template-columns: 5.6rem auto 1fr;
  align-items: center;
  gap: 0.55rem;
}
.admin-cal-row + .admin-cal-row {
  margin-top: 0.2rem;
}
.admin-cal-row:hover:not(:disabled) {
  background: rgba(214, 174, 99, 0.08);
  transform: translateX(2px);
}
.admin-cal-row.is-selected {
  border-color: rgba(214, 174, 99, 0.55);
  background: rgba(214, 174, 99, 0.12);
}
.admin-cal-agenda-time {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.admin-cal-kind {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  border: 1px solid transparent;
}
.admin-cal-kind.is-pending {
  color: var(--gold);
  background: rgba(214, 174, 99, 0.12);
  border-color: rgba(214, 174, 99, 0.28);
}
.admin-cal-kind.is-live {
  color: var(--success);
  background: rgba(61, 186, 140, 0.12);
  border-color: rgba(61, 186, 140, 0.28);
}
.admin-cal-agenda-caption,
.admin-cal-queue-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}
.admin-cal-queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.admin-cal-detail-body {
  animation: calDetailIn 240ms ease both;
}
.admin-cal-detail-caption {
  margin: 0.45rem 0 0.55rem;
  white-space: pre-wrap;
  line-height: 1.45;
}
.admin-cal-media {
  margin-top: 0.65rem;
  border-radius: 10px;
  max-height: 180px;
  object-fit: cover;
  width: 100%;
}
.admin-cal-actions {
  margin-top: 0.85rem;
}
.admin-cal-back {
  margin-left: auto;
}
.admin-cal-edit {
  animation: calDetailIn 220ms ease both;
}

@keyframes calToolbarIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@keyframes calPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes calRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes calDetailIn {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes calSelectPulse {
  0% { transform: scale(0.98); }
  60% { transform: scale(1.015); }
  100% { transform: none; }
}

@media (max-width: 800px) {
  .main:has(.admin-cal) {
    max-width: none;
  }
  .admin-cal-layout,
  .admin-cal-layout.is-day {
    grid-template-columns: 1fr;
  }
  .admin-cal-seg {
    width: 100%;
    min-width: 0;
  }
  .admin-cal-cell {
    min-height: 40px;
    padding: 0.3rem;
    border-radius: 10px;
  }
  .admin-cal-agenda-row {
    grid-template-columns: 4.5rem 1fr;
    grid-template-rows: auto auto;
  }
  .admin-cal-agenda-caption {
    grid-column: 1 / -1;
    white-space: normal;
  }
  .admin-cal-back {
    margin-left: 0;
    width: 100%;
  }
  .admin-cal-row:hover:not(:disabled) {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-cal,
  .admin-cal-toolbar,
  .admin-cal-panel,
  .admin-cal-row,
  .admin-cal-detail-body,
  .admin-cal-edit,
  .admin-cal-cell,
  .admin-cal-cell.is-selected {
    animation: none !important;
    transition: none !important;
  }
  .admin-cal.is-loading {
    opacity: 1;
  }
}
.admin-success {
  color: var(--gold);
  background: rgba(214, 174, 99, 0.12);
  border: 1px solid rgba(214, 174, 99, 0.35);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.85rem;
}
.agent-thread {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(36rem, calc(100vh - 16rem));
  overflow-y: auto;
  margin-bottom: 0.85rem;
  min-width: 0;
}
.agent-msg {
  max-width: 42rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  min-width: 0;
}
.agent-msg.is-user {
  align-self: flex-end;
  background: rgba(61, 111, 212, 0.12);
  white-space: pre-wrap;
}
.agent-msg.is-assistant,
.agent-msg.is-tool {
  align-self: flex-start;
  width: min(100%, 42rem);
  white-space: normal;
}
.agent-msg.is-tool {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.agent-msg-actions {
  margin-top: 0.45rem;
}
.agent-msg-actions .btn {
  width: auto;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.agent-compose {
  margin-bottom: 1.4rem;
}
.agent-layout .desk-actions,
.main.admin-shell .desk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.agent-layout .desk-actions .btn,
.main.admin-shell .desk-actions .btn {
  width: auto;
  flex: 0 0 auto;
}
.agent-layout .card .btn-row,
.main.admin-shell .card .btn-row,
.main.admin-shell .admin-user-card-actions {
  justify-content: flex-end;
}
.agent-layout .agent-msg-actions {
  width: 100%;
  justify-content: flex-start;
}
.agent-layout .agent-msg-actions .btn:last-child {
  margin-left: auto;
}
.agent-layout .card .btn-row .btn,
.main.admin-shell .card .btn-row .btn,
.main.admin-shell .admin-user-card-actions .btn {
  width: auto;
  flex: 0 0 auto;
}
.agent-rail > .btn {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}
.agent-compose-actions {
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.55rem;
}
.agent-compose-actions .btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 44px;
}
.agent-compose .textarea {
  min-height: 5rem;
}
.agent-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--gold);
}
.admin-card-label {
  font-weight: 650;
  color: var(--gold);
  font-size: 1.05rem;
}
.admin-card-count {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
}
.admin-card-count.is-alert { color: var(--like); }
.agent-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 22rem));
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.agent-hub-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.agent-hub-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.agent-hub-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 16%, var(--card));
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}
.agent-hub-icon .agent-icon {
  width: 1.45rem;
  height: 1.45rem;
}
.agent-hub-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: 0;
}
.agent-hub-next {
  color: var(--desk-quiet);
  font-size: 0.8rem;
}
.agent-hub-stats {
  display: grid;
  gap: 0.22rem;
  max-width: 22rem;
}
.agent-hub-stat {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
}
.agent-hub-stat span:first-child { color: var(--desk-quiet); }
.agent-hub-stat span:last-child {
  color: var(--desk-secondary);
  font-variant-numeric: tabular-nums;
}
.agent-hub-waiting {
  color: var(--like);
  font-size: 0.8rem;
  font-weight: 650;
}
@media (max-width: 800px) {
  .agent-hub-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
  }
  .agent-hub-icon .agent-icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}
@media (max-width: 640px) {
  .agent-hub-grid { grid-template-columns: minmax(0, 1fr); }
}
.admin-user-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.admin-user-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.admin-user-card-meta { flex: 1; min-width: 0; }
.admin-user-name-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.admin-user-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
}
.admin-session-panel {
  border-top: 1px solid var(--border);
  padding: 0.65rem 0.75rem 0.85rem;
  display: grid;
  gap: 0.55rem;
}
.admin-user-detail {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--card-elevated);
  margin-bottom: 0.25rem;
}
.admin-user-detail-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: 0.9rem;
}
.admin-user-about span:last-child {
  white-space: pre-wrap;
  word-break: break-word;
}
.admin-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}
.admin-section-title {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 650;
}
.admin-session-row {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--card-elevated);
}
.session-ua {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
}
.admin-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  background: var(--card-elevated);
}
.admin-stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
}
.admin-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}
.bar-chart {
  display: grid;
  gap: 0.35rem;
  align-items: end;
  min-height: 140px;
  min-width: min-content;
  padding-top: 0.5rem;
}
.bar-chart-col {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 0.25rem;
  min-height: 120px;
  min-width: 0;
  overflow: hidden;
}
.bar-chart-bar {
  width: 70%;
  max-width: 28px;
  align-self: end;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #e4c57a, var(--gold));
}
.bar-chart-value { font-size: 0.7rem; color: var(--text-muted); }
.bar-chart-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.admin-chart-scroll {
  overflow-x: auto;
  max-width: 100%;
}
button.bar-chart-col {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  width: 100%;
}
.bar-chart-col.is-selected .bar-chart-bar {
  background: linear-gradient(180deg, #f3e2b0, var(--accent));
}
.admin-stat-link {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 0.35rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-height: 4.5rem;
}
.admin-stat-link .admin-stat-value,
.admin-stat-link .muted-sm { grid-column: 1; }
.admin-stat-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
}
.admin-stat-link:hover { border-color: var(--gold); }
.admin-metric-section { margin-bottom: 0.35rem; }
.admin-user-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-elevated);
}
.admin-user-summary-meta { margin: 0; }
.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0 1rem;
}
.admin-range {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.admin-range-btn {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
}
.admin-range-btn.is-selected {
  color: var(--text);
  border-color: var(--gold);
  background: rgba(214, 174, 99, 0.12);
}
.admin-compare { margin: 0.35rem 0 1rem; color: var(--text-secondary); }
.admin-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
}
.admin-person-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.75rem;
  margin-bottom: 0.55rem;
}
.admin-log-note { margin: 0.15rem 0 0.35rem; }
.admin-log-counts { margin: 0 0 0.85rem; color: var(--text-secondary); }
.admin-log-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.admin-log-search { margin-bottom: 0.85rem; }
.admin-log {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.75rem;
  margin-bottom: 0.55rem;
}
.admin-log.is-error { border-color: rgba(232, 86, 107, 0.45); }
.admin-log.is-warning { border-color: rgba(214, 174, 99, 0.45); }
.admin-log-message {
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}
.admin-log-details { margin-top: 0.45rem; }
.admin-log-details summary { cursor: pointer; color: var(--text-secondary); min-height: 44px; display: flex; align-items: center; }
.main.admin-shell {
  max-width: 1120px;
  min-width: 0;
  padding: 1.75rem 2rem 3.5rem;
}
@media (max-width: 800px) {
  .main.admin-shell {
    max-width: none;
    padding: 1.4rem 1.6rem calc(1.75rem + env(safe-area-inset-bottom));
  }
}
@media (max-width: 800px) {
  .topbar { flex-wrap: wrap; align-items: flex-start; }
  .topbar .btn { min-height: 44px; }
  .admin-stat-grid,
  .admin-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .admin-pager-label { grid-column: 1 / -1; text-align: center; }
  .admin-pager .btn { min-height: 44px; width: 100%; }
  .admin-user-detail-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .admin-chart-grid { grid-template-columns: 1fr; }
  .admin-log-filters .admin-range-btn { min-height: 44px; }
}

.top-chrome {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 19, 28, 0.95);
  position: sticky;
  top: 0;
  z-index: 20;
}
.top-chrome-search { flex: 1; max-width: 420px; }
.top-chrome-icons { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.icon-link {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", var(--font);
}
.icon-link.active, .icon-link:hover { background: var(--accent-dim); color: var(--text); }
.overflow-menu { position: relative; }
.overflow-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
  display: grid;
  gap: 0.15rem;
  z-index: 40;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
  background: rgba(16, 19, 28, 0.96);
  border-top: 1px solid var(--border);
  z-index: 25;
}
.bottom-nav.has-admin { grid-template-columns: repeat(6, 1fr); }
.bottom-nav.has-admin .bottom-link { padding-inline: 0.15rem; }
.bottom-nav.has-admin .bottom-link small { font-size: 0.58rem; }
.bottom-link {
  display: grid;
  place-items: center;
  gap: 0.1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.35rem;
  border-radius: 10px;
}
.bottom-link small { font-size: 0.65rem; }
.bottom-link.active { color: var(--gold); background: var(--accent-dim); }

.anim-page { animation: pageIn 220ms ease; }
.anim-fade-in { animation: fadeIn 180ms ease; }
.anim-slide-up { animation: slideUp 200ms ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.mobile-only { display: none; }

.brand-row.brand,
a.brand.brand-row {
  margin-bottom: 0;
}

#blazor-error-ui {
  background: #2a1520;
  color: var(--text);
  bottom: 0;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.65rem; }

.section-title {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
}
.pill-live { background: rgba(232, 86, 107, 0.18); color: #ff8a9a; border-color: rgba(232, 86, 107, 0.35); }
.pill-upcoming { background: rgba(91, 127, 232, 0.16); color: #9bb6ff; border-color: rgba(91, 127, 232, 0.35); }
.pill-gold { background: rgba(214, 174, 99, 0.16); color: var(--gold); border-color: rgba(214, 174, 99, 0.35); }

.station-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.station-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.station-card:hover { border-color: var(--accent); }
.station-title { font-size: 1.05rem; }
.station-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}
.moderator-list { display: grid; gap: 0.45rem; }

.banner-warn {
  background: rgba(214, 174, 99, 0.14);
  border: 1px solid rgba(214, 174, 99, 0.35);
  color: var(--gold);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
}

.participant-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin: 1rem 0 5.5rem;
}
.participant-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem;
  cursor: pointer;
  text-align: center;
}
.participant-tile.mine { border-color: var(--accent); }
.participant-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
  margin-bottom: 0.45rem;
}
.participant-media .avatar-lg {
  width: 72px;
  height: 72px;
  margin: 0;
  font-size: 1.1rem;
}
.participant-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
}
.participant-video.visible { display: block; }
.role-badge {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  z-index: 2;
}
.mute-badge, .camera-off-badge {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  z-index: 2;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  padding: 0.1rem 0.25rem;
}
.camera-off-badge { right: auto; left: 0.35rem; }
.switch-cam {
  position: absolute;
  right: 0.35rem;
  top: 0.35rem;
  z-index: 2;
}
.btn-icon {
  border: 1px solid var(--border);
  background: rgba(16, 19, 28, 0.8);
  color: var(--text);
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}
.participant-name {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-bottom-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 0;
  background: linear-gradient(transparent, var(--bg) 28%);
  z-index: 5;
}
@media (max-width: 800px) {
  .radio-bottom-bar { bottom: 4.5rem; }
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  background: var(--card-elevated);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  max-height: 70vh;
  overflow: auto;
  display: grid;
  gap: 0.65rem;
}
.sheet h2 { margin: 0; font-size: 1.1rem; }

@media (max-width: 800px) {
  .shell {
    grid-template-columns: 1fr;
    padding-bottom: 4.5rem;
  }
  .side { display: none; }
  .desktop-only { display: none !important; }
  .mobile-only { display: grid; }
  .bottom-nav { display: grid; }
  .main { max-width: none; padding-bottom: 1rem; }
  .top-chrome-search { display: none; }
  .brand-text { display: none; }
}

@media (min-width: 801px) {
  .main:has(> .chat-page) {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 3.9rem);
    max-height: calc(100vh - 3.9rem);
    padding-bottom: 1rem;
    box-sizing: border-box;
  }
  .chat-page {
    flex: 1;
    min-height: 0;
  }
  .chat-layout {
    flex: 1;
    height: auto;
    max-height: none;
  }
  .main:has(> .map-page) {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 3.9rem);
    max-height: calc(100vh - 3.9rem);
    max-width: none;
    padding: 0;
    box-sizing: border-box;
  }
  .map-page {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .map-page .map-canvas,
  .map-page #map-root {
    flex: 1;
    height: auto;
    min-height: 0;
    border-radius: 0;
    border: none;
  }
  .map-page-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    margin: 0;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(rgba(10, 12, 19, 0.88), transparent);
    pointer-events: none;
  }
  .map-page-topbar .page-title,
  .map-page-topbar .btn-row {
    pointer-events: auto;
  }
  .map-page-error {
    position: absolute;
    top: 4.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    max-width: min(480px, calc(100% - 2.5rem));
  }
  .map-pin-form {
    position: absolute;
    left: 1.25rem;
    top: 4.5rem;
    z-index: 3;
    width: min(360px, calc(100% - 2.5rem));
    max-height: calc(100% - 6rem);
    overflow: auto;
    margin: 0;
  }
  .map-pin-list {
    position: absolute;
    right: 3.75rem;
    top: 4.5rem;
    z-index: 2;
    width: min(300px, 28vw);
    max-height: calc(100% - 6rem);
    overflow: auto;
    margin: 0;
    list-style: none;
    padding: 0;
  }
}

.agent-desk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}
.agent-knowledge-grid { align-items: start; }
.agent-report-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}
.agent-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem);
  gap: 1rem;
  align-items: start;
  max-width: 100%;
}
.agent-workspace.is-desk {
  max-width: min(100%, calc(72rem + 23rem));
}
.agent-workspace.is-desk.is-single,
.agent-measure {
  max-width: min(100%, 72rem);
}
.agent-workspace.is-single { grid-template-columns: minmax(0, 1fr); }
.agent-artifact {
  position: sticky;
  top: 1rem;
}
.agent-draft {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin: 0;
}
.agent-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.4rem;
}
.agent-month {
  margin-bottom: 1rem;
}
.agent-inbox-row {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.65rem;
}
.agent-layout {
  display: grid;
  grid-template-columns: minmax(13.5rem, 18rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 1.5rem 1.75rem 2.75rem;
  box-sizing: border-box;
}
.agent-rail {
  position: sticky;
  top: 1rem;
}
.agent-layout-main {
  min-width: 0;
}
.agent-heat {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.agent-heat-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem;
  text-align: center;
}
.agent-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.agent-week-hours {
  grid-template-columns: 2.4rem repeat(7, minmax(4.5rem, 1fr));
  font-size: 0.75rem;
  min-width: 36rem;
}
.agent-hscroll {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
}
.agent-desk-grid > *,
.agent-report-charts > *,
.agent-workspace > * {
  min-width: 0;
}
.agent-heat { min-width: 28rem; }
.agent-today-list {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.agent-today-list li {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
}
.agent-today-time {
  flex: 0 0 auto;
  min-width: 4.6rem;
  color: var(--desk-quiet);
  font-size: 0.8rem;
}
.agent-today-attention {
  margin: 0.15rem 0 0;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 650;
}
.agent-icon {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.15em;
  display: inline-block;
  flex: 0 0 auto;
}
.agent-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.agent-nav { display: grid; gap: 0.35rem; }
.agent-needs-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.agent-need {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.75rem 0.65rem;
  background: var(--card-elevated);
}
.agent-need-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-width: 0;
  color: var(--text);
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}
.agent-need-summary:hover { color: var(--gold); }
.agent-need-actions {
  display: flex;
  gap: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.agent-need-actions .btn,
.agent-need-actions .agent-need-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  justify-content: center;
}
.agent-mic { touch-action: none; }
.agent-voice-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.agent-md p { margin: 0.35rem 0; }
.agent-md ul, .agent-md ol { margin: 0.35rem 0 0.35rem 1.1rem; padding: 0; }
.agent-md h3, .agent-md h4 { margin: 0.45rem 0 0.2rem; font-size: 1rem; }
.agent-md hr { border: 0; border-top: 1px solid var(--border); margin: 0.65rem 0; }
.agent-md code, .agent-md pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }
.agent-md pre { white-space: pre-wrap; background: var(--surface); padding: 0.55rem 0.7rem; border-radius: 6px; }
.agent-md a { color: var(--accent); }
.agent-usage { display: none; }
.agent-md .agent-brief-lead {
  margin: 0.15rem 0 0.55rem;
  font-size: 1.05rem;
  line-height: 1.45;
}
.agent-brief-fact {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  padding: 0.28rem 0;
}
.agent-brief-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.agent-brief-section { margin-top: 0.75rem; }
.agent-brief-section h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 650;
}
.agent-brief-more { margin-top: 0.65rem; }
.agent-brief-more > summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
}
@media (min-width: 901px) {
  .agent-rail {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  .agent-workspace.is-desk .agent-compose-actions { justify-content: flex-start; }
  .agent-approvals::details-content {
    content-visibility: visible;
    height: auto;
  }
  .agent-approvals > summary {
    pointer-events: none;
    list-style: none;
    cursor: default;
  }
  .agent-approvals > summary::-webkit-details-marker { display: none; }
  .agent-approvals > summary::marker { content: ""; }
  .agent-approvals-count { display: none; }
  .agent-approvals-label {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 650;
  }
}
.agent-needs-toggle, .agent-capture-toggle { display: none; }
.agent-hour-cell {
  min-height: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem;
  background: var(--surface);
}
.agent-hour-cell.is-work {
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
}
.agent-hour-cell.is-outside {
  opacity: 0.45;
}
.agent-wave {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.08em;
}
.agent-drop {
  display: grid;
  place-items: center;
  min-height: 6rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
}
.agent-drop-input {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}
.agent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
}
.agent-palette {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 20, 0.72);
  display: grid;
  place-items: center;
  z-index: 40;
}
.agent-palette .card {
  width: min(28rem, 92vw);
}
@media (max-width: 900px) {
  .agent-workspace {
    grid-template-columns: 1fr;
  }
  .agent-artifact {
    position: static;
  }
  .agent-layout {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  }
  .agent-rail {
    position: static;
    max-width: 100%;
    min-width: 0;
  }
  .agent-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
  }
  .agent-nav .btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }
  .agent-needs-heading, .agent-capture-heading { display: none; }
  .agent-needs-toggle, .agent-capture-toggle { display: inline-flex; }
  .agent-needs-body, .agent-capture-body { display: none; }
  .agent-needs.is-open .agent-needs-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }
  .agent-capture.is-open .agent-capture-body { display: grid; }
  .agent-need-actions { width: 100%; }
  .agent-workspace.is-desk .agent-usage-open { display: none; }
  .agent-workspace.is-desk .agent-usage { display: block; }
  .agent-workspace.is-desk .agent-usage > summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
  }
  .agent-workspace.is-desk .agent-thread {
    max-height: none;
    overflow: visible;
    margin-bottom: 0;
    padding-bottom: 1rem;
  }
  .agent-workspace.is-desk .agent-msg {
    width: 100%;
    max-width: none;
    align-self: stretch;
  }
  .agent-workspace.is-desk .agent-compose {
    position: sticky;
    bottom: 0;
    z-index: 8;
    background: var(--bg);
    margin-bottom: 0;
    padding: 0.65rem 0 calc(0.35rem + env(safe-area-inset-bottom));
  }
  .agent-workspace.is-desk .agent-approvals {
    margin-bottom: calc(9rem + env(safe-area-inset-bottom));
  }
  .agent-workspace.is-desk .agent-approvals > summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold);
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
  }
  .agent-brief-fact {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }
  .agent-week:not(.agent-week-hours) {
    grid-template-columns: 1fr 1fr;
  }
  .agent-report-charts { grid-template-columns: 1fr; }
}

/* Admin portal and staff agents only. Product pages are not inside these wrappers. */
.main.admin-shell,
.agent-layout {
  --desk-text: #F3F5F8;
  --desk-secondary: #C2CAD8;
  --desk-quiet: #9AA6BA;
  color: var(--desk-text);
  font-size: 0.95rem;
  line-height: 1.45;
}
.main.admin-shell .page-title,
.agent-layout .page-title {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--desk-text);
}
.main.admin-shell .section-title,
.agent-layout .section-title {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--desk-text);
}
.main.admin-shell .admin-section-title,
.agent-layout .admin-section-title,
.main.admin-shell .admin-cal-section-title {
  color: var(--desk-quiet);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.main.admin-shell .muted,
.agent-layout .muted {
  color: var(--desk-secondary);
}
.main.admin-shell .muted-sm,
.agent-layout .muted-sm {
  color: var(--desk-quiet);
  font-size: 0.88rem;
  line-height: 1.4;
}
.main.admin-shell .admin-card-label {
  color: var(--desk-text);
  font-size: 1rem;
  font-weight: 650;
}
.main.admin-shell .admin-card-count {
  color: var(--desk-secondary);
  font-size: 0.84rem;
}
.main.admin-shell .admin-card-count.is-alert { color: var(--like); }
.main.admin-shell .admin-card:hover { border-color: var(--accent); }
.main.admin-shell .admin-stat-value {
  color: var(--desk-text);
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.main.admin-shell .admin-stat-chevron {
  color: var(--desk-quiet);
  font-size: 1.25rem;
}
.main.admin-shell .admin-user-name-row strong {
  font-size: 1rem;
  font-weight: 650;
}
.main.admin-shell .admin-user-detail-row,
.main.admin-shell .admin-mono {
  font-size: 0.88rem;
}
.main.admin-shell .admin-log-message {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--desk-text);
}
.main.admin-shell .admin-log-counts,
.agent-layout .admin-log-counts {
  color: var(--desk-secondary);
  font-size: 0.9rem;
}
.main.admin-shell .bar-chart-bar,
.agent-layout .bar-chart-bar {
  background: linear-gradient(180deg, #9BB0F2, var(--accent));
}
.main.admin-shell .bar-chart-col.is-selected .bar-chart-bar,
.agent-layout .bar-chart-col.is-selected .bar-chart-bar {
  background: linear-gradient(180deg, #d5defb, #8aa4f0);
}
.main.admin-shell .bar-chart-value,
.main.admin-shell .bar-chart-label,
.agent-layout .bar-chart-value,
.agent-layout .bar-chart-label {
  color: var(--desk-quiet);
  font-size: 0.72rem;
}
.main.admin-shell .admin-range-btn.is-selected,
.agent-layout .admin-range-btn.is-selected {
  color: var(--desk-text);
  border-color: var(--accent);
  background: rgba(91, 127, 232, 0.16);
}
.main.admin-shell .admin-success,
.agent-layout .admin-success {
  color: var(--success);
  background: rgba(61, 186, 140, 0.12);
  border-color: rgba(61, 186, 140, 0.4);
}
.main.admin-shell .btn,
.agent-layout .btn {
  font-size: 0.9rem;
  font-weight: 600;
}
.main.admin-shell .chip,
.agent-layout .chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.agent-layout .brand-text {
  color: var(--desk-text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.agent-layout .agent-chip {
  color: var(--desk-secondary);
  font-weight: 600;
  letter-spacing: 0;
}
.agent-layout .agent-hub-card .agent-chip { color: var(--gold); }
.agent-layout .agent-hub-card .agent-chip.is-paused { color: var(--desk-quiet); }
.agent-layout .agent-need-summary {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--desk-text);
}
.agent-layout .agent-need-summary:hover { color: var(--accent); }
.agent-layout .agent-msg {
  font-size: 0.95rem;
  line-height: 1.45;
}
.agent-layout .agent-msg.is-tool {
  color: var(--desk-secondary);
  font-size: 0.88rem;
}
.agent-layout .agent-nav .btn { font-size: 0.88rem; }
@media (max-width: 800px) {
  .agent-layout .brand-text { display: inline; }
  .agent-layout {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  }
  .agent-workspace.is-desk .agent-compose {
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    padding-bottom: 0.35rem;
  }
}


