/* Table for Two: warm cream, editorial serif, photographs. */
:root {
  --cream: #f6f1ea;
  --paper: #fbf8f3;
  --card: #fffdf9;
  --line: #e9e1d6;
  --ink: #221d1b;
  --muted: #8a7f78;
  --rose: #c98f84;
  --rose-soft: #f1dcd5;
  --rose-ink: #b06a5f;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --hand: "Caveat", cursive;
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; font-family: var(--sans); color: var(--ink); font-size: 14px; line-height: 1.45; }
.page { max-width: 1160px; margin: 0 auto; padding: 0 20px 48px; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
.hand { font-family: var(--hand); color: var(--rose-ink); font-size: 22px; line-height: 1.1; }

/* Top bar */
.top { display: flex; align-items: center; gap: 36px; padding: 18px 0 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 24px; }
.brand img { width: 44px; }
.links { display: flex; gap: 26px; font-size: 13px; }
.links a { text-decoration: none; color: var(--muted); padding-bottom: 4px; }
.links a.on { color: var(--ink); border-bottom: 1.5px solid var(--ink); }
.top .hand { margin-left: auto; transform: rotate(-6deg); }

/* Hero */
.hero { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 28px; padding: 18px 0 30px; }
.eyebrow { letter-spacing: 0.22em; text-transform: uppercase; font-size: 11px; color: var(--muted); margin: 0 0 10px; }
.hero h1 { font-size: 84px; line-height: 0.95; letter-spacing: -0.02em; }
.hero h1 em { font-style: italic; font-weight: 400; }
.stats { font-size: 18px; margin: 18px 0 10px; }
.hand.big { font-size: 28px; margin: 0; }
.hero-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; display: block; }
.hero .quote { position: absolute; right: -6px; bottom: 44px; width: 120px; text-align: center; font-size: 20px; color: var(--ink); background: var(--cream); padding: 6px 0; display: none; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 13px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.chip span { margin-left: 6px; color: var(--muted); font-size: 12px; }
.chip.on { background: var(--rose-soft); border-color: var(--rose-soft); }
.tools { display: flex; gap: 10px; margin-left: auto; }
#search, #sort { font: 13px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
#search { width: 190px; }
.btn { font: 500 13px var(--sans); background: #2d3a34; color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }

/* Featured (reviewed) */
.featured { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.feat { display: grid; grid-template-columns: 46% 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; min-height: 230px; }
.feat img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; display: block; }
.feat .body { position: relative; padding: 24px 22px 20px; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; color: var(--rose-ink); background: var(--rose-soft); border-radius: 999px; padding: 4px 10px; }
.feat h2 { font-size: 30px; margin: 10px 0 8px; }
.meta { color: var(--muted); font-size: 13px; margin: 0; }
.site { font-size: 13px; color: var(--ink); display: inline-block; margin-top: 6px; }
.feat .note { font-family: var(--serif); font-style: italic; font-size: 19px; margin: 16px 0 0; }
.feat .hearts { position: absolute; right: 20px; bottom: 18px; }
.feat .hand { position: absolute; right: 18px; top: 22px; font-size: 18px; width: 96px; text-align: center; transform: rotate(8deg); color: var(--ink); line-height: 1.15; }
.hearts { color: var(--rose); font-size: 17px; letter-spacing: 1px; }
.hearts i { font-style: normal; color: var(--line); }

/* Rows */
.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.row { display: grid; grid-template-columns: 82px 1fr auto 16px; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; }
.row:hover { border-color: var(--rose); }
.row img { width: 82px; height: 62px; object-fit: cover; border-radius: 10px; display: block; }
.row h3 { font: 600 14px var(--sans); display: flex; align-items: center; gap: 8px; }
.row .pill { font-size: 11px; font-weight: 500; color: var(--rose-ink); background: var(--rose-soft); border-radius: 999px; padding: 2px 8px; }
.row .meta, .row .site { font-size: 12px; margin-top: 2px; display: block; }
.row .site { color: var(--muted); }
.row .status { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 13px; text-align: right; max-width: 220px; }
.row .status .hearts { font-size: 14px; }
.row .chev { color: var(--muted); font-size: 18px; text-align: center; }
.empty { text-align: center; color: var(--muted); font-style: italic; margin: 40px 0; }

/* Map */
.section-title { font-size: 30px; margin: 0 0 16px; }
.mapcard { margin: 56px 0 44px; }
#map { height: 460px; border-radius: 18px; border: 1px solid var(--line); background: #f3ebe3; }
.cities { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; }
.pin { width: 32px; cursor: pointer; filter: saturate(1.6) brightness(0.86) drop-shadow(0 2px 2px rgba(80, 50, 40, 0.45)); }
.pin:hover { width: 38px; }
.maplibregl-popup-content { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; text-align: center; font-family: var(--sans); color: var(--ink); box-shadow: 0 10px 20px rgba(60, 40, 30, 0.15); }
.maplibregl-popup-tip { display: none; }
.pop img { width: 190px; height: 110px; object-fit: cover; border-radius: 10px; display: block; }
.pop h3 { margin: 8px 0 0; font-size: 18px; }
.pop p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.pop .hearts { display: block; margin-top: 6px; }
.pop .btn { margin-top: 8px; font-size: 12px; padding: 6px 12px; }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.num { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.num b { display: block; font: 500 36px var(--serif); }
.num span { color: var(--muted); font-size: 12px; }

/* Footer */
footer { text-align: center; padding-top: 24px; border-top: 1px solid var(--line); }
footer img { width: 70px; }
footer .tiny { letter-spacing: 0.22em; font-size: 11px; margin: 10px 0 4px; }
footer .foot { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
footer p { margin: 6px 0; }

/* Dialogs */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 24px; width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); color: var(--ink); font-family: var(--sans); }
dialog::backdrop { background: rgba(60, 40, 30, 0.35); }
dialog h2 { font-size: 28px; }
.top-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
#reviewSticker { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.pick button { background: none; border: 0; font-size: 26px; color: var(--line); cursor: pointer; padding: 2px; }
.pick button.on { color: var(--rose); }
dialog label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin: 12px 0; }
dialog textarea, dialog input { display: block; width: 100%; margin-top: 6px; font: 14px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
dialog textarea { min-height: 90px; resize: vertical; }
dialog input[hidden] { display: none; }
.photoRow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#photoThumb { width: 60px; height: 44px; object-fit: cover; border-radius: 8px; }
.status { font-size: 12px; color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 12px 0; }
legend { font-size: 12px; font-weight: 500; color: var(--muted); padding: 0; margin-bottom: 8px; }
.stickers { display: flex; flex-wrap: wrap; gap: 6px; }
.stickers button { width: 54px; height: 42px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--paper); cursor: pointer; }
.stickers button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stickers button.on { border-color: var(--rose); }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

@media (max-width: 760px) {
  .top { gap: 16px; flex-wrap: wrap; }
  .top .hand { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 56px; }
  .tools { margin-left: 0; width: 100%; }
  #search { flex: 1; width: auto; }
  .featured, .rows, .numbers { grid-template-columns: 1fr; }
  .feat { grid-template-columns: 1fr; }
  .feat img { height: 180px; }
  .row { grid-template-columns: 70px 1fr 16px; }
  .row .status { display: none; }
  #map { height: 340px; }
}

/* Sophia's note */
.replay { margin-left: auto; font: 500 13px var(--sans); color: var(--rose-ink); background: var(--rose-soft); border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.welcome { position: fixed; inset: 0; z-index: 50; background: #1b1513; display: grid; place-items: center; overflow: hidden; transition: opacity 0.6s; }
.welcome.leaving { opacity: 0; }
.welcome[hidden] { display: none; }
.welcome video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.welcome video[hidden] { display: none; }
.welcome::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(20, 12, 10, 0.75)); pointer-events: none; z-index: 1; }
.bows { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.bows img { position: absolute; top: -60px; opacity: 0.95; animation: fall linear infinite; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)); }
@keyframes fall {
  0% { transform: translate(0, -10vh) rotate(0deg); }
  50% { transform: translate(var(--sway), 50vh) rotate(var(--spin)); }
  100% { transform: translate(0, 112vh) rotate(calc(var(--spin) * -1)); }
}
.envelope { position: relative; z-index: 4; text-align: center; background: var(--cream); border-radius: 22px; padding: 34px 40px 30px; width: min(340px, calc(100vw - 48px)); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.envelope[hidden] { display: none; }
.envelope img { width: 84px; }
.envelope .eyebrow { margin: 10px 0 2px; }
.envelope h2 { font: italic 400 56px var(--serif); margin: 0 0 18px; }
.envelope .btn { font-size: 15px; padding: 12px 24px; background: var(--rose-ink); }
.message { position: absolute; left: 0; right: 0; bottom: max(84px, env(safe-area-inset-bottom)); z-index: 2; padding: 0 28px; text-align: center; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.message[hidden] { display: none; }
.message p { margin: 0 auto 10px; max-width: 520px; opacity: 0; transform: translateY(14px); }
.message .m1 { font: italic 400 54px var(--serif); }
.message .m2, .message .m3, .message .m5 { font: 400 20px/1.35 var(--serif); }
.message .m4 { color: #ffd9de; font-size: 32px; }
.message.play .m1 { animation: rise 1s 0.6s forwards; }
.message.play .m2 { animation: rise 1s 3.2s forwards; }
.message.play .m3 { animation: rise 1s 6s forwards; }
.message.play .m5 { animation: rise 1s 10s forwards; }
.message.play .m4 { animation: rise 1s 12.5s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.skip { position: absolute; z-index: 5; right: 16px; top: max(16px, env(safe-area-inset-top)); font: 500 13px var(--sans); color: #fff; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; padding: 8px 14px; cursor: pointer; backdrop-filter: blur(6px); }
@media (max-width: 760px) {
  .replay { margin-left: 0; }
  .message .m1 { font-size: 44px; }
  .message .m2, .message .m3, .message .m5 { font-size: 18px; }
}

/* While the video plays, bows drift behind the message, and fewer of them. */
.welcome.playing .bows { z-index: 1; }
.welcome.playing .bows img:nth-child(2n) { display: none; }
@media (max-width: 760px) {
  .tools { flex-wrap: wrap; }
  #search { flex: 1 1 100%; }
  #sort, .tools .add { flex: 1; }
}

/* Long reviews: preview a few lines, full text in the editor. */
.row .status div { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feat .note { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; }

/* Mobile pass: get to the list fast. */
@media (max-width: 760px) {
  .page { padding: 0 16px 40px; }
  .top { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding: max(12px, env(safe-area-inset-top)) 0 4px; }
  .brand { font-size: 21px; gap: 8px; }
  .brand img { width: 34px; }
  .replay { grid-column: 2; grid-row: 1; font-size: 12px; padding: 7px 12px; }
  .links { grid-column: 1 / -1; gap: 20px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; margin: 0 -16px; padding: 4px 16px 2px; }
  .links::-webkit-scrollbar { display: none; }
  .hero { gap: 14px; padding: 14px 0 18px; }
  .hero h1 { font-size: 44px; }
  .stats { font-size: 15px; margin: 8px 0 0; color: var(--muted); }
  .hero-photo { aspect-ratio: 2.2 / 1; border-radius: 14px; }
  .toolbar { gap: 10px; margin-bottom: 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 7px 12px; }
  #search, #sort { padding: 9px 14px; }
  .featured { gap: 14px; margin-bottom: 14px; }
  .feat { min-height: 0; }
  .feat img { height: 160px; min-height: 0; }
  .feat .body { padding: 16px 16px 18px; }
  .feat h2 { font-size: 24px; margin: 8px 0 4px; }
  .rows { gap: 10px; }
  .row { gap: 12px; padding: 8px; }
  .row img { width: 70px; height: 56px; }
  .numbers { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 760px) {
  .tools { flex-wrap: nowrap; gap: 8px; }
  #search { flex: 1 1 auto; min-width: 0; width: auto; }
  #sort { flex: 0 0 auto; width: 104px; padding: 9px 10px; }
  .tools .add { flex: 0 0 auto; font-size: 0; width: 40px; height: 40px; padding: 0; }
  .tools .add::before { content: "+"; font-size: 22px; line-height: 40px; }
  .feat { grid-template-columns: 112px 1fr; }
  .feat img { height: 100%; min-height: 150px; }
  .feat .body { padding: 12px 14px 14px; }
  .feat h2 { font-size: 21px; }
  .feat .note { font-size: 15px; margin-top: 8px; -webkit-line-clamp: 3; }
  .feat .site { display: none; }
  .feat .hearts { position: static; display: block; margin-top: 6px; }
}
