/* Coflourish. Are.na skeleton (breadcrumb, labelled meta columns, square grid, connection rows) set in dylan music serif. White ground, single theme. */
:root {
  --bg: #FFFFFF;
  --fg: #111111;
  --ink-2: #2A2724;
  --muted: #6A6560;
  --faint: #8A8580;
  --line: #E5E2DE;
  --line-soft: #F0EEEB;
  --chip: #EFEEEC;
  --row: #F6F5F3;
  --sage: #4E6B61;
  --sage-ink: #3F5A51;
  --sage-line: #7F9A90;
  --sage-bg: #F4F7F5;
  --sage-chip: #E3EBE7;
  --serif: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --serif-cn: "Noto Serif SC", "Songti SC", Georgia, serif;
  --ui: Inter, "Noto Sans SC", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--fg); font-family: var(--serif); font-size: 18px; font-variant-numeric: oldstyle-nums; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .wrap { padding-left: max(56px, env(safe-area-inset-left, 0px)); padding-right: max(56px, env(safe-area-inset-right, 0px)); } }

/* header */
.top { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 14px; }
.mark { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
.nav { display: flex; gap: 22px; font-size: 19px; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--fg); }

/* Are.na-style compact buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 3px; font-family: var(--ui); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-dark { background: var(--fg); color: var(--bg); }
.btn-grey { background: var(--chip); color: var(--fg); }
.btn-sage { background: var(--sage-ink); color: #FFFFFF; }
.btn-sage-soft { background: var(--sage-chip); color: #2F463E; }
.btn:disabled { opacity: .45; cursor: default; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 16px; }

/* channel header */
.crumb { margin: 36px 0 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 500; line-height: 1.25; text-wrap: balance; }
.crumb .parent { color: var(--faint); text-decoration: none; }
.crumb .sep { margin: 0 10px; color: #C9C5C0; }
.crumb .cn { font-family: var(--serif-cn); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 24px; margin-top: 36px; }
.meta section { min-width: 0; }
.label { padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.prose { margin: 12px 0 0; font-family: var(--serif-cn); font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.small-cn { font-family: var(--serif-cn); font-size: 12px; line-height: 1.7; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 17px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }
.track { list-style: none; margin: 12px 0 0; padding: 0; border-left: 3px solid var(--chip); display: flex; flex-direction: column; align-items: stretch; }
.track > * { margin-left: -3px; border: 0; border-left: 3px solid transparent; background: none; padding: 3px 0 3px 10px; text-align: left; font-size: 18px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.track button { cursor: pointer; }
.track .on { border-left-color: var(--fg); color: var(--fg); font-weight: 600; }
.track .n { font-weight: 400; color: var(--muted); font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 48px 16px; margin-top: 64px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 56px 16px; } }
.cell { display: block; text-decoration: none; color: var(--fg); min-width: 0; }
.sq { position: relative; aspect-ratio: 1 / 1; max-width: 100%; overflow: hidden; }
.sq img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-text { border: 1px solid #DEDAD5; padding: 12px 14px; white-space: pre-line; font-family: var(--serif-cn); font-size: 14px; line-height: 1.8; }
.t-album { border: 1px solid #DEDAD5; padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; }
.t-album .tt { font-size: 21px; font-weight: 500; line-height: 1.15; overflow-wrap: anywhere; }
.t-album .aa { margin-top: 4px; font-size: 15px; font-style: italic; color: var(--muted); }
.t-song { padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.t-song .tt { font-size: 25px; font-weight: 500; line-height: 1.1; }
.t-song .aa { margin-top: 4px; font-size: 16px; font-style: italic; }
.t-photo { position: absolute; inset: 8% 10%; padding: 12px; display: flex; align-items: flex-end; font-family: var(--serif-cn); font-size: 11px; }
.t-place { background: #F6F3EE; padding: 12px 14px; font-family: var(--serif-cn); font-size: 15px; font-weight: 500; line-height: 1.6; }
.t-channel { border: 1px solid var(--fg); padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.t-channel .tt { font-family: var(--serif-cn); font-size: 18px; font-weight: 500; }
.t-agent { border: 1px dashed var(--sage-line); background: var(--sage-bg); padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; color: var(--sage-ink); }
.it { font-style: italic; color: var(--sage); font-size: 15px; }
.badge { position: absolute; right: 8px; bottom: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 2px; background: var(--chip); color: #5E5A57; font-family: var(--ui); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.cap { margin-top: 12px; text-align: center; font-size: 16px; line-height: 1.3; color: #3A3734; overflow-wrap: anywhere; }
.by { margin-top: 2px; text-align: center; font-size: 15px; color: var(--muted); }
.by.agent { color: var(--sage); font-style: italic; }
.mine { color: var(--fg); font-weight: 600; }

.search { display: flex; align-items: center; gap: 10px; margin-top: 40px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--serif); font-size: 20px; color: var(--fg); }
.search input:focus-visible { outline: none; }
.more { display: flex; justify-content: center; margin-top: 48px; }

/* block page */
.block { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line-soft); margin-top: 8px; }
.stage { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 16px; }
.stage .sq { width: min(440px, 100%); }
.side { flex: 1 1 340px; max-width: 100%; border-left: 1px solid var(--line-soft); padding: 28px 0 28px 24px; min-width: 0; }
@media (max-width: 800px) { .side { border-left: 0; padding-left: 0; } }
.side h1 { margin: 0; font-family: var(--serif-cn); font-size: 22px; font-weight: 500; }
.connect { margin-top: 16px; padding: 10px; border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.picker { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.picker button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 0; background: var(--row); font-size: 17px; cursor: pointer; text-align: left; }
.picker button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; border-bottom: 1px solid var(--line); }
.tabs button { height: 40px; border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.rowhead { display: flex; justify-content: space-between; margin-top: 14px; font-size: 15px; color: var(--muted); }
.rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; background: var(--row); text-decoration: none; font-size: 18px; }
.row .n { font-size: 14px; color: var(--muted); }
.row .who { font-size: 16px; color: #3A3734; text-align: right; }
.agentbox { margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--sage-line); background: var(--sage-bg); color: var(--sage-ink); }
.quote { margin: 10px 0 0; font-family: var(--serif-cn); font-size: 15px; line-height: 1.85; color: var(--ink-2); }

/* me */
.me-head { margin-top: 36px; }
.me-head h1 { margin: 0; font-size: 44px; font-weight: 500; line-height: 1; }
.subtabs { display: flex; gap: 28px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.subtabs button { height: 44px; border: 0; background: none; padding: 0; font-size: 20px; color: var(--muted); cursor: pointer; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.subtabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 40px; margin-top: 24px; }
.guess { padding: 10px 12px; border: 1px dashed var(--sage-line); background: var(--sage-bg); }
.guess p { margin: 0; font-family: var(--serif-cn); font-size: 14px; line-height: 1.7; color: var(--sage-ink); }
.guess input { width: 100%; font-family: var(--serif-cn); font-size: 14px; padding: 6px 8px; border: 1px solid var(--sage-line); background: #FFFFFF; color: var(--fg); }
.blank { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }

/* modal */
.scrim { position: fixed; inset: 0; background: rgba(17,17,17,.28); display: flex; align-items: flex-start; justify-content: center; padding: calc(env(safe-area-inset-top, 0px) + 6vh) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); z-index: 20; overflow-y: auto; }
.sheet { width: min(640px, 100%); background: var(--bg); padding: 24px; border: 1px solid var(--line); }
.sheet h2 { margin: 0; font-size: 28px; font-weight: 500; }
.picklist { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; max-height: 300px; overflow-y: auto; }
.picklist button { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 0; background: var(--row); text-align: left; cursor: pointer; font-size: 17px; }
.picklist button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.picklist .who { color: var(--muted); font-style: italic; }
.picklist button[aria-pressed="true"] .who { color: #D8D4CF; }
textarea { width: 100%; min-height: 96px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); font-family: var(--serif-cn); font-size: 15px; line-height: 1.8; color: var(--fg); background: var(--bg); resize: vertical; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); background: var(--fg); color: var(--bg); padding: 10px 16px; font-family: var(--ui); font-size: 13px; font-weight: 600; z-index: 30; }
.foot { margin-top: 88px; padding-block: 18px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
@media (prefers-reduced-motion: no-preference) { .cell .sq { transition: opacity .15s; } .cell:hover .sq { opacity: .9; } }
</style>

/* real-app additions */
.field { display: block; width: 100%; height: 40px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 0; background: var(--bg); color: var(--fg); font-family: var(--serif); font-size: 18px; }
.field:focus-visible, textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 0; }
.flabel { display: block; margin-top: 16px; font-size: 17px; }
.t-link { border: 1px solid #DEDAD5; padding: 12px 14px; display: flex; flex-direction: column; justify-content: flex-end; }
.t-link .tt { font-size: 20px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.t-link .aa { margin-top: 4px; font-size: 15px; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.t-text { overflow: hidden; }
.t-channel .n { color: var(--muted); font-size: 16px; }
.sublabel { margin-top: 72px; }
.tokenbox { margin-top: 10px; padding: 10px 12px; background: var(--row); font-family: ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.6; word-break: break-all; }
.empty { margin-top: 40px; }
.choice { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.choice button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.landing { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.signin { width: 100%; max-width: 360px; }
.landing h1 { margin: 0; font-size: clamp(44px, 7vw, 72px); font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.err { margin-top: 8px; color: #8A2B2B; font-family: var(--serif-cn); font-size: 13px; }
