/* Burrito memorial — quiet, black and white, mobile first. */
:root {
  --ink: #111;
  --paper: #fafaf8;
  --card: #fff;
  --muted: #5f5f5f; /* AA on --paper */
  --line: #dcdcd8;
  --danger: #8a1c1c;
  --radius: 10px;
  --wrap: 960px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
[hidden] { display: none !important; }

/* language blocks: show only the current language */
html[lang="zh"] [lang="en"]:not(html), html[lang="en"] [lang="zh"]:not(html) { display: none; }

/* ---- top bar ---- */
.topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: #fff; }
body:not([data-page="home"]) .topbar { position: static; color: var(--ink); border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.topbar nav { display: flex; gap: 14px; align-items: center; }
.topbar nav a { text-decoration: none; }
.lang { font: inherit; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 999px; padding: 2px 12px; cursor: pointer; min-height: 32px; }
[data-page="home"] .topbar a, [data-page="home"] .lang { text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---- hero ---- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 480px; background: #111; color: #fff; overflow: hidden; }
.hero picture, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img { object-fit: cover; object-position: 50% 45%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%); }
.hero-text { position: absolute; z-index: 2; left: 0; right: 0; bottom: 64px; padding: 0 22px; max-width: var(--wrap); margin: 0 auto; }
.hero h1 { font-size: clamp(44px, 12vw, 88px); line-height: 1; margin: 0 0 8px; font-weight: 700; letter-spacing: -.01em; }
.hero-place { margin: 0 0 10px; font-size: 15px; letter-spacing: .04em; opacity: .9; }
.hero-intro { margin: 0 0 12px; max-width: 34em; font-size: 17px; }
.hero-link { color: #fff; }
.hero-down { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); color: #fff; text-decoration: none; font-size: 24px; width: 44px; height: 44px; display: grid; place-items: center; }

/* ---- sections ---- */
.section, .page { max-width: var(--wrap); margin: 0 auto; padding: 48px 18px; }
.section h2 { font-size: 26px; margin: 0 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ---- map ---- */
.map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #eee; position: relative; margin-top: 12px; }
.map-placeholder { display: grid; place-items: center; height: 100%; margin: 0; color: var(--muted); }
.picker-map { height: 260px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; margin: 8px 0; background: #eee; }
.marker-photo { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); background: #111 center/cover; cursor: pointer; padding: 0; }
.marker-message, .marker-landmark { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #111; background: #fff; display: grid; place-items: center; cursor: pointer; font-size: 17px; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.marker-landmark { background: #111; color: #fff; border-color: #fff; border-radius: 6px; font-size: 15px; }
.marker-pick { width: 18px; height: 18px; border-radius: 50%; background: #111; border: 3px solid #fff; box-shadow: 0 0 0 2px #111; }
.map-card { font: 14px/1.45 var(--font); max-width: 220px; }
.map-card img { display: block; width: 100%; border-radius: 6px; margin-bottom: 6px; }
.map-card p { margin: 0 0 6px; }

/* ---- forms ---- */
.form { display: grid; gap: 12px; }
.form textarea, .form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #9a9a96; border-radius: 8px; background: #fff; color: var(--ink); }
.form textarea { resize: vertical; min-height: 110px; }
.field { display: grid; gap: 4px; flex: 1 1 220px; font-size: 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.counter { margin-left: auto; font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: inherit; }
.form-error { color: var(--danger); margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.form-done { border-left: 3px solid var(--ink); padding: 8px 12px; background: #f1f1ee; }
.form-done code { word-break: break-all; font-size: 13px; }
.point-picker summary, .upload > summary { cursor: pointer; }
.upload > summary { list-style: none; width: max-content; }
.upload > summary::-webkit-details-marker { display: none; }
.upload[open] > summary { margin-bottom: 16px; }
.upload { margin: 12px 0 24px; }
.previews { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.turnstile:empty { display: none; }

/* ---- messages ---- */
.messages { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.message { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.message:target { outline: 2px solid var(--ink); }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; color: var(--muted); }
.meta .report-btn { margin-left: auto; }
.report-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px 0; min-height: 32px; }

/* ---- gallery ---- */
.masonry { columns: 2 160px; column-gap: 10px; }
@media (min-width: 700px) { .masonry { columns: 3 220px; } }
.tile { break-inside: avoid; margin: 0 0 10px; display: block; width: 100%; padding: 0; border: 0; background: #ddd; border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.tile img { display: block; width: 100%; height: auto; }
.pinned { margin-bottom: 28px; }
.board-text { white-space: pre-wrap; }

/* ---- dialogs ---- */
dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: min(96vw, 1100px); }
dialog::backdrop { background: rgba(0,0,0,.82); }
.lightbox { background: #111; color: #fff; width: 96vw; }
.lb-close { position: absolute; right: 6px; top: 6px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 26px; cursor: pointer; }
.lb-body img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #000; }
.lb-info { padding: 12px 16px 16px; }
.lb-info p { margin: 0 0 6px; white-space: pre-wrap; }
.lightbox .meta, .lightbox .report-btn { color: #c8c8c8; }
.lightbox .message-body { color: #fff; }
.report { padding: 20px; width: min(92vw, 420px); }
.report h3 { margin-top: 0; }
.report fieldset { border: 0; padding: 0; display: grid; gap: 10px; margin: 0 0 16px; }

/* ---- pages ---- */
.prose { max-width: 680px; }
.prose h1 { font-size: 32px; line-height: 1.2; }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--ink); }
.timeline li { padding: 0 0 18px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.timeline time { font-size: 13px; color: var(--muted); display: block; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); text-align: center; padding: 32px 18px 48px; font-size: 14px; }
.footer p { margin: 6px 0; }
.love { color: var(--muted); }

/* ---- email action page ---- */
.act-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.act-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 460px; width: 100%; }
.act-card h1 { font-size: 20px; margin-top: 0; }
.act-card blockquote { border-left: 3px solid var(--ink); margin: 12px 0; padding-left: 12px; white-space: pre-wrap; }

/* ---- admin ---- */
.admin { max-width: 1200px; margin: 0 auto; padding: 16px; }
.admin h1 { font-size: 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs button { font: inherit; padding: 8px 14px; border: 1px solid var(--ink); background: #fff; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 6px; font-size: 14px; }
.item.flag { border-color: var(--danger); box-shadow: inset 4px 0 0 var(--danger); }
.item img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; background: #eee; }
.item .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.item .actions button, .admin .small-btn { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--ink); background: #fff; cursor: pointer; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.badge.bad { color: var(--danger); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 16px 0; }
.panel h2 { font-size: 18px; margin-top: 0; }
.admin textarea { width: 100%; min-height: 160px; font: 13px/1.5 ui-monospace, Menlo, monospace; padding: 8px; }
.admin input[type="text"], .admin input[type="number"], .admin input[type="date"] { font: inherit; padding: 6px 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; }
.pre { white-space: pre-wrap; }
.m0 { margin: 0; }
.inline { display: inline; }
@media (min-width: 900px) { .hero-text { max-width: none; margin: 0; padding: 0 48px; bottom: 72px; } }

/* display name row: name field, "anonymous" box, live hint */
.name-row { align-items: flex-end; }
.name-row .check { flex: none; padding-bottom: 10px; }
.name-hint { flex: 1 1 100%; }
.field input:disabled { opacity: .55; }
