:root {
	--panel-w: 150px;
	--right-panel-w: 380px;
	--radius: 5px;
	--ink: #1a1f24;
	--muted: #5c6770;
	--line: rgba(26, 31, 36, 0.12);
	--panel-bg: rgba(248, 246, 241, 0.96);
	--page-bg: #d7dde3;
	--surface: #ffffff;
	--surface-soft: rgba(248, 246, 241, 0.98);
	--surface-muted: #e8e4dc;
	--input-bg: #ffffff;
	--accent: #0f6b5c;
	--accent-2: #c45c26;
	--danger: #a33b2b;
	--on-accent: #ffffff;
	--shadow: 0 12px 40px rgba(20, 28, 36, 0.18);
	--font: "Manrope", sans-serif;
	--display: "Source Serif 4", Georgia, serif;
}

html[data-theme="dark"] {
	--ink: #e8eaed;
	--muted: #9aa3ad;
	--line: rgba(255, 255, 255, 0.12);
	--panel-bg: rgba(24, 28, 34, 0.96);
	--page-bg: #101418;
	--surface: #232830;
	--surface-soft: rgba(30, 35, 42, 0.98);
	--surface-muted: #2c333c;
	--input-bg: #1c2128;
	--accent: #2bb39a;
	--accent-2: #e08a4f;
	--danger: #e06b5c;
	--on-accent: #0b1210;
	--shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
	margin: 0;
	height: 100%;
	overflow: hidden;
	font-family: var(--font);
	color: var(--ink);
	background: var(--page-bg);
}

#map {
	position: absolute;
	inset: 0;
	z-index: 1;
}
@media (min-width: 861px) {
	#map { left: var(--panel-w); }
}

.map-error {
	position: absolute;
	z-index: 5;
	left: calc(var(--panel-w) + 24px);
	right: 24px;
	top: 24px;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--panel-bg);
	box-shadow: var(--shadow);
	color: var(--danger);
	font-size: 0.92rem;
	max-width: 520px;
}

.ymaps-2-1-79-controls__control_toolbar,
.ymaps-2-1-79-float-button {
	box-shadow: var(--shadow) !important;
}

.side-panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--panel-w);
	z-index: 20;
	background: var(--panel-bg);
	backdrop-filter: blur(10px);
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
@media (min-width: 861px) {
	.side-panel { overflow: visible; }
}

.panel-header {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	padding: 14px 10px 12px;
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	text-align: center;
	min-width: 0;
}
.brand-logo {
	width: 40px;
	height: auto;
	display: block;
	flex-shrink: 0;
	object-fit: contain;
}
.brand-name {
	display: block;
	font-family: "Manrope", sans-serif;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	word-break: break-word;
}

.mobile-top-bar {
	display: none;
}

.mobile-menu {
	display: none;
}

.add-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
}
.add-action-btn {
	display: block;
	width: 100%;
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: var(--radius);
	padding: 10px 8px;
	cursor: pointer;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ink);
	text-align: center;
	white-space: normal;
	box-shadow: 0 2px 8px rgba(20, 28, 36, 0.06);
}
.add-action-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.add-action-btn.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--on-accent);
}

.form-modal {
	position: fixed;
	inset: 0;
	z-index: 65;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12, 16, 20, 0.55);
}
.form-modal[hidden] { display: none !important; }
.form-modal-card {
	position: relative;
	width: min(520px, 100%);
	max-height: min(88vh, 720px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	background: var(--surface-soft);
	color: var(--ink);
	box-shadow: var(--shadow);
}
.form-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px 12px;
	border-bottom: 1px solid var(--line);
	flex-shrink: 0;
}
.form-modal-header strong {
	font-family: var(--display);
	font-size: 1.2rem;
	line-height: 1.2;
	padding-right: 28px;
}
.form-modal-body {
	overflow: auto;
	padding: 16px 18px 22px;
	min-height: 0;
}
.form-modal .entry-modal-close {
	position: static;
	flex-shrink: 0;
}

.docs-modal {
	position: fixed;
	inset: 0;
	z-index: 75;
	padding: 30px;
	background: rgba(12, 16, 20, 0.55);
}
.docs-modal[hidden] { display: none !important; }
.docs-modal-card {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	background: var(--surface-soft);
	color: var(--ink);
	box-shadow: var(--shadow);
}
.docs-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px 12px;
	border-bottom: 1px solid var(--line);
	flex-shrink: 0;
}
.docs-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-width: 0;
	font-size: 0.95rem;
}
.docs-crumbs button {
	border: 0;
	background: transparent;
	padding: 0;
	color: var(--accent);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.docs-crumbs button:hover { text-decoration: underline; }
.docs-crumb-sep { color: var(--muted); }
.docs-crumb-current {
	font-weight: 700;
	color: var(--ink);
}
.docs-modal-header .entry-modal-close { position: static; flex-shrink: 0; }
.docs-modal-body {
	flex: 1;
	overflow: auto;
	padding: 22px 28px 32px;
	min-height: 0;
}
.docs-modal-body h1 {
	font-family: var(--display);
	font-size: 1.8rem;
	line-height: 1.2;
	margin: 0 0 16px;
}
.docs-modal-body h2 {
	font-family: var(--display);
	font-size: 1.3rem;
	margin: 1.3em 0 0.45em;
}
.docs-modal-body p,
.docs-modal-body li { line-height: 1.55; }
.docs-lead { margin: 0 0 18px; line-height: 1.55; }
.docs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.docs-list button {
	width: 100%;
	text-align: left;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink);
	border-radius: var(--radius);
	padding: 12px 14px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.docs-list button:hover { border-color: var(--accent); color: var(--accent); }
.docs-modal-body a { color: var(--accent); }

.panel-close {
	display: none;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: var(--muted);
}

.panel-body {
	flex: 1;
	overflow: auto;
	padding: 12px 10px 16px;
	min-height: 0;
}
.panel-body-member {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}
.member-main {
	flex: 1;
	overflow: auto;
	padding: 12px 10px 16px;
	min-height: 0;
}

.view-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}
.view-heading strong {
	font-family: var(--display);
	font-size: 1.05rem;
}

.profile-bar {
	position: relative;
	z-index: 8;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 8px;
	border-top: 1px solid var(--line);
	background: var(--surface-soft);
}
.profile-bar-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.theme-toggle-btn,
.profile-avatar-btn {
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 0;
	background: var(--surface);
	color: var(--muted);
	cursor: pointer;
	overflow: hidden;
	display: grid;
	place-items: center;
	box-shadow: 0 2px 10px rgba(20, 28, 36, 0.08);
}
.theme-toggle-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.theme-icon { display: none; line-height: 0; }
html[data-theme="light"] .theme-icon-moon,
html:not([data-theme]) .theme-icon-moon { display: grid; }
html[data-theme="dark"] .theme-icon-sun { display: grid; }
.profile-avatar-btn:hover,
.profile-avatar-btn[aria-expanded="true"] {
	border-color: var(--accent);
	color: var(--accent);
}
.profile-avatar-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.profile-avatar-icon {
	display: grid;
	place-items: center;
	line-height: 0;
}

.profile-menu {
	position: absolute;
	left: 0;
	right: auto;
	bottom: calc(100% + 8px);
	z-index: 40;
	width: 250px;
	min-width: 250px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.profile-menu[hidden] { display: none !important; }
.profile-menu-name {
	padding: 10px 12px 8px;
	font-weight: 700;
	font-size: 0.95rem;
	border-bottom: 1px solid var(--line);
	margin-bottom: 4px;
	word-break: break-word;
}
.profile-menu-item {
	border: 0;
	background: transparent;
	text-align: left;
	padding: 10px 12px;
	border-radius: var(--radius);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
	cursor: pointer;
}
.profile-menu-item:hover {
	background: rgba(15, 107, 92, 0.08);
}
.profile-menu-danger {
	color: var(--danger);
}

.profile-avatar-edit {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}
.profile-avatar-preview {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--surface);
	overflow: hidden;
	display: grid;
	place-items: center;
	color: var(--muted);
	flex-shrink: 0;
}
.profile-avatar-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.profile-avatar-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}
.tab {
	flex: 1 1 auto;
	border: 1px solid var(--line);
	background: transparent;
	border-radius: var(--radius);
	padding: 8px 10px;
	cursor: pointer;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--muted);
}
.tab.is-active {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--page-bg);
}

.panel-form label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 12px;
}
.panel-form input,
.panel-form select,
.panel-form textarea {
	display: block;
	width: 100%;
	margin-top: 5px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 10px 12px;
	font: inherit;
	font-size: 0.95rem;
	background: var(--input-bg);
	color: var(--ink);
}
.panel-form textarea { resize: vertical; min-height: 72px; }
.panel-form .check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.86rem;
	font-weight: 500;
	color: var(--ink);
}
.panel-form .check input {
	width: auto;
	margin: 3px 0 0;
}

.btn-primary {
	width: 100%;
	border: 0;
	border-radius: var(--radius);
	padding: 12px 14px;
	background: var(--accent);
	color: var(--on-accent);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-danger {
	width: 100%;
	border: 1px solid var(--danger);
	border-radius: var(--radius);
	padding: 12px 14px;
	background: transparent;
	color: var(--danger);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.btn-danger:hover { background: rgba(163, 59, 43, 0.1); }
.profile-delete {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
}
.profile-delete-hint {
	margin: 8px 0 0;
	font-size: 0.82rem;
}
.btn-link {
	border: 0;
	background: none;
	color: var(--accent);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	margin: 0;
}
.btn-link:hover { text-decoration: underline; }
.auth-extra {
	margin: 10px 0 0;
	text-align: center;
}

.form-msg {
	font-size: 0.85rem;
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: var(--radius);
	background: rgba(163, 59, 43, 0.1);
	color: var(--danger);
}
.form-msg.is-ok {
	background: rgba(15, 107, 92, 0.12);
	color: var(--accent);
}
.confirm-resend {
	margin: 12px 0 0;
	text-align: center;
}
#confirmCode {
	letter-spacing: 0.35em;
	font-weight: 700;
	text-align: center;
}

.my-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.my-list li {
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
}
.my-list .word { font-weight: 700; }
.my-list .meta {
	font-size: 0.78rem;
	color: var(--muted);
	margin-top: 4px;
}
.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	background: var(--surface-muted);
	color: var(--muted);
}
.badge.ok { background: rgba(15,107,92,.15); color: var(--accent); }
.badge.wait { background: rgba(196,92,38,.15); color: var(--accent-2); }
.badge.no { background: rgba(163,59,43,.12); color: var(--danger); }
.muted { color: var(--muted); font-size: 0.9rem; }

.place-field { position: relative; }
.place-field-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}
.place-field-row input[type="text"] {
	flex: 1;
	margin-top: 0 !important;
}
.btn-map-pick {
	flex: 0 0 44px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--accent);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}
.btn-map-pick:hover,
.btn-map-pick.is-active {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}
.place-suggest {
	position: fixed;
	z-index: 80;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: var(--shadow);
	max-height: 220px;
	overflow: auto;
}
.place-suggest li {
	padding: 8px 12px;
	font-size: 0.88rem;
	cursor: pointer;
	line-height: 1.35;
}
.place-suggest li:hover,
.place-suggest li.is-active {
	background: rgba(15, 107, 92, 0.1);
}
.place-suggest li small {
	display: block;
	color: var(--muted);
	font-size: 0.75rem;
	margin-top: 2px;
}
.place-suggest.is-loading {
	overflow: hidden;
}
.place-suggest-loading,
.place-suggest-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 12px;
	cursor: default;
	color: var(--muted);
	font-size: 0.86rem;
}
.place-suggest-loading:hover,
.place-suggest-empty:hover {
	background: transparent;
}
.place-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(15, 107, 92, 0.2);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: place-spin 0.7s linear infinite;
	flex: 0 0 auto;
}
@keyframes place-spin {
	to { transform: rotate(360deg); }
}
.place-coords-hint {
	margin: 6px 0 0;
	font-size: 0.78rem;
}
.map-pick-hint {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 25;
	max-width: min(520px, calc(100vw - 28px));
	padding: 10px 16px;
	border-radius: 12px;
	background: rgba(26, 31, 36, 0.88);
	color: #fff;
	font-size: 0.9rem;
	text-align: center;
	box-shadow: var(--shadow);
	pointer-events: none;
}
body.map-pick-mode #map {
	cursor: crosshair;
}
body.map-pick-mode .btn-map-pick.is-active {
	box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.35);
}

.map-context-menu {
	position: fixed;
	z-index: 120;
	min-width: 220px;
	padding: 6px;
	border-radius: 12px;
	background: var(--surface, #fff);
	color: var(--text, #1a1f24);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
	border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
	display: flex;
	flex-direction: column;
	gap: 2px;
	pointer-events: auto;
}
.map-context-menu[hidden] {
	display: none !important;
}
.map-context-menu button {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--text);
	text-align: left;
	padding: 10px 12px;
	border-radius: 8px;
	font: inherit;
	font-size: 0.92rem;
	cursor: pointer;
}
.map-context-menu button:hover,
.map-context-menu button:focus-visible {
	background: var(--surface-2, rgba(15, 107, 92, 0.1));
	outline: none;
}
.map-context-menu button[hidden] {
	display: none !important;
}
.map-guest-tip {
	position: fixed;
	z-index: 121;
	max-width: min(320px, calc(100vw - 24px));
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(26, 31, 36, 0.92);
	color: #fff;
	font-size: 0.88rem;
	line-height: 1.35;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
	pointer-events: none;
}
.map-guest-tip[hidden] {
	display: none !important;
}
.map-cursor-debug {
	position: fixed;
	right: 12px;
	bottom: 12px;
	z-index: 130;
	max-width: min(420px, calc(100vw - 24px));
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(20, 24, 28, 0.92);
	color: #e8f0ee;
	font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}
.map-cursor-debug[hidden] {
	display: none !important;
}

.menu-toggle {
	display: none;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: none;
	cursor: pointer;
	padding: 12px 11px;
	flex-shrink: 0;
}
.menu-toggle span {
	display: block;
	height: 2px;
	background: var(--ink);
	margin: 5px 0;
	border-radius: 2px;
}

.panel-overlay {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 15;
	background: rgba(18, 24, 30, 0.35);
}

.marker-badge {
	background: var(--accent);
	color: #fff;
	border-radius: 999px;
	padding: 4px 8px;
	font-weight: 700;
	font-size: 12px;
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
	border: 2px solid #fff;
	white-space: nowrap;
}

.marker-layers-control {
	position: absolute;
	top: 16px;
	right: 60px;
	z-index: 12;
	font-family: var(--font);
}
.marker-layers-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px;
	border: 0;
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: var(--shadow);
}
.marker-layers-btn:hover { filter: brightness(1.03); }
.marker-layers-btn.is-open {
	background: var(--accent);
	color: var(--on-accent);
}
.marker-layers-caret {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}
.marker-layers-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 168px;
	padding: 8px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
	display: grid;
	gap: 4px;
}
.marker-layers-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--ink);
	user-select: none;
}
.marker-layers-item:hover {
	background: var(--surface-muted);
}
.marker-layers-item input {
	width: 16px;
	height: 16px;
	accent-color: var(--accent);
	margin: 0;
}

.slang-popup { min-width: 200px; max-width: 280px; }
.slang-popup h3 {
	margin: 0 0 8px;
	font-family: var(--display);
	font-size: 1.05rem;
}
.balloon-list {
	max-height: 240px;
	margin: 0;
	padding: 0;
	overflow: auto;
	list-style: none;
}
.balloon-entry {
	display: block;
	width: 100%;
	margin: 0;
	padding: 8px 2px;
	border: 0;
	border-top: 1px solid var(--line);
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}
.balloon-entry:hover { color: var(--accent); }
.entry-modal {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12, 16, 20, 0.55);
}
.entry-modal[hidden] { display: none !important; }
.entry-modal-card {
	position: relative;
	width: min(520px, 100%);
	max-height: min(80vh, 640px);
	overflow: auto;
	padding: 22px 22px 18px;
	border-radius: 12px;
	background: var(--surface-soft);
	color: var(--ink);
	box-shadow: var(--shadow);
}
.entry-modal-card h3 {
	margin: 0 0 8px;
	font-family: var(--display);
	font-size: 1.45rem;
}
.entry-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--ink);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.entry-modal-kicker {
	margin: 0 0 4px;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}
.entry-modal-place {
	margin: 0 0 12px;
	color: var(--muted);
}
.entry-modal-body {
	font-size: 1rem;
	line-height: 1.45;
}
.entry-modal-extra {
	margin-top: 12px;
	color: var(--muted);
	font-size: 0.92rem;
}
.entry-modal-extra .origin { margin-top: 8px; font-style: italic; }
.entry-modal-extra .author { margin-top: 8px; color: var(--accent); }
.entry-modal-body .dish-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}
.entry-modal-body .dish-photos img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 8px;
	cursor: pointer;
}

.popup-section { margin-top: 6px; }
.popup-section-title {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 8px 0 2px;
}
.dish-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}
.dish-photos img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
}
.dish-upload-field {
	margin-bottom: 12px;
}
.dish-upload-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 5px;
}
.dish-dropzone {
	border: 1.5px dashed rgba(26, 31, 36, 0.22);
	border-radius: 12px;
	padding: 16px 14px;
	text-align: center;
	background: color-mix(in srgb, var(--surface) 45%, transparent);
	transition: border-color 0.15s, background 0.15s;
	outline: none;
}
.dish-dropzone.is-dragover {
	border-color: var(--accent);
	background: rgba(15, 107, 92, 0.08);
}
.dish-dropzone.is-full {
	opacity: 0.65;
}
.dish-dropzone-title {
	margin: 0 0 4px;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ink);
}
.dish-dropzone-hint {
	margin: 0 0 12px;
	font-size: 0.78rem;
}
.btn-upload {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: var(--radius);
	padding: 10px 16px;
	background: var(--accent);
	color: var(--on-accent);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
}
.btn-upload:hover { filter: brightness(1.05); }
.btn-upload:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	filter: none;
}

.dish-photo-preview {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 10px 0 0;
}
.dish-photo-item {
	position: relative;
	aspect-ratio: 1;
	border-radius: 8px;
	border: 1px solid var(--line);
	overflow: hidden;
	background: var(--surface-muted);
	cursor: grab;
	user-select: none;
	touch-action: none;
}
.dish-photo-item.is-dragging {
	opacity: 0.45;
	cursor: grabbing;
}
.dish-photo-item.is-drag-over {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
.dish-photo-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}
.dish-photo-ord {
	position: absolute;
	top: 6px;
	left: 6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: rgba(26, 31, 36, 0.72);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}
.dish-photo-actions {
	position: absolute;
	top: 4px;
	right: 4px;
	display: flex;
	gap: 4px;
}
.dish-photo-actions button {
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: var(--radius);
	background: var(--surface-soft);
	color: var(--ink);
	font: inherit;
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.dish-photo-actions button:hover {
	background: var(--surface);
}
.dish-photo-remove {
	color: var(--danger) !important;
}

.dish-lightbox {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12, 16, 20, 0.78);
	backdrop-filter: blur(4px);
}
.dish-lightbox[hidden] { display: none !important; }
.dish-lightbox img {
	max-width: min(600px, 92vw);
	max-height: 86vh;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
	background: #111;
}
.dish-lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: var(--radius);
	background: var(--surface-soft);
	color: var(--ink);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

/* Right lexicon panel tabs */
.right-tabs {
	position: absolute;
	top: 50%;
	right: 0;
	z-index: 22;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: right .22s ease;
}
body.right-panel-open .right-tabs {
	right: var(--right-panel-w);
}
.lexicon-tab {
	position: static;
	width: 36px;
	height: 56px;
	border: 0;
	border-radius: var(--radius) 0 0 var(--radius);
	background: var(--surface);
	color: var(--ink);
	font-family: var(--display);
	font-size: 1.25rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, color .15s ease;
}
.lexicon-tab:hover { filter: brightness(1.05); }
.lexicon-tab.is-active {
	background: var(--accent);
	color: var(--on-accent);
}
.lexicon-tab[hidden] { display: none !important; }

.lexicon-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: var(--right-panel-w);
	z-index: 21;
	background: var(--panel-bg);
	backdrop-filter: blur(10px);
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateX(105%);
	transition: transform .22s ease;
}
.lexicon-panel.is-open {
	transform: translateX(0);
}

.lexicon-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 10px;
	border-bottom: 1px solid var(--line);
}
.lexicon-title {
	font-family: var(--display);
	font-size: 1.15rem;
}
.lexicon-sub { margin: 2px 0 0; font-size: 0.78rem; }
.lexicon-close { display: block; }

.lexicon-letters {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
	max-height: 120px;
	overflow: auto;
}
.lexicon-letters button {
	min-width: 28px;
	height: 28px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0 6px;
}
.lexicon-letters button:disabled {
	opacity: 0.35;
	cursor: default;
}
.lexicon-letters button.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
.lexicon-letters button.has-words:not(.is-active):hover {
	border-color: var(--accent);
	color: var(--accent);
}

.lexicon-body {
	flex: 1;
	overflow: auto;
	padding: 8px 14px 24px;
}
.lexicon-words {
	list-style: none;
	margin: 0;
	padding: 0;
}
.lexicon-words > li {
	border-bottom: 1px solid var(--line);
}
.lexicon-word-btn {
	width: 100%;
	text-align: left;
	border: 0;
	background: none;
	padding: 12px 4px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	color: var(--ink);
}
.lexicon-word-btn:hover { color: var(--accent); }
.lexicon-word-meta {
	display: block;
	font-weight: 500;
	font-size: 0.75rem;
	color: var(--muted);
	margin-top: 2px;
}
.lexicon-word-detail {
	display: none;
	padding: 0 4px 12px;
	font-size: 0.88rem;
	color: var(--muted);
}
.lexicon-words > li.is-open .lexicon-word-detail { display: block; }
.lexicon-place-block + .lexicon-place-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lexicon-place-name { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.lexicon-origin { margin-top: 6px; font-style: italic; }
.lexicon-author { margin-top: 4px; color: var(--accent); }

@media (max-width: 860px) {
	:root { --panel-w: min(92vw, 400px); }
	.mobile-top-bar {
		display: flex;
		position: absolute;
		top: 12px;
		left: 12px;
		right: 12px;
		z-index: 30;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 8px 8px 8px 12px;
		border-radius: 12px;
		background: var(--panel-bg);
		backdrop-filter: blur(10px);
		box-shadow: var(--shadow);
	}
	.mobile-top-bar .brand {
		flex-direction: row;
		align-items: center;
		text-align: left;
		gap: 10px;
		min-width: 0;
	}
	.mobile-top-bar .brand-logo {
		width: 36px;
	}
	.mobile-top-bar .brand-name {
		font-size: 1rem;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.menu-toggle { display: block; }
	.panel-close { display: block; position: absolute; top: 12px; right: 12px; }
	.side-panel { display: none !important; }
	.mobile-menu {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(92vw, 360px);
		z-index: 28;
		background: var(--panel-bg);
		backdrop-filter: blur(10px);
		box-shadow: var(--shadow);
		overflow: hidden;
		transform: translateX(105%);
		transition: transform .22s ease;
	}
	.mobile-menu.is-open { transform: translateX(0); }
	.mobile-menu-header {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 18px 18px 14px;
		border-bottom: 1px solid var(--line);
		flex-shrink: 0;
	}
	.mobile-menu-header strong {
		font-family: var(--display);
		font-size: 1.2rem;
	}
	.mobile-menu-body {
		flex: 1;
		overflow: auto;
		padding: 16px 18px 22px;
		display: flex;
		flex-direction: column;
		gap: 18px;
		min-height: 0;
	}
	.mobile-menu-section {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}
	.mobile-menu-section[hidden] { display: none !important; }
	.mobile-menu .add-action-btn {
		font-size: 0.92rem;
		padding: 12px 14px;
		text-align: left;
	}
	.mobile-menu-profile {
		display: flex;
		flex-direction: column;
		gap: 2px;
		padding-top: 4px;
		border-top: 1px solid var(--line);
	}
	.mobile-menu-profile .profile-menu-name {
		padding: 12px 4px 10px;
		margin-bottom: 2px;
	}
	.mobile-menu-profile .profile-menu-item {
		padding: 12px 10px;
	}
	.mobile-menu-theme {
		margin-top: auto;
		padding-top: 8px;
		border-top: 1px solid var(--line);
	}
	.mobile-theme-btn {
		width: 100%;
		height: auto;
		min-height: 48px;
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 12px;
		padding: 12px 14px;
		border-radius: var(--radius);
		font: inherit;
		font-size: 0.92rem;
		font-weight: 600;
		color: var(--ink);
	}
	.mobile-theme-btn .theme-icon { flex-shrink: 0; }
	.mobile-theme-label { line-height: 1.2; }
	.panel-overlay.is-visible { display: block; z-index: 24; }
	.map-error {
		left: 14px;
		right: 14px;
		top: 78px;
	}
	.marker-layers-control {
		top: 78px;
	}
	.right-tabs {
		top: 50%;
		bottom: auto;
		right: 0;
		transform: translateY(-50%);
		flex-direction: column;
		z-index: 32;
	}
	.lexicon-tab {
		width: 48px;
		height: 48px;
		border-radius: var(--radius) 0 0 var(--radius);
	}
	body.right-panel-open .right-tabs {
		right: calc(100% - 50px);
		left: auto;
		bottom: auto;
		top: 50%;
		transform: translateY(-50%);
		flex-direction: column;
	}
	body.right-panel-open .lexicon-tab {
		border-radius: var(--radius) 0 0 var(--radius);
	}
	.lexicon-panel {
		left: auto;
		right: 0;
		width: calc(100% - 50px);
		max-width: none;
		z-index: 31;
	}
}

.landmark-comments {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--line, rgba(0,0,0,.08));
}
.landmark-comments-title {
	font-weight: 600;
	margin-bottom: 8px;
}
.landmark-comment {
	margin-bottom: 8px;
	font-size: .92rem;
}
.landmark-comment-meta {
	color: var(--muted, #777);
	font-size: .8rem;
	margin-bottom: 2px;
}
.landmark-comment-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}
.landmark-comment-form textarea {
	width: 100%;
	min-height: 64px;
	resize: vertical;
}

.lexicon-recipe { white-space: pre-wrap; margin-top: 4px; }
.lexicon-word-detail .dish-photos { margin-top: 8px; }
.lexicon-word-detail .dish-photos img { cursor: pointer; }
