.tree-player-nav[hidden] { display: none !important; }
.tree-player-nav-group + .tree-player-nav-group { margin-top: 16px; }

.tree-player-panel .tree-admin-card + .tree-admin-card { margin-top: 14px; }
.tree-player-panel .tree-player-description { margin: 0; color: #91a3a0; line-height: 1.55; }
.tree-player-panel .tree-player-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.tree-player-panel .tree-player-danger { border-color: rgba(226, 91, 96, .58); color: #ffd9da; background: rgba(168, 48, 55, .74); }
.tree-player-panel .tree-player-success { color: #8fe7c8; }
.tree-player-panel .tree-player-error { color: #ff9da1; }
.tree-player-panel .tree-admin-btn:disabled { cursor: not-allowed; filter: grayscale(.18); opacity: .45; }

.tree-player-link-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 11px;
  color: #fff;
  font-size: 14px;
  letter-spacing: .01em;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
}
.tree-player-link-button:focus-visible { outline: 3px solid rgba(255, 255, 255, .32); outline-offset: 3px; }
.tree-player-discord-button {
  border-color: rgba(137, 155, 255, .7);
  background: linear-gradient(135deg, #5865f2, #414cc7);
  box-shadow: 0 9px 22px rgba(62, 76, 202, .3);
}
.tree-player-market-card {
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 24px 26px;
  border-color: rgba(234, 181, 70, .34);
  background:
    radial-gradient(circle at 8% 15%, rgba(241, 187, 69, .2), transparent 32%),
    linear-gradient(135deg, rgba(42, 49, 43, .98), rgba(19, 29, 31, .98));
}
.tree-player-market-copy { display: flex; min-width: 0; align-items: center; gap: 16px; }
.tree-player-market-icon { display: grid; width: 54px; height: 54px; flex: 0 0 54px; place-items: center; border: 1px solid rgba(238, 184, 68, .38); border-radius: 15px; background: rgba(12, 19, 20, .52); font-size: 26px; }
.tree-player-market-copy strong { display: block; color: #fff4d7; font-size: 18px; }
.tree-player-market-copy div > span { display: block; margin-top: 5px; color: #9eaaa6; line-height: 1.45; }
.tree-player-market-button {
  min-width: 176px;
  border-color: #f3c45d;
  color: #1d1608;
  background: linear-gradient(135deg, #ffd36e, #db931e);
  box-shadow: 0 10px 24px rgba(194, 124, 13, .26);
}

.tree-player-login-card {
  max-width: 560px;
  margin: 50px auto;
  padding: 30px;
  border: 1px solid rgba(230, 172, 56, .38);
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(145deg, rgba(31, 43, 46, .98), rgba(18, 27, 29, .98));
}
.tree-player-login-card h3 { margin: 0 0 9px; color: #fff; font-size: 25px; }
.tree-player-login-card p { margin: 0 0 20px; color: #9eb0ad; line-height: 1.55; }
.tree-player-login-card a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; }

.tree-player-profile-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.tree-player-profile-name { color: #f6ca70; font-size: 18px; font-weight: 900; }
.tree-player-live-chip { padding: 6px 10px; border: 1px solid #2f8d70; border-radius: 999px; color: #9ff2d4; background: rgba(35, 133, 103, .18); font-size: 11px; font-weight: 900; }
.tree-player-live-chip.is-offline { border-color: #775155; color: #f0b5b8; background: rgba(145, 62, 67, .15); }

.tree-player-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin-top: 15px; }
.tree-player-stat { padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: #10191b; }
.tree-player-stat span { display: block; color: #82938f; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tree-player-stat strong { display: block; margin-top: 5px; overflow-wrap: anywhere; color: #f1f5f4; font-size: 16px; }

.tree-player-position-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tree-player-position-list { display: grid; gap: 8px; margin-top: 10px; }
.tree-player-position-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); }
.tree-player-position-row code { color: #d8e5e2; overflow-wrap: anywhere; }
.tree-player-allies { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.tree-player-ally { padding: 10px; border: 1px solid rgba(92, 118, 151, .35); border-radius: 9px; background: #121c25; }
.tree-player-ally strong { display: block; color: #fff; overflow-wrap: anywhere; }
.tree-player-ally span { color: #9cabb7; font-size: 11px; }

.tree-player-inventory { margin-top: 14px; }
.tree-player-inventory h4 { margin: 14px 0 8px; color: #f2ca75; }
.tree-player-slot-grid { display: grid; grid-template-columns: repeat(10, 58px); gap: 6px; }
.tree-player-slot { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #43535d; border-radius: 6px; background: #101821; }
.tree-player-slot img { max-width: 48px; max-height: 48px; }
.tree-player-slot-count { position: absolute; right: 4px; bottom: 2px; color: #fff; font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.tree-player-slot-name { position: absolute; left: 3px; top: 2px; max-width: 50px; overflow: hidden; color: #96a8b2; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tree-player-equipment { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 7px; }
.tree-player-equipment .tree-player-slot { width: 100%; min-height: 66px; height: auto; padding: 7px; grid-template-columns: 48px 1fr; justify-items: start; }

.tree-player-rank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tree-player-rank-progress { height: 15px; margin-top: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: #0e1517; }
.tree-player-rank-progress span { display: block; height: 100%; background: linear-gradient(90deg, #bd7917, #f0c260); transition: width .25s ease; }
.tree-player-rank-badge { color: #f4c863; }
.tree-player-color-row { display: grid; grid-template-columns: 56px minmax(150px, 220px) auto; align-items: end; gap: 10px; margin-top: 12px; }
.tree-player-color-row input[type="color"] { width: 56px; height: 42px; }

.tree-player-setting { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tree-player-setting-badge { flex: 0 0 auto; padding: 7px 11px; border: 1px solid #4e696d; border-radius: 999px; color: #d9e6e4; background: #10191b; font-size: 11px; font-weight: 900; }
.tree-player-setting-badge.is-enabled { border-color: #2c9674; color: #96f0cf; background: rgba(34, 133, 102, .16); }
.tree-player-setting-badge.is-disabled { border-color: #a25559; color: #ffc0c3; background: rgba(151, 59, 65, .16); }

.tree-player-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tree-player-select-list { min-height: 250px; padding: 7px !important; }
.tree-player-search { margin-bottom: 8px; }
.tree-player-confirm-form { max-width: 620px; }
.tree-player-confirm-form .tree-admin-field { margin-top: 12px; }
.tree-player-confirm-instruction { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 7px; color: #b7c4c2; font-size: 12px; font-weight: 800; }
.tree-player-copy-name { max-width: 100%; padding: 2px 7px; overflow: hidden; border: 1px solid rgba(240, 194, 96, .48); border-radius: 6px; color: #f4ca70; background: rgba(190, 121, 23, .13); font: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: copy; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.tree-player-copy-name:hover, .tree-player-copy-name:focus-visible { border-color: #f0c260; color: #ffe2a2; background: rgba(190, 121, 23, .25); outline: none; }
.tree-player-copy-name:active { transform: translateY(1px); }
.tree-player-delete-card { border-color: rgba(219, 78, 85, .28); background: linear-gradient(145deg, rgba(43, 35, 36, .96), rgba(25, 29, 30, .98)); }
.tree-player-delete-availability { margin-bottom: 16px; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: 13px; font-weight: 750; line-height: 1.5; }
.tree-player-delete-availability.is-blocked { border-color: rgba(225, 91, 97, .42); color: #ffc9cb; background: rgba(151, 45, 52, .18); }
.tree-player-delete-availability.is-ready { border-color: rgba(48, 164, 123, .38); color: #a7ebd2; background: rgba(31, 124, 92, .14); }
.tree-player-delete-card input:disabled { color: #7f8987; background: #171c1d; cursor: not-allowed; }
.tree-player-delete-button { min-height: 44px; padding: 0 18px; box-shadow: 0 8px 18px rgba(134, 35, 41, .23); }
.tree-player-about { text-align: center; padding: 36px 24px !important; }
.tree-player-about-mark { font-size: 50px; }

@media (max-width: 800px) {
  .tree-player-stat-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
  .tree-player-position-grid, .tree-player-columns, .tree-player-rank-grid { grid-template-columns: 1fr; }
  .tree-player-slot-grid { grid-template-columns: repeat(5, 54px); }
  .tree-player-slot { width: 54px; height: 54px; }
  .tree-player-color-row { grid-template-columns: 56px 1fr; }
  .tree-player-color-row .tree-player-actions { grid-column: 1 / -1; margin-top: 0; }
  .tree-player-market-card { align-items: stretch; flex-direction: column; }
  .tree-player-market-button { width: 100%; }
}
