/* 蛙跡回顧 — the same night pond and cream field-note cards as the map, laid out as a page you scroll */

:root {
  --ink: #0b1210;
  --ink-2: #111a16;
  --ink-3: #19261f;
  --line: rgba(246, 231, 193, .13);
  --line-2: rgba(246, 231, 193, .22);
  --yellow: #ffd23f;
  --green: #7ee081;
  --cream: #f6e7c1;
  --paper: #fffdf4;
  --paper-ink: #2b2315;
  --text: #e8efe9;
  --muted: #8da398;
  --font-display: 'Huninn', 'Noto Sans TC', system-ui, sans-serif;
  --font-body: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --pad: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  min-height: 100vh;
  background:
    radial-gradient(60vmax 40vmax at 12% -8%, rgba(126, 224, 129, .09), transparent 60%),
    radial-gradient(50vmax 36vmax at 100% 4%, rgba(255, 210, 63, .08), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  color: var(--text);
  font: 400 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.h-lock { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; fill: currentColor; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ───────── top bar and hero ───────── */
.h-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 760px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) var(--pad) 0;
}
.h-back {
  display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px 0 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); text-decoration: none; font-weight: 700; font-size: 14px;
  transition: background .2s, border-color .2s;
}
.h-back:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 210, 63, .5); }
.h-brand { font: 400 15px var(--font-display); letter-spacing: .12em; color: var(--muted); }

.h-main { max-width: 760px; margin: 0 auto; padding: 0 var(--pad) 72px; }
.h-hero { padding: 26px 0 8px; }
.h-hero h1 { font: 400 clamp(36px, 10vw, 54px)/1.08 var(--font-display); color: var(--yellow); letter-spacing: .02em; }
.h-lead { margin-top: 10px; max-width: 34em; color: var(--cream); line-height: 1.7; }
.h-lead b { font: 600 1.05em var(--font-mono); color: var(--yellow); }
.h-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.h-stats > div {
  padding: 10px 12px 11px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .035);
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; min-width: 0;
}
.h-stats dt { font-size: 12px; color: var(--muted); }
.h-stats dd { font: 600 24px/1.2 var(--font-mono); color: var(--cream); overflow-wrap: anywhere; }
.h-stats .h-hot { grid-column: 1 / -1; }
.h-stats .h-hot dd { font: 400 20px/1.3 var(--font-display); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.h-stats dd small { font: 600 12px var(--font-mono); color: var(--muted); }
@media (min-width: 640px) {
  .h-stats { grid-template-columns: 1fr 1fr 1fr 2fr; }
  .h-stats .h-hot { grid-column: auto; }
}

/* ───────── day strip ───────── */
.h-days { margin-top: 26px; }
.h-days-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.h-days h2 { font: 400 18px var(--font-display); }
.h-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.h-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.h-key .k-all { background: rgba(246, 231, 193, .32); }
.h-key .k-photo { background: var(--yellow); margin-left: 8px; }
.h-strip {
  display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; padding: 10px 2px 6px; margin: 0 -2px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.h-day { flex: 1 0 28px; max-width: 44px; display: grid; justify-items: center; gap: 2px; padding: 0 0 2px; border-radius: 8px; }
.h-day:hover:not(.zero) .h-bar { background: rgba(246, 231, 193, .5); }
.h-bar {
  position: relative; display: flex; align-items: flex-end; width: min(22px, 70%); height: max(4px, calc(var(--n) * 64px)); border-radius: 5px 5px 2px 2px;
  background: rgba(246, 231, 193, .32); overflow: hidden; transition: background .2s;
}
.h-bar b { display: block; width: 100%; height: calc(var(--p) * 100%); background: var(--yellow); }
.h-day.zero { cursor: default; }
.h-day.zero .h-bar { height: 3px; background: transparent; border-top: 2px dashed var(--line-2); border-radius: 0; }
.h-dn { font: 600 11px var(--font-mono); color: var(--cream); }
.h-day.zero .h-dn { color: var(--muted); }
.h-day small { height: 14px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* ───────── filters ───────── */
.h-filters { display: grid; gap: 8px; margin-top: 20px; }
.h-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.h-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-seg { display: inline-flex; padding: 3px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); }
.h-seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: background .2s, color .2s; }
.h-seg button[aria-pressed="true"] { background: var(--yellow); color: #2a1d00; }
.h-toggle, .h-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px; flex: none; white-space: nowrap;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); font-weight: 500; font-size: 13.5px;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.h-toggle:hover:not(:disabled), .h-chip:hover { border-color: rgba(255, 210, 63, .5); }
.h-toggle:active, .h-chip:active { transform: scale(.96); }
.h-toggle[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #2a1d00; font-weight: 700; }
.h-toggle:disabled { cursor: default; opacity: .75; }
.h-chip small { font: 600 11px var(--font-mono); color: var(--muted); }
.h-chip .ico { color: var(--c, var(--cream)); --cut: var(--ink-2); }
#f-campus .h-chip { height: 32px; font-size: 13px; }
.h-chip[aria-pressed="true"] { background: var(--c, var(--cream)); border-color: var(--c, var(--cream)); color: #1a1305; font-weight: 700; }
.h-chip[aria-pressed="true"] small { color: rgba(26, 19, 5, .65); }
.h-chip[aria-pressed="true"] .ico { color: #1a1305; --cut: var(--c, var(--cream)); }

.h-listbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 4px; }
.h-count { font-size: 13px; color: var(--muted); }
.h-count b { font: 600 14px var(--font-mono); color: var(--cream); }
.h-order { flex: none; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .2s, border-color .2s; }
.h-order:hover { border-color: rgba(255, 210, 63, .5); }
.h-link { font: inherit; color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }

/* ───────── the feed, by day ───────── */
.h-dayhead {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 0 calc(var(--pad) * -1); padding: 12px var(--pad) 10px;
  background: rgba(11, 18, 16, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); font: 400 20px/1.3 var(--font-display);
}
.h-dayhead small { font: 600 12px var(--font-mono); color: var(--muted); }
.h-daysec { padding-bottom: 14px; }
.h-daysec.flash .h-dayhead { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { background: rgba(255, 210, 63, .5); } 100% { background: rgba(11, 18, 16, .9); } }

.h-list { padding-top: 14px; }
.h-item { position: relative; padding: 0 0 14px 74px; }
.h-item::before { content: ''; position: absolute; left: 61px; top: 20px; bottom: -2px; border-left: 2px solid var(--line); }
.h-item:last-child::before { display: none; }
.h-time { position: absolute; left: 0; top: 3px; width: 46px; text-align: right; font: 600 12.5px/1.5 var(--font-mono); color: var(--muted); }
.h-item::after { content: ''; position: absolute; left: 54px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 3px solid var(--ink); box-shadow: 0 0 0 2px rgba(246, 231, 193, .28); }
.h-item.has-photo::after { left: 52px; top: 3px; width: 20px; height: 20px; border-radius: 6px; border-bottom-width: 5px; }
.h-item.no-photo::after { background: transparent; border: 2px dashed rgba(246, 231, 193, .5); box-shadow: none; }

.h-card { border-radius: 14px; min-width: 0; }
.h-body { display: grid; gap: 3px; min-width: 0; }
.h-item.has-photo .h-card { overflow: hidden; background: var(--paper); color: var(--paper-ink); border: 1px solid rgba(43, 35, 21, .2); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.h-item.has-photo .h-body { padding: 10px 13px 12px; }
.h-item.no-photo .h-card { padding: 9px 13px 10px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .025); color: var(--cream); }
.h-item.no-photo .h-body { opacity: .86; }
.h-item.gone .h-card { opacity: .55; }

.h-shot { position: relative; display: block; width: 100%; background: rgba(43, 35, 21, .12); cursor: zoom-in; }
.h-shot img { display: block; width: 100%; max-height: 340px; min-height: 120px; object-fit: cover; object-position: center 40%; }
.h-shot b { position: absolute; right: 8px; bottom: 8px; padding: 1px 9px; border-radius: 999px; background: rgba(26, 19, 5, .8); color: #fff1a8; font: 700 12px/1.6 var(--font-mono); }

.h-title { display: flex; align-items: center; gap: 7px; font: 700 15.5px/1.4 var(--font-body); }
.h-title .ico { width: 20px; height: 20px; color: var(--c); --cut: var(--ink); }
.h-item.has-photo .h-title .ico { color: var(--d); --cut: var(--paper); }
.h-tag { font-style: normal; font-weight: 600; font-size: 11.5px; line-height: 1.5; padding: 0 8px; border-radius: 999px; border: 1px solid rgba(255, 210, 63, .55); color: var(--yellow); }
.h-place { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; }
.h-place .ico { width: 15px; height: 15px; opacity: .7; }
.h-place span { font-size: 12px; opacity: .65; }
.h-note { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.h-item.has-photo .h-note { color: rgba(43, 35, 21, .85); }
.h-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-top: 2px; font-size: 12.5px; opacity: .8; }
.h-seen { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #1f8a3c; }
.h-item.no-photo .h-seen { color: var(--green); }
.h-seen .ico { width: 14px; height: 14px; }
.h-meta a { margin-left: auto; font-weight: 700; text-underline-offset: 3px; }

@media (min-width: 640px) {
  .h-item.has-photo .h-card { display: grid; grid-template-columns: 230px 1fr; }
  .h-item.has-photo .h-shot { height: 100%; min-height: 230px; }
  .h-item.has-photo .h-shot img { position: absolute; inset: 0; height: 100%; max-height: none; object-position: center; }
  .h-item.has-photo .h-body { align-content: center; padding: 14px 18px; }
}

/* photo wall */
.h-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding-top: 14px; }
@media (min-width: 560px) { .h-wall { grid-template-columns: repeat(3, 1fr); } }
.h-tile button { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; background: var(--ink-3); border-bottom: 4px solid var(--c); cursor: zoom-in; }
.h-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.h-tile button:hover img { transform: scale(1.05); }
.h-tile i { position: absolute; top: 8px; right: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(26, 19, 5, .8); color: #fff1a8; font: 700 12px/1.6 var(--font-mono); font-style: normal; }
.h-tile-cap { position: absolute; inset: auto 0 0 0; display: grid; gap: 1px; padding: 28px 10px 9px; text-align: left; background: linear-gradient(0deg, rgba(5, 9, 7, .85), transparent); }
.h-tile-cap b { font-size: 14px; line-height: 1.35; color: #fff6d8; }
.h-tile-cap small { font-size: 11.5px; color: var(--cream); opacity: .85; }

.h-empty { padding: 28px 0; color: var(--muted); text-align: center; }
.h-more { padding: 22px 0 6px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.h-btn { height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); font-weight: 700; }
.h-btn:hover { border-color: rgba(255, 210, 63, .5); }
.h-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); text-align: center; }
.h-foot a { margin-left: 8px; color: var(--yellow); text-underline-offset: 3px; }

/* ───────── photo viewer ───────── */
.h-lb { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 56px 12px 16px; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.h-lb-scrim { position: absolute; inset: 0; background: rgba(4, 8, 6, .92); }
.h-lb-fig { position: relative; display: grid; gap: 10px; width: min(560px, 100%); max-height: 100%; justify-items: center; }
.h-lb-fig img { display: block; max-width: 100%; max-height: 66vh; border-radius: 8px; background: var(--ink-3); object-fit: contain; }
.h-lb-fig figcaption { width: 100%; max-height: 22vh; overflow-y: auto; color: var(--cream); font-size: 14px; line-height: 1.6; text-align: left; }
.h-lb-fig figcaption b { color: var(--yellow); }
.h-lb-fig figcaption small { color: var(--muted); font-size: 12.5px; }
.h-lb-fig figcaption p { margin-top: 2px; }
.h-lb-fig figcaption a { display: inline-block; margin-top: 4px; color: var(--yellow); font-weight: 700; text-underline-offset: 3px; }
.h-lb-btn { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(11, 18, 16, .6); border: 1px solid var(--line-2); transition: background .2s; }
.h-lb-btn:hover { background: rgba(11, 18, 16, .85); }
.h-lb-btn .ico { width: 22px; height: 22px; }
.h-lb-close { top: max(10px, env(safe-area-inset-top)); right: 12px; }
.h-lb-prev, .h-lb-next { top: 32vh; }
.h-lb-prev { left: 8px; }
.h-lb-next { right: 8px; }
.h-lb.single .h-lb-prev, .h-lb.single .h-lb-next { display: none; }
.h-lb-count { position: absolute; top: max(22px, calc(env(safe-area-inset-top) + 12px)); left: 16px; z-index: 2; font: 600 12.5px var(--font-mono); color: var(--cream); }

@media (min-width: 900px) {
  .h-lb-prev { left: calc(50% - 360px); }
  .h-lb-next { right: calc(50% - 360px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
