/* The field guides' look (Trees, Plants), after the shell every tool shares (../shell/shell.css: the brand, the name
   card, the score, the list down the left, the settings and their "i", the windows, the result, the phone layout, and
   the wide middle column every trainer has). Only their subject goes here: a photo with its credit over its corner,
   the viewer (one large photo, the parts' tabs, the thumbnails), four photos to pick from, the cards that say what
   something is, a thing's other parts in a strip, every lesson's chips, a lesson's cards, and the buttons under the
   board (the same sizes as Animal Tracks' and Night Sky's answers). Colours and fonts are the shell's variables. */

.board {
  container-type: inline-size;
  flex: 1; min-height: 0; overflow: auto; box-sizing: border-box; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px;
  padding: 10px;
  background: #0b1219; border: 1px solid var(--line-strong); border-radius: 18px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.board .note { color: var(--muted); text-align: center; max-width: 56ch; line-height: 1.55; margin: 0; font-size: 13.5px; }

/* ---------- a photo: the picture, its credit, and sometimes a tag (a part's or a tree's name) ---------- */
.shot { position: relative; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #070b12; display: block; font: inherit; color: inherit; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot .by, .shot .tag {
  position: absolute; max-width: calc(100% - 12px); box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10.5px; line-height: 1.3; padding: 2px 7px; border-radius: 6px; background: rgba(7, 11, 18, 0.74); color: var(--muted); text-decoration: none;
}
.shot .by { inset-inline-end: 6px; bottom: 6px; font-family: var(--f-mono); }
.shot a.by:hover { color: var(--fg); }
.shot .tag { inset-inline-start: 6px; top: 6px; color: var(--bone); font-weight: 600; font-size: 11.5px; }
.shot.is-gone img { visibility: hidden; }
.shot.main { width: 100%; height: clamp(260px, calc(52vh / var(--room, 1)), 620px); }
.shot.main img { object-fit: contain; }
.board.has-fb .shot.main { height: clamp(220px, calc(36vh / var(--room, 1)), 420px); }
button.shot { cursor: pointer; }
button.shot:hover:not(:disabled) { border-color: var(--scan); }
.shot.mini { width: 78px; height: 78px; flex: none; border-radius: 9px; }
.shot.mini .tag { font-size: 9.5px; top: auto; bottom: 4px; inset-inline-start: 4px; padding: 1px 5px; }
.shot.mini .by { display: none; }
.shot.mini[aria-pressed="true"] { border-color: var(--bone); box-shadow: 0 0 0 1px var(--bone); }

/* ---------- the viewer: one large photo, the parts' tabs, the thumbnails ---------- */
.viewer { display: grid; gap: 8px; width: 100%; justify-items: center; }
.viewer .tabs { width: min(100%, 520px); }
.thumbs, .strip { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: thin; }
.strip { margin-top: 2px; }

/* ---------- four photos to pick from ---------- */
.grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.grid4 .shot { height: clamp(150px, calc(27vh / var(--room, 1)), 310px); }
.grid4 .shot .by { display: none; }
.board.has-fb .grid4 .shot { height: clamp(110px, calc(17vh / var(--room, 1)), 200px); }
.shot.is-right { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.shot.is-wrong { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad); }
.shot.is-rest { opacity: .55; }

/* ---------- the cards that say what something is ---------- */
.feedback { display: grid; gap: 10px; width: 100%; }
@container (min-width: 600px) { .feedback.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cue { background: var(--bg-lift); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; display: grid; gap: 7px; width: 100%; box-sizing: border-box; align-content: start; text-align: start; min-width: 0; }
.cue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cue-head b { font-size: 16px; color: var(--bone); }
.cue-head .sci { font-size: 12.5px; color: var(--muted); font-style: italic; }
.cue p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--fg); text-wrap: pretty; }
.cue p em { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--scan); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; }
.facts dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; color: var(--fg); }
/* a word on a card (Plants: Dangerous, Harmless look-alike) and a line of warning */
.mark-tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.mark-tag.is-danger { color: var(--bad); border-color: var(--bad); }
.mark-tag.is-alike { color: var(--ok); border-color: var(--ok); }
.caution { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); border-inline-start: 2px solid var(--bad); padding-inline-start: 9px; text-align: start; width: 100%; box-sizing: border-box; }

/* ---------- every lesson's chips (Explore), and the misses after a test ---------- */
.chart { display: grid; gap: 14px; min-width: 0; width: 100%; padding-top: 2px; }
.lgroup { display: grid; gap: 7px; }
.lgroup.is-later { opacity: .55; }
.ghead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--scan); }
.ghead em { font-style: normal; color: var(--muted); letter-spacing: 0; }
.ghead em.done { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; color: var(--fg); cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
.chip b { font-size: 13px; font-weight: 600; }
.chip:hover { border-color: var(--scan); }
.chip.is-on { border-color: var(--bone); box-shadow: 0 0 0 1px var(--bone); background: var(--bg-lift); }
.chip.is-known b::after { content: " ✓"; color: var(--ok); }
.summary { display: grid; gap: 10px; justify-items: center; width: min(100%, 640px); }
.summary .chips { justify-content: center; }

/* ---------- a lesson's cards: each new thing, a photo over its card ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; width: 100%; }
.icard { display: grid; gap: 6px; align-content: start; min-width: 0; }
.icard .shot { height: 150px; }
.icard .cue { padding: 10px 12px; }
.icard .cue p { font-size: 13.5px; }

/* ---------- the buttons under the board: the answers (two by two) or a row of actions ---------- */
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; }
.actions:empty { display: none; }
.actions.row { display: flex; flex-wrap: wrap; justify-content: center; }
.act {
  font: inherit; font-weight: 700; font-stretch: 102%; font-size: 15px; color: var(--fg); cursor: pointer; text-align: start;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 14px; min-height: 46px;
  display: flex; align-items: center; gap: 10px; position: relative; line-height: 1.2;
}
.act kbd { font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; flex: none; }
.act .txt { flex: 1; min-width: 0; }
.actions.row > .act { justify-content: center; text-align: center; flex: 0 1 auto; min-width: 120px; }
.act:hover:not(:disabled) { border-color: var(--scan); }
.act:disabled { opacity: .32; cursor: default; }
.act.primary { background: var(--bone); color: #1b1610; border-color: var(--bone); }
.act.primary kbd { color: #5d5345; border-color: #a99c84; }
.act.is-right { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); opacity: 1; }
.act.is-wrong { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); opacity: 1; }
.actions:not(.row) > .act.primary { grid-column: 1 / -1; justify-self: center; justify-content: center; width: min(100%, 360px); }

@media (max-width: 900px) {
  .board { border-radius: 14px; gap: 10px; padding: 8px; }
  .shot.main { height: clamp(230px, 44vh, 430px); }
  .board.has-fb .shot.main { height: clamp(170px, 27vh, 280px); }
  .grid4 .shot { height: clamp(120px, 21vh, 200px); }
  .act { padding: 9px 10px; font-size: 13.5px; min-height: 42px; }
  .act kbd { display: none; }
  .actions.row > .act { min-width: 0; flex: 1 1 0; }
  .cue { padding: 11px 13px; }
  .cue p { font-size: 13.5px; }
  .shot.mini { width: 64px; height: 64px; }
}
/* clean view: the photo takes the room the cards leave */
body.clean .chart { display: none; }
