/* Top bar */
.topbar{
  position: sticky; top: 0; z-index: 80;
  display:flex; align-items:center; justify-content:flex-start; gap:.5rem;
  padding:.5rem .75rem;
  background:var(--panel);
  border-bottom:1px solid var(--border);
}
.brand{ font-weight:700; }

/* --- Topbar layout: left (menu+home), centered brand, right language --- */

/* Brand perfectly centered regardless of left/right content */
.topbar .brand{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Make the last item in the topbar (language control) stick to the right edge */
.topbar > :last-child{
  margin-left: auto;
}

/* Keep Home exactly 5px to the right of Menu, compensating for the .5rem gap on .topbar */
#menuBtn + #homeBtn { margin-left: calc(5px - .5rem); }

/* --- Button sizing: same height for all; same width for Menu & Home --- */

/* Same height for all controls in the topbar (buttons/selects) */
.topbar button,
.topbar select{
  height: 36px;
}

/* Menu & Home: identical hit-box width and centering */
#menuBtn,
#homeBtn{
  width: 36px;           /* equal width */
  padding: 0;            /* no extra padding */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Normalize the glyph sizes so they look identical */
#menuBtn{ font-size: 20px; }       /* the ☰ character */
#homeBtn svg{
  width: 20px;
  height: 20px;
  display: block;                  /* removes inline-gap around SVG */
}


/* Drawer (left) + backdrop */
.side-drawer{
  position: fixed; top:0; left:0; height:100vh;
  width:min(84vw, 360px);
  background: var(--bg);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 100;
  box-shadow: 2px 0 24px rgba(0,0,0,.35);
  padding: 1rem; overflow:auto;
}
.side-drawer.open{ transform: translateX(0); }
.drawer-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.drawer-content h4{ margin:.75rem 0 .25rem; }
.fav-list{ display:grid; gap:.4rem; }
.fav-item{ background:#171717; border:1px solid #2a2a2a; border-radius:.5rem; padding:.5rem; cursor: pointer; }

.backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 90;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.backdrop.show{ opacity: 1; pointer-events: auto; }
.backdrop.hidden{ display: none; }

/* Views layering */
#viewWalk, #viewSight, #viewUserinit, #viewHighlightInfo{ position: relative; z-index: 30; background: var(--bg); }


.legal-links{
  width: min(100%, var(--page-max));
  margin: 0.25rem auto 1rem;
  padding-inline: var(--page-pad);
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted, #999);
}

.legal-link{
  color: inherit;
  text-decoration: none;
}

.legal-link:focus-visible{
  outline: 2px solid rgba(128,238,192,.4);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (hover:hover){
  .legal-link:hover{
    text-decoration: underline;
  }
}

.legal-sep{
  margin: 0 0.3rem;
  opacity: 0.6;
}
