:root {
  --ink: #f6f1e7;
  --ink-soft: rgba(246, 241, 231, 0.82);
  --ink-faint: rgba(246, 241, 231, 0.62);
  --gold: #e0c48a;
  --gold-deep: #c9a45c;
  --sage: #9fc4b0;
  --shadow: rgba(6, 18, 16, 0.55);
  --stroke: rgba(246, 241, 231, 0.22);
  --panel: #0c1a16;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #081410;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.45;
}

button,
input,
a {
  font: inherit;
}

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

.layout {
  display: flex;
  height: 100%;
  min-height: 100%;
}

.panel {
  flex: 0 0 25%;
  width: 25%;
  min-width: 13.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(224, 196, 138, 0.14), transparent 46%),
    var(--panel);
  border-right: 1px solid var(--stroke);
}

.panel__header {
  padding: 1.15rem 1.15rem 0.35rem;
}

.brand {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.brand span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.search {
  padding: 0.85rem 1.15rem 0.35rem;
}

.search input {
  width: 100%;
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(246, 241, 231, 0.06);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  outline: none;
}

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

.search input:focus {
  border-color: rgba(224, 196, 138, 0.7);
  background: rgba(246, 241, 231, 0.09);
}

.panel__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 1.6rem;
  padding: 0.45rem 1.15rem 0.55rem;
}

.panel__count {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.panel__clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  font-size: 0.78rem;
}

.panel__clear:hover {
  color: var(--ink);
}

.results {
  list-style: none;
  margin: 0;
  padding: 0 0.55rem 1rem;
  overflow: auto;
  flex: 1;
}

.result {
  display: grid;
  width: 100%;
  gap: 0.12rem;
  text-align: left;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 0.8rem;
  padding: 0.7rem 0.65rem;
  cursor: pointer;
}

.result:hover,
.result.is-selected {
  background: rgba(246, 241, 231, 0.06);
  border-color: var(--stroke);
}

.result.is-selected {
  border-color: rgba(224, 196, 138, 0.45);
}

.result__date,
.result__place {
  color: var(--ink-faint);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.result__title {
  font-size: 0.95rem;
  font-weight: 500;
}

.result__more {
  margin: 0.4rem 0.7rem 0.8rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.panel__status {
  margin: 0;
  padding: 0 1.2rem 1.2rem;
  color: var(--ink-soft);
}

.panel__status[hidden] {
  display: none;
}

.filters {
  display: flex;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.75rem 0.9rem 0.9rem;
  border-top: 1px solid var(--stroke);
}

.filters__btn {
  flex: 1;
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(246, 241, 231, 0.05);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  font-size: 0.82rem;
}

.filters__btn:hover {
  border-color: rgba(224, 196, 138, 0.45);
  color: var(--ink);
}

.filters__btn[aria-pressed="true"] {
  background: rgba(224, 196, 138, 0.2);
  border-color: rgba(224, 196, 138, 0.65);
  color: var(--gold);
}

.map-wrap {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
}

#map {
  position: absolute;
  inset: 0;
  background: #0b1613;
}

.leaflet-container {
  font-family: var(--font-ui);
  background: #0b1613;
}

.leaflet-popup-content-wrapper {
  background: #12241f;
  color: var(--ink);
  border-radius: 0.9rem;
  border: 1px solid var(--stroke);
  box-shadow: 0 12px 32px var(--shadow);
}

.leaflet-popup-tip {
  background: #12241f;
}

.leaflet-popup-content {
  margin: 0.85rem 0.95rem;
  line-height: 1.4;
}

.leaflet-popup-content h2 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
}

.popup__date,
.popup__meta,
.popup__lang {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.popup__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 0;
}

.popup__links a,
.popup__more {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  padding: 0.28rem 0.7rem;
  color: var(--gold);
  text-decoration: none;
  background: rgba(246, 241, 231, 0.05);
  cursor: pointer;
}

.popup__links a:hover,
.popup__more:hover {
  border-color: rgba(224, 196, 138, 0.55);
  color: var(--ink);
}

.leaflet-bar a {
  background: #12241f;
  color: var(--ink);
  border-bottom-color: var(--stroke);
}

.leaflet-bar a:hover {
  background: #1a3029;
}

.leaflet-control-attribution {
  background: rgba(8, 20, 17, 0.78) !important;
  color: var(--ink-faint) !important;
  font-size: 0.68rem !important;
}

.leaflet-control-attribution a {
  color: var(--sage) !important;
}

@media (max-width: 520px) {
  .layout {
    flex-direction: column;
  }

  .panel {
    flex: none;
    width: 100%;
    min-width: 0;
    height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
  }

  .map-wrap {
    height: 58vh;
    flex: none;
  }
}
