:root {
  --ink: #0b0608;
  --ink-soft: #120a0e;
  --card: #160c11;
  --card-2: #1c1016;
  --wine: #5b1226;
  --wine-2: #7d1832;
  --wine-bright: #a02345;
  --gold: #c9a46a;
  --gold-soft: #e4c99a;
  --cream: #f3e8db;
  --muted: #b9a79c;
  --muted-2: #8d7b72;
  --line: rgba(201, 164, 106, 0.16);
  --line-strong: rgba(201, 164, 106, 0.34);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 82% -10%, rgba(123, 24, 50, 0.32), transparent 65%),
    radial-gradient(900px 540px at 4% 18%, rgba(91, 18, 38, 0.26), transparent 60%),
    radial-gradient(760px 460px at 50% 100%, rgba(201, 164, 106, 0.05), transparent 70%),
    var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: rgba(160, 35, 69, 0.55);
  color: #fff;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.5'/></svg>");
}

.boot-error {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 2000;
  transform: translateX(-50%);
  max-width: min(92vw, 720px);
  padding: 11px 15px;
  border: 1px solid rgba(220, 120, 120, 0.55);
  border-radius: 10px;
  background: #3a1519;
  color: #ffe8e8;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.wrap {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 0 30px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 520px;
  padding: 40px 0 46px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__image {
  position: absolute;
  inset: 0;
  background-image: url("/assets/wine-cellar-hero.webp");
  background-size: cover;
  background-position: center 58%;
  opacity: 0.62;
  transform: scale(1.02);
  animation: heroDrift 24s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 6, 8, 0.96) 0%, rgba(11, 6, 8, 0.78) 48%, rgba(11, 6, 8, 0.28) 100%),
    linear-gradient(180deg, rgba(11, 6, 8, 0.55) 0%, transparent 28%, rgba(11, 6, 8, 0.88) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 430px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand__mark {
  width: 26px;
  height: 26px;
}

.hero__copy {
  max-width: 760px;
  margin-top: auto;
  padding-top: 52px;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 6.6vw, 86px);
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
}

.hero__lead {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.hero__inner > * {
  animation: rise 0.85s ease both;
}

.hero__copy {
  animation-delay: 0.08s;
}

.hero__stats {
  position: absolute;
  right: 0;
  bottom: 8px;
  display: flex;
  gap: 26px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 10, 14, 0.55);
  backdrop-filter: blur(14px);
}

.stat {
  min-width: 74px;
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  color: var(--cream);
}

.stat span {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero__ornament {
  position: absolute;
  right: 3%;
  top: 50%;
  width: 260px;
  height: 260px;
  color: var(--gold);
  opacity: 0.28;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.hero__ornament svg {
  width: 100%;
  height: 100%;
  animation: slowSpin 90s linear infinite;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--wine {
  color: #fff7ee;
  background: linear-gradient(145deg, var(--wine-2), var(--wine));
  border-color: rgba(228, 201, 154, 0.32);
  box-shadow: 0 10px 24px rgba(91, 18, 38, 0.34);
}

.btn--wine:hover {
  background: linear-gradient(145deg, #92203d, #68152b);
  box-shadow: 0 12px 30px rgba(160, 35, 69, 0.36);
}

.btn--wine:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

.btn--ghost {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--gold);
}

.btn--small {
  height: 40px;
  padding: 0 16px;
  font-size: 11px;
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(201, 164, 106, 0.18);
  color: var(--gold-soft);
  font-size: 10px;
}

.refresh {
  max-width: 430px;
  margin-top: 18px;
  opacity: 0.95;
}

.refresh__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}

.refresh__pct {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.refresh__track {
  position: relative;
  height: 2px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(201, 164, 106, 0.16);
}

.refresh__bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--wine-bright), var(--gold));
  transition: width 0.45s ease;
}

.refresh__track.is-active .refresh__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 1.6s linear infinite;
}

.refresh__cooldown {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.alert {
  max-width: 560px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(190, 60, 80, 0.4);
  border-radius: 12px;
  background: rgba(120, 24, 44, 0.22);
  color: #f0d3d8;
  font-size: 12px;
  line-height: 1.45;
}

.alert--warn {
  border-color: rgba(201, 164, 106, 0.34);
  background: rgba(201, 164, 106, 0.1);
  color: var(--gold-soft);
}

/* ---------- toolbar ---------- */

.main {
  padding-top: 26px;
  padding-bottom: 60px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 20px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.segmented button {
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.segmented button.is-active {
  color: #fff4e8;
  background: linear-gradient(145deg, var(--wine-2), var(--wine));
  box-shadow: 0 4px 14px rgba(91, 18, 38, 0.4);
}

.period {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--cream);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 164, 106, 0.08);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.period__label {
  min-width: 210px;
  text-align: center;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-transform: capitalize;
}

.today-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.today-btn:hover {
  color: var(--gold-soft);
  border-color: var(--gold);
}

.toolbar__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 0 18px;
}

.price-filter,
.time-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.price-filter__label {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-filter input,
.time-filter input {
  width: 62px;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--cream);
  font-size: 11px;
  text-align: center;
  outline: none;
}

.price-filter input:focus,
.time-filter input:focus {
  box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.22);
}

.price-filter input[type='number']::-webkit-outer-spin-button,
.price-filter input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-filter input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.time-filter input[type='number']::-webkit-outer-spin-button,
.time-filter input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.time-filter input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.price-filter__dash {
  color: var(--muted-2);
  font-size: 10px;
}

.filters .link-btn {
  margin-left: 2px;
  font-size: 10px;
}

.source-filter {
  position: relative;
}

.source-filter__summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--cream);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.source-filter__summary::-webkit-details-marker {
  display: none;
}

.source-filter__summary svg {
  width: 11px;
  height: 8px;
  color: var(--muted-2);
  transition: transform 0.18s ease;
}

.source-filter[open] .source-filter__summary {
  border-color: rgba(201, 164, 106, 0.42);
}

.source-filter[open] .source-filter__summary svg {
  transform: rotate(180deg);
  color: var(--gold);
}

.source-filter.has-hidden .source-filter__summary {
  border-color: rgba(201, 164, 106, 0.42);
  color: var(--gold-soft);
}

.source-filter__count {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.source-filter__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 260px;
  max-width: min(340px, 86vw);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #1a0f14;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.source-filter__option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--cream);
  font-size: 11.5px;
  cursor: pointer;
}

.source-filter__option:hover {
  background: rgba(201, 164, 106, 0.08);
}

.source-filter__option input {
  accent-color: var(--wine-2);
}

.source-filter__handle {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 10px;
}

.source-filter__empty {
  padding: 8px 9px;
  color: var(--muted-2);
  font-size: 11px;
}

.only-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  cursor: pointer;
  user-select: none;
}

.only-time input {
  accent-color: var(--wine-2);
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
}

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 26px;
  align-items: start;
}

.calendar-card,
.day-panel,
.map-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(18, 10, 14, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.calendar-card {
  padding: 18px;
  overflow: hidden;
}

.day-panel {
  position: sticky;
  top: 20px;
  min-height: 320px;
  padding: 20px;
}

/* ---------- month ---------- */

.weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekdays {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.weekdays span {
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.calendar__grid {
  gap: 1px;
  margin-top: 1px;
}

.day-cell {
  position: relative;
  min-height: 134px;
  padding: 10px 9px 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background 0.18s ease;
}

.day-cell:hover {
  background: rgba(255, 255, 255, 0.035);
}

.day-cell.is-out {
  opacity: 0.32;
}

.day-cell.is-today .day-cell__num {
  color: var(--gold-soft);
}

.day-cell.is-today::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(201, 164, 106, 0.38);
  border-radius: 10px;
  pointer-events: none;
}

.day-cell.is-selected {
  background: linear-gradient(165deg, rgba(123, 24, 50, 0.55), rgba(91, 18, 38, 0.22));
  box-shadow: inset 0 0 0 1px rgba(201, 164, 106, 0.34);
}

.day-cell__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cream);
}

.day-cell__chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 3px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(201, 164, 106, 0.09);
  border-left: 2px solid var(--wine-bright);
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip__time {
  flex: none;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}

.chip__title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip--more {
  border-left-color: transparent;
  background: transparent;
  color: var(--muted-2);
  font-size: 9.5px;
}

.day-cell__dots {
  display: none;
  gap: 3px;
  margin-top: 7px;
  padding-left: 2px;
}

.day-cell__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--wine-bright);
}

/* ---------- week ---------- */

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

.week__day {
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.week__day.is-today {
  border-color: rgba(201, 164, 106, 0.34);
}

.week__day.is-selected {
  background: linear-gradient(170deg, rgba(123, 24, 50, 0.34), rgba(91, 18, 38, 0.08));
  border-color: rgba(201, 164, 106, 0.4);
}

.week__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.week__wd {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.week__num {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--cream);
}

.week__list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.week-event {
  display: block;
  width: 100%;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  background: rgba(201, 164, 106, 0.07);
  text-align: left;
  transition: background 0.18s ease;
}

.week-event:hover {
  background: rgba(160, 35, 69, 0.28);
}

.week-event__time {
  display: block;
  color: var(--gold);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.week-event__title {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--cream);
}

.week-event__title .badge-ai {
  margin-left: 4px;
  padding: 0 4px;
  font-size: 7.5px;
  vertical-align: 1px;
}

.week-event__title .badge-hidden {
  margin-left: 4px;
  padding: 0 4px;
  font-size: 7.5px;
  vertical-align: 1px;
}

.week-event__price {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted-2);
}

.week__empty {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

/* ---------- day panel ---------- */

.day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.day-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: capitalize;
}

.day-head p {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.day-head__count {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 11px;
}

.agenda {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 15px 4px;
  border: 0;
  border-bottom: 1px solid rgba(201, 164, 106, 0.1);
  background: transparent;
  text-align: left;
  transition: background 0.18s ease, padding-left 0.18s ease;
}

.agenda-item:hover,
.agenda-item.is-active {
  padding-left: 9px;
  background: linear-gradient(90deg, rgba(160, 35, 69, 0.16), transparent);
}

.agenda-item__time {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.agenda-item__time small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.agenda-item__title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cream);
}

.agenda-item__meta {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

.agenda-item__price {
  margin-top: 2px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--gold);
}

.empty-day {
  padding: 38px 10px 20px;
  text-align: center;
}

.empty-day svg {
  width: 46px;
  height: 46px;
  color: var(--gold);
  opacity: 0.55;
}

.empty-day p {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 19px;
}

.empty-day small {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 11px;
}

/* ---------- map ---------- */

.map-card {
  margin-top: 22px;
  padding: 20px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 16px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.map-chips {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.pill {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--gold-soft);
}

.map {
  position: relative;
  height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d090b;
  cursor: grab;
  touch-action: none;
}

.map.is-dragging {
  cursor: grabbing;
}

.map__tiles,
.map__markers {
  position: absolute;
  inset: 0;
}

.map__tiles img {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  pointer-events: none;
  filter: invert(0.94) hue-rotate(180deg) brightness(0.72) contrast(1.02) saturate(0.55);
  opacity: 0.92;
}

.map__markers {
  pointer-events: none;
}

.marker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid rgba(228, 201, 154, 0.55);
  border-radius: 999px;
  background: linear-gradient(160deg, #7d1832, #4a0e1e);
  color: #fff2e4;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 7px;
  height: 7px;
  background: inherit;
  border-right: 1px solid rgba(228, 201, 154, 0.45);
  border-bottom: 1px solid rgba(228, 201, 154, 0.45);
  transform: translateX(-50%) rotate(45deg);
}

.marker:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.marker.is-active {
  background: linear-gradient(160deg, var(--gold-soft), #c9a46a);
  color: #2b0a13;
  box-shadow: 0 0 0 4px rgba(201, 164, 106, 0.2), 0 10px 24px rgba(0, 0, 0, 0.55);
  z-index: 3;
}

.marker__price {
  opacity: 0.68;
  font-size: 8.5px;
  font-weight: 500;
}

.map__controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.map__controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(14, 8, 11, 0.88);
  color: var(--cream);
  font-size: 18px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.map__controls button:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.map__controls svg {
  width: 17px;
  height: 17px;
}

.map__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(11, 6, 8, 0.72);
  text-align: center;
  z-index: 4;
}

.map__empty span {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--cream);
}

.map__empty small {
  color: var(--muted-2);
  font-size: 11px;
}

.map__attribution {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 4;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(11, 6, 8, 0.7);
  color: var(--muted-2);
  font-size: 8px;
  text-decoration: none;
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
}

.footer__mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-soft);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer__mark svg {
  width: 22px;
  height: 22px;
}

.footer p {
  margin: 0;
}

/* ---------- drawer ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 3, 4, 0.34);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.backdrop.is-visible {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(470px, 100%);
  height: 100dvh;
  overflow-y: auto;
  padding: 34px 30px 40px;
  border-left: 1px solid var(--line-strong);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(123, 24, 50, 0.32), transparent 60%),
    #120a0e;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.22, 0.7, 0.24, 1);
}

.drawer.is-open {
  transform: none;
}

.drawer__close,
.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.drawer__copy {
  right: 60px;
}

.drawer__ai {
  right: 102px;
  border-color: rgba(201, 164, 106, 0.36);
  color: var(--gold);
}

.drawer__ai[hidden] {
  display: none;
}

.drawer__ai.is-busy {
  animation: aiPulse 1s ease-in-out infinite;
}

@keyframes aiPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.drawer__close:hover,
.modal__close:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.drawer__close svg,
.modal__close svg {
  width: 17px;
  height: 17px;
}

.drawer__date {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.drawer__date::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
}

.drawer h2 {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.drawer__time {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.drawer__time b {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.drawer__time span {
  color: var(--muted-2);
  font-size: 11px;
}

.drawer__facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.fact {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

.fact dt {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 3px;
}

.fact dd {
  margin: 0;
  color: var(--cream);
}

.phone-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.phone-copy:hover {
  color: var(--gold-soft);
}

.phone-copy__hint {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phone-copy:hover .phone-copy__hint {
  color: var(--gold);
}

.drawer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.drawer__actions .btn {
  flex: 1 1 170px;
}

.drawer__map {
  margin-top: 22px;
}

.drawer__map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer__map-head h4 {
  margin: 0;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.drawer__map-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.drawer__map-link:hover {
  color: var(--gold-soft);
}

.drawer-map__canvas {
  position: relative;
  height: 190px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0d080b;
}

.drawer-map__tile {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.95);
}

.drawer-map__pin {
  position: absolute;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--gold-soft);
  border-radius: 50%;
  background: var(--wine-bright);
  box-shadow: 0 0 0 6px rgba(160, 35, 69, 0.24);
}

.drawer-map__label {
  position: absolute;
  left: 9px;
  bottom: 9px;
  max-width: calc(100% - 54px);
  overflow: hidden;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 6, 8, 0.84);
  color: var(--cream);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-map__osm {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: rgba(243, 232, 219, 0.45);
  font-size: 8px;
}

.drawer-map__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 18px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.drawer-map__empty a {
  color: var(--gold);
}

.drawer__desc {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.drawer__desc h4 {
  margin: 0 0 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.drawer__desc p {
  margin: 0;
  white-space: pre-line;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.drawer__desc p.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desc-toggle {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sources-block {
  margin-top: 24px;
}

.sources-block h4 {
  margin: 0 0 10px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.source-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  font-size: 11px;
  color: var(--cream);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.source-link:hover {
  border-color: var(--gold);
  background: rgba(201, 164, 106, 0.06);
}

.source-link span {
  color: var(--muted-2);
  font-size: 9.5px;
}

.source-link svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--gold);
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal__card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, 92dvh);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(123, 24, 50, 0.28), transparent 60%),
    #140b10;
  box-shadow: var(--shadow);
}

.modal h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
}

.modal__lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.add-source {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.add-source input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font-size: 12px;
  outline: none;
}

.add-source input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.12);
}

.admin-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-box__title {
  margin: 0 0 9px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-form {
  display: flex;
  gap: 8px;
}

.admin-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font-size: 12px;
  outline: none;
}

.admin-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.12);
}

.admin-login-link {
  display: inline-block;
  margin-top: 10px;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(201, 164, 106, 0.34);
  border-radius: 999px;
  background: rgba(201, 164, 106, 0.08);
  color: var(--gold-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.admin-chip[hidden] {
  display: none;
}

.admin-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(201, 164, 106, 0.7);
}

.admin-chip .link-btn {
  color: var(--muted);
  font-size: 9.5px;
}

.admin-chip .link-btn:hover {
  color: var(--gold-soft);
}

.form-error {
  margin: 8px 0 0;
  color: #e9a0a0;
  font-size: 11px;
}

.source-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.source-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.source-item__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cream);
}

.source-item__handle {
  font-weight: 400;
  color: var(--muted-2);
  font-size: 10.5px;
}

.source-item__status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  font-size: 9.5px;
  color: var(--muted-2);
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6fbf8a;
}

.status-dot.is-error {
  background: #d06a6a;
}

.status-dot.is-idle {
  background: var(--muted-2);
}

.source-item__error {
  grid-column: 1 / -1;
  margin: 0;
  color: #d79a9a;
  font-size: 10px;
  line-height: 1.45;
  word-break: break-word;
}

.remove-source {
  align-self: start;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  font-size: 15px;
  line-height: 1;
}

.remove-source:hover {
  border-color: #a34a4a;
  color: #e09a9a;
}

.readonly-note {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.ai-usage {
  border-style: solid;
  border-color: rgba(201, 164, 106, 0.24);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.ai-probe {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
}

.ai-probe summary {
  cursor: pointer;
  color: var(--gold-soft);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.ai-probe[open] summary {
  margin-bottom: 10px;
}

.ai-probe textarea,
.ai-probe input[type='text'] {
  width: 100%;
  min-height: 34px;
  margin: 4px 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font: inherit;
  font-size: 11px;
  outline: none;
  box-sizing: border-box;
}

.ai-probe textarea {
  resize: vertical;
}

.ai-probe textarea:focus,
.ai-probe input[type='text']:focus {
  border-color: var(--gold);
}

.ai-probe .btn {
  margin-top: 2px;
}

.ai-probe__out {
  max-height: 380px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid rgba(201, 164, 106, 0.25);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.4);
  color: #e8e3d4;
  font-size: 10.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-probe__create {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.ai-probe__create-note {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.4;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  max-width: min(480px, calc(100% - 32px));
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 11, 16, 0.96);
  box-shadow: var(--shadow);
  color: var(--cream);
  font-size: 11.5px;
  text-align: center;
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: rgba(208, 106, 106, 0.5);
  color: #f0c2c2;
}

/* ---------- animation ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.07) translate3d(-1.2%, -1%, 0);
  }
}

@keyframes slowSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 164, 106, 0.38);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(201, 164, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 164, 106, 0);
  }
}

.marker.is-active {
  animation: pulse 1.9s ease-out infinite;
}

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .hero__stats {
    display: none;
  }
  .day-cell {
    min-height: 104px;
  }
}

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .day-panel {
    position: static;
  }
  .week {
    grid-template-columns: 1fr;
  }
  .week__day {
    min-height: 0;
  }
  .week__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .hero {
    min-height: 460px;
  }
  .hero__ornament {
    opacity: 0.16;
    right: -60px;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }
  .hero {
    min-height: 420px;
    padding: 26px 0 32px;
  }
  .hero__inner {
    min-height: 350px;
  }
  .hero h1 {
    font-size: clamp(38px, 11vw, 58px);
  }
  .hero__lead {
    font-size: 13px;
    max-width: 92%;
  }
  .hero__image {
    opacity: 0.5;
    background-position: 68% center;
  }
  .hero__veil {
    background:
      linear-gradient(90deg, rgba(11, 6, 8, 0.96) 0%, rgba(11, 6, 8, 0.72) 70%, rgba(11, 6, 8, 0.45) 100%),
      linear-gradient(180deg, rgba(11, 6, 8, 0.5) 0%, transparent 30%, rgba(11, 6, 8, 0.92) 100%);
  }
  .hero__ornament {
    display: none;
  }
  .toolbar {
    gap: 10px;
  }
  .period {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .period__label {
    min-width: 0;
    flex: 1;
    font-size: 17px;
  }
  .toolbar__meta {
    margin-left: auto;
  }
  .calendar-card,
  .day-panel,
  .map-card {
    border-radius: 16px;
  }
  .calendar-card {
    padding: 8px;
  }
  .weekdays span {
    font-size: 8px;
    letter-spacing: 0.1em;
  }
  .day-cell {
    min-height: 66px;
    padding: 5px 3px;
    border-radius: 9px;
  }
  .day-cell__num {
    font-size: 13px;
    min-width: 18px;
    height: 18px;
  }
  .day-cell__chips {
    display: none;
  }
  .day-cell__dots {
    display: flex;
    flex-wrap: wrap;
  }
  .day-panel {
    padding: 16px;
  }
  .agenda-item {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
  }
  .agenda-item__price {
    grid-column: 2;
    margin-top: 2px;
  }
  .agenda-item__time {
    font-size: 21px;
  }
  .section-head h2 {
    font-size: 23px;
  }
  .map {
    height: 330px;
  }
  .map-card {
    padding: 14px;
  }
  .drawer {
    width: 100%;
    padding: 30px 20px 34px;
  }
  .drawer h2 {
    font-size: 28px;
  }
  .drawer__time b {
    font-size: 34px;
  }
  .modal__card {
    padding: 26px 20px;
  }
  .footer {
    font-size: 9.5px;
  }
}

@media (max-width: 420px) {
  .hero__actions .btn {
    flex: 1 1 auto;
  }
  .toolbar__meta {
    display: none;
  }
  .fact {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.badge-new {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 7px;
  border: 1px solid rgba(201, 164, 106, 0.5);
  border-radius: 999px;
  background: rgba(201, 164, 106, 0.12);
  color: var(--gold-soft);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-ai {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid rgba(201, 164, 106, 0.32);
  border-radius: 999px;
  background: rgba(201, 164, 106, 0.08);
  color: rgba(201, 164, 106, 0.85);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-hidden {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid rgba(160, 160, 168, 0.4);
  border-radius: 999px;
  background: rgba(160, 160, 168, 0.1);
  color: rgba(200, 200, 208, 0.85);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: middle;
}

.chip.is-hidden,
.week-event.is-hidden,
.agenda-item.is-hidden,
.marker.is-hidden {
  opacity: 0.55;
  filter: grayscale(0.65);
}

.agenda-item.is-hidden {
  border-style: dashed;
}

.ev-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  margin: 2px 4px 2px 0;
  border: 1px solid rgba(201, 164, 106, 0.3);
  border-radius: 999px;
  background: rgba(201, 164, 106, 0.07);
  color: rgba(201, 164, 106, 0.9);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ev-tag:hover {
  border-color: rgba(201, 164, 106, 0.6);
  background: rgba(201, 164, 106, 0.14);
}

.ev-tag.is-on {
  border-color: var(--gold);
  background: rgba(201, 164, 106, 0.22);
  color: var(--gold-soft);
  box-shadow: 0 0 0 1px rgba(201, 164, 106, 0.35);
}

.ev-tag.is-blind {
  border-style: dashed;
  border-color: rgba(200, 120, 200, 0.5);
  background: rgba(180, 90, 200, 0.1);
  color: #e3b6ea;
}

.ev-tag.is-blind.is-on {
  border-style: dashed;
  border-color: #d98fe3;
  background: rgba(180, 90, 200, 0.22);
  color: #f0d0f4;
}

.agenda-item__meta {
  display: block;
}

.drawer__tags {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.drawer__tags h4 {
  margin: 0;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.drawer__tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer__tags-row .ev-tag {
  margin: 0;
}

.agenda-item.is-new {
  border-color: rgba(201, 164, 106, 0.4);
  background: linear-gradient(90deg, rgba(201, 164, 106, 0.09), transparent 62%);
}

.agenda-item.is-new .agenda-item__time {
  color: var(--gold-soft);
}

.chip.is-new {
  border-left-color: var(--gold);
  background: rgba(201, 164, 106, 0.16);
}

.day-cell.has-new .day-cell__num {
  color: var(--gold-soft);
}

.day-cell__dots i.is-new {
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 164, 106, 0.18);
}

.week-event.is-new {
  background: linear-gradient(90deg, rgba(201, 164, 106, 0.13), rgba(201, 164, 106, 0.04));
}

.source-item__address {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.source-address {
  margin-top: 9px;
}

.source-address summary {
  color: var(--gold);
  font-size: 11px;
  cursor: pointer;
}

.source-address__input,
.event-address__input {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font: inherit;
  font-size: 11.5px;
  outline: none;
  resize: vertical;
}

.source-address__input:focus,
.event-address__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.12);
}

.source-address__input {
  min-height: 66px;
  margin-top: 8px;
}

.source-address .btn {
  margin-top: 7px;
}

.source-address__hint,
.event-address__hint {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

.event-address {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.event-address label {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-address__row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.event-address__input {
  flex: 1;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  resize: none;
}

.event-edit {
  display: grid;
  gap: 13px;
  margin-top: 6px;
}

.event-edit h2 {
  margin: 0;
}

.event-edit__field {
  display: grid;
  gap: 5px;
}

.event-edit__label {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-edit input,
.event-edit textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font: inherit;
  font-size: 11.5px;
  outline: none;
}

.event-edit textarea {
  min-height: 130px;
  resize: vertical;
}

.event-edit input:focus,
.event-edit textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.12);
}

.event-edit__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.event-edit__check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.event-edit__check input {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--wine-2);
}

.event-edit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.ai-correction {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(201, 164, 106, 0.32);
  border-radius: 12px;
  background: rgba(201, 164, 106, 0.05);
}

.ai-correction h4 {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.ai-correction textarea {
  width: 100%;
  min-height: 84px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font: inherit;
  font-size: 11.5px;
  line-height: 1.45;
  resize: vertical;
  outline: none;
}

.ai-correction textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.12);
}

.ai-correction__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 420px) {
  .event-edit__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .price-filter,
  .time-filter {
    order: 5;
    width: 100%;
    justify-content: flex-start;
  }
  .source-filter__menu {
    left: auto;
    right: 0;
  }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
