﻿:root {
  --bg: #0d0f15;
  --panel-bg: rgba(12, 15, 24, 0.92);
  --text: #f2f4f8;
  --muted: #aab3c5;
  --accent: #ef3131;
  --ok: #209e4d;
  --warn: #e18900;
  --danger: #cf222e;
  --line: rgba(255, 255, 255, 0.12);
  --button: rgba(10, 13, 20, 0.85);
  --keyboard-offset: 0px;
  --crosshair-offset-y: 70px;
  --crosshair-size: 56px;
  --crosshair-line-width: 3px;
  --crosshair-color: #ef3131;
  --crosshair-glow-rgb: 239, 49, 49;
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
#map {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

body.text-size-small .panel-head h2 {
  font-size: 16px;
}

body.text-size-small .top-button,
body.text-size-small .tab-btn,
body.text-size-small .search-input,
body.text-size-small .settings-check,
body.text-size-small .settings-select,
body.text-size-small .lang-btn {
  font-size: 13px;
}

body.text-size-small .settings-select-label,
body.text-size-small .user-sub,
body.text-size-small .btn,
body.text-size-small .sheet-input,
body.text-size-small .sheet-comment,
body.text-size-small .type-option,
body.text-size-small .comments-unified,
body.text-size-small .quick-comment-btn,
body.text-size-small .meta-action-btn,
body.text-size-small .comment-text {
  font-size: 12px;
}

body.text-size-small .sheet-label,
body.text-size-small .comment-time,
body.text-size-small .comments-scroll-hint,
body.text-size-small .comment-delete-btn,
body.text-size-small .mark-delete-info .delete-caption,
body.text-size-small .icon-btn {
  font-size: 10px;
}

body.text-size-small .mark-delete-info .delete-time {
  font-size: 11px;
}

body.text-size-small .user-title {
  font-size: 14px;
}

body.text-size-small .overlay-card h1 {
  font-size: 20px;
}

body.text-size-small .overlay-card h2 {
  font-size: 16px;
}

body.text-size-small .overlay-card p {
  font-size: 13px;
}

body.text-size-large .panel-head h2 {
  font-size: 20px;
}

body.text-size-large .top-button,
body.text-size-large .tab-btn,
body.text-size-large .search-input,
body.text-size-large .settings-check,
body.text-size-large .settings-select,
body.text-size-large .lang-btn {
  font-size: 15px;
}

body.text-size-large .settings-select-label,
body.text-size-large .user-sub,
body.text-size-large .btn,
body.text-size-large .sheet-input,
body.text-size-large .sheet-comment,
body.text-size-large .type-option,
body.text-size-large .comments-unified,
body.text-size-large .quick-comment-btn,
body.text-size-large .meta-action-btn,
body.text-size-large .comment-text {
  font-size: 14px;
}

body.text-size-large .sheet-label,
body.text-size-large .comment-time,
body.text-size-large .comments-scroll-hint,
body.text-size-large .comment-delete-btn,
body.text-size-large .mark-delete-info .delete-caption,
body.text-size-large .icon-btn {
  font-size: 12px;
}

body.text-size-large .mark-delete-info .delete-time {
  font-size: 13px;
}

body.text-size-large .user-title {
  font-size: 16px;
}

body.text-size-large .overlay-card h1 {
  font-size: 24px;
}

body.text-size-large .overlay-card h2 {
  font-size: 20px;
}

body.text-size-large .overlay-card p {
  font-size: 15px;
}

body.density-compact .settings-content {
  padding: 12px;
  gap: 8px;
}

body.density-compact .settings-block {
  padding: 9px;
}

body.density-compact .settings-select-row {
  margin-top: 8px;
  gap: 5px;
}

body.density-compact .top-button {
  padding: 8px 12px;
  border-radius: 10px;
}

body.density-compact #adminButton {
  top: 58px;
}

body.density-compact .panel-head {
  padding: 14px 12px;
}

body.density-compact .panel-tools {
  padding: 10px;
  gap: 8px;
}

body.density-compact .users-list {
  padding: 10px;
  gap: 8px;
}

body.density-compact .user-card {
  padding: 10px;
}

body.density-compact .user-row {
  margin-top: 8px;
  gap: 8px;
}

body.density-compact .actions-row,
body.density-compact .tab-row,
body.density-compact .admin-menu-grid,
body.density-compact .admin-tools-row,
body.density-compact .lang-buttons,
body.density-compact .sheet-actions,
body.density-compact .quick-comments-row,
body.density-compact .type-grid,
body.density-compact .mark-compose-row,
body.density-compact .admin-add-row {
  gap: 6px;
}

body.density-compact .btn {
  padding: 7px 10px;
}

body.density-compact .type-option {
  padding: 6px 5px;
}

body.density-compact .type-option.icon-only {
  min-height: 36px;
  padding: 5px;
}

body.density-compact .bottom-sheet {
  --sheet-pad-y: 7px;
  --sheet-pad-x: 8px;
  left: 8px;
  right: 8px;
  bottom: calc(8px + var(--keyboard-offset));
}

body.density-compact .sheet-head {
  margin-bottom: 4px;
  padding: 5px var(--sheet-pad-x);
}

body.density-compact .sheet-label {
  margin: 5px 0 2px;
}

#map canvas {
  touch-action: pan-x pan-y;
}

.ol-zoom {
  top: 19% !important;
  right: 14px;
  left: auto !important;
  bottom: auto !important;
  transform: translateY(-50%);
}

body.hide-zoom-controls .ol-zoom {
  display: none !important;
}

.ol-control button {
  background: rgba(10, 13, 20, 0.9) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

#crosshair {
  pointer-events: none;
  position: fixed;
  left: 50%;
  top: calc(50% - var(--crosshair-offset-y));
  width: var(--crosshair-size);
  height: var(--crosshair-size);
  transform: translate(-50%, -50%);
  z-index: 20;
}

#crosshair span,
#crosshair::before {
  content: "";
  position: absolute;
  background: var(--crosshair-color);
  box-shadow: 0 0 16px rgba(var(--crosshair-glow-rgb), 0.8);
}

#crosshair span {
  left: 50%;
  top: 0;
  width: var(--crosshair-line-width);
  height: 100%;
  transform: translateX(-50%);
}

#crosshair::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: var(--crosshair-line-width);
  transform: translateY(-50%);
}

.top-button {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--button);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.top-icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.top-actions {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.top-actions .top-button {
  position: static;
  top: auto;
  right: auto;
  left: auto;
  width: 100%;
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminButton {
  right: auto;
  left: 16px;
  top: 66px;
}

.top-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

#placeMarkButton {
  background: #2f68ff;
  border-color: #244fd0;
  color: #ffffff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#placeMarkButton:hover {
  background: #2658dd;
  border-color: #1f49b8;
}

.panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 94vw);
  height: 100%;
  z-index: 50;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.settings-content {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.settings-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.rules-intro,
.rules-footer {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.rules-footer {
  color: var(--muted);
}

.rules-section-title {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.3;
}

.rules-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.rules-item {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.rules-inline-link {
  color: #67b7ff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

.rules-mark-legend {
  display: grid;
  gap: 8px;
}

.rules-mark-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.rules-mark-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.rules-mark-sep {
  color: var(--muted);
  font-weight: 700;
}

.rules-mark-name {
  color: var(--text);
}

.settings-label {
  margin-top: 0;
  margin-bottom: 8px;
}

.settings-help-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.notify-start-hint {
  margin-top: 10px;
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.13);
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.notify-warning-icon {
  font-size: 16px;
  line-height: 1.1;
  flex: 0 0 auto;
}

.notify-start-hint-text {
  margin: 0;
  color: #ffe6a4;
  font-size: 12px;
  line-height: 1.35;
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.settings-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #5f9dff;
  margin: 0;
}

.settings-select-row {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.settings-select-label {
  color: var(--muted);
  font-size: 13px;
}

.settings-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  padding: 9px 11px;
  outline: none;
}

.settings-select:focus {
  border-color: rgba(140, 182, 255, 0.7);
}

.lang-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lang-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  border-color: rgba(140, 182, 255, 0.7);
  background: rgba(95, 157, 255, 0.24);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel-bg);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.panel-tools {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-menu-grid .tab-btn {
  min-height: 42px;
  white-space: normal;
  line-height: 1.15;
}

#adminPanel .panel-tools > .btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-tools-row .btn {
  white-space: normal;
}

.admin-tool-wide {
  grid-column: 1 / -1;
}

.admin-divider {
  height: 1px;
  background: var(--line);
  opacity: 0.9;
}

.admin-visits-block {
  display: grid;
  gap: 8px;
}

.tab-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13px;
  padding: 8px 10px;
  cursor: pointer;
}

.panel .tab-btn,
.panel .btn {
  padding-top: 4px;
  padding-bottom: 4px;
}

.tab-btn.active {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(95, 157, 255, 0.22);
}

.search-wrap {
  display: block;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  padding: 9px 11px;
  outline: none;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: rgba(140, 182, 255, 0.7);
}

.admin-add-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-add-row .btn {
  white-space: nowrap;
}

.icon-btn {
  border: 1px solid rgba(207, 34, 46, 0.75);
  background: var(--danger);
  color: #fff;
  min-width: 96px;
  height: 34px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 0 12px;
  line-height: 1;
  cursor: pointer;
  text-transform: uppercase;
}

.icon-btn:hover {
  border-color: #b71c28;
  background: #b71c28;
}

.users-list {
  padding: 12px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.settings-panel .users-list {
  flex: 1 1 auto;
  min-height: 0;
}

.user-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.user-title {
  margin: 0 0 6px;
  font-size: 15px;
}

.user-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-link-row {
  margin-top: 6px;
}

.user-link {
  color: #a7d0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.user-link:hover {
  color: #d5e8ff;
}

.user-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid transparent;
}

.badge.ok {
  color: #a9f3c1;
  border-color: rgba(35, 180, 87, 0.5);
  background: rgba(35, 180, 87, 0.15);
}

.badge.blocked {
  color: #ffb3b3;
  border-color: rgba(207, 34, 46, 0.5);
  background: rgba(207, 34, 46, 0.2);
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.btn.block {
  background: var(--danger);
}

.btn.unblock {
  background: var(--ok);
}

.btn.delete {
  background: #8f1420;
}

.btn.secondary {
  background: var(--warn);
}

.btn.full-width {
  width: 100%;
}

.actions-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bottom-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--keyboard-offset));
  z-index: 45;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 13, 20, 0.95);
  backdrop-filter: blur(10px);
  --sheet-pad-y: 9px;
  --sheet-pad-x: 9px;
  padding: var(--sheet-pad-y) var(--sheet-pad-x);
  min-height: 46vh;
  max-height: 60vh;
  overflow: auto;
  transition: bottom 0.14s ease-out;
}

.info-sheet {
  min-height: 50vh;
  max-height: 62vh;
  --sheet-pad-y: 8px;
  --sheet-pad-x: 9px;
}

#markComposer {
  min-height: 32vh;
  max-height: 46vh;
  transition: min-height 0.14s ease-out, max-height 0.14s ease-out;
}

#filterPanel {
  min-height: 34vh;
  max-height: 52vh;
}

#areaPickerPanel {
  min-height: 24vh;
  max-height: 34vh;
}

#areaPickerStatus {
  margin-top: 7px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

body.area-selection-mode #crosshair {
  opacity: 0;
}

body.keyboard-open #markComposer {
  min-height: 28vh;
  max-height: 40vh;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: sticky;
  top: calc(-1 * var(--sheet-pad-y));
  z-index: 4;
  margin: calc(-1 * var(--sheet-pad-y)) calc(-1 * var(--sheet-pad-x)) 6px;
  padding: 6px var(--sheet-pad-x);
  background: rgba(10, 13, 20, 0.98);
  border-bottom: 1px solid var(--line);
}

.sheet-head.with-left-action .left-action {
  margin-right: auto;
}

.head-delete {
  height: 34px;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sheet-head h3 {
  margin: 0;
  font-size: 16px;
  margin-right: auto;
}

.sheet-text {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.sheet-label {
  display: block;
  margin: 6px 0 3px;
  color: var(--muted);
  font-size: 12px;
}

.sheet-meta {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 12px;
}

.compact-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.sheet-meta-inline {
  margin: 0;
}

.mark-delete-info {
  margin: 0;
  min-width: 92px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  line-height: 1.05;
  white-space: nowrap;
  flex: 0 0 auto;
}

.mark-delete-info .delete-caption {
  font-size: 10px;
  color: var(--muted);
}

.mark-delete-info .delete-time {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.main-comment-block {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
}

.mark-meta-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.meta-action-btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  height: 30px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.meta-action-btn.share {
  border-color: rgba(42, 171, 238, 0.55);
  background: rgba(42, 171, 238, 0.18);
}

.meta-action-btn.report {
  border-color: rgba(207, 34, 46, 0.6);
  background: rgba(207, 34, 46, 0.22);
}

.meta-action-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.tg-logo {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2aabee;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}

.sheet-comment {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

.sheet-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  padding: 8px;
  outline: none;
  resize: vertical;
}

.sheet-input:focus {
  border-color: rgba(140, 182, 255, 0.7);
}

.broadcast-input {
  min-height: 180px;
  resize: vertical;
}

.broadcast-stats-grid {
  display: grid;
  gap: 8px;
}

.broadcast-stat-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.broadcast-stat-row strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

#broadcastStatsStatus {
  min-height: 16px;
}

#adminVisitsResetHint {
  min-height: 16px;
}

#broadcastPhotoInput {
  width: 100%;
}

#channelPostPhotoInput {
  width: 100%;
}

.broadcast-buttons-list {
  display: grid;
  gap: 8px;
}

.broadcast-button-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.broadcast-button-row .broadcast-row-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.broadcast-button-row .btn {
  padding: 6px 10px;
}

.entry-ad-preview-wrap {
  margin-top: 8px;
}

.entry-ad-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.mark-compose-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.mark-compose-row .sheet-input {
  height: 100%;
  resize: none;
}

.compose-submit {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  padding: 8px;
  font-weight: 700;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#markTypeGrid.type-grid,
#filterTypeGrid.type-grid,
#settingsDefaultTypeGrid.type-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.type-option {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
  padding: 8px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.type-option.icon-only {
  min-height: 42px;
  padding: 6px;
}

.type-option.active {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(95, 157, 255, 0.22);
}

.type-dot {
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.type-dot-icon-only {
  width: 28px;
  height: 28px;
}

#markTypeGrid .type-option.icon-only {
  padding: 3px;
}

#markTypeGrid .type-dot-icon-only {
  width: 34px;
  height: 34px;
}

.type-dot-lg {
  width: 28px;
  height: 28px;
}

.comments-list {
  display: grid;
  gap: 8px;
  max-height: 160px;
  overflow: auto;
}

.comments-unified {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  max-height: 120px;
  overflow: auto;
  position: relative;
}

.comments-unified.is-scrollable::before,
.comments-unified.is-scrollable::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.comments-unified.is-scrollable::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(10, 13, 20, 0.9), rgba(10, 13, 20, 0));
}

.comments-unified.is-scrollable::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(10, 13, 20, 0.9), rgba(10, 13, 20, 0));
}

.comments-unified.at-top::before {
  opacity: 0;
}

.comments-unified.at-bottom::after {
  opacity: 0;
}

.comments-scroll-hint {
  margin: 4px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.comments-scroll-hint::before {
  content: "\21C5  ";
}

.comments-unified .comment-line-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.comments-unified .comment-line-row + .comment-line-row {
  margin-top: 6px;
}

.comments-unified .comment-line-row.highlight {
  background: rgba(239, 49, 49, 0.2);
  border-radius: 6px;
  padding: 1px 4px;
}

.comments-unified .comment-line-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-delete-btn {
  border: 1px solid rgba(207, 34, 46, 0.7);
  border-radius: 8px;
  background: rgba(207, 34, 46, 0.22);
  color: #fff;
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.comment-delete-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.quick-comments-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-comment-btn {
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 8px;
  cursor: pointer;
}

.quick-comment-btn.actual {
  background: var(--danger);
}

.quick-comment-btn.clean {
  background: var(--ok);
}

.quick-comment-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.quick-comment-btn.armed {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -2px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35) inset;
}

.quick-comment-hint {
  margin: 6px 2px 0;
  color: #ffd480;
  font-size: 12px;
  line-height: 1.25;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
}

.comment-time {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
}

.comment-text {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.sheet-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-mark-actions {
  margin-top: 10px;
}

.admin-mark-actions .btn {
  flex: 1 1 48%;
  min-width: 140px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 15, 0.75);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.overlay-card {
  width: min(460px, 100%);
  border-radius: 16px;
  background: rgba(11, 14, 22, 0.95);
  border: 1px solid var(--line);
  padding: 18px;
}

.overlay-card h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.overlay-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.overlay-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.4;
}

.overlay-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.overlay-actions .btn {
  min-width: 140px;
}

.overlay.overlay-variant-subscription {
  background:
    radial-gradient(120% 85% at 50% 0%, rgba(255, 190, 40, 0.18), rgba(6, 10, 15, 0.8) 62%),
    rgba(6, 10, 15, 0.78);
}

.overlay-card.overlay-card-subscription {
  position: relative;
  width: min(480px, 100%);
  padding-top: 56px;
  border-color: rgba(255, 205, 96, 0.42);
  background: linear-gradient(180deg, rgba(36, 28, 14, 0.97), rgba(11, 14, 22, 0.96));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 205, 96, 0.16);
}

.overlay-card.overlay-card-subscription::before {
  content: "!";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #2c1b00;
  background: linear-gradient(180deg, #ffdc72, #ffbe2e);
  box-shadow:
    0 0 0 1px rgba(255, 242, 205, 0.38),
    0 6px 14px rgba(255, 190, 46, 0.5);
}

.overlay-card.overlay-card-subscription h1 {
  text-align: center;
  margin-bottom: 12px;
  color: #ffe9b0;
  letter-spacing: 0.2px;
}

.overlay-card.overlay-card-subscription p {
  text-align: center;
  color: #fff3cf;
  white-space: pre-line;
  border: 1px solid rgba(255, 222, 138, 0.2);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px 10px;
}

.overlay-card.overlay-card-subscription .overlay-actions {
  display: grid;
  gap: 8px;
}

.overlay-card.overlay-card-subscription .overlay-actions .btn {
  width: 100%;
  min-width: 0;
  font-weight: 700;
}

.overlay-card.overlay-card-subscription .overlay-actions .btn.subscribe-action {
  color: #241500;
  background: linear-gradient(180deg, #ffd85c, #ffb629);
  box-shadow: 0 6px 12px rgba(255, 182, 41, 0.28);
}

.overlay-card.overlay-card-subscription .overlay-actions .btn.retry-action {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

#reportOverlay {
  z-index: 99;
}

.report-card {
  width: min(500px, 100%);
}

.entry-ad-card {
  width: min(520px, 100%);
  position: relative;
}

.entry-ad-card h2 {
  padding-right: 80px;
}

.entry-ad-overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #a61e28;
  background: #cf222e;
  color: #fff;
  border-radius: 6px;
  min-width: 0;
  height: 18px;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  cursor: pointer;
}

.entry-ad-overlay-close:hover {
  background: #b71c28;
  border-color: #91141f;
}

.entry-ad-overlay-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 10px;
}

.entry-ad-overlay-text {
  white-space: pre-wrap;
  word-break: break-word;
}

#entryAdOverlayButtons {
  display: block;
}

#entryAdOverlayButtons .btn {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
}

.report-input {
  resize: vertical;
  min-height: 100px;
  margin-top: 2px;
}

.report-actions {
  margin-top: 12px;
}

body.high-contrast {
  --bg: #000;
  --panel-bg: rgba(0, 0, 0, 0.97);
  --text: #fff;
  --muted: #f2f2f2;
  --line: rgba(255, 255, 255, 0.62);
  --button: #000;
}

body.high-contrast .ol-control button {
  border: 1px solid #fff !important;
}

body.high-contrast .type-dot,
body.high-contrast .type-dot-lg,
body.high-contrast .type-dot-icon-only {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .top-actions {
    top: 10px;
    left: 10px;
    right: 10px;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 38px;
    gap: 6px;
  }

  .top-actions .top-button {
    padding: 9px 7px;
    font-size: 12px;
  }

  .top-actions .top-icon-button {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  #adminButton {
    left: 10px;
    top: 58px;
  }

  .panel {
    width: 100vw;
  }

  .type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


