html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

#app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

#map {
    flex: 1 1 auto;
    height: 100%;
    min-width: 0;
    background-color: black;
}

#bug-report-btn {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 5px 14px;
    background-color: #1e1500;
    color: #e8d5a0;
    border: 2px solid #8b0000;
    border-radius: 4px;
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    pointer-events: auto;
}
#bug-report-btn:hover {
    background-color: #3a0000;
    border-color: #cc0000;
    color: #ffd700;
}

/* ── Task Panel ─────────────────────────────────────────────────── */
#task-panel {
    flex: 0 0 380px;
    width: 380px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border-left: 2px solid #4a3000;
    color: #e8d5a0;
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    overflow: hidden;
    z-index: 500;
}

#task-panel-header {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background-color: #2a1f00;
    border-bottom: 2px solid #6b4700;
}

#task-panel-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-search-open-btn {
    flex: 0 0 auto;
    background-color: #1a1400;
    border: 1px solid #4a3800;
    border-radius: 4px;
    color: #a89060;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.task-search-open-btn:hover {
    background-color: #2a2000;
    border-color: #8a6a00;
    color: #ffd700;
}

/* ── Task search overlay ─────────────────────────────────────────── */
#task-search-overlay {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #1a1a1a;
}

#task-search-overlay-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background-color: #2a1f00;
    border-bottom: 1px solid #6b4700;
}

.task-search-overlay-title {
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
}

.task-search-close-btn {
    background: none;
    border: 1px solid #4a3800;
    border-radius: 4px;
    color: #a89060;
    font-size: 12px;
    padding: 3px 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.task-search-close-btn:hover { color: #ffd700; border-color: #8a6a00; }

#task-search-overlay-controls {
    flex: 0 0 auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: #2a1f00;
    border-bottom: 1px solid #3a2a00;
}

#task-search-results {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#task-panel-title {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    letter-spacing: 0.5px;
}

#task-search,
#task-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    background-color: #111;
    border: 1px solid #5a3f00;
    border-radius: 3px;
    color: #e8d5a0;
    font-size: 13px;
    outline: none;
}
#task-search::placeholder,
#task-search-input::placeholder { color: #7a6a40; }
#task-search:focus,
#task-search-input:focus { border-color: #ffd700; }

#task-general-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #a89060;
    cursor: pointer;
    user-select: none;
}
#task-general-toggle input[type="checkbox"] {
    accent-color: #ffd700;
    width: 13px;
    height: 13px;
    cursor: pointer;
    margin: 0;
}

#task-panel-tabs {
    display: flex;
    gap: 4px;
}

.task-tab {
    flex: 1 1 auto;
    background-color: #1a1200;
    border: 1px solid #4a3200;
    border-radius: 4px 4px 0 0;
    color: #8a7040;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 8px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.task-tab:hover {
    background-color: #2a1e00;
    color: #c8a040;
}
.task-tab-active {
    background-color: #3a2600;
    border-color: #ffd700;
    color: #ffd700;
}

/* ── Completion checkbox ─────────────────────────────────────────── */
.task-card-check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 2px 6px 2px 0;
    cursor: pointer;
}
.task-card-checkbox {
    accent-color: #ffd700;
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
}

/* ── Completed card style ────────────────────────────────────────── */
.task-card-completed {
    opacity: 0.55;
    border-color: #2a2200;
    background-color: #181000;
    cursor: default;
}
.task-card-completed .task-card-name {
    color: #806830;
    text-decoration: line-through;
}
.task-card-completed .task-card-points {
    background-color: #2a2000;
    color: #6a5820;
}

.task-reset-btn {
    flex: 0 0 auto;
    align-self: stretch;
    background-color: #3a1400;
    border: 1px solid #8b2000;
    border-radius: 4px;
    color: #e06030;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
    margin-bottom: 4px;
}
.task-reset-btn:hover {
    background-color: #5a1e00;
    border-color: #c04000;
    color: #ff8050;
}

/* Item spawns toggle button */
.task-spawns-btn {
    flex: 0 0 auto;
    background-color: #1a1400;
    border: 1px solid #4a3800;
    border-radius: 4px;
    color: #a89060;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
}
.task-spawns-btn:hover {
    background-color: #2a2000;
    border-color: #8a6a00;
    color: #ffd700;
}
.task-spawns-btn-active {
    background-color: #2a2000;
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.25);
}

/* ── Spawns Leaflet control (bottomleft, beside shops/thieving) ─── */
.leaflet-control-spawns {
    display: flex;
}
.leaflet-control-spawns-btn {
    margin: 0;
}

#task-panel-stats {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
    color: #a89060;
    background-color: #1e1600;
    border-bottom: 1px solid #3a2a00;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

#task-panel-stats .stat-item { white-space: nowrap; }
#task-panel-stats .stat-item span { color: #ffd700; font-weight: bold; }

#task-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#task-list::-webkit-scrollbar { width: 6px; }
#task-list::-webkit-scrollbar-track { background: #1a1a1a; }
#task-list::-webkit-scrollbar-thumb { background: #5a3f00; border-radius: 3px; }
#task-list::-webkit-scrollbar-thumb:hover { background: #ffd700; }

.task-card {
    background-color: #221800;
    border: 1px solid #3a2800;
    border-radius: 4px;
    padding: 7px 9px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.task-card:hover {
    background-color: #2e2000;
    border-color: #7a5500;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 3px;
}

.task-card-name {
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
    line-height: 1.3;
    flex: 1 1 auto;
}

.task-card-points {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background-color: #5a3f00;
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
}

.task-card-desc {
    font-size: 12px;
    color: #c8b880;
    line-height: 1.4;
    margin-bottom: 4px;
}

.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: #8a7a50;
    align-items: center;
}

.task-card-area {
    background-color: #1a1200;
    border: 1px solid #4a3200;
    border-radius: 10px;
    padding: 1px 7px;
    color: #c8a040;
    font-weight: bold;
}

.task-card-has-strategy {
    cursor: pointer;
}
.task-card-has-strategy:hover {
    border-color: #ffd700;
    background-color: #302200;
}
.task-card-has-strategy:hover .task-card-name {
    text-decoration: underline;
}

.task-card-selected {
    border-color: #ffd700;
    background-color: #3a2600;
    box-shadow: 0 0 0 1px #ffd700, inset 0 0 12px rgba(255, 215, 0, 0.08);
}
.task-card-selected .task-card-name {
    color: #ffe566;
}
.task-card-selected .task-card-points {
    background-color: #7a5500;
}
.task-card-selected:hover {
    border-color: #ffd700;
    background-color: #3a2600;
}

.task-strategy-pin {
    width: 18px !important;
    height: 18px !important;
    background: #e87b1a;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(232,123,26,0.5), 0 2px 6px rgba(0,0,0,0.6);
}

.task-card-strategy-hint {
    font-size: 11px;
    color: #a07020;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.task-card-completion {
    margin-left: auto;
    color: #709050;
}

.task-card-requirements {
    font-size: 11px;
    color: #7a6840;
    margin-top: 2px;
    font-style: italic;
}

.task-card-skill-reqs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 3px 0 2px;
}

.task-card-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px 1px 4px;
    border-radius: 10px;
    border: 1px solid #4a3200;
    background-color: #1a1200;
    color: #d8c080;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.task-card-skill-icon {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
    display: block;
}

.task-card-skill-level {
    min-width: 1.2em;
    text-align: right;
}

.task-panel-empty {
    text-align: center;
    color: #5a4a20;
    padding: 40px 20px;
    font-size: 14px;
}
#selection {
  width: 50%;
  margin: 0 auto;
}

img.huechange { filter: hue-rotate(120deg); }

.storeline-marker-highlighted {
	filter: brightness(1.5) saturate(1.3);
}

.grid {
	outline: 1px solid white;
	text-align: center;
	line-height: 256px;
	color:white;
	font-size: 30px;
}

.leaflet-popup-content{
	overflow-wrap: break-word;
	width: 220px;
}

/* OSRS-themed popup */
.osrs-popup .leaflet-popup-content-wrapper {
	background-color: #1e1500;
	border: 2px solid #6b4700;
	border-radius: 4px;
	color: #e8d5a0;
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 13px;
	box-shadow: 0 3px 12px rgba(0,0,0,0.6);
}
.osrs-popup .leaflet-popup-tip-container .leaflet-popup-tip {
	background-color: #6b4700;
}
.osrs-popup .leaflet-popup-content {
	color: #e8d5a0;
	width: auto;
}
.osrs-popup .leaflet-popup-content b {
	color: #ffd700;
}
.osrs-popup .leaflet-popup-content a {
	color: #ffd700;
	text-decoration: underline;
}
.osrs-popup .leaflet-popup-content a:hover {
	color: #ffe84d;
}
.osrs-popup .leaflet-popup-close-button {
	color: #a89060 !important;
}
.osrs-popup .leaflet-popup-close-button:hover {
	color: #ffd700 !important;
}
.osrs-popup .popup-coords {
	color: #a89060;
	font-size: 11px;
	margin-top: 4px;
}
.osrs-popup .popup-region {
	color: #c8a840;
	font-size: 11px;
}
.osrs-popup .popup-ground-spawn {
	color: #e05050;
	font-size: 11px;
}

.storeline-popup-wide .leaflet-popup-content {
	width: auto !important;
	max-width: 1000px;
}

/* ── Search control colours (no size/layout changes) ────────────── */
/* Override Leaflet's default white background on the control box */
.leaflet-control-layers.leaflet-control-display,
.leaflet-control-layers-expanded.leaflet-control-display {
	background-color: #1e1500;
	color: #e8d5a0;
}
/* The inner expanded wrapper */
.leaflet-control-display {
	background-color: #1e1500;
	color: #e8d5a0;
}
.leaflet-control-display label,
.leaflet-control-display-label {
	color: #e8d5a0;
}
/* Text input */
.leaflet-control-display-input {
	background-color: #111;
	color: #e8d5a0;
	border-color: #5a3f00;
}
.leaflet-control-display-input::placeholder { color: #7a6a40; }
.leaflet-control-display-input:focus { border-color: #ffd700; }
/* Checkboxes */
.leaflet-control-display input[type="checkbox"] { accent-color: #ffd700; }
/* Result list section headings */
.leaflet-control-display-item-list-title { color: #ffd700; }
/* Result list items */
.leaflet-control-display-item-list-content { color: #7a6a40 !important; background-color: #1e1500; }
.leaflet-control-display-item-list-item { color: #e8d5a0 !important; background-color: #1e1500; }
.leaflet-control-display-item-list-item:hover { background-color: #2a1f00 !important; color: #ffd700 !important; }
.leaflet-control-display-item-list-item.is-selected {
	background-color: rgba(255,215,0,0.15) !important;
	color: #ffd700 !important;
}
/* External link buttons */
.leaflet-control-display-mejrs-btn,
.leaflet-control-display-wiki-btn {
	background-color: #2a1f00;
	color: #ffd700;
	border-color: #6b4700;
}
.leaflet-control-display-mejrs-btn:hover,
.leaflet-control-display-wiki-btn:hover {
	background-color: #3a2f00;
	border-color: #ffd700;
}

.leaflet-control-message-container{
	position: relative;
	top: 5px;
	pointer-events: none;
	z-index:1337;
	
}

.object-image-container{
		text-align:center;
}

.object-image{
	max-width : 100%;
	max-height: 200px;

 }
 
.tabbutton {
	background: #f8f8f8;
	display: inline-block;
	padding: 5px;
	margin-left: -1px;
	position: relative;
	list-style-type: none;
	left: 1px;
	top: 1px;
	cursor: pointer;
}

.content {
}
.tab:target {
    display: block;
}
 
 
.leaflet-control-message-box {
	position: relative;
	left: 50%;
	display: table;
	transform: translate(-50%, 0%);
	background: #fff;
	background-clip: padding-box;
	padding: 5px 5px;
	margin-left: 10px;
	margin-top: 10px;
	border-radius: 5px;
	font: 20px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}

.leaflet-control-message-content{
	position: relative;
	display: inline-block;
	
}

.leaflet-control-message-clear{
	position: relative;
	margin-left: 5px;
	color: grey;
	display: inline-block;
	pointer-events: auto;
}

.leaflet-tile-loaded {
	visibility: inherit;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	}


.map-label-container{
	display:block;
	width: max-content;
	position: relative;
	overflow-wrap: normal;
}
	   
.map-label-sub-container{
	position: relative;
	max-width:170px;
}

.map-label{
	font: 16px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: white;
	stroke:black;

	text-shadow:
	-1px -1px 0 #000,  
	 1px -1px 0 #000,
	 -1px 1px 0 #000,
	  1px 1px 0 #000;
}

.leaflet-center {
    left: 50%;
    transform: translate(-50%, 0%);
}

.leaflet-middle {
    top: 50%;
    position: absolute;
    z-index: 1000;
    pointer-events: none;
  transform: translate(0%, -50%);

}

.leaflet-center.leaflet-middle {
  transform: translate(-50%, -50%);
}

/* ══════════════════════════════════════════════════════════════════
   TASK PLANNER  (leaflet.planner.js)
   ══════════════════════════════════════════════════════════════════ */

/* Plan button on active task cards */
.task-card-plan-btn {
    flex: 0 0 auto;
    background: none;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #8a7040;
    font-size: 12px;
    padding: 1px 5px;
    cursor: pointer;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s;
    margin-left: 2px;
}
.task-card-plan-btn:hover {
    border-color: #ffd700;
    color: #ffd700;
}

/* Planner container replaces task-list when tab is active */
#planner-container {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#planner-container::-webkit-scrollbar { width: 6px; }
#planner-container::-webkit-scrollbar-track { background: #1a1a1a; }
#planner-container::-webkit-scrollbar-thumb { background: #5a3f00; border-radius: 3px; }
#planner-container::-webkit-scrollbar-thumb:hover { background: #ffd700; }

/* Status banner (pinning mode message) */
.planner-status-banner {
    background-color: #2a1f00;
    border-bottom: 1px solid #ffd700;
    color: #ffd700;
    font-size: 12px;
    padding: 6px 10px;
    text-align: center;
    font-style: italic;
}

/* Controls bar (line mode toggles + summary) */
.planner-controls {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 8px;
    background-color: #1e1600;
    border-bottom: 1px solid #3a2a00;
}
.planner-controls-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
/* Route selector row */
.planner-route-row { gap: 6px; }
.planner-route-select {
    flex: 1 1 auto;
    background: #111;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #e8d5a0;
    font-size: 12px;
    padding: 3px 6px;
    cursor: pointer;
}
.planner-route-select:focus { border-color: #ffd700; outline: none; }

/* Preset-active banner */
.planner-preset-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 5px 8px;
    background: #1a1200;
    border-bottom: 1px solid #3a2800;
    font-size: 11px;
    color: #a89060;
}
.planner-preset-banner-label { flex: 1 1 auto; }
.planner-preset-save-btn,
.planner-preset-back-btn {
    font-size: 11px;
    background-color: #1a1200;
    border: 1px solid #3a2a00;
    border-radius: 3px;
    color: #8a7040;
    padding: 2px 7px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.planner-preset-save-btn:hover,
.planner-preset-back-btn:hover { background-color: #2a2000; color: #c8a040; }

.planner-ctrl-label {
    font-size: 11px;
    color: #a89060;
    white-space: nowrap;
}
.planner-ctrl-sep { flex: 1 1 auto; }
.planner-line-btn {
    font-size: 11px;
    background-color: #1a1200;
    border: 1px solid #3a2a00;
    border-radius: 3px;
    color: #8a7040;
    padding: 2px 7px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.planner-line-btn:hover { background-color: #2a2000; color: #c8a040; }
.planner-line-btn-active {
    background-color: #3a2600;
    border-color: #ffd700;
    color: #ffd700;
}

/* Planner groups */
.planner-group {
    margin: 6px 6px 0;
    border: 1px solid #3a2800;
    border-radius: 4px;
    background-color: #1a1200;
}
.planner-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #2a1f00;
    cursor: pointer;
}
.planner-group-toggle {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border: 1px solid #5a3f00;
    border-radius: 3px;
    background-color: #1e1600;
    color: #c8a040;
    cursor: pointer;
}
.planner-group-toggle:hover { border-color: #ffd700; color: #ffd700; }
.planner-group-toggle-text {
    flex: 0 0 auto;
    font-size: 11px;
    background-color: #1a1200;
    border: 1px solid #3a2a00;
    border-radius: 3px;
    color: #8a7040;
    padding: 2px 7px;
    cursor: pointer;
}
.planner-group-toggle-text:hover { border-color: #ffd700; color: #ffd700; }
.planner-group-name {
    flex: 0 1 220px;
    min-width: 120px;
    background-color: #111;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #e8d5a0;
    font-size: 12px;
    padding: 3px 6px;
}
.planner-group-name:focus { border-color: #ffd700; outline: none; }
.planner-group-meta {
    flex: 1 1 auto;
    font-size: 11px;
    color: #8a7040;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.planner-group-pin-toggle-wrap {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #a89060;
    cursor: pointer;
    user-select: none;
}
.planner-group-pin-toggle {
    margin: 0;
    accent-color: #ffd700;
}
.planner-group-remove {
    flex: 0 0 auto;
    border: 1px solid #5a3f00;
    border-radius: 3px;
    background: transparent;
    color: #8a7040;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 3px 6px;
}
.planner-group-remove:hover { border-color: #ff6060; color: #ff6060; }
.planner-group-drag-handle {
    flex: 0 0 auto;
    color: #5a4a20;
    cursor: grab;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    user-select: none;
}
.planner-group-drag-handle:hover { color: #c8a040; }
.planner-group-drag-handle:active { cursor: grabbing; }
.planner-group-dragging { opacity: 0.45; }
.planner-group-drop-zone {
    height: 6px;
    margin: 2px 6px;
    border: 1px dashed transparent;
    border-radius: 4px;
    transition: height 0.1s, background-color 0.1s, border-color 0.1s;
}
.planner-group-drop-over {
    height: 22px;
    border-color: #b4903c;
    background-color: rgba(180, 144, 60, 0.18);
}
.planner-group-body {
    padding-bottom: 4px;
}

/* Drop zones */
.planner-drop-zone {
    height: 6px;
    margin: 0 8px;
    border: 1px dashed transparent;
    border-radius: 3px;
    color: transparent;
    font-size: 10px;
    text-align: center;
    transition: border-color 0.15s, background-color 0.15s, height 0.1s, color 0.15s;
}
.planner-drop-zone-over, .planner-drop-zone:hover {
    height: 22px;
    border-color: #ffd700;
    background-color: rgba(255,215,0,0.07);
    color: #a89060;
}
.planner-drop-top {
    margin-top: 4px;
}

/* Planner cards */
.planner-card {
    background-color: #221800;
    border: 1px solid #3a2800;
    border-left: 4px solid #5a3f00; /* overridden inline by tier colour */
    border-radius: 4px;
    margin: 0 6px;
    padding: 7px 9px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, opacity 0.15s;
    user-select: none;
}
.planner-card:hover { background-color: #2e2000; }
.planner-card-selected {
    background-color: #2e2000;
    box-shadow: 0 0 0 1px #ffd700;
}
.planner-card.planner-dragging { opacity: 0.4; }
.planner-card.planner-card-pinning {
    border-color: #ffd700 !important;
    animation: planner-pulse 1s ease-in-out infinite;
}
@keyframes planner-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255,215,0,0.3); }
    50%       { box-shadow: 0 0 10px rgba(255,215,0,0.7); }
}

.planner-card-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.planner-drag-handle {
    color: #5a4a20;
    cursor: grab;
    font-size: 14px;
    flex: 0 0 auto;
    line-height: 1;
}
.planner-drag-handle:active { cursor: grabbing; }
.planner-order-num {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: bold;
    color: #7a6030;
    min-width: 16px;
    text-align: right;
}
.planner-tier-dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.4);
}
.planner-card-name {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
    line-height: 1.3;
}
.planner-card-pts {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}
.planner-running-pts {
    flex: 0 0 auto;
    font-size: 10px;
    color: #6a5820;
    background-color: #1a1200;
    border: 1px solid #3a2800;
    border-radius: 10px;
    padding: 1px 6px;
    white-space: nowrap;
}
.planner-remove-btn {
    flex: 0 0 auto;
    background: none;
    border: none;
    color: #5a3a20;
    font-size: 12px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.planner-remove-btn:hover { color: #ff6060; }

.planner-card-desc {
    font-size: 12px;
    color: #c8b880;
    line-height: 1.4;
    margin-bottom: 4px;
}

.planner-card-skill-reqs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 4px;
}

.planner-card-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px 1px 4px;
    border-radius: 10px;
    border: 1px solid #3a2800;
    background-color: #1a1200;
    color: #d8c080;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.planner-card-skill-icon {
    width: 13px;
    height: 13px;
    image-rendering: pixelated;
    display: block;
}

.planner-card-skill-level {
    min-width: 1.2em;
    text-align: right;
}

/* Suggested locations from strategy.points */
.planner-card-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 8px 4px;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    margin-bottom: 2px;
}

.planner-sugg-label {
    font-size: 10px;
    color: #7a6a40;
    width: 100%;
    margin-bottom: 1px;
}

.planner-sugg-btn {
    font-size: 11px;
    padding: 2px 7px;
    background: #1a1200;
    color: #c8b880;
    border: 1px solid #3a2800;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.planner-sugg-btn:hover {
    background: #2a2000;
    border-color: #ffd700;
    color: #ffd700;
}
.planner-sugg-btn.planner-sugg-active {
    background: #2a2000;
    border-color: #ffd700;
    color: #ffd700;
    font-weight: bold;
}

.planner-sugg-overflow {
    display: none;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
}
.planner-sugg-overflow-open {
    display: flex;
}

.planner-sugg-toggle {
    font-size: 11px;
    padding: 2px 7px;
    background: none;
    color: #7a6a40;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    margin-top: 1px;
}
.planner-sugg-toggle:hover {
    color: #ffd700;
    border-color: #3a2800;
}

.planner-sugg-loading {
    font-size: 14px;
    color: #7a6a40;
    animation: planner-spin 1s linear infinite;
    display: inline-block;
}

@keyframes planner-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.planner-card-pin-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}
.planner-pin-btn {
    font-size: 11px;
    background-color: #1a1200;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #8a7040;
    padding: 2px 8px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.planner-pin-btn:hover { background-color: #2a2000; border-color: #8a6a00; color: #ffd700; }
.planner-pin-btn.planner-pin-set { border-color: #ffd700; color: #ffd700; background-color: #2a2000; }
.planner-pin-clear-btn {
    background: none;
    border: 1px solid #3a2000;
    border-radius: 3px;
    color: #7a4020;
    font-size: 11px;
    padding: 2px 5px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.planner-pin-clear-btn:hover { color: #ff6060; border-color: #ff6060; }

/* Comments */
.planner-comments { margin-bottom: 4px; }
.planner-comment-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 11px;
    color: #a89060;
    padding: 1px 0;
}
.planner-comment-item::before { content: '›'; color: #5a3f00; flex: 0 0 auto; }
.planner-comment-text { flex: 1 1 auto; }
.planner-comment-del {
    flex: 0 0 auto;
    background:none;
    border:none;
    color:#4a3010;
    font-size:10px;
    cursor:pointer;
    padding:0 2px;
    transition: color 0.15s;
}
.planner-comment-del:hover { color: #ff6060; }

.planner-add-comment-row {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}
.planner-comment-input {
    flex: 1 1 auto;
    background-color: #111;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #e8d5a0;
    font-size: 11px;
    padding: 3px 6px;
    outline: none;
    transition: border-color 0.15s;
}
.planner-comment-input::placeholder { color: #4a3a10; }
.planner-comment-input:focus { border-color: #ffd700; }
.planner-comment-add-btn {
    flex: 0 0 auto;
    background-color: #2a1f00;
    border: 1px solid #5a3f00;
    border-radius: 3px;
    color: #ffd700;
    font-size: 14px;
    padding: 1px 7px;
    cursor: pointer;
    line-height: 1.2;
    transition: background-color 0.15s;
}
.planner-comment-add-btn:hover { background-color: #3a2f00; }

/* Add section (search to add tasks) */
.planner-add-section {
    margin: 8px 6px 4px;
    padding: 8px;
    background-color: #1a1200;
    border: 1px solid #3a2800;
    border-radius: 4px;
    margin-bottom: 50vh;
}
.planner-add-label {
    font-size: 11px;
    color: #8a7040;
    margin-bottom: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Divider between search and custom step sections */
.planner-add-divider {
    height: 1px;
    background-color: #3a2800;
    margin: 10px 0 8px;
}

/* Custom step create form */
.planner-virtual-create-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.planner-virtual-desc-input { margin-top: 0; }
.planner-virtual-add-btn {
    align-self: flex-start;
    background-color: #003a3a;
    border: 1px solid #00cccc;
    border-radius: 3px;
    color: #00cccc;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.planner-virtual-add-btn:hover { background-color: #005555; color: #fff; }
.planner-group-add-btn {
    width: 100%;
    text-align: center;
    margin-top: 2px;
}

/* Virtual task cards */
.planner-card-virtual {
    background-color: #001c1c;
    border-color: #005555;
}
.planner-card-virtual:hover { background-color: #002a2a; }

/* ── Completed planner card ─────────────────────────────────────── */
.planner-card-done {
    opacity: 0.55;
    background-color: #181010 !important;
    border-left-color: #3a3a3a !important;
}
.planner-card-done:hover { opacity: 0.75; }
.planner-card-done .planner-card-name {
    color: #806830;
    text-decoration: line-through;
}

.planner-card-done-label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 2px;
    title: 'Mark as completed';
}
.planner-card-done-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #ffd700;
}

.planner-virtual-badge {
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #00cccc;
    background-color: #003a3a;
    border: 1px solid #00cccc;
    border-radius: 8px;
    padding: 1px 5px;
    white-space: nowrap;
}

/* Editable points badge on virtual card */
.planner-virtual-pts {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 1px dashed #005555;
    padding: 0 2px;
    transition: opacity 0.1s;
}
.planner-virtual-pts:hover {
    opacity: 0.75;
}

/* Inline number input that replaces the pts badge when editing */
.planner-virtual-pts-input {
    flex: 0 0 auto;
    width: 52px;
    background: #001a1a;
    border: 1px solid #00cccc;
    border-radius: 3px;
    color: #00cccc;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 1px 3px;
    outline: none;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}
.planner-virtual-pts-input::-webkit-outer-spin-button,
.planner-virtual-pts-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Inline editable name on virtual card */
.planner-virtual-name {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #005555;
    color: #00cccc;
    font-size: 13px;
    font-weight: bold;
    outline: none;
    padding: 0 2px;
    min-width: 0;
    transition: border-color 0.15s;
}
.planner-virtual-name:focus { border-bottom-color: #00cccc; background-color: rgba(0,204,204,0.05); }
.planner-virtual-name::placeholder { color: #005555; }

/* Inline editable description on virtual card */
.planner-virtual-desc {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #003a3a;
    color: #7acccc;
    font-size: 12px;
    outline: none;
    padding: 2px 2px 2px 22px;
    margin-bottom: 4px;
    transition: border-color 0.15s;
}
.planner-virtual-desc:focus { border-bottom-color: #00cccc; background-color: rgba(0,204,204,0.04); }
.planner-virtual-desc::placeholder { color: #003a3a; }

.planner-search-input {
    width: 100%;
    box-sizing: border-box;
    background-color: #111;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #e8d5a0;
    font-size: 12px;
    padding: 4px 7px;
    outline: none;
    transition: border-color 0.15s;
}
.planner-search-input::placeholder { color: #4a3a10; }
.planner-search-input:focus { border-color: #ffd700; }
.planner-target-group { margin-bottom: 5px; }

.planner-search-results {
    margin-top: 4px;
    max-height: 260px;
    overflow-y: auto;
}
.planner-search-results::-webkit-scrollbar { width: 6px; }
.planner-search-results::-webkit-scrollbar-track { background: #1a1a1a; }

/* ─── Map right-click context menu ─────────────────────────────── */
.planner-map-ctx-menu {
    position: fixed;
    z-index: 9999;
    background: #1a1200;
    border: 1px solid #5a3f00;
    border-radius: 5px;
    padding: 8px;
    min-width: 240px;
    max-width: 300px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.65);
    font-size: 12px;
    color: #e8d5a0;
}
.planner-ctx-section-label {
    font-size: 10px;
    color: #8a7040;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.planner-ctx-divider {
    border: none;
    border-top: 1px solid #3a2800;
    margin: 6px 0;
}
.planner-ctx-row {
    display: flex;
    gap: 4px;
    margin-bottom: 2px;
}
.planner-ctx-input {
    flex: 1 1 auto;
    background: #111;
    border: 1px solid #3a2800;
    border-radius: 3px;
    color: #e8d5a0;
    font-size: 12px;
    padding: 3px 6px;
}
.planner-ctx-input:focus { border-color: #ffd700; outline: none; }
.planner-ctx-results {
    max-height: 180px;
    overflow-y: auto;
    margin-top: 4px;
}
.planner-ctx-results::-webkit-scrollbar { width: 5px; }
.planner-ctx-results::-webkit-scrollbar-track { background: #1a1a1a; }
.planner-ctx-results::-webkit-scrollbar-thumb { background: #3a2800; border-radius: 3px; }
.planner-ctx-result {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 4px;
    border-radius: 3px;
    cursor: pointer;
}
.planner-ctx-result:hover { background: #2a1f00; }
.planner-ctx-result-name {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.planner-ctx-result-added { opacity: 0.45; pointer-events: none; }
.planner-search-results::-webkit-scrollbar-thumb { background: #5a3f00; border-radius: 3px; }
.planner-search-results::-webkit-scrollbar-thumb:hover { background: #ffd700; }
.planner-search-result {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 5px;
    border-radius: 3px;
    cursor: default;
    transition: background-color 0.12s;
}
.planner-search-result:hover { background-color: #2a2000; }
.planner-search-tier-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 8px;
    border: 1px solid rgba(0,0,0,0.4);
}
.planner-search-result-name {
    flex: 1 1 auto;
    font-size: 12px;
    color: #e8d5a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.planner-search-result-pts {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}
.planner-search-result-completion {
    flex: 0 0 auto;
    font-size: 11px;
    color: #7aaa60;
    white-space: nowrap;
    min-width: 38px;
    text-align: right;
}
.planner-search-add-btn {
    flex: 0 0 auto;
    background-color: #2a1f00;
    border: 1px solid #5a3f00;
    border-radius: 3px;
    color: #ffd700;
    font-size: 11px;
    padding: 2px 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s;
}
.planner-search-add-btn:hover:not(:disabled) { background-color: #3a2f00; border-color: #ffd700; }
.planner-search-add-btn:disabled { opacity: 0.45; cursor: default; }
.planner-no-results { font-size: 12px; color: #5a4a20; padding: 4px 5px; }

/* ── All Shops Toggle Control ─────────────────────────────── */
.leaflet-control-allshops {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
.leaflet-control-allshops-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #1a1200;
    border: 1px solid #6b5900;
    color: #e8d5a0;
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.15s, border-color 0.15s;
}
.leaflet-control-allshops-btn:hover {
    background: #2a1f00;
    border-color: #c8a800;
}
.leaflet-control-allshops-btn.is-active {
    background: #2a1f00;
    border-color: #ffd700;
    box-shadow: inset 0 0 0 1px rgba(255,215,0,0.4);
}
