/* St. John Almanac: the island model's own parts, the flat map and the "pick your spot"
   control that the tools share. Every colour is one of the site's tokens. */

.ti-picker { display: grid; gap: 0.75rem; min-width: 0; }
.ti-mapwrap { position: relative; min-width: 0; }
.ti-maphold { border: 1px solid var(--water-edge); border-radius: 6px; overflow: hidden; background: var(--water); }
.ti-maphold:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ti-map canvas { display: block; width: 100%; cursor: crosshair; touch-action: pan-y; }
.ti-map.ti-zoomed canvas { touch-action: none; }

.ti-zoom { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
@media (min-width: 36rem) { .ti-zoom { position: absolute; top: 8px; right: 8px; display: grid; gap: 4px; margin-top: 0; } }
.ti-zoom button {
  width: 2.75rem; height: 2.75rem; padding: 0;
  font: inherit; font-size: 1.25rem; font-weight: 700; line-height: 1;
  color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer;
}
.ti-zoom button:hover { border-color: var(--ink); }

.ti-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem 1rem; align-items: end; }
@media (min-width: 36rem) { .ti-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ti-buttons { grid-column: 1 / -1; } }
.ti-field { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.ti-coords { flex-direction: row; align-items: end; gap: 0.4rem; }
.ti-coords label { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.ti-select, .ti-input {
  font: inherit; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 8px; padding: 0.55rem 0.65rem; min-height: 2.75rem; width: 100%; min-width: 0;
}
.ti-select:focus-visible, .ti-input:focus-visible, .ti-zoom button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.ti-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ti-buttons .button, .ti-coords .button { padding: 0.55rem 0.9rem; min-height: 2.75rem; }
.ti-status { margin: 0; min-height: 1.4em; font-size: var(--step--1); color: var(--ink-soft); }

/* ----- the island in three dimensions (view3d.js) -----
   One finger moving up or down the picture scrolls the page; everything else steers the model. */
.ti-view { position: relative; }
.ti-view canvas { display: block; width: 100%; touch-action: pan-y; cursor: grab; }
.ti-view canvas:active { cursor: grabbing; }
.ti-view[data-look="above"] canvas { cursor: move; }
.ti-view-tools { position: absolute; left: 8px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ti-view-tools button { font: 600 0.8125rem/1 var(--text); min-height: 2.25rem; padding: 0.5rem 0.75rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink); cursor: pointer; }
.ti-view-tools button[aria-pressed="true"] { background: var(--press); border-color: var(--press); color: var(--on-press); }
.ti-view-tools button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ti-view-tools button[hidden] { display: none; }


.ti-keep[hidden] { display: none; }
