:root {
  color-scheme: light;
  --paper: #f7f7f1;
  --surface: #fffef9;
  --ink: #21372c;
  --muted: #56685c;
  --line: #d9ded2;
  --green: #284f3c;
  --rust: #a74923;
  --soft: #ebefe4;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", Georgia, serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans CJK JP", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65
}

button,
input,
select {
  font: inherit;
  color: inherit
}

button,
a,
select {
  touch-action: manipulation
}

button {
  cursor: pointer
}

button {
  background: none;
  border: 0
}

button:disabled {
  cursor: default
}

a {
  color: inherit;
  text-underline-offset: .22em
}

svg {
  flex-shrink: 0
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b65925;
  outline-offset: 3px
}

button:hover:not(:disabled) {
  filter: brightness(.97)
}

.wrap {
  width: min(1190px, calc(100% - clamp(44px, 9.2vw, 144px)));
  margin: auto
}

.sitehead {
  background: var(--surface);
  border-bottom: 1px solid var(--line)
}

.headrow {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  line-height: 1
}

.brand strong {
  display: block;
  font: 750 1.35rem/1.2 var(--serif);
  letter-spacing: .035em
}

.brand small {
  display: block;
  font: bold .67rem/1.5 var(--mono);
  letter-spacing: .21em;
  color: var(--muted);
  margin-top: 2px
}

.headrow nav {
  display: flex;
  gap: 8px;
  padding: 5px;
  align-items: center
}

.navlink {
  padding: 8px 17px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .9rem;
  font-weight: 650;
  white-space: nowrap
}

.navlink.active {
  background: #e8eee3;
  color: var(--green)
}

.navlink:hover {
  background: #eef1e8
}

.streak {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e5ddc9;
  background: #fbf7eb;
  font-size: .83rem;
  border-radius: 22px;
  padding: 5px 13px;
  white-space: nowrap;
  color: #715538
}

.streak svg {
  color: #b15c31;
  fill: #f0d6b3
}

.streak b {
  font: bold .98rem var(--mono);
  color: var(--rust)
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 0 24px
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--rust);
  font: 700 .76rem/1.4 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase
}

.eyebrow:before {
  content: "";
  width: 24px;
  height: 2px;
  background: #b76135
}

.intro h1 {
  font: 760 clamp(2.1rem, 3.2vw, 3rem)/1.36 var(--serif);
  letter-spacing: .035em;
  margin: 5px 0 4px
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem
}

.outline,
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 9px 15px;
  font-size: .91rem;
  font-weight: 650;
  line-height: 1.55
}

.outline {
  background: var(--surface);
  border: 1px solid #cdd5c7
}

.primary {
  background: var(--green);
  color: white;
  border: 1px solid var(--green)
}

.secondary {
  background: var(--soft);
  border: 1px solid var(--line)
}

.plain {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  padding: 5px 0;
  text-decoration: underline;
  text-decoration-color: #b3bbaa;
  text-underline-offset: .25em
}

.quizpair {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  gap: 22px;
  align-items: stretch;
  scroll-margin: 15px
}

.figurecard {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border-radius: 15px;
  background: #263e2c;
  min-height: 420px;
  color: white;
  box-shadow: 0 3px 12px #2332220a
}

.figurecard>.photo {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  z-index: -3
}

.figurecard>.photo.hero {
  object-position: 72% 48%
}

.figurecard:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(0deg, #0c1e15cc, transparent 31%, transparent 76%, #19271938)
}

.figtop {
  padding: 18px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.photo-tag,
.glass {
  background: #20332394;
  color: #fff;
  border: 1px solid #ffffff45;
  backdrop-filter: blur(5px);
  display: inline-flex;
  align-items: center;
  gap: 7px
}

.photo-tag {
  border-radius: 30px;
  font-size: .79rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 4px 11px
}

.glass {
  width: 36px;
  height: 36px;
  justify-content: center;
  border-radius: 9px
}

.figbottom {
  margin-top: auto;
  padding: 23px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px
}

.figbottom small {
  font: 600 .69rem var(--mono);
  letter-spacing: .13em;
  display: block;
  color: #e5e9dd;
  margin-bottom: 4px
}

.figbottom strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .96rem;
  letter-spacing: .05em
}

.photocredit {
  color: #fff;
  font-size: .75rem;
  text-decoration: none;
  text-shadow: 0 1px 4px #162617
}

.photocredit:hover {
  text-decoration: underline
}

.qcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 25px 28px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0
}

.qtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.qno {
  font: 700 .79rem var(--mono);
  letter-spacing: .09em;
  color: var(--rust)
}

.qno b {
  font-size: .99rem
}

.tag {
  font-size: .79rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--soft);
  border-radius: 20px;
  padding: 3px 10px;
  color: var(--green)
}

.progress {
  display: flex;
  gap: 4px;
  margin: 13px 0 17px
}

.progress span {
  height: 4px;
  border-radius: 3px;
  flex: 1;
  background: #e4e8de
}

.progress .now {
  background: #bd7144
}

.progress .done {
  background: #61826a
}

.qcard h2,
.summary h2 {
  font: 750 clamp(1.52rem, 2vw, 1.95rem)/1.5 var(--serif);
  letter-spacing: .02em;
  margin: 0
}

.qsub {
  margin: 2px 0 14px;
  font-size: .86rem;
  color: var(--muted)
}

.answers {
  display: grid;
  gap: 8px
}

.answer {
  background: #fffefa;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 13px;
  font-size: .99rem;
  font-weight: 650;
  border: 1px solid #d1d9ca;
  border-radius: 8px;
  min-height: 46px;
  padding: 7px 13px;
  line-height: 1.42
}

.answer:hover:not(:disabled) {
  background: #eff3e9;
  border-color: #8fa48c
}

.letter {
  background: #f1f3ec;
  font: 600 .84rem var(--mono);
  padding: 5px 0;
  width: 26px;
  text-align: center;
  border-radius: 5px;
  border: 1px solid #dee3d7;
  flex-shrink: 0;
  color: #53674f
}

.answer.right {
  color: #255536;
  background: #e5efdc;
  border-color: #8eaf83
}

.answer.wrong {
  color: #8c3b26;
  background: #f8e9e1;
  border-color: #c98b72
}

.answer>svg {
  margin-left: auto
}

.qactions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 16px
}

.hintbtn {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 3px 0;
  font-size: .89rem;
  font-weight: 650;
  color: var(--green)
}

.hintbtn svg {
  color: #ad6533
}

.difficulty {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: .8rem;
  color: var(--muted)
}

.hintbox {
  border-left: 3px solid #bc8551;
  padding: 7px 11px;
  color: #554933;
  background: #f6efde;
  margin: 9px 0 0;
  font-size: .91rem
}

.feedback {
  margin-top: 13px;
  background: #edf3e6;
  border-radius: 7px;
  padding: 11px 13px;
  font-size: .9rem
}

.feedback.miss {
  background: #fbefe7
}

.feedback b {
  display: block;
  color: var(--green)
}

.feedback.miss b {
  color: var(--rust)
}

.feedback p {
  margin: 2px 0 0
}

.feedback .en {
  font: italic .92rem Georgia, serif;
  color: var(--muted)
}

.nextrow {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.training {
  margin: 30px 0 38px
}

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px
}

.sectionhead h2 {
  font: 750 1.35rem/1.5 var(--serif);
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0
}

.sectionhead h2 svg {
  color: #487250
}

.modegrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px
}

.modecard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 11px;
  padding: 17px 19px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  border: 1px solid #223b2a20;
  color: #183629;
  box-shadow: 0 2px 6px #30432706
}

.modecard:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #f4f6e4bd, transparent 72%)
}

.modecard>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: -2
}

.modecard .enum {
  font: 700 .66rem var(--mono);
  letter-spacing: .12em;
  color: #42543a
}

.modecard strong {
  font: 750 1.22rem/1.7 var(--serif);
  margin: 1px 0 0
}

.modecard .sub {
  font-size: .79rem;
  color: #314532;
  font-weight: 550
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 19px 0 24px;
  flex-wrap: wrap
}

.footbrand {
  font: 650 .79rem var(--serif);
  color: #596d5c;
  letter-spacing: .06em
}

.footbrand i {
  font-style: normal;
  color: #acb7a8;
  margin: 0 .35em
}

.foot .plain {
  font-size: .78rem
}

.filters,
.filterline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 10px;
  margin: 0 0 18px
}

.searchwrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
  border: 1px solid #bbc8b8;
  background: white;
  border-radius: 7px;
  padding: 7px 11px
}

.searchwrap input {
  border: none;
  min-width: 0;
  flex: 1;
  width: 100%;
  background: none;
  outline-offset: 0
}

.filters select,
.formfield select {
  padding: 8px 32px 8px 11px;
  border: 1px solid #bfcbbd;
  border-radius: 7px;
  background: #fffefa;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23435846' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px
}

.matchcount {
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: 11px
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px
}

.specimen {
  text-align: left;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  padding: 0
}

.specimen img {
  width: 100%;
  aspect-ratio: 1.6;
  object-fit: cover
}

.specimen>div {
  padding: 12px 14px 14px
}

.specimen strong {
  font: 750 1.08rem var(--serif);
  display: block
}

.enline {
  font: italic .93rem/1.5 Georgia, serif;
  color: var(--muted);
  margin: 4px 0
}

.specreg {
  font-size: .78rem;
  color: var(--muted)
}

.statsgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin: 16px 0 24px
}

.stat {
  background: var(--surface);
  border-radius: 11px;
  border: 1px solid var(--line);
  padding: 18px
}

.stat small {
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  font-weight: 600;
  font-size: .88rem
}

.stat strong {
  display: block;
  font: 600 2.35rem Georgia, serif;
  margin-top: 5px
}

.stat strong span {
  font-size: 1rem;
  color: var(--muted);
  margin-left: 4px
}

.panel,
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin: 16px 0
}

.panel h2,
.detail h3 {
  margin: 0 0 12px;
  font: 700 1.25rem var(--serif)
}

.summary {
  text-align: center;
  padding: 32px 20px
}

.summary .eyebrow {
  justify-content: center
}

.summary .eyebrow:before {
  display: none
}

.bigscore {
  display: block;
  font: 700 4rem Georgia, serif;
  color: var(--green);
  margin-top: 8px
}

.bigscore span {
  font-size: 1.65rem
}

.buttonrow {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px
}

.resultslist,
.historylist {
  list-style: none;
  padding: 0;
  margin: 0
}

.resultslist {
  max-width: 570px;
  margin: 14px auto 0
}

.resultslist li,
.historylist li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 9px 2px
}

.resultslist li>:last-child,
.historylist li>:last-child {
  margin-left: auto
}

.ok {
  color: #427347
}

.bad {
  color: var(--rust)
}

.minor {
  font-size: .82rem;
  color: var(--muted)
}

.empty {
  background: #eef2e8;
  border-radius: 9px;
  padding: 14px;
  color: var(--muted)
}

.empty p {
  margin: 0
}

.listchips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap
}

.listchips button {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 13px;
  background: #f7f7f0
}

.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap
}

.skip:focus {
  position: fixed;
  top: 5px;
  left: 5px;
  background: white;
  z-index: 5;
  padding: 8px
}

.plain:hover {
  text-decoration-color: currentColor
}

dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid #d5ddce;
  box-shadow: 0 25px 110px #192c2260;
  border-radius: 15px;
  width: min(530px, calc(100% - 24px));
  max-height: 88dvh;
  overflow: auto;
  padding: 0
}

dialog::backdrop {
  background: #14231dcc;
  backdrop-filter: blur(3px)
}

dialog.large {
  width: min(860px, calc(100% - 24px))
}

.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2
}

.dialoghead h2 {
  font: 700 1.24rem var(--serif);
  margin: 0
}

.closebtn {
  height: 35px;
  width: 35px;
  border-radius: 50%;
  background: var(--soft);
  display: grid;
  place-items: center
}

.dialogbody {
  padding: 18px 22px 22px
}

.dialogbody>p:first-child {
  margin-top: 0
}

.formfield {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  font-size: .95rem;
  font-weight: 600
}

.dialogbody .primary.wide {
  width: 100%;
  margin-top: 8px
}

.expanded {
  display: block;
  width: 100%;
  max-height: 66dvh;
  object-fit: contain;
  background: #193023;
  border-radius: 8px
}

.caption {
  font-size: .82rem;
  color: var(--muted);
  margin: 8px 0 0;
  overflow-wrap: anywhere
}

.detail img {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  background: #e4e8de;
  border-radius: 8px
}

.detail h3 {
  margin-top: 17px
}

.detail p {
  margin: 6px 0
}

.detail ul {
  padding-left: 1.45em
}

.detail li+li {
  margin-top: 6px
}

.creditlist {
  display: grid;
  gap: 12px
}

.creditlist article {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px
}

.creditlist article p {
  font-size: .83rem;
  color: var(--muted);
  margin: 2px 0
}

.dim {
  color: var(--muted)
}

.smallbtn {
  font-size: .84rem
}

.notice {
  color: var(--rust);
  font-size: .91rem
}

@media(min-width:1500px) {
  .intro {
    margin-top: 42px
  }

  .figurecard {
    min-height: 475px
  }

  .qcard {
    padding: 29px 32px
  }

  .answer {
    min-height: 52px
  }

  .training {
    margin-top: 36px
  }

  .modecard {
    min-height: 120px
  }
}

@media(max-width:900px) {
  .wrap {
    width: calc(100% - 48px)
  }

  .headrow {
    gap: 12px
  }

  .headrow nav {
    gap: 0
  }

  .navlink {
    padding: 8px 11px
  }

  .quizpair {
    grid-template-columns: 1.04fr 1fr;
    gap: 14px
  }

  .qcard {
    padding: 21px 18px 15px
  }

  .modecard {
    padding: 14px 11px;
    min-height: 96px
  }

  .modecard>img {
    object-position: 60% center
  }

  .modecard:before {
    background: linear-gradient(90deg, #f4f6e4e0 4%, #f4f6e479 47%, transparent 83%)
  }

  .modegrid {
    gap: 10px
  }

  .figbottom {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px
  }
}

@media(max-width:690px) {
  .wrap {
    width: calc(100% - 32px)
  }

  .headrow {
    height: auto;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0;
    padding-top: 10px
  }

  .brand {
    gap: 8px
  }

  .brand img {
    width: 35px;
    height: 35px
  }

  .brand strong {
    font-size: 1.11rem
  }

  .brand small {
    font-size: .6rem
  }

  .streak {
    order: 1;
    font-size: .76rem;
    padding: 4px 9px
  }

  .headrow nav {
    order: 2;
    flex: 1 0 100%;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 0
  }

  .navlink {
    justify-content: center;
    flex: 1;
    padding: 5px 4px;
    font-size: .84rem;
    gap: 5px
  }

  .navlink svg {
    width: 16px
  }

  .intro {
    margin: 21px 0 17px;
    gap: 8px;
    align-items: center
  }

  .intro h1 {
    font-size: clamp(1.68rem, 7vw, 2.1rem);
    margin: 4px 0
  }

  .intro .eyebrow {
    font-size: .67rem
  }

  .intro p {
    font-size: .85rem;
    max-width: 28em
  }

  .intro .outline {
    white-space: nowrap;
    padding: 7px 10px;
    font-size: .8rem
  }

  .intro .outline svg {
    width: 15px
  }

  .quizpair {
    display: flex;
    flex-direction: column;
    gap: 12px
  }

  .figurecard {
    min-height: 0;
    aspect-ratio: 1.65
  }

  .figtop {
    padding: 12px 12px 0
  }

  .photo-tag {
    font-size: .73rem
  }

  .glass {
    width: 32px;
    height: 32px
  }

  .figbottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    padding: 12px 13px
  }

  .figbottom small {
    font-size: .62rem
  }

  .figbottom strong {
    font-size: .8rem
  }

  .photocredit {
    font-size: .65rem
  }

  .qcard {
    padding: 18px
  }

  .qcard h2 {
    font-size: 1.48rem
  }

  .progress {
    margin: 10px 0 12px
  }

  .qsub {
    margin-bottom: 12px
  }

  .answer {
    min-height: 46px
  }

  .qactions {
    margin-top: 13px;
    padding-top: 10px
  }

  .training {
    margin: 23px 0
  }

  .modegrid {
    grid-template-columns: 1fr
  }

  .modecard {
    min-height: 92px;
    padding: 13px 19px
  }

  .modecard>img {
    object-position: center right
  }

  .modecard .sub {
    font-size: .82rem
  }

  .modecard strong {
    font-size: 1.15rem
  }

  .filters select {
    flex: 1;
    min-width: 0;
    font-size: .9rem
  }

  .searchwrap {
    flex-basis: 100%
  }

  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
  }

  .specimen>div {
    padding: 9px
  }

  .specimen strong {
    font-size: .98rem
  }

  .statsgrid {
    gap: 6px
  }

  .stat {
    padding: 11px 8px
  }

  .stat small {
    font-size: .75rem;
    gap: 3px
  }

  .stat small svg {
    width: 15px
  }

  .stat strong {
    font-size: 1.85rem
  }

  .panel {
    padding: 16px
  }

  .foot {
    padding: 13px 0
  }

  .footbrand {
    font-size: .71rem
  }

  .foot .plain {
    font-size: .75rem
  }

  .dialogbody {
    padding: 16px
  }

  .resultslist li {
    font-size: .88rem
  }
}

@media(prefers-reduced-motion:no-preference) {

  .modecard,
  .answer,
  .navlink {
    transition: background-color .15s, border-color .15s, transform .15s
  }

  .modecard:hover {
    transform: translateY(-2px)
  }
}

.recallform {
  display: grid;
  gap: 9px;
  margin: 8px 0 16px
}

.recallform label {
  font-size: .92rem;
  font-weight: 650
}

.recallform input {
  padding: 11px 13px;
  border: 1px solid #b8c6b4;
  border-radius: 7px;
  min-width: 0;
  background: #fffefa
}

.recallactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.qcard:has(.recallform) .qactions {
  margin-top: auto
}

.primary:disabled {
  opacity: .48
}

/* Country and local-area selectors are shared by the quiz and field guide. */
.atlasfilters {
  display: grid;
  gap: 14px;
}

.atlas-tools,
.resulttop,
.settings-pair {
  display: flex;
  align-items: center;
  gap: 12px;
}

.atlas-tools select {
  flex: 0 1 auto;
}

.geofields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.geofields .formfield,
.settings-pair .formfield {
  min-width: 0;
  margin: 0;
}

.geofields select,
.settings-pair select {
  width: 100%;
  min-width: 0;
  font-weight: 500;
  text-overflow: ellipsis;
}

.geofields select:disabled {
  opacity: .68;
}

.geonote {
  margin: 0;
}

.settings-pair .formfield {
  flex: 1;
}

#settingsform .geofields {
  grid-template-columns: 1fr 1fr;
}

#settingsform .geofields .formfield:last-child {
  grid-column: 1 / -1;
}

#settingsform .geonote {
  margin: 12px 0 16px;
}

#poolinfo {
  font-size: .94rem;
  margin: 14px 0 2px;
}

.resulttop {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.resulttop .matchcount {
  margin: 0;
}

.locationcredits {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 5px;
}

.locationcredits h3 {
  font: 700 1.12rem var(--serif);
  margin: 0;
}

.locationcredits p {
  font-size: .9rem;
}

.qtop .tag {
  text-align: right;
  overflow-wrap: anywhere;
}

.qno {
  flex-shrink: 0;
}

.figbottom strong {
  overflow-wrap: anywhere;
}

@media(max-width:690px) {
  .atlas-tools {
    flex-wrap: wrap;
    gap: 8px;
  }

  .atlas-tools .searchwrap {
    flex: 1 1 180px;
    min-width: 0;
  }

  .atlas-tools select {
    flex: 0 1 auto;
    max-width: 40%;
  }

  .atlasfilters .geofields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .atlasfilters .geofields .formfield:last-child {
    grid-column: 1 / -1;
  }

  .geofields .formfield {
    font-size: .87rem;
  }

  .intro .outline {
    max-width: 124px;
    white-space: normal;
  }
}

.head-actions,
.share-toggle,
.project-toggle,
.page-controls {
  display: flex;
  align-items: center;
  gap: 10px
}

.share-toggle,
.project-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--green);
  font-weight: 700;
  padding: 7px 11px;
  white-space: nowrap
}

.projection-help ol {
  padding-left: 1.5em
}

.projection-help li+li {
  margin-top: .5em
}

.catalog-pages {
  margin: 22px 0;
  justify-content: center
}

.catalog-pages button:disabled {
  opacity: .45
}

.cover-note {
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  aspect-ratio: 1.6;
  background: #e8ece1;
  color: #425944;
  font-size: .91rem
}

.cover-note svg {
  margin: auto
}

.specimen .cover-note {
  padding: 8px
}

.letterplate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(22px, 4vw, 56px);
  flex: 1;
  min-height: 200px;
  background: #1f4436;
  color: #f7f6e9;
  overflow-wrap: anywhere
}

.letterplate .eyebrow {
  color: #d7ce94
}

.letterplate strong {
  font: italic 600 clamp(1.75rem, 3.9vw, 4.2rem)/1.12 Georgia, serif
}

.letterplate p {
  margin: 0;
  color: #e0e8d7
}

.letterplate+figcaption {
  padding: 8px 20px 14px;
  background: #1f4436;
  font-size: .79rem
}

.textfigure:after {
  display: none
}

.subject-select {
  margin: 12px 0
}

.pager-note {
  font-variant-numeric: tabular-nums
}

.detail .detailmeta {
  font-size: .9rem;
  color: var(--muted)
}

@media(max-width:850px) {
  .headrow {
    gap: 8px
  }

  .head-actions {
    gap: 6px
  }

  .navlink {
    padding-left: 8px;
    padding-right: 8px
  }

  .head-actions .streak {
    display: none
  }
}

@media(max-width:690px) {
  .head-actions {
    order: 1
  }

  .project-toggle {
    font-size: .78rem
  }

  .letterplate {
    min-height: 170px
  }

  .headrow {
    gap: 0
  }
}

.projecting {
  background: #12251d
}

.projecting body {
  background: #12251d;
  min-height: 100dvh
}

.projecting .sitehead {
  background: #142c21;
  border-color: #4e6e55
}

.projecting .headrow {
  height: auto;
  min-height: 48px;
  padding-block: 5px
}

.projecting .brand,
.projecting .navlink {
  color: #f3f5e7
}

.projecting .navlink.active {
  background: #e7f1d7;
  color: #163522
}

.projecting .brand small,
.projecting .streak,
.projecting footer,
.projecting .training,
.projecting .intro:has(+.quizpair) {
  display: none
}

.projecting .wrap {
  max-width: 1920px;
  width: calc(100% - clamp(16px, 4vw, 70px))
}

.projecting #main {
  padding-block: 10px
}

.projecting .quizpair {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(8px, 1.4vw, 26px)
}

.projecting .figurecard {
  background: #0a150f;
  min-height: clamp(275px, 72dvh, 1100px)
}

.projecting .figurecard>.photo {
  object-fit: contain;
  object-position: center
}

.projecting .qcard {
  margin: 0;
  padding: clamp(14px, 2vw, 40px);
  background: #fffdf3
}

.projecting .qcard h2 {
  font-size: clamp(1.35rem, 2.65vw, 3.5rem);
  line-height: 1.25
}

.projecting .answer {
  font-size: clamp(1.05rem, 2.1vw, 3rem);
  line-height: 1.25;
  padding: clamp(8px, 1.05vw, 22px);
  min-height: 44px
}

.projecting .qsub,
.projecting .feedback {
  font-size: clamp(1rem, 1.35vw, 1.8rem)
}

.projecting .intro,
.projecting .sectionhead,
.projecting .matchcount,
.projecting .pager-note {
  color: #fffdf1
}

.projecting .intro p,
.projecting .intro .eyebrow {
  color: #d5dfca
}

.projecting .summary .bigscore {
  color: var(--green)
}

.projecting .qactions {
  margin-top: 10px
}

.projecting .figbottom {
  background: #112317ad
}

.projecting .letterplate strong {
  font-size: clamp(2rem, 4vw, 6rem)
}

@media(orientation:landscape) and (max-height:580px) {
  .projecting .headrow {
    min-height: 32px;
    padding-block: 3px;
    flex-wrap: nowrap
  }

  .projecting .brand,
  .projecting .qsub,
  .projecting .progress,
  .projecting .photo-tag {
    display: none
  }

  .projecting .headrow nav {
    order: 0;
    flex: 0 1 auto;
    padding: 0
  }

  .projecting .figurecard {
    min-height: calc(100dvh - 64px)
  }

  .projecting .qcard h2 {
    margin: 5px 0 8px
  }

  .projecting .qcard {
    padding: 10px 14px
  }

  .projecting .answer {
    min-height: 32px;
    padding: 5px 9px
  }

  .projecting .answers {
    gap: 5px
  }

  .projecting .qtop {
    margin: 0
  }

  .projecting .qactions {
    margin-top: 6px
  }
}

@media(orientation:portrait) and (max-width:750px) {
  .projecting .quizpair {
    grid-template-columns: 1fr
  }

  .projecting .figurecard {
    min-height: 0;
    height: 34dvh
  }

  .projecting .headrow nav {
    padding: 3px 0
  }
}

.projecting .panel .sectionhead,
.projecting .panel h2 {
  color: var(--ink)
}

.bird-audio{display:grid;gap:.5rem;margin:1rem 0;padding:.85rem 1rem;border:1px solid #d4dbce;border-radius:12px;background:#f1f4eb;color:#263e35;min-width:0}
.bird-audio audio{width:100%;min-width:0;max-width:32rem}
.bird-audio small{font-size:.74rem;overflow-wrap:anywhere}
.bird-audio a{color:inherit}.audio-error{font-size:.8rem}
.listening{background:#193e38;color:#f4f5ea;display:flex;flex-direction:column;justify-content:center;padding:clamp(1.25rem,4vw,3rem);gap:.5rem}
.listening .eyebrow,.listening .plain{color:#d6e7cb}.listening h2{font-size:clamp(1.5rem,3.5vw,2.5rem);line-height:1.45;margin:0}

field-map,field-journal{display:block}
field-map{grid-column:1/-1;min-width:0;color:var(--green)}
.map-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.35rem}
.map-head button{background:var(--surface);border:1px solid var(--line);border-radius:8px;width:36px;height:32px;margin-left:4px}
.map-head button:disabled{opacity:.45}
.map-scroll{max-height:360px;overflow:auto;border:1px solid #cadbd4;border-radius:12px;background:#e5eff0}
.map-scroll svg{display:block;min-width:100%;height:auto}
.map-country{fill:#b3c7ac;stroke:#f5f7ed;stroke-width:.5;cursor:pointer}.map-country:hover,.map-selected{fill:#bd622f;stroke:#fff;stroke-width:.8;cursor:pointer}
.map-scroll circle.map-country{fill:#758f70;stroke-width:.3}
field-map small{display:block;margin-top:.3rem;color:var(--muted)}
.journal-rank,.journal-card{padding:clamp(18px,3vw,32px);border-radius:17px;margin-bottom:20px}
.journal-rank{display:flex;align-items:flex-start;gap:20px;color:#fffdf0;background:#244536}
.rank-glyph{border:1px solid #91a895;background:#395c46;border-radius:50%;height:60px;width:60px;display:grid;place-items:center;flex:none}
.rank-info{flex:1;min-width:0}.rank-info h2,.journal-card h2{font-family:var(--serif);margin:0}.rank-info p,.journal-card p{margin:.5rem 0}.rank-info progress{accent-color:#bfda98;width:min(100%,480px);height:12px;display:block}.rank-info summary{cursor:pointer}.rank-info details{font-size:.9rem;margin-top:12px}
.journal-card{border:1px solid var(--line);background:var(--surface)}.journal-card h2{display:flex;align-items:center;gap:10px}
.journal-card .buttonrow{flex-wrap:wrap;margin:1rem 0}.file-pick{cursor:pointer;position:relative;overflow:hidden}.file-pick input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-pick:focus-within{outline:3px solid var(--rust)}
.match-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.match-columns figure,.observations figure{margin:0}.comparison small,.comparison strong,.comparison i,.observations small{display:block}.match-columns img{width:100%;height:clamp(135px,25vw,285px);background:var(--soft);object-fit:contain;border-radius:9px}.ai-birds,.bird-results{display:flex;flex-wrap:wrap;gap:7px;margin:.6rem 0 1rem}.ai-birds small,.bird-results small{font-size:.73rem}
.observations{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(140px,45%),1fr));gap:12px;margin-top:12px}.observations img{width:100%;height:130px;object-fit:cover;border-radius:9px}
@media(max-width:690px){.headrow nav{display:flex;justify-content:space-between;gap:0}.headrow .navlink{padding-inline:3px;font-size:.8rem}.rank-glyph{width:42px;height:42px}.journal-rank{gap:12px}}
.journal-filter{display:flex;align-items:center;gap:.6rem;font-size:.85rem;margin:.65rem 0}.journal-filter select{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:.35rem}
.map-scroll{width:min(100%,860px);aspect-ratio:2/1;max-height:none;contain:size}

.share-toggle {
  min-height: 44px;
  gap: 5px;
  font-size: .9rem;
}
#shareLink {
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
#copyStatus:empty { margin: 0; }
@media (min-width: 691px) and (max-width: 1080px) {
  .head-actions .streak { display: none; }
  .headrow { gap: 8px; }
  .navlink { padding-inline: 7px; }
}
@media (min-width: 691px) and (max-width: 795px) {
  .headrow { height: auto; flex-wrap: wrap; padding-top: 8px; }
  .headrow nav { order: 2; flex: 1 0 100%; justify-content: center; }
}
@media (max-width: 365px) {
  .brand { gap: 4px; }
  .head-actions { gap: 3px; }
  .project-toggle, .share-toggle { padding-inline: 6px; gap: 3px; }
}
