@font-face {
  font-family: "Lora";
  src: url("/fonts/lora-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #111111;
  --text: #d3d3d3;
  --muted: #a0a0a0;
  --line: #333333;
  --blue: #548dff;
  --red: #e46262;
  font:
    16px/1.55 Arial,
    Helvetica,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-width: 280px;
  min-height: 100dvh;
  overflow-wrap: break-word;
}
body:has(dialog[open]) { overflow: hidden; }
[hidden] {
  display: none !important;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  font: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 5px;
}
.masthead {
  height: 96px;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
}
.period {
  color: var(--text);
}
nav {
  display: flex;
  gap: 22px;
}
.text-button {
  background: none;
  border: 0;
  padding: 9px 0;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  min-height: 44px;
}
.text-button:hover {
  text-decoration-color: currentColor;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--muted);
}
h1,
h2 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -1.8px;
}
h1 {
  font-size: clamp(40px, 5vw, 70px);
  margin: 18px 0;
}
h2 {
  font-size: 40px;
  margin: 18px 0 25px;
}
h3 {
  font-size: 17px;
  font-weight: 500;
  margin-top: 30px;
}
p {
  color: var(--muted);
}
.intro {
  text-align: center;
  margin: 25px auto 12px;
  position: relative;
  z-index: 1;
  padding: 0 18px;
  pointer-events: none;
}
.intro h1 { font-size: clamp(46px, 6vw, 80px); margin: 18px 0; }
.intro p { margin: 0; font-size: 17px; }
#map-wrap {
  position: relative;
  width: 100%;
  height: clamp(320px, 47vw, 620px);
  margin: 0 auto;
  max-width: 1600px;
}
#map { width: 100%; height: 100%; display: block; touch-action: pan-y; }
#map-lights { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
#map-lights:focus-visible { outline: 1px solid #777; outline-offset: -2px; }
.coast {
  fill: #111111;
  stroke: #484848;
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
}
#empty-map {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #b8b8b8;
  background: #070707d9;
  padding: 15px 22px;
  border-radius: 4px;
  pointer-events: none;
  font-size: 14px;
  line-height: 1.8;
  width: max-content;
  max-width: 80%;
}
.world-actions {
  text-align: center;
  margin: 0 auto 50px;
}
.world-actions > .primary { min-width: 190px; margin-bottom: 4px; }
#retry-map { display: block; margin: 0 auto 16px; }
#map-status { max-width: 440px; padding: 0 20px; margin: 0 auto 12px; }
.legend {
  display: flex;
  justify-content: center;
  gap: 25px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 23px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dot {
  display: inline-flex;
  width: 17px;
  height: 19px;
  line-height: 1;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-style: normal;
}
.dot::before { content: "♥"; }
.dot.blue { color: var(--blue); }
.dot.red { color: var(--red); }
.primary,
.secondary {
  border-radius: 28px;
  padding: 13px 25px;
  min-height: 48px;
  font-size: 16px;
  letter-spacing: 0.2px;
}
.primary {
  background: #d3d3d3;
  color: #0c0c0c;
  border: 1px solid #d3d3d3;
}
.primary:hover {
  background: #eeeeee;
}
.secondary {
  border: 1px solid #606060;
  background: none;
}
.secondary:hover {
  border-color: #ababab;
}
.full {
  width: 100%;
  margin-top: 18px;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
footer {
  padding: 20px 6vw 28px;
  border-top: 1px solid #222222;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
#dev-status {
  color: #bbbbbb;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
  width: calc(100% - 28px);
  max-width: 520px;
  max-height: 90dvh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
dialog::backdrop {
  background: #030303cc;
  backdrop-filter: blur(5px);
}
.close {
  position: absolute;
  right: 16px;
  top: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 27px;
  color: var(--muted);
}
label {
  display: block;
  font-size: 14px;
  margin: 12px 0 8px;
}
input,
textarea {
  font: inherit;
  color: var(--text);
  background: #0b0b0b;
  border: 1px solid #484848;
  border-radius: 6px;
  width: 100%;
  padding: 13px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0;
  accent-color: var(--text);
  flex-shrink: 0;
}
input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.feeling-options {
  display: flex;
  gap: 8px;
  padding: 0;
  border: 0;
  margin: 20px 0;
}
.feeling-options label {
  flex: 1;
  position: relative;
  margin: 0;
}
.feeling-options span {
  border: 1px solid var(--line);
  padding: 12px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  min-height: 48px;
}
.feeling-options input:checked + span {
  border-color: var(--text);
  background: #ffffff0b;
}
.feeling-options input[value="broken"]:checked + span {
  border-color: var(--text);
  background: #ffffff0b;
}
.feeling-options input:focus-visible + span {
  outline: 2px solid var(--text);
}
.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 23px;
}
#char-count { white-space: nowrap; }
.draft-tools { min-height: 34px; margin: -10px 0 14px; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
#draft-status { margin: 0; font-size: 12px; }
#discard-draft { padding: 0; margin: 0; min-height: 32px; font-size: 12px; }
#code {
  font-size: 24px;
  letter-spacing: 0.3em;
  text-align: center;
}
#change-email, #resend-code { display: block; width: 100%; text-align: center; }
#share-url { overflow-wrap: normal; }
.location-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.location-row > span {
  width: 100%;
  font-size: 14px;
}
.location-status {
  margin: 12px 0 0;
  font-size: 13px;
}
.map-fields { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.preview-dialog { max-width: 560px; text-align: center; }
.preview-dialog h2 { font-size: clamp(29px, 7vw, 36px); margin-bottom: 22px; }
#preview-canvas {
  display: block;
  width: min(100%, 265px, 22dvh);
  height: auto;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.preview-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.preview-actions button { flex: 1 1 140px; }
#preview-privacy { max-width: 360px; margin: 0 auto 18px; }
#preview-dialog .full { margin-top: 12px; }
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 25px 0 12px;
  font-size: 13px;
  color: #b0b0b0;
}
.form-error {
  color: #dddddd;
  font-size: 14px;
  min-height: 0;
}
.form-error:empty {
  display: none;
}
.notice {
  font-size: 14px;
  border-left: 2px solid var(--text);
  padding-left: 15px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
#toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #242424;
  color: var(--text);
  border: 1px solid #606060;
  padding: 12px 20px;
  border-radius: 7px;
  max-width: 90vw;
  z-index: 10;
  font-size: 14px;
}
#personal {
  max-width: 1250px;
  margin: 30px auto 100px;
  padding: 0 6vw;
  min-height: 65vh;
}
.back {
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.personal-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 4vw;
  margin-top: 20px;
}
.personal-layout article { min-width: 0; }
.heart-stage {
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
}
#heart {
  width: 100%;
  height: 100%;
  display: block;
}
#personal h1 {
  font-size: clamp(32px, 4vw, 52px);
}
.confession {
  font:
    400 clamp(23px, 2.7vw, 34px) / 1.45 "Lora", Georgia,
    serif;
  letter-spacing: -0.4px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.detail-actions .text-button {
  width: 100%;
  text-align: left;
}
#owner-actions {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.danger {
  color: var(--text);
}
#report-light {
  font-size: 12px;
  margin-top: 20px;
}
@media (max-width: 650px) {
  .masthead {
    min-height: 78px;
    height: auto;
    padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
    flex-wrap: wrap;
    gap: 0 16px;
  }
  .wordmark {
    font-size: 12px;
    letter-spacing: 1.4px;
  }
  nav {
    gap: 16px;
    flex-wrap: wrap;
  }
  .intro { margin-top: 25px; }
  .intro h1 { font-size: clamp(42px, 11vw, 50px); letter-spacing: -1.5px; }
  .intro p { font-size: 16px; }
  #map-wrap { height: 350px; margin-top: 16px; }
  .eyebrow { font-size: 11px; letter-spacing: 2px; }
  .world-actions {
    margin: 10px 0 35px;
  }
  .legend {
    font-size: 12px;
    gap: 20px;
  }
  footer {
    padding: 20px 20px max(20px, env(safe-area-inset-bottom));
    font-size: 12px;
  }
  dialog {
    padding: 30px 20px;
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  }
  h2 {
    font-size: 35px;
  }
  .personal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .heart-stage {
    height: 270px;
    aspect-ratio: auto;
  }
  #personal {
    padding: 0 22px;
    margin-top: 15px;
  }
  .personal-layout article {
    margin-top: 5px;
  }
  .confession {
    font-size: 27px;
  }
  .detail-actions button {
    flex: 1 1 130px;
  }
  .detail-actions .text-button {
    flex: 0 0 100%;
  }
  .field-meta {
    font-size: 11px;
  }
  .feeling-options span {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* A separate page for leaving a light. */
.create-page { width: min(600px, calc(100% - 40px)); margin: 20px auto 80px; }
#composer { margin-top: 35px; }
#composer h2 { margin-bottom: 18px; font-size: clamp(34px, 7vw, 46px); }
#composer > .eyebrow { color: var(--text); }
.instagram-fields { border: 0; border-top: 1px solid var(--line); margin: 25px 0; padding: 24px 0 0; min-width: 0; }
.instagram-fields > legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-family: "Lora", Georgia, serif; font-size: 23px; }
.instagram-fields > legend + label { clear: both; }
.sender-options { flex-wrap: wrap; margin: 25px 0 10px; }
.sender-options legend { width: 100%; margin-bottom: 12px; font-size: 14px; }
.sender-options label { min-width: 130px; }
#sender-field { margin-top: 20px; }
.coordinate-data { padding: 14px; border: 1px solid var(--line); border-radius: 8px; font: 13px/1.7 ui-monospace, monospace; color: #cccccc; }
.dedication { color: #cccccc; font-family: "Lora", Georgia, serif; font-size: 21px; }
.dedication a { text-decoration: underline; text-underline-offset: 5px; }
.location-dialog { max-width: 1160px; width: calc(100% - 28px); height: calc(100dvh - 28px); padding: 20px 24px; }
.location-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.location-header { display: flex; padding-right: 44px; }
.location-header h2 { margin: 8px 0 0; font-size: 31px; letter-spacing: -1px; }
.location-instructions { margin: 0; }
#place-map { width: 100%; flex: 1 0 240px; min-height: 240px; background: #0a0a0a; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#place-map-status { margin: 0; }
#retry-place-map { align-self: flex-start; padding: 0; }
.coordinates-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.coordinates-form > div { min-width: 0; }
.coordinates-form label { margin-top: 0; }
.coordinates-form input { min-width: 0; padding: 10px; font-size: 16px; }
.coordinates-form button { white-space: nowrap; }
.location-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.location-footer .primary { flex-shrink: 0; }
.manual-coordinates { font-size: 14px; }
.manual-coordinates summary { min-height: 40px; padding: 8px 0; cursor: pointer; color: #cccccc; }
.manual-coordinates[open] summary { margin-bottom: 6px; }
@media (max-width: 650px) {
  .create-page { margin-top: 12px; width: calc(100% - 36px); }
  #composer { margin-top: 28px; }
  .location-dialog { width: calc(100% - 12px); height: calc(100dvh - 12px); padding: 16px 14px; max-height: calc(100dvh - 12px); }
  .location-header h2 { font-size: 26px; }
  .coordinates-form { grid-template-columns: 1fr 1fr; }
  .coordinates-form button { grid-column: 1 / -1; min-height: 40px; padding: 8px 20px; }
  #place-map { flex-basis: 240px; min-height: 240px; }
  .location-footer { align-items: stretch; flex-direction: column; gap: 0; }
  .location-footer p { margin: 5px 0 12px; }
  .location-footer .primary { width: 100%; }
}

#place-map .ol-control button { min-width: 40px; min-height: 40px; margin: 2px; font-size: 24px; }
#place-map .ol-zoom { top: 9px; left: 9px; }
#place-map .ol-attribution { max-width: calc(100% - 90px); font-size: 10px; }
@media (max-height: 650px) {
  #place-map { flex-basis: 170px; min-height: 170px; }
  .location-header h2 { font-size: 24px; }
}

::selection { background: #dedede; color: #111111; }
/* Desaturate the basemap and its sprite icons, preserving the separate heart layer. */
#place-map .ol-layer:not(.heart-pin-layer) { filter: grayscale(1); }
#place-map { --ol-background-color: #191919; --ol-subtle-background-color: #111d; --ol-foreground-color: #dedede; --ol-subtle-foreground-color: #bdbdbd; --ol-partial-background-color: #111e; }
#place-map .ol-attribution, #place-map .ol-attribution:not(.ol-collapsed) { background: #111e; color: #bdbdbd; }
#place-map .ol-attribution a { color: #d3d3d3; }
#place-map .ol-attribution ul { color: #bdbdbd; text-shadow: none; }
#place-map .ol-control button { background: #191919; color: #dedede; border: 1px solid #505050; }
#place-map .ol-control button:hover { background: #303030; color: #fff; }
#place-map .ol-scale-line { background: #111d; }
#place-map .ol-scale-line-inner { color: #ccc; border-color: #aaa; }

/* The support preview shares the monochrome interface and colored feeling marks. */
.main-actions { display:flex; justify-content:center; align-items:center; gap:14px; flex-wrap:wrap; }
a.primary, a.secondary { display:inline-flex; align-items:center; justify-content:center; text-align:center; min-height:48px; }
.starter-note { max-width:510px; margin:16px auto; padding:0 16px; }
.creator-discovery { max-width:1000px; margin:55px auto 70px; padding:0 24px; }
.creator-discovery h2 { font-size:32px; margin-bottom:12px; }
.creator-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:24px; }
.support-tile { display:block; min-width:0; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:20px; }
.support-tile strong, .support-tile > span { display:block; }
.support-tile > span { margin-top:8px; font-size:13px; color:var(--muted); }
.support-page { max-width:900px; margin:0 auto; padding:24px 24px 80px; }
.support-page > h1 { font-size:clamp(36px,5vw,56px); }
.support-badge { font-size:10px; letter-spacing:1.6px; margin-top:25px; }
.support-intro { max-width:620px; }
.support-form { max-width:620px; margin-top:30px; }
.support-section { padding:24px 0; border-top:1px solid var(--line); }
.support-section > label:first-child { display:block; margin-bottom:14px; }
.amount-entry { display:flex; align-items:baseline; gap:10px; border:1px solid var(--muted); border-radius:10px; padding:10px 16px; background:var(--bg); }
.amount-entry > span { font:32px Georgia,serif; }
.amount-entry input { width:100%; min-width:0; border:0; background:none; padding:2px; margin:0; font:40px "Lora",Georgia,serif; color:var(--text); }
.amount-entry input:focus-visible { outline-offset:2px; }
.amount-presets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0; }
.amount-presets button { min-width:0; min-height:48px; padding:10px; }
.support-subtitle { font-size:28px; letter-spacing:-.6px; }
.support-section .support-subtitle { margin-top:0; }
.support-buttons { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:24px 0; }
.support-large-amount { font:clamp(36px,7vw,54px) "Lora",Georgia,serif; color:var(--text); line-height:1.2; }
.economics { margin:20px 0; }
.economics > div { display:flex; justify-content:space-between; gap:15px; margin-bottom:14px; }
.economics > div strong { white-space:nowrap; }
.economics p { margin-bottom:0; }
.support-heart-art { display:block; width:min(100%,540px); height:auto; margin:0 auto; }
.support-recipient { display:inline-block; font-size:20px; margin:20px 0 0; overflow-wrap:anywhere; }
.support-facts > div, .support-history > div { display:flex; justify-content:space-between; gap:16px; margin:14px 0; }
.support-facts dd { margin:0; text-align:right; }
.support-facts dt { color:var(--muted); }
.support-records { display:grid; gap:16px; margin:28px 0; }
.support-row { width:100%; text-align:left; color:var(--text); font:inherit; }
.support-row small { display:block; color:var(--muted); margin-top:14px; }
.support-blue { color:var(--blue); }
.support-stat-grid { display:flex; gap:50px; margin:20px 0; }
.support-stat-grid strong { display:block; font:36px "Lora",Georgia,serif; }
.support-stat-grid span { display:block; font-size:13px; color:var(--muted); }
.recipient-world { display:block; width:100%; height:320px; }
.support-tabs { display:flex; background:var(--panel); border-radius:30px; padding:4px; gap:4px; margin:24px 0; }
.support-tabs button { flex:1; border:0; border-radius:25px; background:transparent; min-height:44px; }
.support-tabs button[aria-pressed="true"] { background:#555; }
#support-story-canvas { display:block; width:100%; max-height:64dvh; object-fit:contain; margin:20px auto; }
.masthead nav { flex-wrap:wrap; gap:16px; justify-content:flex-end; }
@media(max-width:600px) {
  .masthead { height:auto; min-height:76px; padding:12px 20px; gap:12px; }
  .masthead .wordmark { font-size:11px; letter-spacing:1.2px; white-space:nowrap; }
  .masthead nav { gap:10px; }
  .masthead nav .text-button { font-size:12px; }
  .creator-grid { grid-template-columns:1fr; }
  .main-actions { flex-direction:column; padding:0 20px; }
  .main-actions > * { width:min(100%,350px); }
  .support-page { padding:15px 20px 55px; }
  .support-buttons > .primary, .support-buttons > .secondary { width:100%; }
  .support-tile { padding:17px; }
  .recipient-world { height:260px; }
  .support-facts { font-size:14px; }
}

/* The personal heart leads; a money gift is a separate, optional action. */
.support-gift-option { border-top: 1px solid #343434; padding-top: 24px; margin-top: 28px; }
.support-gift-option .secondary { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
