/* The RO3 Database site's own styles, on top of the panel's app.css (its tokens: --gutter, --s1..--s6, --r1, --amber*,
   --line-soft...). Loaded as a file, not an inline <style>, so the Content-Security-Policy can be style-src 'self'. */

/* The static copy has no accounts: app.js fills these, so only !important keeps them hidden. */
#auth, #menu-auth { display: none !important; }

/* Pages */
.kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1080px) { .kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.guide-event { margin-top: calc(var(--gutter) * 2); }
.guide-event-title { display: flex; align-items: center; gap: .5em; margin: 0 0 var(--gutter); }
.guide-event-title .i { width: 1.1em; height: 1.1em; }
.guide-event .wide, .totem-guide .wide { margin-top: var(--gutter); }
.guide-event .wide .table-wrap, .totem-guide .wide .table-wrap { max-height: none; }

.help-page + .help-page { margin-top: .6em; }
.help-page summary { cursor: pointer; padding: .3em 0; }
.help-text p { margin: .4em 0; line-height: 1.55; }
.help-text .runs { display: block; }

/* Note lists (formerly styled by the panel's admin-staff.css, which the site no longer loads) */
.notes { display: grid; gap: var(--s3); margin: 0; padding-inline-start: 1.2em; }
.notes li { padding-bottom: var(--s3); border-bottom: 1px solid var(--line-soft); }
.notes li:last-child { border-bottom: 0; padding-bottom: 0; }
.notes li + li { margin-top: .5em; }

/* Divine Totems */
.totem-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gutter); flex-wrap: wrap; margin: calc(var(--gutter) * 2) 0 var(--gutter); }
.totem-bar h2, .totem-title { margin: 0; }
.totem-title { margin-top: calc(var(--gutter) * 2); margin-bottom: var(--gutter); }
.role-filter { display: flex; gap: .4em; flex-wrap: wrap; }
.role-filter [aria-pressed=true], .ench-parts [aria-pressed=true] { outline: 2px solid currentColor; outline-offset: 1px; font-weight: 600; }
.totem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: var(--gutter); }
.totem-head { display: flex; gap: .8em; align-items: center; padding: var(--gutter) var(--gutter) 0; }
.totem-chips { display: flex; gap: .35em; flex-wrap: wrap; margin-top: .35em; }
.totem-part { margin-top: .8em; }
.totem-pools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--gutter); padding: 0 var(--gutter) var(--gutter); align-items: start; }
.totem-pool .one-in { display: block; font-weight: 400; }
.totem-pool h3 { margin: 0 0 var(--s2); }
.totem-pool tr:last-child td { border-block-start: 1px solid var(--line-soft); font-weight: 700; }
.totem-part .label { display: block; margin-bottom: .3em; }
.chip.role-dps { background: #fde2dd; color: #9a2c1c; }
.chip.role-tank { background: #dde7fd; color: #1c3f9a; }
.chip.role-healer { background: #dcf5e3; color: #1c7a3c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .chip.role-dps { background: #4a2420; color: #ffb4a6; }
  :root:not([data-theme=light]) .chip.role-tank { background: #202c4a; color: #aac2ff; }
  :root:not([data-theme=light]) .chip.role-healer { background: #1d3a28; color: #9fe3b6; }
}
:root[data-theme=dark] .chip.role-dps { background: #4a2420; color: #ffb4a6; }
:root[data-theme=dark] .chip.role-tank { background: #202c4a; color: #aac2ff; }
:root[data-theme=dark] .chip.role-healer { background: #1d3a28; color: #9fe3b6; }
.chip.also { background: transparent !important; box-shadow: inset 0 0 0 1px currentColor; }
.totem-guide[data-role=dps] [data-roles]:not([data-roles~=dps]),
.totem-guide[data-role=tank] [data-roles]:not([data-roles~=tank]),
.totem-guide[data-role=healer] [data-roles]:not([data-roles~=healer]) { display: none; }
.skill-effect div + div { margin-top: .25em; }
.wrap-cells td { white-space: normal; }
/* A jump target briefly lights up (shortened to nothing by app.css under prefers-reduced-motion). */
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--amber-bg); } 100% { background: transparent; } }

/* Ilmata */
.phase-part + .phase-part { margin-top: .9em; }
.phase-part > .label { display: block; margin-bottom: .35em; }
.ilmata-difficulties { margin-top: var(--gutter); }
.ilmata-difficulties .table-wrap { max-height: none; }
.stage-monster { display: inline-flex; align-items: center; gap: .5em; }
.stage-others { display: flex; flex-direction: column; gap: .3em; }
.ilm-reward-group + .ilm-reward-group { margin-top: var(--gutter); }
.ilm-reward-group > p { margin: 0 0 .6em; }
.ilm-rewards { display: flex; flex-direction: column; gap: .8em; }
.ilm-reward { display: flex; gap: .8em; align-items: center; }
.ilm-reward img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.ilm-reward .amounts { margin-top: .3em; }

/* Enchants */
.ench-parts { display: flex; gap: .4em; flex-wrap: wrap; margin: calc(var(--gutter) * 2) 0 var(--gutter); }
.ench-guide .wide { margin-top: var(--gutter); }
.ench-guide .wide .table-wrap { max-height: none; }
.ench-calc { display: flex; flex-wrap: wrap; gap: .6em; align-items: end; }
.ench-slot { display: contents; }
.ench-calc label { display: flex; flex-direction: column; gap: .25em; min-width: 0; max-width: 100%; }
.ench-calc .input { width: auto; max-width: 100%; font-size: max(1rem, 1em); }
.ench-calc .input[aria-invalid=true] { border-color: var(--danger); }
.ench-result { margin-top: .8em; line-height: 1.55; }
.ench-result p { margin: 0; }
.ench-summary { font-weight: 600; }
.ench-key { margin: 0 0 var(--gutter); padding: .9em 1em; border-radius: var(--r1); background: var(--amber-bg); border: 1px solid var(--amber-line); border-inline-start: 5px solid var(--amber); line-height: 1.55; }
.ench-key p { margin: 0; }
.ench-key p + p { margin-top: .35em; }
.ench-key-title { font-size: 1.15em; font-weight: 700; }
.ench-key-label { display: inline-flex; align-items: center; gap: .35em; margin-bottom: .35em; font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-ink); }
.ench-key-label .i { width: 1em; height: 1em; }

/* Pet guide (built on the Divine Totems layout: .totem-guide, .totem-grid, .role-filter, .chip.role-*) */
.petg-guide[data-role=physical] [data-roles]:not([data-roles~=physical]),
.petg-guide[data-role=magic] [data-roles]:not([data-roles~=magic]) { display: none; }
/* A class with no specialisation of the role shown goes too. */
.petg-guide[data-role=physical] .petg-class:not(:has([data-roles~=physical])),
.petg-guide[data-role=magic] .petg-class:not(:has([data-roles~=magic])),
.petg-guide[data-role=tank] .petg-class:not(:has([data-roles~=tank])),
.petg-guide[data-role=healer] .petg-class:not(:has([data-roles~=healer])) { display: none; }
.petg-name { margin: 0; font-size: 1em; }
.petg-count { margin: 0 0 var(--gutter); }
.petg-why { margin: 0 0 .8em; }
.petg-skill { margin-top: .9em; padding-top: .8em; border-top: 1px solid var(--line-soft); }
.petg-skill-head { display: flex; gap: .6em; align-items: center; }
.petg-skill-head .label { display: block; }
.petg-skill .desc { margin: .45em 0 0; line-height: 1.5; }
.petg-skill > p { margin: .45em 0 0; line-height: 1.5; }
/* The Core Passive Effect works only in slot 2: its block and that rule stand out in the amber of the enchant key. */
.petg-core { padding: .8em .9em; border: 1px solid var(--amber-line); border-inline-start: 5px solid var(--amber); border-radius: var(--r1); background: var(--amber-bg); }
.petg-core .petg-skill-name { display: block; margin-top: .15em; }
.petg-core-only { color: var(--amber-ink); }
.notes .petg-core-rule { padding: .7em .9em; border: 1px solid var(--amber-line); border-inline-start: 5px solid var(--amber); border-radius: var(--r1); background: var(--amber-bg); }
.notes .petg-core-rule strong { color: var(--amber-ink); }
.petg-cats { display: inline-flex; gap: .3em; flex-wrap: wrap; vertical-align: middle; }
.petg-part { margin-top: .6em; }
.petg-intro { margin: calc(var(--gutter) * -0.5) 0 var(--gutter); }
.petg-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--gutter); }
.petg-spec + .petg-spec { margin-top: 1.1em; padding-top: 1em; border-top: 1px solid var(--line-soft); }
.petg-spec h4 { margin: 0; }
.petg-spec-title { margin: .1em 0 .4em; }
.petg-slots li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: .5em; align-items: center; }
.petg-slot { display: flex; flex-direction: column; line-height: 1.2; font-size: .85em; }
.petg-slots .amount { justify-self: start; max-width: 100%; padding-block: 2px; }
/* The panel cuts long names with "…"; in a line-up the whole name wraps instead. */
.petg-slots .amount span { white-space: normal; overflow: visible; }
.petg-guide .card-body > p + p { margin-top: .6em; }
.petg-builds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .8em; margin: .7em 0; }
.petg-build > .label { display: block; margin-bottom: .3em; }
.petg-build > p { margin: .35em 0 0; }
.petg-slots { display: flex; flex-direction: column; gap: .45em; margin: 0; padding: 0; list-style: none; }
.petg-guide .wide .table-wrap { max-height: none; }

/* Battlefield and castle maps: the build records each picture's size, so the page does not jump while it loads. */
.picture.map[width] { height: auto; }

/* ---------------------------------------------------------------- fixes to the panel's styles (audit, step 2) */

/* Text only screen readers hear (the loading status). */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The closed phone menu was only transparent, so Tab still walked through its links: hide it for real. visibility
   switches after the fade-out and at once on the fade-in; .top.settling (page load) keeps app.css's no-transition. */
@media (max-width: 860px) {
  .nav { transition: opacity .15s, transform .15s, visibility 0s .15s; }
  .nav:not(.open) { visibility: hidden; }
  .nav.open { transition: opacity .15s, transform .15s, visibility 0s; }
}
.top.compact .nav { transition: opacity .15s, transform .15s, visibility 0s .15s; }
.top.compact .nav:not(.open) { visibility: hidden; }
.top.compact .nav.open { transition: opacity .15s, transform .15s, visibility 0s; }
.top.settling .nav, .top.settling .nav.open { transition: none; }

/* The home page search (site/home-search.js): a large box under the heading, its matches in a grid of groups. */
.hs { display: block; margin-block-end: var(--s5); }
.hs-label { display: block; margin-block-end: var(--s2); font-weight: 700; }
.hs-form .search { display: block; }
.hs-form .search .input { block-size: 44px; font-size: max(1rem, 1em); }
.hs-status { margin-block: var(--s2) 0; color: var(--muted); font-size: var(--t-sm); }
.hs-status:empty { display: none; }
.hs-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s3); margin-block-start: var(--s3); align-items: start; }
.hs-group { padding: var(--s3) var(--s4); }
.hs-group h2 { display: flex; align-items: center; gap: var(--s2); margin-block-end: var(--s3); font-size: var(--t-md); }
.hs-list { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.hs-list li:not([hidden]) { display: flex; flex-direction: column; min-inline-size: 0; }
.hs-sub { margin-inline-start: calc(28px + var(--s2)); color: var(--muted); font-size: var(--t-xs); }
.hs-actions .hs-sub { margin-inline-start: 0; }
.hs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-block-start: var(--s3); }
.hs-icon { display: inline-grid; place-items: center; flex: none; inline-size: 28px; block-size: 28px; border-radius: var(--r1); background: var(--blue-bg); color: var(--blue-ink); }

/* The footer's Bobo logo, the size of the panel's star it replaces. */
.foot-logo { display: block; block-size: 1.5em; inline-size: auto; }

/* Links that looked like plain text: the footer's, the tables' cross-links and the privacy policy's. */
.foot a, .data a.text-link, .privacy a { color: var(--blue-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }

/* Inputs showed focus with a box-shadow only, which Windows high-contrast mode drops: a transparent outline is
   painted there (and invisible elsewhere, where the panel's ring shows). */
.input:focus-visible { outline: 2px solid transparent; outline-offset: 2px; }

/* A light theme chosen on a dark system kept dark dropdowns and scrollbars. */
:root[data-theme=light] { color-scheme: light; }

/* Quality in words under the name, only where the Quality column hides (app.css: .data .opt below 600px). */
.q-phone { display: none; }
@media (max-width: 600px) { .data .q-phone { display: flex; width: max-content; margin-top: 2px; } }

/* "Even" element values were in the faint colour (about 3.4:1): the muted one reads at about 7:1. */
.el.even { color: var(--muted); }

/* Crafting's two kinds are links now (aria-current), styled as the panel's segmented control. */
.seg [aria-current=page] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }

/* The list search sits in a <search> landmark: it keeps the form's full width in the card head. */
.card-head > search { display: block; flex: 1 1 100%; min-width: 0; }
/* Beside the crafting kinds (a toolbar), it takes the rest of the row, and its own row on a narrow screen. */
.toolbar > search { display: block; flex: 1 1 320px; min-width: 0; }

/* ---------------------------------------------------------------- header menu: the Items submenu (site/nav.js) */

/* Wide screens: the arrow beside Items drops Crafting and Cards down under it while it is expanded. */
.nav-group { position: relative; display: flex; align-items: center; }
.nav-more { display: grid; place-items: center; inline-size: 20px; block-size: 32px; margin-inline-start: -2px; padding: 0;
  border: 0; border-radius: var(--r2); background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.nav-more:hover { background: var(--tint); }
.nav-more::before { content: ''; inline-size: 6px; block-size: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0;
  rotate: 45deg; translate: 0 -2px; transition: rotate .15s, translate .15s; }
.nav-more[aria-expanded="true"]::before { rotate: -135deg; translate: 0 2px; }
.nav-group:has(.nav-sub [aria-current="page"]) .nav-more { color: var(--ink); }
.nav-sub { display: none; position: absolute; inset-block-start: calc(100% + var(--s2)); inset-inline-start: 0; z-index: 1;
  flex-direction: column; gap: var(--s1); min-inline-size: max-content; padding: var(--s2);
  border: 1px solid var(--line); border-radius: var(--r3); background: var(--surface); box-shadow: var(--shadow-2); }
.nav-group:has(> .nav-more[aria-expanded="true"]) > .nav-sub { display: flex; }

/* The phone menu (and the desktop one when the links do not fit): Crafting and Cards always shown, indented under Items. */
@media (max-width: 860px) {
  .nav-group { flex-direction: column; align-items: stretch; }
  .nav-more { display: none; }
  .nav-sub { display: flex; position: static; padding-block: 0; padding-inline: var(--s5) 0; border: 0; box-shadow: none; background: none; }
}
.top.compact .nav-group { flex-direction: column; align-items: stretch; }
.top.compact .nav-more { display: none; }
.top.compact .nav-sub { display: flex; position: static; padding-block: 0; padding-inline: var(--s5) 0; border: 0; box-shadow: none; background: none; }

/* The page as the build writes it (seo.mjs): what search engines and link previews read, and what a visitor sees until
   the app draws the page over it. */
.pre { display: grid; gap: var(--s5); padding-block: var(--s5); }
.pre h1 { font-family: var(--display); font-size: var(--t-3xl); line-height: 1.15; }
.pre h2 { font-size: var(--t-xl); margin-block-end: var(--s2); }
.pre p { line-height: 1.55; max-inline-size: 70ch; }
.pre-crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--muted); }
.pre-crumbs li + li::before { content: "›"; margin-inline-end: var(--s2); }
.pre-facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s1) var(--s4); }
.pre-facts dt { color: var(--muted); }
.pre-list { margin: 0; padding-inline-start: 1.2em; columns: 18rem; column-gap: var(--s6); line-height: 1.6; }
.pre-list li { break-inside: avoid; }
.pre a { color: var(--blue-ink); text-decoration: underline; text-underline-offset: .15em; }

/* The privacy policy: text at a readable line length. */
.privacy { max-inline-size: 75ch; }
