/*
 * Web (desktop) shell — spec: docs/web-design/README.md §1, §12.
 * Loaded after the mobile tokens/components; composes them, never redefines colors.
 * Mobile pages reused on desktop rely on --m-topbar-height / --m-bottom-nav-height: on the web there is
 * a 60px top bar and no bottom nav.
 */
:root {
  --w-topbar-height: 60px;
  --w-feed-width: 440px;
  --m-topbar-height: var(--w-topbar-height);
  --m-bottom-nav-height: 0px;
}

.web-app { min-height: 100vh; }
.web-app .w-main { padding-bottom: 0; min-height: calc(100vh - var(--w-topbar-height)); }

/* top bar */
.w-topbar {
  position: sticky;
  top: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--w-topbar-height);
  padding: 0 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.w-brand { color: var(--ink); font: 800 20px/1 var(--font-ui); letter-spacing: -0.02em; }
.w-tabs { display: flex; align-self: stretch; gap: 28px; margin-left: var(--space-3); }
.w-tab {
  display: flex;
  align-items: center;
  color: var(--ink-2);
  font: 650 14px/1 var(--font-ui);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.w-tab:hover { color: var(--ink); }
.w-tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.w-topbar-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.w-topbar-actions .m-btn { min-height: 40px; padding: 0 var(--space-4); font-size: 14px; }
.w-topbar-actions .m-btn svg { width: 18px; height: 18px; }

/* account menu (avatar → Profile · Settings · Log out) */
.w-account { position: relative; }
.w-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--on-accent);
  font: 700 15px/1 var(--font-ui);
  background: var(--accent);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.w-avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.w-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-float);
}
.w-menu[hidden] { display: none; }
.w-menu form { margin: 0; }
.w-menu a,
.w-menu button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--space-3);
  color: var(--ink);
  font: 500 14px/1 var(--font-ui);
  text-align: start;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.w-menu a:hover,
.w-menu button:hover,
.w-menu a:focus-visible,
.w-menu button:focus-visible { background: var(--surface-2); outline: none; }
.w-menu svg { width: 18px; height: 18px; color: var(--ink-2); }
.w-menu form { border-top: 1px solid var(--line); margin-top: var(--space-1); padding-top: var(--space-1); }

/* messages float under the top bar on the right */
.web-app .m-messages { top: calc(var(--w-topbar-height) + 12px); left: auto; right: 24px; width: 360px; }

/* guest gate: a centered dialog instead of a bottom sheet */
.web-app .gate-sheet.w-dialog {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: 400px;
  max-width: calc(100vw - 48px);
  padding: var(--space-8) var(--space-6) var(--space-6);
  border-radius: 18px;
  opacity: 0;
  transform: translate(-50%, -46%);
  transition: opacity 180ms ease, transform 180ms ease;
}
.web-app .gate-sheet.w-dialog.is-visible { opacity: 1; transform: translate(-50%, -50%); }

/* desktop pointer affordances */
.web-app a, .web-app button { cursor: pointer; }
.web-app .m-chip:hover:not(.is-active) { color: var(--ink); }

/* round photo arrows (timeline cards, trip cover): shown on hover by the page CSS */
.wt-arrow {
  position: absolute;
  z-index: 3;
  top: 36%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 140ms ease;
}
.wt-arrow.is-prev { left: 10px; }
.wt-arrow.is-next { right: 10px; }
.wt-arrow svg { width: 20px; height: 20px; }
.wt-arrow[disabled] { visibility: hidden; }
