@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo Narrow'; font-weight: 400; font-display: swap; src: url(/fonts/archivo-narrow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo Narrow'; font-weight: 600; font-display: swap; src: url(/fonts/archivo-narrow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(/fonts/instrument-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(/fonts/instrument-sans-latin-600-normal.woff2) format('woff2'); }

:root {
  --bg: #fdfbf7;
  --ink: #1b1b1b;
  --muted: #595959;
  --rule: #d6d6d6;
  --grey: #ececec;
  --red: #d8281f;
  --red-dark: #b01f17;
  --green: #1d4a37;
  --display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --narrow: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --arch: 84px;
}
@media (min-width: 720px) { :root { --arch: 120px; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-variant-numeric: lining-nums; font-family: var(--display); font-weight: 500; color: var(--ink); line-height: 1.1; margin: 0; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.top { background: #fff; position: relative; z-index: 20; }
.top-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1180px; margin: 0 auto; padding: 0 20px; min-height: 64px; border-bottom: 1px solid var(--rule); }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.9rem; letter-spacing: -.01em; text-decoration: none; text-transform: none; color: var(--ink); line-height: 1; }
.links { display: flex; gap: 22px; align-items: center; font-size: .82rem; }
.links a, .links button { text-decoration: none; background: none; border: 0; padding: 14px 0; cursor: pointer; color: var(--ink); font-size: inherit; min-height: 44px; display: inline-flex; align-items: center; }
.links a:hover, .links button:hover { text-decoration: underline; text-underline-offset: 4px; }
.icons { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.icons a, .icons button { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: var(--ink); text-decoration: none; }
.icons svg, .burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icons .who { font-size: .8rem; color: var(--muted); margin-right: 4px; }
.burger { display: none; width: 44px; height: 44px; margin-left: -12px; background: none; border: 0; cursor: pointer; color: var(--ink); place-items: center; }
.leftcol { display: flex; align-items: center; }
@media (max-width: 719px) {
  .top-in { grid-template-columns: auto 1fr auto; gap: 4px; min-height: 56px; }
  .brand { font-size: 1.6rem; justify-self: start; }
  .burger { display: grid; }
  .leftcol { display: contents; }
  .links { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 20px 12px; border-bottom: 1px solid var(--rule); font-size: 1rem; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .links.open { display: flex; }
  .links a, .links button { border-top: 1px solid var(--grey); }
  .icons .who { display: none; }
}

main { flex: 1; width: 100%; }
.page { max-width: 1180px; margin: 0 auto; padding: 8px 20px 80px; }

/* ---------- buttons & fields ---------- */
.btn, .cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--red); background: var(--red); color: #fff; padding: 12px 34px; border-radius: 0; font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover, .cta:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn:active, .cta:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); }
.btn.small { padding: 8px 18px; min-height: 44px; }
.btn.link { border: 0; background: none; color: var(--muted); padding: 8px 8px; min-height: 44px; font-family: var(--sans); font-size: .85rem; font-weight: 400; letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; }
.btn.link:hover { background: none; color: var(--ink); }
.btn.link.danger:hover { color: var(--red-dark); }
.btn[disabled] { opacity: .55; cursor: default; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid #bdbdbd; border-radius: 0; background: #fff; min-height: 44px; }
select { cursor: pointer; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
a:focus-visible, button:focus-visible, .cta:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.hero a:focus-visible, .hero button:focus-visible { outline-color: #fff; }
label { display: block; font-size: .9rem; font-weight: 600; margin: 16px 0 5px; }
label .opt { font-weight: 400; color: var(--muted); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.row .narrow { flex: 0 0 104px; }
.err { color: var(--red-dark); font-size: .92rem; margin-top: 10px; min-height: 1.3em; }
.hint { font-size: .9rem; color: var(--muted); margin: 8px 0 0; }
.hint.warn { color: #6b4500; background: #fff1cc; padding: 9px 12px; }
.hint.ok { color: var(--green); }

/* ---------- landing ---------- */
.hero { position: relative; min-height: 440px; display: grid; place-items: center; text-align: center; padding: 72px 20px; color: #fff; background: #26261f center/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.hero-in { position: relative; max-width: 760px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 500; }
.hero p { margin: 18px auto 26px; max-width: 34em; font-size: .98rem; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.section { max-width: 1180px; margin: 0 auto; padding: 56px 20px 8px; scroll-margin-top: 12px; }
.section > h2 { margin-bottom: 28px; }
.twoviews { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; max-width: 640px; }
.twoviews .cap { font-size: .9rem; margin-bottom: 8px; color: var(--muted); }
.section .explain { max-width: 34em; margin: 22px 0 0; color: var(--muted); }
.panel { max-width: 440px; border: 1px solid var(--rule); background: #fff; padding: 26px; }
.tabs { display: flex; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px 0 12px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--red); }
.credit { text-align: center; color: var(--muted); font-size: .8rem; padding: 40px 20px 28px; }

/* ---------- page heads ---------- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 34px 0 22px; }
.head .sub { color: var(--muted); margin-top: 8px; }
.total { text-align: right; font-family: var(--narrow); }
.total .l { display: block; font-size: .85rem; color: var(--muted); }
.total .n { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.back { display: inline-block; color: var(--muted); font-size: .9rem; margin-top: 18px; padding: 6px 0; }
.headlinks { display: flex; gap: 6px; margin: 6px 0 0 -8px; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- arch cards (items + lists) ---------- */
.items, .grid-lists { display: grid; gap: 34px 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .items { grid-template-columns: repeat(3, 1fr); gap: 44px 28px; } .grid-lists { grid-template-columns: repeat(3, 1fr); gap: 44px 28px; } }
@media (min-width: 1000px) { .items { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 360px) { .items, .grid-lists { grid-template-columns: 1fr; } }
.item, .lcard { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit; }
.card { border: 1px solid var(--rule); border-radius: var(--arch) var(--arch) 0 0; overflow: hidden; background: #fff; display: flex; flex-direction: column; position: relative; }
.item:hover .card, .lcard:hover .card { border-color: var(--ink); }
.pic { display: block; aspect-ratio: 1 / 1.04; background: var(--grey); position: relative; }
.pic img { width: 100%; height: 100%; object-fit: contain; padding: 16% 10% 6%; mix-blend-mode: multiply; }
.ph { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--display); font-size: 3.6rem; color: #8a8a8a; background: var(--grey); }
.label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px 11px; border-top: 1px solid var(--rule); font-family: var(--narrow); font-size: .98rem; line-height: 1.25; background: #fff; }
.label .nm { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; padding: 2px 0; }
a.nm:hover { text-decoration: underline; text-underline-offset: 3px; }
.label .pr { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.label .pr.none { font-weight: 400; color: var(--muted); }
.under { padding: 8px 2px 0; font-size: .88rem; color: var(--muted); }
.under .note { font-style: italic; }
.acts { display: flex; gap: 2px; margin: 2px 0 0 -8px; flex-wrap: wrap; align-items: center; }
.acts .btn.small { margin-left: 8px; margin-top: 6px; }
.item.claimed .pic img { opacity: .35; }
.item.claimed .nm { color: var(--muted); }
.badge { position: absolute; z-index: 1; top: 14px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 12px; }
.takenby { color: var(--red-dark); font-size: .88rem; font-weight: 600; flex: 0 0 100%; margin: 6px 0 0 8px; }
.collage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; aspect-ratio: 1 / .8; background: var(--grey); }
.collage.one { grid-template-columns: 1fr; }
.collage img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.collage .blank { grid-column: 1/-1; grid-row: 1/-1; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.lcard .label .nm { -webkit-line-clamp: 2; }
.lsub { padding: 8px 2px 0; font-size: .88rem; color: var(--muted); }

/* ---------- share + notes ---------- */
.share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.share .lbl { font-weight: 600; flex: 0 0 100%; font-size: .95rem; }
.share code { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; background: #fff; padding: 10px 12px; font-size: .85rem; border: 1px solid #bdbdbd; cursor: pointer; }
.note-line { color: var(--muted); font-size: .93rem; margin: 12px 0 0; max-width: 60ch; }
.banner { border-left: 3px solid var(--red); background: #fbeceb; color: #5e1a16; padding: 12px 16px; margin: 4px 0 6px; font-size: .95rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 26px; gap: 10px; flex-wrap: wrap; }
.newlist { display: flex; gap: 10px; margin: 0 0 40px; flex-wrap: wrap; max-width: 640px; }
.newlist input { flex: 1 1 240px; }
.empty-state { padding: 40px 0; color: var(--muted); max-width: 46ch; }
.empty-state h2 { margin-bottom: 10px; color: var(--ink); }
.empty-state .btn { margin-top: 16px; }

/* ---------- dialogs (native <dialog>) ---------- */
dialog.modal { border: 0; padding: 0; background: #fff; color: var(--ink); width: 100%; max-width: 500px; max-height: 94vh; margin: auto auto 0; border-radius: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: auto; }
dialog.modal::backdrop { background: rgba(0,0,0,.55); }
@media (min-width: 640px) { dialog.modal { margin: auto; } }
.mform { padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); }
.mform h2 { margin-bottom: 4px; font-size: 1.8rem; }
.mform .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.preview { display: flex; gap: 14px; margin: 16px 0 0; padding: 10px; background: var(--grey); align-items: center; }
.preview img, .preview .ph { width: 76px; height: 76px; object-fit: contain; flex: none; font-size: 1.8rem; mix-blend-mode: multiply; }
.preview b { font-family: var(--narrow); font-weight: 600; }
.spin { width: 16px; height: 16px; border: 2.5px solid rgba(0,0,0,.2); border-top-color: var(--ink); border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: var(--ink); color: #fff; padding: 11px 20px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 99; font-size: .92rem; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { color: var(--muted); padding: 60px 20px; max-width: 1180px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }
