/* The clan's colours: a dark server list, an inventory grid, and the purple
   the bot already uses in its embeds. Everything is one column on a phone,
   because most of the clan is reading this on one. */

:root {
  --ink: #e8e6ef;
  --ink-quiet: #a09db3;
  --bg: #14131a;
  --panel: #1d1c26;
  --panel-edge: #2c2a38;
  --accent: #8b6ce7;
  --accent-quiet: #4b3d80;
  --good: #57c98a;
  --warn: #e0b357;
  --bad: #e06b6b;
  --slot: #2a2833;
  --slot-edge: #3a3746;
  --radius: 10px;
  --wide: 1480px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #00000055; padding: 0 .3em; border-radius: 4px; font-size: .92em; }
h1 { font-size: 1.9rem; margin: 0 0 .4em; }
h2 { font-size: 1.15rem; margin: 0 0 .5em; }
h3 { font-size: 1rem; margin: 0; }

main { max-width: var(--wide); margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* ---- chrome ---- */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 64px; padding: .65rem max(1rem, calc((100vw - var(--wide)) / 2));
  background: #0f0e14e8; border-bottom: 1px solid var(--panel-edge);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #6045b3); color: white; }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.site-nav { display: flex; align-items: center; gap: .35rem; }
.inline { display: inline-flex; margin: 0; }
.icon-button {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-quiet); cursor: pointer;
}
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover, .icon-button:focus-visible { color: var(--ink); background: var(--panel); border-color: var(--panel-edge); text-decoration: none; }
.icon-button::after {
  content: attr(data-tooltip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  display: none; width: max-content; padding: .3rem .5rem; border: 1px solid var(--panel-edge); border-radius: 5px;
  background: #09080d; color: var(--ink); font-size: .72rem; font-weight: 500; pointer-events: none;
}
.icon-button:hover::after, .icon-button:focus-visible::after { display: block; }
html[data-page="kits"] .nav-kits, html[data-page="profiles"] .nav-profiles, html[data-page="economy"] .nav-economy, html[data-page="me"] .nav-me, html[data-page="staff"] .nav-staff, html[data-page="chatlog"] .nav-chatlog { color: white; background: var(--accent-quiet); }

footer {
  max-width: var(--wide); margin: 0 auto; padding: 1.5rem 1rem 3rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--ink-quiet); border-top: 1px solid var(--panel-edge); font-size: .9rem;
}

.button {
  display: inline-block; padding: .55rem 1.1rem; border-radius: var(--radius);
  background: var(--accent); color: #fff; border: 0; font: inherit; cursor: pointer;
}
.button:hover { background: #9a80ec; text-decoration: none; transform: translateY(-1px); }
.button:active { transform: translateY(0); background: #7a5cd6; }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.button[disabled] { opacity: .45; cursor: not-allowed; transform: none; background: var(--panel); border: 1px solid var(--panel-edge); color: var(--ink-quiet); }
/* Getting something and giving something up, coloured the way the bot's
   buttons already are in Discord. */
.button--buy { background: #2f7d55; }
.button--buy:hover { background: #379462; }
.button--sell { background: #a04747; }
.button--sell:hover { background: #b85555; }
.button--ghost:hover { background: var(--accent-quiet); }
.button--big { padding: .8rem 1.6rem; font-size: 1.05rem; }
.button--compact { padding: .42rem .8rem; font-size: .88rem; }
.button--ghost { background: transparent; border: 1px solid var(--accent-quiet); color: var(--ink); }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

.notices { list-style: none; max-width: var(--wide); margin: 1rem auto 0; padding: 0 1rem; }
.notice { padding: .6rem .9rem; border-radius: var(--radius); background: var(--panel); border-left: 3px solid var(--accent); margin-bottom: .4rem; }
.notice.success { border-left-color: var(--good); }
.notice.warning { border-left-color: var(--warn); }
.notice.error { border-left-color: var(--bad); }

.meta, .hint { color: var(--ink-quiet); font-size: .88rem; }
.meta { display: inline-block; margin-right: .5rem; }
.lede { color: var(--ink-quiet); max-width: 62ch; }
.breadcrumb { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; color: var(--ink-quiet); font-size: .88rem; }

/* ---- the front page ---- */

html[data-page="home"] main { max-width: min(1680px, 100%); padding-top: 1rem; }
.hero { position: relative; min-height: 70vh; display: grid; align-items: end; overflow: hidden; border: 1px solid var(--panel-edge); border-radius: 18px; }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease-in-out;
}
/* Only the first image is shown without JavaScript; the rest are there for
   the fade, which a browser with scripting off simply never starts. */
.hero-bg.is-first, .hero-bg.is-showing { opacity: 1; }
.hero-bg--empty { background: radial-gradient(circle at 30% 20%, #2c2350, #14131a 70%); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #14131a33, #14131aee 78%); }
.hero-text { position: relative; z-index: 1; max-width: var(--wide); margin: 0 auto; padding: 4rem 1rem 2.5rem; width: 100%; }
.hero-text h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: .04em; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }

.eyebrow { margin: 0 0 .35rem; color: #b9a7f4; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 2rem 0; }
.tile { background: linear-gradient(145deg, #211f2c, var(--panel)); border: 1px solid var(--panel-edge); border-radius: 14px; padding: 1.2rem 1.35rem; }
.tile strong { display: block; font-size: 2rem; }
.tile span { color: var(--ink-quiet); font-size: .88rem; }
.tiles--home { max-width: 1100px; margin-inline: auto; }
.feature-grid, .profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.feature-card { padding: 1.4rem; border: 1px solid var(--panel-edge); border-radius: 14px; background: var(--panel); color: var(--ink); transition: transform .16s ease, border-color .16s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: var(--accent-quiet); text-decoration: none; }
.feature-card p { min-height: 3em; color: var(--ink-quiet); }
.feature-card > strong { color: #b9a7f4; font-size: .88rem; }
.feature-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 1rem; border-radius: 10px; background: var(--accent-quiet); font-size: 1.35rem; line-height: 1; }
.profile-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--panel-edge); border-radius: 14px; background: var(--panel); color: var(--ink); }
.profile-card:hover { border-color: var(--accent-quiet); text-decoration: none; }
.profile-card > span:nth-child(2) { display: grid; }
.profile-card small { color: var(--ink-quiet); }
.profile-card-arrow { margin-left: auto; color: var(--ink-quiet); font-size: 1.8rem; }
.public-profile { max-width: 900px; margin: 0 auto; }
.profile--large { margin: 2rem 0; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 1rem 0; }
.profile-stats div { padding: 1rem; border: 1px solid var(--panel-edge); border-radius: 12px; background: var(--panel); }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats strong { font-size: 1.5rem; }
.profile-stats span { color: var(--ink-quiet); font-size: .85rem; }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.columns article, .panel {
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem;
}
.panel--quiet { background: #191822; }

/* ---- profile ---- */

.profile { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.avatar { border-radius: 50%; border: 2px solid var(--accent-quiet); }
.progress { background: var(--slot); height: 10px; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #b493ff); }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .35rem 0; border-bottom: 1px solid var(--panel-edge); }
.list li:last-child { border-bottom: 0; }
.leaderboard { list-style: none; margin: 0; padding: 0; }
.leaderboard li { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--panel-edge); }
.leaderboard li:last-child { border-bottom: 0; }
.leaderboard-rank { color: var(--ink-quiet); font-variant-numeric: tabular-nums; }
.leaderboard-member { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.leaderboard-member img { border-radius: 50%; }

.pill {
  display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .78rem;
  background: var(--accent-quiet); color: #eee; margin-right: .3rem;
}
.pill--delivered, .pill--committed { background: #2f6b4a; }
.pill--cancelled, .pill--lost { background: #6b2f2f; }
.roles { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ---- the shelf ---- */

.search { display: flex; gap: .5rem; align-items: center; margin: 1rem 0 1.5rem; flex-wrap: wrap; }

/* The magnifier sits inside the field rather than beside it, so the box
   reads as a search box before anybody has typed in it. */
.search-field { position: relative; display: flex; align-items: center; flex: 1 1 20rem; max-width: 30rem; }
.search-icon {
  position: absolute; left: .7rem; width: 18px; height: 18px; pointer-events: none;
  fill: none; stroke: var(--ink-quiet); stroke-width: 1.8; stroke-linecap: round;
}
.search-field:focus-within .search-icon { stroke: var(--accent); }

.search input,
.stack input[type="text"], .stack input[type="url"], .stack input[type="number"],
form input[type="text"], form input[type="url"], form input[type="number"],
form input[type="search"], form input[type="email"], form input[type="password"],
form input[type="file"],
form select {
  background: #0f0e14; border: 1px solid var(--panel-edge); color: var(--ink);
  border-radius: var(--radius); padding: .5rem .7rem; font: inherit; min-width: 8rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.search input:hover, form input:hover, form select:hover { border-color: var(--accent-quiet); }
/* A file input is a text field with a button welded to its left, and the
   button is the browser's own — unstyled, it is a pale slab in the middle of
   a dark page. Dressing it as one of ours is the whole fix. */
form input[type="file"] { padding: .35rem .5rem; cursor: pointer; }
form input[type="file"]::file-selector-button {
  margin-right: .6rem; padding: .35rem .75rem; border: 0; border-radius: 7px;
  background: var(--accent-quiet); color: var(--ink); font: inherit; font-size: .88rem;
  font-weight: 650; cursor: pointer; transition: background .16s ease;
}
form input[type="file"]:hover::file-selector-button { background: var(--accent); }
form input[type="file"]:focus-visible::file-selector-button { background: var(--accent); }
.search input:focus, form input:focus, form select:focus, .bio-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #8b6ce733;
}
.search input::placeholder, form input::placeholder { color: #6f6b85; }
/* After `.search input`, not before: the shorthand `padding` there would
   otherwise win on equal specificity and put the text under the magnifier. */
.search-field input { width: 100%; padding-left: 2.4rem; }
/* The browser's own clear cross is invisible against a dark field. */
.search input::-webkit-search-cancel-button,
form input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); cursor: pointer; }
.search button, .stack button, form button.button { cursor: pointer; }
.search .hint { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.action-panel { display: grid; grid-template-columns: minmax(160px, .35fr) 1fr; gap: 1.25rem; align-items: start; }
.bio-form { display: grid; gap: .7rem; justify-items: start; }
.bio-form textarea { width: 100%; resize: vertical; background: #0f0e14; border: 1px solid var(--panel-edge); border-radius: 9px; padding: .7rem; color: var(--ink); font: inherit; }
.inline-field { display: flex; align-items: center; gap: .4rem; color: var(--ink-quiet); font-size: .9rem; }

.shelf { margin-bottom: 2rem; }
.level-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.level-heading h2 { margin: 0; }
.next-rank { margin-top: .8rem; }
.profile-bio p { margin: 0; }
.switch-form { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
/* A search box the width of the page reads as the page's search rather than
   as this panel's, and there is a button that has to sit next to it. */
.switch-form .field { flex: 0 1 22rem; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.game { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.game h2 { margin-bottom: .3rem; }
.game .meta { display: block; margin-bottom: .9rem; }
.game-form { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; }
.game-form .field { flex: 0 1 8rem; }
.tile--inline { margin: 0; padding: .8rem 1.1rem; }
.tile--inline strong { font-size: 1.5rem; }
.feature-card--quiet { opacity: .75; }
.feature-card--quiet:hover { transform: none; }
.admin-form { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.admin-form .field { flex: 0 1 10rem; }
.admin-drop { margin-top: .9rem; border-top: 1px solid var(--panel-edge); padding-top: .7rem; }
.admin-drop > summary { cursor: pointer; color: var(--ink-quiet); font-size: .9rem; }
.admin-drop > summary:hover, .admin-drop[open] > summary { color: var(--ink); }
.pay-form, .buy-form, .gift-fields { display: flex; align-items: flex-end; gap: .5rem; flex-wrap: wrap; }
.buy-form input[type="number"] { width: 5rem; }
.gift-form, .redeem-form { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--panel-edge); }
.gift-form h3, .redeem-form h3 { margin-bottom: .5rem; }
.redeem-form .inline-field { margin-right: .8rem; }
.redeem-form input[type="number"] { width: 4.5rem; }
.redeem-form button { margin-top: .6rem; }
.kit-order { display: flex; align-items: flex-end; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.kit-order .field { flex: 0 1 7rem; }
.quote-totals { display: grid; gap: .4rem; margin: 1rem 0; }
.quote-totals div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--panel-edge); padding-bottom: .3rem; }
.quote-totals dt { color: var(--ink-quiet); }
.quote-totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 650; }
.quote-totals .quote-total dd { font-size: 1.3rem; }
.quote-confirm { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.cart-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row-actions { text-align: right; }
.kits-more { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1.25rem; }
.kits-more.is-loading { opacity: .5; }
.kits-more .hint { margin: 0; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.shelf-head h2 { margin: 0; }
.kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(430px, 100%), 1fr)); gap: 1rem; }
.kit { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 1rem; }
.kit header { display: flex; gap: .9rem; align-items: center; margin-bottom: .8rem; }
.kit-icon { width: 48px; height: 48px; image-rendering: pixelated; }

/* A shulker box: nine across, three down, as the game draws it. */
.shulker {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px;
  background: #0f0e14; padding: 4px; border-radius: 6px; border: 1px solid var(--slot-edge);
}
.slot {
  position: relative; aspect-ratio: 1; background: var(--slot);
  border: 1px solid var(--slot-edge); border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
}
.slot img { width: 100%; height: 100%; image-rendering: pixelated; }
.slot b {
  position: absolute; right: 2px; bottom: -2px; font-size: clamp(.68rem, 1.5vw, .9rem);
  text-shadow: 1px 1px 0 #000; font-weight: 700;
}
.slot--full { cursor: help; }
.slot-details {
  display: none; position: absolute; z-index: 10; left: 50%; bottom: calc(100% + 8px);
  width: max-content; max-width: 240px; transform: translateX(-50%); padding: .55rem .7rem;
  background: #09080d; border: 1px solid var(--accent-quiet); border-radius: 6px;
  color: var(--ink); font-size: .78rem; line-height: 1.35; text-align: left;
  box-shadow: 0 6px 20px #000a; pointer-events: none;
}
.slot-details strong, .slot-details span { display: block; }
.slot-details span { color: var(--ink-quiet); }
.slot--full:hover .slot-details, .slot--full:focus .slot-details { display: block; }
.slot--full:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.shulker--closed .slot { background: #201f29; }

/* An enchanted item glows in the game, so it flickers here — faintly, in the
   purple everything else on the site is. Faint on purpose: a shulker of
   enchanted books is 27 of these at once, and the job is to catch the eye,
   not to strobe at it. */
@keyframes enchant-flicker {
  0%, 100% { opacity: .38; }
  35%      { opacity: .7; }
  55%      { opacity: .48; }
  78%      { opacity: .88; }
}
/* No edge of its own: the glow sits inside the slot, over the item, the way
   the game's own glint does. `inset: 0` rather than -1px so it stops short
   of the slot's own border instead of painting a ring over it, which is
   what read as a border. The colours are the brighter pass from main. */
.slot--enchanted::after {
  content: ""; position: absolute; inset: 0; border-radius: 2px;
  pointer-events: none; opacity: .55;
  background: radial-gradient(circle at 50% 45%, #bd9eff66, #956fff00 72%);
  animation: enchant-flicker 2.6s ease-in-out infinite;
}
/* Out of step with each other. A grid of slots pulsing together stops
   reading as items glinting and starts reading as the page blinking. */
.slot--enchanted:nth-child(2n)::after { animation-duration: 3.1s; animation-delay: -.7s; }
.slot--enchanted:nth-child(3n)::after { animation-duration: 2.2s; animation-delay: -1.4s; }
.slot--enchanted:nth-child(5n)::after { animation-duration: 3.7s; animation-delay: -2.1s; }
/* The count has to stay readable through the glow. */
.slot b { z-index: 2; }
.slot-details .slot-enchant { color: #b493ff; }
.slot-details .slot-lore { color: #8f8aa8; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .slot--enchanted::after { animation: none; opacity: .65; }
}

.empty { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 2rem; text-align: center; }
.empty .shulker { max-width: 320px; margin: 0 auto 1.5rem; opacity: .5; }
.empty p { max-width: 60ch; margin-inline: auto; }

table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
th, td { text-align: left; padding: .45rem .3rem; border-bottom: 1px solid var(--panel-edge); }
th { color: var(--ink-quiet); font-weight: 600; font-size: .85rem; }
td .meta { display: block; }

.site-icon-preview { display: block; width: 80px; height: 80px; margin-bottom: 1rem; border: 1px solid var(--panel-edge); border-radius: 16px; object-fit: cover; }
.thumbs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-top: 1rem; }
.thumbs img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; border: 1px solid var(--panel-edge); }
.thumbs span { display: block; font-size: .8rem; color: var(--ink-quiet); }

/* ---- item textures, on the staff page ---- */

.textures { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: .8rem; }
.texture {
  display: grid; grid-template-columns: 48px 1fr; gap: .5rem .8rem; align-items: center;
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: .7rem .8rem;
}
/* Nearest-neighbour: these are 16x16 pictures shown at three times the size,
   and smoothing them turns a Minecraft texture into a smudge. */
.texture img { width: 48px; height: 48px; image-rendering: pixelated; background: #101018; border-radius: 4px; }
.texture-about { min-width: 0; }
.texture-about strong { display: block; }
.texture-about .meta { display: block; font-size: .78rem; word-break: break-all; }
.texture-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.texture-actions input[type="file"] { flex: 1 1 12rem; min-width: 0; font-size: .78rem; }
.texture form { margin: 0; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

/* ---- the market ---- */

.stocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stock {
  display: flex; flex-direction: column; gap: .9rem;
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; scroll-margin-top: 5rem;
}
.stock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.stock-head h2 { margin: 0; letter-spacing: .06em; }
.stock-head .meta { margin: 0; }
.stock-price { text-align: right; }
.stock-price strong { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.change { font-size: .82rem; color: var(--ink-quiet); white-space: nowrap; }
.change--up { color: var(--good); }
.change--down { color: var(--bad); }

/* The line itself. Drawn on the server, so there is nothing to load and
   nothing to run — the SVG is stretched by CSS and the stroke told not to
   stretch with it. */
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: 96px; background: #0f0e14; border: 1px solid var(--panel-edge); border-radius: 8px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: #8b6ce72e; stroke: none; }
.chart--up .chart-line { stroke: var(--good); }
.chart--up .chart-area { fill: #57c98a2e; }
.chart--down .chart-line { stroke: var(--bad); }
.chart--down .chart-area { fill: #e06b6b2e; }
.chart figcaption { display: flex; justify-content: space-between; gap: .5rem; margin-top: .35rem; color: var(--ink-quiet); font-size: .78rem; font-variant-numeric: tabular-nums; }
.chart-title { margin-bottom: .3rem; color: var(--ink-quiet); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; }
.volume svg { height: 88px; }
.volume-axis { stroke: var(--panel-edge); stroke-width: 1; }
.bar { fill: var(--good); }
.bar--sell { fill: var(--bad); }
.chart figcaption .up { color: var(--good); }
.chart figcaption .down { color: var(--bad); }
.chart-empty { margin: 0; padding: 1.6rem .8rem; text-align: center; color: var(--ink-quiet); font-size: .88rem; background: #0f0e14; border: 1px dashed var(--panel-edge); border-radius: 8px; }

.stock-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 0; }
.stock-facts div { min-width: 0; }
.stock-facts dt { color: var(--ink-quiet); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.stock-facts dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }

.supply { display: grid; gap: .35rem; margin: 0; }
.supply .progress { height: 6px; }

.trade-forms { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.trade-form, .order-form { display: flex; align-items: flex-end; gap: .5rem; margin: 0; }
.order-form { flex-wrap: wrap; margin-top: .6rem; }
.field { display: grid; gap: .2rem; flex: 1 1 auto; min-width: 0; }
.field > span { color: var(--ink-quiet); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; }
.field input, .field select { width: 100%; min-width: 0; }

.order-drop > summary { cursor: pointer; color: var(--ink-quiet); font-size: .88rem; padding: .3rem 0; list-style-position: inside; }
.order-drop > summary:hover { color: var(--ink); }
.order-drop[open] > summary { color: var(--ink); }

.row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pill--buy { background: #2f6b4a; }
.pill--sell { background: #6b2f2f; }

@media (max-width: 760px) {
  .site-header { min-height: 56px; }
  .brand > span:last-child { display: none; }
  .hero { min-height: 58vh; border-radius: 12px; }
  .hero-text { padding-bottom: 1.5rem; }
  .feature-grid, .profile-grid, .action-panel { grid-template-columns: 1fr; }
  .stock-facts { grid-template-columns: repeat(2, 1fr); }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 560px) {
  main { padding-inline: .75rem; }
  .shulker { gap: 1px; }
  .button--big { flex: 1 1 auto; text-align: center; }
  .trade-forms { grid-template-columns: 1fr; }
  .search-field { flex-basis: 100%; max-width: none; }
  .search .hint { margin-left: 0; }
  .profile--large { align-items: flex-start; }
}

/* ---- 6b6t chat log ---- */
.chatlog-controls { display: flex; align-items: center; gap: .5rem; color: var(--ink-quiet); font-size: .85rem; }
.chatlog-controls select {
  padding: .35rem .5rem; border-radius: 7px; background: var(--panel);
  border: 1px solid var(--panel-edge); color: var(--ink); font: inherit;
}
.chatlog-note {
  margin: 0 0 1rem; padding: .7rem .9rem; border-radius: var(--radius);
  border: 1px solid var(--panel-edge); border-left: 3px solid var(--bad);
  background: var(--panel); color: var(--ink-quiet); font-size: .88rem;
}
.chatlog {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); padding: .75rem;
  overflow: hidden;
}
/* The lines scroll inside the box rather than the page, so the newest stay
   where the reader is looking and a long log doesn't push the rest away. */
.chatlog-lines {
  display: flex; flex-direction: column; gap: 2px;
  max-height: min(70vh, 720px); overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-edge) transparent;
}
.chatlog-lines::-webkit-scrollbar { width: 8px; }
.chatlog-lines::-webkit-scrollbar-track { background: transparent; }
.chatlog-lines::-webkit-scrollbar-thumb {
  background: var(--panel-edge); border-radius: 4px;
}
.chatlog-lines::-webkit-scrollbar-thumb:hover { background: var(--accent-quiet); }
.chatlog-lines::-webkit-scrollbar-corner { background: transparent; }
.chatlog-status {
  margin: 0 0 .5rem; color: var(--warn); font-size: .8rem;
}
.chatlog-foot { margin: .6rem 0 0; color: var(--ink-quiet); font-size: .8rem; }
.chatline {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem;
  padding: .25rem .4rem; border-radius: 6px; line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .87rem;
  /* Chat is written by strangers on an anarchy server: whatever they typed,
     it stays on its own line and inside this box. */
  overflow-wrap: anywhere;
}
.chatline:nth-child(odd) { background: #ffffff06; }
.chatline-at { flex: none; color: var(--ink-quiet); font-size: .78rem; opacity: .8; }
.chatline-who { flex: none; color: var(--accent); font-weight: 650; }
.chatline-said { flex: 1 1 20ch; min-width: 0; }

/* Everything a member cannot see is boxed and said so, because an admin
   reading the log has no other way to tell which lines they are. */
.chatline--staff {
  background: #e06b6b1a; border: 1px solid var(--bad);
  padding: .4rem .55rem; margin: .2rem 0;
}
.chatline--staff:nth-child(odd) { background: #e06b6b1a; }
.chatline--staff .chatline-said { color: #f3b9b9; }
.chatline-badge {
  flex: none; padding: .05rem .4rem; border-radius: 5px;
  background: var(--bad); color: #1a0f0f;
  font-family: inherit; font-size: .68rem; font-weight: 750;
  letter-spacing: .05em; text-transform: uppercase;
}
