/* 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)); } }

.event { margin-top: calc(var(--gutter) * 2); }
.event-title { display: flex; align-items: center; gap: .5em; margin: 0 0 var(--gutter); }
.event-title .i { width: 1.1em; height: 1.1em; }
.event .wide, .totem-guide .wide { margin-top: var(--gutter); }
.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-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; }
.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; }

/* Links that looked like plain text: the footer's and the tables' cross-links. */
.foot a, .data a.text-link { 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; }
