@font-face {
  font-family: "Golos Text";
  src: url("assets/golos-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("assets/golos-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Cinzel;
  src: url("assets/cinzel.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #11100f;
  --sidebar: #131210;
  --card: #191715;
  --card-hover: #211e19;
  --border: #332c25;
  --border-strong: #55402b;
  --text: #f2ebe0;
  --muted: #b0a597;
  --quiet: #988b7b;
  --gold: #e7ba6b;
  --gold-light: #f4d392;
  --gold-wash: #302419;
  --green: #b1ce9e;
  --rose: #e6ac9a;
  --silver: #c2c3c9;
  --sidebar-width: 224px;
  --gap: 18px;
  --radius: 13px;
  font-family: "Golos Text", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 300px; }
body { margin: 0; background: radial-gradient(ellipse at 65% 0%, #211914 0, transparent 490px), var(--bg); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; }
button:not(:disabled), select { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 3vw, 2.55rem); font-weight: 650; letter-spacing: -.045em; }
h2 { font-size: 1.06rem; font-weight: 620; letter-spacing: -.018em; }
h3 { font-size: 1rem; font-weight: 620; }
small { font-size: .82rem; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
::selection { background: #8a622c; color: #fff5e6; }
[hidden] { display: none !important; }
.symbol-library { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link { position: fixed; z-index: 20; top: .8rem; left: .8rem; padding: .6rem 1rem; transform: translateY(-160%); background: var(--bg); border: 1px solid var(--gold); }
.skip-link:focus { transform: none; }
.muted { color: var(--muted); }
.positive { color: var(--green); }
.negative { color: var(--rose); }
.tabular { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); }

.sidebar {
  position: fixed;
  overflow-y: auto;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 24px 14px 18px;
  background: linear-gradient(150deg, #20170e 0, transparent 140px), var(--sidebar);
  border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; margin: 3px 3px 35px; padding: 3px 0; }
.brand img { width: 49px; height: auto; filter: drop-shadow(0 0 11px #efa33f33); }
.brand strong { display: block; white-space: nowrap; font: 720 1.05rem/1.18 Cinzel, Georgia, serif; color: var(--gold-light); }
.brand small { display: block; margin-top: 5px; font-size: .75rem; color: var(--muted); }
.nav { display: grid; gap: 5px; }
.nav a {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: .93rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--card); }
.nav a[aria-current="page"] { color: var(--gold-light); border-color: #4d3824; background: linear-gradient(105deg, #382717, #26201a); }
.nav a[aria-current="page"]::before { position: absolute; content: ""; top: 11px; bottom: 11px; left: -1px; width: 2px; border-radius: 8px; background: var(--gold); }
.nav a .icon { width: 18px; height: 18px; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; margin: auto 4px 0; padding: 16px 0 0; border-top: 1px solid var(--border); color: var(--quiet); font-size: .76rem; }
.sidebar-footer .icon { width: 15px; height: 15px; }
.scrim, .nav-close, .menu-button { display: none; }

.workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(18px, 2.3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: #141210ea;
  font-size: .88rem;
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 13px; }
.topbar-parent, .topbar-end time { color: var(--muted); }
.topbar-divider { color: #736450; }
#view-label { font-weight: 560; }
#view-label a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.crumb-separator { margin: 0 9px; color: var(--quiet); }
.demo-label { border: 1px solid #57412b; background: #261c13; color: var(--gold-light); padding: 4px 9px; border-radius: 5px; font-size: .77rem; white-space: nowrap; }
.content { max-width: 1620px; margin: 0 auto; padding: 22px clamp(18px, 2.3vw, 34px) 46px; }
.content:focus { outline: none; }
.stack { display: grid; gap: var(--gap); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 232px;
  border: 1px solid #62482d;
  border-radius: var(--radius);
  background: #21160f;
  box-shadow: inset 0 0 0 3px #100b0870, 0 10px 32px #0003;
}
.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 30%;
  background: url("assets/codex.webp") center 44% / cover no-repeat;
}
.hero::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 0;
  background: linear-gradient(90deg, #1b1310 0%, #1a120e 25%, #1a120ed0 43%, #150f0b26 68%, #100c0820 100%), linear-gradient(0deg, #100b08a6, transparent 43%);
}
.hero-copy { position: relative; padding: 30px clamp(22px, 3.5vw, 50px); }
.hero h1 { margin-top: 5px; color: #f6dfb3; font: 750 clamp(2.5rem, 5.2vw, 4.8rem)/1.03 Cinzel, Georgia, serif; letter-spacing: -.032em; white-space: nowrap; }
.hero-caption { margin-top: 8px; color: #dac9ad; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 21px; }
.hero-corner { position: absolute; width: 16px; height: 16px; border-style: solid; border-color: #b28346; pointer-events: none; }
.hero-corner.top { top: 7px; left: 7px; border-width: 1px 0 0 1px; }
.hero-corner.bottom { bottom: 7px; right: 7px; border-width: 0 1px 1px 0; }

.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 13px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #241d16;
  color: var(--gold-light);
  font-size: .875rem;
  font-weight: 560;
}
.button:hover, .icon-button:hover { background: #3b2b1c; border-color: #80603a; }
.button .icon, .icon-button .icon { width: 17px; height: 17px; }
.button.primary { background: linear-gradient(#eac383, #d8a858); border-color: #f2ce93; color: #211508; font-weight: 660; }
.button.primary:hover { background: #f1ce92; }
.button.ghost { background: #16110fbd; border-color: #685034; }
.button.ghost:hover { background: #352719; }
.icon-button { width: 40px; height: 40px; padding: 0; }
.topbar .menu-button, .sidebar .nav-close { display: none; }
.text-link { display: inline-flex; align-items: center; min-height: 32px; color: var(--gold-light); font-size: .875rem; font-weight: 560; white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.panel, .metric {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 15px #0604032b;
}
.metric { padding: 15px 16px 14px; background: radial-gradient(ellipse at top right, #2c211754, transparent 69%), var(--card); }
.metric-title { display: flex; align-items: center; gap: 9px; min-height: 30px; color: var(--muted); font-size: .87rem; font-weight: 530; }
.icon-tile { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid #4a3523; color: var(--gold); background: #2c2118; }
.icon-tile .icon { width: 17px; height: 17px; }
.icon-tile.silver { border-color: #45413c; color: var(--silver); background: #292725; }
.icon-tile.rose { border-color: #594035; color: var(--rose); background: #2f201c; }
.icon-tile.green { border-color: #394532; color: var(--green); background: #252d20; }
.metric-number { display: flex; align-items: baseline; gap: 7px; margin-top: 7px; font-size: clamp(1.48rem, 2.25vw, 2.15rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-unit { font-size: .86rem; letter-spacing: 0; font-weight: 480; color: var(--gold); }
.metric-sub { margin-top: 6px; color: var(--muted); font-size: .82rem; line-height: 1.35; }

.grid-split { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.grid-split.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 17px 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.panel-heading p, .subtitle { color: var(--muted); margin-top: 5px; font-size: .88rem; line-height: 1.4; }
.chart-card { padding-bottom: 13px; }
.chart-card .panel-heading { align-items: center; margin-bottom: 12px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; background: #12110f; border: 1px solid var(--border); border-radius: 7px; }
.segmented button {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: .81rem;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { color: var(--gold-light); background: #3a2b1d; border-color: #614629; }
.chart-body { position: relative; min-width: 0; }
.chart-body svg { display: block; width: 100%; height: 185px; overflow: visible; }
.chart-body text { fill: #b4a592; font-size: 12px; font-family: "Golos Text", sans-serif; font-variant-numeric: tabular-nums; }
.chart-gridline { stroke: #3a332b; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-axis { stroke: #4c4135; stroke-width: 1; }
.chart-tooltip {
  position: absolute;
  z-index: 1;
  top: 1px;
  right: 5px;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #211912f7;
  color: var(--gold-light);
  box-shadow: 0 3px 12px #0005;
  font-size: .78rem;
  pointer-events: none;
}

.rows { margin-top: 11px; }
.list-row { min-height: 55px; display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--border); }
.list-row:first-child { border-top-color: transparent; }
.list-row .row-content { min-width: 0; flex: 1; }
.row-title { display: block; color: var(--text); font-size: .92rem; font-weight: 550; line-height: 1.35; }
.row-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: .81rem; line-height: 1.35; }
.row-end { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.row-end.gold { color: var(--gold-light); font-weight: 570; }
.row-button { text-align: left; width: 100%; border: 0; border-top: 1px solid var(--border); background: transparent; }
.row-button:hover .row-title { color: var(--gold-light); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.chip.boss { color: var(--gold-light); border-color: #503822; background: #2b2017; }
.chip.saved { color: var(--green); border-color: #435335; background: #252d20; }

.rank-inline { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: .87rem; }
.roster-name { padding-block: 4px; }
.player-link, .player-stats a {
  color: var(--gold-light);
  text-decoration: underline;
  text-decoration-color: #806341;
  text-underline-offset: .2em;
}
.player-link { display: inline-flex; align-items: center; min-height: 36px; font-weight: 570; }
.player-link:hover, .player-stats a:hover { text-decoration-color: currentColor; }
.rank-inline:hover { text-decoration: underline; text-underline-offset: 4px; }
.rank-inline img { width: 32px; height: 17px; object-fit: contain; }
.rank-bronze { --rank-metal: 203, 152, 105; color: #d1a47d; }
.rank-silver { --rank-metal: 188, 192, 205; color: var(--silver); }
.rank-gold { --rank-metal: 230, 176, 88; color: var(--gold-light); }
.rank-murder { --rank-metal: 230, 183, 111; color: #f4d099; }
.panel.player-sheet { padding: 0; overflow: hidden; border-color: rgba(var(--rank-metal), .36); }
.player-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 32%);
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  min-height: 205px;
  padding: clamp(22px, 3vw, 45px);
  border-bottom: 1px solid rgba(var(--rank-metal), .23);
  background: radial-gradient(ellipse at 83% 44%, rgba(var(--rank-metal), .15), transparent 54%), #1c1713;
}
.player-banner .eyebrow { color: rgb(var(--rank-metal)); }
.player-banner h1 { margin: 7px 0; color: var(--text); font: 600 clamp(2.1rem, 4.2vw, 4rem)/1.08 Cinzel, Georgia, serif; overflow-wrap: anywhere; }
.player-affiliation { color: var(--muted); font-size: 1rem; }
.player-crest { justify-self: center; width: 100%; max-width: 310px; height: clamp(85px, 10vw, 155px); object-fit: contain; filter: drop-shadow(0 8px 12px #08060480); }
.player-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: clamp(18px, 2.3vw, 32px) 0; }
.player-stats > div { min-width: 0; padding: 0 clamp(14px, 2.4vw, 36px); }
.player-stats > div + div { border-left: 1px solid var(--border); }
.player-stats dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.player-stats dt .icon { width: 17px; height: 17px; }
.player-stats dd { margin: 9px 0 0; color: var(--text); font-size: clamp(1.3rem, 2vw, 1.9rem); font-weight: 620; line-height: 1.25; font-variant-numeric: tabular-nums; }
.player-stats a { color: rgb(var(--rank-metal)); }
.rank-avatar { display: grid; place-items: center; width: 32px; height: 32px; background: #2b231b; border: 1px solid var(--border); border-radius: 7px; color: var(--gold-light); font-size: .85rem; font-weight: 550; flex: 0 0 auto; }
.leader-position { font-size: .82rem; color: var(--quiet); min-width: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.leader-position:first-child { color: var(--gold); }

.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 15px; min-width: 0; padding: 9px 0 2px; }
.page-intro p { margin-top: 7px; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.page-actions, .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th { font-weight: 520; color: var(--muted); font-size: .83rem; text-align: left; white-space: nowrap; }
td { vertical-align: middle; font-size: .92rem; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #201c17; }
td.amount, th.amount { text-align: right; white-space: nowrap; }
.table-panel .panel-heading { margin-bottom: 10px; }
.empty { color: var(--muted); padding: 20px 5px; line-height: 1.5; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 7px; background: #141210; color: var(--muted); }
.search-field .icon { width: 16px; height: 16px; }
.search-field input { min-height: 39px; width: min(35vw, 230px); min-width: 116px; color: var(--text); background: transparent; border: 0; font-size: .875rem; }
.search-field input:focus-visible { outline-offset: 0; }
select { appearance: none; color: var(--text); min-height: 40px; max-width: 100%; padding: 6px 29px 6px 10px; border-radius: 7px; border: 1px solid var(--border-strong); background: linear-gradient(45deg, transparent 50%, #e3b86f 50%) calc(100% - 13px) center / 5px 5px no-repeat, linear-gradient(-45deg, transparent 50%, #e3b86f 50%) calc(100% - 8px) center / 5px 5px no-repeat, #171411; font-size: .87rem; }
.field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.week-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin-bottom: 15px; }
.week-day { padding: 9px 3px; min-height: 55px; background: #151310; border: 1px solid var(--border); border-radius: 7px; text-align: center; color: var(--muted); font-size: .84rem; }
.week-day strong { display: block; color: var(--text); font-variant-numeric: tabular-nums; margin-top: 4px; font-size: .9rem; }
.week-day:hover { border-color: var(--border-strong); }
.week-day[aria-pressed="true"] { background: #352719; color: var(--gold-light); border-color: #896036; }
.week-day[aria-pressed="true"] strong { color: var(--gold-light); }
.week-day[aria-current="date"] { box-shadow: inset 0 -2px var(--gold); }
.event-time { min-width: 48px; color: var(--gold-light); font-size: .91rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.schedule-panel .rows { margin-top: 3px; }
.schedule-panel .list-row:first-child { border-top-color: var(--border); }

.rank-grid, .media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.rank-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 12px 0 7px; }
.directory-heading h1, .guide-masthead h1, .rank-identity h1, .rank-card h2 {
  font-family: Cinzel, Georgia, serif;
  font-weight: 600;
  letter-spacing: -.035em;
}
.directory-heading h1 { margin-top: 5px; font-size: clamp(2.15rem, 4vw, 3.4rem); }
.directory-intro { max-width: 63ch; margin-top: 10px; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.directory-heading .button { flex: none; }
.rank-card, .rank-identity {
  position: relative;
  overflow: hidden;
  border-color: rgba(var(--rank-metal), .35);
  background: radial-gradient(ellipse at 50% 40%, rgba(var(--rank-metal), .13), transparent 68%), var(--card);
}
.rank-card::before, .rank-identity::before {
  position: absolute;
  content: "";
  inset: 0 12% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--rank-metal), .8), transparent);
}
.rank-card { display: flex; flex-direction: column; padding: clamp(14px, 1.55vw, 25px); }
.rank-card:hover, .rank-card:focus-visible { border-color: rgb(var(--rank-metal)); background-color: var(--card-hover); }
.rank-card-stage { color: rgb(var(--rank-metal)); font-size: .8rem; font-weight: 610; letter-spacing: .085em; text-transform: uppercase; }
.rank-card img { width: 100%; height: clamp(90px, 10vw, 160px); margin: 17px 0 14px; object-fit: contain; filter: drop-shadow(0 8px 9px #07060490); }
.rank-card h2 { margin: 0 0 14px; font-size: clamp(1.5rem, 2.55vw, 2.25rem); }
.rank-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-top: 12px; border-top: 1px solid rgba(var(--rank-metal), .19); color: var(--muted); font-size: .88rem; line-height: 1.3; }
.rank-card-foot .icon { width: 16px; height: 16px; color: rgb(var(--rank-metal)); }
.guide-note { color: var(--muted); font-size: .875rem; line-height: 1.5; }

.guide-masthead { min-height: 205px; }
.hero.guide-masthead h1 { margin: 7px 0 19px; max-width: 100%; font-size: clamp(2.2rem, 4.3vw, 4rem); white-space: normal; line-height: 1.08; }
.rules-layout, .rank-profile { display: grid; gap: var(--gap); align-items: start; }
.rules-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.rules-section, .rank-requirements { padding: clamp(18px, 2vw, 30px); }
.guide-section-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.guide-section-heading h2 { color: var(--text); font-size: clamp(1.15rem, 1.5vw, 1.4rem); }
.rules-list { margin: 0; padding-left: 1.55rem; }
.rules-list > li { padding: 16px 0 16px 4px; }
.rules-list > li + li { border-top: 1px solid var(--border); }
.rules-list > li:last-child { padding-bottom: 0; }
.rules-list > li::marker { color: var(--gold); font-weight: 630; font-variant-numeric: tabular-nums; }
.rules-list h3 { font-size: 1.03rem; line-height: 1.4; }
.rules-list p, .criterion > dd { color: #d2c8bb; line-height: 1.6; font-size: 1rem; }
.rules-list p { margin-top: 4px; }
.rule-steps { margin: 12px 0 0; padding: 2px 0 2px 12px; border-left: 1px solid var(--border-strong); list-style: none; }
.rule-steps li { display: flex; align-items: baseline; gap: 9px; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.rule-steps li + li { margin-top: 7px; }
.step-number { flex: none; color: var(--gold); font-size: .84rem; font-weight: 600; }
.raid-call { margin: 13px 0 0; padding: 13px 17px; border-left: 2px solid var(--gold); border-radius: 0 6px 6px 0; background: linear-gradient(90deg, #342719, #241e17); }
.raid-call figcaption { color: var(--muted); font-size: .84rem; }
.raid-call blockquote { margin: 5px 0 0; color: var(--gold-light); font: 600 1.5rem/1.25 Georgia, serif; }

.rank-profile { grid-template-columns: minmax(225px, .75fr) minmax(0, 1.55fr); }
.rank-identity { min-width: 0; padding: clamp(18px, 2.4vw, 36px); text-align: center; }
.rank-identity h1 { margin-top: 5px; font-size: clamp(2.1rem, 3.65vw, 3.2rem); }
.rank-emblem { display: grid; place-items: center; margin: 15px 0 21px; padding: 13px 0 24px; border-bottom: 1px solid rgba(var(--rank-metal), .23); }
.rank-emblem img { width: 100%; height: clamp(115px, 13vw, 180px); object-fit: contain; filter: drop-shadow(0 8px 10px #080604a0); }
.criteria-list { margin: 0; }
.criterion { display: grid; grid-template-columns: minmax(112px, .42fr) minmax(0, 1fr); gap: 12px 18px; padding: 15px 0; }
.criterion + .criterion { border-top: 1px solid var(--border); }
.criterion:last-child { padding-bottom: 0; }
.criterion > dt { color: var(--text); font-size: .94rem; font-weight: 580; line-height: 1.6; }
.criterion > dd { min-width: 0; margin: 0; }
.honor-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.honor-roles > div { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #151311; }
.honor-roles dt { color: var(--muted); font-size: .82rem; }
.honor-roles dd { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.honor-roles strong { display: block; color: var(--text); font-size: 1.07rem; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; }
.rank-award { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; padding: 15px; border: 1px solid #5e452b; border-radius: 8px; background: linear-gradient(115deg, #302317, #231d16); }
.rank-award span:not(.icon-tile) { display: block; color: var(--muted); font-size: .84rem; }
.rank-award strong { display: block; margin: 2px 0 4px; color: var(--gold-light); font-size: 1.27rem; }
.rank-award p { color: #d2c8bb; font-size: .93rem; line-height: 1.5; }
.media-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
  padding: 0;
  background: var(--card);
}
.media-card:hover { border-color: #916b43; background: var(--card-hover); }
.media-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--border); background: #11100f; }
.media-cover.contain { object-fit: contain; }
.media-caption { display: flex; flex-direction: column; gap: 5px; padding: 13px 15px; width: 100%; }
.media-caption strong { font-weight: 590; font-size: .95rem; }
.media-caption small { color: var(--muted); font-size: .82rem; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 1px 0 10px; }
.section-heading h2 { font-size: 1.15rem; }

.detail-dialog {
  background: #1a1612;
  color: var(--text);
  border: 1px solid #6c4f31;
  border-radius: var(--radius);
  padding: 0;
  width: min(490px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  box-shadow: 0 20px 100px #000c;
}
.detail-dialog::backdrop { background: #080706cc; backdrop-filter: blur(4px); }
.detail-dialog.media-dialog { width: min(1050px, calc(100vw - 28px)); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { font-size: 1.1rem; }
.dialog-header .icon-button { width: 34px; height: 34px; min-height: 34px; }
.dialog-media { width: 100%; max-height: 77dvh; object-fit: contain; background: #0e0d0c; }
.event-dialog-content { padding: 17px; }
.event-dialog-content .event-detail { font-size: 1rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.event-dialog-content .page-actions { margin-top: 17px; }

@media (max-width: 1150px) {
  :root { --sidebar-width: 188px; --gap: 14px; }
  .sidebar { padding-inline: 12px; }
  .brand { gap: 7px; }
  .brand img { width: 41px; }
  .brand strong { font-size: .95rem; }
  .sidebar-footer { font-size: .71rem; }
  .panel { padding-inline: 14px; }
  .metric { padding-inline: 12px; }
  .metric-title { font-size: .82rem; }
  .chart-card .panel-heading { align-items: flex-start; }
  .segmented button { padding-inline: 6px; }
}
@media (max-width: 930px) {
  .grid-split { grid-template-columns: minmax(0, 1fr); }
  .grid-split.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-layout, .rank-profile { grid-template-columns: minmax(0, 1fr); }
  .rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-identity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, .7fr); align-items: center; gap: 5px 14px; text-align: left; }
  .rank-identity h1 { grid-column: 1; margin: 0; }
  .rank-identity .button { justify-self: start; grid-column: 1; margin-top: 6px; }
  .rank-emblem { grid-column: 2; grid-row: 1 / span 3; margin: 0; padding: 0; border: 0; }
  .rank-emblem img { height: 90px; }
}
@media (max-width: 760px) {
  .workspace { margin: 0; }
  .topbar { height: 57px; padding-inline: 14px; }
  .topbar-start, .topbar-end { gap: 9px; }
  .topbar-parent, .topbar-divider, .topbar-end time { display: none; }
  .topbar .menu-button { display: inline-flex; width: 37px; height: 37px; min-height: 37px; }
  .sidebar { transform: translateX(-100%); visibility: hidden; width: min(275px, 85vw); transition: transform .17s ease, visibility .17s ease; }
  .sidebar.open { transform: none; visibility: visible; }
  .sidebar .nav-close { display: inline-flex; position: absolute; top: 15px; right: 9px; width: 32px; height: 32px; min-height: 32px; }
  .sidebar-footer { font-size: .81rem; }
  .scrim:not([hidden]) { display: block; position: fixed; z-index: 4; inset: 0; border: 0; background: #080706b0; }
  .content { padding: 14px 14px 30px; }
  .hero { min-height: 220px; }
  .hero-art { left: 11%; }
  .hero::before { background: linear-gradient(90deg, #1b1310 0%, #19110de5 29%, #170f0b75 65%, #120d0930 100%); }
  .hero h1 { font-size: clamp(2.25rem, 8.5vw, 3.8rem); }
  .hero-copy { padding: 22px 21px; }
  .metric-grid, .rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-split.equal { grid-template-columns: minmax(0, 1fr); }
  .page-intro { align-items: start; flex-direction: column; }
  .directory-heading { align-items: start; flex-direction: column; gap: 12px; padding-top: 5px; }
  .guide-masthead { min-height: 172px; }
  .rank-card img { height: clamp(66px, 18vw, 114px); }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  :root { --gap: 12px; }
  .rules-section, .rank-requirements { padding: 16px; }
  .rank-card { padding: 12px; }
  .rank-card-stage { font-size: .75rem; letter-spacing: .045em; }
  .rank-card-foot { font-size: .82rem; }
  .criterion { grid-template-columns: 1fr; gap: 4px; }
  .hero.guide-masthead h1 { font-size: clamp(1.85rem, 8.6vw, 2.45rem); }
  .hero h1 { font-size: clamp(1.86rem, 9.35vw, 2.65rem); }
  .hero-actions { gap: 7px; margin-top: 16px; }
  .hero-actions .button { padding-inline: 9px; }
  .hero-caption { font-size: .91rem; }
  .media-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-title { gap: 7px; }
  .metric-unit { font-size: .75rem; }
  .rank-inline img { display: none; }
  .event-time { min-width: 40px; font-size: .84rem; }
  .week-days { gap: 4px; }
  .week-day strong { font-size: .79rem; }
}
@media (max-width: 600px) {
  .player-banner { min-height: 145px; padding: 21px 16px; grid-template-columns: minmax(0, 1fr) 30%; }
  .player-stats { grid-template-columns: 1fr; padding: 3px 16px; }
  .player-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; }
  .player-stats > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .player-stats dd { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media (max-width: 760px) { body.nav-open { overflow: hidden; } }

.telegram-mini-app {
  --mini-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --mini-right: calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px));
  --mini-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --mini-left: calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px));
}
.telegram-mini-app body {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding: var(--mini-top) var(--mini-right) var(--mini-bottom) var(--mini-left);
}
.telegram-mini-app .sidebar {
  inset: var(--mini-top) auto var(--mini-bottom) var(--mini-left);
}
.telegram-mini-app .skip-link {
  top: calc(.8rem + var(--mini-top));
  left: calc(.8rem + var(--mini-left));
}
.telegram-mini-app .detail-dialog {
  inset: var(--mini-top) var(--mini-right) var(--mini-bottom) var(--mini-left);
  max-width: calc(100% - 28px - var(--mini-left) - var(--mini-right));
  max-height: calc(100dvh - 28px - var(--mini-top) - var(--mini-bottom));
}
