@font-face {
  font-family: 'DM Medea';
  src: url('DM-Medea.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BPG Irubaqidze';
  src: url('bpg_irubaqidze.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple-deep: #3a2660;
  --purple:      #6b5490;
  --purple-soft: #9880bc;
  --lavender:    #c5b8e2;
  --lavender-lt: #e8e0f5;
  --white:       #ffffff;
  --paper:       #f8f5ff;
  --text:        #3a2660;
  --text-soft:   #6b5490;
  --border:      #d4c8ee;
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 184, 226, 0.5) transparent;
}
html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(197, 184, 226, 0.5); border-radius: 3px; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  font-family: 'BPG Irubaqidze', Georgia, serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ────────────────────────────────────────────────── */
.ft-header {
  padding: 36px 24px 0;
  text-align: center;
}

.ft-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-soft);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.ft-back:hover { color: var(--purple); }
.ft-back svg { width: 14px; height: 14px; }

.ft-eyebrow {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-soft);
  margin-bottom: 10px;
}

.ft-title {
  font-family: 'DM Medea', 'BPG Irubaqidze', serif;
  font-weight: 400;
  font-size: 28px;
  color: var(--purple-deep);
  margin-bottom: 2rem;
  line-height: 1.25;
}

.ft-sub {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Search ────────────────────────────────────────────────── */
.ft-search-wrap {
  padding: 32px 24px 0;
  max-width: 480px;
  margin: 0 auto;
}

.ft-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.ft-search-box > svg {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--lavender);
  pointer-events: none;
  flex-shrink: 0;
}

.ft-search-input {
  width: 100%;
  padding: 14px 14px 14px 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 16px rgba(58, 38, 96, 0.06);
}

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

.ft-search-input:focus {
  border-color: var(--purple-soft);
  box-shadow: 0 2px 20px rgba(152, 128, 188, 0.18);
}

.ft-clear {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--lavender);
  font-size: 14px;
  line-height: 1;
  padding: 4px;
  display: none;
  transition: color 0.2s ease;
}

.ft-clear:hover { color: var(--purple); }
.ft-clear.visible { display: block; }

/* ── Divider ───────────────────────────────────────────────── */
.ft-divider {
  width: 48px;
  height: 1px;
  background-color: var(--lavender);
  margin: 28px auto;
  opacity: 0.6;
}

/* ── Results ───────────────────────────────────────────────── */
.ft-results {
  display: none;
  padding: 0 24px 8px;
  max-width: 480px;
  margin: 0 auto;
}

.ft-results.visible { display: block; }

.ft-results-label {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-soft);
  margin-bottom: 14px;
}

.ft-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(58, 38, 96, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ft-result-item:hover {
  border-color: var(--lavender);
  box-shadow: 0 4px 18px rgba(107, 84, 144, 0.1);
}

.ft-result-name {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.ft-result-name mark {
  background: rgba(197, 184, 226, 0.35);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.ft-result-table {
  flex-shrink: 0;
  margin-left: 12px;
  background-color: var(--purple-deep);
  color: var(--white);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ft-no-results {
  text-align: center;
  padding: 32px 0;
  color: var(--text-soft);
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.9;
}

/* ── Map ───────────────────────────────────────────────────── */
.ft-map-section {
  padding: 0 24px 32px;
  max-width: 480px;
  margin: 0 auto;
}

.ft-map-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-family: 'BPG Irubaqidze', serif;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ft-map-toggle:hover {
  border-color: var(--lavender);
  background: rgba(197, 184, 226, 0.08);
}

.ft-map-label {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-soft);
}

.ft-map-chevron {
  width: 15px;
  height: 15px;
  color: var(--lavender);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.ft-map-toggle[aria-expanded="true"] .ft-map-chevron { transform: rotate(180deg); }

.ft-map-wrap {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 2px 14px rgba(58, 38, 96, 0.06);
  display: none;
}

.ft-map-wrap.open { display: block; }

.ft-map-svg { width: 100%; height: auto; display: block; }

/* Stage */
.ft-map-stage path {
  stroke: var(--lavender);
}

.ft-map-stage text {
  font-family: 'DM Medea', 'BPG Irubaqidze', serif;
  font-size: 13px;
  fill: var(--purple-soft);
  font-weight: 400;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Entrance label */
.ft-map-entrance {
  font-family: 'BPG Irubaqidze', serif;
  font-size: 9px;
  fill: var(--lavender);
  text-anchor: middle;
  letter-spacing: 0.1em;
}

/* Tables */
.ft-map-table circle {
  fill: var(--white);
  stroke: var(--purple-soft);
  stroke-width: 1.5;
  transition: fill 0.3s ease, stroke 0.3s ease, opacity 0.3s ease;
}

.ft-map-table text {
  font-family: 'DM Medea', 'BPG Irubaqidze', serif;
  font-size: 14px;
  font-weight: 400;
  fill: var(--purple);
  text-anchor: middle;
  dominant-baseline: middle;
  transition: fill 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.ft-map-table.dimmed circle { stroke: var(--border); opacity: 0.3; }
.ft-map-table.dimmed text   { fill: var(--lavender); opacity: 0.3; }

.ft-map-table.highlighted circle {
  fill: var(--purple);
  stroke: var(--purple);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(107, 84, 144, 0.45));
}

.ft-map-table.highlighted text { fill: var(--white); opacity: 1; }

/* Couple's table */
.ft-map-couple rect {
  fill: var(--lavender-lt);
  stroke: var(--lavender);
  stroke-width: 1.5;
}

.ft-map-couple text {
  font-family: 'BPG Irubaqidze', serif;
  font-size: 11px;
  fill: var(--purple-soft);
  text-anchor: middle;
  dominant-baseline: middle;
}

/* ── All tables grid ───────────────────────────────────────── */
.ft-tables-section {
  flex: 1;
  padding: 0 24px 72px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.ft-tables-label {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple-soft);
  text-align: center;
  margin-bottom: 20px;
}

.ft-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
  column-gap: 36px;
}

.ft-table-card {
  background: var(--white);
  border-radius: 12px;
  padding: 16px 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(58, 38, 96, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ft-table-card:hover {
  border-color: var(--lavender);
  box-shadow: 0 4px 18px rgba(107, 84, 144, 0.08);
}

.ft-table-num {
  font-family: 'DM Medea', 'BPG Irubaqidze', serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--purple-deep);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
}

.ft-table-guests { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.ft-table-guests li {
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.4;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(197, 184, 226, 0.3);
}

.ft-table-guests li:last-child { border-bottom: none; }

/* ── Footer ────────────────────────────────────────────────── */
.ft-footer {
  padding: 20px 24px;
  text-align: center;
  background-color: var(--purple-deep);
}

.ft-footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font-family: 'BPG Irubaqidze', serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.ft-footer-credit:hover { opacity: 1; }
.ft-footer-logo { width: 52px; height: auto; }
