:root {
  color-scheme: dark;
  font-family: "Instrument Sans", system-ui, sans-serif;
  --base: #09090b;
  --card: #151416;
  --ink: #f9f4ed;
  --quiet: #bbb2a9;
  --rule: #37312e;
  --accent: #f3a878;
  --spectrum: linear-gradient(90deg, #ff9253, #e847ce 25%, #527bff 49%, #31e7fa 72%, #4de994);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--base); color: var(--ink); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.top { position: sticky; top: 0; z-index: 1; background: #09090bf7; border-bottom: 1px solid var(--rule); }
.top-inner { max-width: 1240px; height: 64px; margin: auto; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.home, .rss { font-size: .84rem; color: var(--quiet); }
.rss { justify-self: end; }
.brand { font: italic 1.4rem Georgia, serif; }
.brand span { font: 600 .64rem system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); vertical-align: middle; }
main { width: min(100% - 32px, 810px); margin: auto; padding-bottom: 72px; }
.profile { position: relative; isolation: isolate; display: flex; align-items: center; gap: clamp(18px, 5vw, 40px); padding: 45px 14px 37px; }
.profile-ribbons { position: absolute; z-index: -1; inset: 0 0 0 auto; width: 57%; height: 100%; pointer-events: none; mask-image: linear-gradient(90deg, transparent, #000 36%, #000 83%, transparent); }
.profile-copy { min-width: 0; max-width: 370px; overflow-wrap: anywhere; text-shadow: 0 1px 12px #09090b, 0 0 4px #09090b; }
.avatar, .mini-avatar { display: grid; place-items: center; flex: none; border-radius: 50%; font: italic 3.4rem Georgia, serif; color: #19100f; background: radial-gradient(circle at 29% 23%, #f9c99d, #e88769 46%, #be5262 83%); }
.avatar { width: clamp(74px, 16vw, 111px); aspect-ratio: 1; border: 4px solid var(--base); outline: 1px solid #f3a878a8; }
.handle { color: var(--accent); font-size: .83rem; font-weight: 650; }
h1 { font: 400 clamp(2.45rem, 7vw, 4.25rem)/1 Georgia, serif; margin: 6px 0 9px; letter-spacing: -.055em; }
.profile p { margin: 0; color: var(--quiet); font-size: .92rem; line-height: 1.5; }
.toolbar { display: flex; align-items: stretch; justify-content: space-between; border-block: 1px solid var(--rule); }
.views { display: flex; gap: clamp(7px, 3vw, 29px); }
.views button, #refresh { min-height: 48px; padding: 0 12px; color: var(--quiet); }
.views button[aria-pressed="true"] { color: var(--ink); background: var(--spectrum) bottom / calc(100% - 24px) 2px no-repeat; }
.views button:hover, #refresh:hover, .save:hover { color: var(--accent); }
.views span { margin-right: 3px; }
#refresh { min-width: 48px; font-size: 1.35rem; }
#source-panel { padding: 15px 10px; border-bottom: 1px solid var(--rule); font-size: .88rem; }
.source-controls { display: flex; gap: 10px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.source-controls input { flex: 1; min-width: 180px; padding: 9px; font: inherit; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; }
.source-controls button { padding: 7px; color: var(--accent); }
.source-controls a, #source-message { color: var(--quiet); }
#status { margin: 18px auto; max-width: 608px; color: var(--quiet); font-size: .88rem; }
#status:empty { margin-top: 0; }
#posts { display: grid; gap: 24px; max-width: 608px; margin: 22px auto 0; }
.post { min-width: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 13px; overflow: hidden; }
.byline { min-height: 55px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: .84rem; font-weight: 650; }
.mini-avatar { width: 29px; height: 29px; font-size: 1.05rem; }
time { margin-left: auto; font-size: .75rem; color: var(--quiet); font-weight: 400; }
.cover { display: grid; place-items: center; overflow: hidden; background: #0a090b; }
.cover img { display: block; width: 100%; max-height: 630px; object-fit: contain; background: #0a090b; }
.carousel .cover { width: 100%; aspect-ratio: var(--slide-ratio, 1); max-height: 630px; touch-action: pan-y pinch-zoom; }
.carousel .cover img { height: 100%; min-height: 0; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: clamp(0px, 2vw, 12px); background: #0a090b; }
.carousel-controls button { min-width: 44px; min-height: 44px; font-size: .875rem; }
.carousel-controls button[aria-disabled="true"] { opacity: .45; cursor: default; }
.carousel-controls button[aria-disabled="false"]:hover { color: var(--accent); }
.carousel-controls button:focus-visible { outline-offset: -3px; }
.carousel-position { min-width: 3em; text-align: center; color: var(--quiet); font-size: .875rem; font-variant-numeric: tabular-nums; }
.caption { padding: 15px 16px 17px; position: relative; min-height: 62px; }
.caption h2 { margin: 0 42px 4px 0; font-size: 1rem; }
.caption p { color: var(--quiet); margin: 0 34px 0 0; font-size: .89rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.caption p:empty { display: none; }
.save { display: grid; place-items: center; position: absolute; right: 6px; top: 5px; width: 44px; height: 44px; }
.save[aria-pressed="true"] { color: #59e7eb; }
.save[aria-pressed="true"] path { fill: currentColor; }
.post--text { background: linear-gradient(180deg, #c68061, #a65b9a 52%, #497b89) left / 2px 100% no-repeat, #1c191d; }
.post--text .byline { min-height: 0; padding: 13px 19px 7px; color: var(--quiet); }
.post--text .mini-avatar { width: 22px; height: 22px; font-size: .88rem; }
.post--text .caption { padding: 3px 19px 17px; min-height: 0; }
.post--text h2 { font: 400 clamp(1.4rem, 4vw, 1.85rem)/1.14 Georgia, serif; overflow-wrap: anywhere; }
.post--text .caption p { max-width: 56ch; margin: 6px 0 0; color: #d8cdc4; font-size: .94rem; line-height: 1.55; }
.post--text .save { top: -6px; }
#posts.grid { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid .byline, .grid .post:not(.post--text) .caption p { display: none; }
.grid .cover { aspect-ratio: 1; }
.grid .cover img { height: 100%; object-fit: cover; }
.grid .carousel .cover img { object-fit: contain; }
.grid .caption { padding: 11px; min-height: 52px; }
.grid .caption h2 { font-size: .79rem; margin-right: 25px; }
.grid .save { right: 0; top: 2px; width: 36px; }
.grid .post--text { align-self: start; }
.grid .post--text .caption { min-height: 0; padding: 13px 11px; }
.grid .post--text h2 { font-size: clamp(1rem, 3vw, 1.25rem); }
.grid .post--text .caption p:not(:empty) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; font-size: .81rem; }
@media (max-width: 580px) {
  main { width: min(100% - 20px, 810px); }
  .top-inner { padding: 0 13px; height: 55px; }
  .profile { padding: 27px 8px 26px; }
  .profile-ribbons { width: 60%; opacity: .52; mask-image: linear-gradient(90deg, transparent, #000 65%, #000 88%, transparent); }
  #posts.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.note-avatar{position:relative;flex:none;padding-top:35px}
.note-bubble{position:absolute;bottom:calc(100% - 48px);left:50%;transform:translateX(-50%);width:145px;max-height:110px;overflow:auto;padding:10px 12px;border:1px solid var(--rule);border-radius:18px;background:var(--card);font-size:14px;line-height:1.4;overflow-wrap:anywhere;white-space:pre-wrap;box-shadow:0 5px 18px #0003}
.note-bubble::after{content:'';position:absolute;bottom:-5px;left:48%;width:8px;height:8px;background:var(--card);border-right:1px solid var(--rule);border-bottom:1px solid var(--rule);transform:rotate(45deg)}
#note-editor{padding:18px;background:var(--card);border:1px solid var(--rule);border-radius:13px;margin-bottom:18px}
#note-editor label{display:block;font-size:16px}
#note-draft{display:block;width:100%;resize:vertical;padding:12px;margin:8px 0;border:1px solid var(--rule);border-radius:8px;background:var(--base);color:var(--ink);font:inherit;min-height:80px}
#note-editor p,#note-message{font-size:14px;color:var(--quiet);line-height:1.5}
.note-actions{display:flex;gap:12px;flex-wrap:wrap}.note-actions button{min-height:44px;padding:8px 12px;border:1px solid var(--rule);border-radius:8px}#note-save{color:#20130d;background:var(--accent)}
#note-message:empty{display:none}button:disabled{opacity:.6;cursor:wait}
