:root {
  color-scheme: light;
  --forest: #073527;
  --forest-2: #0d4a38;
  --ink: #081d18;
  --muted: #6d6a61;
  --paper: #f7f3e9;
  --paper-2: #fffdf7;
  --line: rgba(8, 29, 24, 0.14);
  --line-strong: rgba(8, 29, 24, 0.28);
  --green-chip: #eef6e6;
  --blue-chip: #edf4fb;
  --brass: #c59b4b;
  --amber: #d89a00;
  --red: #b94431;
  --shadow: 0 16px 42px rgba(38, 31, 18, 0.11);
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 3%, rgba(197, 155, 75, 0.15), transparent 22%),
    linear-gradient(90deg, rgba(8, 29, 24, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(8, 29, 24, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 72px 72px, 72px 72px, auto;
  font-size: 14px;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v4-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(18px, 3vw, 52px);
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 233, 0.88);
  padding: 8px clamp(16px, 2.2vw, 30px);
  backdrop-filter: blur(18px);
}

.v4-brand,
.v4-nav,
.v4-actions {
  display: flex;
  align-items: center;
}

.v4-brand {
  gap: 12px;
  color: var(--forest);
  font-size: clamp(1.1rem, 1.65vw, 1.34rem);
}

.v4-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #f5ddb0;
  background: var(--forest);
  box-shadow: 0 12px 22px rgba(7, 53, 39, 0.18);
}

.v4-brand-mark svg {
  width: 31px;
  height: 31px;
  stroke-width: 1.35;
}

.v4-nav {
  justify-content: center;
  gap: clamp(18px, 3vw, 48px);
}

.v4-nav a,
.v4-actions button,
.v4-actions > span {
  min-height: 34px;
  color: #111f1b;
  font-size: 0.84rem;
  font-weight: 820;
}

.v4-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 3px 13px;
}

.v4-nav a::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 3px;
  background: var(--forest);
  content: "";
  opacity: 0;
}

.v4-nav a.active::after {
  opacity: 1;
}

.v4-nav svg,
.v4-actions svg,
.v4-quickbar svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.85;
}

.v4-actions {
  gap: 14px;
}

.v4-actions button {
  border: 1px solid transparent;
  background: transparent;
  padding: 0 4px;
}

.v4-actions button:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.62);
}

.v4-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  min-height: 34px;
}

.v4-language-toggle button {
  min-height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0 4px;
  color: rgba(8, 29, 24, 0.52);
  font-size: 0.84rem;
  font-weight: 880;
}

.v4-language-toggle button.active {
  color: var(--forest);
}

.v4-language-toggle span {
  color: rgba(8, 29, 24, 0.35);
  font-weight: 760;
}

.v4-shell {
  width: min(1900px, calc(100% - 56px));
  margin: 0 auto;
  padding: 16px 0 22px;
}

.v4-controls {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(210px, 290px) minmax(250px, 340px) auto;
  gap: 14px;
  align-items: center;
}

.v4-search,
.v4-select,
.v4-filter-toggle,
.v4-mobile-filter-toggle {
  display: grid;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.v4-search {
  grid-template-columns: 29px 1fr auto;
  gap: 14px;
  padding: 0 20px;
}

.v4-select {
  grid-template-columns: 24px 1fr;
  gap: 14px;
  padding: 0 16px;
}

.v4-filter-toggle {
  grid-template-columns: 22px auto;
  gap: 12px;
  color: var(--ink);
  padding: 0 18px;
  font-weight: 830;
}

.v4-mobile-filter-toggle {
  display: none;
  grid-template-columns: 18px auto;
  gap: 8px;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 850;
}

.v4-search svg,
.v4-select svg,
.v4-filter-toggle svg,
.v4-mobile-filter-toggle svg {
  width: 24px;
  height: 24px;
  color: #102620;
  stroke-width: 1.95;
}

.v4-search input,
.v4-select select,
.v4-table-footer select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.v4-search input {
  font-size: 0.96rem;
}

.v4-search input::placeholder {
  color: rgba(8, 29, 24, 0.58);
}

.v4-search kbd {
  min-width: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 253, 247, 0.92);
  padding: 4px 9px;
  color: rgba(8, 29, 24, 0.62);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  text-align: center;
}

.v4-select select {
  font-weight: 830;
}

.v4-quickbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0;
}

.v4-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v4-filter-buttons button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 253, 247, 0.64);
  padding: 0 13px;
  font-size: 0.84rem;
  font-weight: 830;
}

.v4-filter-buttons button.active,
.v4-filter-buttons button:hover {
  border-color: rgba(7, 53, 39, 0.38);
  color: #fff9ea;
  background: var(--forest);
}

.v4-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  color: #1d312b;
  font-size: 0.84rem;
}

.v4-counts span {
  color: var(--muted);
}

.v4-table-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.65);
  box-shadow: var(--shadow);
}

.v4-table-scroll {
  overflow-x: auto;
}

.v4-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
}

.v4-table th,
.v4-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
}

.v4-table th:last-child,
.v4-table td:last-child {
  border-right: 0;
}

.v4-table thead th {
  background: rgba(255, 253, 247, 0.94);
  font-size: 0.78rem;
  font-weight: 900;
}

.v4-table th:nth-child(1),
.v4-table td:nth-child(1) {
  width: 50px;
  text-align: center;
}

.v4-table th:nth-child(2),
.v4-table td:nth-child(2) {
  width: 118px;
}

.v4-table th:nth-child(3),
.v4-table td:nth-child(3) {
  width: 132px;
}

.v4-table th:nth-child(4),
.v4-table td:nth-child(4) {
  width: 34%;
}

.v4-table th:nth-child(5),
.v4-table td:nth-child(5) {
  width: 140px;
}

.v4-table th:nth-child(6),
.v4-table td:nth-child(6) {
  width: 118px;
}

.v4-table th:nth-child(7),
.v4-table td:nth-child(7) {
  width: 116px;
}

.v4-table th:nth-child(8),
.v4-table td:nth-child(8) {
  width: 118px;
}

.v4-table th:nth-child(9),
.v4-table td:nth-child(9) {
  width: 90px;
}

.v4-table th button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  color: inherit;
  background: transparent;
  padding: 0;
  font-weight: inherit;
}

.v4-table th button::after {
  color: rgba(8, 29, 24, 0.54);
  content: "↕";
  font-size: 0.75rem;
}

.v4-table th button.active::after {
  color: var(--forest);
  content: "↓";
}

.v4-row {
  background: rgba(255, 253, 247, 0.44);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.v4-row:hover,
.v4-row.selected {
  background: rgba(255, 253, 247, 0.84);
}

.v4-row.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--forest);
}

.v4-section-row td {
  width: auto;
  border-right: 0;
  background: rgba(238, 234, 222, 0.92);
  padding: 9px 12px;
  text-align: left;
}

.v4-section-row td,
.v4-section-row button {
  color: #102620;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v4-section-row td > span,
.v4-section-row button span {
  margin-right: 8px;
}

.v4-section-row strong {
  display: inline-grid;
  min-width: 24px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(7, 53, 39, 0.11);
  color: var(--forest);
  font-size: 0.7rem;
}

.v4-section-row.today td {
  background: rgba(204, 237, 222, 0.88);
}

.v4-section-row.past td {
  padding: 0;
  background: rgba(226, 220, 207, 0.82);
}

.v4-section-row.past button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  text-align: left;
}

.v4-section-row.past button::after {
  margin-left: auto;
  color: rgba(8, 29, 24, 0.58);
  content: "▾";
  font-size: 0.8rem;
}

.v4-section-row.past button[aria-expanded="false"]::after {
  content: "▸";
}

.v4-section-row small {
  color: rgba(8, 29, 24, 0.58);
  font-size: 0.66rem;
  font-weight: 840;
  letter-spacing: 0;
  text-transform: none;
}

.v4-section-empty td {
  width: auto;
  border-right: 0;
  background: rgba(255, 253, 247, 0.38);
  color: var(--muted);
  padding: 18px 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 780;
}

.v4-index {
  color: #142a24;
  font-weight: 720;
}

.v4-date strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 520;
  line-height: 1;
  letter-spacing: -0.03em;
}

.v4-date span {
  display: inline-block;
  margin-top: 3px;
  color: #243b35;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.v4-date small,
.v4-city small,
.v4-mode small,
.v4-reg small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 690;
}

.v4-city strong,
.v4-mode strong,
.v4-reg strong {
  display: block;
  color: #081d18;
  font-size: 0.84rem;
  font-weight: 840;
}

.v4-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.v4-title button {
  width: fit-content;
  max-width: 100%;
  border: 0;
  color: var(--forest);
  background: transparent;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.18;
  text-align: left;
}

.v4-new-badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  width: fit-content;
  margin-top: 6px;
  border: 1px solid rgba(185, 68, 49, 0.22);
  border-radius: 999px;
  background: rgba(185, 68, 49, 0.1);
  color: var(--red);
  padding: 2px 7px;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
}

.v4-title span {
  color: #4e5149;
  font-size: 0.74rem;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.v4-chip-row,
.v4-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v4-chip {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  border: 1px solid rgba(7, 53, 39, 0.14);
  border-radius: 5px;
  background: var(--green-chip);
  padding: 2px 7px;
  color: #0b2d22;
  font-size: 0.66rem;
  font-weight: 840;
}

.v4-chip.blue {
  background: var(--blue-chip);
  color: #15314f;
}

.v4-chip.muted {
  background: rgba(8, 29, 24, 0.045);
  color: rgba(8, 29, 24, 0.52);
}

.v4-source-links a,
.v4-source-links span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 253, 247, 0.78);
  padding: 4px 9px;
  color: #102620;
  font-size: 0.72rem;
  font-weight: 850;
}

.v4-source-links span {
  color: rgba(8, 29, 24, 0.45);
}

.v4-detail-row td {
  padding: 0;
  background: rgba(255, 253, 247, 0.78);
}

.v4-detail {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(500px, 1fr) auto;
  align-items: start;
  gap: 14px 22px;
  border-top: 2px solid var(--forest);
  padding: 11px 22px 13px 62px;
}

.v4-detail-info {
  display: -webkit-box;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: #394039;
  padding: 0;
  font-size: 0.8rem;
  font-family: inherit;
  line-height: 1.38;
  min-height: calc(0.8rem * 1.38 * 3);
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  cursor: pointer;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.v4-detail-info:focus-visible {
  outline: 3px solid rgba(7, 53, 39, 0.22);
  outline-offset: 4px;
}

.v4-detail strong {
  color: var(--ink);
}

.v4-detail dl {
  display: grid;
  grid-template-columns: minmax(108px, max-content) minmax(0, 1fr);
  gap: 5px 12px;
  margin: 0;
}

.v4-detail dt {
  color: rgba(8, 29, 24, 0.55);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v4-detail dd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: #25332f;
  font-size: 0.78rem;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-detail dd span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-map-link {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(7, 53, 39, 0.18);
  border-radius: 5px;
  background: rgba(255, 253, 247, 0.72);
  color: var(--forest);
}

.v4-map-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.v4-detail-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.v4-detail-links {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
  justify-content: flex-end;
}

.v4-detail-links a,
.v4-report-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 860;
}

.v4-report-button {
  justify-content: center;
  justify-self: end;
  max-width: 132px;
  border-color: rgba(185, 68, 49, 0.34);
  color: #fff9ea;
  background: var(--red);
}

.v4-report-modal[hidden] {
  display: none;
}

.v4-info-modal[hidden] {
  display: none;
}

.v4-report-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.v4-info-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

.v4-report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 29, 24, 0.42);
}

.v4-info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 29, 24, 0.36);
  backdrop-filter: blur(5px);
}

.v4-report-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(520px, 100%);
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
  padding: 20px;
}

.v4-info-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(620px, 100%);
  max-height: min(74vh, 620px);
  gap: 16px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
  padding: 22px;
}

.v4-report-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.v4-info-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.v4-report-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.v4-info-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.v4-report-header h2 {
  margin: 0;
  color: var(--forest);
  font-size: 1.35rem;
  line-height: 1.1;
}

.v4-info-header h2 {
  margin: 0;
  color: var(--forest);
  font-size: 1.35rem;
  line-height: 1.15;
}

.v4-report-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffef9;
  color: var(--forest);
  font-size: 1.3rem;
  line-height: 1;
}

.v4-info-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffef9;
  color: var(--forest);
  font-size: 1.3rem;
  line-height: 1;
}

.v4-info-body {
  margin: 0;
  color: #26352f;
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.v4-report-intro {
  margin: 0;
  color: #33433d;
}

.v4-report-field {
  display: grid;
  gap: 7px;
  color: var(--forest);
  font-weight: 820;
}

.v4-report-field textarea {
  width: 100%;
  min-height: 134px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: 0;
  background: #fffef9;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 650;
}

.v4-report-field textarea:focus {
  border-color: rgba(7, 53, 39, 0.52);
  box-shadow: 0 0 0 3px rgba(7, 53, 39, 0.11);
}

.v4-report-status {
  min-height: 1.1em;
  margin: 0;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 760;
}

.v4-report-status.success {
  color: var(--forest-2);
}

.v4-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.v4-report-secondary,
.v4-report-primary {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 860;
}

.v4-report-secondary {
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--forest);
}

.v4-report-primary {
  background: var(--forest);
  color: #fff9ea;
}

.v4-report-primary:disabled,
.v4-report-field textarea:disabled {
  cursor: wait;
  opacity: 0.72;
}

.v4-loading,
.v4-empty {
  height: 190px;
  text-align: center;
}

.v4-empty strong,
.v4-empty span {
  display: block;
}

.v4-empty strong {
  font-size: 1.1rem;
}

.v4-empty span {
  margin-top: 6px;
  color: var(--muted);
}

.v4-table-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: rgba(247, 243, 233, 0.82);
  padding: 9px 14px;
  color: #25332f;
  font-size: 0.8rem;
}

.v4-table-footer label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.v4-table-footer select {
  min-height: 28px;
  width: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-2);
  padding: 0 10px;
  font-weight: 830;
}

.v4-chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.v4-chat-toggle,
.v4-chat-send,
.v4-chat-clear,
.v4-chat-close {
  border: 0;
  font-weight: 900;
}

.v4-chat-toggle {
  position: relative;
  display: grid;
  width: 70px;
  height: 70px;
  min-height: 70px;
  place-items: center;
  border: 1px solid rgba(8, 29, 24, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.96);
  padding: 6px;
  box-shadow: 0 18px 38px rgba(7, 53, 39, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.v4-chat-toggle:hover,
.v4-chat-toggle[aria-expanded="true"] {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(7, 53, 39, 0.28);
}

.v4-chat-toggle::before,
.v4-chat-toggle::after {
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.v4-chat-toggle::before {
  z-index: 1;
  width: 10px;
  height: 10px;
  transform: translate(4px, -50%) rotate(45deg);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--paper-2);
  content: "";
}

.v4-chat-toggle::after {
  z-index: 2;
  min-width: max-content;
  transform: translate(4px, -50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  box-shadow: 0 12px 26px rgba(38, 31, 18, 0.14);
  color: var(--forest);
  content: attr(data-tooltip);
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.v4-chat-toggle:hover::before,
.v4-chat-toggle:hover::after,
.v4-chat-toggle:focus-visible::before,
.v4-chat-toggle:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.v4-chat-toggle-icon {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.v4-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(170px, 1fr) auto;
  width: min(410px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 116px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 24px 64px rgba(38, 31, 18, 0.22);
}

.v4-chat-panel[hidden] {
  display: none;
}

.v4-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 246, 230, 0.82);
  padding: 14px;
}

.v4-chat-header h2 {
  margin: 0;
  font-size: 1rem;
}

.v4-chat-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.v4-chat-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: start;
  gap: 8px;
}

.v4-chat-clear,
.v4-chat-close {
  background: var(--paper-2);
  color: var(--forest);
}

.v4-chat-clear {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.v4-chat-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  font-size: 1.25rem;
}

.v4-chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
}

.v4-chat-message {
  min-width: 0;
  max-width: 92%;
  overflow-wrap: anywhere;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.v4-chat-message a {
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration: underline;
}

.v4-chat-message .chat-md-paragraph {
  margin: 0;
}

.v4-chat-message .chat-md-heading {
  margin: 0 0 8px;
  font-size: 0.98rem;
  line-height: 1.25;
}

.v4-chat-message .chat-md-card {
  display: grid;
  gap: 7px;
  margin-top: 9px;
  border: 1px solid rgba(8, 29, 24, 0.12);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.72);
  padding: 10px;
}

.v4-chat-message .chat-md-card:first-child {
  margin-top: 0;
}

.v4-chat-message .chat-md-card h3 {
  margin: 0;
  color: var(--forest);
  font-size: 0.96rem;
  line-height: 1.25;
}

.v4-chat-message .chat-md-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.v4-chat-message .chat-md-field span {
  color: rgba(8, 29, 24, 0.56);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.v4-chat-message .chat-md-field p {
  margin: 0;
  min-width: 0;
}

.v4-chat-message code {
  border-radius: 4px;
  background: rgba(8, 29, 24, 0.08);
  padding: 1px 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.v4-chat-message-user {
  justify-self: end;
  color: #fff9ea;
  background: var(--forest);
}

.v4-chat-message-assistant {
  justify-self: start;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(247, 243, 233, 0.92);
}

.v4-chat-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 14px;
}

.v4-chat-form textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: 0;
  background: #fffef9;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.v4-chat-send {
  min-height: 40px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff9ea;
  padding: 9px 14px;
}

.v4-chat-send:disabled,
.v4-chat-form textarea:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 1180px) {
  .v4-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .v4-nav,
  .v4-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .v4-controls {
    grid-template-columns: 1fr 1fr;
  }

  .v4-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body {
    font-size: 13px;
  }

  .v4-shell {
    width: min(100% - 20px, 1900px);
    min-width: 0;
    padding-top: 10px;
  }

  .v4-topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 9px 10px;
  }

  .v4-brand {
    grid-column: 1;
  }

  .v4-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .v4-nav {
    grid-column: 1 / -1;
  }

  .v4-nav,
  .v4-actions {
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: visible;
  }

  .v4-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
  }

  .v4-search {
    grid-column: 1;
  }

  .v4-mobile-filter-toggle {
    display: grid;
    grid-column: 2;
    grid-template-columns: 18px auto;
    min-height: 42px;
    white-space: nowrap;
  }

  .v4-select,
  .v4-filter-toggle,
  .v4-filter-buttons {
    display: none;
  }

  .v4-shell.filters-open .v4-select,
  .v4-shell.filters-open .v4-filter-toggle {
    display: grid;
  }

  .v4-shell.filters-open .v4-filter-buttons {
    display: flex;
  }

  .v4-select {
    grid-column: auto;
  }

  .v4-filter-toggle {
    grid-column: 1 / -1;
  }

  .v4-search,
  .v4-select,
  .v4-filter-toggle,
  .v4-mobile-filter-toggle {
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  .v4-search {
    grid-template-columns: 22px minmax(0, 1fr);
    padding: 0 14px;
  }

  .v4-select,
  .v4-filter-toggle {
    padding: 0 14px;
  }

  .v4-select {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 10px;
  }

  .v4-select svg {
    display: none;
  }

  .v4-filter-toggle svg,
  .v4-mobile-filter-toggle svg,
  .v4-search svg {
    width: 20px;
    height: 20px;
  }

  .v4-select select {
    font-size: 16px;
  }

  .v4-search input,
  .v4-chat-form textarea {
    font-size: 16px;
  }

  .v4-controls {
    gap: 10px;
  }

  .v4-search kbd {
    display: none;
  }

  .v4-quickbar {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
    margin: 8px 0;
  }

  .v4-filter-buttons {
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
    gap: 8px;
    padding-bottom: 0;
  }

  .v4-filter-buttons button {
    flex: 1 1 calc(25% - 8px);
    justify-content: center;
    min-width: 0;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .v4-counts {
    justify-content: flex-start;
  }

  .v4-table-scroll {
    max-width: 100%;
    overflow-x: visible;
  }

  .v4-table,
  .v4-table thead,
  .v4-table tbody,
  .v4-table tr,
  .v4-table th,
  .v4-table td {
    display: block;
  }

  .v4-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
  }

  .v4-table thead {
    display: none;
  }

  .v4-table tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  .v4-table th,
  .v4-table td {
    border: 0;
  }

  .v4-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 4px 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--forest);
    border-radius: 8px;
    background: rgba(255, 253, 247, 0.8);
    padding: 9px;
  }

  .v4-row:hover,
  .v4-row.selected {
    background: rgba(255, 253, 247, 0.95);
  }

  .v4-row.selected {
    border-color: rgba(7, 53, 39, 0.34);
    border-left-color: var(--forest);
  }

  .v4-row.selected td:first-child {
    border-left: 0;
  }

  .v4-table .v4-row td {
    min-width: 0;
    width: auto;
    padding: 0;
  }

  .v4-row td:nth-child(1) {
    display: none;
  }

  .v4-row td:nth-child(2) {
    grid-column: 1;
    grid-row: 1 / span 3;
    display: block;
    border-right: 1px solid rgba(8, 29, 24, 0.12);
    padding-right: 8px;
  }

  .v4-row td:nth-child(4) {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .v4-row td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .v4-row td:nth-child(5) {
    grid-column: 2 / -1;
    grid-row: 3;
  }

  .v4-row td:nth-child(n+6) {
    display: none;
  }

  .v4-row td:nth-child(n+6) > * {
    min-width: 0;
  }

  .v4-row td:nth-child(n+6)::before {
    content: none;
  }

  .v4-date strong {
    display: block;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
  }

  .v4-date span {
    display: block;
    margin-top: 2px;
    font-size: 0.57rem;
    line-height: 1.15;
  }

  .v4-title button {
    width: 100%;
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .v4-title {
    gap: 3px;
  }

  .v4-title span,
  .v4-city small,
  .v4-mode small,
  .v4-reg small {
    font-size: 0.68rem;
  }

  .v4-chip-row,
  .v4-source-links {
    justify-content: flex-start;
  }

  .v4-mode,
  .v4-reg {
    text-align: right;
  }

  .v4-table .v4-detail-row td {
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
  }

  .v4-detail {
    grid-template-columns: 1fr;
    gap: 9px;
    margin: -3px 8px 8px;
    border: 1px solid rgba(7, 53, 39, 0.22);
    border-top: 2px solid var(--forest);
    border-radius: 0 0 8px 8px;
    background: rgba(255, 253, 247, 0.9);
    padding: 9px;
  }

  .v4-detail-info {
    width: 100%;
    min-height: auto;
    text-align: left;
  }

  .v4-detail dl {
    width: 100%;
    grid-template-columns: minmax(80px, max-content) minmax(0, 1fr);
    gap: 5px 10px;
  }

  .v4-detail dd {
    display: block;
    min-width: 0;
    text-align: left;
    white-space: normal;
  }

  .v4-map-link {
    margin-left: 8px;
  }

  .v4-detail-actions {
    justify-items: start;
    width: 100%;
  }

  .v4-detail-links {
    justify-content: flex-start;
  }

  .v4-report-button {
    justify-self: start;
    max-width: none;
  }

  .v4-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .v4-chat-widget {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    max-width: calc(100vw - 28px);
  }

  .v4-chat-panel {
    width: 100%;
    max-height: min(620px, calc(100svh - 28px));
    border-radius: 14px;
  }

  .v4-chat-form textarea {
    min-height: 112px;
  }

  .v4-report-modal {
    align-items: end;
    padding: 12px;
  }

  .v4-report-dialog {
    padding: 16px;
  }

  .v4-report-actions {
    display: grid;
  }
}
