/* AC Multiplayer: page layout and theme on top of OreUI (vendor/oreui/styles.css).
   OreUI draws the controls (buttons, switches, tabs, dialogs...); this file lays out the pages
   and gives the site its Minecraft-style surfaces. Colors come from the theme tokens below. */

/* Minecraft Seven: the font Minecraft's own Bedrock UI uses for text. It is drawn on an 8-pixel
   grid; boot.js snaps the page's text sizes (1rem, --px-sm) to sizes that stay sharp on the
   viewer's screen. It has no bold, and a faked bold would smear the pixels, so bold is turned off
   for it (font-synthesis below). */
@font-face {
  font-family: "Minecraft Seven";
  src: url("fonts/minecraft-seven.woff2") format("woff2");
  font-display: swap;
}
/* Minecraft Ten v2 (from Minecraft's own UI; adds Cyrillic). Its lowercase letters are small
   capitals, so it is only used for short labels: links, buttons, tabs, headings. */
@font-face {
  font-family: "Minecraft Ten v2";
  src: url("fonts/minecraft-ten-v2.woff2") format("woff2");
  ascent-override: 85%;
  descent-override: 15%;
  font-display: swap;
}

/* ===================================================================
   Theme tokens
   =================================================================== */
:root {
  color-scheme: dark;
  --page: var(--ore-color-gray-80);
  --page-deep: var(--ore-color-gray-100);
  --surface: var(--ore-color-gray-70);
  --sunken: var(--ore-color-gray-90);
  --edge: var(--ore-color-gray-100);
  --specular: color-mix(in srgb, var(--ore-color-gray-70), #fff 18%);
  --bevel: color-mix(in srgb, var(--ore-color-gray-70), #000 32%);
  --text: var(--ore-color-white);
  --dim: var(--ore-color-gray-30);
  --dimmer: var(--ore-color-gray-40);
  --link: #8cc8ff;
  --good: #6cc349;
  --warn: #ffc14d;
  --bad: #ff6b6b;
  --gold: #ffd83d;
  /* Letters the Minecraft fonts lack (Vietnamese accents, CJK) come from the next fonts in the list. */
  --cjk-fonts: "Noto Sans", "Noto Sans JP", "Noto Sans SC", "Noto Sans KR", "Hiragino Sans", "Yu Gothic UI",
    "Microsoft YaHei UI", "Malgun Gothic", system-ui, sans-serif;
  --ore-font-body: "Minecraft Seven", "Minecraft", var(--cjk-fonts);
  --ore-font-display: "Minecraft Ten v2", "Minecraft Ten", "Minecraft Seven", var(--cjk-fonts);
  --px-sm: 13px; /* small text; boot.js sets the sharp size for this screen */
  --ui-font: var(--ore-font-body);
  --title-font: var(--ore-font-display);
  --read-font: "Noto Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --max: 1180px;
  --pad: 16px;
}
[data-theme="black"] {
  --page: #000;
  --page-deep: #000;
  --surface: #161617;
  --sunken: #0a0a0a;
  --edge: #2a2a2c;
  --specular: #262628;
  --bevel: #000;
  --ore-color-nav-background: #161617;
  --ore-color-nav-shadow: #2a2a2c;
  --ore-color-nav-action-highlight: #2a2a2c;
  --ore-color-nav-action-shadow: #000;
}
[data-theme="light"] {
  color-scheme: light;
  --page: var(--ore-color-gray-20);
  --page-deep: var(--ore-color-gray-30);
  --surface: var(--ore-color-gray-10);
  --sunken: #fff;
  --edge: var(--ore-color-gray-50);
  --specular: #fff;
  --bevel: var(--ore-color-gray-40);
  --text: var(--ore-color-gray-100);
  --dim: var(--ore-color-gray-70);
  --dimmer: var(--ore-color-gray-60);
  --link: #1f5fbf;
  --good: #2e7d1a;
  --warn: #9a5b00;
  --bad: #c0392b;
  --gold: #8a6d00;
}
/* Languages the pixel font can't draw (Vietnamese accents, CJK, Cyrillic) use a normal font. */
[data-font="body"] {
  --ore-font-body: var(--read-font);
  --ore-font-display: var(--read-font);
}

/* ===================================================================
   Base
   =================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--page);
  overflow-x: clip; /* the full-width home hero must not cause a sideways scroll */
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--page);
  font-family: var(--ui-font);
  font-size: 1rem;
  line-height: 1.35;
  -webkit-font-smoothing: none;
  font-synthesis: none;
}
[data-font="body"] body {
  -webkit-font-smoothing: auto;
}
img {
  max-width: 100%;
}
a {
  color: var(--link);
}
h1,
h2,
h3 {
  margin: 0 0 8px;
  font-family: var(--title-font);
  font-weight: 400;
  line-height: 1.15;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-family: var(--ui-font);
  font-size: 1rem;
  font-weight: 400;
}
p {
  margin: 0 0 10px;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--ore-color-focus-ring);
  outline-offset: 2px;
}
/* OreUI draws its own focus ring around the whole text field; a second outline on the inner
   input showed as two white lines. */
ore-textfield .ore-textfield-input:focus-visible {
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--text);
  background: var(--sunken);
}
.skip-link:focus {
  top: 8px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.dim {
  color: var(--dim);
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Pixel icons (icons.js). 12x12 art, drawn at 2x so pixels stay square. */
ore-icon.icon {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  line-height: 0;
  vertical-align: middle;
}
ore-icon.icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
ore-icon.icon.small {
  width: 18px;
  height: 18px;
}
ore-button > ore-icon.icon,
ore-tab-button ore-icon.icon,
ore-icon-button > ore-icon.icon {
  width: 18px;
  height: 18px;
}
.flag {
  display: inline-block;
  flex: none;
  width: 27px;
  height: 18px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Minecraft-style surface: flat panel with a light top edge and a dark bottom bevel. */
.panel {
  padding: var(--pad);
  background: var(--surface);
  border: 2px solid var(--edge);
  box-shadow:
    inset 0 2px 0 var(--specular),
    inset 0 -4px 0 var(--bevel);
}

/* OreUI buttons: keep content on one line and let icons sit beside the label. */
ore-button,
ore-icon-button {
  white-space: nowrap;
}
/* Spacing between a button's icon and label comes from OreUI's .ore-button-prefix/-suffix margin;
   a flex gap on top of it doubled the space. Tab buttons have no prefix class, so they get a gap. */
ore-button,
ore-tab-button {
  align-items: center;
  justify-content: center;
}
ore-tab-button {
  gap: 8px;
}
/* The pixel font sits a little high in its line box; nudge icons to its visual middle. */
ore-button > ore-icon.icon,
ore-tab-button > ore-icon.icon {
  transform: translateY(-1px);
}
ore-button.block {
  width: 100%;
}
ore-button.small {
  --ore-button-font-size: var(--px-sm);
  min-height: 32px;
}

/* ===================================================================
   Top bar: brand, main links, player search, language, account, menu
   (one dark bar like bedrockviewer; on phones the links move into the menu button)
   =================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ore-color-gray-90);
  border-bottom: 2px solid #000;
  box-shadow: inset 0 -2px 0 var(--ore-color-gray-70), 0 2px 0 rgba(0, 0, 0, 0.25);
  color: var(--ore-color-white);
  color-scheme: dark;
}
[data-theme="black"] .topbar {
  background: #0d0d0e;
  box-shadow: inset 0 -2px 0 #1e1e20;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1440px; /* wider than the page, so all links fit as text on big screens */
  min-height: 56px;
  margin: 0 auto;
  padding: 6px var(--pad) 8px;
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  image-rendering: pixelated;
}
.brand img {
  width: 32px;
  height: 32px;
}
.brand-name {
  font-family: var(--ore-font-display);
  font-size: 18px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.top-nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 6px;
  color: var(--ore-color-white);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.top-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
}
.top-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--ore-color-green-50, #3c8527);
  background: rgba(255, 255, 255, 0.05);
}
.top-nav ore-icon.icon {
  display: none; /* wide screens: text links like bedrockviewer; icons when space is short */
  width: 20px;
  height: 20px;
}
.top-search {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}
.top-search-field {
  width: 180px;
}
.top-search-btn > .ore-button-prefix {
  display: none;
}
.top-search-field > .ore-textfield-control {
  margin-top: 0;
}
.top-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}
.top-actions > span {
  display: contents;
}
/* Square OreUI-style buttons: language, account, menu. */
.top-btn,
.account-btn,
.top-actions .ore-navbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  color: var(--ore-color-gray-100);
  font: inherit;
  background: var(--ore-color-gray-20, #d0d1d4);
  border: 2px solid #000;
  box-shadow: inset 0 -4px 0 var(--ore-color-gray-40, #8c8d90), inset 0 2px 0 #fff;
  cursor: pointer;
}
.top-btn:hover,
.account-btn:hover,
.top-actions .ore-navbar-action:hover {
  background: #fff;
}
.top-btn:active,
.account-btn:active {
  box-shadow: inset 0 2px 0 var(--ore-color-gray-40, #8c8d90);
}
.lang-btn .flag {
  width: 22px;
  height: auto;
}
.account-btn {
  padding: 0;
  min-width: 40px;
}
.account-btn .avatar {
  width: 36px;
  height: 36px;
  font-size: var(--px-sm);
}
.account-btn .account-name,
.account-btn > ore-icon {
  display: none;
}
.menu-btn {
  display: none;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--pad) 36px;
}

/* ===================================================================
   Worlds page
   =================================================================== */
.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.hero img {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
}
.hero h1 {
  margin-bottom: 4px;
}
.hero p {
  margin: 0;
  color: var(--dim);
}
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.toolbar .search {
  flex: 1;
  min-width: 0;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 12px;
}
.field {
  display: grid;
  gap: 4px;
  min-width: 150px;
}
.field-label {
  font-size: var(--px-sm);
  color: var(--dim);
}
.field ore-dropdown,
.field ore-dropdown > .ore-dropdown-trigger {
  width: 100%;
}
/* OreUI checkboxes default to dark text (made for light panels). */
.filter-checks ore-checkbox {
  color: var(--text);
}
.filter-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 40px;
}
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin: 0 0 12px;
  font-size: var(--px-sm);
  color: var(--dim);
}
.dot {
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--good);
}
.dot.warn {
  background: var(--warn);
}
.dot.bad {
  background: var(--bad);
}
.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 14px;
}
.world {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 2px solid var(--edge);
  box-shadow:
    inset 0 2px 0 var(--specular),
    inset 0 -4px 0 var(--bevel);
}
.world.mine {
  border-color: var(--gold);
}
.world-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.world-name {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.host-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--dim);
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--px-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.host-link:hover {
  color: var(--text);
  text-decoration: underline;
}
.world-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.world-foot {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
}
.players {
  flex: 1;
  min-width: 0;
}
.players-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: var(--px-sm);
  color: var(--dim);
}
.players ore-progress-bar {
  width: 100%;
}
.players.full ore-progress-bar {
  --ore-progress-bar-fill: var(--ore-color-red-50);
}
.world-foot ore-button {
  min-width: 96px;
}
.bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-left: auto;
  flex: none;
}
.bars i {
  width: 4px;
  background: var(--dimmer);
  opacity: 0.35;
}
.bars i:nth-child(1) {
  height: 5px;
}
.bars i:nth-child(2) {
  height: 9px;
}
.bars i:nth-child(3) {
  height: 14px;
}
.bars.level-1 i:nth-child(-n + 1),
.bars.level-2 i:nth-child(-n + 2),
.bars.level-3 i {
  background: var(--good);
  opacity: 1;
}
.bars.level-1 i:nth-child(-n + 1) {
  background: var(--warn);
}
.skeleton .line {
  height: 14px;
  background: var(--sunken);
  animation: pulse 1.2s steps(2) infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
.empty {
  grid-column: 1 / -1;
  text-align: center;
}
.empty ore-icon.icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  color: var(--dimmer);
}
.empty p {
  color: var(--dim);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

/* Avatars (Xbox gamerpics, or the first letter of the name) */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  overflow: hidden;
  font-family: var(--ore-font-display);
  font-size: 22px;
  color: var(--gold);
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-md {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}
.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 40px;
}

/* ===================================================================
   Menus (account + host)
   =================================================================== */
.menu {
  position: absolute;
  z-index: 40;
  width: 260px;
  padding: 4px;
  color: var(--ore-color-white);
  background: var(--ore-color-gray-100);
  border: 2px solid #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--ore-color-gray-80);
}
.menu-name {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-sub {
  font-size: var(--px-sm);
  color: var(--ore-color-gray-40);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--px-sm);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: var(--ore-color-gray-70);
  outline: none;
}
.menu-item.danger {
  color: #ff8a80;
}
.menu-item ore-icon.icon {
  width: 18px;
  height: 18px;
}

/* ===================================================================
   Dialogs (OreUI modal)
   =================================================================== */
/* OreUI dialogs and the menus are always dark, so they use the dark tokens in every theme. */
.ore-modal-dialog,
.menu {
  color-scheme: dark;
  --surface: var(--ore-color-gray-70);
  --sunken: var(--ore-color-gray-90);
  --edge: var(--ore-color-gray-100);
  --specular: color-mix(in srgb, var(--ore-color-gray-70), #fff 18%);
  --bevel: color-mix(in srgb, var(--ore-color-gray-70), #000 32%);
  --text: var(--ore-color-white);
  --dim: var(--ore-color-gray-30);
  --dimmer: var(--ore-color-gray-40);
  --link: #8cc8ff;
  --good: #6cc349;
  --warn: #ffc14d;
  --bad: #ff6b6b;
  --gold: #ffd83d;
}
.ore-modal-header-button {
  color: inherit;
}
.ore-modal-title {
  font-family: var(--ore-font-body);
}
.ore-modal-header > span:first-child {
  display: block;
}
.modal-body {
  --ore-container-padding: 16px 18px;
  --ore-container-gap: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-body > p,
.modal-body .note p {
  margin: 0;
}
.modal-actions {
  --ore-container-padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-actions ore-button {
  width: 100%;
}
.waiting {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
}
.code {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.code span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 46px;
  font-family: var(--ore-font-display);
  font-size: 24px;
  background: var(--ore-color-gray-100);
  border: 2px solid #000;
  box-shadow: inset 0 -3px 0 var(--ore-color-gray-80);
}
.note {
  margin: 0;
  padding: 10px 12px;
  font-size: var(--px-sm);
  color: var(--dim);
  background: var(--sunken);
  border-left: 4px solid var(--gold);
}
.note.bad {
  border-left-color: var(--bad);
}
.fine {
  font-size: var(--px-sm);
  color: var(--dimmer);
}
.signed-in {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.checks {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.checks li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: var(--px-sm);
}
.checks li ore-icon.icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.checks .ok ore-icon {
  color: var(--good);
}
.checks .warn ore-icon {
  color: var(--warn);
}
.checks .info ore-icon {
  color: var(--link);
}
details.help summary {
  cursor: pointer;
  color: var(--dim);
}
details.help ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: var(--px-sm);
  color: var(--dim);
}
.modal-body .world {
  box-shadow: none;
}

/* Language / theme picker */
.picker-dialog {
  width: min(460px, calc(100vw - 32px));
}
.picker-body {
  gap: 6px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  color: var(--ore-color-white);
  background: var(--ore-color-gray-90);
  border: 2px solid var(--ore-color-gray-100);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.option:hover,
.option:focus-visible {
  background: var(--ore-color-gray-70);
  outline: none;
}
.option[aria-checked="true"] {
  border-color: var(--ore-color-green-40, #6cc349);
  box-shadow: inset 0 0 0 2px var(--ore-color-green-60, #2a641c);
}
.option .option-text {
  flex: 1;
  min-width: 0;
}
.option .option-sub {
  display: block;
  font-size: var(--px-sm);
  color: var(--ore-color-gray-40);
}
.option .option-check {
  color: #6cc349;
  visibility: hidden;
}
.option[aria-checked="true"] .option-check {
  visibility: visible;
}
/* Language names in Minecraft Ten, like bedrockviewer (letters Ten lacks, such as CJK, come from
   the fallback fonts); the English name under it stays in the body font. */
.option.lang .option-text > span:first-child {
  font-family: var(--title-font);
  font-size: 1rem;
  letter-spacing: 0.5px;
}
/* Ten has no Vietnamese accented letters, so that one name keeps the normal font. */
.option.lang[lang="vi"] .option-text > span:first-child {
  font-family: var(--read-font);
  letter-spacing: 0;
}
.option:hover {
  outline: 2px solid var(--ore-color-white);
  outline-offset: -2px;
}

/* ===================================================================
   Settings
   =================================================================== */
.settings-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  align-items: start;
}
.side {
  position: sticky;
  top: 76px;
  padding: 10px;
}
.side-title {
  margin: 4px 6px 8px;
  font-size: var(--px-sm);
  color: var(--dim);
}
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  margin-bottom: 4px;
  color: var(--text);
  background: none;
  border: 2px solid transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.side-item:hover {
  background: var(--sunken);
}
.side-item[aria-current="page"] {
  background: var(--sunken);
  border-color: var(--ore-color-green-50, #3c8527);
  box-shadow: inset 4px 0 0 var(--ore-color-green-50, #3c8527);
}
.side-item ore-icon.icon {
  width: 18px;
  height: 18px;
}
.section-head {
  margin-bottom: 12px;
}
.section-head h2 {
  margin-bottom: 2px;
}
.section-head p {
  margin: 0;
  color: var(--dim);
}
.setting-list {
  display: grid;
  gap: 10px;
}
.setting {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 14px;
  background: var(--surface);
  border: 2px solid var(--edge);
  box-shadow:
    inset 0 2px 0 var(--specular),
    inset 0 -4px 0 var(--bevel);
}
.setting > ore-icon.icon {
  color: var(--dim);
}
.setting-text {
  flex: 1;
  min-width: 0;
}
.setting-title {
  font-size: 1rem;
}
.setting-desc {
  font-size: var(--px-sm);
  color: var(--dim);
}
.setting-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.setting-control .current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
}
.invite-box {
  display: flex;
  gap: 8px;
  width: min(420px, 100%);
}
.invite-box ore-textfield {
  flex: 1;
  min-width: 0;
}
.group-label {
  margin: 18px 0 8px;
  font-size: var(--px-sm);
  color: var(--dim);
}

/* ===================================================================
   Profile, How to join, About, legal pages
   =================================================================== */
.page {
  max-width: 860px;
  margin: 0 auto;
}
.prose {
  font-family: var(--read-font);
  line-height: 1.55;
}
.prose h1,
.prose h2 {
  font-family: var(--title-font);
}
.prose h2 {
  margin-top: 22px;
}
.prose h3 {
  margin-top: 18px;
  font-family: var(--read-font);
  font-size: 17px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
}
.prose li {
  margin-bottom: 6px;
}
.steps li {
  margin-bottom: 10px;
}
.legal .updated {
  color: var(--dim);
  font-size: var(--px-sm);
}
.legal .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.profile-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.profile-info {
  flex: 1;
  min-width: 0;
}
.profile-bio {
  color: var(--dim);
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 12px 0;
  font-size: var(--px-sm);
}
.facts dt {
  color: var(--dim);
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.section-title {
  margin: 22px 0 10px;
}
.credits {
  display: grid;
  gap: 10px;
}

/* ===================================================================
   Footer
   =================================================================== */
.footer {
  padding: 18px var(--pad) 26px;
  font-size: var(--px-sm);
  color: var(--dim);
  text-align: center;
  background: var(--page-deep);
  border-top: 2px solid var(--edge);
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-bottom: 8px;
}
.footer a {
  color: var(--dim);
}
.footer a:hover {
  color: var(--text);
}

/* ===================================================================
   Phones and small tablets
   =================================================================== */
@media (max-width: 760px) {
  :root {
    --pad: 12px;
  }
  .hero {
    flex-wrap: wrap;
  }
  .hero img {
    width: 56px;
    height: 56px;
  }
  .hero #hero-action {
    width: 100%;
  }
  .hero #hero-action ore-button {
    width: 100%;
  }
  .field {
    flex: 1 1 140px;
    min-width: 0;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: none;
  }
  .side-title {
    display: none;
  }
  .side-item {
    flex: none;
    width: auto;
    margin: 0;
    white-space: nowrap;
  }
  .side-item[aria-current="page"] {
    box-shadow: inset 0 -4px 0 var(--ore-color-green-50, #3c8527);
  }
  .setting {
    flex-wrap: wrap;
  }
  .setting > ore-icon.icon {
    display: none;
  }
  .setting-control {
    width: 100%;
    justify-content: flex-end;
  }
  .invite-box {
    flex-wrap: wrap;
    width: 100%;
  }
  .invite-box ore-textfield,
  .invite-box ore-button {
    flex: 1 1 100%;
  }
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-card .world-meta,
  .profile-card .row {
    justify-content: center;
  }
  .facts {
    text-align: left;
  }
  /* Phones: full width and fixed on screen; placeMenu() in app.js sets only the top. */
  .menu {
    position: fixed;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
  }
}

/* ===================================================================
   Player profile (#/profile/...): card + Statistics / Friends / Gallery
   =================================================================== */
.lookup {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.lookup ore-textfield {
  min-width: 0;
}
.profile-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.profile-card .profile-name {
  margin: 4px 0 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.profile-card .profile-bio {
  margin: 0;
  font-family: var(--read-font);
  font-size: 14px;
}
.profile-card .facts {
  width: 100%;
  margin: 4px 0;
  padding: 10px 12px;
  text-align: left;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.profile-card .card-label {
  align-self: stretch;
  margin: 6px 0 0;
  font-size: var(--px-sm);
  text-align: left;
  color: var(--dim);
}
.profile-card .world,
.profile-card .note,
.profile-card > .fine {
  align-self: stretch;
  text-align: left;
}
.card-actions {
  display: grid;
  gap: 6px;
  align-self: stretch;
  margin-top: 4px;
}
.world-meta.center {
  justify-content: center;
}
.hosting-now {
  display: grid;
  gap: 6px;
  align-self: stretch;
  padding: 10px 12px;
  text-align: left;
  background: var(--sunken);
  border: 2px solid var(--gold);
}
.tabs-panel {
  padding: 12px;
}
.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}
.profile-tabs ore-tab-button {
  min-width: 0;
  min-height: 48px;
}
.profile-tab {
  display: grid;
  gap: 12px;
}
.profile-tab .empty {
  border: 0;
  box-shadow: none;
  background: none;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
}
.platforms ore-tab-button {
  flex: 0 0 auto;
}
.statlist {
  display: grid;
  gap: 6px;
  margin: 0;
}
.stat {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.stat ore-icon.icon {
  grid-row: 1 / 3;
  color: var(--dim);
}
.stat dt {
  font-size: var(--px-sm);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.stat dd {
  margin: 2px 0 0;
  font-size: 1rem;
}
.tab-head {
  margin: 4px 0 0;
  color: var(--dim);
}
.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  gap: 8px;
}
.friend {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.friend:hover,
.friend:focus-visible {
  border-color: var(--ore-color-green-50, #3c8527);
}
.friend-text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.friend-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Rich presence can be long ("Minecraft - Playing on a Realm - Creative Mode"): up to two lines,
   full text on hover. */
.friend-status {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--px-sm);
  line-height: 1.3;
  color: var(--dimmer);
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.friend-status .dot {
  display: inline-block;
  margin-right: 6px;
  vertical-align: 1px;
  background: var(--dimmer);
}
.friend-status.online {
  color: var(--good);
}
.friend-status.online .dot {
  background: var(--good);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 8px;
}
.shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  background: var(--sunken);
  border: 2px solid var(--edge);
  cursor: pointer;
}
.featured-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  font-size: var(--px-sm);
  color: var(--ore-color-white);
  background: #e0812b;
  border: 2px solid #000;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.3);
}
.viewer-frame .featured-badge {
  padding: 3px 8px 3px 5px;
}
.viewer-dialog {
  width: min(1100px, calc(100vw - 24px));
}
.viewer-frame {
  position: relative;
  background: #000;
  border: 2px solid var(--edge);
}
.viewer-frame img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
}
.viewer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.viewer-count {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
/* Full-color pictures on the profile tabs are drawn on a 16-pixel grid, so they get a bit more room. */
ore-tab-button ore-icon.icon.picture {
  width: 24px;
  height: 24px;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot:hover {
  border-color: var(--ore-color-green-50, #3c8527);
}
.clip-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: var(--px-sm);
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
}

/* ===================================================================
   API docs (#/api)
   =================================================================== */
.endpoint {
  scroll-margin-top: 110px;
}
.endpoint h3 {
  margin: 14px 0 6px;
  font-size: var(--px-sm);
}
.endpoint-path {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.endpoint-path code,
.params code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
}
.params {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: var(--px-sm);
}
.params dd {
  margin: 0;
  color: var(--dim);
}
.endpoint-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.code-box {
  position: relative;
}
.code-box pre {
  margin: 0;
  padding: 12px 52px 12px 14px;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ore-color-gray-20);
  background: var(--ore-color-gray-100);
  border: 2px solid #000;
}
.code-box .copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
}
.api-layout .settings-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

/* ===================================================================
   Small screens: phones (<= 760px) and very small phones (<= 400px)
   =================================================================== */
@media (max-width: 760px) {
  main {
    padding-top: 14px;
  }
  .hero {
    gap: 12px;
    padding: 12px;
  }
  .hero h1 {
    font-size: 20px;
  }
  /* Search + refresh: refresh shrinks to its icon. */
  #refresh-slot ore-button > span {
    display: none;
  }
  #refresh-slot ore-button > .ore-button-prefix {
    margin: 0;
  }
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field {
    min-width: 0;
  }
  .filters .field:nth-child(3),
  .filter-checks {
    grid-column: 1 / -1;
  }
  .world {
    padding: 12px;
  }
  .world-foot ore-button {
    min-width: 84px;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-tabs ore-tab-button > span {
    font-size: var(--px-sm);
  }
  .lookup ore-button:last-child:not(:first-child) > span {
    display: none;
  }
  .endpoint-facts,
  .params {
    grid-template-columns: 1fr;
  }
  .params dd {
    margin-bottom: 6px;
  }
}
@media (max-width: 400px) {
  .profile-tabs ore-tab-button {
    flex-direction: column;
    gap: 2px;
    padding-block: 6px;
  }
  .world-foot {
    flex-wrap: wrap;
  }
  .world-foot ore-button {
    flex: 1 1 100%;
  }
  .setting-control > .row {
    justify-content: flex-end;
  }
  .lookup ore-button > span {
    display: none;
  }
  .lookup ore-button > .ore-button-prefix {
    margin: 0;
  }
}

/* ===================================================================
   OreUI sizes made for wide Bedrock screens (dropdown min-width 256px, button 128px) push
   phones sideways: let them shrink to their column, and cut long labels with "...".
   =================================================================== */
.field ore-dropdown,
.field ore-dropdown > .ore-dropdown-trigger {
  min-width: 0;
  max-width: 100%;
}
.ore-dropdown-trigger-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Platform toggles on the Statistics tab: equal-width buttons that wrap evenly. */
.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}
.platforms ore-tab-button {
  min-width: 0;
  margin: 0 !important;
}
@media (max-width: 760px) {
  ore-button {
    min-width: 0;
  }
  #refresh-slot ore-button,
  .lookup ore-button {
    min-width: 48px;
    padding-inline: 12px;
  }
  .toolbar .search {
    min-width: 0;
  }
  .setting-control ore-button,
  .world-foot ore-button {
    min-width: 96px;
  }
}

/* ===================================================================
   OreUI pictures, lookup page, profile header, settings menu button
   =================================================================== */
ore-icon.icon.picture img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.featured-badge {
  background: rgba(0, 0, 0, 0.65);
}

/* #/lookup */
.lookup-hero {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin: 24px auto;
  padding: 24px;
  text-align: center;
}
.lookup-hero .lookup {
  margin: 0;
}
.lookup-text {
  margin: 0;
  color: var(--dim);
}
.recent {
  display: grid;
  gap: 6px;
  justify-items: center;
}
.recent-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.recent-item {
  padding: 4px 10px;
  color: var(--text);
  text-decoration: none;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.recent-item:hover {
  border-color: var(--ore-color-green-50, #3c8527);
}

/* Profile: header card across the top, then the side card and the tabs. */
.profile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 400px);
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}
.persona-head,
.profile-header .avatar-xl {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.profile-ident {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.profile-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.profile-header .profile-name {
  margin: 0;
  font-size: 28px;
  color: var(--good);
  overflow-wrap: anywhere;
}
.profile-header .profile-bio {
  margin: 0;
  white-space: pre-line;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: var(--px-sm);
  border: 2px solid currentColor;
}
.badge.verified {
  color: var(--good);
}
.gamerscore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.id-box {
  display: grid;
  gap: 6px;
  margin: 0;
}
.id-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--edge);
}
.id-row dt {
  margin: 0;
  color: var(--dim);
}
.id-row dt ore-dropdown,
.id-row dt ore-dropdown > .ore-dropdown-trigger {
  width: 100%;
  min-width: 0;
}
.id-row dd {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.id-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
}
.id-note {
  margin: -2px 0 0;
}
.id-note:empty {
  display: none;
}
.copy-btn {
  display: inline-flex;
  flex: none;
  padding: 4px;
  color: var(--dim);
  background: none;
  border: 0;
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--text);
}
.profile-card {
  align-items: stretch;
  text-align: left;
}

/* Settings: the ☰ section button only shows on phones. */
.side-toggle {
  display: none;
}

@media (max-width: 1280px) {
  .top-nav a > span,
  .top-search-btn > span {
    display: none;
  }
  .top-nav ore-icon.icon,
  .top-search-btn > .ore-button-prefix {
    display: inline-block;
    margin: 0;
  }
  .top-nav a {
    padding-inline: 8px;
  }
  .top-search-btn {
    min-width: 44px;
  }
}
@media (max-width: 960px) {
  .profile-header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .profile-header .id-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    gap: 6px;
    min-height: 52px;
    padding-inline: 8px;
  }
  .brand-name,
  .top-nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  .top-search {
    flex: 1;
    min-width: 0;
  }
  .top-search-field {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .top-search-btn {
    min-width: 0;
  }
  .lang-btn .lang-code,
  .top-actions .ore-navbar-action-label {
    display: none;
  }
  .side {
    display: block;
    padding: 0;
  }
  .side-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    color: var(--text);
    font: inherit;
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .side-toggle .grow {
    flex: 1;
  }
  .side-toggle[aria-expanded="true"] > ore-icon:last-child {
    transform: rotate(180deg);
  }
  .side .side-item {
    display: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
  .side.open {
    padding: 0 6px 6px;
  }
  .side.open .side-toggle {
    padding-inline: 6px;
  }
  .side.open .side-item {
    display: flex;
  }
  .side .side-item[aria-current="page"] {
    box-shadow: inset 4px 0 0 var(--ore-color-green-50, #3c8527);
  }
  .persona-head,
  .profile-header .avatar-xl {
    width: 72px;
    height: 72px;
  }
  .profile-header .profile-name {
    font-size: 22px;
  }
  .id-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .lookup-hero {
    margin: 8px auto;
    padding: 16px;
  }
}
@media (max-width: 400px) {
  .top-search-btn > span {
    font-size: var(--px-sm);
  }
  .lang-btn {
    min-width: 36px;
    padding: 0 6px;
  }
}

/* ===================================================================
   Minecraft Ten for names, links, buttons, tabs and labels (like bedrockviewer);
   Minecraft Seven stays for body text.
   =================================================================== */
ore-button {
  --ore-button-font-family: var(--title-font);
}
ore-tab-button,
ore-tag,
.brand-name,
.top-nav a,
.card-label,
.tab-head,
.field-label,
.group-label,
.stat-label,
.id-row dt,
.id-select,
.viewer-count {
  font-family: var(--title-font);
}

/* Profile header: white name, big badge icons with Minecraft tooltips. */
.profile-header .profile-name {
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 2rem; /* 2x the sharp body size, so the pixel font stays sharp */
  line-height: 1.1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}
.profile-name-row {
  gap: 10px;
}
.badge-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
  outline: none;
}
.badge-icon > .mark {
  display: block;
  width: 32px;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.badge-icon.verified > .mark {
  --mark: url("img/ore/check.png");
}
.badge-icon.not-verified > .mark {
  --mark: url("img/ore/cross.png");
  width: 20px;
  height: 20px;
}
.badge-icon.verified {
  color: var(--good);
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.6));
}
.badge-icon.not-verified {
  color: var(--bad);
  font-size: var(--px-sm);
}
.badge-icon.not-verified > span:not(.mc-tooltip) {
  color: var(--dim);
}
.badge-icon.ac img {
  display: block;
  width: 26px;
  height: 26px;
  image-rendering: pixelated;
}
.profile-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.gamerscore {
  position: relative;
  cursor: help;
}
.tier {
  color: var(--dim);
}

/* Minecraft item tooltip: near-black purple box with the purple gradient border. */
.has-tip {
  position: relative;
}
.mc-tooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(280px, 80vw);
  padding: 6px 8px;
  color: #fff;
  font-family: var(--ui-font);
  font-size: var(--px-sm);
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  background: rgba(16, 0, 16, 0.94);
  border: 2px solid transparent;
  border-image: linear-gradient(#5000ff, #28007f) 1;
  box-shadow: 0 0 0 2px rgba(16, 0, 16, 0.94);
  pointer-events: none;
  display: none; /* out of the layout until shown, so it can't widen the page */
}
.has-tip:hover > .mc-tooltip,
.has-tip:focus-visible > .mc-tooltip,
.has-tip.tip-open > .mc-tooltip {
  display: block;
  animation: tip-in 0.12s ease-out;
}
@keyframes tip-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ID box: a plain select like bedrockviewer. */
.id-select {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  color: var(--text);
  font-size: 1rem;
  background: var(--sunken);
  border: 2px solid var(--dim);
  cursor: pointer;
}
.id-select:hover,
.id-select:focus-visible {
  border-color: var(--text);
}
.id-label {
  color: var(--dim);
}

/* Gallery viewer: the picture decides the size (app.js fitViewerPicture), so the dialog hugs it. */
.viewer-dialog {
  width: fit-content;
  max-width: calc(100vw - 24px);
}
.viewer-body {
  --ore-container-padding: 10px;
}
.viewer-frame {
  display: flex;
  justify-content: center;
}
.viewer-pic {
  position: relative;
  line-height: 0;
}
.viewer-pic img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 2px solid var(--edge);
  background: #000;
}
.viewer-pic .featured-badge {
  top: 8px;
  left: 8px;
  line-height: 1.2;
}
/* Modal headers: title and close button on one centred line. */
.ore-modal-header {
  align-items: center;
}
.ore-modal-title {
  margin: 0;
  line-height: 1.2;
}
.ore-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ore-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ===================================================================
   Motion: small hover / press feedback, like Minecraft's buttons.
   =================================================================== */
[data-motion="on"] ore-button,
[data-motion="on"] ore-tab-button,
[data-motion="on"] .top-btn,
[data-motion="on"] .account-btn,
[data-motion="on"] .copy-btn,
[data-motion="on"] .recent-item,
[data-motion="on"] .side-item,
[data-motion="on"] .menu-item,
[data-motion="on"] .top-nav a,
[data-motion="on"] .shot,
[data-motion="on"] .world,
[data-motion="on"] .friend {
  transition: transform 0.08s ease, filter 0.12s ease, background-color 0.12s ease, border-color 0.12s ease,
    box-shadow 0.12s ease;
}
[data-motion="on"] ore-button:hover,
[data-motion="on"] .top-btn:hover,
[data-motion="on"] .account-btn:hover {
  filter: brightness(1.08);
}
[data-motion="on"] ore-button:active,
[data-motion="on"] ore-tab-button:active,
[data-motion="on"] .top-btn:active,
[data-motion="on"] .account-btn:active,
[data-motion="on"] .copy-btn:active,
[data-motion="on"] .recent-item:active {
  transform: translateY(2px);
}
[data-motion="on"] .shot:hover img {
  transform: scale(1.04);
}
[data-motion="on"] .shot img {
  transition: transform 0.2s ease;
}
[data-motion="on"] .world:hover,
[data-motion="on"] .friend:hover {
  transform: translateY(-2px);
}
[data-motion="on"] .menu:not([hidden]) {
  animation: menu-in 0.12s ease-out;
}
[data-motion="on"] ore-modal[open] .ore-modal-dialog {
  animation: modal-in 0.16s ease-out;
}
[data-motion="on"] [data-view-panel]:not([hidden]) {
  animation: page-in 0.18s ease-out;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
@media (max-width: 760px) {
  .profile-header .profile-name {
    font-size: 1.5rem; /* still a sharp size: 1.5 x 16 = 24px */
  }
}

.recent-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  color: var(--dim);
  font: inherit;
  font-size: var(--px-sm);
  background: none;
  border: 0;
  cursor: pointer;
}
.link-btn:hover {
  color: var(--bad);
}

/* ===================================================================
   Home page: player lookup in front of a 3D scene of real Minecraft cubes (app.js homeSky).
   The scene tilts toward the pointer (--rx / --ry); each cube sits at its own depth (--z).
   No opacity or filter on the 3D elements: browsers flatten 3D layers that have them, which made
   the old floating pictures glitch. Depth dimming and hover use the faces' own overlays instead.
   =================================================================== */
.home-hero {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  /* full window width, wider than the page content */
  margin: -20px calc(50% - 50vw) 20px;
  padding: 40px var(--pad);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(60, 133, 39, 0.28), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(80, 0, 255, 0.14), transparent 55%), linear-gradient(var(--page-deep), var(--page));
  border-bottom: 2px solid var(--edge);
}
.home-sky {
  position: absolute;
  inset: 0;
  perspective: 900px;
  perspective-origin: 50% 40%;
}
.home-scene {
  position: absolute;
  inset: -4%;
  transform-style: preserve-3d;
  transform: rotateX(var(--ry)) rotateY(var(--rx));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none; /* clicks go to the cubes, even far ones behind this layer */
}
.home-block {
  --k: 1; /* size factor: smaller on phones */
  --cube: calc(var(--size) * var(--k));
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--cube);
  height: var(--cube);
  transform: translateZ(calc((var(--z) - 0.6) * 480px));
  transform-style: preserve-3d;
  pointer-events: auto;
  cursor: pointer;
}
.home-block .float {
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
/* Soft contact shadow under each cube; it shrinks and fades as the cube floats up. */
.cube-shadow {
  position: absolute;
  left: 50%;
  top: 118%;
  width: 110%;
  height: 26%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, calc(0.5 * var(--z))), transparent);
  transform: translateX(-50%);
  pointer-events: none;
}
.home-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* A cube: six textured faces around its centre. --size sets the edge length.
   Light comes from above and the front-left: the top is brightest, the front a little darker, the
   right side in shade. Cubes on the home page sway (not spin) so the lit faces stay lit. */
.cube {
  --size: 64px;
  --half: calc(var(--size) / 2);
  position: relative;
  display: block;
  width: var(--size);
  height: var(--size);
  transform-style: preserve-3d;
  transform: rotateX(-22deg) rotateY(-35deg);
}
.home-block .cube {
  --size: var(--cube);
  width: 100%;
  height: 100%;
}
.cube-face {
  position: absolute;
  inset: -0.5px; /* faces overlap by a hair, so no seams show between them at any angle */
  background-size: 100% 100%;
  image-rendering: pixelated;
  backface-visibility: hidden;
}
/* Ambient occlusion: sides darken toward the bottom edge; every face is a little darker at its rim. */
.cube-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, var(--sheen, 0)), transparent 40%, rgba(0, 0, 0, var(--ao, 0.22)));
  box-shadow: inset 0 0 calc(var(--size) * 0.12) rgba(0, 0, 0, 0.22);
}
/* Face shading, plus depth fog: far cubes (low --z) sink into the background. */
.cube-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0b0b16;
  opacity: calc(var(--shade, 0) + (1 - var(--z, 1)) * 0.5);
}
.cube-face.front {
  --shade: 0.12;
  --sheen: 0.06;
  transform: translateZ(var(--half));
}
.cube-face.back {
  --shade: 0.5;
  transform: rotateY(180deg) translateZ(var(--half));
}
.cube-face.right {
  --shade: 0.36;
  transform: rotateY(90deg) translateZ(var(--half));
}
.cube-face.left {
  --shade: 0.2;
  --sheen: 0.04;
  transform: rotateY(-90deg) translateZ(var(--half));
}
.cube-face.top {
  --shade: 0;
  --sheen: 0.14;
  --ao: 0;
  transform: rotateX(90deg) translateZ(var(--half));
}
.cube-face.bottom {
  --shade: 0.62;
  --ao: 0;
  transform: rotateX(-90deg) translateZ(var(--half));
}
/* Hover: a white outline on the cube's faces, like Minecraft's block selection. */
.home-block:hover .cube-face {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -2px;
}
.home-block.broken .float,
.home-block.broken .cube-shadow {
  visibility: hidden;
}
@media (max-width: 760px) {
  .home-block {
    --k: 0.7;
  }
}
.block-piece {
  --p: 10px;
  position: absolute;
  width: var(--p);
  height: var(--p);
  margin: calc(var(--p) / -2) 0 0 calc(var(--p) / -2);
  background-size: 400% 400%;
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.home-hero .lookup-hero {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.home-logo {
  justify-self: center;
  width: auto;
  height: 96px;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.4));
}
[data-motion="on"] .home-block .float {
  animation: cube-float var(--t) ease-in-out var(--d) infinite;
}
[data-motion="on"] .home-block .cube {
  animation: cube-sway var(--spin) ease-in-out var(--d) infinite var(--dir);
}
[data-motion="on"] .home-block .cube-shadow {
  animation: shadow-float var(--t) ease-in-out var(--d) infinite;
}
[data-motion="on"] .home-block.breaking .float {
  animation: cube-shake 0.14s linear;
}
[data-motion="on"] .home-block.respawn .float {
  animation: cube-respawn 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
[data-motion="on"] .block-piece {
  animation: piece-fly 1s linear forwards;
}
[data-motion="on"] .home-hero .lookup-hero {
  animation: page-in 0.4s ease-out;
}
[data-motion="off"] .home-scene {
  transform: none;
}
@keyframes cube-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
/* Home cubes turn back and forth through a 3/4 view, so the light stays believable. */
@keyframes cube-sway {
  from {
    transform: rotateX(-26deg) rotateY(-62deg);
  }
  to {
    transform: rotateX(-16deg) rotateY(-18deg);
  }
}
/* In step with cube-float: the cube is highest at 50%, so its shadow is smallest then. */
@keyframes shadow-float {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.75);
  }
}
@keyframes cube-spin {
  from {
    transform: rotateX(-22deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-22deg) rotateY(360deg);
  }
}
@keyframes cube-shake {
  25% {
    transform: translate(-3px, 1px);
  }
  50% {
    transform: translate(3px, -1px);
  }
  75% {
    transform: translate(-2px, 0);
  }
}
@keyframes cube-respawn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}
/* Pieces burst out, then fall with gravity (ease-in on the way down) and fade. */
@keyframes piece-fly {
  0% {
    transform: translate(0, 0) rotate(0deg);
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1);
  }
  35% {
    transform: translate(var(--dx), var(--dy)) rotate(calc(var(--r) * 0.4));
    animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * 1.3), calc(var(--dy) + var(--fall))) rotate(var(--r));
  }
}

/* Feature cards: icon tile, title + text, arrow. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--sunken);
  border: 2px solid var(--edge);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}
.feature-icon ore-icon.icon.picture {
  width: 32px;
  height: 32px;
}
.feature-text {
  display: grid;
  gap: 4px;
}
.feature h3 {
  margin: 0;
  font-family: var(--title-font);
  font-size: 1rem;
}
.feature p {
  margin: 0;
  color: var(--dim);
}
.feature-go {
  align-self: center;
  color: var(--dim);
}
.feature-count {
  color: var(--good);
}
.feature-count:empty {
  display: none;
}
.feature:hover {
  border-color: var(--ore-color-green-50, #3c8527);
}
.feature:hover .feature-go {
  color: var(--good);
}
[data-motion="on"] .feature {
  transition: transform 0.12s ease, border-color 0.12s ease;
}
[data-motion="on"] .feature:hover {
  transform: translateY(-3px);
}
[data-motion="on"] .feature:hover .feature-go {
  transform: translateX(3px);
}
@keyframes block-float {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-22px) rotate(4deg);
  }
}

/* Header account button: the gamerpic fills a dark square instead of sitting in a white button. */
.account-btn {
  width: 40px;
  min-width: 40px;
  overflow: hidden;
  background: var(--ore-color-gray-100, #1e1e1f);
  box-shadow: none;
}
.account-btn:hover {
  background: var(--ore-color-gray-100, #1e1e1f);
  border-color: var(--ore-color-white);
}
.account-btn .avatar {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.account-btn .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Small labels were hard to read on PC: same size as body text, in the readable pixel font. */
.field-label,
.host-link,
.world-foot .fine {
  font-family: var(--ui-font);
  font-size: 1rem;
}

/* Long bios and IDs wrap instead of running out of the card (phones). */
.profile-bio,
.profile-ident {
  overflow-wrap: anywhere;
}

/* API docs: code boxes scroll inside themselves on small screens. */
.api-layout > *,
.endpoint,
.code-box {
  min-width: 0;
  max-width: 100%;
}
.code-box pre {
  max-width: 100%;
  white-space: pre;
}
/* Long paths like /api/v1/profile/{xuid}/gallery/{imageId}.jpg break onto the next line
   (code blocks keep their lines and scroll instead). */
.endpoint,
.api-layout {
  overflow-wrap: anywhere;
}

/* ===================================================================
   Header brand + spacing, account button, bigger small text, footer, Downloads, 404, team
   =================================================================== */
.brand .brand-mark {
  display: block;
  width: auto;
  height: 38px;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}
.top-nav {
  margin-left: 18px;
}
/* Higher specificity than the light ".top-actions .ore-navbar-action" button style. */
.top-actions .account-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  background: var(--ore-color-gray-100, #1e1e1f);
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px var(--ore-color-gray-70, #48494a);
}
.top-actions .account-btn:hover {
  background: var(--ore-color-gray-100, #1e1e1f);
  box-shadow: inset 0 0 0 2px var(--ore-color-white);
}
.top-actions .account-btn .avatar {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}
.top-actions .account-btn .avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Small text that was hard to read. */
.setting-desc,
.fine,
.note,
.side-title {
  font-size: 1rem;
}
ore-button.small {
  --ore-button-font-size: 1rem;
}

/* Footer: brand + team, three link columns, then the notice. */
.footer {
  padding: 0;
  font-size: 1rem;
  text-align: left;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--pad) 20px;
}
.footer-brand p {
  margin: 8px 0 10px;
}
.footer-brand > img {
  width: auto;
  height: 48px;
}
.footer-team {
  display: flex;
  gap: 8px;
}
.footer-team img {
  display: block;
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  border: 2px solid var(--edge);
}
.footer-team a:hover img {
  border-color: var(--good);
}
.footer-col {
  display: grid;
  align-content: start;
  gap: 6px;
}
.footer-col h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1rem;
}
.footer a {
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
.footer-bottom {
  padding: 12px var(--pad) 18px;
  text-align: center;
  border-top: 2px solid var(--edge);
}
@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Team credits (Settings > About). */
.team {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.team-card img {
  image-rendering: pixelated;
}
.team-name {
  color: var(--text);
  font-family: var(--title-font);
  text-decoration: none;
}
.team-links {
  display: flex;
  gap: 12px;
}

/* Downloads */
.page-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.page-head img {
  image-rendering: pixelated;
}
.page-head h1,
.page-head p {
  margin: 0;
}
.page-head p {
  color: var(--dim);
}
.content-filter {
  margin-bottom: 12px;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.content-card {
  display: grid;
  align-content: start;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}
.content-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--sunken);
}
.content-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.content-type {
  display: inline-block;
  padding: 2px 8px;
  color: #fff;
  font-family: var(--title-font);
  background: var(--ore-color-green-50, #3c8527);
  border: 2px solid #000;
}
.content-cover .content-type {
  position: absolute;
  top: 8px;
  left: 8px;
}
.content-info {
  display: grid;
  gap: 4px;
  padding: 12px 14px 14px;
}
.content-info h3,
.content-info p {
  margin: 0;
}
.content-info p {
  color: var(--dim);
}
.content-card:hover {
  border-color: var(--ore-color-green-50, #3c8527);
}
[data-motion="on"] .content-card {
  transition: transform 0.12s ease, border-color 0.12s ease;
}
[data-motion="on"] .content-card:hover {
  transform: translateY(-3px);
}
[data-motion="on"] .content-cover img {
  transition: transform 0.3s ease;
}
[data-motion="on"] .content-card:hover .content-cover img {
  transform: scale(1.05);
}
.back-btn {
  margin-bottom: 12px;
}
.content-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 320px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 2px solid var(--edge);
}
.content-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.content-hero-text {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 60px 20px 20px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}
.content-hero-text h1,
.content-hero-text p {
  margin: 0;
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.content-main,
.content-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.trailer {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.trailer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trailer-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #fff;
  font-family: var(--title-font);
  background: rgba(200, 0, 0, 0.9);
  border: 2px solid #000;
  transform: translate(-50%, -50%);
}
@media (max-width: 860px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

/* 404 */
.notfound {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 40px auto;
  padding: 32px 20px;
  text-align: center;
}
.notfound-art {
  width: 96px;
  image-rendering: pixelated;
}
.notfound-code {
  font-family: var(--title-font);
  font-size: 4rem;
  line-height: 1;
  color: var(--good);
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
.notfound h1,
.notfound p {
  margin: 0;
}
[data-motion="on"] .notfound-art {
  animation: block-float 6s ease-in-out infinite;
}

/* ===================================================================
   Loading screen (ender chest), button-style cards, white hover outlines, recent lookups
   =================================================================== */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 80px;
  color: #fff;
  background-color: #1a1a1a;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  transition: opacity 0.35s ease, visibility 0.35s;
  /* If the app never starts (script blocked), don't keep the page hidden. */
  animation: loading-timeout 0s 8s forwards;
}
.loading-screen.done {
  opacity: 0;
  visibility: hidden;
}
.loading-stage {
  perspective: 900px;
}
.loading-cube {
  --size: 120px;
}
.loading-cube::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -70px;
  width: 120px;
  height: 22px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  filter: blur(10px);
  transform: translateX(-50%);
}
.loading-text {
  font-family: var(--title-font);
  font-size: 2rem;
  letter-spacing: 3px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
.loading-text span {
  display: inline-block;
}
.loading-text .dot {
  width: 6px;
  height: 6px;
  margin-left: 5px;
  background: currentColor;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}
[data-motion="on"] .loading-cube {
  animation: cube-spin 4s linear infinite;
}
[data-motion="on"] .loading-text span {
  animation: letter-bounce 0.8s ease-in-out infinite alternate;
}
[data-motion="on"] .loading-text span:nth-child(2) {
  animation-delay: 0.1s;
}
[data-motion="on"] .loading-text span:nth-child(3) {
  animation-delay: 0.2s;
}
[data-motion="on"] .loading-text span:nth-child(4) {
  animation-delay: 0.3s;
}
[data-motion="on"] .loading-text span:nth-child(5) {
  animation-delay: 0.4s;
}
[data-motion="on"] .loading-text span:nth-child(6) {
  animation-delay: 0.5s;
}
[data-motion="on"] .loading-text span:nth-child(7) {
  animation-delay: 0.6s;
}
[data-motion="on"] .loading-text span.dot {
  animation: dot-fade 1s ease-in-out infinite;
}
@keyframes letter-bounce {
  to {
    transform: translateY(-10px);
  }
}
@keyframes dot-fade {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
@keyframes loading-timeout {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Feature cards look and press like Minecraft buttons. */
.feature {
  background: var(--surface);
  border: 2px solid #000;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.14);
}
.feature:active {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(0, 0, 0, 0.2);
}

/* Hover = a white outline, everywhere (cards, tiles, lists, the account picture). */
.feature:hover,
.content-card:hover,
.shot:hover,
.trailer:hover,
.team-card:hover,
.recent-item:hover,
.friend:hover,
.world:hover {
  border-color: #000;
  outline: 2px solid var(--ore-color-white);
  outline-offset: 0;
}
.feature:hover .feature-go {
  color: var(--ore-color-white);
}
.top-actions .account-btn:hover,
.top-actions .account-btn:focus-visible {
  outline: 2px solid var(--ore-color-white);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 2px var(--ore-color-gray-70, #48494a);
}
[data-motion="on"] .feature:active,
[data-motion="on"] .content-card:active {
  transform: translateY(2px);
}

/* Recent lookups: a list of names, each with an x to remove it. */
.recent {
  justify-items: stretch;
}
.recent-head {
  justify-content: space-between;
}
.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.recent-item {
  display: flex;
  align-items: stretch;
  padding: 0;
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.recent-item > a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  color: var(--text);
  text-decoration: none;
}
.recent-item > a > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-item > a ore-icon {
  color: var(--dim);
}
.recent-remove {
  display: grid;
  place-items: center;
  width: 36px;
  padding: 0;
  color: var(--dim);
  background: none;
  border: 0;
  border-left: 2px solid var(--edge);
  cursor: pointer;
}
.recent-remove:hover {
  color: #fff;
  background: var(--bad);
}

/* ===================================================================
   Minecraft font on text pages, Settings list colors, team cards, Downloads meta, Tools
   =================================================================== */
/* Text pages (About, How to join, Terms, Privacy, API notes) use the Minecraft font too. */
.prose,
.prose h3,
.profile-card .profile-bio {
  font-family: var(--ui-font);
  font-size: 1rem;
}
.prose h3 {
  font-family: var(--title-font);
}
.prose {
  line-height: 1.5;
}
.legal .updated {
  display: inline-block;
  margin: 2px 0 14px;
  padding: 4px 10px;
  color: var(--text);
  font-size: 1rem;
  background: var(--sunken);
  border: 2px solid var(--edge);
}

/* Settings sections: darker panel, clearer hover, a lit-up current section. */
.side {
  background: var(--ore-color-gray-90, #2a2a2b);
}
.side-title {
  color: var(--ore-color-gray-30, #b1b2b5);
}
.side-item {
  color: var(--ore-color-gray-20, #d0d1d4);
  border: 2px solid transparent;
}
.side-item:hover {
  color: #fff;
  background: var(--ore-color-gray-70, #48494a);
}
.side-item[aria-current="page"] {
  color: #fff;
  background: var(--ore-color-gray-60, #58585a);
  border-color: #000;
  box-shadow: inset 4px 0 0 var(--ore-color-green-50, #3c8527), inset 0 -3px 0 rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .side {
  background: var(--ore-color-gray-30, #b1b2b5);
}
[data-theme="light"] .side-item {
  color: var(--ore-color-gray-90, #2a2a2b);
}
[data-theme="light"] .side-item:hover,
[data-theme="light"] .side-item[aria-current="page"] {
  color: #000;
  background: var(--ore-color-gray-10, #e6e8eb);
}

/* Team cards (Settings > About). */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--sunken);
  border: 2px solid #000;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
.team-head img {
  display: block;
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  border: 2px solid #000;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.team-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.team-name {
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1.25rem;
  text-decoration: none;
}
.team-handle {
  color: var(--dim);
}
.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.team-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  color: #fff;
  font-family: var(--title-font);
  text-decoration: none;
  border: 2px solid #000;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}
.team-link.youtube {
  background: #c4302b;
}
.team-link.discord {
  background: #5865f2;
}
.team-link:hover {
  outline: 2px solid #fff;
}
[data-motion="on"] .team-link:active {
  transform: translateY(2px);
}

/* Downloads: search + type tabs, and the card's title and meta chips. */
.content-tools {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.content-search {
  width: 100%;
}
.content-tools .content-filter {
  margin: 0;
}
.content-title {
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}
.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  color: var(--ore-color-gray-20, #d0d1d4);
  background: var(--sunken);
  border: 2px solid var(--edge);
}
.chip.version {
  color: var(--good);
}
.chip ore-icon.icon {
  width: 14px;
  height: 14px;
}

/* Tools */
.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 16px;
  align-items: start;
}
.tool-main,
.tool-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.tool-side {
  position: sticky;
  top: 76px;
}
.tool-panel {
  display: grid;
  gap: 10px;
}
.tool-panel .card-label {
  margin: 0;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.tool-grid[hidden] {
  display: none;
}
.tool-field.wide,
.tool-grid .wide {
  grid-column: 1 / -1;
}
.tool-field ore-textfield {
  width: 100%;
}
.tool-checks {
  flex-wrap: wrap;
  gap: 10px 18px;
}
.id-field {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.id-field ore-textfield {
  flex: 1;
  min-width: 0;
}
.tool-textarea {
  display: block;
  width: 100%;
  min-height: 70px;
  margin-top: 4px;
  padding: 8px;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  background: var(--ore-color-gray-100, #1e1e1f);
  border: 2px solid #000;
  resize: vertical;
}
.tool-textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
}
.tool-errors {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-errors:empty {
  display: none;
}
.tool-errors li {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(192, 57, 43, 0.25);
  border: 2px solid var(--bad);
}
.manifest-out .code-box pre {
  max-height: 340px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.drop-zone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
  background: var(--sunken);
  border: 2px dashed var(--dim);
  cursor: pointer;
}
.drop-zone ore-icon.icon {
  width: 36px;
  height: 36px;
}
.drop-zone:hover,
.drop-zone.over {
  border-color: #fff;
  border-style: solid;
}
.warn-text {
  color: var(--warn);
}
.glyph-page {
  width: 160px;
}
.glyph-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 2px;
  background: #4a4a4c;
  border: 2px solid #000;
}
.glyph-grid:empty {
  display: none;
}
.glyph-cell {
  aspect-ratio: 1;
  padding: 2px;
  background: var(--ore-color-gray-80, #313233);
  border: 0;
  cursor: pointer;
}
.glyph-cell canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.glyph-cell.blank {
  background: #232324;
}
.glyph-cell:not(.blank) {
  background: repeating-conic-gradient(#3a3a3b 0% 25%, #2f2f30 0% 50%) 50% / 8px 8px;
}
.glyph-cell:hover {
  outline: 2px solid #fff;
  outline-offset: -2px;
  background: var(--ore-color-gray-60, #58585a);
}
.glyph-cell.selected {
  outline: 2px solid var(--good);
  outline-offset: -2px;
  background: var(--ore-color-gray-70, #48494a);
}
.glyph-detail {
  display: grid;
  gap: 10px;
}
.glyph-big {
  justify-self: center;
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  background: repeating-conic-gradient(#3a3a3b 0% 25%, #2a2a2b 0% 50%) 50% / 16px 16px;
  border: 2px solid #000;
}
@media (max-width: 960px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .tool-side {
    position: static;
  }
}
@media (max-width: 560px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .glyph-grid {
    gap: 1px;
  }
  .glyph-cell {
    padding: 1px;
  }
}

/* ===================================================================
   Worlds > Realms, account menu, verified seal, tooltip, admin page
   =================================================================== */
/* Worlds | Realms tabs */
.worlds-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
  margin: 0 0 16px;
}
.worlds-tabs ore-tab-button {
  min-width: 0;
  min-height: 48px;
}

/* Number tiles (Realms and admin overview) */
.realm-stats,
.admin-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.stat-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
}
.stat-art {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--sunken);
  border: 2px solid #000;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.3);
}
.stat-art ore-icon.icon {
  width: 32px;
  height: 32px;
}
.stat-tile > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.stat-tile strong {
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1.75rem;
  line-height: 1.1;
}
.stat-tile > div > span {
  color: var(--dim);
}
.stat-tile small {
  color: var(--dimmer);
  font-size: var(--px-sm);
}
.live-dot {
  width: 18px;
  height: 18px;
  background: #e74c3c;
  border: 2px solid #000;
}
[data-motion="on"] .live-dot {
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }
}

/* Add / check a Realm */
.realm-add {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.realm-add-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1.25rem;
}
.realm-add > p {
  margin: 0;
  color: var(--dim);
}
.realm-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.realm-add-row .realm-code {
  flex: 1 1 260px;
  min-width: 0;
}
.realm-error,
.admin-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  color: #fff;
  background: rgba(192, 57, 43, 0.25);
  border: 2px solid var(--bad);
}
.admin-error[hidden] {
  display: none;
}
.realm-add > .realm-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--dimmer);
  font-size: var(--px-sm);
}
.realm-result:empty {
  display: none;
}
.realm-result .realm-card {
  max-width: 560px;
}

/* Search + filters */
.realm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 10px;
  padding: 12px;
}
.realm-filters .realm-search {
  flex: 1 1 280px;
  min-width: 0;
}
.realm-filters .field {
  flex: 0 1 200px;
  min-width: 150px;
}

/* Realm cards: a dark card with a colored edge (green = open), like the Realms screen. */
.realm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 12px;
}
.realm-card {
  --edge-color: var(--ore-color-green-50, #3c8527);
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px 12px 12px 18px;
  background: var(--surface);
  border: 2px solid #000;
  box-shadow: inset 6px 0 0 var(--edge-color), inset 0 -4px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
.realm-card.closed {
  --edge-color: var(--ore-color-gray-50, #6d6d6e);
}
.realm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.realm-icon {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 2px;
  image-rendering: pixelated;
  background: var(--sunken);
  border: 2px solid #000;
}
.realm-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--title-font);
  font-size: 1.125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.realm-state {
  flex: none;
  padding: 2px 8px;
  font-family: var(--title-font);
  font-size: var(--px-sm);
  border: 2px solid #000;
}
.realm-state.open {
  color: #fff;
  background: var(--ore-color-green-50, #3c8527);
}
.realm-state.closed {
  color: var(--ore-color-gray-20, #d0d1d4);
  background: var(--ore-color-gray-70, #48494a);
}
.realm-motd {
  margin: 0;
  padding: 8px 10px;
  color: var(--text);
  overflow-wrap: anywhere;
  background: var(--sunken);
  border: 2px solid #000;
}
.realm-motd.empty {
  color: var(--dimmer);
  font-style: italic;
}
.realm-rows {
  display: grid;
  background: var(--sunken);
  border: 2px solid #000;
}
.realm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 10px;
}
.realm-row + .realm-row {
  border-top: 2px solid var(--edge);
}
.realm-row > ore-icon.icon {
  flex: none;
  color: var(--dim);
}
.realm-row-label {
  flex: none;
  color: var(--dim);
  font-family: var(--title-font);
  font-size: var(--px-sm);
}
.realm-row-value {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--text);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.realm-row-value code,
.admin-table code {
  color: var(--good);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
}
.realm-owner,
.admin-player {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
}
.realm-owner > span,
.admin-player > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.realm-owner:hover > span,
.admin-player:hover > span {
  text-decoration: underline;
}
.avatar-xs {
  width: 22px;
  height: 22px;
  font-size: 12px;
}
.realm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.realm-foot > ore-button:first-child {
  flex: 1 1 120px;
}
.realm-listed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--good);
  font-family: var(--title-font);
}

/* Account menu (the Xbox picture in the header) */
.menu.account-menu {
  width: 300px;
  padding: 0;
}
.account-head {
  gap: 12px;
  margin: 0;
  padding: 14px 12px;
  background: linear-gradient(var(--ore-color-gray-80, #313233), var(--ore-color-gray-90, #2a2a2b));
  border-bottom: 2px solid #000;
}
.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 24px;
}
.account-head .avatar {
  flex: none;
  border: 2px solid #000;
  box-shadow: 0 0 0 2px var(--ore-color-gray-60, #58585a), 0 4px 0 2px rgba(0, 0, 0, 0.4);
}
.account-ident {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.account-menu .menu-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--title-font);
  font-size: 1.25rem;
}
.menu-gamertag {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu .menu-sub {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  max-width: 100%;
  padding: 2px 8px;
  overflow: hidden;
  color: var(--ore-color-gray-30, #b1b2b5);
  white-space: nowrap;
  background: var(--ore-color-gray-100, #1e1e1f);
  border: 2px solid #000;
}
.account-menu .menu-sub.discord {
  color: #c9cdfb;
}
.menu-group {
  display: grid;
  padding: 4px;
}
.menu-group + .menu-group {
  border-top: 2px solid var(--ore-color-gray-80, #313233);
}
.account-menu .menu-item {
  gap: 12px;
  padding: 7px 8px;
  font-size: 1rem;
}
.account-menu .menu-item ore-icon.icon {
  flex: none;
  box-sizing: content-box;
  width: 18px;
  height: 18px;
  padding: 4px;
  background: var(--ore-color-gray-90, #2a2a2b);
  border: 2px solid #000;
}
.account-menu .menu-item:hover,
.account-menu .menu-item:focus-visible {
  background: var(--ore-color-gray-70, #48494a);
  box-shadow: inset 3px 0 0 #fff;
}
.account-menu .menu-item.danger:hover,
.account-menu .menu-item.danger:focus-visible {
  background: rgba(192, 57, 43, 0.3);
  box-shadow: inset 3px 0 0 var(--bad);
}
@media (max-width: 760px) {
  .menu.account-menu {
    width: auto;
  }
}

/* Verified seal: a big green block with a white tick; red with a cross when not verified. */
.badge-icon.verified,
.badge-icon.not-verified {
  filter: none; /* a filter here trapped the tooltip under the gamerscore below it */
}
.seal {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #000;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35), inset 0 3px 0 rgba(255, 255, 255, 0.3), 0 3px 0 rgba(0, 0, 0, 0.45);
}
.seal.verified {
  background: var(--ore-color-green-50, #3c8527);
}
.seal.not-verified {
  background: #c0392b;
}
.seal > .mark {
  display: block;
  width: 22px;
  height: 18px;
  background: #fff;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.seal.verified > .mark {
  --mark: url("img/ore/check.png");
}
.seal.not-verified > .mark {
  --mark: url("img/ore/cross.png");
  width: 16px;
  height: 16px;
}
.seal.small {
  width: 22px;
  height: 22px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.3);
}
.seal.small > .mark {
  width: 13px;
  height: 11px;
}
.badge-icon.not-verified {
  gap: 8px;
}
.badge-icon.not-verified > span.badge-text {
  color: #ff7b6b;
  font-family: var(--title-font);
  font-size: 1rem;
}
[data-motion="on"] .badge-icon .seal {
  transition: transform 0.12s ease-out;
}
[data-motion="on"] .badge-icon:hover .seal {
  transform: translateY(-2px);
}

/* Tooltip: solid (nothing shows through it) and above the lines below its badge. */
.mc-tooltip {
  z-index: 60;
  background: rgb(16, 0, 16);
  box-shadow: 0 0 0 2px rgb(16, 0, 16), 0 6px 16px rgba(0, 0, 0, 0.5);
}
.has-tip:hover,
.has-tip:focus-visible,
.has-tip.tip-open {
  z-index: 60;
}

/* Admin page (/ac/admin) */
.admin-login {
  display: grid;
  gap: 14px;
  max-width: 420px;
  margin: 24px auto;
  padding: 20px;
}
.admin-login-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-login-head > ore-icon.icon,
.admin-head > ore-icon.icon {
  flex: none;
  width: 36px;
  height: 36px;
}
.admin-login h1 {
  margin: 0;
  font-family: var(--title-font);
}
.admin-login p {
  margin: 4px 0 0;
  color: var(--dim);
}
.admin-field {
  display: grid;
  gap: 6px;
}
.admin-field > span {
  color: var(--dim);
  font-family: var(--title-font);
}
.admin-input {
  width: 100%;
  padding: 10px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  background: var(--ore-color-gray-100, #1e1e1f);
  border: 2px solid #000;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35);
}
.admin-input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
}
[data-theme="light"] .admin-input {
  background: #fff;
}
.admin-head {
  align-items: center;
}
.admin-head .grow {
  flex: 1;
  min-width: 0;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-family: var(--title-font);
  text-decoration: none;
  background: var(--surface);
  border: 2px solid #000;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.12);
}
.admin-tab:hover {
  outline: 2px solid #fff;
}
.admin-tab[aria-current="page"] {
  color: #fff;
  background: var(--ore-color-green-50, #3c8527);
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 10px;
}
.admin-search {
  flex: 1 1 280px;
  min-width: 0;
}
.admin-count {
  color: var(--dim);
}
.table-wrap {
  overflow-x: auto;
  background: var(--sunken);
  border: 2px solid #000;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  padding: 8px 10px;
  color: var(--dim);
  font-family: var(--title-font);
  font-weight: normal;
  text-align: left;
  white-space: nowrap;
  background: var(--ore-color-gray-90, #2a2a2b);
}
[data-theme="light"] .admin-table th {
  background: var(--ore-color-gray-20, #d0d1d4);
}
.admin-table td {
  padding: 8px 10px;
  vertical-align: middle;
  white-space: nowrap;
  border-top: 2px solid var(--edge);
}
.admin-table td.wrap {
  min-width: 200px;
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.admin-table td.wrap small {
  display: block;
  margin-top: 2px;
  color: var(--dim);
}
.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}
.admin-code {
  padding: 0;
  font: inherit;
  background: none;
  border: 0;
  cursor: copy;
}
.admin-code:hover code {
  text-decoration: underline;
}
.admin-server .card-label {
  margin-top: 0;
}
.admin-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}
.admin-dl dt {
  color: var(--dim);
  font-family: var(--title-font);
}
.admin-dl dd {
  margin: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  /* Phones: the three Realms numbers sit in one compact row; admin numbers two per row. */
  .realm-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .admin-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .realm-stats .stat-tile,
  .admin-tiles .stat-tile {
    flex-direction: column;
    gap: 6px;
    padding: 10px 6px;
    text-align: center;
  }
  .realm-stats .stat-tile > div,
  .admin-tiles .stat-tile > div {
    justify-items: center;
  }
  .stat-art {
    width: 40px;
    height: 40px;
  }
  .stat-art ore-icon.icon {
    width: 24px;
    height: 24px;
  }
  .stat-tile strong {
    font-size: 1.25rem;
  }
  .stat-tile > div > span {
    font-size: var(--px-sm);
  }
}
