/* Simple exploring (js/explore.js): a dock of four big buttons, list sheets, a tour card and a walk bar. */
html, body { background: #000; }
:root { --ex-paper: #f6f1e4; --ex-ink: #2a2a20; --ex-muted: #6d6757; --ex-accent: #5d6b3a; }

/* the detailed panel folds away until asked for */
body.exReady:not(.exPanelOpen) #panel { display: none; }
#exPanelToggle { position: fixed; top: 12px; left: 12px; z-index: 41; font: 600 14px system-ui, sans-serif; padding: 9px 14px;
  border-radius: 999px; border: 1px solid rgba(0,0,0,.25); background: var(--ex-paper); color: var(--ex-ink); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
body.exPanelOpen #exPanelToggle { display: none; }
#exPanelClose { position: absolute; top: 8px; right: 10px; box-sizing: border-box; width: 27px; height: 27px; min-width: 0; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; font: 18px/1 system-ui, sans-serif;
  border: 1px solid rgba(0,0,0,.2); background: #fff; color: #2a2a20; cursor: pointer; z-index: 2; box-shadow: none; outline: none; }   /* 20% smaller, glyph centred (Ted 2026-11-17) */
#exPanelClose:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#exPanelClose:hover { background: #fff; }
body.exReady #panel { padding-top: 14px; }
body.exReady #panel h1 { padding-right: 40px; }

#exDock { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 42; }
#exTabs { display: flex; gap: 6px; background: rgba(246,241,228,.96); padding: 6px; border-radius: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.45); }
#exTabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; padding: 8px 10px 6px; border: 0;
  border-radius: 11px; background: transparent; color: var(--ex-ink); font: 22px/1 system-ui, sans-serif; cursor: pointer; }
#exTabs button span { font: 600 14px system-ui, sans-serif; }
#exTabs button:hover { background: rgba(0,0,0,.06); }
#exTabs button.on { background: var(--ex-accent); color: #fff; }

#exSheet, #exTour { position: fixed; z-index: 43; background: var(--ex-paper); color: var(--ex-ink); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); font: 15px/1.45 system-ui, sans-serif; }
#exSheet { left: 50%; transform: translateX(-50%); bottom: 112px; width: min(520px, calc(100vw - 20px)); max-height: min(58vh, 560px); overflow-y: auto; padding: 14px 16px; }
#exSheet[hidden], #exTour[hidden], #exWalkBar[hidden] { display: none; }
#exSheet h2, #exTour h2 { margin: 0 0 4px; font: 600 21px Georgia, serif; }
.exMuted { color: var(--ex-muted); font-size: 14px; margin: 2px 0 10px; }
.exClose { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ex-ink); }
#exSheet ul { list-style: none; margin: 0; padding: 0; }
#exSheet li button { width: 100%; text-align: left; display: block; padding: 10px 12px; margin: 0 0 6px; border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px; background: #fff; cursor: pointer; font: 16px system-ui, sans-serif; color: var(--ex-ink); }
#exSheet li button:hover { border-color: var(--ex-accent); background: #fbfaf5; }
#exSheet li button b { display: block; font-weight: 600; }
#exSheet li button span { display: block; color: var(--ex-muted); font-size: 13px; }
.exHow { padding-left: 20px !important; list-style: disc !important; margin: 0 0 12px !important; }
.exHow li { margin: 3px 0; }
.exRow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.exBig, #exTour .exRow button, #exExitWalk { font: 600 16px system-ui, sans-serif; padding: 11px 16px; border-radius: 10px; border: 1px solid rgba(0,0,0,.2);
  background: #fff; color: var(--ex-ink); cursor: pointer; }
.exBig, .exPrimary { background: var(--ex-accent) !important; color: #fff !important; border-color: var(--ex-accent) !important; }
.exLink { border: 0; background: none; color: var(--ex-accent); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

#exTour { left: 50%; transform: translateX(-50%); bottom: 112px; width: min(560px, calc(100vw - 20px)); padding: 14px 18px 16px; }
.exTourHead { display: flex; justify-content: space-between; color: var(--ex-muted); font-size: 13px; margin-bottom: 4px; }
.exTourHead .exClose { position: static; }
#exTourText { margin: 4px 0 0; font-size: 16px; }

#exWalkBar { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 43; display: flex; align-items: center; gap: 12px;
  background: rgba(246,241,228,.96); color: var(--ex-ink); border-radius: 14px; padding: 8px 12px; box-shadow: 0 4px 18px rgba(0,0,0,.45);
  font: 14px system-ui, sans-serif; }
.exPad { display: flex; gap: 4px; }
.exPad button { width: 48px; height: 44px; font-size: 20px; border-radius: 10px; border: 1px solid rgba(0,0,0,.2); background: #fff; cursor: pointer;
  touch-action: none; user-select: none; color: var(--ex-ink); }
.exPad button:active { background: #e8e2d0; }
body.exWalking #view canvas { cursor: crosshair; }

/* keep the comment buttons clear of the options button on small screens */
@media (max-width: 760px) {
  #exDock { bottom: 30px; }
  #exTabs button { min-width: 64px; font-size: 20px; }
  #exSheet, #exTour { bottom: 104px; max-height: 50vh; }
  #exWalkBar { bottom: 104px; flex-wrap: wrap; justify-content: center; width: calc(100vw - 30px); }
  .exWalkTip { width: 100%; text-align: center; }
  #cmBar { bottom: auto !important; top: 12px !important; left: auto !important; right: 12px; transform: none !important; }
}

/* "Today's town" ghost overlay (js/today.js) */
#tdToggle { position: fixed; top: 12px; left: 160px; z-index: 41; font: 600 14px system-ui, sans-serif; padding: 9px 14px; border-radius: 999px;
  border: 1px solid rgba(0,0,0,.25); background: #f6f1e4; color: #2a2a20; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#tdToggle.on { background: #2f7fc4; color: #fff; border-color: #2f7fc4; }
body.exPanelOpen #tdToggle { left: 326px; }   /* beside the open options panel, never over the building card (top right) */
@media (max-width: 760px) { body.exPanelOpen #tdToggle { left: 12px; } }
#tdLabels { position: fixed; inset: 0; pointer-events: none; z-index: 29; }
#tdLabels[hidden] { display: none; }
.tdLabel { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; border: 1px solid #9fd6ff; background: rgba(15,45,80,.82);
  color: #e6f4ff; font: 600 12px system-ui, sans-serif; padding: 3px 7px; border-radius: 6px; white-space: nowrap; text-align: center; }
.tdLabel small { display: block; font-weight: 400; font-size: 10.5px; color: #b9dcf7; }
.tdLabel::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 1px; height: 6px; background: #9fd6ff; }
.tdK-home { border-color: #ffd36b; background: rgba(80,55,10,.85); color: #fff3d6; }
#tdCredit { position: fixed; right: 12px; bottom: 6px; z-index: 6; font: 11px system-ui, sans-serif; color: #b9dcf7; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 4px; }
#tdCredit[hidden] { display: none; }
@media (max-width: 760px) { #tdToggle { top: 56px; left: 12px; } }

/* Map options: the menu icon only (Ted 2026-11-17) */
#exPanelToggle { width: 40px; height: 40px; min-width: 0; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; border-radius: 50%; }
