/* The game library uses the same ink, paper and sea colors as the island map. */
.island-home {
  --library-card: #fffdf6;
  --library-ink: #112e48;
  --library-muted: #445b64;
  --library-sea: #0a5870;
  --library-line: #c7bd9f;
  --library-display: Georgia, Cambria, "Times New Roman", serif;
}

.island-home :is(.games-section, .newest-game-section, .teacher-section, .faq-section, .about-section, footer) {
  width: min(76rem, calc(100% - clamp(2rem, 7vw, 7rem)));
  margin-inline: auto;
  color: var(--library-ink);
  --muted: var(--library-muted);
  --line: var(--library-line);
  --lime: var(--library-sea);
}

.island-home :is(.games-section, .newest-game-section, .teacher-section, .faq-section, .about-section) {
  padding-block: clamp(2.5rem, 5vw, 4.75rem);
}

.island-home :is(.section-heading, .teacher-section, .faq-section, .about-section) h2,
.island-home :is(.card-copy, .practice-card, .newest-game-copy) h3 {
  font-family: var(--library-display);
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.island-home :is(.section-heading, .teacher-section, .faq-section, .about-section) h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.island-home :is(.games-section, .teacher-section, .faq-section, .about-section, .practice-card) .eyebrow {
  margin-bottom: .5rem;
  color: #70531b;
  font-size: .8125rem;
  letter-spacing: .095em;
}

.island-home #game-count {
  margin: .5rem 0 0;
  color: var(--library-muted);
  font-size: 1rem;
}

.island-home .games-section .section-heading {
  flex-flow: row wrap;
  align-items: center;
}

.island-home .island-surprise {
  min-height: 44px;
  padding: .6rem 1.2rem;
  color: #51350f;
  background: #ffe3a3;
  border: 1px solid #997839;
  border-radius: 999px;
  font-weight: 750;
}

.island-home .island-surprise:hover {
  background: #ffd77b;
}

.island-home .filters {
  gap: .55rem;
  margin: 1.5rem 0;
}

.island-home .filters button,
.island-home :is(.games-section, .newest-game) .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem 1.1rem;
  gap: .5rem;
  background: var(--library-card);
  color: var(--library-ink);
  border: 1px solid #938669;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
}

.island-home .filters button:hover,
.island-home :is(.games-section, .newest-game) .button:hover {
  border-color: var(--library-sea);
  background: #e9f4ef;
}

.island-home .filters button[aria-pressed="true"],
.island-home :is(.games-section, .newest-game) .primary {
  border-color: var(--library-ink);
  background: var(--library-ink);
  color: white;
}

.island-home :is(.games-section, .newest-game) .primary:hover {
  background: var(--library-sea);
}

.island-home .filters button span {
  margin: 0;
  padding: .1rem .45rem;
  background: #e9e2d1;
  color: var(--library-ink);
  border-radius: 1rem;
  font-size: .8125rem;
}

.island-home .filters button[aria-pressed="true"] span {
  background: #ffe1a0;
}

.island-home .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.2vw, 2rem);
  margin: 1.5rem 0 2rem;
}

.island-home .game-card,
.island-home .newest-game {
  background: var(--library-card);
  border: 1px solid var(--library-line);
  border-radius: 1rem;
  box-shadow: 0 3px 0 #d9cfb7;
}

.island-home .game-card {
  display: flex;
  flex-direction: column;
}

.island-home .game-card:hover,
.island-home .game-card:focus-within {
  border-color: var(--library-sea);
}

.island-home .card-art {
  aspect-ratio: 1.9;
  border-bottom: 1px solid var(--library-line);
}

.island-home .card-art::after {
  content: none;
}

.island-home .card-art .art-label {
  display: none;
}

.island-home .multiplayer-label {
  background: #ffe19c;
  color: #463313;
  border-radius: .5rem;
}

.island-home .card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.1rem clamp(1rem, 1.8vw, 1.5rem) 0;
}

.island-home .card-meta,
.island-home .card-footer {
  flex-wrap: wrap;
  color: var(--library-muted);
  font-size: .8125rem;
  line-height: 1.45;
}

.island-home .skill {
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.island-home .skill.green { color: #28613b; }
.island-home .skill.amber { color: #795315; }
.island-home .skill.pink { color: #914462; }
.island-home .skill.lavender { color: #664891; }

.island-home .card-copy h3 {
  margin: .3rem 0;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  line-height: 1.15;
}

.island-home .card-copy h3 a {
  min-height: 44px;
  align-items: center;
  color: var(--library-ink);
}

.island-home .card-copy h3 a:hover {
  color: var(--library-sea);
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .12em;
}

.island-home .card-copy h3 a span { display: none; }
.island-home .card-copy h3 a::after {
  content: "";
  flex: none;
  margin-left: auto;
  border-top: .26em solid transparent;
  border-bottom: .26em solid transparent;
  border-left: .39em solid var(--library-sea);
}

.island-home .card-copy > p,
.island-home .practice-card > p:not(.eyebrow),
.island-home .teacher-intro > p:last-child,
.island-home .teacher-steps p,
.island-home .faq-list p,
.island-home .about-section > div > p:not(.eyebrow) {
  color: var(--library-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.island-home .card-copy > p { min-height: 0; }
.island-home .card-footer { margin-top: auto; }

.island-home .practice-card {
  gap: .3rem;
  padding: clamp(1.3rem, 2.8vw, 2.25rem);
  background: #e8f1e4;
  border: 1px solid #a7bda2;
  border-left: .38rem solid #377250;
}

.island-home .practice-card .tip-icon,
.island-home .practice-card a span,
.island-home .about-section a span {
  display: none;
}

.island-home .practice-card h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.island-home #games .skill-guide {
  gap: .2rem 1.15rem;
  color: var(--library-muted);
  font-size: .9375rem;
}

.island-home #games .skill-guide > span {
  color: var(--library-ink);
  font-weight: 750;
}

.island-home :is(.skill-guide, .practice-card, .about-section, .faq-list) a,
.island-home footer a {
  color: var(--library-sea);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: .19em;
}

.island-home :is(.skill-guide, .practice-card, .about-section, .faq-list) a:hover,
.island-home footer a:hover {
  color: var(--library-ink);
  text-decoration-thickness: 2px;
}

.island-home .practice-card a,
.island-home .about-section a,
.island-home footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.island-home .newest-game-section {
  padding-top: 0;
}

.island-home .newest-game-copy .newest-game-skill {
  color: #28613b;
}

.island-home .newest-game-art {
  height: 100%;
}

.island-home .newest-game-art img {
  height: 100%;
  object-fit: cover;
}

.island-home .teacher-steps > div > span {
  flex: none;
  background: #f7e5b6;
  color: #674513;
  border-color: #b49a59;
  border-radius: 50%;
  font-size: .8125rem;
  font-weight: 750;
}

.island-home .teacher-steps h3,
.island-home .faq-list summary {
  color: var(--library-ink);
  font-size: 1.125rem;
}

.island-home .faq-list summary:hover { color: var(--library-sea); }
.island-home .faq-list summary::marker { color: var(--library-sea); }

.island-home footer {
  color: var(--library-muted);
  font-size: .9375rem;
}

.island-home footer .footer-brand {
  color: var(--library-ink);
  font-family: var(--library-display);
  text-decoration: none;
}

.island-home :is(.games-section, .newest-game-section, .teacher-section, .faq-section, .about-section, footer) :focus-visible {
  outline: 3px solid #005c83;
  outline-offset: 3px;
}

@media (max-width: 60rem) {
  .island-home .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 38rem) {
  .island-home .game-grid { grid-template-columns: 1fr; }
  .island-home .filters button { padding-inline: .85rem; }
  .island-home .teacher-steps > div { gap: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .island-home .game-card:hover { transform: none; }
}
