#toolsButton {
  display: inline-block;
  min-width: 96px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(245, 190, 68, .72);
  border-radius: 9px;
  background: linear-gradient(135deg, #aa6b15, #e5a92f);
  color: #17120a;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .3);
  font: 800 13px/1 Arial, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

#toolsButton:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .3);
}

.admin-claim-remove-btn {
  border-color: #f0b94f !important;
  background: linear-gradient(135deg, #b76c16, #8f281f) !important;
}

#toolsButton:focus-visible,
.tree-admin button:focus-visible,
.tree-admin input:focus-visible,
.tree-admin textarea:focus-visible,
.tree-admin select:focus-visible {
  outline: 3px solid rgba(245, 190, 68, .4);
  outline-offset: 2px;
}

.tree-admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  place-items: center;
  padding: 22px;
  box-sizing: border-box;
  background: rgba(4, 8, 8, .78);
  backdrop-filter: blur(7px);
}

.tree-admin-overlay.is-open { display: grid; }

.tree-admin {
  --admin-gold: #e6ac38;
  --admin-gold-soft: #f4ca70;
  --admin-teal: #21aa9f;
  --admin-red: #d95e62;
  --admin-ink: #101719;
  --admin-panel: #172124;
  --admin-panel-2: #1d292c;
  width: min(1180px, 96vw);
  height: min(800px, 92vh);
  overflow: hidden;
  color: #edf4f2;
  background:
    radial-gradient(circle at 92% 3%, rgba(230, 172, 56, .14), transparent 32%),
    linear-gradient(145deg, #121a1c, #0c1214);
  border: 1px solid rgba(230, 172, 56, .4);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .58);
  font: 14px/1.45 Arial, sans-serif;
}

.tree-admin *, .tree-admin *::before, .tree-admin *::after { box-sizing: border-box; }
.tree-admin [hidden] { display: none !important; }

.tree-admin-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 13, 14, .72);
}

.tree-admin-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.tree-admin-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #191207;
  background: linear-gradient(145deg, var(--admin-gold-soft), #c88118);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  font-size: 19px;
}
.tree-admin-brand h2 { margin: 0; font-size: 19px; letter-spacing: .02em; }
.tree-admin-brand p { margin: 2px 0 0; color: #94a7a4; font-size: 12px; }

.tree-admin-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #dce8e5;
  background: #1c282b;
  font-size: 22px;
  cursor: pointer;
}

.tree-admin-layout { display: grid; grid-template-columns: 230px 1fr; height: calc(100% - 72px); }
.tree-admin-nav {
  padding: 18px 13px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, .08);
  background: rgba(9, 15, 16, .7);
}
.tree-tools-divider {
  height: 1px;
  margin: 15px 9px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(230, 172, 56, .58), transparent);
}
.tree-admin-nav-admin[hidden], .tree-tools-divider[hidden] { display: none !important; }
.tree-admin-nav-label {
  margin: 0 10px 9px;
  color: #71817f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tree-admin-nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aab9b7;
  background: transparent;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}
.tree-admin-nav button:hover { color: #fff; background: rgba(255, 255, 255, .055); }
.tree-admin-nav button.is-active {
  color: #fff;
  border-color: rgba(230, 172, 56, .3);
  background: linear-gradient(90deg, rgba(230, 172, 56, .2), rgba(230, 172, 56, .05));
}
.tree-admin-nav-icon { width: 24px; color: var(--admin-gold-soft); text-align: center; font-size: 17px; }

.tree-admin-content { min-width: 0; overflow: auto; padding: 24px; }
.tree-admin-panel { display: none; max-width: 920px; margin: 0 auto; }
.tree-admin-panel.is-active { display: block; }
.tree-admin-panel.tree-console-panel { max-width: none; height: 100%; }
.tree-admin-panel.tree-console-panel.is-active { display: flex; flex-direction: column; }
.tree-admin-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.tree-admin-panel-heading h3 { margin: 0 0 4px; color: #fff; font-size: 23px; }
.tree-admin-panel-heading p { max-width: 650px; margin: 0; color: #8fa19e; }

.tree-admin-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(30, 43, 46, .95), rgba(20, 30, 32, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
.tree-admin-card + .tree-admin-card { margin-top: 14px; }
.tree-admin-card-title { margin: 0 0 12px; color: #f1f6f4; font-size: 15px; font-weight: 800; }
.tree-admin-form-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tree-admin-field { min-width: 0; flex: 1 1 180px; }
.tree-admin-field.is-small { flex: 0 1 150px; }
.tree-admin-field label { display: block; margin: 0 0 6px; color: #a9bab7; font-size: 12px; font-weight: 800; }
.tree-admin input[type="text"],
.tree-admin input[type="number"],
.tree-admin input[type="search"],
.tree-admin input[type="datetime-local"],
.tree-admin textarea,
.tree-admin select {
  width: 100%;
  border: 1px solid #35474a;
  border-radius: 9px;
  color: #edf4f2;
  background: #0f1719;
  font: inherit;
}
.tree-admin input[type="text"],
.tree-admin input[type="number"],
.tree-admin input[type="search"],
.tree-admin input[type="datetime-local"],
.tree-admin select { height: 42px; padding: 0 12px; }
.tree-admin textarea { min-height: 106px; padding: 11px 12px; resize: vertical; }
.tree-admin input::placeholder, .tree-admin textarea::placeholder { color: #61716f; }
.tree-admin input[type="color"] {
  width: 46px;
  height: 42px;
  padding: 3px;
  border: 1px solid #435659;
  border-radius: 9px;
  background: #0f1719;
  cursor: pointer;
}

.tree-console-heading { flex: 0 0 auto; margin-bottom: 14px; }
.tree-console-live { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(66, 216, 142, .24); border-radius: 999px; color: #8fe0b3; background: rgba(38, 135, 86, .12); font-size: 12px; font-weight: 800; white-space: nowrap; }
.tree-console-live i { width: 8px; height: 8px; border-radius: 50%; background: #45dc8c; box-shadow: 0 0 10px rgba(69, 220, 140, .9); }
.tree-console-live[data-state="error"] { color: #ff9b9f; border-color: rgba(230, 85, 91, .3); background: rgba(160, 38, 44, .14); }
.tree-console-live[data-state="error"] i { background: #e55a60; box-shadow: 0 0 10px rgba(229, 90, 96, .8); }
.tree-console-live[data-state="paused"] { color: #f1c565; border-color: rgba(230, 172, 56, .3); background: rgba(152, 105, 16, .14); }
.tree-console-live[data-state="paused"] i { background: #e6ac38; box-shadow: none; }
.tree-console-shell { min-height: 0; flex: 1 1 auto; display: grid; grid-template-rows: auto minmax(250px, 1fr) auto auto; overflow: hidden; border: 1px solid #344144; border-radius: 13px; background: #070a0b; box-shadow: 0 15px 35px rgba(0, 0, 0, .35); }
.tree-console-toolbar { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-bottom: 1px solid #293336; background: linear-gradient(#1a2325, #12191b); }
.tree-console-toolbar button { min-height: 32px; padding: 0 10px; border: 1px solid #364447; border-radius: 7px; color: #9fafad; background: #182123; font: 700 11px/1 Arial, sans-serif; cursor: pointer; }
.tree-console-toolbar button:hover, .tree-console-toolbar button.is-active { color: #fff; border-color: rgba(230, 172, 56, .54); background: rgba(174, 113, 21, .28); }
.tree-console-filters { display: flex; gap: 4px; padding-right: 5px; border-right: 1px solid #344044; }
.tree-console-search { min-width: 140px; flex: 1 1 220px; position: relative; }
.tree-console-search span { position: absolute; left: 10px; top: 6px; color: #687776; font-size: 17px; }
.tree-admin .tree-console-search input { height: 32px; padding: 0 10px 0 31px; border-radius: 7px; font: 12px Arial, sans-serif; }
.tree-console-output { min-height: 0; overflow: auto; padding: 10px 12px 18px; color: #d4ddd9; background: radial-gradient(circle at 50% 0, rgba(30, 76, 61, .10), transparent 40%), #070a0b; font: 13px/1.48 Consolas, "Cascadia Mono", "Courier New", monospace; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #485655 #0c1112; }
.tree-console-line { min-height: 19px; }
.tree-console-line:hover { background: rgba(255, 255, 255, .045); }
.tree-console-line.is-info { color: #46e86c; }
.tree-console-line.is-warning { color: #ffe144; }
.tree-console-line.is-error { color: #ff686e; }
.tree-console-line.is-debug { color: #8c9a98; }
.tree-console-line.is-command { margin-top: 3px; color: #6fcdf2; font-weight: 800; }
.tree-console-line.is-result { color: #80d9f2; }
.tree-console-line.is-system { color: #e6ac38; font-weight: 800; }
.tree-console-empty { display: grid; min-height: 100%; place-items: center; color: #60706e; font: 13px Arial, sans-serif; }
.tree-console-command { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px; border-top: 1px solid #303b3e; background: #111719; }
.tree-console-prompt { color: #e6ac38; font: 800 18px Consolas, monospace; }
.tree-admin .tree-console-command input { height: 40px; padding: 0 12px; border-color: #435154; border-radius: 7px; font: 13px Consolas, "Cascadia Mono", monospace; }
.tree-console-command button { height: 40px; padding: 0 19px; border: 1px solid #d89b28; border-radius: 7px; color: #171109; background: linear-gradient(135deg, #f0c15b, #c77a14); font-weight: 900; cursor: pointer; }
.tree-console-command button:disabled { opacity: .55; cursor: wait; }
.tree-console-foot { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border-top: 1px solid #242d2f; color: #687673; background: #0d1213; font-size: 10px; }

@media (max-width: 820px) {
  .tree-console-toolbar { flex-wrap: wrap; }
  .tree-console-search { order: -1; flex-basis: 100%; }
  .tree-console-filters { border-right: 0; }
  .tree-console-foot span:last-child { display: none; }
}

.tree-admin-btn {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  color: #e8f0ee;
  background: #28373a;
  font: 800 13px/1 Arial, sans-serif;
  cursor: pointer;
  transition: filter .14s ease, transform .14s ease;
}
.tree-admin-btn:hover { filter: brightness(1.13); transform: translateY(-1px); }
.tree-admin-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.tree-admin-btn.is-primary { border-color: #e8b447; color: #171106; background: linear-gradient(135deg, #e8b447, #c8861b); }
.tree-admin-btn.is-danger { border-color: rgba(226, 91, 96, .56); color: #ffd9da; background: rgba(168, 48, 55, .72); }
.tree-admin-btn.is-teal { border-color: rgba(33, 170, 159, .55); color: #dcfffb; background: rgba(22, 120, 113, .72); }
.tree-admin-btn.is-quiet { color: #aebdbb; background: rgba(255, 255, 255, .045); }
.tree-admin-btn.is-compact { min-height: 33px; padding: 0 10px; font-size: 12px; }

.tree-admin-editor-toolbar { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.tree-admin-editor-help { margin-left: auto; color: #748683; font-size: 11px; }
.tree-admin-date-tools { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tree-admin-date-tools .tree-admin-field { flex: 1 1 260px; }
.tree-admin-field-note { display: block; margin-top: 6px; color: #748683; font-size: 11px; line-height: 1.4; }
.tree-admin-countdown-tool { margin: 14px 0; padding: 13px; border: 1px solid rgba(77, 196, 177, .22); border-radius: 10px; background: rgba(12, 39, 36, .42); }
.tree-admin-countdown-tool p { margin: 5px 0 0; color: #91a5a1; font-size: 12px; line-height: 1.45; }
.tree-admin-countdown-tool code { display: block; margin-top: 10px; padding: 9px 11px; border-radius: 7px; background: rgba(0, 0, 0, .28); color: var(--admin-gold-soft); overflow-wrap: anywhere; }
.tree-admin-preview {
  min-height: 46px;
  margin: 10px 0 14px;
  padding: 12px;
  overflow-wrap: anywhere;
  border: 1px dashed #3b4e50;
  border-radius: 9px;
  color: #f4f6f5;
  background: rgba(0, 0, 0, .22);
}
.tree-admin-preview::before { content: "In-game preview"; display: block; margin-bottom: 6px; color: #687b78; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.tree-admin-status-line { min-height: 20px; margin-top: 10px; color: #91a4a1; font-size: 12px; }
.tree-admin-status-line.is-error { color: #ff9b9f; }
.tree-admin-status-line.is-success { color: #7de0bd; }
.tree-admin-schedule-chip {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(33, 170, 159, .25);
  border-radius: 999px;
  color: #8fe0d8;
  background: rgba(20, 117, 110, .13);
  font-size: 11px;
  font-weight: 800;
}

.tree-admin-message-list { display: grid; gap: 12px; margin-top: 16px; }
.tree-admin-message {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .085);
  border-left: 4px solid var(--admin-teal);
  border-radius: 12px;
  background: rgba(22, 32, 34, .88);
}
.tree-admin-message.is-off { border-left-color: #596664; opacity: .72; }
.tree-admin-message-top { display: flex; align-items: center; gap: 10px; }
.tree-admin-message-number { color: var(--admin-gold-soft); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tree-admin-message-actions { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.tree-admin-message-preview { margin: 12px 0; overflow-wrap: anywhere; color: #eef4f2; font-size: 14px; }
.tree-admin-message-code { color: #748481; font: 11px/1.4 Consolas, monospace; overflow-wrap: anywhere; }
.tree-admin-message-expiry { margin-top: 8px; color: #8fa29e; font-size: 11px; font-weight: 700; }
.tree-admin-message-edit { display: none; margin-top: 12px; }
.tree-admin-message.is-editing .tree-admin-message-edit { display: block; }
.tree-admin-message.is-editing .tree-admin-message-preview,
.tree-admin-message.is-editing .tree-admin-message-code { display: none; }

.tree-admin-field-spaced { margin-top: 13px; }
.tree-admin-poll-choices-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 0; }
.tree-admin-poll-choices-editor > *, .tree-admin-poll-duration > * { min-width: 0; }
.tree-admin-poll-duration { display: grid; grid-template-columns: minmax(100px, 150px) minmax(100px, 150px) auto auto; align-items: end; gap: 10px; }
.tree-admin-poll-current { margin-top: 16px; }
.tree-admin-poll-current-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tree-admin-poll-current-head > div:first-child { min-width: 0; }
.tree-admin-poll-current-head h4 { margin: 0; color: #fff; font-size: 19px; overflow-wrap: anywhere; }
.tree-admin-poll-current-head p { margin: 5px 0 0; color: #a7b6b3; overflow-wrap: anywhere; }
.tree-admin-poll-current-head .tree-admin-btn { flex: 0 0 auto; }
.tree-admin-poll-current-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tree-admin-poll-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.tree-admin-poll-result { min-width: 0; padding: 12px; border: 1px solid rgba(255,255,255,.075); border-radius: 10px; background: rgba(8,15,16,.58); }
.tree-admin-poll-result span { display: block; color: #81928f; font-size: 9px; font-weight: 900; letter-spacing: .09em; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; text-transform: uppercase; }
.tree-admin-poll-result strong { display: block; margin-top: 4px; color: #f3f7f6; font-size: 14px; overflow-wrap: anywhere; }
.tree-admin-poll-result.is-yes { border-color: rgba(43,195,142,.24); }
.tree-admin-poll-result.is-no { border-color: rgba(224,93,99,.24); }
.tree-admin-poll-result.is-total { border-color: rgba(230,172,56,.26); }
.tree-admin-poll-finalizing { margin-top: 14px; padding: 11px 13px; border: 1px solid rgba(230,172,56,.25); border-radius: 9px; color: #d9c38e; background: rgba(112,78,18,.15); font-size: 12px; line-height: 1.5; }
.tree-admin-poll-voters { margin-top: 18px; }
.tree-admin-poll-voters-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tree-admin-poll-voters-head strong { color: #edf4f2; font-size: 14px; }
.tree-admin-poll-voters-head span { color: #8fa09d; font-size: 11px; font-weight: 800; }
.tree-admin-poll-voter-list { display: grid; gap: 7px; max-height: 310px; overflow-y: auto; padding-right: 5px; scrollbar-color: #b98222 rgba(255,255,255,.055); scrollbar-width: thin; }
.tree-admin-poll-voter-list::-webkit-scrollbar { width: 9px; }
.tree-admin-poll-voter-list::-webkit-scrollbar-track { border-radius: 999px; background: rgba(255,255,255,.055); }
.tree-admin-poll-voter-list::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #b98222; background-clip: padding-box; }
.tree-admin-poll-voter { display: grid; grid-template-columns: minmax(150px,1fr) minmax(100px,.7fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(8,15,16,.58); }
.tree-admin-poll-voter-identity { min-width: 0; }
.tree-admin-poll-voter-identity strong { display: block; overflow: hidden; color: #f0f5f4; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tree-admin-poll-voter-identity span { display: block; margin-top: 3px; color: #788b87; font: 10px/1.3 Consolas,monospace; overflow-wrap: anywhere; }
.tree-admin-poll-voter-choice { min-width: 0; padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 900; overflow-wrap: anywhere; word-break: break-word; text-align: center; }
.tree-admin-poll-voter-choice.is-yes { color: #a6f0d1; background: rgba(25,132,96,.24); }
.tree-admin-poll-voter-choice.is-no { color: #ffc0c4; background: rgba(155,48,56,.25); }
.tree-admin-poll-voter-time { color: #7f918d; font-size: 10px; white-space: nowrap; }

.tree-admin-switch { position: relative; width: 42px; height: 23px; display: inline-block; flex: 0 0 auto; }
.tree-admin-switch input { width: 1px; height: 1px; opacity: 0; position: absolute; }
.tree-admin-switch span { position: absolute; inset: 0; border-radius: 999px; background: #4d5a59; cursor: pointer; transition: .18s ease; }
.tree-admin-switch span::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .18s ease; }
.tree-admin-switch input:checked + span { background: var(--admin-teal); }
.tree-admin-switch input:checked + span::after { transform: translateX(19px); }

.tree-admin-search-wrap { position: relative; }
.tree-admin-search-wrap::before { content: "⌕"; position: absolute; top: 8px; left: 13px; color: #718380; font-size: 20px; pointer-events: none; }
.tree-admin-search-wrap input { padding-left: 38px !important; }
.tree-admin-results { display: grid; gap: 9px; margin-top: 14px; }
.tree-admin-player-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(220px, 1.8fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 11px;
  background: rgba(11, 18, 20, .55);
}
.tree-admin-player-name { min-width: 0; color: #f1f5f4; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-admin-player-ids { min-width: 0; color: #82928f; font: 11px/1.55 Consolas, monospace; overflow-wrap: anywhere; }
.tree-admin-row-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.tree-admin-badges { display: flex; gap: 5px; margin-top: 4px; }
.tree-admin-badge { padding: 2px 7px; border-radius: 999px; color: #aebfbc; background: #2c393b; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.tree-admin-badge.is-online { color: #caffea; background: rgba(27, 145, 98, .55); }
.tree-admin-badge.is-banned { color: #ffd9db; background: rgba(167, 52, 58, .72); }
.tree-admin-badge.is-allies { color: #e1d6ff; background: rgba(118, 73, 204, .58); }

.tree-admin-allies-row {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tree-admin-allies-row:hover,
.tree-admin-allies-row:focus-visible {
  border-color: rgba(159, 111, 255, .56);
  background: rgba(112, 66, 191, .13);
  transform: translateY(-1px);
}
.tree-admin-allies-row.is-loading { opacity: .58; pointer-events: none; }
.tree-admin-allies-open { justify-self: end; color: #d7c7ff; font-size: 12px; font-weight: 900; white-space: nowrap; }

.tree-admin-allies-profile { margin-top: 16px; }
.tree-admin-allies-profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.tree-admin-allies-profile-head h4 { margin: 0; color: #fff; font-size: 20px; }
.tree-admin-allies-profile-head p { margin: 3px 0 0; color: #8fa19e; font-size: 12px; }
.tree-admin-allies-owner-ids { margin-top: 8px; color: #728885; font: 11px/1.5 Consolas, monospace; overflow-wrap: anywhere; }
.tree-admin-ally-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.tree-admin-ally-stat { min-width: 0; padding: 10px 11px; border: 1px solid rgba(255,255,255,.075); border-radius: 10px; background: rgba(9,16,18,.55); }
.tree-admin-ally-stat span { display: block; color: #748683; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tree-admin-ally-stat strong { display: block; margin-top: 3px; overflow: hidden; color: #f2f6f5; font-size: 15px; text-overflow: ellipsis; }
.tree-admin-allies-section-title { margin: 18px 0 9px; color: var(--admin-gold-soft); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.tree-admin-allies-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.tree-admin-ally-card { min-width: 0; padding: 13px; border: 1px solid rgba(255,255,255,.075); border-radius: 11px; background: #111a1c; }
.tree-admin-ally-card-top { display: flex; align-items: center; gap: 8px; }
.tree-admin-ally-card-top strong { min-width: 0; overflow: hidden; color: #f1f5f4; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tree-admin-ally-card-top .tree-admin-badge { margin-left: auto; flex: 0 0 auto; }
.tree-admin-ally-card-stats { margin: 8px 0 6px; color: #91a3a0; font-size: 11px; line-height: 1.5; }

.tree-admin-stats-controls { display: grid; grid-template-columns: minmax(240px, 1fr) 220px; align-items: end; gap: 10px; }
.tree-admin-stats-sort label { display: block; margin: 0 0 6px; color: #a9bab7; font-size: 12px; font-weight: 800; }
.tree-admin-stats-table-wrap {
  max-height: min(570px, calc(92vh - 255px));
  margin-top: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 12px;
  background: rgba(8,14,16,.54);
  scrollbar-width: thin;
  scrollbar-color: #536764 #111a1c;
}
.tree-admin-stats-table { width: 100%; min-width: 1050px; border-collapse: collapse; color: #dce7e4; }
.tree-admin-stats-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 11px;
  border-bottom: 1px solid rgba(230,172,56,.28);
  color: #d8b972;
  background: #121c1e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.tree-admin-stats-table td { padding: 10px 11px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
.tree-admin-stats-table tbody tr:last-child td { border-bottom: 0; }
.tree-admin-stats-table tbody tr:hover { background: rgba(33,170,159,.055); }
.tree-admin-stats-table td.is-number { color: #edf4f2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tree-admin-stats-table td.is-date { min-width: 150px; color: #9badaa; font-size: 11px; white-space: nowrap; }
.tree-admin-stats-player { min-width: 230px; }
.tree-admin-stats-player-top { display: flex; align-items: center; gap: 7px; }
.tree-admin-stats-player-top strong { min-width: 0; overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.tree-admin-stats-player-top .tree-admin-badge { flex: 0 0 auto; }
.tree-admin-stats-player-ids { margin-top: 4px; overflow-wrap: anywhere; color: #718481; font: 9px/1.45 Consolas, monospace; }

.tree-admin-empty { padding: 34px 18px; border: 1px dashed #354749; border-radius: 12px; color: #7f918e; text-align: center; }
.tree-admin-loading { padding: 24px; color: #90a19f; text-align: center; }

.tree-admin-inventory { margin-top: 16px; }
.tree-admin-inventory-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.tree-admin-inventory-head h4 { margin: 0; font-size: 18px; }
.tree-admin-inventory-group { margin-top: 14px; }
.tree-admin-inventory-group h5 { margin: 0 0 8px; color: var(--admin-gold-soft); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tree-admin-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 8px; }
.tree-admin-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 9px;
  color: inherit;
  background: #111a1c;
  font: inherit;
  text-align: left;
}
.tree-admin-item.is-removable { cursor: pointer; touch-action: manipulation; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.tree-admin-item.is-removable:hover { border-color: rgba(33, 170, 159, .62); background: #172629; transform: translateY(-1px); }
.tree-admin-item.is-removable:active { transform: translateY(0); }
.tree-admin-item-icon-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid rgba(141, 224, 213, .14);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 42%, rgba(61, 117, 112, .24), rgba(6, 12, 13, .5));
}
.tree-admin-item-icon-box.is-missing::after { content: "?"; color: #61726f; font-size: 20px; font-weight: 900; }
.tree-admin-item-icon { display: block; width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }
.tree-admin-item-details { min-width: 0; }
.tree-admin-item-name { overflow: hidden; color: #e9efed; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tree-admin-item-meta { margin-top: 6px; color: #82928f; font-size: 12px; }
.tree-admin-item-count { float: right; color: #8de0d5; font-weight: 900; }

.tree-send-items-panel { max-width: 980px; }
.tree-send-steps { display: grid; gap: 14px; }
.tree-send-step { position: relative; }
.tree-send-step-title { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.tree-send-step-title > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid rgba(230, 172, 56, .45);
  border-radius: 50%;
  color: #171109;
  background: linear-gradient(145deg, #f0c15b, #c77a14);
  font-size: 13px;
  font-weight: 900;
}
.tree-send-step-title strong { display: block; color: #f4f8f7; font-size: 16px; }
.tree-send-step-title small { display: block; margin-top: 2px; color: #829490; font-size: 11px; }
.tree-send-refresh { margin-top: 10px; }
.tree-send-search { position: relative; display: block; }
.tree-send-search > span { position: absolute; z-index: 1; top: 8px; left: 13px; color: #71827f; font-size: 22px; pointer-events: none; }
.tree-admin .tree-send-search input { height: 48px; padding-left: 42px; border-color: rgba(230, 172, 56, .34); font-size: 15px; }
.tree-send-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 390px; margin-top: 12px; overflow-y: auto; overscroll-behavior: contain; }
.tree-send-item-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 11px;
  color: inherit;
  background: #111a1c;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tree-send-item-card:hover { border-color: rgba(33,170,159,.58); background: #172629; transform: translateY(-1px); }
.tree-send-item-card.is-selected { border-color: rgba(230,172,56,.82); background: rgba(128,84,18,.23); box-shadow: inset 0 0 0 1px rgba(230,172,56,.18); }
.tree-send-item-identity { min-width: 0; }
.tree-send-item-identity strong { display: block; overflow: hidden; color: #edf4f2; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tree-send-item-identity small { display: block; margin-top: 5px; overflow: hidden; color: #7f938f; font: 10px/1.35 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.tree-send-item-arrow { color: #d8ad55; font-size: 25px; }
.tree-send-composer { border-color: rgba(230,172,56,.3); }
.tree-send-selected { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 13px; margin-bottom: 16px; padding: 13px; border: 1px solid rgba(33,170,159,.3); border-radius: 12px; background: rgba(18,91,86,.14); }
.tree-send-selected .tree-admin-item-icon-box { width: 60px; height: 60px; }
.tree-send-selected .tree-admin-item-icon { width: 54px; height: 54px; }
.tree-send-selected-identity { min-width: 0; }
.tree-send-selected-identity strong { display: block; color: #fff; font-size: 17px; overflow-wrap: anywhere; }
.tree-send-selected-identity small { display: block; margin-top: 4px; color: #8aa9a4; font: 11px/1.4 Consolas, monospace; overflow-wrap: anywhere; }
.tree-send-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tree-send-number { display: grid; grid-template-columns: 48px minmax(80px, 1fr) 48px; gap: 7px; }
.tree-send-number button { min-height: 46px; border: 1px solid rgba(230,172,56,.36); border-radius: 9px; color: #f3cd78; background: #273437; font-size: 22px; font-weight: 900; cursor: pointer; touch-action: manipulation; }
.tree-admin .tree-send-number input { height: 46px; padding: 0 8px; text-align: center; font-size: 17px; font-weight: 900; }
.tree-send-presets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tree-send-presets button { min-height: 31px; padding: 0 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; color: #9eb0ad; background: #182225; font-size: 11px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.tree-send-presets button:hover, .tree-send-presets button.is-active { border-color: rgba(230,172,56,.55); color: #ffe0a0; background: rgba(156,101,18,.25); }
.tree-send-button { width: 100%; min-height: 50px; margin-top: 14px; font-size: 15px; }
.tree-send-button:disabled { opacity: .45; cursor: not-allowed; }

.tree-admin-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(1, 5, 6, .76);
}
.tree-admin-action-overlay.is-open { display: grid; }
.tree-admin-action-dialog {
  width: min(500px, 94vw);
  height: auto;
  overflow: visible;
  padding: 21px;
  border: 1px solid rgba(230, 172, 56, .38);
  border-radius: 15px;
  color: #edf4f2;
  background: linear-gradient(145deg, #1b2729, #101719);
  box-shadow: 0 22px 64px rgba(0, 0, 0, .6);
}
.tree-admin-action-dialog h3 { margin: 0 0 5px; font-size: 20px; }
.tree-admin-action-dialog > p { margin: 0 0 16px; color: #91a29f; }
.tree-admin-action-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.tree-admin-action-buttons { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.tree-admin-item-identity { margin: 0 0 16px; padding: 13px 14px; border: 1px solid rgba(33,170,159,.32); border-radius: 10px; background: rgba(18,91,86,.15); }
.tree-admin-item-identity strong { display: block; color: #f3f8f6; font-size: 16px; overflow-wrap: anywhere; }
.tree-admin-item-identity span { display: block; margin-top: 4px; color: #89aaa5; font: 12px/1.45 Consolas, monospace; overflow-wrap: anywhere; }
.tree-admin-quantity-field { margin-top: 4px; }
.tree-admin-quantity-field > label { display: block; margin-bottom: 7px; color: #a9bab7; font-size: 14px; font-weight: 800; }
.tree-admin-quantity-picker { display: grid; grid-template-columns: 54px minmax(90px, 1fr) 54px; gap: 8px; }
.tree-admin-quantity-picker button {
  min-height: 52px;
  border: 1px solid rgba(230,172,56,.38);
  border-radius: 10px;
  color: #f5d185;
  background: #283437;
  font-size: 25px;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}
.tree-admin-quantity-picker button:disabled { opacity: .34; cursor: default; }
.tree-admin-quantity-picker input { height: 52px !important; padding: 0 10px !important; text-align: center; font-size: 19px !important; font-weight: 900; }
.tree-admin-quantity-limit { margin-top: 7px; color: #839592; font-size: 12px; }

.tree-admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9400;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(53, 192, 145, .45);
  border-radius: 10px;
  color: #ddfff3;
  background: rgba(15, 72, 54, .96);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .42);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.tree-admin-toast.is-open { transform: translateY(0); opacity: 1; }
.tree-admin-toast.is-error { border-color: rgba(235, 103, 109, .5); color: #ffe7e8; background: rgba(104, 28, 33, .97); }

.tree-admin-online-actions { display: flex; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #d9e0df; }
.tree-admin-online-actions button {
  flex: 1;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.tree-admin-online-kick { background: #b07919; }
.tree-admin-online-ban { background: #a93238; }

.tree-region-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.tree-region-summary { display:flex; align-items:center; gap:14px; margin-bottom:12px; padding:17px 18px; border:1px solid rgba(230,172,56,.28); border-radius:14px; background:linear-gradient(135deg,rgba(75,58,23,.34),rgba(17,26,28,.98)); box-shadow:0 12px 28px rgba(0,0,0,.2); }
.tree-region-summary-dot,.tree-region-dot { display:block; flex:0 0 auto; border-radius:50%; background:#e6ac38; box-shadow:0 0 0 5px rgba(230,172,56,.11),0 0 18px rgba(230,172,56,.48); }
.tree-region-summary-dot { width:15px; height:15px; }
.tree-region-dot { width:11px; height:11px; }
.tree-region-summary.is-visible { border-color:rgba(66,216,142,.28); background:linear-gradient(135deg,rgba(24,77,58,.38),rgba(17,26,28,.98)); }
.tree-region-summary.is-visible .tree-region-summary-dot { background:#42d88e; box-shadow:0 0 0 5px rgba(66,216,142,.12),0 0 18px rgba(66,216,142,.62); }
.tree-region-summary.is-missing { border-color:rgba(223,90,97,.3); background:linear-gradient(135deg,rgba(85,29,35,.4),rgba(17,26,28,.98)); }
.tree-region-summary.is-missing .tree-region-summary-dot { background:#df5a61; box-shadow:0 0 0 5px rgba(223,90,97,.12),0 0 18px rgba(223,90,97,.56); }
.tree-region-summary.is-offline { border-color:rgba(135,151,148,.22); background:linear-gradient(135deg,rgba(48,57,58,.42),rgba(17,26,28,.98)); }
.tree-region-summary.is-offline .tree-region-summary-dot { background:#7c8d8a; box-shadow:0 0 0 5px rgba(124,141,138,.1),0 0 14px rgba(124,141,138,.4); }
.tree-region-summary strong { display:block; color:#f4f8f7; font-size:16px; }
.tree-region-summary span { display:block; margin-top:3px; color:#98aaa7; font-size:12px; }
.tree-region-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0 0 14px; }
.tree-region-meta > div { min-width:0; padding:10px 12px; border:1px solid rgba(132,151,147,.15); border-radius:10px; background:rgba(12,20,22,.55); }
.tree-region-meta span { display:block; margin-bottom:4px; color:#71827f; font-size:9px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.tree-region-meta strong { display:block; overflow:hidden; color:#dfe9e6; font-size:11px; text-overflow:ellipsis; white-space:nowrap; text-transform:capitalize; }
.tree-region-meta .tree-region-dependencies { grid-column:1/-1; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.tree-region-dependencies span { margin:0 4px 0 0; }
.tree-region-dependencies em { padding:4px 7px; border-radius:999px; color:#a8bbb7; background:rgba(112,129,126,.13); font-size:9px; font-style:normal; font-weight:800; }
.tree-region-dependencies em::before { content:""; display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:#df5a61; vertical-align:1px; }
.tree-region-dependencies em.is-ok::before { background:#42d88e; }
.tree-region-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.tree-region-card { min-width:0; padding:15px; border:1px solid rgba(230,172,56,.24); border-radius:12px; background:linear-gradient(145deg,rgba(81,61,22,.27),rgba(24,29,31,.97)); }
.tree-region-card.is-visible { border-color:rgba(66,216,142,.27); background:linear-gradient(145deg,rgba(24,77,58,.35),rgba(22,31,32,.97)); }
.tree-region-card.is-visible .tree-region-dot { background:#42d88e; box-shadow:0 0 0 4px rgba(66,216,142,.1),0 0 13px rgba(66,216,142,.68); }
.tree-region-card.is-missing { border-color:rgba(223,90,97,.27); background:linear-gradient(145deg,rgba(67,29,33,.38),rgba(24,29,31,.97)); }
.tree-region-card.is-missing .tree-region-dot { background:#df5a61; box-shadow:0 0 0 4px rgba(223,90,97,.1),0 0 13px rgba(223,90,97,.62); }
.tree-region-card.is-registered { border-color:rgba(73,147,224,.28); background:linear-gradient(145deg,rgba(27,56,86,.4),rgba(24,29,31,.97)); }
.tree-region-card.is-registered .tree-region-dot { background:#58a8f4; box-shadow:0 0 0 4px rgba(88,168,244,.1),0 0 13px rgba(88,168,244,.58); }
.tree-region-card.is-offline { border-color:rgba(124,141,138,.2); background:linear-gradient(145deg,rgba(45,54,55,.38),rgba(24,29,31,.97)); }
.tree-region-card.is-offline .tree-region-dot { background:#7c8d8a; box-shadow:0 0 0 4px rgba(124,141,138,.09); }
.tree-region-card-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; }
.tree-region-card-head strong { min-width:0; overflow-wrap:anywhere; color:#eef5f3; font-size:14px; }
.tree-region-badge { padding:4px 7px; border-radius:999px; color:#f0c66e; background:rgba(172,123,24,.23); font-size:9px; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.tree-region-card.is-visible .tree-region-badge { color:#9ef0c8; background:rgba(36,143,96,.23); }
.tree-region-card.is-missing .tree-region-badge { color:#ffb2b5; background:rgba(166,43,50,.28); }
.tree-region-card.is-registered .tree-region-badge { color:#acd5ff; background:rgba(44,111,180,.24); }
.tree-region-card.is-offline .tree-region-badge { color:#bac6c3; background:rgba(98,112,110,.2); }
.tree-region-card p { min-height:35px; margin:11px 0 0; color:#93a5a2; font-size:12px; line-height:1.45; }
.tree-region-card small { display:block; margin-top:10px; color:#738480; font-size:10px; overflow-wrap:anywhere; }
.tree-region-card.is-visible small { color:#72aa91; }
.tree-region-card.is-registered small { color:#709bc5; }
.tree-region-note { margin:15px 2px 0; color:#72827f; font-size:11px; line-height:1.5; }
.tree-region-note.is-error { color:#e8a26f; }
.tree-region-empty { grid-column:1/-1; padding:34px 16px; }

@media screen and (max-width: 860px) {
  #toolsButton { width: 42px; min-width: 42px; padding: 0; font-size: 0; }
  #toolsButton::after { content: "⚒"; font-size: 18px; }
  .tree-admin-overlay { padding: 0; }
  .tree-admin { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .tree-admin-header { height: 64px; padding: 0 14px; }
  .tree-admin-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100% - 64px); }
  .tree-admin-nav { display: flex; gap: 5px; padding: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .tree-admin-nav-admin:not([hidden]), .tree-player-nav:not([hidden]), .tree-player-nav-group { display: contents; }
  .tree-tools-divider:not([hidden]) { min-width: 1px; height: 38px; margin: 0 5px; align-self: center; }
  .tree-admin-nav-label { display: none; }
  .tree-admin-nav button { min-width: max-content; width: auto; margin: 0; padding: 9px 11px; }
  .tree-admin-content { min-height: 0; padding: 16px; }
  .tree-admin-player-row { grid-template-columns: 1fr; gap: 7px; }
  .tree-admin-row-actions { justify-content: flex-start; }
  .tree-admin-allies-open { justify-self: start; }
  .tree-admin-stats-controls { grid-template-columns: minmax(0, 1fr) 210px; }
  .tree-admin-poll-duration { grid-template-columns: 1fr 1fr; }
  .tree-admin-poll-duration .tree-admin-btn { grid-column: 1 / -1; }
  .tree-admin-panel.tree-console-panel { min-height: 0; }
  .tree-console-shell { min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
  .tree-console-output { min-height: 0; }
  .tree-console-command { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -10px 24px rgba(0, 0, 0, .34); }
  .tree-console-foot { display: none; }
  .tree-admin-action-dialog.tree-admin {
    width: min(500px, 94vw);
    height: auto;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    border: 1px solid rgba(230, 172, 56, .38);
    border-radius: 15px;
  }
}

@media screen and (max-width: 560px) {
  .tree-admin-brand p { display: none; }
  .tree-admin-panel-heading { display: block; }
  .tree-admin-schedule-chip { display: inline-block; margin-top: 10px; }
  .tree-admin-editor-help { width: 100%; margin-left: 0; }
  .tree-admin-message-top { align-items: flex-start; flex-wrap: wrap; }
  .tree-admin-message-actions { width: 100%; margin-left: 0; }
  .tree-admin-action-grid { grid-template-columns: 1fr; }
  .tree-admin-item-grid { grid-template-columns: 1fr; }
  .tree-admin-item { grid-template-columns: 58px minmax(0, 1fr); min-height: 82px; padding: 11px; }
  .tree-admin-item-icon-box { width: 56px; height: 56px; }
  .tree-admin-item-icon { width: 50px; height: 50px; }
  .tree-admin-ally-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tree-admin-allies-grid { grid-template-columns: 1fr; }
  .tree-admin-allies-row { min-height: 104px; padding: 14px; }
  .tree-admin-allies-profile-head { align-items: stretch; flex-direction: column; }
  .tree-admin-allies-profile-head .tree-admin-btn { min-height: 44px; }
  .tree-admin-stats-controls { grid-template-columns: 1fr; }
  .tree-admin-poll-choices-editor { grid-template-columns: 1fr; }
  .tree-admin-poll-voter { grid-template-columns: 1fr auto; }
  .tree-admin-poll-voter-time { grid-column: 1 / -1; }
  .tree-admin-stats-table-wrap { max-height: none; overflow: visible; border: 0; background: transparent; }
  .tree-admin-stats-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .tree-admin-stats-table thead { display: none; }
  .tree-admin-stats-table tbody, .tree-admin-stats-table tr, .tree-admin-stats-table td { display: block; width: 100%; }
  .tree-admin-stats-table tr { overflow: hidden; border: 1px solid rgba(255,255,255,.085); border-radius: 12px; background: #111a1c; }
  .tree-admin-stats-table td {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    white-space: normal;
    text-align: right;
  }
  .tree-admin-stats-table td::before { content: attr(data-label); color: #748683; font-size: 9px; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
  .tree-admin-stats-table td.tree-admin-stats-player { display: block; padding: 13px; text-align: left; }
  .tree-admin-stats-table td.tree-admin-stats-player::before { display: none; }
  .tree-admin-stats-table td.is-date { white-space: normal; }
  .tree-admin-action-buttons .tree-admin-btn { min-height: 48px; flex: 1; }
  .tree-admin-poll-current-head { flex-direction: column; }
  .tree-admin-poll-current-actions { width: 100%; justify-content: flex-start; }
  .tree-admin-poll-current-actions .tree-admin-btn { flex: 1 1 140px; }
  .tree-admin-poll-results { grid-template-columns: 1fr; }
  .tree-console-heading { margin-bottom: 10px; }
  .tree-console-heading > div:first-child p { display: none; }
  .tree-console-toolbar { padding: 7px; }
  .tree-console-toolbar > button:not(#treeConsolePause) { display: none; }
  .tree-console-command { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; }
  .tree-console-prompt { display: none; }
  .tree-admin .tree-console-command input { width: 100%; height: 48px; font-size: 16px; }
  .tree-console-command button { width: 100%; height: 48px; font-size: 14px; }
  .tree-send-results { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .tree-send-options { grid-template-columns: 1fr; }
  .tree-send-item-card { min-height: 82px; }
  .tree-send-presets button { min-height: 38px; }
  .tree-send-button { min-height: 54px; }
  .tree-region-actions { justify-content:flex-start; }
  .tree-region-grid { grid-template-columns:1fr; }
  .tree-region-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tree-region-summary { align-items:flex-start; padding:14px; }
}

@media (prefers-reduced-motion: reduce) {
  #toolsButton, .tree-admin-btn, .tree-admin-toast { transition: none; }
}
