/* The map as a home base on a computer (public/map-home.js): the site's header, a rail of tools on the left, the
   map with its search, layer switches and plans along the top, and a panel on the right. Below 1024 px none of this
   shows and the map is laid out as it always was. */
.hb-site { display: none; }

@media (min-width: 1024px) {
  /* ---- the website's own header, as on every other page (home.css .top, .topbar) ---- */
  body.mp .hb-site { display: block; flex: none; position: relative; z-index: 1300; background: var(--bg); border-bottom: 1px solid var(--line); }
  .hb-site .topbar { display: flex; align-items: center; gap: 22px; max-width: 1120px; margin: 0 auto; padding: 10px 20px; min-height: 60px; }
  .hb-site nav { display: flex; gap: 20px; margin-left: auto; }
  .hb-site nav a { font: 600 13px var(--mono, ui-monospace, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
  .hb-site nav a:hover, .hb-site nav a[aria-current="page"] { color: var(--accent); }
  .hb-site .signin { flex: none; font: 600 13px var(--mono, ui-monospace, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
  .hb-site .signin:hover, .hb-site .signin:focus-visible { color: var(--accent); border-color: var(--accent); }
  .hb-site .btn.small { white-space: nowrap; }

  body.hb-desk { --hb-rail: 84px; --hb-w: 340px; }
  body.hb-desk.hb-wideopen { --hb-w: 480px; }
  body.hb-desk .mp-bar { display: none !important; }
  body.hb-desk .mp-main { margin-left: var(--hb-rail); }
  body.hb-desk.hb-open .mp-main { margin-right: var(--hb-w); }

  /* ---- the rail ---- */
  .hb-rail { position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--hb-rail)); width: var(--hb-rail); z-index: 1250; display: flex; flex-direction: column; gap: 2px; padding: 8px 0; overflow-y: auto; scrollbar-width: none; background: #101512; border-right: 1px solid #2a342d; }
  .hb-rail::-webkit-scrollbar { display: none; }
  .hb-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; min-height: 54px; margin: 0; padding: 6px 4px; border: 0; border-left: 3px solid transparent; background: transparent; color: #dfe4dc; font: 600 11px/1.15 system-ui, sans-serif; text-align: center; cursor: pointer; }
  .hb-item:hover, .hb-item:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; outline: none; }
  .hb-item.on { color: #ff7a33; border-left-color: #ff7a33; background: rgba(255, 122, 51, .1); }
  .hb-item[hidden] { display: none; }
  .hb-foot { margin-top: auto; border-top: 1px solid #2a342d; }
  .hb-ico { display: block; line-height: 0; }

  /* ---- along the top of the map: search, layer switches, base map, plans ---- */
  .hb-top { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 1100; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; pointer-events: none; }
  .hb-top > * { pointer-events: auto; }
  .hb-find { flex: 0 1 300px; min-width: 220px; }
  body.hb-desk .hb-find .mp-find { display: flex; max-width: none; background: rgba(16, 21, 18, .96); border: 1px solid #2a342d; border-radius: 20px; padding: 3px; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
  body.hb-desk .hb-find .mp-find input { border: 0; background: transparent; color: #f4f1ea; padding: 0 12px; min-height: 32px; font-size: 14px; }
  body.hb-desk .hb-find .mp-find button { min-height: 32px; border-radius: 16px; padding: 0 12px; }
  .hb-layers, .hb-bases { display: flex; flex-wrap: wrap; gap: 6px; }
  .hb-tog, .hb-base, .hb-chip { min-height: 34px; margin: 0; padding: 0 12px; border: 1px solid #2a342d; border-radius: 17px; background: rgba(16, 21, 18, .94); color: #eef1ea; font: 600 13px system-ui, sans-serif; white-space: nowrap; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
  .hb-tog:hover, .hb-base:hover, .hb-chip:hover { border-color: #ff7a33; }
  .hb-tog[aria-pressed="true"], .hb-base[aria-pressed="true"] { background: #ff7a33; border-color: #ff7a33; color: #1a0d05; }
  .hb-tog[hidden], .hb-chip[hidden] { display: none; }
  .hb-tog.hb-more { color: #c9d1c6; }
  .hb-bases { gap: 0; }
  .hb-bases .hb-base { border-radius: 0; box-shadow: none; }
  .hb-bases .hb-base:first-child { border-radius: 17px 0 0 17px; }
  .hb-bases .hb-base:last-child { border-radius: 0 17px 17px 0; }
  .hb-bases { border-radius: 17px; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
  .hb-chip { border-color: #ff7a33; color: #ffb38a; }

  /* the phone layout's chip row, its arrow and its tools menu give way to the switches above */
  body.hb-desk .hud-chips, body.hb-desk .hud-more, body.hb-desk .hud-toolmenu { display: none !important; }
  body.hb-desk .hud-floats { top: calc(var(--hb-top, 42px) + 18px); }
  body.hb-desk .mp-where { top: calc(var(--hb-top, 42px) + 18px); }

  /* ---- Plan a hunt here ---- */
  .hb-plan { position: absolute; left: 12px; bottom: 22px; z-index: 1060; min-height: 50px; margin: 0; padding: 0 22px; border: 0; border-radius: 25px; background: #ff6a13; color: #14110d; font: 700 1rem system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .55); }
  .hb-plan:hover, .hb-plan:focus-visible { background: #ff8a3d; outline: none; }
  body.hb-desk .mh-open { bottom: 84px; }
  /* the map's notes sit beside the button, not under it; the zoom buttons below the switches */
  body.hb-desk.mp-hud .mp-status:not(.x) { left: 196px; bottom: 28px; max-width: min(520px, calc(100% - 280px)); }
  body.hb-desk .leaflet-top.leaflet-left { top: calc(var(--hb-top, 42px) + 10px); }

  /* ---- the panel on the right ---- */
  body.hb-desk #mp-panel { position: absolute; top: 0; bottom: 0; left: auto; right: calc(-1 * var(--hb-w)); width: var(--hb-w); max-height: none; margin: 0; padding: 14px 16px 18px; border: 0; border-left: 1px solid #2a342d; border-radius: 0; box-shadow: none; overflow-y: auto; z-index: 1250; background: #171e1a; color: #f4f1ea; }
  body.hb-desk #mp-panel h2 { margin-right: 80px; }
  .hb-own .fine { color: #a9b3a6; }
  .hb-list { list-style: none; margin: 4px 0 10px; padding: 0; }
  .hb-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #2a342d; }
  .hb-row b { display: block; font-size: .95rem; }
  .hb-row small { display: block; color: #a9b3a6; font-size: .8rem; }
  .hb-words { flex: 1; min-width: 0; }
  .hb-acts { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: none; }
  #mp-panel .hb-acts button { min-height: 32px; margin: 0; padding: 0 10px; font-size: .82rem; }
  .hb-link { font-size: .82rem; text-align: center; color: #ffb38a; }
  .hb-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
  .hb-dot.ready { background: #35d07f; }
  .hb-dot.building { background: #ffd23f; animation: hb-pulse 1.6s ease-in-out infinite; }
  @keyframes hb-pulse { 50% { opacity: .35; } }
  @media (prefers-reduced-motion: reduce) { .hb-dot.building { animation: none; } }
  .hb-have { margin: 4px 0; padding-left: 18px; font-size: .88rem; }
  .hb-have li { margin: 4px 0; }
  .hb-count { font-weight: 700; color: #ffb38a; }
  .hb-here { font-weight: 600; }
  .hb-uses { margin: 10px 0; padding: 10px 12px; border-left: 3px solid #35d07f; background: rgba(53, 208, 127, .08); font-weight: 700; }
  .hb-in { display: block; width: 100%; min-height: 40px; margin: 4px 0 8px; }
  .hb-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
  .hb-table th, .hb-table td { padding: 6px 4px; border-top: 1px solid #2a342d; text-align: left; }
  .hb-table td { font-weight: 700; }
  .hb-frame { display: block; width: 100%; height: calc(100vh - 290px); min-height: 380px; margin: 8px 0; border: 1px solid #2a342d; border-radius: 10px; background: var(--bg); }
  #mp-panel .btn.small { display: inline-block; text-decoration: none; }
  /* the home page's hunt form and the offer cards, in one column */
  #mp-panel .hb-form .row { display: block; }
  #mp-panel .hb-form label { color: inherit; }
  #mp-panel .hb-form input, #mp-panel .hb-form select, #mp-panel .hb-form textarea { width: 100%; max-width: 100%; }
  #mp-panel .ho-cards { grid-template-columns: 1fr !important; }
  #mp-panel .ho-card { background: #1d2520; }
  #mp-panel .ho-card h3 { font-size: 18px; }
  /* ---- each control once on a computer (owner, 20 November 2026): the tools are on the rail, search and layers on top ---- */
  body.hb-desk .mp-tools { display: none !important; }
  body.hb-desk .hud-floats { display: none !important; }
  body.hb-desk .mp3-on .hud-floats { display: flex !important; }
  .hb-item.lit { color: #ff7a33; }
  .hb-locate { display: flex !important; align-items: center; justify-content: center; }
  /* ---- the land key and the height under the pointer, bottom right ---- */
  .hb-legend { position: absolute; right: 12px; bottom: 58px; z-index: 1060; width: 270px; padding: 10px 12px; border: 1px solid #2a342d; border-radius: 12px; background: rgba(16, 21, 18, .95); color: #eef1ea; font: 500 12px/1.35 system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
  .hb-legend[hidden], .hb-elev[hidden] { display: none; }
  .hb-legend b { display: block; margin-bottom: 6px; font-size: 13px; }
  .hb-key { display: flex; align-items: flex-start; gap: 6px; margin: 5px 0; }
  .hb-key i { flex: none; width: 14px; height: 14px; margin-top: 1px; border-radius: 3px; }
  .hb-key i + i { margin-left: -4px; }
  .hb-key i.hb-clear { background: transparent; border: 1px dashed #c9d1c6; }
  .hb-legend small { display: block; margin-top: 6px; color: #a9b3a6; font-size: 11px; }
  .hb-elev { position: absolute; right: 12px; bottom: 24px; z-index: 1060; padding: 4px 10px; border-radius: 12px; background: rgba(16, 21, 18, .9); color: #eef1ea; font: 600 12px system-ui, sans-serif; pointer-events: none; }
}
