/* L2 Toxicity. Palette from the brand sheet (web/README.md): ink and slate surfaces, bone for headings and links,
   crimson for actions, as in the logo's red blade on metal. Venom green marks only what is up, alive or online;
   a light red what is down, dead or wrong (kept apart from the brand crimson). */

@font-face { font-family: "Cormorant"; src: url("fonts/cormorant.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/alegreya-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--night: #1e252d;      /* page: brand ink */
	--hull: #27303b;       /* raised surfaces */
	--hull-deep: #151a21;  /* insets, item slots */
	--seam: #3b4756;       /* lines: brand slate, darkened */
	--cloud: #ece7e1;      /* text */
	--haze: #9ba7b5;       /* secondary text: brand slate, lightened */
	--bone: #e6d4c6;       /* headings, links, trim */
	--bone-dim: #8c7f74;
	--crimson: #aa1b1d;    /* actions: the logo's blade */
	--crimson-deep: #6a0a0e;
	--venom: #8fd16a;      /* up, alive, online */
	--blood: #ff6f62;      /* down, dead, errors: lighter than the brand crimson */
	--amber: #e7b25a;      /* warnings */
	--display: "Cormorant", "Cormorant Garamond", Georgia, serif;
	--text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--night) linear-gradient(180deg, #27313d 0, var(--night) 420px) no-repeat;
	color: var(--cloud);
	font: 17px/1.55 var(--text);
	font-variant-numeric: lining-nums;
}

a { color: var(--bone); text-decoration-color: var(--crimson); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f4e7dc; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

h1, h2, h3 { font-weight: 600; color: var(--cloud); margin: 0 0 .5em; line-height: 1.15; }
h1 { font: 600 2.4rem/1.1 var(--display); }
h2 { font: 600 1.7rem/1.15 var(--display); color: var(--bone); }
h3 { font: 700 1.05rem/1.3 var(--text); }
h1 small, h2 small { font: 400 1rem var(--text); color: var(--haze); }
h1, h2, h3, .status-line { text-wrap: balance; }
[id] { scroll-margin-top: 16px; }
a, button, .chip, .tab, summary { touch-action: manipulation; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--bone); color: var(--night); font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main:focus { outline: none; }
.lead-in { max-width: 62ch; color: var(--haze); font-size: 1.05rem; }
p { margin: 0 0 1em; }

/* Header */
.top {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
	max-width: 1180px; margin: 0 auto; padding: 18px 16px 14px; border-bottom: 1px solid var(--seam);
}
.top-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.online-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border: 1px solid var(--seam); border-radius: 14px; font-size: .9rem; color: var(--cloud); text-decoration: none; background: rgba(19, 32, 48, .55); }
.online-chip:hover { border-color: var(--bone-dim); color: var(--cloud); }
.online-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.online-chip.is-up .dot { background: var(--venom); }
.online-chip.is-down .dot { background: var(--blood); }
.nav-gap { width: 1px; height: 18px; background: var(--seam); }
.brand { display: block; line-height: 0; }
.brand img { display: block; height: 54px; width: auto; }
nav { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; }
nav a { color: var(--cloud); text-decoration: none; }
nav a:hover { color: var(--bone); }
nav .gm-link { color: var(--venom); }
nav form { margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--cloud); font: inherit; cursor: pointer; }
button.link:hover { color: var(--bone); }
button.link small { color: var(--haze); }

main { max-width: 1180px; margin: 0 auto; padding: 28px 16px 56px; }
footer { max-width: 1180px; margin: 0 auto; padding: 20px 16px 32px; border-top: 1px solid var(--seam); color: var(--haze); font-size: .85rem; }

/* Buttons */
.button, button[type=submit]:not(.link) {
	display: inline-block; padding: 9px 20px; font: 700 1rem var(--text); color: #fff4ec; cursor: pointer; text-decoration: none;
	background: linear-gradient(#b8221f, #8a1416); border: 1px solid #d1453f; border-radius: 2px; box-shadow: 0 1px 0 #000;
}
.button:hover, button[type=submit]:not(.link):hover { background: linear-gradient(#c92a26, #9a181a); color: #fff; }
.button.quiet { background: transparent; color: var(--bone); border-color: var(--bone-dim); box-shadow: none; }
.button.quiet:hover { background: rgba(230, 212, 198, .08); color: #f4e7dc; }
.button.small { padding: 4px 12px; font-size: .9rem; }
nav .button.small { color: #fff4ec; }
button[type=submit]:not(.link) { margin-top: 14px; }
button.danger[type=submit]:not(.link) { background: transparent; color: var(--blood); border-color: #7a3430; box-shadow: none; }
button:disabled, button[type=submit]:disabled { opacity: .45; cursor: not-allowed; }

/* Forms */
label { display: block; margin: 12px 0 4px; color: var(--haze); font-size: .95rem; }
input, select, textarea {
	display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; font-size: 1rem; color: var(--cloud);
	background: var(--hull-deep); border: 1px solid var(--seam); border-radius: 2px;
}
select { width: auto; padding: 7px 9px; background-color: var(--hull-deep); color: var(--cloud); }
option { background-color: var(--hull-deep); color: var(--cloud); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bone); }
.forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; margin-top: 8px; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions button[type=submit] { margin-top: 0; }
.form-actions .danger { margin-left: auto; }

/* Surfaces */
.card { background: var(--hull); border: 1px solid var(--seam); border-radius: 2px; padding: 22px; }
.narrow { max-width: 460px; margin: 0 auto; }
.hint { color: var(--haze); font-size: .9rem; }
.center { text-align: center; }
.dim { color: var(--haze); }
.warn { color: var(--amber); }
.online { color: var(--venom); font: 500 .9rem var(--text); }
.back { margin: 0 0 14px; font-size: .95rem; }
.flash { padding: 10px 14px; border-left: 3px solid var(--seam); background: var(--hull); }
.flash.error { border-color: var(--blood); }
.flash.ok { border-color: var(--venom); }
.flash.gm { border-color: var(--bone); }

/* Join page */
.hero.small { padding: 8px 0 16px; }
.hero.small h1 { font-size: 2.6rem; }
.hero.small p { max-width: 60ch; color: var(--haze); }

/* Home. The key art is the loud thing: full width under the header, with the logo painted in. The live status sits
   right under it, quieter but still large, then the feature cards. */
.hero-art { position: relative; margin: 0; background: #0c1016; overflow: hidden; }
.hero-art img { display: block; width: 100%; height: auto; min-height: 240px; max-height: 640px; object-fit: cover; object-position: 33% 50%; }
.hero-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, rgba(30, 37, 45, 0), var(--night)); pointer-events: none; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; padding: 4px 0 30px; border-bottom: 1px solid var(--seam); }
.status-line { font: 600 clamp(2rem, 3.8vw, 3.3rem)/1.05 var(--display); letter-spacing: -.01em; margin: 0 0 14px; max-width: 22ch; }
.signal { display: inline-block; width: .32em; height: .32em; border-radius: 50%; vertical-align: .3em; margin-right: .2em; }
.is-up .signal { background: var(--venom); box-shadow: 0 0 0 0 rgba(143, 209, 106, .6); animation: signal 2.4s ease-out 3; }
.is-down .signal { background: var(--blood); }
@keyframes signal { 0% { box-shadow: 0 0 0 0 rgba(143, 209, 106, .6); } 100% { box-shadow: 0 0 0 .45em rgba(143, 209, 106, 0); } }
.rates { max-width: 60ch; font-size: 1.1rem; color: var(--haze); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }

/* The five feature cards from the brand sheet. Their labels are painted in, so the links carry them as text too. */
.features { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 26px 0; border-bottom: 1px solid var(--seam); }
.feature { display: block; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px #3a3530, 0 6px 16px rgba(5, 8, 12, .4); }
.feature img { display: block; width: 100%; height: auto; transition: transform .25s ease, filter .25s ease; }
.feature:hover img, .feature:focus-visible img { transform: scale(1.03); filter: brightness(1.12); }
.cta + .hint { margin-top: 12px; }

.bosses h2, .home-aside h2, .news-list h2, .how h2 { font-size: 1.5rem; }
.bosses { padding: 4px 0 0 24px; border-left: 1px solid var(--seam); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(52, 80, 110, .55); }
.rows li:last-child { border-bottom: 0; }
.rows small { color: var(--haze); }
.rows b { font-weight: 500; font-variant-numeric: tabular-nums; }
.state { font-weight: 500; white-space: nowrap; }
.state.up { color: var(--venom); }
.state.down { color: var(--blood); }
.owner { color: var(--bone); }

.home-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; padding: 32px 0; border-bottom: 1px solid var(--seam); }
.home-aside { display: grid; gap: 30px; align-content: start; padding-left: 24px; border-left: 1px solid var(--seam); }
.news-list { max-width: 72ch; }
.post + .post { margin-top: 26px; }
.post-title { font: 600 1.55rem/1.15 var(--display); margin: 0 0 2px; }
.post-title a { color: var(--cloud); text-decoration: none; }
.post-title a:hover { color: var(--bone); }
.post-meta { margin: 0 0 8px; color: var(--haze); font-size: .9rem; }
.post-body p { margin: 0 0 .8em; }
.how { padding-top: 32px; max-width: 72ch; }
.steps { margin: 0; padding-left: 1.4em; }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps li::marker { color: var(--bone); font: 600 1.25rem var(--display); }

/* Bosses */
.boss-section { margin-top: 28px; }
.boss-rows { max-width: 640px; }
.boss-bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 32px; }
.boss-band h3 { margin: 14px 0 4px; font: 600 1.25rem var(--display); color: var(--bone); }
.boss-band h3 small { font: 400 .85rem var(--text); color: var(--haze); }
.boss-band .rows li { padding: 4px 0; font-size: .95rem; }
.filter-links { display: flex; gap: 18px; margin: 0 0 6px; }
.filter-links a { text-decoration: none; color: var(--haze); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.filter-links a:hover { color: var(--cloud); }
.filter-links a[aria-current] { color: var(--cloud); border-bottom-color: var(--crimson); }

/* Server info */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 32px; margin: 0 0 28px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(52, 80, 110, .55); }
.facts dt { color: var(--haze); }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-table { max-width: 480px; margin-top: 8px; }
.price-table caption { text-align: left; padding-bottom: 6px; }
.price-table tfoot td { font-weight: 700; border-top: 1px solid var(--seam); border-bottom: 0; }

/* Join page: the wide brand banner above the forms */
.join-banner { margin: 0 0 22px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px #46525f, 0 12px 30px rgba(5, 8, 12, .45); }
.join-banner img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: cover; object-position: 50% 45%; }
code.secret { font: 700 1.15rem var(--text); letter-spacing: .06em; color: var(--cloud); background: var(--hull-deep); padding: 1px 8px; border-radius: 2px; user-select: all; }

/* News page */
.reading { max-width: 760px; margin: 0 auto; }
.post-window + .post-window { margin-top: 16px; }
.post-window .window-title a { color: var(--cloud); text-decoration: none; }
.pager { display: flex; gap: 20px; justify-content: center; align-items: center; margin-top: 24px; color: var(--haze); }

/* Game-style windows: the character page mirrors the client's own panels, framed in bronze. */
.window { background: var(--hull); border: 1px solid #46525f; border-radius: 3px; box-shadow: inset 0 0 0 1px #0d1724, 0 8px 24px rgba(5, 10, 18, .35); }
.window-title {
	margin: 0; padding: 7px 14px; font: 600 1.25rem/1.2 var(--display); color: var(--bone);
	background: linear-gradient(#2c1e21, #1d1518); border-bottom: 1px solid #5a1d1f; border-radius: 2px 2px 0 0;
}
.window-body { padding: 14px 16px; }
main > .window + .window { margin-top: 16px; }

/* Character list */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.char { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; color: var(--cloud); text-decoration: none; }
.char:hover { border-color: var(--bone); color: var(--cloud); }
.char .name { font: 600 1.6rem/1.1 var(--display); color: var(--bone); }
.char .meta { color: var(--haze); font-size: .9rem; }

/* Character page */
.char-head { margin-bottom: 16px; }
.head-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.char-head h1 { margin: 0; font-size: 2.8rem; }
.char-head .title { margin: 0; color: #ecf9a2; }
.char-head .meta { margin: 2px 0 0; color: var(--haze); }
.char-head .clan { color: var(--cloud); }
.purse { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.coin { display: inline-flex; align-items: center; gap: 8px; color: var(--haze); }
.coin img { border: 1px solid #000; border-radius: 2px; }
.coin b { color: var(--cloud); font-weight: 700; font-variant-numeric: tabular-nums; }

.char-grid { display: grid; grid-template-columns: minmax(270px, 1fr) auto minmax(270px, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.bars { display: grid; gap: 7px; margin-bottom: 12px; }
.bar { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; margin: 0; font-size: .82rem; color: var(--cloud); }
.bar-name { color: var(--haze); font-weight: 700; }
.bar-val { font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 11px; border: 1px solid #000; border-radius: 2px; background: #0a1220; box-shadow: 0 0 0 1px #2c4058; }
progress::-webkit-progress-bar { background: #0a1220; }
.cp progress::-webkit-progress-value { background: linear-gradient(#f0c35c, #a2741f); } .cp progress::-moz-progress-bar { background: #c99a3c; }
.hp progress::-webkit-progress-value { background: linear-gradient(#ef5b51, #9c211c); } .hp progress::-moz-progress-bar { background: #c43a33; }
.mp progress::-webkit-progress-value { background: linear-gradient(#5d9cf0, #1f4c98); } .mp progress::-moz-progress-bar { background: #3a70c4; }
.exp progress::-webkit-progress-value { background: linear-gradient(#e2e8f0, #7d8ca0); } .exp progress::-moz-progress-bar { background: #aab5c4; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 18px; margin: 0 0 10px; padding: 10px 0 0; border-top: 1px solid var(--seam); }
.stat-grid div { display: flex; justify-content: space-between; gap: 8px; }
.stat-grid dt { color: var(--haze); font-size: .9rem; }
.stat-grid dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.stat-grid.base { grid-template-columns: repeat(3, 1fr); }
.attrs { margin: 5px 0; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.attr-label { color: var(--haze); min-width: 60px; }

/* Item cells */
.cell {
	position: relative; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none;
	background: var(--hull-deep); border: 1px solid #2f4560; border-radius: 3px; box-shadow: inset 0 0 0 1px #000, inset 0 0 8px rgba(0, 0, 0, .7);
	text-decoration: none;
}
.cell img { width: 40px; height: 40px; display: block; border-radius: 2px; }
a.cell:hover, a.cell:focus-visible { border-color: var(--bone); outline: none; z-index: 5; }
.cell.chosen { border-color: var(--bone); box-shadow: 0 0 0 1px var(--bone), 0 0 10px rgba(230, 212, 198, .35); }
.cell[hidden] { display: none; }
.cell.g-d { border-color: #3c5068; } .cell.g-c { border-color: #33573e; } .cell.g-b { border-color: #2c4f75; }
.cell.g-a { border-color: #6a5a2c; } .cell.g-s, .cell.g-s80, .cell.g-s84 { border-color: #7a3a36; }
.badge-enchant, .badge-count { position: absolute; font: 700 11px/1 var(--text); text-shadow: 0 0 2px #000, 0 0 2px #000, 0 0 3px #000; pointer-events: none; }
.badge-enchant { top: 3px; left: 3px; color: #9fd8ff; }
.badge-count { right: 3px; bottom: 3px; color: #fff; }
.cell.empty { background: #17263a; border-style: dashed; border-color: #2f4560; box-shadow: none; }
.cell.filler { background: #111d2c; border-color: #1d2c3f; box-shadow: none; }
.slot-name { font-size: 9px; line-height: 1.05; color: #5f7896; text-align: center; padding: 2px; overflow: hidden; }
.cell.big { width: 74px; height: 74px; }
.cell.big img { width: 64px; height: 64px; }

.tip {
	display: none; position: absolute; left: 50px; top: -2px; z-index: 10; width: 260px; padding: 9px 11px;
	background: rgba(6, 10, 16, .96); border: 1px solid #5a6a80; border-radius: 3px; box-shadow: 0 8px 22px rgba(0, 0, 0, .7);
	font-size: .82rem; line-height: 1.4; text-align: left; pointer-events: none; color: var(--cloud);
}
a.cell:hover .tip, a.cell:focus-visible .tip { display: block; }
.d-name { display: block; font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.d-line { display: block; color: var(--haze); }
.d-line b { color: var(--cloud); }
.detail .d-name { font-size: 1.1rem; }
.detail .d-line { font-size: .9rem; }

.paperdoll { display: grid; gap: 6px; justify-items: center; padding: 12px; background: radial-gradient(ellipse at 50% 40%, #33404f 0, #171d25 72%); border: 1px solid #0d1724; border-radius: 3px; }
.pd-row { display: flex; gap: 6px; }
.detail-head { display: flex; gap: 14px; align-items: flex-start; }
.detail-text { min-width: 0; }
.detail h3 { margin-top: 18px; color: var(--bone); }
.enchant-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.enchant-form label { margin: 0; }
.enchant-form select { display: block; margin-top: 4px; }
.enchant-form button[type=submit] { margin-top: 0; }

.request { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; border-left: 3px solid var(--seam); background: var(--hull-deep); }
.request-done { border-color: var(--venom); }
.request-failed { border-color: var(--blood); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--seam); border-top-color: var(--crimson); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bag */
.bag { margin-bottom: 16px; }
.bag-tabs { display: flex; gap: 2px; padding: 0 8px; align-items: flex-end; }
.tab { padding: 8px 16px 6px; font: 600 1.2rem var(--display); color: var(--haze); background: none; cursor: pointer; border: 1px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0; margin-top: 6px; }
.tab[aria-selected=true] { color: var(--bone); background: var(--hull); border-color: #5a1d1f; margin-bottom: -1px; }
.tab small { font: 400 .8rem var(--text); color: var(--haze); }
.bag:not(.js) .bag-tabs .tab { pointer-events: none; }
.bag.js .bag-title { display: none; }
.bag-title { font-size: 1.2rem; margin: 8px 0; flex-basis: 100%; }
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 12px; font: 500 .9rem var(--text); color: var(--haze); background: var(--hull-deep); border: 1px solid var(--seam); border-radius: 14px; cursor: pointer; }
.chip:hover { color: var(--cloud); border-color: var(--bone-dim); }
.chip[aria-pressed=true] { color: #fff4ec; background: var(--crimson); border-color: #d1453f; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-search { width: auto; flex: 1 1 200px; margin: 0; }
.filter-row select { margin: 0; }
.f-check { margin: 0; display: flex; align-items: center; gap: 6px; }
.f-check input { width: auto; margin: 0; display: inline; }
.bag-grid { display: flex; flex-wrap: wrap; gap: 3px; padding: 8px; background: #0f1a28; border: 1px solid #0a1220; border-radius: 3px; box-shadow: 0 0 0 1px var(--seam); }
.bag-grid[hidden] { display: none; }
.bag-grid > .hint { flex-basis: 100%; margin: 6px 2px; }

.enchant { color: #9fd8ff; }
.augment { color: #e6a0ff; }
.el-fire { color: #ff7a5c; } .el-water { color: #5cb8ff; } .el-wind { color: #9be38a; }
.el-earth { color: #d9b56a; } .el-holy { color: #fff1b0; } .el-dark { color: #b48cff; }
.grade { font: 700 .7rem var(--text); padding: 1px 5px; border-radius: 2px; background: #1b2c40; color: var(--haze); vertical-align: 2px; }
.grade.g-d { color: #a9c6e6; } .grade.g-c { color: #8fd29f; } .grade.g-b { color: #7fc0ff; }
.grade.g-a { color: #f0d070; } .grade.g-s, .grade.g-s80, .grade.g-s84 { color: #ff9a90; }

/* Tables: rankings and GM tools */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.ranking { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ranking th { text-align: left; font: 500 .85rem var(--text); color: var(--haze); padding: 4px 6px; border-bottom: 1px solid var(--seam); }
.ranking td { padding: 7px 6px; border-bottom: 1px solid rgba(52, 80, 110, .5); vertical-align: top; }
.ranking small { color: var(--haze); }
.ranking .num { text-align: right; font-variant-numeric: tabular-nums; }
.ranking .rank { color: var(--bone); width: 28px; font: 600 1.15rem var(--display); }
.table-scroll { overflow-x: auto; }
.status-done { color: var(--venom); } .status-failed { color: var(--blood); } .status-pending { color: var(--amber); }
.gm-tag { color: var(--venom); }
.search-form { display: flex; gap: 8px; margin-bottom: 14px; }
.search-form input { margin: 0; }
.search-form button[type=submit] { margin-top: 0; }

@media (max-width: 1060px) {
	.char-grid { grid-template-columns: 1fr 1fr; }
	.status { grid-row: span 2; }
}

@media (max-width: 860px) {
	.home-top, .home-body { grid-template-columns: 1fr; gap: 28px; }
	.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nav-gap { display: none; }
	.bosses, .home-aside { padding-left: 0; border-left: 0; }
}

@media (max-width: 760px) {
	.char-grid { grid-template-columns: 1fr; }
	.status { grid-row: auto; }
}

@media (max-width: 520px) {
	body { font-size: 16px; }
	.cell { width: 42px; height: 42px; }
	.cell img { width: 36px; height: 36px; }
	.pd-row { gap: 4px; }
	.paperdoll { padding: 8px 4px; }
	.tip { left: auto; right: -2px; top: 48px; width: 230px; }
	.purse { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	.is-up .signal { animation: none; }
	.feature img { transition: none; }
	.spinner { animation-duration: 2.4s; }
}
