:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #26332b;
  --surface: #f9faf5f5;
  --line: #24362a1a;
  --muted: #6b756b;
  --accent: #344f3e;
  --shadow: 0 3px 18px #0e1c1926, 0 1px 3px #0e1c1914;
  --map-text-shadow: 0 1px 3px #000, 0 0 1px #000;
  --point-panel-offset: 0px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #233629; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled, select:disabled { cursor: default; opacity: .45; }
button, select { min-height: 44px; }
button { border: 0; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #52765b; outline-offset: 3px; }
button:not(:disabled):active { background-color: #e0e7dd; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; pointer-events: none; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
#map-labels { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.floating { background: var(--surface); box-shadow: var(--shadow); border: 1px solid #ffffff80; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex-shrink: 0; background: transparent; border-radius: 12px; }
.map-toolbar { position: fixed; z-index: 4; top: max(16px, var(--android-safe-top, env(safe-area-inset-top))); left: max(16px, var(--android-safe-left, env(safe-area-inset-left))); right: max(16px, var(--android-safe-right, env(safe-area-inset-right))); display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.map-toolbar > * { pointer-events: auto; }
.map-controls { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; }
#search-form { position: relative; z-index: 1; display: flex; align-items: center; flex: 0 1 320px; min-width: 44px; height: 44px; width: 320px; padding: 0; background: #1025191a; border: 1px solid #ffffffa6; border-radius: 22px; box-shadow: 0 1px 4px #0005; }
#search-form:focus-within { border-color: #fff; box-shadow: 0 0 0 1px #ffffff80, 0 1px 4px #0005; }
.search-icon { position: absolute; left: 11px; width: 20px; height: 20px; color: #fff; filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 1px #000); }
#search { appearance: none; -webkit-appearance: none; background: transparent; border: 0; min-width: 0; width: 100%; height: 44px; padding: 0 44px 0 38px; font-size: 16px; border-radius: 22px; outline-offset: -2px; color: #fff; caret-color: #fff; text-shadow: var(--map-text-shadow); }
#search::placeholder { color: #fff; opacity: 1; }
#search::-webkit-search-decoration { -webkit-appearance: none; }
#search::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
#search-clear { position: absolute; right: 0; top: -1px; color: #fff; border-radius: 50%; }
#search-clear svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px #000); }
#search-clear:not(:disabled):hover, #search-clear:not(:disabled):active { background: #ffffff1a; }
#search:focus-visible, .zoom-controls button:focus-visible { outline-color: #ffffffe0; }
#search-suggestions { position: absolute; top: calc(100% + 8px); left: 0; width: min(440px, calc(100vw - max(16px, var(--android-safe-left, env(safe-area-inset-left))) - max(16px, var(--android-safe-right, env(safe-area-inset-right))))); max-height: min(420px, calc(100dvh - max(16px, var(--android-safe-top, env(safe-area-inset-top))) - 60px - max(16px, var(--android-safe-bottom, env(safe-area-inset-bottom))))); overflow: auto; overscroll-behavior: contain; border: 1px solid #ffffffa6; border-radius: 16px; background: #f9faf5; box-shadow: var(--shadow); touch-action: pan-y; }
#search-results { list-style: none; margin: 0; padding: 5px; }
#search-results [role="option"] { display: grid; gap: 4px; min-height: 58px; padding: 10px 11px; border-radius: 11px; cursor: pointer; }
#search-results [aria-selected="true"] { background: #e3eadd; outline: 2px solid #52765b; outline-offset: -2px; }
.search-result-title { font-size: 14px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.search-result-detail { font-size: 12px; line-height: 1.45; color: #5e6a60; overflow-wrap: anywhere; }
.search-result-distance { font-size: 12px; line-height: 1.4; color: #435747; }
#search-distance-origin { margin: 0; padding: 11px 16px 7px; font-size: 11px; line-height: 1.45; color: #5e6a60; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#search-empty { margin: 0; padding: 16px; font-size: 14px; line-height: 1.5; }
#search-empty strong { font-weight: 500; }
#search-empty span { display: block; color: #5e6a60; font-size: 12px; margin-top: 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.zoom-controls svg { filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 1px #000); }
#language-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 68px; min-height: 44px; padding: 0 8px; border: 1px solid #ffffff59; border-radius: 22px; background: #10251933; color: #fff; text-shadow: var(--map-text-shadow); font-size: 12px; font-weight: 600; }
#language-flag { font-size: 19px; line-height: 1; }
.floor-controls { display: flex; align-items: center; flex: 0 0 auto; height: 44px; padding: 0; border: 0; border-radius: 22px; background: #10251944; color: #fff; box-shadow: 0 0 0 1px #ffffff59, 0 1px 5px #0003; text-shadow: var(--map-text-shadow); }
.floor-controls .icon-button { width: 44px; height: 44px; border-radius: 50%; }
.floor-controls svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px #000); }
.floor-controls button:not(:disabled):hover, .floor-controls button:not(:disabled):active, #language-toggle:not(:disabled):hover { background: #ffffff14; }
.floor-value { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; width: 92px; height: 44px; border-inline: 1px solid #ffffff26; font-size: 12px; text-align: center; white-space: nowrap; }
.floor-value > svg { width: 12px; height: 12px; }
#floor-short { display: none; }
.floor-value:has(select:disabled) { opacity: .45; }
#floor { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; opacity: 0; cursor: pointer; }
.floor-value:focus-within { outline: 2px solid #ffffffb3; outline-offset: -2px; border-radius: 4px; }
#floor-ground { border-left: 1px solid #ffffff26; border-radius: 0 22px 22px 0; }
body:has(#temporary-point:not([hidden])) { --point-panel-offset: 80px; }
.zoom-controls { position: fixed; z-index: 2; right: max(16px, var(--android-safe-right, env(safe-area-inset-right))); bottom: calc(max(20px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); display: grid; padding: 0; background: transparent; color: #fff; }
.zoom-controls button { width: 44px; height: 44px; border-radius: 11px; }
.zoom-controls button:not(:disabled):active { background: #0002; }
#feedback { position: fixed; z-index: 3; bottom: calc(max(24px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 9px; max-width: min(540px, calc(100% - 152px)); width: max-content; padding: 0; background: transparent; border: 0; box-shadow: none; color: #fff; text-shadow: var(--map-text-shadow); font-size: 13px; line-height: 1.45; text-align: center; }
#feedback[data-kind="loading"] { top: auto; bottom: calc(max(24px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); left: 50%; right: auto; width: 18px; height: 18px; transform: translateX(-50%); justify-content: center; pointer-events: none; }
#feedback[data-kind="error"] { padding: 10px 14px; border-radius: 15px; background: #fff7e9; color: #76502a; text-shadow: none; box-shadow: var(--shadow); }
#quality { color: #76502a; }
#retry { background: var(--accent); color: #fff; padding: 0 14px; border-radius: 10px; }
#retry:not(:disabled):active { background: #233b2b; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.settings-heading h2 { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.4px; }
[hidden] { display: none !important; }
.personal-return, .personal-open { position: fixed; z-index: 2; left: max(16px, var(--android-safe-left, env(safe-area-inset-left))); width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff59; background: #1025191a; }
.personal-return { bottom: calc(max(20px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); color: #79b9ee; }
.personal-return svg { width: 16px; height: 23px; opacity: .6; fill: currentColor; stroke: #fff; stroke-width: 1.5; }
.personal-open { bottom: calc(max(20px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + 54px + var(--point-panel-offset)); color: #ffffffe0; }
.personal-open svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px #0008); }
.personal-return:not(:disabled):active, .personal-open:not(:disabled):active { background: #1025194d; }
#result-browser { position: fixed; z-index: 3; left: max(12px, var(--android-safe-left, env(safe-area-inset-left))); right: max(12px, var(--android-safe-right, env(safe-area-inset-right))); bottom: calc(max(16px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + 106px + var(--point-panel-offset)); display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 44px 44px; align-items: center; max-width: 460px; margin: 0 auto; border: 1px solid #ffffff80; border-radius: 17px; background: #10251966; color: #fff; text-shadow: var(--map-text-shadow); box-shadow: 0 1px 4px #0004; }
#result-browser .icon-button { width: 100%; min-width: 0; height: 48px; }
#result-browser svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 1px #000); }
#result-browser button:disabled { opacity: .35; }
#result-list { display: grid; gap: 3px; min-width: 0; padding: 7px 0; min-height: 52px; background: transparent; color: inherit; text-shadow: inherit; text-align: left; }
#result-title { font-size: 12px; line-height: 1.3; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#result-detail { font-size: 11px; line-height: 1.35; }
body:has(#search:focus) #result-browser { display: none; }
#temporary-point { position: fixed; z-index: 3; left: max(12px, var(--android-safe-left, env(safe-area-inset-left))); right: max(12px, var(--android-safe-right, env(safe-area-inset-right))); bottom: max(16px, var(--android-safe-bottom, env(safe-area-inset-bottom))); display: flex; align-items: center; gap: 8px; max-width: 440px; margin: 0 auto; padding: 8px 4px 8px 12px; border: 1px solid #ffffff40; border-radius: 17px; background: #10251952; color: #fff; text-shadow: var(--map-text-shadow); box-shadow: 0 2px 8px #0003; backdrop-filter: blur(8px); }
.temporary-caption { display: grid; gap: 4px; min-width: 0; flex: 1; }
.temporary-caption strong { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#temporary-coordinates { color: #ffffffc7; font-size: 11px; line-height: 1.4; }
#temporary-save { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 0 10px; border-radius: 11px; background: #ffffff12; color: #fff; font-size: 12px; font-weight: 600; }
#temporary-save svg, #temporary-close svg { width: 17px; height: 17px; }
#temporary-close { color: #ffffffb3; }
#temporary-share { color: #ffffffd9; }
#temporary-share svg { width: 18px; height: 18px; }
.point-share { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.point-share svg { width: 18px; height: 18px; }
#share-text { width: 100%; min-height: 130px; resize: vertical; padding: 12px; margin-bottom: 12px; border: 1px solid #b7c4b1; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
#share-status { margin-top: 12px; }
.place-dialog { position: fixed; inset: auto 0 0; margin: auto; width: min(100%, 440px); max-width: 100%; max-height: calc(100dvh - max(16px, var(--android-safe-top, env(safe-area-inset-top)))); padding: 18px max(20px, var(--android-safe-right, env(safe-area-inset-right))) max(22px, var(--android-safe-bottom, env(safe-area-inset-bottom))) max(20px, var(--android-safe-left, env(safe-area-inset-left))); border: 1px solid #ffffffa6; border-radius: 22px 22px 0 0; background: #f9faf5; color: #26332b; box-shadow: 0 12px 60px #101d2533; overflow: auto; overscroll-behavior: contain; }
.place-dialog::backdrop { background: #13271c26; }
.place-dialog h2 { font-size: 19px; }
.place-dialog .settings-heading { position: sticky; top: 0; z-index: 1; background: #f9faf5; }
.place-detail { font-size: 12px; line-height: 1.5; color: #5e6a60; margin: 0 0 14px; overflow-wrap: anywhere; }
.place-primary, .place-secondary { width: 100%; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.place-primary { background: #315c42; color: #fff; }
.place-secondary { background: #e5ebe0; color: #26332b; }
#point-form { display: grid; gap: 9px; margin: 20px 0 0; }
#point-form label { font-size: 12px; color: #5e6a60; }
#place-name { width: 100%; min-height: 44px; border: 1px solid #b7c4b1; border-radius: 10px; background: #fff; padding: 9px 11px; font-size: 16px; }
.place-delete { width: 100%; padding: 8px; margin-top: 10px; background: transparent; color: #9b3e30; font-size: 13px; }
#point-error { color: #9b3e30; font-size: 13px; }
#personal-error, #cluster-error { color: #9b3e30; font-size: 13px; }
#personal-list, #results-list, #cluster-list { list-style: none; padding: 0; margin: 0 0 14px; }
#personal-list li, #cluster-list li { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); }
.place-go { display: grid; gap: 5px; flex: 1; min-width: 0; width: 100%; text-align: left; padding: 12px 4px; background: transparent; border-radius: 8px; }
.place-go strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.place-go span { font-size: 12px; line-height: 1.45; color: #5e6a60; }
.place-edit { flex: 0 0 44px; }
#personal-list .place-remove, #cluster-list .place-remove { flex: 0 0 44px; color: #9b3e30; font-size: 24px; }
#results-list li + li { border-top: 1px solid var(--line); }
#results-list [aria-current="true"] { background: #e3eadd; }
@media (hover: hover) {
  button:not(:disabled):hover { background-color: #e7ece2; }
  .zoom-controls button:not(:disabled):hover { background-color: #0002; }
}
@media (max-width: 600px) {
  .map-toolbar { top: max(12px, var(--android-safe-top, env(safe-area-inset-top))); left: max(12px, var(--android-safe-left, env(safe-area-inset-left))); right: max(12px, var(--android-safe-right, env(safe-area-inset-right))); gap: 10px; }
  .map-controls { gap: 8px; }
  #search-form { flex: 0 0 44px; width: 44px; }
  #search { padding: 0; color: transparent; caret-color: transparent; text-shadow: none; }
  #search::placeholder { color: transparent; }
  #search-clear { visibility: hidden; }
  .floor-value { width: 56px; }
  #floor-current { display: none; }
  #floor-short { display: inline; }
  .map-toolbar:has(#search-form:focus-within) .map-controls { visibility: hidden; pointer-events: none; }
  #search-form:focus-within { position: absolute; inset: 0; width: 100%; background: #102519d9; }
  #search-form:focus-within #search { padding: 0 44px 0 38px; color: #fff; caret-color: #fff; text-shadow: var(--map-text-shadow); }
  #search-form:focus-within #search::placeholder { color: #fff; }
  #search-form:focus-within #search-clear { visibility: visible; }
  .zoom-controls { right: max(12px, var(--android-safe-right, env(safe-area-inset-right))); bottom: calc(max(16px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); }
  .personal-return, .personal-open { left: max(12px, var(--android-safe-left, env(safe-area-inset-left))); }
  .personal-return { bottom: calc(max(16px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); }
  .personal-open { bottom: calc(max(16px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + 54px + var(--point-panel-offset)); }
  #feedback { bottom: calc(max(20px, var(--android-safe-bottom, env(safe-area-inset-bottom))) + var(--point-panel-offset)); left: max(12px, var(--android-safe-left, env(safe-area-inset-left))); transform: none; max-width: calc(100% - max(12px, var(--android-safe-left, env(safe-area-inset-left))) - max(12px, var(--android-safe-right, env(safe-area-inset-right))) - 60px); justify-content: flex-start; text-align: left; }
}
@media (max-width: 365px) {
  .map-toolbar { gap: 8px; }
  .map-controls { gap: 6px; }
  .floor-value { width: 44px; }
  #language-toggle { flex-basis: 60px; gap: 4px; padding: 0 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
