:root {
  --paper: #f6f1ea;
  --panel: rgba(255, 252, 247, 0.94);
  --panel-strong: #fffdfa;
  --text: #2f2924;
  --muted: #70675f;
  --line: #d8cec2;
  --accent: #8e7a64;
  --shadow: 0 18px 40px rgba(58, 43, 25, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 28px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #efe7dc 0%, #f8f4ed 100%);
  font-family: "Cormorant Garamond", serif;
}

.clean-map-body {
  background: #ece8e0;
}

img {
  display: block;
  width: 100%;
}

.sheet {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 36px;
  background: linear-gradient(180deg, #fbf8f3 0%, #f4eee6 100%);
  border: 1px solid rgba(100, 80, 59, 0.14);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.clean-map-shell {
  width: 1400px;
  margin: 90px auto 32px;
}

.clean-map-frame {
  background: #faf8f3;
  border: 1px solid rgba(100, 80, 59, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

#clean-map {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5f3ee;
}

.chapel-pointer,
.cemetery-pointer,
.parking-pointer {
  background: transparent;
  border: 0;
}

.chapel-pointer__dot,
.cemetery-pointer__dot,
.parking-pointer__dot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}

.chapel-pointer__icon,
.cemetery-pointer__icon,
.parking-pointer__icon {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  color: #fffdfa;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(28, 20, 13, 0.18);
}

.cemetery-pointer__icon--word {
  width: auto;
  min-width: 54px;
  padding: 0 8px;
  font-size: 10px;
  letter-spacing: 0.01em;
}

.chapel-pointer__dot,
.chapel-pointer__icon {
  background: #3a332d;
}

.cemetery-pointer__dot,
.cemetery-pointer__icon {
  background: #8c7a67;
}

.parking-pointer__dot,
.parking-pointer__icon {
  background: #b15d27;
}

.map-label {
  border: 0;
  border-radius: 14px;
  padding: 5px 8px 4px;
  background: rgba(255, 251, 245, 0.94);
  color: #3f342a;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(28, 20, 13, 0.1);
}

.map-label--parking {
  color: #8f4c22;
}

.map-label__title,
.map-label__address {
  display: block;
  line-height: 1.15;
}

.map-label__address {
  font-size: 9px;
  font-weight: 600;
  color: #8a7764;
}

.map-floating-label {
  background: transparent;
  border: 0;
}

.map-floating-label .map-label__title,
.map-floating-label .map-label__address {
  display: block;
}

.map-floating-label > div,
.map-floating-label {
  width: max-content;
}

.map-floating-label {
  padding: 0;
}

.map-floating-label {
  filter: drop-shadow(0 6px 14px rgba(28, 20, 13, 0.1));
}

.map-floating-label::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: rgba(255, 251, 245, 0.94);
  border-radius: 2px;
}

.map-floating-label {
  border-radius: 14px;
  padding: 5px 8px 4px;
  background: rgba(255, 251, 245, 0.94);
  color: #8f4c22;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(28, 20, 13, 0.1);
}

.export-controls {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(92vw, 860px);
}

.export-hint {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 251, 245, 0.94);
  color: #5a4a3c;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(28, 20, 13, 0.1);
}

.export-controls button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #3f342a;
  color: #fffdf8;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(38, 27, 18, 0.22);
}

.export-controls button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.header {
  text-align: center;
  padding: 8px 24px 30px;
}

.language-switcher {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.88);
  box-shadow: var(--shadow);
}

.language-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.language-button.is-active {
  background: #3f342a;
  color: #fffdf8;
}

.kicker {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.header h1 {
  margin: 8px 0 0;
  color: #2b221d;
}

.title-top,
.title-name {
  display: block;
}

.title-top {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.05;
}

.title-name {
  margin-top: 18px;
  font-family: "Great Vibes", cursive;
  font-size: 68px;
  font-weight: 400;
  line-height: 0.95;
}

.z-stroke {
  text-decoration: line-through;
  text-decoration-thickness: 0.04em;
}

.subtitle {
  margin: 10px 0 0;
  font-size: 30px;
  color: var(--accent);
}

.service-details {
  width: min(720px, 100%);
  margin: 20px auto 0;
  padding: 20px 24px 18px;
  background: rgba(255, 252, 247, 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.service-date,
.service-address {
  margin: 0;
}

.service-date {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.05;
  color: #43372d;
}

.service-address {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.04;
  color: #5b4d40;
}

.section-subtitle {
  text-align: center;
  margin: 28px 0 14px;
}

.agenda-name {
  margin: 4px 0 18px;
  font-family: "Great Vibes", cursive;
  font-size: 52px;
  line-height: 1;
  color: #2b221d;
}

.agenda-text {
  margin: 20px auto 0;
  max-width: 520px;
  font-size: 22px;
  line-height: 1.3;
  color: #4b433c;
}

.agenda-details {
  margin: 20px auto;
  padding: 18px 24px;
  max-width: 440px;
  text-align: left;
  background: rgba(239, 229, 216, 0.5);
  border-radius: 16px;
}

.agenda-details p {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  color: #3f342a;
}

.agenda-details p + p {
  margin-top: 12px;
}

.agenda-details strong {
  font-weight: 700;
}

.agenda-signed {
  margin: 22px 0 0;
  font-size: 24px;
  font-weight: 600;
  color: #2b221d;
}

.poi-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.poi-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.poi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}

.poi-icon--chapel {
  background: #8c7a67;
  color: #fff;
}

.poi-icon--restaurant {
  background: #8b5e3c;
  color: #fff;
}

.poi-icon--parking {
  background: #b15d27;
  color: #fff;
  font-family: "Source Sans 3", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.poi-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
}

.poi-info p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.2;
  color: var(--muted);
  font-family: "Source Sans 3", sans-serif;
}

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

.poi-links .nav-link {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 10px;
}

.hero {
  display: block;
}

.hero-copy,
.note,
.entrance-bubble {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-copy {
  margin-top: 18px;
  padding: 26px 24px;
}

.hero-copy h2,
.entrance-head h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.02;
}

.hero-copy p,
.entrance-head p {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  color: #4b433c;
}

.map-panel {
  margin: 0;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.main-map {
  width: 100%;
  aspect-ratio: 16 / 9;
}

#main-editor-map {
  width: 100%;
  height: 100%;
  min-height: 520px;
  background: #f5f3ee;
}

.map-zoom-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 1000;
}

.map-zoom-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.94);
  color: #3f342a;
  font-family: "Source Sans 3", sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(28, 20, 13, 0.14);
}

.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.parking-big,
.parking-line,
.chapel-mark {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.parking-big {
  stroke: #c4382f;
  stroke-width: 8;
}

.parking-line {
  stroke: #d63d2f;
  stroke-width: 8;
}

.chapel-mark {
  stroke: #d63d2f;
  stroke-width: 8;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.note {
  padding: 18px 18px 16px;
}

.note strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.02;
}

.note span {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.1;
  color: var(--muted);
}

.entrances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.entrance-bubble {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
}

.entrance-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  min-height: 96px;
}

.entrance-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #efe5d8;
  color: #5f4c3b;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bubble-image {
  margin: 0;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  aspect-ratio: 16 / 10;
}

.bubble-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entrance-nav-links {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.nav-link--google {
  background: #3f342a;
  color: #fffdf8;
}

.nav-link--google:hover {
  background: #5a4a3c;
}

.nav-link--apple {
  background: #efe5d8;
  color: #3f342a;
}

.nav-link--apple:hover {
  background: #e2d5c5;
}

.nav-link svg {
  flex-shrink: 0;
}

@media (max-width: 1120px) {
  body {
    padding: 14px;
  }

  .sheet {
    width: 100%;
    padding: 22px;
  }

  .clean-map-shell {
    width: 100%;
    margin-top: 84px;
  }

  .hero {
    display: block;
  }

  .notes,
  .entrances {
    grid-template-columns: 1fr;
  }
  
  .header h1 {
    font-size: inherit;
  }

  .subtitle,
  .service-date,
  .service-address {
    font-size: 26px;
  }

  .title-top {
    font-size: 28px;
  }

  .title-name {
    font-size: 56px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 10px;
  }

  .sheet {
    padding: 16px;
    border-radius: 18px;
  }

  .export-controls {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    justify-content: flex-start;
    gap: 8px;
  }

  .export-controls button,
  .language-button {
    padding: 9px 12px;
    font-size: 12px;
  }

  .export-hint {
    width: 100%;
    text-align: center;
    font-size: 12px;
  }

  .language-switcher {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .header {
    padding: 4px 4px 20px;
  }

  .kicker {
    font-size: 11px;
  }

  .title-top {
    font-size: 24px;
  }

  .title-name {
    font-size: 44px;
  }

  .subtitle {
    font-size: 22px;
  }

  .service-details {
    margin-top: 16px;
    padding: 16px 14px 14px;
  }

  .service-date {
    font-size: 24px;
  }

  .service-address {
    font-size: 22px;
  }

  .main-map {
    aspect-ratio: 4 / 3;
  }

  #main-editor-map {
    min-height: 320px;
  }

  .map-zoom-controls {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .map-zoom-controls button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 22px;
  }

  .hero-copy {
    margin-top: 14px;
    padding: 18px 16px;
  }

  .hero-copy h2,
  .entrance-head h2 {
    font-size: 28px;
  }

  .hero-copy p,
  .entrance-head p {
    font-size: 20px;
  }

  .notes {
    gap: 12px;
    margin-top: 14px;
  }

  .note {
    padding: 14px;
  }

  .note strong {
    font-size: 22px;
  }

  .note span {
    font-size: 18px;
  }

  .entrances {
    gap: 14px;
    margin-top: 14px;
  }

  .entrance-bubble {
    padding: 14px;
  }

  .entrance-head {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .entrance-tag {
    min-width: 0;
    justify-self: start;
  }

  .agenda {
    padding: 22px 16px;
  }

  .agenda h2 {
    font-size: 22px;
  }

  .agenda-name {
    font-size: 38px;
  }

  .agenda-text {
    font-size: 18px;
  }

  .agenda-details {
    padding: 14px 16px;
  }

  .agenda-details p {
    font-size: 17px;
  }

  .agenda-signed {
    font-size: 20px;
  }

  .poi-card {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .poi-links {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .poi-links .nav-link {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .poi-info h3 {
    font-size: 16px;
  }
}

.map-popup {
  text-align: center;
  font-family: "Source Sans 3", sans-serif;
}

.map-popup strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #2f2924;
}

.map-popup__links {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.map-popup__links a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: #3f342a;
  color: #fffdf8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.map-popup__links a:hover {
  background: #5a4a3c;
}

.restaurant-pointer {
  background: transparent;
  border: 0;
}

.restaurant-pointer__dot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  background: #8b5e3c;
}

.restaurant-pointer__icon {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #8b5e3c;
  color: #fffdfa;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(28, 20, 13, 0.18);
  cursor: pointer;
}

.entrance-pointer {
  background: transparent;
  border: 0;
}

.entrance-pointer__dot {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  background: #2a6e3f;
}

.entrance-pointer__icon {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #2a6e3f;
  color: #fffdfa;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(28, 20, 13, 0.18);
  cursor: pointer;
}

.entrance-pointer__label {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%) translateY(-100%);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 10px;
  background: #2a6e3f;
  color: #fff;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(28, 20, 13, 0.18);
  cursor: pointer;
}

.entrance-pointer__label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #2a6e3f;
  border-radius: 1px;
}

.road-label {
  background: transparent !important;
  border: 0 !important;
  pointer-events: none;
  overflow: visible !important;
}

.road-label span {
  display: inline-block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #5a4a3c;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(246, 241, 234, 0.95), 0 0 8px rgba(246, 241, 234, 0.9);
}

.line-handle {
  background: transparent;
  border: 0;
}

.line-handle__dot {
  width: 14px;
  height: 14px;
  background: #c4682f;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: grab;
}
