:root{--ink:#edf2ff;--muted:#9da8c8;--panel:#11172be8;--line:#ffffff14;--core-orange:#ff8a00;--core-cyan:#58e1cf}*{box-sizing:border-box}body{margin:0;background:#080b18;color:var(--ink);font:15px Inter,ui-sans-serif,system-ui,sans-serif;overflow:hidden}button,input{font:inherit}button{border:0;cursor:pointer;color:var(--ink)}#map{height:100dvh;width:calc(100vw - 362px);margin-left:362px;background:#101b31}.leaflet-container{background:#152a42}.leaflet-control-zoom a{background:#11172b!important;color:#fff!important;border-color:#ffffff22!important}.auth-card{position:fixed;z-index:9;inset:0;margin:auto;width:min(390px,calc(100% - 40px));height:max-content;padding:40px 32px;background:linear-gradient(150deg,#1b2140,#101426);border:1px solid #ffffff14;border-radius:24px;box-shadow:0 28px 80px #0009;text-align:center}.auth-card h1{margin:8px 0;font-size:28px}.auth-card p,.auth-card small{color:var(--muted)}.auth-card form{display:flex;gap:8px;margin:24px 0}.auth-card input,#search,label input{min-width:0;width:100%;border:1px solid #ffffff1f;background:#080b18;color:#fff;border-radius:10px;padding:12px}.auth-card button,.panel-actions button,.dialog-actions button:last-child{background:linear-gradient(120deg,var(--core-orange),#f57b12);padding:12px 15px;border-radius:10px;white-space:nowrap}header{position:fixed;z-index:4;top:16px;left:16px;right:16px;display:flex;align-items:center;gap:12px;pointer-events:none}.brand,.status,.icon-button{pointer-events:auto;background:var(--panel);backdrop-filter:blur(12px);border:1px solid var(--line);box-shadow:0 8px 30px #0004}.brand{display:flex;gap:10px;align-items:center;padding:10px 14px;border-radius:14px}.brand>span{font-size:25px;color:var(--core-cyan)}.brand strong,.brand small{display:block}.brand small{font-size:10px;color:var(--muted);letter-spacing:1.2px}.status{margin-left:auto;border-radius:999px;padding:9px 12px;font-size:12px;color:var(--muted)}.status.online{color:#7ef4bd}.status.offline{color:#ff9da5}.status.guide{color:#ffad45}.icon-button{width:39px;height:39px;border-radius:11px;font-size:21px}#panel{position:fixed;z-index:4;top:80px;bottom:16px;left:16px;width:330px;padding:18px;background:var(--panel);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:18px;box-shadow:0 16px 45px #0005;display:flex;flex-direction:column;transition:transform .2s}.panel-title{display:flex;justify-content:space-between;align-items:start}.panel-title h1{font-size:20px;margin:0}.panel-title p{font-size:13px;color:var(--muted);margin:4px 0 16px}.player-list{overflow:auto;flex:1;margin-top:12px}.player{width:100%;text-align:left;background:#ffffff08;border:1px solid transparent;border-radius:12px;margin-bottom:7px;padding:11px;display:flex;gap:10px;align-items:center}.player:hover,.player.active{background:#ff8a0024;border-color:#ff8a0088}.avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:var(--color);color:#121526;font-weight:800}.player strong,.player small{display:block}.player small{color:var(--muted);margin-top:2px}.panel-actions{display:flex;gap:8px;padding-top:12px;border-top:1px solid var(--line)}.panel-actions button{flex:1;background:#ffffff0d;font-size:12px}.hint{font-size:11px;line-height:1.4;color:var(--muted);margin:12px 0 0}.coord-readout{position:fixed;z-index:3;bottom:22px;left:50%;transform:translateX(-50%);background:#10162bd9;border:1px solid var(--line);border-radius:999px;padding:9px 14px;font:12px ui-monospace,monospace;color:#dfe6ff}.player-marker{width:34px;height:34px;border-radius:50% 50% 50% 0;background:var(--color);border:3px solid #fff;transform:rotate(-45deg);box-shadow:0 3px 14px #0008}.player-marker span{display:block;transform:rotate(45deg);text-align:center;line-height:28px;color:#101426;font-weight:bold}.marker-label{background:#10162be8;border:1px solid #ffffff22;color:#fff;border-radius:7px;padding:3px 6px;font-size:12px;white-space:nowrap}.pin-marker{font-size:25px;text-shadow:0 2px 5px #000}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#161d35;color:#edf2ff}.popup h3{margin:0 0 6px}.popup p{margin:4px 0;color:#b9c4e8;font-size:13px}.popup button{margin-top:9px;padding:7px 9px;border-radius:7px;background:#f97810}#toast{position:fixed;z-index:10;left:50%;bottom:66px;transform:translate(-50%,20px);opacity:0;transition:.2s;background:#d93c60;color:#fff;padding:10px 15px;border-radius:10px;pointer-events:none}#toast.show{transform:translate(-50%,0);opacity:1}dialog{color:var(--ink);background:#171d35;border:1px solid #ffffff22;border-radius:16px;width:min(380px,calc(100% - 32px));box-shadow:0 20px 80px #000b}dialog::backdrop{background:#0009}dialog h2{margin-top:0}dialog label{display:block;margin:13px 0;color:var(--muted);font-size:13px}dialog label input{display:block;margin-top:5px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.dialog-actions button:first-child{background:#ffffff10;padding:10px 13px;border-radius:9px}@media(max-width:680px){header{top:10px;left:10px;right:10px}.brand{padding:8px 10px}.status{font-size:11px;padding:8px}#panel{top:66px;left:8px;bottom:8px;width:calc(100% - 16px);max-height:64dvh}#panel.closed{transform:translateX(calc(-100% - 18px))}.coord-readout{bottom:14px}.leaflet-control-zoom{margin-top:76px!important}.auth-card{padding:34px 24px}}


.layer-section {
  margin-top:12px;
  border-top:1px solid var(--line);
  padding-top:12px;
}

.layer-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
  font-size:13px;
}

.layer-heading button {
  background:none;
  color:var(--core-cyan);
  font-size:12px;
}


.layers {
  overflow:auto;
  max-height:240px;
  padding-right:4px;
}


.layer-dropdown {
  background:#ffffff06;
  border:1px solid var(--line);
  border-radius:12px;
  margin-bottom:8px;
  overflow:hidden;
}


.layer-dropdown summary {
  cursor:pointer;
  padding:9px 11px;
  font-weight:700;
  font-size:12px;
  color:#dce5ff;
  list-style:none;
}


.layer-dropdown summary::-webkit-details-marker {
  display:none;
}


.layer-dropdown summary::before {
  content:"▶";
  display:inline-block;
  margin-right:8px;
  font-size:10px;
  transition:.15s;
}


.layer-dropdown[open] summary::before {
  transform:rotate(90deg);
}


.layer-items {
  padding:0 8px 8px;
}


.layer-toggle {
  width:100%;
  display:flex;
  align-items:center;
  gap:7px;
  background:#ffffff08;
  border:1px solid transparent;
  border-radius:8px;
  padding:7px 9px;
  margin-top:5px;
  font-size:12px;
  text-align:left;
}


.layer-toggle span {
  margin-left:auto;
  color:var(--muted);
}


.layer-toggle.on {
  background:#ff8a0022;
  border-color:#ff8a0055;
}




/* Layer dropdown polish */
.layer-section {
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:12px;
}

.layer-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.layer-heading strong {
  font-size:13px;
}

.layer-heading button {
  background:none;
  color:var(--core-cyan);
  font-size:12px;
}

#layers {
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:auto;
  max-height:280px;
}

.layer-dropdown {
  background:#ffffff08;
  border:1px solid #ffffff12;
  border-radius:12px;
  overflow:hidden;
}

.layer-dropdown summary {
  list-style:none;
  cursor:pointer;
  padding:10px 12px;
  font-size:13px;
  font-weight:700;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.layer-dropdown summary::-webkit-details-marker {
  display:none;
}

.layer-dropdown summary::after {
  content:"▾";
  color:var(--muted);
  transition:.2s;
}

.layer-dropdown:not([open]) summary::after {
  transform:rotate(-90deg);
}

.layer-items {
  padding:0 10px 10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.layer-toggle {
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  background:#ffffff08;
  border:1px solid transparent;
  border-radius:9px;
  padding:8px 10px;
  color:var(--ink);
  font-size:12px;
  text-align:left;
}

.layer-toggle span {
  margin-left:auto;
  color:var(--muted);
}

.layer-toggle:hover,
.layer-toggle.on {
  background:#ff8a0024;
  border-color:#ff8a0088;
}


/* ============================
   TamerCore Sidebar
   ============================ */

#panel {
  padding:16px;
  gap:12px;
}

/* Player module */
.panel-title {
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}

.panel-title h1 {
  font-size:18px;
  letter-spacing:.2px;
}

#search {
  margin-top:4px;
  background:#080b18cc;
}

/* Player list becomes compact */
.player-list {
  flex:0 0 auto;
  max-height:150px;
  overflow:auto;
  margin-top:0;
}

.player {
  padding:10px;
  margin-bottom:6px;
}

/* Layers become main dashboard area */
.layer-section {
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  margin-top:4px;
  padding-top:14px;
  border-top:1px solid var(--line);
}

.layer-heading {
  margin-bottom:10px;
}

.layer-heading strong {
  font-size:14px;
  letter-spacing:.5px;
}

/* Dropdown containers */
#layers {
  flex:1;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-right:3px;
}

.layer-dropdown {
  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03)
    );
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}

.layer-dropdown summary {
  padding:11px 13px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}

.layer-dropdown summary:hover {
  background:rgba(255,255,255,.06);
}

.layer-items {
  padding:0 10px 10px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
}

/* Individual layers */
.layer-toggle {
  padding:8px;
  min-height:34px;
  font-size:11px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  gap:5px;
}

.layer-toggle span {
  font-size:10px;
}

.layer-toggle.on {
  background:
    linear-gradient(
      135deg,
      rgba(255,138,0,.35),
      rgba(88,225,207,.18)
    );
  border-color:rgba(255,138,0,.7);
}

/* Bottom buttons */
.panel-actions {
  flex:0 0 auto;
  padding-top:12px;
}

.panel-actions button {
  height:38px;
}

/* Scrollbar cleanup */
#layers::-webkit-scrollbar,
.player-list::-webkit-scrollbar {
  width:6px;
}

#layers::-webkit-scrollbar-thumb,
.player-list::-webkit-scrollbar-thumb {
  background:#ffffff22;
  border-radius:10px;
}


/* Sidebar layer overflow fix */

.layer-section {
  flex:0 0 auto;
}

#layers {
  display:flex;
  flex-direction:column;
  width:100%;
  max-height:360px;
  overflow-y:auto;
  overflow-x:hidden;
}

.layer-dropdown {
  width:100%;
}

.layer-items {
  width:100%;
  grid-template-columns:1fr;
}

.layer-toggle {
  width:100%;
}



.layer-section {
  margin-top: 18px;
}

#layers {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.layer-dropdown {
  width:100%;
  margin-bottom:10px;
  background:#ffffff08;
  border:1px solid #ffffff18;
  border-radius:14px;
  overflow:hidden;
}

.layer-dropdown summary {
  list-style:none;
  cursor:pointer;
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#edf2ff;
  font-weight:700;
}

.layer-dropdown summary::-webkit-details-marker {
  display:none;
}

.layer-dropdown summary:after {
  content:"⌄";
  color:#9da8c8;
}

.layer-dropdown[open] summary:after {
  content:"⌃";
}

.layer-items {
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 10px 12px;
}

.layer-toggle {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#ffffff08;
  border:1px solid #ffffff15;
  border-radius:10px;
  padding:9px 12px;
  color:#edf2ff;
}

.layer-toggle span {
  color:#9da8c8;
  font-size:12px;
}

.layer-toggle.on {
  background:#ff8a0033;
  border-color:#ff8a00;
}


/* Map layer polish */

.layer-section{
  margin-top:18px;
}

#layers{
  max-height:420px;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:4px;
}

#layers::-webkit-scrollbar{
  width:6px;
}

#layers::-webkit-scrollbar-thumb{
  background:#ffffff22;
  border-radius:10px;
}


.layer-dropdown{
  margin-bottom:10px;
  border:1px solid #ffffff18;
  background:#ffffff08;
  border-radius:14px;
  overflow:hidden;
}


.layer-dropdown summary{

  cursor:pointer;
  list-style:none;
  padding:12px 14px;

  display:flex;
  justify-content:space-between;
  align-items:center;

  font-weight:700;

}


.layer-dropdown summary::-webkit-details-marker{
  display:none;
}


.layer-dropdown summary:after{
  content:"⌄";
  color:#9da8c8;
}


.layer-dropdown[open] summary:after{
  content:"⌃";
}


.layer-items{

  display:flex;
  flex-direction:column;
  gap:8px;

  padding:0 10px 12px;

}


.layer-toggle{

  width:100%;

  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:9px 12px;

  border-radius:10px;

  background:#ffffff08;

  border:1px solid #ffffff15;

}


.layer-toggle span{

  font-size:12px;
  color:#9da8c8;

}


.layer-toggle.on{

  background:#ff8a0033;
  border-color:#ff8a00;

}

/* Keep accordion groups in one vertical column on every surface. */
#layers {
  flex-wrap:nowrap;
}

#layers > .layer-dropdown {
  flex:0 0 auto;
}


/* TamerCore polish pass */

.layer-dropdown {
  margin-bottom:10px;
  border:1px solid #ffffff18;
  background:#ffffff06;
  border-radius:14px;
  overflow:hidden;
}

.layer-dropdown summary {
  list-style:none;
  cursor:pointer;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#edf2ff;
  font-weight:700;
  font-size:13px;
}

.layer-dropdown summary::-webkit-details-marker {
  display:none;
}

.layer-dropdown summary:before {
  content:"▶";
  font-size:10px;
  margin-right:8px;
  transition:.2s;
}

.layer-dropdown[open] summary:before {
  transform:rotate(90deg);
}

.layer-count {
  margin-left:auto;
  margin-right:8px;
  color:#9da8c8;
  font-size:11px;
}

.layer-items {
  padding:0 8px 8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.layer-toggle {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-radius:10px;
  background:#ffffff08;
  border:1px solid #ffffff10;
  color:#dfe6ff;
  font-size:12px;
  transition:.15s;
}

.layer-toggle span {
  color:#9da8c8;
}

.layer-toggle:hover {
  background:#ffffff14;
}

.layer-toggle.on {
  background:#ff8a0030;
  border-color:#ff8a0088;
}

#layers {
  overflow-y:auto;
  max-height:360px;
  padding-right:4px;
}

#layers::-webkit-scrollbar {
  width:5px;
}

#layers::-webkit-scrollbar-thumb {
  background:#ffffff22;
  border-radius:10px;
}

.player-list {
  flex:none;
  max-height:160px;
}

#panel {
  gap:8px;
}


/* TamerCore marker icons */

.marker-icon {
  width:32px;
  height:32px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#10162b;
  border:2px solid #ffffffaa;
  box-shadow:0 4px 14px #0008;
  font-size:16px;
  transition:.15s;
}

.marker-icon:hover {
  transform:scale(1.25);
  z-index:999;
}

/* category colors */

.marker-icon.waypoints {
 border-color:#58e1cf;
}

.marker-icon.watchtowers {
 border-color:#78b9ff;
}

.marker-icon.dungeon-entrances {
 border-color:#ffb44f;
}

.marker-icon.effigies {
 border-color:#69ee90;
}

.marker-icon.journals {
 border-color:#ffcf66;
}

.marker-icon.npc-locations {
 border-color:#ffc56e;
}

.marker-icon.bounties {
 border-color:#ff7ca2;
}

.marker-icon.oil-rigs,
.marker-icon.resource-ore,
.marker-icon.resource-coal,
.marker-icon.resource-crude-oil {
 border-color:#ffbb70;
}



/* ==============================
   FINAL MAP POLISH PASS
   ============================== */

/* Cleaner landmark markers */
.landmark-marker {
  transition: transform .15s ease, opacity .2s ease;
}

.leaflet-marker-icon.landmark-marker {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}

.landmark-marker:hover {
  transform: scale(1.35);
  z-index: 999 !important;
}

/* Less aggressive circles */
.leaflet-interactive.landmark-marker {
  stroke-width: 1;
  fill-opacity: .75;
}

/* Layer dropdown polish */
.layer-dropdown {
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
  border-radius: 14px;
  overflow:hidden;
}

.layer-dropdown summary {
  padding: 12px 14px;
  cursor:pointer;
  font-weight:700;
  color:#edf2ff;
  list-style:none;
  display:flex;
  justify-content:space-between;
}

.layer-dropdown summary::-webkit-details-marker {
  display:none;
}

.layer-items {
  padding:0 10px 10px;
  display:grid;
  gap:7px;
}

.layer-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:9px 11px;
  border-radius:10px;
  background:#ffffff08;
  border:1px solid transparent;
  color:#dfe6ff;
  font-size:12px;
}

.layer-toggle:hover {
  background:#ffffff12;
}

.layer-toggle.on {
  border-color:#ff8a0088;
  background:#ff8a0024;
}


/* Cleaner panel spacing */
#panel {
  padding:18px;
}

.layer-section {
  margin-top:14px;
}

.panel-actions {
  margin-top:auto;
}


/* Reduce visual noise */
.leaflet-tooltip {
  background:#11172b;
  border:1px solid #ffffff22;
}
