/* Wild Water World Wiki. Everything follows the game's cartoon UI: indigo ink outlines (#262a6b) round every panel, button and icon,
   lavender-white panels (#eef0ff) with a solid drop edge under them, royal-blue title bars (#4d6bf2) with white outlined type,
   yellow buttons (#ffc83d) for the thing you are on, and the item-quality tiles behind every icon.
   Light theme: the pool-water panel art behind the page. Dark theme: the sunken ship (map_wreck), navy panels.
   The hero card, the home banner and the title bars look the same in both: they sit on game art. */
:root {
  --line: #262a6b; --blue: #4d6bf2; --blue-hi: #6f8cff; --blue-d: #3046c9; --yellow: #ffc83d; --yellow-hi: #ffe27e; --yellow-d: #e39a12;
  --paper: #eef0ff; --paper-2: #dfe3fd; --cell: #fff; --ink: #1e2150; --ink-2: #565c8c; --rule: #c6cbf0;
  --link: #2f4fd8; --mark: #3046c9; --hl: #fff3c4;
  --bg: #9fe0ec; --bg-art: linear-gradient(rgba(240, 250, 255, .35), rgba(240, 250, 255, .35)), url(img/site/water.webp) center top / 322px auto repeat;  /* half its pixel width: 1:1 on 2x screens */
  --top-bg: rgba(206, 240, 248, .94); --side-bg: rgba(238, 240, 255, .93);
  --theme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5z'/%3E%3C/svg%3E");
  --measure: 64ch;  /* ~75 letters a line: Nunito's "0" (what ch measures) is wider than its average letter */
  --sw: 240px; --main-max: 1200px; --display: "Lilita One", "Nunito", system-ui, sans-serif;
  --r: 18px;  /* panel corner */
  --outline: -2px -2px 0 var(--line), 2px -2px 0 var(--line), -2px 2px 0 var(--line), 2px 2px 0 var(--line), 0 -2px 0 var(--line), 0 2px 0 var(--line), -2px 0 0 var(--line), 2px 0 0 var(--line);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --line: #0b0d33; --paper: #1d2258; --paper-2: #283070; --cell: #171b4a; --ink: #eef0ff; --ink-2: #aab2e6; --rule: #353c86;
    --link: #a9bcff; --mark: #ffd25e; --hl: #3b356f;
    --bg: #0b1640; --bg-art: linear-gradient(rgba(8, 14, 48, .55), rgba(8, 14, 48, .88) 75%) fixed, #0b1640 url(img/site/deep.webp) center top / cover no-repeat fixed;
    --top-bg: rgba(11, 22, 64, .94); --side-bg: rgba(23, 27, 74, .9); color-scheme: dark;
    --theme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5' fill='%23000'/%3E%3Cpath d='M12 1.5v2.5M12 20v2.5M1.5 12H4M20 12h2.5M4.6 4.6l1.8 1.8M17.6 17.6l1.8 1.8M4.6 19.4l1.8-1.8M17.6 6.4l1.8-1.8'/%3E%3C/svg%3E"); }
}
:root[data-theme="dark"] { --line: #0b0d33; --paper: #1d2258; --paper-2: #283070; --cell: #171b4a; --ink: #eef0ff; --ink-2: #aab2e6; --rule: #353c86;
  --link: #a9bcff; --mark: #ffd25e; --hl: #3b356f;
  --bg: #0b1640; --bg-art: linear-gradient(rgba(8, 14, 48, .55), rgba(8, 14, 48, .88) 75%) fixed, #0b1640 url(img/site/deep.webp) center top / cover no-repeat fixed;
  --top-bg: rgba(11, 22, 64, .94); --side-bg: rgba(23, 27, 74, .9); color-scheme: dark;
  --theme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5' fill='%23000'/%3E%3Cpath d='M12 1.5v2.5M12 20v2.5M1.5 12H4M20 12h2.5M4.6 4.6l1.8 1.8M17.6 17.6l1.8 1.8M4.6 19.4l1.8-1.8M17.6 6.4l1.8-1.8'/%3E%3C/svg%3E"); }

* { box-sizing: border-box; }
html { background: var(--bg-art); background-color: var(--bg); }
body {  /* centred on screens wider than sidebar + page; the water art fills the window behind it */
  max-width: calc(var(--sw) + var(--main-max)); margin: 0 auto; min-height: 100vh; color: var(--ink); font: 16px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  display: grid; grid-template-columns: var(--sw) minmax(0, 1fr); grid-template-rows: auto 1fr auto;
  grid-template-areas: "top top" "side main" "side foot";
}
a { color: var(--link); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; letter-spacing: .01em; }
h3 { font-size: 19px; margin: 20px 0 8px; }
[id] { scroll-margin-top: calc(var(--top-h, 0px) + var(--dock-h, 0px) + 16px); }  /* app.js measures the sticky header and the Contents dock */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
img { max-width: 100%; height: auto; }
td img, th img, .chips img { max-width: none; }  /* a % max-width zeroes the cell's min-content width, so names overflow */
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--yellow); color: var(--line); border: 3px solid var(--line); border-radius: 10px; }
.skip:focus { top: 8px; }
.outlined, .tab, .banner h1 span, .ghost { color: #fff; text-shadow: var(--outline), 0 4px 0 var(--line); }

/* section heading: the starfish from the EXP screen, a yellow bar running into the rule */
h2 { position: relative; display: flow-root; margin: 40px 0 14px; /* flow-root: the box (and its rule) stops beside a floated infobox */ padding: 0 0 8px 36px; font-size: 26px;
  background: linear-gradient(var(--yellow), var(--yellow)) left bottom / 76px 4px no-repeat, linear-gradient(var(--rule), var(--rule)) left bottom / 100% 2px no-repeat; }
h2::before { content: ""; position: absolute; left: 0; top: .05em; width: 28px; height: 28px; background: url(img/site/star.webp) center / contain no-repeat; }

/* ---- header ---- */
.top { grid-area: top; display: flex; align-items: center; gap: 16px; padding: 12px 32px 10px 0; }
.logo { flex: none; width: var(--sw); display: flex; align-items: flex-end; gap: 4px; padding-left: 18px; }
.logo img { height: 62px; width: auto; filter: drop-shadow(0 3px 0 rgba(38, 42, 107, .35)); }
.logo span { font: 24px/1 var(--display); padding-bottom: 8px; color: var(--yellow); text-shadow: var(--outline), 0 3px 0 var(--line); }
.logo:hover { text-decoration: none; }
.menu { display: none; }
.theme { flex: none; width: 44px; height: 44px; margin-left: auto; padding: 0; cursor: pointer;
  border: 3px solid var(--line); border-radius: 12px; background: linear-gradient(var(--yellow-hi), var(--yellow) 55%, var(--yellow-d)); box-shadow: 0 3px 0 var(--line); }
.theme::before { content: ""; display: block; width: 20px; height: 20px; margin: auto; background: var(--line);  /* moon in light, sun in dark */
  -webkit-mask: var(--theme-icon) center / contain no-repeat; mask: var(--theme-icon) center / contain no-repeat; }
.theme:hover, .menu:hover { filter: brightness(1.06); }
.theme:active, .menu:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.search { position: relative; flex: 1; max-width: 560px; }
/* language menu: a blue game button with a globe, the languages drop down under it */
.langs { position: relative; flex: none; margin-left: auto; }
.langs + .theme { margin-left: 0; }
.langs summary { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; cursor: pointer; list-style: none; color: #fff; font-weight: 800; white-space: nowrap;
  border: 3px solid var(--line); border-radius: 12px; background: linear-gradient(var(--blue-hi), var(--blue) 55%, var(--blue-d)); box-shadow: 0 3px 0 var(--line); text-shadow: 0 1px 0 var(--line); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::before { content: ""; width: 20px; height: 20px; background: #fff;
  -webkit-mask: var(--globe) center / contain no-repeat; mask: var(--globe) center / contain no-repeat; }
.langs summary:hover { filter: brightness(1.06); }
.langs ul { position: absolute; z-index: 40; right: 0; top: calc(100% + 8px); min-width: 150px; margin: 0; padding: 6px; list-style: none;
  border: 3px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 4px 0 var(--line), 0 12px 28px rgba(0, 0, 0, .25); }
.langs li a { display: block; padding: 7px 12px; border-radius: 9px; color: var(--ink); }
.langs li a:hover { background: var(--paper-2); text-decoration: none; }
.langs li a[aria-current] { background: linear-gradient(var(--yellow-hi), var(--yellow)); color: var(--line); }
:root { --globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c3 3.2 3 15.8 0 19M12 2.5c-3 3.2-3 15.8 0 19'/%3E%3C/svg%3E"); }
/* Chinese, Japanese, Korean pages: Lilita One and Nunito have no such letters. Headings take a heavy webfont of the language
   (build_site.py loads it), body text the system's own font for it; Latin letters keep the site fonts */
:root:lang(zh-Hant) { --display: "Lilita One", "Noto Sans TC", system-ui, sans-serif; }
:root:lang(ja) { --display: "Lilita One", "M PLUS Rounded 1c", system-ui, sans-serif; }
:root:lang(ko) { --display: "Lilita One", "Jua", system-ui, sans-serif; }
:lang(zh-Hant) body { font-family: "Nunito", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
:lang(ja) body { font-family: "Nunito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; }
:lang(ko) body { font-family: "Nunito", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; word-break: keep-all; }
.search input {
  width: 100%; padding: 10px 16px 10px 44px; font: 600 16px "Nunito", sans-serif; color: #1e2150; border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262a6b' stroke-width='2.8'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") 15px center / 18px no-repeat;
}
.search input::placeholder { color: #7a80ae; }
.search input:focus { outline: none; border-color: var(--blue); }
@media (hover: hover) and (pointer: fine) and (min-width: 701px) {  /* the / key focuses search (app.js) */
  .search::after { content: "/"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 22px; height: 24px;
    font: 800 14px/1 "Nunito", sans-serif; color: #565c8c; border: 2px solid #c6cbf0; border-radius: 6px; box-shadow: 0 2px 0 #c6cbf0; pointer-events: none; }
  .search:focus-within::after, .search:has(input:not(:placeholder-shown))::after { display: none; }
}
#hits { position: absolute; z-index: 40; left: 0; right: 0; margin: 8px 0 0; padding: 4px; list-style: none; background: var(--paper); border: 3px solid var(--line); border-radius: 14px;
  box-shadow: 0 5px 0 var(--line), 0 16px 32px rgba(0, 0, 0, .3); max-height: 70vh; overflow-y: auto; }
#hits:empty, .search:not(:focus-within) #hits { display: none; }
#hits a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: var(--ink); border-radius: 10px; }
#hits a:hover, #hits a:focus { background: var(--hl); text-decoration: none; outline: none; }
#hits small { margin-left: auto; padding-left: 8px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
#hits img { width: 32px; height: 32px; object-fit: contain; }

/* ---- sidebar: a panel of the game's main-menu buttons ---- */
.side { grid-area: side; position: sticky; top: 8px; align-self: start; max-height: calc(100vh - var(--side-y, 8px) - 8px); overflow-y: auto; margin: 4px 0 24px 14px; padding: 6px 10px 14px;
  background: var(--side-bg); border: 3px solid var(--line); border-radius: var(--r); box-shadow: 0 5px 0 var(--line); scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.side p { margin: 14px 0 4px 6px; font: 15px/1.4 var(--display); color: var(--mark); letter-spacing: .03em; text-transform: uppercase; }
.side ul { margin: 0; padding: 0; list-style: none; }
.side a { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 6px; color: var(--ink); font-size: 15px; font-weight: 700; border: 2px solid transparent; border-radius: 12px; }
.side img { flex: none; width: 28px; height: 28px; object-fit: contain; }
.side a:hover { background: var(--paper-2); text-decoration: none; }
.side a[aria-current] { color: var(--mark); }
.side a[aria-current="true"] { background: var(--hl); border-color: var(--line); }  /* a page inside this section: the pale version of the yellow button */
.side-x { display: none; }  /* the drawer's close button (app.js), below 1000px */
.side a[aria-current="page"] { color: #3a2a00; background: linear-gradient(var(--yellow-hi), var(--yellow) 55%, var(--yellow-d)); border-color: var(--line); box-shadow: 0 3px 0 var(--line); }

/* ---- content ---- */
main { grid-area: main; min-width: 0; max-width: var(--main-max); padding: 4px 32px 24px 24px; }
.crumbs { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.crumbs a { color: var(--link); }
footer { grid-area: foot; max-width: var(--main-max); padding: 8px 32px 32px 24px; color: var(--ink); font-size: 13px; }
.sheet p, .sheet :is(ul, ol):not([class]) { max-width: var(--measure); }  /* running text stays readable however wide the sheet gets */
footer p { max-width: 90ch; margin: 0 0 6px; }

/* page title: the blue title bar of a game popup, the sheet hangs under it. List pages put their section's story art behind it */
.tab { position: relative; margin: 0; padding: 14px 28px 16px; font-size: clamp(30px, 4vw, 46px); line-height: 1.05;
  background: linear-gradient(var(--blue-hi), var(--blue) 45%, var(--blue-d)); border: 3px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; overflow-wrap: anywhere; }
h2.tab { background-size: auto; }
h2.tab::before { content: none; }
.tab.strip { z-index: 1; display: flex; align-items: flex-end; min-height: 176px; padding-right: 380px; }
/* the art is 720 px wide phone art: shown as a comic panel at 330 css px (sharp on 2x screens), not stretched across the bar */
.tab .art { position: absolute; right: 26px; top: -12px; width: 330px; height: auto; border: 4px solid #fff; border-radius: 10px; outline: 3px solid var(--line);
  box-shadow: 0 6px 0 rgba(11, 13, 51, .45); transform: rotate(2.5deg); }
.sheet { display: flow-root; background: var(--paper); padding: 26px 32px 36px; border: 3px solid var(--line); border-radius: 0 0 var(--r) var(--r); box-shadow: 0 6px 0 var(--line); }
.tab + .sheet { border-top-width: 3px; }
.sheet > :first-child, .entity > :first-child { margin-top: 0; }
.lead { color: var(--ink-2); max-width: var(--measure); font-weight: 600; }

/* ---- tables: blue header bar, inked frame ---- */
.scroll { overflow-x: auto; margin: 0 0 16px; border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 4px 0 var(--line);
  background:  /* edge shadows show only while there is more table to scroll to */
    linear-gradient(to right, var(--cell) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--cell) 30%, transparent) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .28), transparent) left / 14px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .28), transparent) right / 14px 100% no-repeat, var(--cell); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; }  /* separate: a sticky header keeps its rounded corners */
th, td { padding: 7px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
td + td, th + td, td + th, th + th { border-left: 1px solid var(--rule); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { background: var(--blue); color: #fff; border-color: var(--blue-d); border-bottom: 3px solid var(--line); font: 15px/1.3 var(--display); letter-spacing: .02em; white-space: nowrap;
  text-shadow: 0 2px 0 var(--line); }
tbody th { font-weight: 800; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
tbody tr:hover { background: var(--hl); }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
th button::after { content: "↕" / ""; margin-left: 6px; opacity: .6; }
th[aria-sort="ascending"] button::after { content: "▲" / ""; opacity: 1; color: var(--yellow); }
th[aria-sort="descending"] button::after { content: "▼" / ""; opacity: 1; color: var(--yellow); }
.list .nm { display: inline-flex; align-items: center; vertical-align: middle; }  /* a long name wraps beside its icon, not under it, before the other columns squeeze to a word a line */
.list .nm img { flex: none; }
.list td, .list th { vertical-align: middle; }
.list .who img, .chips img { width: 40px; height: 40px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.list tr:target { background: var(--hl); box-shadow: inset 5px 0 var(--yellow); }
/* a table that fits its box (app.js .fits) drops the scroll box, so the header row sticks under the header and the Contents dock */
.scroll.fits { overflow: visible; background: var(--cell); }
.fits thead th { position: sticky; top: calc(var(--top-h, 0px) + var(--dock-h, 0px)); z-index: 2; }
.fits thead th:first-child { border-top-left-radius: 11px; } .fits thead th:last-child { border-top-right-radius: 11px; }
.fits tbody tr:last-child > :first-child { border-bottom-left-radius: 11px; } .fits tbody tr:last-child > :last-child { border-bottom-right-radius: 11px; }
/* the game's item-quality tiles (bg_icon_1..6) behind an icon */
img.q { padding: 3px; background: center / 100% 100% no-repeat; border-radius: 6px; }
.q1 { --qt: url(img/site/q1.webp); } .q2 { --qt: url(img/site/q2.webp); } .q3 { --qt: url(img/site/q3.webp); }
.q4 { --qt: url(img/site/q4.webp); } .q5 { --qt: url(img/site/q5.webp); } .q6 { --qt: url(img/site/q6.webp); }
img.q { background-image: var(--qt); }
/* reward icons: the game's item art in front of a reward name (ri.css, generated, places each one on the img/ri.webp sheet).
   In tables they stand alone with the count, like the game's reward rows; tap or hover for the name */
.ic { display: inline-block; width: 1.4em; height: 1.4em; margin-right: .2em; vertical-align: -.38em; background-repeat: no-repeat; }
td .ri[title] { cursor: help; }
td .ri { display: inline-flex; align-items: center; gap: 2px; margin: 1px 10px 1px 0; white-space: nowrap; font-weight: 700; position: relative; }  /* relative: keeps the hidden name inside the table's scroll box */
td:has(> .ri)::before { content: ""; display: block; width: 13em; }  /* several icons to a line on phones, not one each (cells ignore min-width) */
td .ri:last-child { margin-right: 0; }
td .ic { width: 28px; height: 28px; margin: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic { filter: drop-shadow(0 0 1.5px rgba(238, 240, 255, .75)); } }  /* dark-inked icons (steel, wire) vanish on navy */
:root[data-theme="dark"] .ic { filter: drop-shadow(0 0 1.5px rgba(238, 240, 255, .75)); }
.ri-tip { position: absolute; z-index: 40; padding: 3px 10px; border: 2px solid var(--line); border-radius: 8px; background: var(--yellow-hi); color: var(--line);
  font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 0 var(--line); pointer-events: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* rarity: a little game button in the rarity colour */
.tier { display: inline-block; padding: 1px 10px 2px; border: 2px solid var(--line); border-radius: 8px; font: 13px/1.4 var(--display); letter-spacing: .03em; color: #fff; background: var(--c); white-space: nowrap;
  text-shadow: -1px -1px 0 var(--line), 1px -1px 0 var(--line), -1px 1px 0 var(--line), 1px 1px 0 var(--line), 0 2px 0 var(--line); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 2px 0 var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: end; margin: 16px 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.filters label { display: grid; gap: 2px; max-width: 100%; min-width: 0; }
.filters input, .filters select { font: 600 15px "Nunito", sans-serif; max-width: 100%; padding: 6px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--cell); color: var(--ink); }
.filters input { width: 260px; }
.count { margin-left: auto; font: 17px var(--display); color: var(--mark); }

/* ---- entity blocks on shared pages: infobox on the right ---- */
.entity { display: flow-root; }
.entity[id] { margin-top: 40px; padding-top: 4px; }
.entity[id] > h2 { font-size: 28px; }
.entity[id]:target > h2 { color: var(--mark); }
.infobox { float: right; clear: right; width: 300px; margin: 0 0 16px 24px; background: var(--cell); border: 3px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 var(--line); }
.entity[id] .infobox { width: 260px; }
.ib-title { margin: 0; padding: 8px 12px; background: var(--blue); color: #fff; font: 20px/1.3 var(--display); text-align: center; text-shadow: 0 2px 0 var(--line); }
.infobox figure { position: relative; margin: 0; background: radial-gradient(ellipse at 50% 35%, #6f8cff, #3046c9 75%); text-align: center; }
.infobox figure img { display: block; margin: 0 auto; max-height: 420px; width: auto; }
.infobox .sticker { position: absolute; top: 8px; right: 8px; width: 64px; height: 64px; }
.facts { display: grid; grid-template-columns: max-content 1fr; margin: 0; font-size: 15px; }
.facts > div { display: contents; }
.facts dt, .facts dd { margin: 0; padding: 5px 12px; border-top: 1px solid var(--rule); }
.facts dt { color: var(--ink-2); font-weight: 700; padding-right: 6px; }
.facts dd { overflow-wrap: anywhere; }

/* ---- own page with art: the game's hero screen (bg_hero_detail), name huge over the info column, rarity glow on the floor ---- */
.entity > .card { position: relative; display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); margin: -26px -32px 24px; overflow: hidden; color: #eef0ff;
  border-bottom: 3px solid var(--line); container-type: inline-size;
  background: radial-gradient(ellipse 60% 80% at 25% 100%, color-mix(in srgb, var(--c) 35%, transparent), transparent), linear-gradient(160deg, #4d6bf2, #2b3392 55%, #1d2264); }
.ghost { position: absolute; left: 380px; top: 10px; z-index: 0; white-space: nowrap; text-transform: uppercase;  /* sized so the whole name (--n letters) fits beside the art */
  font: clamp(32px, calc((100cqw - 412px) / (var(--n) * .66)), 150px)/1 var(--display);
  color: transparent; text-shadow: none; -webkit-text-stroke: 3px color-mix(in srgb, var(--c) 60%, #fff); opacity: .35; pointer-events: none; }
.card figure { position: relative; z-index: 1; display: grid; align-items: end; justify-items: center; margin: 0; padding-top: 28px; min-height: 300px;
  background: radial-gradient(ellipse 45% 18% at 50% 96%, color-mix(in srgb, var(--c) 75%, transparent), transparent), url(img/site/stage.webp) center 30% / cover;  /* the hero screen's room, 720 px art in a 360 px column */
  border-right: 3px solid var(--line); }
.card figure img { display: block; max-height: 508px; width: auto; filter: drop-shadow(0 6px 0 rgba(11, 13, 51, .45));
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }  /* the card art is cut off at the waist: let it sink into the floor glow */  /* never upscaled: most heroes only have the 135x185 card */
.card .sticker { position: absolute; top: 22px; right: 18px; width: 76px; height: 76px; }
/* most heroes only have the 135x185 card art, never upscaled: it stands as a framed game card, propped on a rarity halftone card */
.card figure.small { align-items: center; padding: 36px 0; }
.card figure.small::before { content: ""; position: absolute; left: 50%; top: 50%; width: 176px; height: 226px; margin: -113px 0 0 -88px; rotate: 6deg;
  background: var(--c) var(--hb, none) center / 56px; border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 6px 0 rgba(11, 13, 51, .45); }
.card figure.small img { position: relative; rotate: -3deg; border: 5px solid #fff; border-radius: 10px; outline: 3px solid var(--line); box-shadow: 0 8px 0 rgba(11, 13, 51, .45);
  filter: none; -webkit-mask-image: none; mask-image: none; }
.card-info { position: relative; z-index: 1; align-self: end; padding: 120px 32px 32px 8px; }
.card .lead { margin: 0 0 18px; color: #fff; font-size: 17px; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.card .lead a { color: var(--yellow-hi); }
.card .facts { display: flex; flex-wrap: wrap; gap: 8px; }  /* rows always full: a long value (an Exclusive Weapon's name) gets a wider tile */
.card .facts > div { display: block; flex: 1 1 auto; min-width: 130px; padding: 8px 14px; background: rgba(18, 22, 74, .82); border: 2px solid #8ea0ff; border-radius: 12px; box-shadow: 0 3px 0 var(--line); }
.card .facts dt, .card .facts dd { padding: 0; border: 0; }
.card .facts dt { color: #b9c3ff; font-size: 13px; }
.card .facts dd { font: 20px/1.3 var(--display); color: #fff; letter-spacing: .02em; overflow-wrap: break-word; hyphens: auto; }
.card .facts a { color: var(--yellow-hi); }

/* Contents: a row of round tab buttons */
.toc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.toc h2 { margin: 0 8px 0 0; padding: 0 0 0 30px; background: none; font-size: 17px; color: var(--ink-2); }
.toc h2::before { width: 22px; height: 22px; }
.toc ol { display: contents; }
.toc li { list-style: none; }
.toc a { display: block; padding: 3px 14px; font-size: 14px; color: var(--ink); background: var(--cell); border: 2px solid var(--line); border-radius: 999px; box-shadow: 0 2px 0 var(--line); }
.toc a:hover, .dock ol a:hover { background: var(--hl); text-decoration: none; }
/* the section you are reading: the yellow button, as the sidebar marks the current page. The last stop jumps to the navbox of sibling pages */
.toc a[aria-current], .dock ol a[aria-current] { color: #3a2a00; background: linear-gradient(var(--yellow-hi), var(--yellow) 55%, var(--yellow-d)); }
.toc .more a, .dock .more a { color: #fff; background: var(--blue); text-shadow: 0 1px 0 var(--line); }
.toc .more a:hover, .dock .more a:hover { background: var(--blue-hi); }
/* Contents dock (app.js): the Contents row as a toolbar hanging from the top edge of the window once the row itself has scrolled away */
.dock { position: sticky; top: var(--top-h, 0px); z-index: 15; height: 0; }
.dock > div { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; background: var(--paper); border: 3px solid var(--line); border-top: 0;
  border-radius: 0 0 16px 16px; box-shadow: 0 4px 0 var(--line), 0 10px 24px rgba(11, 13, 51, .25);
  visibility: hidden; transform: translateY(-110%); transition: transform .18s ease-out, visibility 0s .18s; }
.docked .dock > div { visibility: visible; transform: none; transition: transform .18s ease-out; }
.dock ol { position: relative; display: flex; flex: 1; min-width: 0; gap: 6px; margin: 0; padding: 2px 14px 5px 4px; list-style: none; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.dock ol::-webkit-scrollbar { display: none; }
.dock li { flex: none; }
.dock ol a { display: block; padding: 3px 14px; font-size: 14px; white-space: nowrap; color: var(--ink); background: var(--cell); border: 2px solid var(--line); border-radius: 999px; box-shadow: 0 2px 0 var(--line); }
.dock-top { flex: none; display: grid; place-items: center; width: 34px; height: 34px; background: linear-gradient(var(--blue-hi), var(--blue) 55%, var(--blue-d)); border: 2px solid var(--line); border-radius: 50%; box-shadow: 0 2px 0 var(--line); }
.dock-top::before { content: ""; width: 16px; height: 16px; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.dock-top:hover { filter: brightness(1.08); }
.dock-h { display: none; }
/* wide screens: rail.css (linked from 1300 px, 1600 px on list pages) turns the dock into a Contents panel beside the sheet */
/* section link (app.js): a # after a section heading, shown on hover */
.anchor { margin-left: 10px; font: 800 .7em "Nunito", sans-serif; color: var(--ink-2); opacity: 0; transition: opacity .12s; }
h2:hover > .anchor, .anchor:focus-visible { opacity: 1; text-decoration: none; }
@media (hover: none) { .anchor { display: none; } }

/* skills: cards side by side, cooldowns as pills, the max-level text under the Lv. 1 text */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; gap: 16px; margin: 36px 0 0; }
.skill { padding: 16px 20px; background: var(--cell); border: 3px solid var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--line); }
.skills .skill h2 { margin: 0 0 8px; padding: 0; background: none; font-size: 22px; }
.skills .skill h2::before { display: none; }
.cd { display: flex; flex-wrap: wrap; gap: 6px; }
.cd span { padding: 1px 12px; font-size: 13px; font-weight: 800; color: #fff; background: var(--blue); border: 2px solid var(--line); border-radius: 999px; }
.entity .skill p { max-width: none; }
.entity section > p { margin: 0 0 8px; max-width: var(--measure); }
.entity .max { margin-top: 12px; padding: 8px 12px; background: var(--hl); border: 2px dashed color-mix(in srgb, var(--yellow-d) 60%, transparent); border-radius: 12px; }
.max b { display: inline-block; margin-right: 6px; padding: 0 10px; border: 2px solid var(--line); border-radius: 8px; font: 13px/1.5 var(--display); color: #3a2a00; background: var(--yellow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.chips a { display: flex; align-items: center; padding: 3px 16px 3px 3px; background: var(--cell); border: 2px solid var(--line); border-radius: 12px; box-shadow: 0 2px 0 var(--line); color: var(--ink); }
.chips a:hover { background: var(--hl); text-decoration: none; }
.chips img { width: 34px; height: 34px; margin-right: 8px; }

/* ---- navbox: siblings at the foot of a page ---- */
.navbox { clear: both; margin: 44px 0 0; background: var(--cell); border: 3px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 var(--line); font-size: 15px; }
.navbox summary { padding: 7px 12px; background: var(--blue); color: #fff; font: 19px/1.4 var(--display); text-align: center; cursor: pointer; text-shadow: 0 2px 0 var(--line); }
.navbox div { display: grid; grid-template-columns: 7em 1fr; border-top: 2px solid var(--line); }
.navbox div:only-of-type { grid-template-columns: 1fr; }
.navbox h3 { margin: 0; padding: 6px 12px; background: var(--paper-2); font-size: 15px; text-align: right; }
.navbox ul { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; padding: 6px 12px; list-style: none; }
.navbox strong { margin: 0 -8px; padding: 0 8px; color: #3a2a00; background: var(--yellow); border-radius: 8px; box-shadow: 0 0 0 2px var(--line); }  /* this page */

/* ---- home: logo over a strip of the game's story panels ---- */
.banner { position: relative; display: grid; align-items: center; min-height: 440px; margin: 0 0 40px; padding: 36px 40px; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, #6f8cff, #3046c9 60%, #23286e); border: 3px solid var(--line); border-radius: 24px; box-shadow: 0 6px 0 var(--line); isolation: isolate; }
.panels { position: absolute; z-index: -2; top: -30px; bottom: -30px; right: -40px; display: flex; gap: 14px; transform: rotate(6deg); }
.panels img { width: 176px; height: 100%; object-fit: cover; border: 4px solid #fff; border-radius: 10px; outline: 3px solid var(--line); box-shadow: 0 8px 0 rgba(11, 13, 51, .5);
  animation: rise .7s calc(var(--i) * 80ms) both cubic-bezier(.2, .8, .2, 1); }
.panels img:nth-child(even) { margin-top: 60px; }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(95deg, rgba(35, 40, 110, .97) 22%, rgba(35, 40, 110, .75) 46%, transparent 72%); }
@keyframes rise { from { opacity: 0; transform: translateY(50px); } }
.banner-text { max-width: 520px; }
.banner h1 { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; margin: 0 0 12px; font-size: 64px; line-height: 1; }
.banner h1 img { width: 300px; filter: drop-shadow(0 5px 0 rgba(11, 13, 51, .6)); }
.banner h1 span { color: var(--yellow); padding-bottom: 22px; }
.banner p { max-width: 46ch; margin: 0 0 6px; font-size: 18px; font-weight: 700; text-shadow: 0 2px 3px rgba(0, 0, 0, .4); }
.banner .ver { font-size: 14px; font-weight: 600; color: #c9d1ff; }

.portal-box { min-width: 0; }
.portal-box + .portal-box { margin-top: 40px; }
.portal-box .tab { font-size: clamp(24px, 3vw, 32px); }
.portal { padding-top: 14px; padding-bottom: 18px; }  /* one sheet, a row per sidebar group: label left, tiles right */
.portal section { display: grid; grid-template-columns: 150px minmax(0, 1fr); padding: 10px 0; border-top: 2px dashed var(--rule); }
.portal section:first-child { border-top: 0; }
.portal h3 { margin: 20px 0 0; font-size: 20px; color: var(--mark); }
.tiles, .roster { margin: 0; padding: 0; list-style: none; display: grid; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr)); gap: 10px; }
.tiles a { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px 10px 6px 6px; color: var(--ink);
  background: var(--cell); border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--line); transition: transform .12s; }
.tiles a:hover { background: var(--hl); text-decoration: none; transform: translateY(-2px); }
.tiles img { grid-row: span 2; width: 56px; height: 56px; object-fit: contain; }
.tiles b { font: 18px/1.15 var(--display); font-weight: 400; align-self: end; }
.tiles small { color: var(--ink-2); font-weight: 700; align-self: start; }
.tiles li { container-type: inline-size; }
@container (max-width: 160px) {  /* too narrow for a name beside the icon: the icon goes on top */
  .tiles li a { grid-template-columns: minmax(0, 1fr); justify-items: center; height: 100%; padding: 8px 6px; text-align: center; }
  .tiles img { grid-row: auto; }
  .tiles b { margin-top: 4px; font-size: 17px; }
}
/* roster: hero heads on the game's halftone rarity backdrops */
.roster { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
.roster a { display: grid; grid-template-rows: 124px auto auto; color: var(--ink); line-height: 1.2; text-decoration: none; }
.roster img, .roster span { width: 100%; height: 124px; object-fit: cover; object-position: 50% 10%; background: var(--c) var(--hb, none) center / cover;
  border: 3px solid var(--line); border-radius: 14px; box-shadow: 0 4px 0 var(--line); transition: transform .12s; }
:is(.roster, .card) .q3 { --hb: url(img/site/h-blue.webp); } :is(.roster, .card) .q4 { --hb: url(img/site/h-purple.webp); }
:is(.roster, .card) .q5 { --hb: url(img/site/h-orange.webp); } :is(.roster, .card) .q6 { --hb: url(img/site/h-red.webp); }
.roster span { display: grid; place-items: center; color: #fff; font: 48px/1 var(--display); }  /* no art in the game files */
.roster b { margin-top: 8px; font: 16px/1.2 var(--display); font-weight: 400; }
.roster small { color: var(--ink-2); font-size: 12px; font-weight: 700; }
.roster a:hover img { transform: translateY(-3px); }
.roster a:hover b { color: var(--mark); }

/* ---- tablet and phone: the sidebar becomes a drawer, header sticks ---- */
@media (max-width: 1000px) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "foot"; }
  .top { position: sticky; top: 0; z-index: 20; gap: 10px; padding: 8px 16px; background: var(--top-bg); backdrop-filter: blur(8px); border-bottom: 3px solid var(--line); }
  .menu { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; cursor: pointer;
    border: 3px solid var(--line); border-radius: 12px; background: linear-gradient(var(--blue-hi), var(--blue) 55%, var(--blue-d)); box-shadow: 0 3px 0 var(--line); }
  .menu span, .menu span::before, .menu span::after { display: block; width: 18px; height: 3px; border-radius: 2px; background: #fff; }
  .menu span { position: relative; }
  .menu span::before, .menu span::after { content: ""; position: absolute; left: 0; }
  .menu span::before { top: -6px; } .menu span::after { top: 6px; }
  .logo { width: auto; padding: 0; }
  .logo img { height: 42px; }
  .logo span { font-size: 18px; padding-bottom: 5px; }
  .langs summary { width: 44px; padding: 0; justify-content: center; font-size: 0; }  /* the globe only */
  .side { position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); max-height: none; margin: 0; padding-top: 16px; border-radius: 0 var(--r) var(--r) 0; border-left: 0;
    background: var(--paper); box-shadow: 8px 0 32px rgba(0, 0, 0, .4); transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .nav-open .side { transform: none; visibility: visible; transition: transform .2s; }
  .nav-open::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(11, 13, 51, .55); }
  :root:has(.nav-open) { overflow: hidden; }  /* the page behind the drawer stays put */
  .side-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
    border: 3px solid var(--line); border-radius: 12px; background: var(--cell); box-shadow: 0 3px 0 var(--line); }
  .side-x::before, .side-x::after { content: ""; grid-area: 1 / 1; width: 18px; height: 3px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
  .side-x::after { transform: rotate(-45deg); }
  .side-x:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
  /* reading down the page slides the header away, scrolling back up brings it back (app.js .top-hid); the Contents dock moves up with it */
  .top { transition: transform .2s ease-out; }
  .dock { transition: top .2s ease-out; }
  .top-hid .top { transform: translateY(-100%); }
  .top-hid .dock { top: 0; }
  .top-hid .fits thead th { top: var(--dock-h, 0px); }
  main { padding: 14px 16px 16px; }
  footer { padding: 8px 16px 24px; }
  :root { --top-h: 63px; }  /* app.js replaces it with the real height */
}
@media (max-width: 700px) {
  :root { --r: 14px; }
  h2 { font-size: 23px; }
  .tab { padding: 12px 16px 14px; }
  .tab.strip { display: block; min-height: 0; padding-right: 16px; }
  .tab .art { position: static; display: block; width: 100%; margin: 12px 0; transform: none; }
  .sheet { padding: 18px 14px 24px; }
  .infobox, .entity[id] .infobox { float: none; width: auto; margin: 0 0 16px; }
  .infobox figure img { max-height: 360px; }
  .entity > .card { grid-template-columns: minmax(0, 1fr); margin: -18px -14px 20px; }
  .card figure { border-right: 0; }
  .ghost { display: none; }  /* the art takes the full width above the info */
  .card figure img { max-height: 360px; }
  .card-info { padding: 4px 16px 20px; }
  .card .facts > div { min-width: 110px; }
  .skill { padding: 14px 16px; }
  .banner { min-height: 420px; padding: 24px 18px; align-items: end; }
  .banner::before { background: linear-gradient(transparent 25%, rgba(35, 40, 110, .92) 62%); }
  .panels { top: -20px; bottom: auto; height: 300px; right: -60px; gap: 10px; }
  .panels img { width: 120px; }
  .banner h1 { font-size: 44px; }
  .banner h1 img { width: 230px; }
  .banner h1 span { padding-bottom: 14px; }
  .banner p { font-size: 16px; }
  .count { margin-left: 0; }
  .filters input { width: 100%; }
  .filters label:first-child { flex: 1 1 100%; }
  .navbox div { grid-template-columns: 1fr; }
  .navbox h3 { text-align: left; }
  .portal section { grid-template-columns: minmax(0, 1fr); }
  .portal h3 { margin: 4px 0 8px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .tiles a { grid-template-columns: 44px 1fr; column-gap: 8px; }
  .tiles img { width: 44px; height: 44px; }
  .roster { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .roster a { grid-template-rows: 100px auto auto; }
  .roster img, .roster span { height: 100px; }
}
@media (max-width: 700px) { .search { position: static; } #hits { left: 8px; right: 8px; top: 100%; } }  /* results span the header */
@media (max-width: 420px) {
  .top { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .menu, .theme { width: 38px; height: 38px; }
  .logo img { height: 34px; }
  .logo span { display: none; }
  .search input { padding-left: 36px; background-position: 12px center; }
  main { padding-left: 10px; padding-right: 10px; }  /* every px of a 320-400 px screen goes to the text */
  footer { padding-left: 12px; padding-right: 12px; }
  .sheet { padding-left: 12px; padding-right: 12px; }
  .entity > .card { margin-left: -12px; margin-right: -12px; }
  .tab { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .side, .roster img, .tiles a, .dock > div, .top, .dock { transition: none !important; } .dock ol { scroll-behavior: auto; } .panels img { animation: none; } }

/* hand-written prose (prose/*.md): mechanics, guides and entity leads / notes */
.prose { max-width: 78ch; }
.prose .scroll { max-width: none; }
.prose li { margin: 4px 0; }
.prose li > strong:first-child { color: var(--ink); }
.prose details { margin: 16px 0; padding: 8px 14px; background: var(--paper-2); border: 2px solid var(--line); border-radius: 12px; }
.prose summary { cursor: pointer; font: 16px/1.4 var(--display); color: var(--mark); }
.prose h3 { margin-top: 26px; }
.lead.prose > p:first-child { margin-top: 0; }
.stale { padding: 8px 14px; background: var(--hl); border: 2px solid var(--yellow-d); border-radius: 12px; }
.articles { list-style: none; padding: 0; display: grid; gap: 12px; }
.articles li { margin: 0; padding: 12px 18px; background: var(--cell); border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--line); }
.articles a { font: 22px/1.3 var(--display); font-weight: 400; }
.articles p { margin: 4px 0 0; color: var(--ink-2); max-width: var(--measure); }
