/* colours for the bar and menus; [data-theme] is set by theme.js */
:root { --nav-bg: rgba(243,239,230,.88); --nav-ink: #1f241f; --nav-line: #d9d2c2; --nav-hover: rgba(255,255,255,.6); --nav-accent: #1c3fd6;
        --menu-bg: #fff; --menu-soft: #5f6a5f; color-scheme: light; }
:root[data-theme="dark"] { --nav-bg: rgba(20,23,20,.86); --nav-ink: #ece7dc; --nav-line: #373c35; --nav-hover: rgba(255,255,255,.06); --nav-accent: #8aa0ff;
        --menu-bg: #1f2420; --menu-soft: #a7ad9f; color-scheme: dark; }
/* The top bar, the same on every page: logo on the left; on the right that page's buttons, then the
   account button (Google photo when signed in, a person icon when not) with its menu. */
header.nav { position: sticky; top: 0; z-index: 10; height: 59px; box-sizing: border-box; background: var(--nav-bg);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--nav-line); }
header.nav .navin { max-width: 1100px; height: 58px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header.nav .brand { font-family: "Barlow Condensed", "Arial Narrow", Impact, sans-serif; font-weight: 800; font-size: 22px; text-transform: uppercase;
  letter-spacing: .06em; text-decoration: none; color: var(--nav-ink); display: flex; align-items: center; gap: 10px; }
header.nav .brand i { width: 24px; height: 24px; border-radius: 4px; background: linear-gradient(160deg, #2f7a2a 0 55%, #6b4727 55%); position: relative; }
header.nav .brand i::after { content: ""; position: absolute; left: 10px; top: 4px; width: 3px; height: 16px; background: #1c3fd6; border-radius: 2px; transform: rotate(16deg); }
header.nav .navr { display: flex; align-items: center; gap: 10px; }
.navbtn { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; color: #fff; background: #1c3fd6; border: 2px solid #1c3fd6; padding: 6px 14px; border-radius: 8px; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.navbtn:hover { background: #1431a6; border-color: #1431a6; }
.navbtn.quiet { background: transparent; color: var(--nav-ink); border-color: var(--nav-line); }
.navbtn.quiet:hover { background: var(--nav-hover); }
.navbtn[hidden] { display: none; }

.acct { position: relative; display: flex; }
.acct .avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--nav-line); background: var(--menu-bg); color: var(--menu-soft); padding: 0; cursor: pointer;
  display: grid; place-items: center; overflow: hidden; }
.acct .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct .avatar b { font: 700 16px/1 "Barlow Condensed", sans-serif; color: var(--nav-ink); }
.acct .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--menu-bg); border: 1px solid var(--nav-line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 10px; display: grid; gap: 4px; z-index: 20; font: 15px/1.35 "Source Sans 3", "Segoe UI", sans-serif; }
.acct .menu[hidden] { display: none; }
.acct .menu .who { padding: 6px 8px 10px; border-bottom: 1px solid var(--nav-line); margin-bottom: 4px; }
.acct .menu .who b { display: block; color: var(--nav-ink); }
.acct .menu .who span { color: var(--menu-soft); font-size: 13px; word-break: break-all; }
.acct .menu button { text-align: left; background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--nav-ink); cursor: pointer; font: inherit; }
.acct .menu button:hover { background: var(--nav-hover); }
.acct .menu .note { color: var(--menu-soft); font-size: 13px; padding: 2px 8px 6px; }
@media (max-width: 480px) { header.nav .brand { font-size: 19px; } .navbtn { padding: 6px 10px; font-size: 14px; } .navbtn.wide { display: none; } }

/* breadcrumb in the bar: Trek Tiles › page › mode */
header.nav .crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; }
header.nav .crumbs .sep { color: #9a917f; font-weight: 700; font-size: 22px; line-height: 1; margin: 0 2px; }
header.nav .crumbs .crumb { font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; color: var(--nav-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
header.nav .crumbs .mode-add, header.nav .crumbs .mode-arrange { display: none; }
body.editing header.nav .crumbs .mode-add, body.arranging header.nav .crumbs .mode-arrange { display: inline-flex; align-items: center; gap: 10px; }
body.editing header.nav .crumbs .crumb:first-of-type, body.arranging header.nav .crumbs .crumb:first-of-type { color: var(--nav-ink); }
@media (max-width: 640px) { header.nav .crumbs .brand span { display: none; } header.nav .crumbs .crumb { font-size: 17px; } }

/* Google's sign-in button style: white, thin grey border, the four-colour G, "Sign in with Google" */
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 44px; padding: 0 18px 0 14px; box-sizing: border-box;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 22px; cursor: pointer;
  font: 500 15px/1 Roboto, "Google Sans", Arial, sans-serif; letter-spacing: .2px; transition: background .15s, box-shadow .15s; }
.gbtn:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); }
.gbtn:active { background: #f1f3f4; }
.gbtn:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.gbtn .g-logo { width: 20px; height: 20px; flex: none; }
.signbtn { display: inline-flex; align-items: center; }
@media (max-width: 480px) { .signbtn span { display: none; } }

/* the light / dark switch */
.themebtn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--nav-line); background: transparent; color: var(--nav-ink); padding: 0; cursor: pointer; display: grid; place-items: center; }
.themebtn:hover { background: var(--nav-hover); }
.themebtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.themebtn .moon { fill: currentColor; stroke: none; }
.themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: block; }
:root[data-theme="dark"] .themebtn .moon { display: none; }
/* Google's dark button */
:root[data-theme="dark"] .gbtn { background: #131314; color: #e3e3e3; border-color: #8e918f; }
:root[data-theme="dark"] .gbtn:hover { background: #1f1f20; }

/* new feedback on the shop account's button */
.acct .avatar { position: relative; overflow: visible; }
.acct .avatar img { border-radius: 50%; }
.acct .fb-dot { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; box-sizing: border-box; padding: 0 5px; border-radius: 9px;
  background: #d93a1a; color: #fff; font: 700 11px/18px "Source Sans 3", system-ui, sans-serif; text-align: center; border: 2px solid var(--menu-bg); }
.acct .menu a.fb-link { display: block; text-decoration: none; padding: 8px; border-radius: 8px; color: var(--nav-ink); }
.acct .menu a.fb-link:hover { background: var(--nav-hover); }
