:root {
  --ink: #25313a;
  --muted: #64717d;
  --line: #e2e7eb;
  --accent: #176b83;
  --accent-soft: #eaf3f6;
  --success: #26734f;
  --danger: #ad3449;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
[hidden] { display: none !important; }
.system-tabs { margin-bottom: 24px; }
.system-tabs button { display: inline-flex; gap: 7px; align-items: center; }
#account-principal { overflow-wrap: anywhere; }
@media(max-width:400px) { .system-tabs button { font-size: 11px; padding: 10px 6px; gap: 4px; } .system-tabs svg { width: 14px; height: 14px; } }
button, input, select, textarea { border-color: #cfd7dd; border-radius: 5px; }
button { min-height: 36px; font-size: 13px; font-weight: 500; transition: background .12s, border-color .12s; }
button:hover:not(:disabled) { background: #f1f5f7; border-color: #a7b9c4; }
button:disabled { opacity: .48; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #3685a1; outline-offset: 3px; }
input, select, textarea { font-size: 13px; }
input:disabled, select:disabled { background-color: #f5f7f8; color: #77838d; }
/* Lucide ChevronDown; reserve its space even in compact select controls. */
:root select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364717d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px 15px;
  padding-right: 36px;
}
@media (forced-colors: active) {
  :root select:not([multiple]):not([size]) { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 11px; }
}
.primary { background: var(--accent); border-color: var(--accent); }
.primary:hover:not(:disabled) { background: #12586d; border-color: #12586d; }
.danger { color: var(--danger); }
.primary.danger, .primary.danger:hover:not(:disabled) { background: var(--danger); border-color: var(--danger); }
.icon { width: 36px; min-width: 36px; height: 36px; }
svg { width: 17px; height: 17px; stroke-width: 1.8; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); font-size: 12px; }
.error:not(:empty) { padding: 10px 12px; border-left: 3px solid var(--danger); background: #fff4f5; color: #a42d42; font-size: 12px; }
.empty { min-height: 144px; color: var(--muted); font-size: 13px; }
.mark { background: var(--accent-soft); color: var(--accent); border: 1px solid #d3e5eb; }
#app { grid-template-columns: 220px minmax(0, 1fr); }
aside { background: #f6f8f9; border-color: var(--line); padding: 28px 14px 22px; gap: 36px; }
.brand { gap: 10px; padding: 0 12px; }
.brand strong { font-size: 18px; }
.brand small { color: var(--muted); font-size: 11px; }
.sidebar-heading, .header-location { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sidebar-heading .brand { flex: 1; min-width: 0; }
#navigation-toggle, #navigation-close, #navigation-backdrop { display: none; }
nav button { min-height: 42px; margin-bottom: 5px; gap: 11px; padding: 10px 13px; font-size: 13px; font-weight: 450; }
nav button.active { background: #e8f1f4; color: #155d74; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
nav button>span:last-child:not(:nth-child(2)) { font-variant-numeric: tabular-nums; background: #d8e8ed; padding: 0 6px; border-radius: 3px; min-width: 22px; text-align: center; }
.aside-bottom { border-top: 1px solid var(--line); padding: 16px 12px 0; gap: 12px; }
.aside-bottom button { font-size: 12px; color: var(--muted); min-height: 30px; }
.aside-bottom>span { max-width: 165px; color: var(--muted); }
main { display: flex; flex-direction: column; min-height: 100svh; }
header { position: sticky; top: 0; z-index: 700; height: 60px; flex-shrink: 0; padding: 0 32px; background: #fff; border-color: var(--line); }
.breadcrumb { color: var(--muted); font-size: 12px; gap: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 550; }
.connection { font-size: 12px; color: var(--muted); gap: 7px; }
.connection .icon { border: 1px solid var(--line); margin-left: 10px; }
.dot { width: 7px; height: 7px; background: #a5afb7; }
.dot.online { background: var(--success); }
.connection[data-state=stale] { color: #9a6b26; }
.page-heading { padding: 26px 32px 0; align-items: center; }
.page-heading p { font-size: 12px; color: var(--muted); margin-top: 5px; }
#reload { font-size: 12px; background: #fff; }
.banner { background: #fff8e8; color: #835d20; border-color: #c18b31; margin: 20px 32px 0; border-radius: 0; font-size: 12px; }
.view { padding: 24px 32px 0; flex: 1; }
footer { padding-top: 14px; border-top: 1px solid var(--line); margin: 28px 32px 18px; color: var(--muted); font-size: 11px; }
.metrics { padding: 24px 0; border-color: var(--line); }
.metrics>div { padding-left: 28px; border-color: var(--line); }
.metrics span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.metrics span svg { width: 14px; height: 14px; color: #7f959f; }
.metrics strong { font-size: 28px; font-weight: 550; margin-top: 12px; font-variant-numeric: tabular-nums; }
.metrics[data-stale=true] strong { color: #7e8c97; }
.charts { gap: 36px; margin: 28px 0 24px; }
.chart { border-color: var(--line); padding-bottom: 16px; }
.chart canvas { height: 185px; }
.section-title { margin-bottom: 12px; }
.section-title .muted { font-size: 11px; }
.event-columns, .event-row { display: grid; grid-template-columns: 152px 84px minmax(0, 1fr); gap: 16px; }
.event-columns { background: #f6f8fa; border-block: 1px solid var(--line); padding: 9px 12px; color: var(--muted); font-size: 11px; }
.event-row { padding: 12px; font-size: 12px; align-items: start; }
.event-row>span:first-child { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-kind { font-size: 11px; color: #526876; }
.toolbar { margin-bottom: 16px; gap: 14px; }
.search { width: 250px; max-width: 100%; }
.search input { height: 36px; font-size: 12px; }
.search svg { top: 10px; }
.segments { gap: 0; border-color: var(--line); }
.segments button { font-size: 12px; color: var(--muted); padding: 10px 13px; }
.segments button.selected { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.player-tabs { margin-bottom: 20px; }
.player-tabs button { padding: 10px 16px!important; }
thead { background: #f6f8fa; }
th { padding: 11px 12px; color: #657581; font-size: 11px; font-weight: 600; border-block: 1px solid var(--line); }
td { padding: 13px 12px; font-size: 13px; border-color: var(--line); }
tbody tr:hover { background: #f7fafb; }
.name-button { white-space: normal; text-align: left; font-size: 13px; font-weight: 550; }
.name-button svg { width: 15px; height: 15px; color: #7896a2; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; background: #edf6f0; color: #26734f; border-radius: 3px; font-size: 11px; }
.badge:before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.badge.offline { background: #eef1f4; color: #65717c; }
.badge.banned { background: #faebee; color: #aa3c52; }
.cell-actions { gap: 3px; }
.cell-actions .icon { width: 30px; min-width: 30px; height: 30px; min-height: 30px; color: #52717f; }
.cell-actions .danger { color: var(--danger); }
.cell-actions .icon:hover:not(:disabled) { background: #e8f0f4; }
.cell-actions .danger:hover:not(:disabled) { background: #fcecef; }
.pagination { font-size: 12px; margin-top: 16px; color: var(--muted); }
.pagination .tools { gap: 12px; }
#page-number { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.console-output { background: #242a2f; color: #dbe3e8; border: 1px solid #313a42; border-radius: 5px; height: min(60svh, 620px); font-size: 12px; padding: 18px; }
.console-line .timestamp { color: #9aadb8; }
.console-line.error { background: transparent; border: 0; padding: 0; color: #ffb3bc; }
.command-bar input { min-width: 0; }
.file-workspace { border-color: #d7dfe5; height: min(67svh, 720px); min-height: 470px; border-radius: 5px; grid-template-columns: 230px minmax(0,1fr); }
.file-list { max-height: none; padding: 8px; }
.file-list button { font-size: 12px; min-height: 36px; }
.file-list button.selected { background: var(--accent-soft); color: var(--accent); }
.file-list .folder-icon { color: #a4823e; }
.editor-bar { background: #f8fafb; min-height: 54px; }
.editor-bar>span:first-child { font-size: 12px; }
.editor textarea { font-size: 12px; min-height: 0; line-height: 1.8; padding: 18px; }
#dirty-label { color: #9a6b26; font-size: 11px; white-space: nowrap; }
.plugin-description { color: var(--muted); font-size: 11px; max-width: 420px; }
.plugin-meta { display: none; }
.switch input { width: 32px; height: 18px; min-width: 32px; }
.switch input:after { width: 14px; height: 14px; }
.switch input:checked { background: var(--success); }
.world-controls { gap: 28px; padding-bottom: 24px; margin-bottom: 24px; }
.op-toolbar { flex-wrap: wrap; }
.op-toolbar h2 { margin-bottom: 5px; }
.op-toolbar .search { margin-left: auto; }
.ops-table { width: 100%; min-width: 0; table-layout: fixed; white-space: normal; }
.ops-table td { overflow-wrap: anywhere; }
.ops-table th:first-child { width: 27%; }
.ops-table th:last-child { width: 95px; }
.op-identity-note, .op-protected { display: block; font-size: 11px; margin-top: 4px; color: var(--muted); }
.op-protected { color: var(--success); }
.op-role { color: #ac4b25; font-weight: 600; }
.op-target-form { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.op-target-form input { width: 160px; min-width: 0; }
.op-target-form label { margin: 0; }
.op-conversion { padding: 20px 0; }
.op-conversion summary { cursor: pointer; color: var(--muted); }
.op-conversion form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.op-conversion input { width: 170px; min-width: 0; }
.op-conversion output { overflow-wrap: anywhere; }
.op-edit-content label { display: block; }
.op-edit-content label input, .op-edit-content label select { width: 100%; margin-top: 7px; }
.op-edit-content .op-abilities { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.op-edit-content .op-abilities label { display: flex; align-items: center; gap: 8px; margin: 0; }
.op-edit-content .op-abilities input { width: 16px; min-width: 16px; margin: 0; }
.op-flags { display: block; font-family: ui-monospace,monospace; color: var(--muted); margin: 14px 0; }
.op-target-summary { overflow-wrap: anywhere; }
.block-search-bar { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; }
.block-search-bar .search, .block-position-inputs { flex: 1; min-width: 0; }
.block-search-bar .search input { width: 100%; min-width: 0; }
.block-search-bar>select { min-width: 0; }
.block-dimension { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.block-position-inputs { display: flex; gap: 10px; }
.block-position-inputs[hidden], .block-search-bar [hidden] { display: none; }
.block-position-inputs label { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; margin: 0; }
.block-position-inputs input { width: 100%; min-width: 0; }
.commandblocks-table { table-layout: fixed; width: 100%; min-width: 0; white-space: normal; }
.commandblocks-table td { overflow-wrap: anywhere; }
.commandblocks-table th:first-child { width: 22%; }
.commandblocks-table th:nth-child(2) { width: 38%; }
.commandblocks-table th:last-child { width: 75px; }
.block-position { font-family: ui-monospace, monospace; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.block-name { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.block-command-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.block-history-button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; }
.block-history-button svg { width: 15px; height: 15px; }
.block-history-button { max-width: 100%; }
.block-history-button span { min-width: 0; overflow-wrap: anywhere; }
.block-command-full { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; padding: 12px; background: #f2f5f6; border: 1px solid var(--line); border-radius: 3px; max-height: 300px; overflow: auto; }
.block-history-entry { border-bottom: 1px solid var(--line); padding: 14px 0; }
.block-history-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
@media(max-width:700px) {
  .op-toolbar>div { width: 100%; }
  .op-toolbar .search { width: 100%; margin-left: 0; }
  .op-toolbar .search input { width: 100%; }
  .ops-table, .ops-table tbody { display: block; }
  .ops-table thead { display: none; }
  .ops-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  #ops-view .ops-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .ops-table td:first-child { grid-column: 1; grid-row: 1; }
  .ops-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .ops-table td:nth-child(3) { grid-column: 1; grid-row: 3; }
  .ops-table td:nth-child(3) small { display: inline; margin-left: 8px; }
  .ops-table .op-status-cell { grid-column: 2; grid-row: 1; text-align: right; color: var(--muted); font-size: 11px; }
  .ops-table td:last-child { grid-column: 2; grid-row: 2 / 4; align-self: center; }
  .ops-table .cell-actions { gap: 6px; justify-content: flex-end; }
  .op-target-form { flex-wrap: wrap; }
  .op-target-form label { width: 100%; }
  .op-target-form input { flex: 1; width: 0; }
  .op-conversion input { flex: 1; }
  .block-search-bar { flex-wrap: wrap; }
  .block-search-bar>select { width: 100%; }
  .block-position-inputs label { flex-direction: column; align-items: stretch; gap: 4px; }
  .block-position-inputs input { padding: 6px; }
  .commandblocks-table th:nth-child(3), .commandblocks-table td:nth-child(3), .commandblocks-table th:nth-child(4), .commandblocks-table td:nth-child(4) { display: none; }
  .commandblocks-table th:first-child { width: 36%; }
  .commandblocks-table th:nth-child(2) { width: auto; }
  .commandblocks-table th:last-child { width: 64px; }
  .commandblocks-table th:last-child, .commandblocks-table td:last-child { padding-left: 4px; padding-right: 4px; }
  .block-history-button { padding: 6px 4px; }
}
.world-controls form { width: 260px; }
.world-controls label { color: var(--muted); font-size: 12px; }
.world-rules { gap: 0 36px; }
.rule-row { padding: 14px 0; align-items: center; }
.rule-row[hidden] { display: none; }
.rule-row.dirty { background: #fffaf0; }
.rule-name { font-size: 13px; color: var(--ink); line-height: 1.5; }
.rule-name code { color: var(--muted); font-size: 10px; }
.rule-row input[type=number] { width: 92px; font-size: 12px; height: 34px; padding: 6px 8px; }
.rule-row input[type=checkbox] { margin: 0 8px; }
.rule-row .tools { gap: 7px; }
.rule-row .icon { width: 30px; min-width: 30px; height: 30px; min-height: 30px; }
#rule-count { font-weight: 400; margin-left: 8px; }
dialog { border-color: #d8e0e6; padding: 24px; border-radius: 7px; max-height: 88svh; box-shadow: 0 16px 60px #182c3b30; }
dialog::backdrop { background: #182c3b66; }
.dialog-heading { background: #fff; gap: 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 17px; line-height: 1.5; }
#inspector .dialog-heading { position: sticky; top: -24px; padding-top: 16px; z-index: 1; }
#inspector { width: min(760px,calc(100% - 32px)); }
.dialog-actions { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; gap: 8px; }
.dialog-actions button { min-width: 76px; }
#modal-content p { font-size: 13px; color: #586975; }
#modal-content label { font-size: 12px; color: var(--muted); }
.profile-section { margin-top: 26px; }
.profile-section h3 { font-size: 13px; font-weight: 600; color: #405c6a; }
.profile-section .detail-row { font-size: 12px; grid-template-columns: 124px minmax(0,1fr); padding: 11px 0; }
.profile-section .detail-row>span:first-child { color: var(--muted); }
.detail-value-with-copy { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
.detail-value-with-copy>span { overflow-wrap: anywhere; min-width: 0; }
.detail-value-with-copy .icon { width: 26px; min-width: 26px; height: 26px; min-height: 26px; border: 0; color: var(--muted); }
.profile-scoreboards th { background: #f6f8fa; padding-block: 10px; }
.profile-scoreboards td { padding-block: 11px; font-size: 12px; }
.scoreboard-caption { color: var(--muted); }
.scoreboard-row-status { color: #946722; }
.scoreboard-row-status[data-state=saved] { color: var(--success); }
.scoreboard-row-status[data-state=pending] { color: var(--muted); }
.world-rules>.empty { grid-column: 1 / -1; }
.inventory-caption { color: var(--muted); font-size: 12px; }
.inventory-slot { border-color: #d6e0e6; background: #f2f6f8; }
.inventory-view { max-width: 540px; margin-inline: auto; }
.inventory-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.inventory-nav h3 { margin: 0; font-size: 13px; }
.inventory-group h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12px; margin: 0 0 8px; }
.inventory-availability { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.inventory-view .inventory-grid { grid-template-columns: repeat(9,minmax(0,1fr)); gap: 4px; }
.inventory-view .inventory-slot { width: 100%; padding: 3px; min-height: 0; border-radius: 2px; box-shadow: inset 1px 1px #a9b3ba, inset -1px -1px #fff; background: #e3e8ec; }
.inventory-view .inventory-slot.selected { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -2px; }
.inventory-view .inventory-slot.enchanted { background: #e9e3f0; }
.inventory-view .inventory-slot.unavailable { opacity: 1; background: #f5f7f9; box-shadow: none; border-style: dashed; color: #8a99a5; cursor: not-allowed; }
.inventory-view .inventory-slot .amount { background: #e3e8ec; }
.inventory-view .inventory-slot .inventory-icon { width: 90%; max-width: 40px; }
.inventory-unknown { font-size: 18px; font-weight: 400; }
.inventory-detail { min-width: 0; min-height: 96px; border-top: 1px solid var(--line); margin-top: 20px; padding: 14px 0 0; font-size: 12px; overflow-wrap: anywhere; line-height: 1.6; }
.inventory-detail p { margin: 6px 0; font-size: 11px; white-space: pre-wrap; }
.inventory-detail strong { font-size: 13px; }
.inventory-enchant { color: #735091; }
.inventory-storage { margin-top: 16px; }
.inventory-unavailable-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 14px 0; overflow-wrap: anywhere; }
@media(max-width:700px) {
  .inventory-view .inventory-grid { gap: 2px; }
  .inventory-view .inventory-slot { padding: 1px; }
  .inventory-detail { padding-top: 12px; }
  .inventory-view .inventory-slot .amount { font-size: 9px; right: 1px; padding: 0 1px; }
}
.track-recording, .track-timeline { border-color: var(--line); }
#map-follow[aria-pressed=true] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.track-workspace { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; align-items: start; }
.track-map-column { min-width: 0; }
.track-activity { min-width: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.activity-heading, .activity-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.activity-heading { min-height: 36px; margin-bottom: 14px; }
.activity-heading h2 { display: flex; align-items: center; gap: 8px; }
.activity-tools select { width: 128px; font-size: 12px; }
.activity-tools .check { white-space: nowrap; }
.activity-list { height: 650px; max-height: 76svh; overflow: auto; margin-top: 14px; overscroll-behavior: contain; }
.activity-row { border-top: 1px solid var(--line); padding: 13px 0; font-size: 12px; }
.activity-row-header { display: flex; gap: 8px; align-items: center; }
.activity-time { padding: 0; min-height: 24px; border: 0; background: transparent; color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; }
.activity-type { font-size: 10px; padding: 2px 5px; border-radius: 3px; color: #596d79; background: #edf1f4; }
.activity-type[data-kind=chat] { color: #2676a1; background: #eaf3fa; }
.activity-type[data-kind=join] { color: var(--success); background: #edf6f0; }
.activity-type[data-kind=death], .activity-type[data-kind=kill] { color: var(--danger); background: #faebee; }
.activity-actor { min-width: 0; overflow-wrap: anywhere; font-weight: 550; margin: 6px 0 4px; }
.activity-message { color: #586975; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.activity-row:first-child { border-top-color: #b7cdd6; }
@media (max-width: 1100px) { .track-workspace { grid-template-columns: minmax(0,1fr); } .track-activity { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } .activity-list { height: 340px; max-height: none; } }
.track-filters { margin: 18px 0; }
.track-filters label, .track-date-field { color: var(--muted); font-size: 12px; }
.track-filters select { color: var(--ink); }
.track-map-shell { border-color: #d7e1dd; border-radius: 5px; }
.map-meta { color: var(--muted); }
.timeline-heading time { font-size: 12px; }
.track-playback .check { font-size: 12px; }
.track-calendar { border-radius: 5px; }
.track-player-field { position: relative; min-width: 0; color: var(--muted); font-size: 12px; }
#track-player-button { width: 100%; height: 37px; margin-top: 7px; padding: 7px 10px; justify-content: flex-start; font-size: 12px; }
#track-player-button span { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#track-player-button svg { width: 15px; height: 15px; flex-shrink: 0; }
.track-player-menu { position: absolute; left: 0; top: calc(100% + 8px); width: 320px; max-width: calc(100vw - 32px); padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; box-shadow: 0 8px 28px #25374824; z-index: 1100; }
.track-player-menu[hidden] { display: none; }
#players-view .track-player-menu .search { display: block; width: 100%; margin: 0 0 10px; }
.track-all-players { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.track-player-options { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; padding: 5px 0; }
.track-player-option { display: flex; align-items: center; gap: 9px; padding: 9px 6px; min-height: 36px; cursor: pointer; border-radius: 3px; }
.track-player-option:hover { background: #f2f6f8; }
.track-player-option input { width: 15px; height: 15px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.track-player-option span { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.track-player-option small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.track-player-menu-footer { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.track-player-menu-footer .muted { flex: 1; font-size: 11px; }
#track-player-apply { font-size: 12px; padding: 8px 14px; background: var(--accent); border-color: var(--accent); color: #fff; }
.track-follow-controls { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; min-width: 0; }
.track-follow-controls label { margin: 0; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.track-follow-controls select { width: 250px; max-width: calc(100% - 65px); height: 34px; min-width: 0; padding: 5px 9px; font-size: 12px; text-overflow: ellipsis; }
#toast { display: flex; align-items: flex-start; gap: 14px; max-width: min(500px,calc(100vw - 32px)); background: #26353d; color: #fff; padding: 12px 12px 12px 16px; z-index: 1500; font-size: 12px; }
#toast-message { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
#toast .icon { width: 24px; height: 24px; min-width: 24px; min-height: 24px; border: 0; background: transparent; color: #d0dce2; }
#toast[hidden] { display: none; }
#login-screen { background: #f5f7f9; }
.login-brand strong { font-size: 22px; }
.login-brand>span:last-child { color: var(--muted); }
#login-form { width: min(360px,100%); }
#login-form h1 { font-size: 20px; }
.token-field { display: flex; align-items: center; position: relative; }
.token-field input { padding-right: 45px; height: 42px; }
.token-field .icon { position: absolute; right: 4px; border: 0; height: 34px; min-height: 34px; }
.loading-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media(min-width:1500px) {
  header { padding-inline: 44px; }
  .page-heading, .view { padding-inline: 44px; }
  .banner, footer { margin-inline: 44px; }
}
@media(max-width:1100px) and (min-width:701px) {
  #app { grid-template-columns: 192px minmax(0,1fr); }
  aside { padding-inline: 10px; }
  .brand { padding-inline: 6px; }
  header, .page-heading, .view { padding-inline: 24px; }
  .banner, footer { margin-inline: 24px; }
  .file-workspace { grid-template-columns: 180px minmax(0,1fr); }
}
@media(max-width:700px) {
  #app { display: flex; }
  body.navigation-open { overflow: hidden; }
  aside { width: min(280px,calc(100vw - 48px)); height: 100svh; position: fixed; z-index: 1000; inset: 0 auto 0 0; gap: 28px; padding: max(20px,env(safe-area-inset-top)) 14px max(20px,env(safe-area-inset-bottom)); background: #f6f8f9; border: 0; border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; visibility: hidden; transform: translateX(-100%); transition: transform .18s ease, visibility .18s; }
  body.navigation-open aside { visibility: visible; transform: translateX(0); transition: transform .18s ease; }
  #navigation-toggle, #navigation-close { display: inline-flex; flex-shrink: 0; }
  #navigation-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 900; background: rgb(21 32 40 / 35%); touch-action: none; }
  #navigation-toggle { width: 32px; min-width: 32px; height: 32px; min-height: 32px; border: 0; background: transparent; }
  .brand { padding: 0; }
  .brand strong { font-size: 17px; }
  .brand small { display: block; }
  nav { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; }
  nav button { flex-direction: row; justify-content: flex-start; padding: 12px 14px; min-height: 44px; margin: 0; gap: 12px; font-size: 13px; border-radius: 5px; }
  nav button.active { box-shadow: inset 3px 0 0 var(--accent); }
  nav button svg { width: 17px; height: 17px; }
  .aside-bottom { position: static; border-top: 1px solid var(--line); padding: 16px 12px 0; }
  .aside-bottom>span { display: block; max-width: 100%; }
  .aside-bottom button { font-size: 12px; min-height: 44px; }
  main { min-height: 100svh; }
  header { position: sticky; height: 56px; padding: 0 16px; gap: 10px; }
  .header-location { gap: 8px; }
  .breadcrumb-root { display: none; }
  .breadcrumb { font-size: 11px; gap: 8px; }
  .connection { font-size: 10px; gap: 5px; }
  .connection .icon { width: 28px; height: 28px; min-width: 28px; min-height: 28px; margin-left: 4px; }
  .page-heading { padding: 20px 16px 0; gap: 12px; }
  h1 { font-size: 22px; }
  #reload { padding: 7px 8px; font-size: 11px; min-height: 32px; }
  #reload svg { width: 14px; height: 14px; }
  .page-heading p { font-size: 11px; }
  .view { padding: 20px 16px 0; }
  .banner { margin: 18px 16px 0; }
  footer { margin: 24px 16px 16px; font-size: 10px; flex-wrap: wrap; }
  .metrics { padding: 20px 0; gap: 20px 0; }
  .metrics>div { padding-left: 20px; }
  .metrics span { font-size: 11px; }
  .metrics strong { font-size: 25px; }
  .charts { gap: 22px; margin-top: 24px; }
  .chart canvas { height: 155px; }
  .event-columns, .event-row { grid-template-columns: 82px minmax(0,1fr); gap: 8px 12px; padding-inline: 8px; }
  .event-columns>span:nth-child(2) { display: none; }
  .event-row>span:first-child { grid-row: 1 / 3; font-size: 10px; }
  .event-kind { font-size: 10px; }
  .event-row>span:last-child { grid-column: 2; }
  .toolbar { flex-wrap: wrap; }
  #players-view .toolbar>.tools { width: 100%; }
  #players-view .search { max-width: none; flex: 1; }
  .desktop-only { display: none; }
  #players-view table { table-layout: fixed; min-width: 0; white-space: normal; }
  #players-view th:first-child { width: 32%; }
  #players-view th:nth-last-child(2) { width: 20%; }
  #players-view th:last-child { width: 48%; }
  #players-view th, #players-view td { padding: 12px 6px; }
  .name-button { font-size: 12px; gap: 4px; overflow-wrap: anywhere; }
  .name-button svg { display: none; }
  .badge { font-size: 10px; padding: 2px 5px; gap: 3px; white-space: nowrap; }
  .badge:before { width: 4px; height: 4px; }
  .cell-actions .icon { width: 28px; min-width: 28px; height: 30px; }
  .cell-actions svg { width: 15px; height: 15px; }
  #plugins-view table { min-width: 0; white-space: normal; table-layout: fixed; }
  #plugins-view th:first-child { width: 62%; }
  #plugins-view th:nth-last-child(2) { width: 24%; }
  #plugins-view th:last-child { width: 14%; }
  #plugins-view td, #plugins-view th { padding: 12px 6px; }
  .plugin-name { overflow-wrap: anywhere; font-size: 12px; }
  .plugin-description { white-space: normal; font-size: 11px; }
  .plugin-meta { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
  #plugins-view .toolbar .search, .rule-toolbar .search { width: 100%; }
  #plugins-view .toolbar h2 { flex: 1; }
  .console-output { padding: 12px; font-size: 11px; height: 52svh; }
  .command-bar { flex-wrap: nowrap; gap: 6px; }
  .command-bar select { width: 100px; font-size: 11px; padding-inline: 6px; }
  .command-bar input { font-size: 11px; width: 0; }
  .file-workspace { grid-template-columns: 1fr; height: auto; min-height: 540px; }
  .file-list { max-height: 170px; min-height: 80px; border-right: 0; border-bottom: 1px solid var(--line); }
  .editor textarea { min-height: 350px; padding: 12px; }
  .editor-bar { padding-inline: 10px; flex-wrap: wrap; gap: 6px; }
  .editor-bar>span:first-child { max-width: 135px; }
  .editor-bar .tools { gap: 3px; }
  .world-controls { gap: 16px; }
  .world-controls form { width: 50%; }
  .world-rules { grid-template-columns: 1fr; }
  .rule-name { font-size: 12px; }
  dialog { padding: 20px; max-height: 86svh; }
  #inspector .dialog-heading { top: -20px; }
  .profile-section .detail-row { grid-template-columns: 86px minmax(0,1fr); gap: 12px; font-size: 12px; }
  .profile-heading button { font-size: 11px; }
  .profile-scoreboards th, .profile-scoreboards td { padding-inline: 0; }
  .track-filters { gap: 12px; }
  .track-recording { gap: 10px; }
  .presence-key { gap: 9px; font-size: 10px; }
  .timeline-navigation { gap: 10px; }
  .timeline-navigation .tools { gap: 4px; }
  .track-playback { gap: 8px; }
  #toast { right: 16px; bottom: 16px; }
}
@media(prefers-reduced-motion:reduce) { .loading-icon { animation: none; } aside, body.navigation-open aside { transition: none; } }
/* Texture-backed identity and an unframed, responsive model surface. */
.player-avatar { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; background: #eef2f2; border-radius: 3px; overflow: hidden; }
.player-avatar canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.player-avatar [hidden] { display: none; }
.track-avatar-icon { background: transparent; border: 0; }
.track-avatar-marker { width: 38px; height: 38px; box-sizing: border-box; padding: 1px; border: 2px solid #4388d5; border-radius: 5px; background: #fff; box-shadow: 0 0 0 2px var(--track-color), 0 2px 5px #0003; }
.track-avatar-marker[data-presence="offline"] { border-color: #9ba4af; }
.track-avatar-marker[data-presence="offline"] .player-avatar { filter: grayscale(1); }
.track-avatar-marker[data-presence="unknown"] { border-color: #9ba4af; border-style: dashed; }
.track-avatar-marker .player-avatar, .track-avatar-marker .player-avatar canvas { width: 32px; height: 32px; }
.track-avatar-marker .player-avatar { flex-basis: 32px; }
.track-avatar-marker .player-avatar svg { display: block; width: 20px; height: 20px; }
.name-button .player-avatar svg { display: block; width: 18px; height: 18px; }
.skin-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.skin-tools button[aria-pressed="true"] { background: #e5f3ee; color: #14684f; }
.skin-stage { width: 100%; height: 290px; position: relative; overflow: hidden; background: #f0f3f4; }
.skin-stage[hidden] { display: none; }
.skin-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.skin-texture { width: auto; max-width: 100%; height: 256px; max-height: 100%; display: block; margin: auto; image-rendering: pixelated; }
.skin-caption { color: #647071; font-size: 12px; line-height: 1.6; margin: 8px 0 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .skin-section .profile-heading { align-items: flex-start; gap: 8px; flex-wrap: wrap; } .skin-stage { height: 270px; } .player-avatar { width: 24px; height: 24px; flex-basis: 24px; } .player-avatar canvas { width: 24px; height: 24px; } }
