@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Many components set an explicit `display` (flex/block/…) which would otherwise
   override the browser's built-in [hidden] rule, leaving elements toggled via the
   `hidden` attribute stuck visible. Make `hidden` authoritative everywhere. */
[hidden] { display: none !important; }

:root {
  --bg: #10141D;
  --panel: #141926;
  --line: #232938;
  --ink: #EDEFF4;
  --dim: #8A93A6;
  --accent: #4FD1E0;
  --danger: #F07A8F;
}

html, body { height: 100%; }
body {
  height: 100dvh;
  background: var(--bg);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ---------------- top bar ---------------- */
#topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 30;
}
#logo, .auth-logo { font-weight: 700; letter-spacing: 0.06em; font-size: 15px; white-space: nowrap; }
#logo span, .auth-logo span { color: var(--accent); }
#logo em, .auth-logo em { color: var(--dim); font-weight: 400; font-style: normal; }

#mainNav { display: flex; gap: 2px; margin-left: auto; }
#mainNav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
}
#mainNav a.active { color: var(--ink); background: var(--line); }
.badge {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 4px;
}

main { flex: 1; position: relative; min-height: 0; }
main > section { position: absolute; inset: 0; display: flex; flex-direction: column; }
main > section[hidden] { display: none; }

/* ---------------- auth ---------------- */
#view-auth { align-items: center; justify-content: center; overflow-y: auto; padding: 20px 14px; }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
  margin: auto;
}
.auth-logo { font-size: 22px; text-align: center; }
.auth-sub { text-align: center; color: var(--dim); font-size: 14px; letter-spacing: 0.12em; margin-top: 4px; }
.auth-tag { text-align: center; color: var(--dim); font-size: 13px; margin: 8px 0 18px; }
.auth-guest { display: block; text-align: center; margin-top: 16px; color: var(--accent); font-size: 13px; text-decoration: none; }
.auth-guest:hover { text-decoration: underline; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 10px;
  background: var(--line);
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
}
.auth-tabs button.active { background: var(--accent); color: var(--bg); font-weight: 700; }

form label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 12px; }
form label.field-title { margin: 14px 0 6px; }
form input[type=text], form input[type=search], form input:not([type]),
form input[type=password], form textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  padding: 11px 12px;
  outline: none;
}
form input:focus, form textarea:focus { border-color: var(--accent); }
label.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.muted { color: var(--dim); font-size: 13px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0; }
button.primary {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px;
  background: var(--accent);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

/* ---------------- generic pages ---------------- */
.page { flex: 1; overflow-y: auto; padding: 18px 16px 40px; -webkit-overflow-scrolling: touch; }
.page.narrow { max-width: 460px; width: 100%; margin: 0 auto; }
.page h1 { font-size: 20px; margin-bottom: 14px; }
.page hr { border: none; border-top: 1px solid var(--line); margin: 22px 0 14px; }

.search {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  margin-bottom: 14px;
}
.search:focus { border-color: var(--accent); }

.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  width: 100%;
}
.user-card:active { background: var(--line); }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #10141D;
  background: radial-gradient(circle at 32% 28%, #ffffffcc, var(--av, #4FD1E0) 55%, #00000055 130%);
}
.user-card .who { flex: 1; min-width: 0; }
.user-card .who .nm { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .who .hd { color: var(--dim); font-size: 12px; }
.user-card .meta { color: var(--dim); font-size: 12px; text-align: right; flex: none; }
.pill {
  display: inline-block;
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--dim);
  margin-top: 3px;
}
.pill.friends { color: var(--accent); border-color: var(--accent); }

.section-title { font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 8px; }
.friend-actions { display: flex; gap: 8px; flex: none; }
.empty { color: var(--dim); font-size: 14px; padding: 18px 4px; }

/* ---------------- toolbar buttons ---------------- */
.tb {
  border: none;
  border-radius: 10px;
  padding: 10px 13px;
  min-height: 42px;
  background: var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.tb:disabled { opacity: 0.3; }
.tb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb.primary-tb { background: var(--accent); color: var(--bg); font-weight: 700; }
.tb.danger { color: var(--danger); }
.tb.icon { min-width: 42px; font-size: 17px; padding: 6px 10px; }
.tb.active { background: var(--accent); color: var(--bg); }
.danger-outline {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  margin-top: 12px;
}
.tb-sep { flex: 1; }

/* ---------------- map views ---------------- */
#view-map, #view-profile { overflow: hidden; }
.map-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: radial-gradient(ellipse at 50% 40%, #171d2b 0%, #10141D 65%);
}
.map-host.dragging { cursor: grabbing; }
.map-host.connecting { cursor: crosshair; }
/* all pointer input lands on the host; hit testing is done in JS geometry */
.map-host svg.edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-host .nodes-layer { position: absolute; inset: 0; pointer-events: none; }
.map-host.hoverable { cursor: pointer; }

.edit-toolbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: #141926ee;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  z-index: 20;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* map bar: choose / create / configure maps */
#mapBar {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 18;
  max-width: calc(100% - 106px); /* keep clear of the save-state pill */
}
#mapBar .tb { min-height: 38px; padding: 8px 11px; background: #232938ee; }
#mapSelect {
  background: #141926ee;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  min-height: 38px;
  min-width: 0;
  max-width: 44vw;
  outline: none;
}
#mapSelect:focus { border-color: var(--accent); }

.map-tabs {
  position: absolute;
  top: 58px; left: 0; right: 0;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  z-index: 18;
}
.map-tab {
  border: 1px solid var(--line);
  background: #141926ee;
  color: var(--dim);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  white-space: nowrap;
  flex: none;
}
.map-tab.active { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }

#btnChat { position: relative; }
#btnChat .badge { position: absolute; top: -4px; right: -4px; margin: 0; }

.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #141926ee;
  border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  padding: 6px 11px;
  white-space: nowrap;
}
.presence-pill::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7CE38B;
  box-shadow: 0 0 6px #7CE38B;
}

/* ---------------- chat + activity panel ---------------- */
/* Default: docked to the right edge, full height. When the user drags or
   resizes it, JS adds .floating and sets explicit left/top/width/height. */
.chat-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  display: flex;
  flex-direction: column;
  background: #10141Df2;
  border-left: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 25;
  animation: chat-in 0.18s ease-out;
}
.chat-panel.floating {
  right: auto; bottom: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: none;
}
.chat-panel.dragging, .chat-panel.resizing { transition: none; user-select: none; }
@keyframes chat-in { from { transform: translateX(20px); opacity: 0.3; } to { transform: translateX(0); opacity: 1; } }

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  cursor: grab;
  touch-action: none; /* header owns the drag gesture */
  flex: none;
}
.chat-panel.dragging .chat-head { cursor: grabbing; }
.chat-head-text { min-width: 0; }
.chat-head-btns { display: flex; gap: 4px; flex: none; }

.chat-title { font-weight: 700; font-size: 15px; }
.chat-presence { font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* body wraps log + compose so collapsing hides both at once */
.chat-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-panel.collapsed { bottom: auto; height: auto !important; }
.chat-panel.collapsed .chat-body,
.chat-panel.collapsed .chat-resize { display: none; }
.chat-panel.collapsed .chat-head { border-bottom: none; }
.chat-panel.collapsed:not(.floating) { border-radius: 0 0 0 14px; }

.chat-resize {
  position: absolute;
  right: 0; bottom: 0;
  width: 20px; height: 20px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 2;
  background:
    linear-gradient(135deg, transparent 0 50%, var(--dim) 50% 58%, transparent 58% 70%, var(--dim) 70% 78%, transparent 78%);
  opacity: 0.7;
}
.chat-resize:hover { opacity: 1; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}
.chat-empty { color: var(--dim); font-size: 13px; text-align: center; margin: auto 0; }

.chat-item { font-size: 13.5px; line-height: 1.4; }
.chat-item .meta { font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.chat-item .who { color: var(--accent); font-weight: 700; }

.chat-msg .body {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
  color: var(--ink);
  word-break: break-word;
}
.chat-msg.mine .body { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.chat-msg.mine .who { color: var(--ink); }

.chat-activity {
  color: var(--dim);
  font-size: 12.5px;
  display: flex;
  gap: 7px;
  align-items: baseline;
}
.chat-activity .dot { color: var(--accent); }
.chat-activity .who { color: var(--ink); font-weight: 700; }
.chat-activity time { color: var(--dim); font-size: 11px; white-space: nowrap; }

.chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.chat-compose input {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
}
.chat-compose input:focus { border-color: var(--accent); }
.chat-compose input:disabled { opacity: 0.5; }
.chat-compose .tb { flex: none; }

.hint {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  background: #141926dd;
  color: var(--dim);
  font-size: 11px;
  padding: 7px 14px;
  border-radius: 999px;
  pointer-events: none;
  text-align: center;
  max-width: 92%;
  z-index: 15;
  transition: opacity 0.4s;
}
.hint.accent { color: var(--bg); background: var(--accent); font-weight: 700; }

.save-state {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: var(--dim);
  background: #141926dd;
  padding: 5px 10px;
  border-radius: 999px;
  z-index: 16;
  pointer-events: none;
}

/* ---------------- bubbles (3D spheres) ---------------- */
.bubble {
  position: absolute;
  left: 0; top: 0;
  pointer-events: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  will-change: transform, opacity;
  background:
    radial-gradient(circle at 32% 27%, var(--lite) 0%, var(--main) 42%, var(--dark) 100%);
  box-shadow:
    inset -10px -14px 28px rgba(0, 0, 0, 0.38),
    0 6px 18px rgba(0, 0, 0, 0.45);
}
.bubble::before {
  /* specular highlight */
  content: '';
  position: absolute;
  left: 18%; top: 12%;
  width: 26%; height: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.75), rgba(255,255,255,0));
  pointer-events: none;
}
.bubble .label {
  font-size: 13px;
  font-weight: 700;
  color: #0e1118;
  line-height: 1.15;
  padding: 8%;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  pointer-events: none;
}
/* hover: shows what a click would select (selected style below wins over it) */
.bubble.hovered {
  filter: brightness(1.18);
  box-shadow:
    inset -10px -14px 28px rgba(0, 0, 0, 0.38),
    0 0 0 2.5px rgba(255, 255, 255, 0.65),
    0 6px 18px rgba(0, 0, 0, 0.45);
}
.bubble.selected {
  box-shadow:
    inset -10px -14px 28px rgba(0, 0, 0, 0.38),
    0 0 0 3px var(--main),
    0 0 26px var(--main),
    0 6px 18px rgba(0, 0, 0, 0.45);
}

/* container spheres: translucent glass */
.bubble.container {
  background:
    radial-gradient(circle at 32% 27%,
      color-mix(in srgb, var(--lite) 26%, transparent) 0%,
      color-mix(in srgb, var(--main) 13%, transparent) 45%,
      color-mix(in srgb, var(--dark) 34%, transparent) 100%);
  border: 1.5px solid color-mix(in srgb, var(--main) 55%, transparent);
  box-shadow:
    inset -14px -20px 44px rgba(0, 0, 0, 0.25),
    inset 6px 10px 30px rgba(255, 255, 255, 0.06);
  align-items: flex-start;
}
.bubble.container::before { opacity: 0.35; }
.bubble.container .label {
  color: var(--main);
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  margin-top: 6%;
  font-size: 14px;
}
.bubble.container.hovered {
  border-color: var(--main);
  filter: brightness(1.3);
  box-shadow:
    inset -14px -20px 44px rgba(0, 0, 0, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.4);
}
.bubble.container.selected {
  box-shadow:
    inset -14px -20px 44px rgba(0, 0, 0, 0.25),
    0 0 0 3px var(--main),
    0 0 26px var(--main);
}
.bubble.connect-source {
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}

/* ---------------- profile view ---------------- */
#profileBar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #141926ee;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
#profileWho { flex: 1; min-width: 0; }
#profileName { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profileMapHost { top: 58px; }
#profileToolbar { justify-content: flex-end; }

.locked {
  position: absolute;
  inset: 58px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.locked-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px;
  text-align: center;
  max-width: 300px;
}
.lock-ico { font-size: 34px; margin-bottom: 10px; }

/* ---------------- pick menu (overlapping elements) ---------------- */
#pickMenu {
  position: fixed;
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
  min-width: 210px;
  max-width: min(300px, 92vw);
  max-height: 42dvh;
  overflow-y: auto;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  animation: sheet-up 0.14s ease-out;
}
.pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
  padding: 11px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.pick-item:hover, .pick-item:focus-visible { background: var(--line); outline: none; }
.pick-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.6), var(--pc) 60%);
}
.pick-dot.line-dot { height: 4px; width: 18px; border-radius: 2px; background: var(--pc); }
.pick-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-tag { flex: none; color: var(--dim); font-size: 11px; }

/* ---------------- bottom sheets ---------------- */
#sheetShade {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 520px;
  margin: 0 auto;
  max-height: 86dvh;
  overflow-y: auto;
  animation: sheet-up 0.18s ease-out;
}
@keyframes sheet-up {
  from { transform: translateY(30%); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}
.sheet-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.sheet input[type=text], .sheet input:not([type=range]) {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  padding: 12px;
  outline: none;
}
.sheet input:focus { border-color: var(--accent); }
.sheet-row { display: flex; gap: 8px; margin-top: 14px; }
.sheet-row .tb { flex: 1; }
.weight-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.weight-row input[type=range] { flex: 1; accent-color: var(--accent); height: 32px; }
.weight-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  min-width: 34px;
  text-align: center;
}
#edgeEnds { margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .field-title { display: block; font-size: 13px; color: var(--dim); margin: 14px 0 6px; }
.sheet label.check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin-bottom: 10px; cursor: pointer; }
.sheet label.check input { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); }
.editor-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.editor-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--line);
  border-radius: 999px;
  padding: 5px 5px 5px 12px;
  font-size: 12.5px;
}
.editor-chip button {
  border: none;
  background: #10141D66;
  color: var(--danger);
  border-radius: 50%;
  width: 22px; height: 22px;
  font-size: 11px;
  line-height: 1;
}
.editor-add { display: flex; gap: 8px; margin-top: 8px; }
.editor-add select {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  padding: 10px;
  font-family: inherit;
  outline: none;
}
.editor-add select:focus { border-color: var(--accent); }
.group-options { display: flex; flex-direction: column; gap: 8px; max-height: 40dvh; overflow-y: auto; }
.group-options .tb { text-align: left; }

/* ---------------- small screens ---------------- */
@media (max-width: 560px) {
  #logo { font-size: 13px; }
  #logo em { display: none; }
  #mainNav a { font-size: 12px; padding: 8px 7px; }
  .tb { padding: 10px 11px; font-size: 12.5px; }
}
