@charset "UTF-8";

/* ==========================================================================
   ことわざ動物園 — common stylesheet
   ========================================================================== */

:root {
  --paper:      #f4f7f0;
  --card:       #ffffff;
  --ink:        #1d2b22;
  --ink-soft:   #4d5e53;
  --ink-faint:  #72837a;
  --green:      #2f6b4d;
  --green-deep: #1f4a35;
  --green-pale: #e5efe2;
  --green-line: #cfdeca;
  --rule:       #dde5d8;

  --imi:    #1b6fb5;
  --yurai:  #a0710a;
  --tsukai: #cf5420;

  --measure: 36em;
  --page:    1060px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
          "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic",
          "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho",
            "YuMincho", "Noto Serif JP", serif;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.95;
  font-feature-settings: "palt" 1;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > .sitefoot { margin-top: auto; }

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--green-deep); }

:focus-visible {
  outline: 3px solid var(--imi);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-deep); color: #fff;
  padding: .6em 1.2em; z-index: 100; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* -------------------------------------------------------------- header -- */

.masthead {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: .04em;
  color: var(--green-deep);
  text-decoration: none;
  line-height: 1.2;
}
.wordmark:hover { color: var(--green); }
.wordmark svg { flex: none; }

.globalnav { margin-left: auto; }
.globalnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  font-size: .94rem;
}
.globalnav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
  line-height: 1.5;
}
.globalnav a:hover { color: var(--green-deep); border-bottom-color: var(--green-line); }
.globalnav a[aria-current="true"] { color: var(--green-deep); border-bottom-color: var(--green); font-weight: 700; }

/* ---------------------------------------------------------- page frame -- */

.layout {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

@media (min-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 236px;
    align-items: start;
    gap: 56px;
  }
}

.crumbs {
  max-width: var(--page);
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: .85rem;
  color: var(--ink-faint);
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.crumbs li + li::before { content: "›"; margin-right: .5em; color: var(--green-line); }
.crumbs a { color: var(--ink-faint); }

/* --------------------------------------------------------- page header -- */

.placard {
  margin: 32px 0 0;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.placard__tile {
  flex: none;
  width: 88px; height: 88px;
  display: grid; place-items: center;
  background: var(--green-deep);
  color: #fff;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 0 0 5px var(--green-deep);
}

.placard__body { min-width: 0; }

h1 {
  font-family: var(--mincho);
  font-weight: 700;
  font-size: clamp(1.65rem, 1.2rem + 1.9vw, 2.1rem);
  line-height: 1.45;
  letter-spacing: .02em;
  margin: 0 0 .5em;
  color: var(--green-deep);
}

.lead {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* ----------------------------------------------------------- home hero -- */

.hero {
  margin: 44px 0 8px;
  max-width: 40em;
}
.hero h1 {
  font-size: clamp(2rem, 1.3rem + 3.2vw, 2.9rem);
  line-height: 1.35;
  margin-bottom: .34em;
}
.hero__tagline {
  font-family: var(--mincho);
  font-size: clamp(1.05rem, .95rem + .5vw, 1.22rem);
  color: var(--green);
  letter-spacing: .04em;
  margin: 0 0 1.1em;
  max-width: none;
}

.home .layout { grid-template-columns: minmax(0, 1fr); }
.home .content { max-width: 820px; }

/* ------------------------------------------------------------- content -- */

.content { min-width: 0; }

.content p,
.content li { max-width: var(--measure); }

.content > section { margin-top: 56px; }

h2 {
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: .03em;
  line-height: 1.6;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--green-line);
  color: var(--green-deep);
}

h3 {
  font-family: var(--mincho);
  font-weight: 700;
  font-size: clamp(1.32rem, 1.1rem + .8vw, 1.5rem);
  line-height: 1.55;
  letter-spacing: .02em;
  margin: 0 0 4px;
  color: var(--ink);
}

p { margin: 0 0 1.25em; }
.content section > *:last-child { margin-bottom: 0; }

/* ----------------------------------------------------- proverb entries -- */

.proverb {
  margin-top: 38px;
  padding-top: 4px;
  max-width: calc(var(--measure) + 11rem);
}
.proverb::after { content: ""; display: block; clear: both; }
.proverb + .proverb { border-top: 1px solid var(--rule); padding-top: 40px; }
.proverb .note,
.proverb .note p { max-width: none; }

.proverb__rule {
  display: block;
  width: 2.4em;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
  margin: 0 0 20px;
}

.proverb .fig { float: right; margin: 4px 0 18px 26px; }

.note { margin: 0 0 1.5em; }
.note:last-child { margin-bottom: 0; }

.note__label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .08em;
  color: #fff;
  padding: .45em .85em .5em;
  border-radius: 3px;
  margin-bottom: .6em;
}
.note--imi    .note__label { background: var(--imi); }
.note--yurai  .note__label { background: var(--yurai); }
.note--tsukai .note__label { background: var(--tsukai); }

.note p { margin-bottom: .9em; }
.note p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------- dialogue -- */

.dialogue { margin: 0; padding: 18px 20px; background: var(--green-pale); border-radius: 8px; max-width: 32em; }
.dialogue p { margin: 0 0 .7em; display: flex; gap: .7em; max-width: none; }
.dialogue p:last-child { margin-bottom: 0; }

.dialogue .who {
  flex: none;
  width: 1.75em; height: 1.75em;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .8rem; font-weight: 700;
  line-height: 1;
  margin-top: .34em;
}
.dialogue p:nth-child(even) .who { background: var(--tsukai); }

/* ------------------------------------------------------------ figures -- */

.fig { margin: 0; }
.fig img {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
}
.fig--left  { float: left;  margin: 4px 24px 16px 0; }
.fig--right { float: right; margin: 4px 0 16px 24px; }

.clearfix::after { content: ""; display: block; clear: both; }

@media (max-width: 560px) {
  .fig--left, .fig--right, .proverb .fig {
    float: none; margin: 0 auto 20px;
  }
  .fig img { margin: 0 auto; }
  .placard { gap: 16px; }
  .placard__tile { width: 68px; height: 68px; font-size: 36px; }
  .guide__item { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------- story block -- */

.story {
  margin: 0 0 1.4em;
  padding: 20px 22px;
  background: var(--card);
  border-left: 4px solid var(--green-line);
  border-radius: 0 8px 8px 0;
  max-width: var(--measure);
}
.story p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- guides -- */

.guide {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.guide__item img { border-radius: 8px; border: 1px solid var(--rule); background: #fff; }
.guide__item h2 { margin-bottom: 12px; }
.guide__item p { margin-bottom: .8em; }

.more {
  display: inline-block;
  font-size: .92rem;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--green-line);
  padding-bottom: 2px;
}
.more:hover { border-bottom-color: var(--green); }

/* --------------------------------------------------------- animal grid -- */

.zoo {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 232px), 1fr));
  gap: 16px;
}

.zoo a {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 14px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.zoo a:hover { border-color: var(--green); transform: translateY(-2px); }
.zoo img { display: block; margin: 0 auto 10px; background: #fff; border-radius: 4px; }
.zoo b {
  display: block;
  font-family: var(--mincho);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.3;
}
.zoo small { display: block; font-size: .78rem; color: var(--ink-faint); margin-top: 2px; }

/* -------------------------------------------------------- jump to list -- */

.jumplist {
  list-style: none;
  margin: 0 0 1.4em;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.jumplist li { max-width: none; }
.jumplist a {
  display: inline-block;
  padding: .5em 1.1em;
  background: var(--card);
  border: 1px solid var(--green-line);
  border-radius: 4px;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.6;
  text-decoration: none;
  color: var(--green-deep);
}
.jumplist a:hover { background: var(--green-pale); border-color: var(--green); }

/* ------------------------------------------------------------ sidebar -- */

.sidebar { font-size: .94rem; }

@media (min-width: 1000px) {
  .sidebar { position: sticky; top: 24px; }
}

.sidebar h2 {
  font-size: .95rem;
  letter-spacing: .08em;
  margin-bottom: 12px;
  padding-bottom: 7px;
}

.sidebar nav + nav { margin-top: 32px; }

.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li + li { border-top: 1px solid var(--rule); }
.sidebar a {
  display: block;
  padding: 9px 2px;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.5;
}
.sidebar a:hover { color: var(--green-deep); }
.sidebar a[aria-current="page"] { color: var(--green-deep); font-weight: 700; }

@media (max-width: 999px) {
  .sidebar ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 0 18px; }
  .sidebar li + li { border-top: none; }
  .sidebar li { border-top: 1px solid var(--rule); }
}

/* --------------------------------------------------------- link notice -- */

.banner-notice {
  margin-top: 56px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: .92rem;
  max-width: var(--measure);
}
.banner-notice h2 { font-size: 1rem; margin-bottom: 10px; }
.banner-notice p { margin-bottom: .6em; }
.banner-notice img { border: 1px solid var(--rule); border-radius: 3px; vertical-align: middle; }
.banner-notice code {
  font-size: .9em;
  background: var(--green-pale);
  padding: .15em .45em;
  border-radius: 3px;
  word-break: break-all;
}

/* -------------------------------------------------------------- tables -- */

.content table {
  border-collapse: collapse;
  width: 100%;
  max-width: var(--measure);
  margin: 0 0 1.4em;
  font-size: .95rem;
}
.content th, .content td {
  border: 1px solid var(--rule);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.content th { background: var(--green-pale); font-weight: 700; white-space: nowrap; }

/* -------------------------------------------------------------- footer -- */

.sitefoot {
  background: var(--green-deep);
  color: #d8e6dc;
  padding: 40px 20px 32px;
  font-size: .9rem;
}
.sitefoot__inner { max-width: var(--page); margin: 0 auto; }
.sitefoot nav ul {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 26px;
}
.sitefoot a { color: #ffffff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.sitefoot a:hover { border-bottom-color: #fff; }
.sitefoot :focus-visible { outline-color: #ffd37a; }
.sitefoot small { display: block; color: #a9c2b2; font-size: .85rem; line-height: 1.9; }

/* ------------------------------------------------------------- 404 etc -- */

.narrow { max-width: var(--page); margin: 0 auto; padding: 72px 20px 96px; }
