@font-face {
  font-family: Inter;
  src: url("inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("barlow-condensed.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #e9eef2;
  --muted: #aebac3;
  --line: #35414a;
  --canvas: #151c21;
  --paper: #202a31;
  --surface: #192228;
  --accent: #a9d9ee;
  --blue: var(--accent);
  --blue-hover: #f9fbfd;
  --selected: #30444e;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.58;
}

[data-game="roll-a-fisherman"], [data-theme="roll-a-fisherman"] {
  --accent: #8bd0ea;
  --blue: var(--accent);
  --selected: #2b4351;
}
[data-game="hatch-a-cow"], [data-theme="hatch-a-cow"] {
  --accent: #edc27e;
  --blue: var(--accent);
  --selected: #493f32;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
a { color: var(--blue); text-decoration: none; text-decoration-thickness: .065em; text-underline-offset: .17em; }
a:hover { color: var(--blue-hover); }
a:where(:hover, :focus-visible), .prose a, .reference-note a, .table-note a { text-decoration-line: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

.frame { width: min(87rem, calc(100% - 4rem)); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: .6rem; z-index: 5; transform: translateY(-150%); background: var(--paper); padding: .5rem .75rem; }
.skip:focus { transform: none; }

.masthead { background: #111619; color: #f8f8f8; border-bottom: 1px solid var(--line); }
.masthead-content { min-height: 4.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 1rem; color: inherit; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 7.6rem; height: auto; }
.brand span { padding-left: 1.02rem; border-left: 1px solid var(--line); font: 700 1.08rem var(--display); letter-spacing: .04em; white-space: nowrap; text-transform: uppercase; }
.brand:focus-visible, .search-launch:focus-visible { outline-color: white; }

.search-launch {
  min-height: 2.52rem;
  width: min(100%, 18rem);
  display: flex;
  align-items: center;
  gap: .61rem;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: var(--surface);
  color: #ededef;
  text-align: left;
  font-size: .91rem;
}
.search-launch:hover { background: var(--selected); border-color: #777980; }
.search-launch kbd { min-width: 1.35rem; margin-left: auto; border: 1px solid #606166; border-radius: .16rem; color: #e5e6e8; text-align: center; }

.site-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-content { display: flex; gap: .65rem; flex-wrap: wrap; }
.nav-content a { padding: .78rem .75rem .65rem; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; font-size: .91rem; text-decoration: none; }
.nav-content a:first-child { padding-left: .2rem; }
.nav-content a:hover { text-decoration: underline; color: var(--blue-hover); }
.nav-content a[aria-current] { color: var(--blue); border-bottom-color: var(--blue); }

#main { min-height: 65vh; }
.home-page { max-width: 75rem; margin-top: 2.2rem; }
.home-page > .page-heading { padding: 0 0 1rem; border: 0; }
.page-heading { padding-bottom: 1.07rem; border-bottom: 1px solid var(--line); }
.page-heading h1, .game-banner h1 { margin: 0; font: 700 clamp(2.55rem, 5.4vw, 4.2rem)/.96 var(--display); }
.page-heading p { margin: .67rem 0 0; color: var(--muted); }
.equipment-heading { display: flex; align-items: center; gap: .9rem; }
.equipment-heading > img { width: 5.5rem; height: 5.5rem; flex: none; object-fit: contain; }
.location-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 12rem); gap: 1rem; align-items: center; }
.location-heading figure { margin: 0; }
.location-heading figure img { width: 100%; height: auto; border-radius: .25rem; }
.location-heading figcaption { margin-top: .4rem; font-size: .8rem; text-align: center; }
.game-select { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.game-listing { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: .3rem; background: var(--paper); }
.cover-link { display: block; overflow: hidden; background: var(--surface); border-bottom: 3px solid var(--accent); }
.cover-link img { width: 100%; aspect-ratio: 2.18; object-fit: cover; object-position: center 49%; }
.listing-text { display: flex; flex-direction: column; align-items: start; flex: 1; padding: 1rem 1.2rem 1.15rem; }
.listing-text h2 { margin: 0; font: 700 clamp(2rem, 3.8vw, 3.1rem)/1.03 var(--display); }
.listing-text h2 a { color: var(--ink); text-decoration: none; }
.listing-text h2 a:hover { color: var(--accent); }
.listing-text p { margin: .46rem 0 .72rem; color: var(--muted); }
.listing-links, .related > div { display: flex; flex-wrap: wrap; gap: .16rem .82rem; }
.listing-links { margin-bottom: 1rem; }
.listing-links a { font-size: .89rem; }
.view-wiki { display: inline-flex; align-items: center; justify-content: center; min-height: 2.48rem; padding: .36rem .92rem; border-radius: .22rem; background: var(--accent); color: #161f25; font-size: .92rem; font-weight: 700; text-decoration: none; }
.view-wiki:hover { background: #f7fbff; color: #121c24; }
.game-listing .view-wiki { margin-top: auto; }

.breadcrumb { padding-block: 1.24rem 1rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .25rem .47rem; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .86rem; }
.breadcrumb li + li::before { content: "/"; padding-right: .47rem; color: var(--muted); }

.wiki-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr) 11rem; gap: clamp(.9rem, 2.1vw, 2rem); align-items: start; }
.wiki-layout.compact { grid-template-columns: 13rem minmax(0, 1fr); }
.wiki-nav { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; padding: .68rem .55rem .65rem; border: 1px solid var(--line); border-radius: .25rem; background: var(--surface); }
.wiki-nav summary { display: none; }
.wiki-nav-title, .wiki-nav li a { display: block; padding: .21rem .42rem; border-left: 2px solid transparent; text-decoration: none; }
.wiki-nav-title { line-height: 1.35; font-size: .94rem; font-weight: 700; }
.wiki-nav h2 { margin: .77rem 0 .15rem .42rem; color: var(--accent); font-size: .79rem; font-weight: 700; }
.wiki-nav ul, .page-toc ul, .inline-toc ul, .game-index ul { margin: 0; padding: 0; list-style: none; }
.wiki-nav li a { font-size: .86rem; line-height: 1.4; }
.wiki-nav a:hover { text-decoration: underline; }
.wiki-nav a[aria-current] { border-left-color: var(--blue); background: var(--selected); color: var(--blue-hover); font-weight: 700; }

.article { min-width: 0; display: flow-root; padding: clamp(1rem, 2.8vw, 2.35rem); border: 1px solid var(--line); border-radius: .25rem; background: var(--paper); }
.article h2 { margin: 0; font: 700 1.78rem/1.1 var(--display); }
.item-type { display: block; margin-bottom: .4rem; color: var(--accent); font-size: .88rem; font-weight: 650; }
.item-overview { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); align-items: start; gap: 1.2rem; margin-top: 1.3rem; }
.item-art { display: grid; align-content: center; justify-items: center; min-height: 12rem; margin: 0; padding: .8rem; border: 1px solid var(--line); border-radius: .25rem; background: #596773; }
.item-icon { width: 100%; max-height: 12.75rem; object-fit: contain; }
.item-art figcaption { margin-top: .55rem; color: #fff; font-size: .82rem; text-align: center; }
.item-art figcaption a { color: #fff; }
.item-art:has(.item-no-art) { background: var(--surface); }
.item-no-art { margin: 0; color: var(--muted); text-align: center; }
.item-facts h2 { margin-bottom: .52rem; }
.item-facts > p { margin: 0; color: var(--muted); }
.item-facts dl { margin: 0; border: 1px solid var(--line); }
.item-facts dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr); gap: .49rem; padding: .52rem .68rem; }
.item-facts dl > div + div { border-top: 1px solid var(--line); }
.item-facts dl > div:nth-child(odd) { background: var(--surface); }
.item-facts dt { color: var(--muted); font-size: .86rem; }
.item-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; font-size: .9rem; }
.item-page .table-scroll th:last-child { min-width: 5rem; }
.prose, .table-section, .game-index section { margin-top: 1.62rem; }
.prose h2, .game-index h2, .table-section h2 { padding-bottom: .32rem; border-bottom: 1px solid var(--line); }
.prose p { max-width: 76ch; margin: .6rem 0 0; }
.guide-figures { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .85rem; }
.guide-figure { flex: 1 1 8rem; margin: 0; padding: .75rem; min-width: 0; border: 1px solid var(--line); border-radius: .25rem; background: var(--surface); text-align: center; }
.guide-figure img { width: 100%; height: 5.75rem; object-fit: contain; }
.guide-figure-label { display: block; margin-top: .35rem; font-size: .9rem; font-weight: 650; }
.guide-figure figcaption { margin-top: .3rem; color: var(--muted); font-size: .82rem; }
.guide-figure a { display: block; text-decoration: none; }
.guide-figure a:where(:hover, :focus-visible) .guide-figure-label { text-decoration: underline; }
.guide-scene { flex-basis: 100%; padding: 0; overflow: hidden; text-align: left; }
.guide-scene img { height: auto; }
.guide-scene figcaption { margin: 0; padding: .46rem .7rem; }
.page-toc { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.page-toc h2 { margin: .16rem 0 .5rem; color: var(--muted); font-size: .86rem; }
.page-toc ul { border-left: 1px solid var(--line); padding-left: .74rem; }
.page-toc li, .inline-toc li { padding-block: .2rem; font-size: .84rem; line-height: 1.35; }
.page-toc li a { text-decoration: none; }
.page-toc li a:hover { text-decoration: underline; }
.inline-toc { display: none; }
.reference-note { padding: .65rem .8rem; border-left: 3px solid var(--line); background: var(--canvas); color: var(--muted); font-size: .91rem; }
.table-note { margin: .55rem 0 0; color: var(--muted); font-size: .91rem; }

.game-banner { position: relative; display: flex; align-items: end; min-height: 14rem; overflow: hidden; padding: 1.55rem; border: 1px solid var(--line); border-bottom: 3px solid var(--accent); border-radius: .24rem; isolation: isolate; background: var(--surface); }
.game-banner img { position: absolute; z-index: -2; right: 0; top: 0; width: 67%; height: 100%; object-fit: cover; }
.game-banner::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, var(--surface) 32%, #192228a8 63%, #19222835 100%); }
.game-banner h1 { max-width: 13ch; }
.game-banner p { max-width: 40ch; margin: .56rem 0 .68rem; }
.game-banner-copy > div { display: flex; flex-wrap: wrap; align-items: center; gap: .48rem .75rem; }
.game-banner-copy span { color: #e1e8ed; font-size: .84rem; }
.game-index { display: grid; gap: 0 1.35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game-index section { align-self: start; }
.game-index li { margin-top: .55rem; }
.game-index li > a { font-weight: 600; }
.game-index li > span { display: block; margin-top: .03rem; color: var(--muted); font-size: .92rem; }

.table-tools { display: flex; gap: .5rem .68rem; flex-wrap: wrap; align-items: center; margin-top: .75rem; color: var(--muted); font-size: .86rem; }
.table-tools label { color: var(--ink); font-weight: 600; }
.table-tools input, .search-form input, .search-form select { min-height: 2.3rem; padding: .37rem .53rem; border: 1px solid #6c7a84; border-radius: .22rem; background-color: var(--paper); color: var(--ink); }
.table-tools input { min-width: 8rem; width: min(100%, 18rem); }
.table-scroll { max-width: 100%; margin-top: .65rem; overflow: auto; border: 1px solid var(--line); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: .86rem; line-height: 1.4; }
.table-scroll th, .table-scroll td { padding: .5rem .62rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-scroll th { background: var(--selected); color: var(--ink); font-weight: 700; }
.table-scroll td:first-child { font-weight: 600; }
.table-scroll a { font-weight: 600; }
.table-scroll tr:nth-child(even) { background: var(--surface); }
.table-scroll tr:target { background: #453b24; outline: 1px solid #f0ca82; outline-offset: -1px; }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll :is(th, td):last-child { border-right: 0; }
.wiki-icon-label { display: inline-flex; align-items: center; gap: .42rem; margin-block: .02rem; vertical-align: middle; }
.wiki-icon-label img { flex: none; display: block; object-fit: contain; width: 2rem; height: 2rem; }
.wiki-icon-label.compact-icon img { width: 1.19rem; height: 1.19rem; }
.page-heading .wiki-icon-label img { width: 2.5rem; height: 2.5rem; }
.wiki-upgrade-list { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .85rem; margin: 0; padding: 0; list-style: none; }
.table-scroll td:has(.wiki-icon-label) { vertical-align: middle; }

.code-list { display: flex; flex-wrap: wrap; gap: .38rem; margin: .68rem 0 0; padding: 0; list-style: none; }
.code-list button { min-height: 2.05rem; padding: .19rem .46rem; border: 1px solid #6c7a84; border-radius: .17rem; background: var(--canvas); color: var(--blue-hover); }
.code-list button:hover { background: var(--selected); }
.code-status { margin: .48rem 0 0; color: var(--muted); font-size: .88rem; }
.related, .sources { margin-top: 1.6rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.related h2, .sources h2 { margin-bottom: .4rem; font-size: 1.29rem; }
.sources ul { margin: .25rem 0 0; padding-left: 1.2rem; font-size: .89rem; }
.site-footer { display: flex; justify-content: space-between; gap: .7rem 1.1rem; margin-top: 2rem; padding-block: 1.12rem 1.48rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }

#wiki-search { width: min(calc(100% - 2rem), 42rem); max-height: calc(100dvh - 4rem); margin: min(8vh, 4rem) auto auto; padding: 1rem 1.3rem 1.3rem; border: 1px solid #6c7a84; border-radius: .35rem; background: var(--paper); color: var(--ink); box-shadow: 0 15px 55px #14182155; }
#wiki-search::backdrop { background: #11182580; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.dialog-head h2 { margin: 0; font: 700 1.8rem var(--display); }
.icon-button { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; padding: 0; border: 1px solid var(--line); border-radius: .18rem; background: var(--canvas); color: var(--ink); }
.icon-button:hover { background: var(--selected); }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.search-form :is(input, select):focus { outline: 1px solid var(--muted); outline-offset: -1px; }
.search-form select { min-width: 8rem; appearance: none; padding-right: 1.8rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23aebac3' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right .5rem center; background-repeat: no-repeat; }
#search-status { min-height: 1.4rem; margin: .55rem 0 .32rem; color: var(--muted); font-size: .86rem; }
.search-results { margin: 0; padding: 0; list-style: none; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-results a { display: grid; gap: .02rem; padding: .44rem .3rem; text-decoration: none; }
.search-results a.has-result-icon { grid-template-columns: 2.25rem minmax(0, 1fr); column-gap: .6rem; align-items: start; }
.search-results a.has-result-icon > :not(img) { grid-column: 2; }
.search-results a.has-result-icon > img { grid-column: 1; grid-row: 1 / span 3; align-self: center; width: 2.25rem; height: 2.25rem; object-fit: contain; }
.search-results a:hover, .search-results a:focus-visible { background: var(--selected); }
.search-results small, .search-results p { margin: 0; color: var(--muted); font-size: .81rem; }

@media (max-width: 70rem) {
  .wiki-layout { grid-template-columns: 11.1rem minmax(0, 1fr); }
  .wiki-layout.compact { grid-template-columns: 11.1rem minmax(0, 1fr); }
  .page-toc { display: none; }
  .inline-toc { display: block; width: fit-content; max-width: 100%; margin-top: 1rem; padding: .3rem .62rem; border: 1px solid var(--line); background: var(--canvas); }
  .inline-toc summary { cursor: pointer; color: var(--muted); font-size: .89rem; font-weight: 600; }
  .inline-toc ul { padding: .3rem 0 .3rem .7rem; }
}

@media (max-width: 48rem) {
  .frame { width: calc(100% - 1.5rem); }
  .masthead-content { min-height: 4.2rem; }
  .brand { gap: .52rem; }
  .brand img { width: 5.7rem; }
  .brand span { padding-left: .55rem; font-size: .82rem; }
  .search-launch { width: 2.45rem; justify-content: center; padding: 0; }
  .search-launch span, .search-launch kbd { display: none; }
  .nav-content { gap: .36rem; }
  .nav-content a { padding-inline: .38rem; font-size: .84rem; }
  .home-page { margin-top: 1rem; }
  .game-select { grid-template-columns: minmax(0, 1fr); gap: .84rem; }
  .listing-text { padding-inline: .85rem; }
  .wiki-layout, .wiki-layout.compact { display: block; }
  .wiki-nav { position: static; max-height: none; margin-bottom: .65rem; padding: .35rem .6rem; border: 1px solid var(--line); background: var(--paper); }
  .wiki-nav summary { display: list-item; cursor: pointer; color: var(--blue); font-size: .9rem; font-weight: 600; }
  .wiki-nav nav { padding: .5rem 0 .12rem; }
  .game-banner { min-height: 15rem; padding: .9rem; }
  .game-banner img { width: 100%; }
  .game-banner::after { background: linear-gradient(0deg, #192228 8%, #192228ca 50%, #19222830 100%); }
  .game-index { grid-template-columns: minmax(0, 1fr); }
  .article { padding-inline: .86rem; }
  .table-scroll table { width: max-content; min-width: 100%; }
  .table-scroll :is(th, td) { max-width: 17rem; }
}

@media (max-width: 26rem) {
  .search-form { grid-template-columns: minmax(0, 1fr); }
  .equipment-heading > img { width: 3.75rem; height: 3.75rem; }
  .location-heading { grid-template-columns: minmax(0, 1fr); }
  .location-heading figure { width: min(100%, 13rem); }
  .item-overview { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .item-art { width: 100%; min-height: 9.5rem; }
  .item-icon { width: min(100%, 10.5rem); max-height: 10.5rem; }
}
