:root {
  --accent: #0069d8;
  --blue: #0085ff;
  --ink: #10161d;
  --muted: #637386;
  --rule: #dfe5eb;
  --soft: #f1f3f6;
  --accent-soft: #eaf4ff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
svg { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
[hidden] { display: none !important; }
::selection { background: #cce6ff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 28px; max-width: 1440px; padding: 0 32px; margin: 0 auto; align-items: start; }
.brand { display: inline-flex; gap: 9px; align-items: center; color: var(--blue); font-size: 24px; font-weight: 750; line-height: 1.2; letter-spacing: -.8px; }
.brand svg { width: 28px; height: 28px; stroke-width: 2; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; color: var(--accent); background: var(--accent-soft); font-size: 20px; font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.main-column { min-width: 0; min-height: 100vh; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.page-header { display: flex; align-items: center; min-height: 66px; padding: 10px 20px; }
.page-header h1 { margin: 0; font-size: inherit; line-height: 1.2; }
.header-count { display: block; padding-left: 37px; color: var(--muted); font-size: 12px; }
.profile-header { border: 1px solid var(--rule); border-radius: 14px; background: #fff; }
.profile-banner { height: 72px; background: #e5f1ff; border-radius: 13px 13px 0 0; overflow: hidden; }
.profile-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-info { padding: 16px; }
.profile-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-identity > div { min-width: 0; }
.profile-avatar { flex-shrink: 0; }
.profile-avatar .avatar { width: 48px; height: 48px; font-size: 24px; }
.profile-button { display: flex; justify-content: center; gap: 7px; align-items: center; min-height: 36px; padding: 7px 12px; margin-top: 14px; border: 1px solid #ccd5df; border-radius: 22px; background: white; font-size: 12px; font-weight: 650; white-space: nowrap; }
.profile-button:hover { color: var(--ink); background: var(--soft); }
.profile-button svg { width: 14px; height: 14px; }
.profile-identity h2 { font-size: 20px; line-height: 1.25; letter-spacing: -.3px; font-weight: 750; margin: 0; overflow-wrap: anywhere; }
.profile-handle { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.profile-bio { margin: 14px 0 0; font-size: 13px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.profile-bio a { color: var(--accent); }
.profile-bio a:hover { text-decoration: underline; }
.garden-description { font-size: 12px; color: var(--muted); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); line-height: 1.6; }
.garden-description span { color: var(--accent); }
.collection { min-width: 0; min-height: calc(100svh - 76px); scroll-margin-top: 76px; overflow-anchor: none; }
.collection-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; min-width: 0; background: #fffffff5; backdrop-filter: blur(12px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.filter-strip { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; overflow-x: auto; padding: 10px 20px; scrollbar-width: thin; scrollbar-color: #ccd5df transparent; scroll-padding-inline: 20px; overscroll-behavior-x: contain; }
.view-switch { display: flex; flex-shrink: 0; gap: 2px; padding-left: 8px; margin: 0 12px 0 4px; border-left: 1px solid var(--rule); }
.view-switch button { display: grid; place-items: center; width: 38px; height: 40px; border-radius: 9px; color: var(--muted); }
.view-switch button:hover { background: var(--soft); }
.view-switch button[aria-pressed=true] { color: var(--accent); background: var(--accent-soft); }
.view-switch svg { width: 18px; height: 18px; }
.filter-strip > * { flex-shrink: 0; }
.filter-strip:focus-visible { outline-offset: -3px; }
.format-filter select { width: 130px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 22px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.dropdown-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 7px 11px 7px 13px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s; }
.format-filter .dropdown-trigger { width: 156px; }
.dropdown-trigger:hover { background: #f8fafc; border-color: #bdcbd9; }
.dropdown-trigger[aria-expanded=true], .dropdown[data-filtered=true] .dropdown-trigger { border-color: #b9d9fb; background: var(--accent-soft); color: var(--accent); }
.dropdown-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dropdown-value > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.dropdown-count { display: inline-flex; flex-shrink: 0; justify-content: center; align-items: center; min-width: 23px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dropdown-chevron { display: flex; color: var(--muted); transition: transform .15s; }
.dropdown-chevron svg { width: 16px; height: 16px; stroke-width: 1.8; }
.dropdown-trigger[aria-expanded=true] .dropdown-chevron { transform: rotate(180deg); color: var(--accent); }
.sort .dropdown-trigger { color: var(--muted); font-weight: 500; }
.dropdown-menu { position: fixed; z-index: 20; padding: 6px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--rule); border-radius: 15px; background: #fff; box-shadow: 0 12px 32px #182b441a, 0 2px 6px #182b440a; }
.dropdown-option { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 9px 10px; border-radius: 9px; font-size: 14px; cursor: pointer; user-select: none; }
.dropdown-option[data-active=true] { background: var(--soft); }
.dropdown-option[aria-selected=true] { color: var(--accent); font-weight: 600; }
.dropdown-option[aria-selected=true][data-active=true] { background: var(--accent-soft); }
.dropdown-option-icon { display: flex; color: var(--muted); }
.dropdown-option-icon svg, .dropdown-check svg { width: 18px; height: 18px; }
.dropdown-option[aria-selected=true] .dropdown-option-icon { color: var(--accent); }
.dropdown-option-label { flex: 1; }
.dropdown-check { display: flex; visibility: hidden; color: var(--accent); }
.dropdown-option[aria-selected=true] .dropdown-check { visibility: visible; }
.dropdown-option[aria-selected=true] .dropdown-count, .dropdown-trigger[aria-expanded=true] .dropdown-count, .dropdown[data-filtered=true] .dropdown-trigger .dropdown-count { background: #dcecff; color: var(--accent); }
.search { display: flex; align-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 22px; }
.search[data-expanded=true] { width: 220px; background: var(--soft); }
.search[data-expanded=true]:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.search button { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--muted); }
.search button:hover { color: var(--accent); background: var(--soft); }
.search-field { display: flex; align-items: center; flex: 1; min-width: 0; }
.search #search-close { flex-basis: 32px; width: 32px; margin-right: 4px; }
.search #search-close svg { width: 14px; height: 14px; }
.search svg { color: var(--muted); width: 18px; height: 18px; }
.search input { min-width: 0; width: 100%; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sort select { max-width: 125px; min-height: 40px; border: 0; color: var(--muted); background: transparent; font-size: 12px; padding: 8px 0; }
.collection-heading { padding: 12px 20px; border-bottom: 1px solid var(--rule); }
.collection-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.result-count { font-size: 12px; font-weight: 400; }
.entries { list-style: none; padding: 0; margin: 0; }
.entry { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 20px 16px; border-bottom: 1px solid var(--rule); }
.entry-body { flex: 1; min-width: 0; }
.entry h3 { font-size: 17px; font-weight: 650; line-height: 1.45; letter-spacing: -.15px; margin: 0 0 9px; overflow-wrap: anywhere; }
.outbound { display: inline-block; margin-left: 6px; color: var(--muted); }
.outbound svg { width: 12px; height: 12px; vertical-align: baseline; }
.entry-note { max-width: 80ch; margin: 0 0 14px; font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.mention { color: var(--accent); }
.mention:hover { text-decoration: underline; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 12px; }
.tag { padding: 2px 0; color: var(--accent); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; text-align: left; }
.tag:hover { text-decoration: underline; }
.tag[aria-pressed=true] { background: var(--accent-soft); border-radius: 4px; box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-tags { display: flex; align-items: center; gap: 2px; padding-left: 10px; border-left: 1px solid var(--rule); }
.filter-tags .tag { flex-shrink: 0; min-height: 40px; padding: 8px 10px; border-radius: 22px; white-space: nowrap; }
.filter-tags .tag:hover { background: var(--soft); text-decoration: none; }
.filter-tags .tag[aria-pressed=true] { background: var(--accent-soft); border-radius: 22px; box-shadow: none; }
.entry-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.entry-details { display: inline-flex; align-items: center; gap: 8px; }
.entry-date { white-space: nowrap; }
.entry-date::before { content: '·'; padding-right: 8px; }
.entry-format { display: flex; align-items: center; gap: 6px; }
.entry-format svg { width: 15px; height: 15px; }
.source-link { display: inline-flex; align-items: center; gap: 5px; }
.source-link svg { width: 12px; height: 12px; }
.entry-image { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 8px; overflow: hidden; }
.entry-image img { width: 100%; height: 100%; object-fit: cover; }
.garden-sidebar { position: sticky; top: 24px; margin-top: 24px; min-width: 0; max-height: calc(100svh - 112px); overflow-y: auto; scrollbar-width: thin; }
.about-garden { padding: 16px; margin-top: 16px; border-radius: 14px; background: #f1f7ff; }
.about-garden h2 { font-size: 15px; margin: 0 0 6px; letter-spacing: -.2px; }
.about-garden p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.about-garden strong { color: var(--accent); font-weight: 500; }
.site-note { color: var(--muted); font-size: 12px; line-height: 1.7; padding: 0 12px; margin-top: 20px; }
.site-note a { display: inline-block; margin-top: 5px; }
.empty-state { padding: 52px 24px; text-align: center; }
.empty-state > span { color: var(--blue); }
.empty-state > span svg { width: 40px; height: 40px; }
.empty-state h3 { font-size: 20px; margin: 14px 0 8px; }
.empty-state p { color: var(--muted); font-size: 15px; margin: 0 auto 18px; max-width: 320px; }
.empty-reset { color: var(--accent); font-size: 14px; font-weight: 600; }
footer { padding: 32px 24px calc(88px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }
.garden-badge { position: fixed; right: max(24px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 6; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--rule); border-radius: 24px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 550; box-shadow: 0 2px 12px #10161d0a; }
.garden-badge svg { width: 16px; height: 16px; color: var(--ink); }
.garden-badge:hover { color: var(--accent); border-color: #b3d8ff; background: #f7fbff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; background: #fff; color: var(--accent); padding: 12px 20px; border: 1px solid var(--accent); }
.skip-link:focus { top: 16px; }
/* Embedded media shares the same restrained frame as the collection cards. */
.entry-media { display: grid; gap: 14px; margin: 5px 0 4px; }
.media-panel { margin: 0; min-width: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 6px; background: var(--soft); }
.media-panel figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 9px 11px; border-top: 1px solid var(--rule); background: #fff; color: var(--muted); font-size: .6875rem; }
.media-panel figcaption a { white-space: nowrap; }
.media-panel figcaption svg { width: 10px; height: 10px; }
.full-image { display: flex; justify-content: center; align-items: center; background: var(--soft); min-height: 150px; }
.full-image img { display: block; width: 100%; height: auto; max-height: 400px; object-fit: contain; }
.image-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.image-gallery .full-image { aspect-ratio: 1; min-height: 0; }
.image-gallery .full-image img { max-height: 100%; height: 100%; object-fit: contain; }
.image-unavailable { min-height: 150px; padding: 24px; color: var(--accent); font-size: .8125rem; }
.video-stage { position: relative; display: grid; place-items: center; background: var(--soft); }
.video-stage video { display: block; width: 100%; height: auto; aspect-ratio: var(--media-ratio, 16/9); max-height: 360px; object-fit: contain; }
.media-loop .video-stage video { max-height: 230px; }
.video-activate { position: absolute; inset: 0; width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; background: linear-gradient(transparent, #172b4d30); color: white; text-shadow: 0 1px 8px #000; font-size: .8125rem; }
.video-activate > span:first-child { display: grid; place-items: center; height: 44px; width: 44px; padding-left: 3px; border-radius: 50%; background: #fff; color: var(--accent); font-size: .875rem; text-shadow: none; box-shadow: 0 2px 14px #172b4d26; }
.video-activate:hover > span:first-child { background: var(--accent); color: white; }
.video-activate:disabled { cursor: progress; }
.media-embed iframe { display: block; width: 100%; aspect-ratio: 16/9; min-height: 200px; border: 0; background: var(--soft); }
.media-embed-audio iframe { height: 180px; min-height: 180px; aspect-ratio: auto; }
.media-audio { padding: 16px 16px 0; }
.audio-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.audio-symbol { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--rule); border-radius: 7px; background: #fff; color: var(--accent); font-size: 1.25rem; }
.media-eyebrow { color: var(--accent); font-size: .6875rem; font-weight: 550; }
.audio-heading p { margin: 2px 0 0; font-size: .8125rem; }
.media-audio audio { display: block; width: 100%; margin: 0 0 16px; }
.media-audio figcaption { margin: 0 -16px; }
.media-error { color: var(--muted); font-size: .8125rem; margin: 0; padding: 12px; }
.entry-links { display: grid; gap: 10px; margin: 5px 0 4px; }
.link-preview { display: flex; align-items: center; gap: 12px; border: 1px solid var(--rule); border-radius: 6px; padding: 12px; background: var(--soft); }
.link-preview:hover { border-color: color-mix(in srgb, var(--accent) 35%, white); }
.link-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.link-preview > span { min-width: 0; flex: 1; }
.link-preview strong { display: block; font-size: .8125rem; font-weight: 550; overflow-wrap: anywhere; }
.link-preview small { display: block; margin-top: 3px; color: var(--muted); font-size: .6875rem; overflow-wrap: anywhere; }
.link-preview > svg { width: 14px; height: 14px; color: #7b8798; }

/* Media keeps Bluesky's rounded, edge-to-edge preview treatment. */
.media-panel { border-radius: 12px; }
.media-panel figcaption { padding: 10px 12px; font-size: 12px; }
.entry-media { margin-top: 12px; }
.entry-links { margin-top: 12px; }
.link-preview { border-radius: 12px; background: white; padding: 14px; }
.link-preview strong { font-size: 14px; }
.link-preview small { font-size: 12px; }

/* The grid remains readable before JavaScript measures the masonry cards. */
.entries[data-layout=masonry] { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: start; gap: 14px; padding: 16px; }
.entries[data-layout=masonry] .entry { display: block; margin: 0; padding: 14px; border: 1px solid var(--rule); border-radius: 14px; background: #fff; scroll-margin-top: 78px; }
.entries[data-layout=masonry].masonry-ready { display: block; }
.masonry-ready[data-layout=masonry] .entry { position: absolute; width: var(--card-width); }
.entries[data-layout=masonry] .entry h3 { font-size: 15px; line-height: 1.45; }
.entries[data-layout=masonry] .entry-note { font-size: 14px; line-height: 1.55; margin-bottom: 10px; }
.entries[data-layout=masonry] .entry-tags { gap: 2px 8px; margin-top: 10px; }
.entries[data-layout=masonry] .tag { font-size: 12px; }
.entries[data-layout=masonry] .entry-bottom { gap: 6px; margin-top: 12px; font-size: 11px; }
.entries[data-layout=masonry] .entry-format svg { width: 13px; height: 13px; }
.entries[data-layout=masonry] .entry-media, .entries[data-layout=masonry] .entry-links { margin-top: 10px; }
.entries[data-layout=masonry] .link-preview { padding: 10px; gap: 8px; }
.entries[data-layout=masonry] .link-preview img { width: 36px; height: 36px; }
.entries[data-layout=masonry] .link-preview strong { font-size: 12px; }
.entries[data-layout=masonry] .link-preview small { font-size: 11px; }
.entries[data-layout=masonry] .media-panel { border-radius: 9px; }
.entries[data-layout=masonry] .media-panel figcaption { font-size: 10px; padding: 8px; }
.entries[data-layout=masonry] .media-embed:not(.media-embed-audio) iframe { min-height: 0; }
.entries[data-layout=masonry] .video-stage video, .entries[data-layout=masonry] .full-image img { max-height: 240px; }
.entries[data-layout=masonry] .image-gallery { grid-template-columns: 1fr; }
.entries[data-layout=masonry] .entry-image { margin-top: 10px; }
@media (max-width: 960px) {
  .shell { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0 24px; }
  .main-column { display: contents; }
  .page-header { order: -2; }
  .garden-sidebar { position: static; order: -1; margin: 0; max-height: none; overflow: visible; }
  .garden-sidebar .about-garden, .garden-sidebar .site-note { display: none; }
  .profile-header { border: 0; border-radius: 0; }
  .profile-banner { display: none; }
  .profile-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 20px 18px; }
  .profile-button { margin: 0; }
  .profile-bio, .garden-description { grid-column: 1 / -1; margin: 0; }
  .garden-description { padding-top: 10px; }
}
@media (max-width: 680px) {
  .shell { padding: 0; }
  .main-column { border: 0; }
  .page-header { min-height: 60px; padding: 8px 16px; }
  .brand { font-size: 22px; }
  .garden-badge { right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); min-height: 44px; }
  .profile-info { padding: 12px 16px 18px; }
  .profile-button { min-height: 44px; padding-inline: 10px; }
  .filter-strip { padding: 8px 16px; gap: 8px; scroll-padding-inline: 16px; }
  .view-switch { margin-right: 8px; padding-left: 4px; }
  .view-switch button { width: 40px; height: 44px; }
  .entries[data-layout=masonry] { padding: 12px; gap: 12px; }
  .format-filter select { width: 140px; font-size: 16px; min-height: 44px; }
  .dropdown-trigger, .dropdown-option { min-height: 44px; }
  .search { width: 44px; height: 44px; }
  .search[data-expanded=true] { width: min(220px, calc(100vw - 140px)); }
  .search button { flex-basis: 44px; width: 44px; height: 44px; }
  .search input { font-size: 16px; }
  .search input::placeholder { font-size: 14px; }
  .filter-tags .tag { min-height: 44px; }
  .sort select { max-width: 125px; font-size: 16px; min-height: 44px; }
  .collection-heading { padding: 12px 16px; }
  .entry { gap: 10px; padding: 18px 14px; }
  .entry h3 { font-size: 16px; }
  .entry-note { font-size: 15px; }
  .entry-bottom { font-size: 11px; }
  .media-panel figcaption { font-size: 11px; padding: 9px 10px; }
  .image-gallery { grid-template-columns: 1fr; }
  .image-gallery .full-image { aspect-ratio: auto; }
  .entry-image { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
