/* ro-panel's own look: V2 "Game window" (owner's choice 2026-10-27, laterro/ux-proposals/panel v2-*.html). Every
   page is a set of RO-client windows over the world map, in the header's column (ui.css .wrap; RFC 0035: one width on
   every host); My characters and the database sit beside a side window (ui.css .sect), so their grids size from their
   own column (container queries on .sect-content). No
   character art and no class marks (owner's decisions, 2026-10-27): a character is its name, class and level. No
   opacity on text (check-shared.mjs): a faded colour is a token with a checked contrast.
   Loaded after ui.css (the design system: .win, .ro-btn, .ro-tabs, .sunken, .gauge and every --l- token). This file
   uses ui.css tokens only and defines none (check-shared.mjs). Each art file it names gets its ?v=HASH from
   ro-panel at start (shell.go). No inline styles anywhere: the CSP is style-src 'self'. */

/* ---------- the game screen: the world map under a veil ---------- */
.screen { position: relative; isolation: isolate; padding: 22px 0 40px; background: var(--l-bg); }
.screen::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url(art/map-soft-800.webp?v=f67dab2fbacf) center 30% / cover no-repeat;
  background-image: image-set(url(art/map-soft-800.avif?v=a54eb01ec8fe) type("image/avif"), url(art/map-soft-800.webp?v=f67dab2fbacf) type("image/webp"));
}
.screen::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--l-bg) 52%, transparent) 0, color-mix(in srgb, var(--l-bg) 78%, transparent) 62%, var(--l-bg) 100%);
}
.screen .win { box-shadow: var(--l-float); }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; }
.win-title .t-right { margin-left: auto; font-weight: 600; font-size: .8rem; white-space: nowrap; }
.screen .win + .win { margin-top: 18px; }

/* ---------- a page's title row (Rankings, My characters) ---------- */
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; }
.menu h1 {
  margin: 0; font: 700 clamp(1.75rem, 4vw, 2.25rem)/1.15 var(--l-display); color: var(--l-wordmark);
  text-shadow: 0 1px 0 color-mix(in srgb, var(--l-paper) 70%, transparent);
}

/* ---------- lists: the rankings ---------- */
.list-panel { overflow: hidden; }
.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
.list caption { caption-side: top; }
.list th {
  text-align: left; font-size: .8rem; font-weight: 700; color: var(--l-muted); padding: 7px 10px;
  background: color-mix(in srgb, var(--l-row) 65%, var(--l-sunk)); border-bottom: 1px solid var(--l-sunk-line);
}
.list td { padding: 7px 10px; vertical-align: middle; border-bottom: 1px solid color-mix(in srgb, var(--l-sunk-line) 40%, transparent); }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover td { background: color-mix(in srgb, var(--l-sel) 70%, transparent); }
.list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list .nm { font-weight: 700; overflow-wrap: break-word; }
.list th.nm { font-weight: 700; }
.list .gd { overflow-wrap: anywhere; }
.list .gd.none { color: var(--l-muted); }
.list .rk { width: 56px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.list tr.top td { background: color-mix(in srgb, var(--l-hilite) 70%, transparent); }
.list tr.top:hover td { background: color-mix(in srgb, var(--l-hilite) 100%, var(--l-sel)); }
.crown {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 700 .8rem/1 var(--l-sans); color: #2a1f0c; border: 1px solid rgba(0,0,0,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 0 rgba(0,0,0,.15);
}
.c1 { background: radial-gradient(circle at 35% 30%, #f6dc7a, #dcb23c); }
.c2 { background: radial-gradient(circle at 35% 30%, #eef1f5, #b9c2ce); }
.c3 { background: radial-gradient(circle at 35% 30%, #ecb383, #c98450); }
.empty-list, .tab-message { margin: 0; padding: 16px 14px; }

/* rankings: a class list on the left, the tabs and the list on the right */
.rank-win .win-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; padding: 14px; }
.rank-win.fame .win-body { grid-template-columns: minmax(0, 1fr); }
.cats { list-style: none; margin: 0; padding: 4px; }
.cats-nav { align-self: start; }
.cats a {
  display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 4px 9px; border-radius: 3px;
  text-decoration: none; color: var(--l-ink); font-size: .92rem;
}
.cats a:hover { background: var(--l-bg-deep); }
.cats a[aria-current="page"] { background: var(--l-sel); font-weight: 700; box-shadow: inset 3px 0 0 var(--l-link); }
.cats .n { margin-left: auto; font-size: .8rem; color: var(--l-muted); font-variant-numeric: tabular-nums; }
.list-wrap { min-width: 0; }
.tab-page { min-width: 0; }
.fame-intro { margin: 0; padding: 12px 14px 0; }
/* the three fame lists side by side; a list with nobody on it stays narrow and gives its width to the others */
.fame-grid { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; align-items: flex-start; }
.fame-board { flex: 1 1 260px; min-width: 0; overflow: hidden; container-type: inline-size; }
.fame-board.empty { flex: 0 1 220px; }
.fame-list th, .fame-list td { padding-left: 8px; padding-right: 8px; }
/* a narrow board (three side by side) keeps rank, name and fame; base/job only where it fits */
@container (max-width: 360px) { .fame-list .lv { display: none; } }
.fame-board h3 {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; min-height: 46px;
  font-size: .98rem; border-bottom: 1px solid var(--l-sunk-line);
}
.fame-board .empty-list { padding: 12px; }
.fame-list .rk { width: 48px; }
.fame-list .lv { color: var(--l-muted); font-size: .86rem; }

/* ---------- my characters: the character-select screen ---------- */
.intro { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.intro p { flex: 1 1 420px; margin: 0; }
.intro .actions { gap: 8px; }
.ro-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; }
.ro-btn .ic { width: 16px; height: 16px; }
.flash { margin: 0 0 16px; }
/* the cards count their columns from the column they sit in (beside the side window: 3 at 1366 px, 2 at 860 px) */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.slot { display: flex; flex-direction: column; padding: 12px; min-width: 0; }
.slot.open {
  justify-content: center; align-items: center; min-height: 128px; gap: 2px; text-align: center; color: var(--l-muted);
  border: 1px dashed var(--l-sunk-line); border-radius: 3px; background: color-mix(in srgb, var(--l-paper) 60%, transparent);
}
.slot.open p { margin: 0; }
.slot.open p:first-child { color: var(--l-ink); font-weight: 700; }
/* a card's head: the name over the class on the left, the level on the right (the game's select screen puts them
   side by side too); a brass rule under it, as the windows' inner frame */
.slot-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0;
  padding-bottom: 10px; border-bottom: 1px solid var(--l-inner);
}
.slot-id { min-width: 0; }
.slot-lv { flex: none; margin: 0; text-align: right; line-height: 1.15; }
.slot-lv-label { display: block; font-size: .74rem; font-weight: 700; color: var(--l-muted); }
.slot-lv-n { font: 700 1.25rem/1.1 var(--l-sans); font-variant-numeric: tabular-nums; color: var(--l-ink); }
.slot .sname { margin: 0; font: 700 1.15rem/1.25 var(--l-sans); overflow-wrap: anywhere; }
.slot .sname a { color: var(--l-wordmark); text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.slot .sname a:hover { text-decoration-color: currentColor; }
.slot .scls { margin: 0; font-size: .9rem; color: var(--l-muted); }
/* the name with its Hidden / Being deleted tags on the same line (no extra row: the cards stay aligned) */
.sname-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sname-row .slot-flag { line-height: 1.4; }
.when { white-space: nowrap; }
.slot-facts .when { white-space: normal; }   /* a card beside the side window: the time goes under the date */
.slot-flag {
  padding: 1px 8px; border-radius: 3px; font-size: .78rem; font-weight: 700;
  color: var(--l-ink); background: var(--l-bg-deep); border: 1px solid var(--l-line);
}
.slot-flag.warn { color: var(--l-down); }
.slot-facts {
  display: grid; gap: 3px; width: 100%; margin: 12px 0; padding: 8px 10px; font-size: .88rem;
  background: color-mix(in srgb, var(--l-row) 75%, transparent); border-radius: 3px;
}
.slot-facts > div { display: grid; grid-template-columns: 7.6em minmax(0, 1fr); gap: 8px; }
.slot-facts dt { color: var(--l-muted); font-weight: 700; }
.slot-facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ingame { color: var(--l-ok); font-weight: 700; white-space: nowrap; }
.dash { color: var(--l-muted); }
.slot-form { margin: auto 0 0; }
.slot-form .ro-btn { width: 100%; }
.msg-links { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-links a { text-decoration: none; }

/* ---------- a character: Basic info, Status, Equipment, Location ---------- */
.back-line { margin: -6px 0 12px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 700; }
.hud { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.hud-col { display: grid; gap: 18px; min-width: 0; }
.hud-col > .win + .win { margin-top: 0; }
.who-line { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.who-line > div { min-width: 0; }
.binfo h1.char-name { margin: 0; font: 700 1.6rem/1.15 var(--l-sans); color: var(--l-wordmark); overflow-wrap: anywhere; }
.binfo .sub { margin: 2px 0 0; font-size: .88rem; color: var(--l-muted); }
.warn-text { color: var(--l-down); font-weight: 700; }
.gauges { display: grid; gap: 7px; margin: 0; }
/* max HP and SP: plain numbers in a sunken row, like Zeny (the panel cannot read current HP/SP) */
.vitals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 10px; }
.vitals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 12px; }
.vitals > div + div { border-left: 1px solid color-mix(in srgb, var(--l-sunk-line) 40%, transparent); }
.vitals dt { font-size: .86rem; font-weight: 700; color: var(--l-muted); }
.vitals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.gbar { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; align-items: center; }
.gbar dt { font-size: .84rem; font-weight: 700; color: var(--l-muted); white-space: nowrap; }
.gbar dd { margin: 0; }
.zeny { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 0; padding: 7px 12px; font-weight: 700; }
.zeny span:first-child { color: var(--l-muted); }
.zeny-n { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.vis-line {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px;
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--l-line);
}
.vis-state { margin: 0; font-size: .92rem; color: var(--l-muted); font-weight: 700; }
.vis-state b { margin-left: 8px; color: var(--l-ink); font-weight: 400; }
.vis-line form { margin: 0; }
.vis-note { margin: 8px 0 0; font-size: .82rem; color: var(--l-muted); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.stat-grid > div {
  display: flex; justify-content: space-between; align-items: center; padding: 7px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--l-sunk-line) 40%, transparent);
}
.stat-grid > div:nth-child(odd) { border-right: 1px solid color-mix(in srgb, var(--l-sunk-line) 40%, transparent); }
.stat-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.stat-grid dt { font-size: .86rem; font-weight: 700; color: var(--l-muted); }
.stat-grid dd { margin: 0; font: 700 1.12rem/1 var(--l-sans); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 12px 0 0; font-size: .92rem; }
.kv > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: start; }
.kv dt, .kv dd { line-height: 1.5; }
.kv dt { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--l-muted); white-space: nowrap; }
.kv dt .ic { width: 16px; height: 16px; align-self: center; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.win-body > .kv:first-child { margin-top: 0; }
.loc-note { margin: 10px 0 0; font-size: .86rem; color: var(--l-muted); }

/* the equipment window: two columns of slots by Hercules' equip positions (head, armor and weapon and shield, garment
   and shoes, accessories), then ammunition and any costume slots across */
.equip-grid { display: grid; gap: 8px; }
.eq-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.eq-wide { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.eq {
  display: flex; flex-direction: column; min-height: 58px; padding: 6px 10px; min-width: 0;
  background: color-mix(in srgb, var(--l-sunk) 70%, var(--l-paper)); border: 1px solid var(--l-sunk-line); border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.eq-wide .eq { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 0; }
.eq .sl { font-size: .74rem; font-weight: 700; color: var(--l-muted); }
.eq .it { font-weight: 700; font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
.eq .rf { color: var(--l-gold); }
.eq.none .it { font-weight: 400; color: var(--l-muted); }
.eq .cards { display: flex; flex-wrap: wrap; gap: 2px 9px; margin-top: 3px; font-size: .78rem; color: var(--l-muted); }
.pip { display: inline-flex; align-items: center; gap: 5px; }
.pip::before {
  content: ""; flex: none; width: 7px; height: 7px; transform: rotate(45deg);
  background: var(--l-metal); border: 1px solid var(--l-metal);
}
.pip.open::before { background: transparent; }
.forge { color: var(--l-gold); }

/* ---------- narrower screens ---------- */
/* the character page: its two columns need about 700 px of its own column */
@container (max-width: 700px) {
  .hud { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .screen { padding-top: 16px; }
  .menu { gap: 10px; margin-bottom: 14px; }
  .ro-btn { min-height: 42px; padding-left: 14px; padding-right: 14px; }
  .ro-tab { min-height: 40px; }
  .back { min-height: 40px; }
  .rank-win .win-body { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 8px; }
  /* the class list as a set of chips that wrap (all of them visible, the current one included) */
  .cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; }
  .cats a {
    min-height: 40px; padding: 4px 10px; border: 1px solid var(--l-btn-edge); border-radius: 4px; font-size: .86rem;
    color: var(--l-btn-ink); background: linear-gradient(180deg, var(--l-btn-hi), var(--l-btn-lo));
  }
  .cats .n { margin-left: 2px; }
  .cats a[aria-current="page"] {
    color: var(--l-accent-ink); border-color: var(--l-accent-edge); box-shadow: none;
    background: linear-gradient(180deg, var(--l-accent-hi), var(--l-accent) 45%, var(--l-accent-deep));
  }
  .cats a[aria-current="page"] .n { color: var(--l-accent-ink); }
  /* a list row as a small grid: rank | the name over the class over the guild | level. The cells keep their table
     roles (explicit in the markup), so a screen reader still reads a table. */
  .list thead, .list tbody { display: block; }
  .list thead tr, .list tbody tr { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
  .list th, .list td { display: block; padding: 0; border: 0; background: transparent; }
  .list thead tr { padding: 7px 8px; background: color-mix(in srgb, var(--l-row) 65%, var(--l-sunk)); border-bottom: 1px solid var(--l-sunk-line); }
  .list tbody tr { position: relative; padding: 8px; border-bottom: 1px solid color-mix(in srgb, var(--l-sunk-line) 40%, transparent); }
  .list tbody tr:last-child { border-bottom: 0; }
  .list tbody tr:hover td { background: transparent; }
  .list tr.top { background: color-mix(in srgb, var(--l-hilite) 70%, transparent); }
  .list tr.top td { background: transparent; }
  .list .rk { grid-column: 1; grid-row: 1 / span 3; width: auto; }
  .list .nm { grid-column: 2 / span 2; grid-row: 1; }
  .list .lv { grid-column: 4; grid-row: 1 / span 3; }
  .list th.cls, .list th.gd { display: none; }
  .list td.cls, .list td.gd { align-self: start; font-size: .82rem; color: var(--l-muted); font-weight: 400; }
  .list td.cls { grid-column: 2 / span 2; grid-row: 2; }
  .list td.gd { grid-column: 2 / span 2; grid-row: 3; overflow-wrap: anywhere; }
  .list td.gd.none { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .fame-grid { padding: 8px; }
  .fame-board, .fame-board.empty { flex: 1 1 100%; }
  .fame-list thead tr, .fame-list tbody tr { grid-template-columns: 40px minmax(0, 1fr) auto auto; }
  .fame-list .rk, .fame-list .nm, .fame-list .lv, .fame-list .fm { grid-row: 1; }
  .fame-list .nm { grid-column: 2; }
  .fame-list .lv { grid-column: 3; color: var(--l-muted); font-size: .86rem; }
  .fame-list th.lv { color: var(--l-muted); }
  .fame-list .fm { grid-column: 4; min-width: 3.5em; }
  .slots { gap: 8px; }
  .slot .sname a { display: inline-flex; align-items: center; min-height: 40px; }
}
@media (max-width: 420px) {
  .eq-slots { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 500px) {
  .slots { grid-template-columns: minmax(0, 1fr); }
}
