:root {
	color-scheme: light;
	font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #18201d;
	background: #eef1ef;
	--green: #087f5b;
	--green-dark: #066447;
	--line: #dce2df;
	--radius: 10px;
	--radius-small: 6px;
	--shadow: 0 1px 2px rgba(21, 35, 29, .08), 0 5px 14px -10px rgba(21, 35, 29, .28);
}

* { box-sizing: border-box; }
html, body, .app-shell, #map { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }

.material-symbols-rounded {
	font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
	line-height: 1;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.topbar {
	position: absolute;
	top: max(14px, env(safe-area-inset-top));
	left: 14px;
	right: 14px;
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 10px;
	max-width: 520px;
	margin: auto;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
	pointer-events: auto;
}

.brand {
	min-width: 0;
	height: 42px;
	display: flex;
	align-items: center;
}

.brand h1 { margin: 0; font-size: 17px; letter-spacing: -.02em; }

.language-control {
	min-width: 118px;
	height: 42px;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 0 4px 0 10px;
	border-left: 1px solid var(--line);
	cursor: pointer;
}

.language-control select { min-width: 86px; height: 100%; flex: 1; padding: 0 6px; border: 0; background: transparent; font-size: 13px; cursor: pointer; }
.language-control select:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; border-radius: 4px; }

.search-box {
	grid-column: 1 / -1;
	height: 48px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 8px 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-small);
	background: #f6f8f7;
}

.search-box > .material-symbols-rounded { color: #64706b; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box input::placeholder { color: #8b9691; }

.search-results {
	grid-column: 1 / -1;
	max-height: min(42vh, 380px);
	margin: 0;
	padding: 0;
	overflow-y: auto;
	border-top: 1px solid var(--line);
	list-style: none;
}

.search-result + .search-result { border-top: 1px solid var(--line); }
.search-result button {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	padding: 12px 4px;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
}
.search-result button:hover, .search-result button:focus-visible { background: #f6f8f7; outline: 0; }
.search-result-copy { min-width: 0; }
.search-result-name, .search-result-address { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-name { margin-bottom: 3px; font-size: 14px; }
.search-result-address { color: #64706b; font-size: 12px; }
.search-result-distance { align-self: center; color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.search-empty { padding: 18px 4px 10px; color: #64706b; font-size: 13px; text-align: center; }

.icon-button {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	/* deslop-ignore-next-line 19 -- circular icon-only control is intentional. */
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}
.icon-button:hover { background: #f1f4f2; }

.map-actions {
	position: absolute;
	right: 14px;
	bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px));
	display: flex;
	align-items: center;
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
}

.map-button {
	min-height: 48px;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 0 15px;
	border: 0;
	border-radius: 0;
	background: #fff;
	font-weight: 700;
	cursor: pointer;
}
.map-button:hover { background: #f7f9f8; }
.map-button:first-child { border-right: 1px solid var(--line); }
.map-button.icon-only { width: 48px; justify-content: center; padding: 0; }

.sheet {
	position: absolute;
	z-index: 2;
	left: 12px;
	right: 12px;
	bottom: max(12px, env(safe-area-inset-bottom));
	max-width: 520px;
	margin: auto;
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
}
.sheet-close { position: absolute; top: 12px; right: 12px; }
.type-label { color: var(--green); font-size: 12px; font-weight: 800; }
.sheet h2 { max-width: calc(100% - 30px); margin: 6px 0 8px; font-size: 21px; line-height: 1.3; }
.address { margin: 0; color: #64706b; font-size: 14px; line-height: 1.5; }
.route-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.primary-button, .secondary-button {
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border-radius: var(--radius-small);
	border: 1px solid var(--green);
	font-weight: 800;
	cursor: pointer;
}
.primary-button { color: #fff; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { color: var(--green); background: #fff; }

.guidance {
	position: absolute;
	z-index: 3;
	top: max(14px, env(safe-area-inset-top));
	left: 12px;
	right: 12px;
	min-height: 76px;
	max-width: 520px;
	margin: auto;
	display: grid;
	grid-template-columns: 48px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
}
.guidance-icon { width: 32px; display: grid; place-items: center; color: var(--green); }
.guidance-icon .material-symbols-rounded { font-size: 30px; }
.guidance-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guidance-copy > span { color: var(--green); font-size: 11px; font-weight: 800; }
.guidance-copy strong, .guidance-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guidance-copy small { color: #64706b; }
.stop-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius-small); background: #f6f8f7; font-weight: 800; cursor: pointer; }

.notice {
	position: absolute;
	z-index: 4;
	left: 50%;
	bottom: 84px;
	max-width: calc(100% - 28px);
	padding: 12px 16px;
	border-radius: var(--radius-small);
	color: #fff;
	background: #18201d;
	transform: translateX(-50%);
	font-size: 14px;
	text-align: center;
}

[hidden] { display: none !important; }

@media (min-width: 760px) {
	.topbar { top: 22px; left: 22px; right: auto; width: 420px; margin: 0; }
	.sheet { left: 22px; right: auto; bottom: 22px; width: 420px; margin: 0; }
	.guidance { top: 22px; left: 22px; right: auto; width: 420px; margin: 0; }
	.map-actions { right: 22px; bottom: 28px; }
}

@media (max-width: 420px) {
	.brand h1 { font-size: 15px; }
	.route-buttons { grid-template-columns: 1fr; }
}

.app-shell:has(.guidance:not([hidden])) .topbar { display: none; }
.search-count { color: #64706b; font-size: 12px; white-space: nowrap; }
.search-box:has(#clearSearch[hidden]) .search-count { display: none; }
.search-toggle { width: 42px; height: 42px; color: #64706b; }
.secondary-button:hover, .stop-button:hover { background: #f1f4f2; }
