/* Ore UI — the look of Minecraft's current in-game menus: charcoal panels with
   a dark outline, a light top edge and a heavier bottom lip; chunky buttons
   that press down. Game textures only where the game would show them. */
:root {
  --page: #1e1e1f;
  --deep: #141415;
  --panel: #313233;
  --panel-raised: #3c3d3e;
  --tile: #48494a;
  --edge: #0e0e0f;
  --lip: #232324;
  --highlight: #4c4d4f;
  --divider: #434446;
  --text: #ffffff;
  --text-2: #c7c8cb;
  --text-3: #8f9094;
  --green: #3c8527;
  --green-hover: #347523;
  --green-lip: #1d4d13;
  --green-top: #58a53c;
  --stone: #d0d1d4;
  --stone-hover: #e0e1e4;
  --stone-lip: #58585a;
  --stone-top: #ecedee;
  --gold: #ffd84a;
  --radius: 4px;
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--page); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 15px; line-height: 1.5; }
img { image-rendering: pixelated; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }

/* ---- chrome ---- */
.topbar { border-bottom: 2px solid var(--edge); background: var(--deep); position: sticky; top: 0; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: calc(16 * var(--t2, 2px)); height: calc(16 * var(--t2, 2px)); }
.brand span { font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.top-actions { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--panel); border: 2px solid var(--edge);
  font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.pill[data-state="online"] { color: #d6f5c8; }
.pill[data-state="online"]::before { background: #6cd04a; box-shadow: 0 0 0 3px rgba(108, 208, 74, .25); }
.pill[data-state="server"] { color: #cfe0ff; }
.pill[data-state="server"]::before { background: #6ea4ff; }
.pill[data-state="quiet"]::before { background: var(--gold); }

main { flex: 1; padding: 28px 0 40px; }

.panel {
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 var(--highlight), inset 0 -4px 0 var(--lip);
  padding: 18px 20px 22px;
}
.panel h2 {
  margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-3);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px 13px; border: 2px solid var(--edge); border-radius: var(--radius);
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .06s ease;
}
.btn:active { transform: translateY(2px); }
.btn-green {
  color: #fff; background: var(--green);
  box-shadow: inset 0 2px 0 var(--green-top), inset 0 -4px 0 var(--green-lip);
}
.btn-green:hover { background: var(--green-hover); }
.btn-green:active { box-shadow: inset 0 2px 0 var(--green-top), inset 0 -2px 0 var(--green-lip); }
.btn-stone {
  color: #1e1e1f; background: var(--stone);
  box-shadow: inset 0 2px 0 var(--stone-top), inset 0 -4px 0 var(--stone-lip);
}
.btn-stone:hover { background: var(--stone-hover); }
.btn-stone:active { box-shadow: inset 0 2px 0 var(--stone-top), inset 0 -2px 0 var(--stone-lip); }
.btn-small { padding: 5px 14px 9px; font-size: 13px; white-space: nowrap; }
@media (max-width: 520px) {
  #map-button { display: none; }  /* the map card below has the same button */
  .brand span { font-size: 16px; }
}

.link-button { background: none; border: 0; padding: 0; color: var(--text-3); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--text-2); }

/* ---- hero: your latest frame, then who you are and how you are doing ---- */
.hero { padding: 0; overflow: hidden; }
.scene {
  position: relative; aspect-ratio: 16 / 7; min-height: 260px;
  background: var(--deep) center / cover no-repeat;
  border-bottom: 2px solid var(--edge);
}
.scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(20, 20, 21, .15) 0%, rgba(20, 20, 21, 0) 40%, rgba(20, 20, 21, .85) 100%);
}
.scene[data-offline="true"]:not([data-panorama]) { filter: grayscale(.7) brightness(.75); }
.scene-chip {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 4px 10px; border-radius: var(--radius);
  background: rgba(14, 14, 15, .75); color: var(--text-2); font-size: 12px; font-weight: 500;
}
.scene-note {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; gap: 4px;
}
.scene-note strong { font-size: 28px; font-weight: 800; }
.scene-note span { color: var(--text-2); }

/* hearts, hunger and XP sit where the game draws them: bottom centre of the frame */
.vitals-dock { position: absolute; left: 0; right: 0; bottom: 6%; z-index: 1; display: flex; justify-content: center; pointer-events: none; }
.vitals-dock .gui { margin: 0; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); }
/* a fresh advancement pops in top right, like the game's toast */
.toast-dock { position: absolute; top: 12px; left: 0; right: 12px; z-index: 2; display: flex; justify-content: flex-end; pointer-events: none; }
.toast-dock .gui { margin: 0; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5)); }
.toast-dock .gui[data-enter="true"] { animation: toast-in .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes toast-in { from { transform: translateX(calc(100% + 16px)); } to { transform: none; } }
/* on a phone the toast spans the frame and would cover the "Captured" chip */
@media (max-width: 600px) { .scene:has(.toast-dock) .scene-chip { display: none; } }
@media (prefers-reduced-motion: reduce) { .toast-dock .gui[data-enter="true"] { animation: none; } }

/* play time per day */
.pt-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; }
.pt-day { display: grid; grid-template-rows: 18px 120px 20px; gap: 4px; text-align: center; min-width: 0; }
.pt-value { font-size: 11px; font-weight: 700; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-track { position: relative; background: var(--deep); border: 2px solid var(--edge); border-radius: 3px; overflow: hidden; }
.pt-track i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--green); box-shadow: inset 0 2px 0 var(--green-top), inset 0 -3px 0 var(--green-lip); }
.pt-label { font-size: 12px; color: var(--text-3); }
.pt-day[data-today="true"] .pt-label { color: var(--gold); font-weight: 700; }
.pt-day[data-today="true"] .pt-track i { background: #c7901a; box-shadow: inset 0 2px 0 #e7b441, inset 0 -3px 0 #7a5409; }

.identity { display: flex; align-items: center; gap: 18px 24px; padding: 18px 22px 22px; flex-wrap: wrap; }
.avatar {
  width: 72px; height: 72px; flex: none; border: 2px solid var(--edge); border-radius: var(--radius);
  background: var(--tile); box-shadow: inset 0 2px 0 #5d5e60; display: grid; place-items: center; overflow: hidden;
}
.avatar img { width: 64px; height: 64px; }
.who { flex: 1; min-width: 200px; }
.who h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius);
  background: var(--panel-raised); border: 2px solid var(--edge);
  font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.chip b { color: var(--text); font-weight: 700; }

/* ---- dashboard grid ---- */
/* Two balanced columns rather than two hand-filled ones: the browser evens the
   heights itself, so a card appearing or disappearing can't strand one side. */
.grid { columns: 2; column-gap: 20px; margin-top: 20px; }
/* column-gap is horizontal only — the rhythm down a column comes from margin */
.grid > * { break-inside: avoid; margin: 0 0 20px; }
@media (max-width: 860px) {
  .grid { columns: 1; }
  .scene { aspect-ratio: 16 / 10; min-height: 0; }
}

.inventory-well { background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius); padding: clamp(6px, 1.5vw, 12px); }

dl { margin: 0; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--divider); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row:first-child { padding-top: 0; }

/* timeline: one line per thing that happened, oldest first */
.event-list { list-style: none; margin: 0; padding: 0; }
.event { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--divider); }
.event:last-child { border-bottom: 0; padding-bottom: 0; }
.event:first-child { padding-top: 0; }
.event-at { flex: 0 0 auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.event-icon { flex: 0 0 auto; width: 18px; height: 18px; image-rendering: pixelated; }
.event-text { min-width: 0; overflow-wrap: anywhere; }
/* the bookends of a session are context, not news */
.event-session .event-text { color: var(--text-3); }

/* frame archive: one image, a scrubber, and the day's strip under it */
.shots { display: flex; flex-direction: column; gap: 10px; }
.shot-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border-radius: 4px; cursor: zoom-in; }
.shot-caption { margin: 0; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.shot-slider { width: 100%; margin: 0; accent-color: var(--green); }
.shot-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.shot-thumb { flex: 0 0 auto; width: 64px; height: 36px; object-fit: cover; border-radius: 3px; opacity: 0.5; cursor: pointer; transition: opacity 0.15s, outline-color 0.15s; outline: 2px solid transparent; }
.shot-thumb:hover { opacity: 0.85; }
.shot-thumb.is-current { opacity: 1; outline-color: var(--green); }
.shot-pano { align-self: flex-start; }
@media (prefers-reduced-motion: reduce) { .shot-thumb { transition: none; } }
.row dt { color: var(--text-3); }
.row dd { margin: 0; text-align: right; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; word-break: break-word; }

.stats-panel { margin-top: 20px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-head small { color: var(--text-3); font-size: 12px; }
.subhead { margin: 18px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-3); }

/* icon + number tiles (world, statistics) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* an odd one out spans the row instead of leaving a hole */
.tiles-2 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 420px) { .tiles-2 { grid-template-columns: minmax(0, 1fr); } }
.tile {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 9px 12px 11px; border: 2px solid var(--edge); border-radius: var(--radius);
  background: var(--panel-raised); box-shadow: inset 0 2px 0 #505153, inset 0 -3px 0 #2a2b2c;
}
.tile > img { width: calc(16 * var(--t2, 2px)); height: calc(16 * var(--t2, 2px)); flex: none; }
.tile div { min-width: 0; }
.tile .k { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .v { display: block; font-size: 17px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* load bars (machine, advancement progress) */
.meter + .meter { margin-top: 14px; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.meter-head span { font-weight: 700; }
.meter-head b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-note { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* mods panel: one row per installed mod, version right-aligned like .row */
.mod-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.mod-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--divider); }
.mod-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mod-list li:first-child { padding-top: 0; }
.mod-name { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.mod-version { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 14px; background: var(--deep); border: 2px solid var(--edge); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); box-shadow: inset 0 2px 0 var(--green-top), inset 0 -3px 0 var(--green-lip); transition: width .4s ease; }
.bar[data-level="warm"] i { background: #c7901a; box-shadow: inset 0 2px 0 #e7b441, inset 0 -3px 0 #7a5409; }
.bar[data-level="hot"] i { background: #c0392b; box-shadow: inset 0 2px 0 #e0625a, inset 0 -3px 0 #6d1a12; }
.bar-thin { height: 10px; }
.machine-rows { margin-top: 18px; }

/* advancements */
.adv-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.adv-total strong { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.adv-total span { color: var(--text-2); }
.adv-tabs { display: grid; gap: 8px; margin-top: 16px; }
.adv-tab { display: grid; grid-template-columns: calc(16 * var(--t1, 1.25px)) minmax(78px, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.adv-tab img { width: calc(16 * var(--t1, 1.25px)); height: calc(16 * var(--t1, 1.25px)); }
.adv-tab b { font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.adv-list { display: grid; gap: 8px; }
.adv { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adv-frame { position: relative; width: calc(26 * var(--t2, 2px)); height: calc(26 * var(--t2, 2px)); flex: none; }
.adv-frame > img { position: absolute; image-rendering: pixelated; }
.adv-frame .frame { inset: 0; width: 100%; height: 100%; }
.adv-frame .icon { left: calc(5 * var(--t2, 2px)); top: calc(5 * var(--t2, 2px)); width: calc(16 * var(--t2, 2px)); height: calc(16 * var(--t2, 2px)); }
.adv-body { min-width: 0; flex: 1; }
.adv-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-title[data-type="challenge"] { color: #e7a8ff; }
.adv-desc { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-when { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.adv-body .bar { margin-top: 5px; }

.map-card p { margin: 0 0 16px; color: var(--text-2); }
.map-card .btn { width: 100%; }

.empty { color: var(--text-2); margin: 0; }

/* ---- centered screens: join, notices ---- */
.center { min-height: calc(100vh - 64px - 120px); display: grid; place-items: center; padding: 20px 0; }
.card-narrow { width: min(440px, 100%); text-align: center; padding: 30px 28px 32px; }
.card-narrow .big-icon { width: calc(16 * var(--t4, 4px)); height: calc(16 * var(--t4, 4px)); margin: 0 auto 14px; display: block; }
.card-narrow h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.card-narrow p { margin: 0 0 20px; color: var(--text-2); }
.card-narrow .btn { width: 100%; }

.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; color: var(--text);
  background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius);
  box-shadow: inset 0 2px 0 #0a0a0b; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 15px;
}
.field input::placeholder { color: #5f6064; }
.field input:focus { border-color: var(--gold); outline: none; }
.field input[aria-invalid="true"] { border-color: #e0524a; }
.error { color: #ff8d86; font-size: 13px; margin: 8px 0 0; min-height: 0; }
.hint { color: var(--text-3); font-size: 13px; margin-top: 16px !important; margin-bottom: 0 !important; }

/* ---- game GUIs, laid out in native GUI pixels and scaled as one ---- */
.gui { position: relative; margin: 0 auto; }
.gui > * { position: absolute; display: block; }
.preview-body { object-fit: contain; image-rendering: auto; }
.slot-hit { padding: 0; border: 0; background: transparent; cursor: help; }
.slot-hit:hover { background: rgba(255, 255, 255, .45); }
.slot-hit:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.swatch { outline: 1px solid rgba(0, 0, 0, .35); outline-offset: -1px; }
/* the stack's own colour, cut to the layer that takes it (js/gui.js) */
.tint { mask-size: 100% 100%; -webkit-mask-size: 100% 100%; pointer-events: none; }

.glint {
  mask-size: 100% 100%; -webkit-mask-size: 100% 100%;
  background-image: url("assets/mc/glint.png"); background-size: 400% 400%;
  mix-blend-mode: screen; opacity: .7; animation: glint 7s linear infinite; pointer-events: none;
}
@keyframes glint { from { background-position: 0% 0%; } to { background-position: 100% 133%; } }
@media (prefers-reduced-motion: reduce) { .glint { animation: none; } .btn { transition: none; } }

/* the item tooltip keeps the game's own look */
.tooltip {
  position: fixed; z-index: 20; max-width: min(320px, calc(100vw - 16px));
  padding: 6px 10px; font-size: 13px; line-height: 1.5; color: #fff;
  background: rgba(16, 0, 16, .95); border: 2px solid #28007f; outline: 2px solid rgba(16, 0, 16, .95);
  box-shadow: inset 0 0 0 1px #5000ff; pointer-events: none; text-shadow: 1px 1px 0 #3f3f3f;
}
.tooltip .title[data-enchanted="true"] { color: #55ffff; }
.tooltip .custom { font-style: italic; }
.tooltip .line { color: #aaaaaa; }

footer { border-top: 2px solid var(--edge); background: var(--deep); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 16px 0; font-size: 12px; color: var(--text-3); }


/* ---- the 360° view of where you logged out (js/panorama.js) ---- */
.pano {
  position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none;
  background: var(--deep) center / cover no-repeat;  /* the strip, set in panorama.js */
}
.pano:active { cursor: grabbing; }
.pano-cube { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
/* size, margin, background-size and -position are set per tile in panorama.js */
.pano-face { position: absolute; background-repeat: no-repeat; backface-visibility: hidden; }
.scene[data-panorama] .vitals-dock { filter: grayscale(.8) brightness(.85); }
.scene-hint {
  position: absolute; top: 14px; right: 14px; z-index: 1; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius);
  background: rgba(14, 14, 15, .75); color: var(--text-2); font-size: 12px; font-weight: 500;
}
.scene-hint b { color: var(--gold); font-weight: 800; }
.scene-status { position: absolute; top: 14px; left: 14px; z-index: 1; display: grid; gap: 2px; pointer-events: none;
  padding: 8px 12px 10px; border-radius: var(--radius); background: rgba(14, 14, 15, .78); }
.scene-status strong { font-size: 18px; font-weight: 800; line-height: 1.2; }
.scene-status span { font-size: 12px; color: var(--text-2); }

/* checklists: every biome, mob, food… for "do all of these" advancements */
.checklist { min-width: 0; border: 2px solid var(--edge); border-radius: var(--radius); background: var(--deep); }
.checklist > summary { list-style: none; cursor: pointer; padding: 6px 10px 6px 6px; border-radius: var(--radius); }
.checklist > summary::-webkit-details-marker { display: none; }
.checklist > summary:hover { background: #1b1b1c; }
.checklist > summary .adv::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-left: 4px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-3px);
}
.checklist[open] > summary .adv::after { transform: rotate(225deg) translateY(-2px); }
.checklist[open] > summary { border-bottom: 2px solid var(--edge); border-radius: var(--radius) var(--radius) 0 0; }
.check-head { margin: 12px 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 2px 8px 3px; border: 2px solid var(--edge); border-radius: var(--radius);
  background: var(--panel-raised); font-size: 12px; color: var(--text-2);
}
.check-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-chip img { width: calc(16 * var(--t1, 1.25px)); height: calc(16 * var(--t1, 1.25px)); flex: none; }
.check-chip[data-done="true"] { color: var(--text); border-color: #2d5f1f; box-shadow: inset 0 -2px 0 var(--green-lip); background: #2f4a27; }
.check-chip[data-done="false"] img { filter: grayscale(1) brightness(.8); opacity: .75; }

/* ---- server tool (server.html) ---- */
.server-bar { margin-bottom: 20px; }
.server-bar[data-tps="quiet"] .chips .chip:nth-child(2) b { color: var(--gold); }
.server-bar[data-tps="offline"] .chips .chip:nth-child(2) b { color: #ff8d86; }
.table-search {
  width: min(100%, 320px); height: 38px; padding: 0 12px; margin-bottom: 12px; color: var(--text);
  background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius); font: inherit;
}
.table-scroll { overflow-x: auto; }
.player-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.player-table th { text-align: left; padding: 0 10px 8px; border-bottom: 2px solid var(--edge); white-space: nowrap; }
.th-sort { background: none; border: 0; padding: 0; color: var(--text-3); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; cursor: pointer; }
.th-sort[data-active="true"] { color: var(--text); }
.th-sort[data-active="true"]::after { content: " ▾"; }
.player-table td { padding: 8px 10px; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.player-table tbody tr { cursor: pointer; }
.player-table tbody tr:hover, .player-table tbody tr:focus-visible { background: var(--panel-raised); outline: none; }
.who-cell { display: inline-flex; align-items: center; gap: 10px; }
.who-cell img { width: 32px; height: 32px; border: 2px solid var(--edge); border-radius: 3px; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.status-dot[data-online="true"] { color: #d6f5c8; }
.status-dot[data-online="true"]::before { background: #6cd04a; }
.player-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.link-out { flex: 1; min-width: 220px; height: 34px; padding: 0 10px; color: var(--text); background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.player-identity { padding: 0; }
.vitals-well { margin-top: 16px; padding: 12px; background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius); }
.vitals-well .gui { margin: 0 auto; }
.status-dot[data-banned="true"] { color: #ffb4ae; }
.status-dot[data-banned="true"]::before { background: #e0524a; }

/* control key: actions, console, action log */
.btn-danger { color: #fff; background: #a8352d; box-shadow: inset 0 2px 0 #c9534a, inset 0 -3px 0 #6e1f19; }
.btn-danger:hover { background: #962f28; }
.btn[data-armed="true"] { background: #e0524a; box-shadow: inset 0 2px 0 #f07a72, inset 0 -3px 0 #8f2a23; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.notice { margin: 0 0 16px; padding: 10px 14px; border: 2px solid #6e1f19; border-radius: var(--radius); background: #3a1d1b; color: #ffd6d2; font-weight: 600; }
.controls-panel { margin-top: 20px; }
.console-panel { margin-bottom: 20px; }
.controls { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.control-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.control-input, .console-input, .control-select {
  height: 36px; padding: 0 10px; color: var(--text); font: inherit; font-size: 14px;
  background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius);
}
.control-input { flex: 1; min-width: 180px; }
.control-input:focus, .console-input:focus, .control-select:focus { border-color: var(--gold); outline: none; }
.control-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.control-flags { font-size: 13px; color: var(--text-3); }
.console-row { display: flex; gap: 8px; align-items: center; }
.console-prompt { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--gold); }
.console-input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
.log-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.log-scroll { max-height: 320px; overflow-y: auto; padding-right: 4px; }
.log-row { padding: 8px 10px; background: var(--deep); border: 2px solid var(--edge); border-radius: var(--radius); font-size: 13px; min-width: 0; }
.log-head { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.log-head > :nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.log-head code { font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.log-head time { color: var(--text-3); white-space: nowrap; font-size: 12px; }
.log-status { flex: none; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; background: var(--panel-raised); color: var(--text-2); }
.log-row[data-status="done"] .log-status { background: #2f4a27; color: #d6f5c8; }
.log-row[data-status="failed"] .log-status { background: #5a2420; color: #ffd6d2; }
.log-output { margin-top: 4px; color: var(--text-2); font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* statistics inside a column (player pages): no extra gap, two tiles per row */

/* demo mode (?demo): made-up data, so say so without covering anything */
.demo-badge {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  padding: 6px 14px; border-radius: 999px; pointer-events: none;
  background: rgba(20, 20, 22, 0.92); border: 1px solid var(--divider);
  color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap;
}
