/* Shared page furniture, loaded after the feature styles. Weather colours,
   warning surfaces and map measurements retain their own semantic meaning. */
:root {
  --display-type: 'Baskerville', 'Iowan Old Style', Georgia, serif;
  --page-width: 74rem;
  --page-gutter: clamp(1rem, 3vw, 2.5rem);
  --surface-radius: .8rem;
}

.field-guide :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.field-guide :is(input, select, textarea) { accent-color: var(--focus); }
.field-guide textarea { font: inherit; color: inherit; }
.no-script { position: relative; z-index: 2000; padding: 1.5rem; border-bottom: 3px solid var(--watch-line); background: var(--panel); }
.no-script h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.field-guide :is(.storypage, .camtab, #tab-settings, #tab-satellite) { min-width: 0; }

/* One title scale across the reader, cameras, settings and account pages. */
.field-guide #stories.story-deck .story-intro .head,
.field-guide .storypage .reading-intro .ptitle,
.field-guide #tab-fire .firesay {
  font-family: var(--display-type);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.field-guide #stories.story-deck .story-intro .head {
  font-size: clamp(1.85rem, 3.7vw, 3rem);
}
.field-guide :is(.camtab .ptitle, #tab-settings > h1, #satellite-view > .satellite-head h1) {
  font: 500 clamp(2.1rem, 4vw, 3rem)/1.08 var(--display-type);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.field-guide :is(.camtab, #tab-settings, #satellite-view) {
  max-width: var(--page-width);
  margin-inline: auto;
  padding: clamp(1rem, 3vw, 2rem) var(--page-gutter) 2rem;
}
.field-guide .camtab .ptitle { margin: 0 0 1.25rem; }
.field-guide #satellite-view .satellite-head { margin-bottom: 1.15rem; }
.field-guide .camtab .ptitle .ico { flex: none; }
.field-guide .camsearch { border-radius: var(--surface-radius); }
.field-guide :is(.camcard, .cammap, .camplayer) { border-radius: var(--surface-radius); }
.field-guide .camcard { overflow-wrap: anywhere; }
.mapkey .kfull { cursor: auto; }
.rain-time-actions button:disabled,
.scrub :is(.play, .speed):disabled {
  cursor: default;
  opacity: .5;
}
.field-guide .camfamily { gap: .4rem; }
.field-guide .camfamily + .camfamily .camfname { margin-top: .35rem; }
.field-guide .camchip { font-size: .9rem; }
.field-guide #tab-settings .settings-content .setcard { border-radius: var(--surface-radius); }
.field-guide .settings-nav { position: sticky; top: calc(var(--topbar) + 1rem); }
.field-guide .setcard h3 { margin-block: 1.2rem .5rem; font-size: 1rem; }
.field-guide .setcard .row { min-height: 52px; }
.field-guide .setcard .row > span { min-width: 0; overflow-wrap: anywhere; }
.field-guide #set-look .choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-guide #set-look .choices .choice { min-width: 0; padding: .5rem .35rem; justify-content: center; font-size: .9rem; }
.field-guide #set-look .choices .choice span { min-width: 0; }
@media (max-width: 360px) {
  .field-guide .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.18fr); }
  .field-guide .tabs button { font-size: clamp(.7rem, 3.6vw, .82rem); }
  .field-guide #set-look .choices .choice { display: grid; justify-items: center; align-content: center; text-align: center; gap: .25rem; }
}

/* Put the whole map sentence above the action on a phone. A fixed-width
   history button must not squeeze a headline into a narrow column. */
@media (max-width: 680px) {
  .field-guide #tab-map .map-view-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .25rem;
  }
  .field-guide #tab-map .mapsay:not(:empty) {
    min-block-size: 0;
    block-size: auto;
    font-size: 1.2rem;
    line-height: 1.2;
    margin: .2rem 0 0;
  }
  .field-guide .map-view-heading button {
    justify-self: start;
    min-height: 44px;
    padding: .3rem 0;
    border: 0;
    border-radius: 0;
    color: var(--focus);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: .85rem;
  }
  .field-guide #tab-map .layers { gap: 0 .4rem; }
  .field-guide #tab-map .layers button { min-height: 44px; font-size: .78rem; }
  .field-guide #tab-map .mapstage { height: clamp(200px, calc(100% - 23rem), 65dvh); }
}
@media (max-width: 680px) and (max-height: 650px) {
  .field-guide #tab-map .mapstage { height: 170px; min-height: 170px; }
}
@media (max-width: 700px) {
  .field-guide .settings-nav { position: static; }
}

/* Code, account, administration and public information use the same masthead,
   paper, type and controls as the signed-in application. */
body.door.field-guide { padding: 0 var(--page-gutter) max(2rem, env(safe-area-inset-bottom)); }
.door.field-guide .door-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  max-width: var(--page-width);
  margin: 0 auto clamp(1.5rem, 5vw, 3rem);
  min-height: calc(80px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
}
.door.field-guide .door-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 48px;
  font: 700 1.85rem/1 var(--display-type);
  letter-spacing: -.05em;
  color: var(--ink);
  text-decoration: none;
}
.door-brand img { width: 32px; height: 32px; border-radius: .5rem; }
.door.field-guide main { width: 100%; max-width: 32rem; }
.door.field-guide main.door-reading { max-width: 52rem; }
.door.field-guide h1 {
  margin-block: 0 1rem;
  font: 500 clamp(2.2rem, 6vw, 3.25rem)/1.06 var(--display-type);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.door.field-guide h2 { margin-block: 1.8rem .65rem; font-size: 1.25rem; }
.door.field-guide .door-lead { font-size: 1.1rem; line-height: 1.55; }
.door.field-guide :is(.door-form, .door-fresh) { padding: clamp(1rem, 3vw, 1.5rem); border-radius: var(--surface-radius); }
.door.field-guide .door-form :is(input, textarea, select) { border-radius: .5rem; }
.door.field-guide .door-form :is(textarea, select) {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .65rem .75rem;
  border: 1px solid var(--ink-2);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.door.field-guide .door-form textarea { resize: vertical; }
.door.field-guide .door-form button { border-radius: .6rem; }
.door.field-guide .door-quiet { white-space: normal; }
.door.field-guide .door-people li { flex-wrap: wrap; }
.door.field-guide .door-people li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.door.field-guide .door-bar { flex-wrap: wrap; }
.door.field-guide .door-footer {
  max-width: var(--page-width);
  margin: 3rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: .9rem;
}
.door-footer nav, .door-sections { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.door-footer a, .door-sections a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
.door-reading { line-height: 1.6; overflow-wrap: anywhere; }
.door-reading :is(p, ul, ol, dl, table) { margin-block: .75rem; }
.door-reading :is(ul, ol) { padding-inline-start: 1.35rem; }
.door-reading ul { list-style: disc; }
.door-reading ol { list-style: decimal; }
.door-reading li + li { margin-block-start: .4rem; }
.door-reading section { scroll-margin-top: 1rem; }
.door-reading table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.door-reading :is(td, th) { padding: .6rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.door-reading .door-sections { margin-block: 1.5rem; padding-block: .5rem; border-block: 1px solid var(--line); }

@media (forced-colors: active) {
  .field-guide :is(button, a, input, select, textarea, summary):focus-visible { outline-color: Highlight; }
}
