/* heyloura-dragon-gate
 *
 * Ink on paper. ONE warm accent, and it only ever means "active" — never
 * decoration, never links, never emphasis. That rule is what keeps the theme
 * off the photographs, so please don't spend vermilion anywhere else.
 */

/* ---------------------------------------------------------------- tokens */
:root {
  --paper:      #E9E5DA;
  --paper-2:    #F2EFE7;
  --paper-3:    #DED9CB;
  --ink:        #1C1B18;
  --ink-soft:   #6B6659;
  --ink-faint:  #A8A294;
  --indigo:     #2E4258;
  --lantern:    #C4502A;
  --rule:       #C9C3B2;
  --fall-op:    .6;
  --glow:       rgba(196, 80, 42, .14);
  --tile-op:    .30;

  --font-d: "Newsreader", Georgia, "Times New Roman", serif;
  --font-u: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-m: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3.2vw, 48px);
  --col-min: 262px;
  --row-gap: 30px;
  --col-gap: 58px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #16181C;
    --paper-2:    #1E2127;
    --paper-3:    #111318;
    --ink:        #DCD6C8;
    --ink-soft:   #9A9486;
    --ink-faint:  #5C5850;
    --indigo:     #8FA6BD;
    --lantern:    #E28B4A;
    --rule:       #33373F;
    --fall-op:    .62;
    --glow:       rgba(226, 139, 74, .18);
    --tile-op:    .22;
  }
}

:root[data-theme="dark"] {
  --paper:      #16181C;
  --paper-2:    #1E2127;
  --paper-3:    #111318;
  --ink:        #DCD6C8;
  --ink-soft:   #9A9486;
  --ink-faint:  #5C5850;
  --indigo:     #8FA6BD;
  --lantern:    #E28B4A;
  --rule:       #33373F;
  --fall-op:    .62;
  --glow:       rgba(226, 139, 74, .18);
  --tile-op:    .22;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-u);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--ink); }
img, video { max-width: 100%; height: auto; }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--reading { max-width: 680px; }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px;
}

.skip-link {
  position: absolute; top: -48px; left: 8px; z-index: 999;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; }
#main:focus, #main:focus-visible { outline: none; }

/* ---------------------------------------------------------------- header */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.site-name {
  font-family: var(--font-d); font-size: 19px; text-decoration: none;
  letter-spacing: -.01em;
}
.site-name--quiet { color: var(--ink-soft); font-style: italic; font-size: 17px; }

.theme-toggle {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 1px solid var(--rule); color: var(--ink);
  cursor: pointer; padding: 0;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { transition: transform .45s ease; }
.theme-toggle[data-mode="light"] svg { transform: rotate(180deg); }
.theme-toggle[data-mode="dark"]  svg { transform: rotate(0deg); }

/* ------------------------------------------------------- grid and falls */
.grid-wrap { position: relative; padding-inline: var(--gutter); }
.grid-wrap--bleed {
  width: 100vw; max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.falls {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: visible;
  color: var(--ink-soft); opacity: var(--fall-op);
}
.falls path { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
/* Water moves at taiji pace: slow, continuous, never snapping. The dash period
   (26 + 8) matches the offset below so the loop is seamless. */
.falls .strand { stroke-dasharray: 26 8; animation: fall-flow 2s linear infinite; }
@keyframes fall-flow { to { stroke-dashoffset: -34; } }
@media (prefers-reduced-motion: reduce) { .falls .strand { stroke-dasharray: none; } }

.grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--col-min), 1fr));
  grid-auto-rows: 4px;
  row-gap: var(--row-gap);
  column-gap: var(--col-gap);
}
@supports (grid-template-rows: masonry) {
  .grid { grid-template-rows: masonry; grid-auto-rows: auto; align-tracks: start; }
}

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--paper-2);
  border: 1px solid var(--ink);
  padding: 14px 15px;
  overflow: hidden;
  align-self: start;
}
.card-title {
  font-family: var(--font-d); font-weight: 400; font-size: 19px;
  line-height: 1.2; letter-spacing: -.01em; margin-bottom: 7px;
}
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-body { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.card-body :is(h1,h2,h3) { font-family: var(--font-d); font-size: 17px; font-weight: 400; }
/* posts shown in full can carry micro.blog HTML: keep it inside the card */
.card-body pre {
  overflow-x: auto; background: var(--paper-3); padding: 8px 10px;
  font-family: var(--font-m); font-size: 11.5px; line-height: 1.5;
}
.card-body img { display: block; }

.card-more {
  display: inline-block; margin-top: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.card-more:hover { text-decoration: underline; }
.card--piece .card-more { margin-top: 14px; }
.card-read { color: var(--ink-faint); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.card-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.card-meta a { color: var(--ink-faint); text-decoration: none; }
.card-meta a:hover { color: var(--ink); text-decoration: underline; }
.card-cats { display: flex; flex-wrap: wrap; gap: 10px; }

/* jot — small, photo-forward, and structurally unable to out-shout a piece */
.card--jot .card-body { font-size: 14px; color: var(--ink); }
.card--jot img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 1px solid var(--ink); display: block;
}

/* piece — width is authority. It wins WITHOUT needing a photograph. */
.card--piece {
  grid-column: span 2;
  border-width: 2px;
  padding: 22px 24px;
}
.card--piece .card-title {
  font-size: 28px; font-weight: 300; line-height: 1.1; margin-bottom: 10px;
}
.card--piece .card-body {
  font-family: var(--font-d); font-size: 16px; line-height: 1.5; color: var(--ink);
}
@media (max-width: 640px) { .card--piece { grid-column: span 1; } }

.fig { margin: 0 0 10px; }
.fig figcaption { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }

.feed-more {
  padding: 34px var(--gutter) 0; text-align: center;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}

/* ------------------------------------------------------------ gate card */
.gate { grid-column: span 2; padding: 0; border-width: 2px; }
@media (max-width: 640px) { .gate { grid-column: span 1; } }

.gate-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
}
.gate-bar b { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.gate-hour { font-family: var(--font-m); font-size: 11px; opacity: .78; }
.gate-body { padding: 18px; }
.gate-intro { font-family: var(--font-d); font-size: 17px; line-height: 1.45; margin-bottom: 16px; }

.gate-rooms { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.room {
  background: var(--paper-2);
  border: 1px solid var(--ink-faint); color: var(--ink-soft);
  padding: 5px 11px; font-size: 12.5px; font-weight: 500; text-decoration: none;
}
.room:hover { border-color: var(--ink); color: var(--ink); }
/* lit = posted in recently. The one place the accent is allowed. */
.room--lit { border-color: var(--lantern); color: var(--lantern); box-shadow: inset 0 0 18px var(--glow); }

.gate-seal {
  display: flex; align-items: center; gap: 13px; text-decoration: none;
  border-top: 1px solid var(--rule); padding-top: 15px;
}
.gate-seal-txt b { display: block; font-family: var(--font-d); font-size: 17px; font-weight: 400; }
.gate-seal-txt span { font-size: 12.5px; color: var(--ink-soft); }
.gate-nav {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 15px;
  border-top: 1px solid var(--rule); padding-top: 13px; font-size: 12.5px;
}
.gate-nav a { color: var(--ink-soft); text-decoration: none; }
.gate-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------- tile as wallpaper */
.tile-wall {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--ink-soft); opacity: var(--tile-op);
  pointer-events: none; z-index: 0;
}

/* ---------------------------------------------------------------- banner */
/* The patterned strip at the top of a category page and of a titled post.
   Its tile is seeded from the category name or the post's URL, so every one
   is its own variant of the same family. */
.banner { position: relative; overflow: hidden; padding-block: 46px 40px; }
.banner-inner {
  position: relative; z-index: 1;
  max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter);
}
.banner h1 {
  font-family: var(--font-d); font-weight: 300; font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05; letter-spacing: -.02em; max-width: 24ch;
}
.banner-intro { margin-top: 14px; max-width: 62ch; color: var(--ink-soft); padding: 10px 14px; width: fit-content; }

/* A post banner narrows to the reading column, so the title's left edge lines
   up with the lantern below it instead of floating out at the page margin. */
.banner--post .banner-inner { max-width: 680px; }

/* A post banner's date and lanterns are small type, so they sit on paper
   tags rather than directly on the linework. */
.banner-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 18px; }
.banner-rooms { display: flex; flex-wrap: wrap; gap: 7px; }
.banner-date {
  background: var(--paper-2); border: 1px solid var(--ink); color: var(--ink);
  padding: 5px 11px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; font-variant-numeric: tabular-nums;
}
.banner-date:hover { text-decoration: underline; }

/* breathing room between a banner and whatever follows it */
.banner + .grid-wrap,
.banner + .photos { margin-top: 38px; }

/* Words never sit directly on pattern lines. A paper wash plus a blur of
   whatever is behind it: the pattern stays visible around the text and as a
   soft haze through it, but the linework can't fight the letterforms.
   Where backdrop-filter is missing, the wash just gets more opaque instead. */
.banner-intro {
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .banner-intro { background: color-mix(in srgb, var(--paper) 94%, transparent); }
}

/* ------------------------------------------------------- archive (fall) */
.page-head { padding-block: 44px 26px; }
.page-head h1 { font-family: var(--font-d); font-weight: 300; font-size: clamp(34px, 6vw, 56px); letter-spacing: -.02em; }
.page-intro { margin-top: 12px; max-width: 62ch; color: var(--ink-soft); }

/* One wall behind the whole archive, banded by height. The bands are placed
   inline in percentages; +1px closes sub-pixel hairlines between them. */
.ascent { position: relative; overflow: hidden; padding-block: 12px 40px; }
.ascent-wall { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ascent-band { position: absolute; left: 0; right: 0; height: calc(var(--band-h) + 1px); }

.year { position: relative; z-index: 1; padding-block: 18px; }

/* The wash sits behind the heading AND the list, and its edges are feathered
   so there is no hard box: the pattern fades out under the words and back in
   around them. Lighter than a panel — you should still see the pattern move
   underneath, just as haze rather than as lines. */
.year-block { position: relative; z-index: 0; max-width: 820px; padding: 16px 22px 12px; }
.year-block::before {
  content: ""; position: absolute; inset: -16px -34px; z-index: -1;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 62%, transparent);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent),
    linear-gradient(to bottom, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 34px, #000 calc(100% - 34px), transparent),
    linear-gradient(to bottom, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  mask-composite: intersect;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .year-block::before { background: color-mix(in srgb, var(--paper) 88%, transparent); }
}

.year-head {
  font-family: var(--font-d); font-weight: 300; font-size: 34px;
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px;
}
.year-count {
  font-family: var(--font-m); font-size: 12px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.year-list { list-style: none; margin: 0; padding: 0; }
.year-list li {
  border-bottom: 1px solid var(--rule);
  border-bottom-color: color-mix(in srgb, var(--rule) 55%, transparent);
}
.year-list li:last-child { border-bottom: 0; }
.year-list a {
  display: grid; grid-template-columns: 76px 1fr; gap: 14px;
  padding: 8px 0; text-decoration: none; align-items: baseline;
}
.year-list a:hover span { text-decoration: underline; }
.year-list time {
  font-family: var(--font-m); font-size: 12px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.year-list span { font-size: 15px; }
@media (max-width: 480px) { .year-list a { grid-template-columns: 62px 1fr; gap: 10px; } }

/* -------------------------------------------------------------- photos */
/* Masonry, so every photograph keeps its own shape. Tight gutters, no chrome. */
.photos {
  padding-inline: var(--gutter);
  width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw);
}
.grid--photos { --col-min: 210px; --row-gap: 10px; --col-gap: 10px; }
.photo { margin: 0; line-height: 0; align-self: start; }
.photo-link { display: block; }
.photo img { width: 100%; height: auto; display: block; }
.photo-link:hover img { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ------------------------------------------------------------ lightbox */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink);
}
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; animation: lb-in .22s ease-out; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox::backdrop {
  background: rgba(233, 229, 218, .96);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox-stage {
  display: grid; place-items: center; min-height: 0;
  padding: clamp(56px, 6vw, 72px) var(--gutter) 0;
}
.lightbox-img {
  max-width: min(100%, 1600px); max-height: calc(100dvh - 150px);
  width: auto; height: auto; border: 1px solid var(--ink); background: var(--paper-2);
}
.lightbox-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px var(--gutter) 22px;
}
.lightbox-btn {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.lightbox-btn:hover { background: var(--paper-3); }
.lightbox-close { position: fixed; top: 14px; right: 14px; }
.lightbox-caption {
  margin: 0; min-width: 0; max-width: 46ch; text-align: center;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.lightbox-count { color: var(--ink-faint); font-family: var(--font-m); letter-spacing: 0; }
.lightbox-post { color: var(--ink); text-decoration: none; }
.lightbox-post:hover { text-decoration: underline; }

/* --------------------------------------------------- single = a lantern */
.lantern {
  background: var(--paper-2); border: 1px solid var(--ink);
  padding: clamp(22px, 4vw, 40px);
  margin-block: 30px 0;
  box-shadow: inset 0 0 60px var(--glow);
}
.lantern-date {
  display: inline-block; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  text-decoration: none;
}
.lantern-body {
  font-family: var(--font-d); font-size: 18px; line-height: 1.62;
  margin-top: 22px;
}
.lantern-body:first-child { margin-top: 0; }
.lantern-body :is(h2, h3) { font-weight: 400; margin-top: 1.4em; }
.lantern-body blockquote {
  margin: 1.3em 0; padding-left: 18px; border-left: 2px solid var(--rule);
  color: var(--ink-soft); font-style: italic;
}
.lantern-body pre {
  background: var(--paper-3); padding: 14px; overflow-x: auto;
  font-family: var(--font-m); font-size: 13px; line-height: 1.5;
}
.lantern-body code { font-family: var(--font-m); font-size: .88em; }
/* Damage control for unescaped HTML in a post. If inline code contains a raw
   tag — `<code><div id="x"></code>` — the browser opens a real <div> inside
   <code> and then re-opens <code> around everything after it, turning the rest
   of the post monospace. Genuine inline code never contains paragraphs,
   headings or images, so a <code> that does is that breakage: let it read as
   the prose it actually is. Code blocks (pre > code) are left alone. */
.lantern-body :not(pre) > code:has(p, div, h1, h2, h3, h4, ul, ol, blockquote, figure, img) {
  font-family: inherit; font-size: inherit;
}
.lantern--note .lantern-body { font-size: 21px; }
.lantern-cats {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule);
}

/* ------------------------------------------------------------- ripples */
/* The Micro.blog conversation (conversation.js). Replies flow down one strand
   of water, the same slow dashed linework as the home page falls, and each
   avatar sits on it like a stone in the stream. The strand runs on into the
   reply form, where it lands in a splash of wave arcs. */
.convo { margin-block: 56px 0; }
.convo-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.convo-glyph { flex: none; color: var(--ink-soft); margin-bottom: 6px; }
.convo-head .eyebrow { margin: 0 0 2px; }
.convo-head h2 { font-family: var(--font-d); font-weight: 300; font-size: 30px; line-height: 1; }
.convo-empty { margin: 0 0 20px; font-family: var(--font-d); font-style: italic; color: var(--ink-soft); }
.convo:has(.microblog_post) .convo-empty { display: none; }

.microblog_conversation { position: relative; }
.microblog_post {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 16px; padding-bottom: 24px;
}
.microblog_post::before {
  content: ""; position: absolute; left: 22px; top: 48px; bottom: 0; width: 1px;
  background: linear-gradient(var(--ink-soft) 70%, transparent 0) 0 0 / 1px 17px repeat-y;
  opacity: .6; animation: strand-flow 2.2s linear infinite;
}
@keyframes strand-flow { to { background-position: 0 17px; } }
.microblog_user { display: contents; }
.microblog_avatar {
  grid-column: 1; grid-row: 1 / span 3;
  width: 44px !important; height: 44px !important; max-width: none !important;
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--ink); padding: 3px; background: var(--paper-2);
}
.microblog_fullname { grid-column: 2; font-family: var(--font-d); font-size: 18px; line-height: 1.2; padding-top: 3px; }
.microblog_text { grid-column: 2; margin-top: 4px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.microblog_text p { margin: 0 0 .6em; }
.microblog_text p:last-child { margin-bottom: 0; }
.microblog_text img { max-width: 100%; height: auto; }
.microblog_time { grid-column: 2; margin-top: 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.microblog_time a { color: var(--ink-faint); text-decoration: none; }
.microblog_time a:hover { color: var(--ink); text-decoration: underline; }

.microblog_reply_form {
  position: relative;
  background: var(--paper-2); border: 1px solid var(--ink); padding: 16px 18px 18px;
}
/* where the strand lands: three wave arcs sitting on the form's top edge */
.microblog_conversation:has(.microblog_post) .microblog_reply_form::before {
  content: ""; position: absolute; left: 5px; top: -10px; width: 36px; height: 10px;
  background: var(--ink-soft); opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 10'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M1 10A17 9 0 0 1 35 10'/%3E%3Cpath d='M7 10A11 5.8 0 0 1 29 10'/%3E%3Cpath d='M13 10A5 2.6 0 0 1 23 10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 10'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M1 10A17 9 0 0 1 35 10'/%3E%3Cpath d='M7 10A11 5.8 0 0 1 29 10'/%3E%3Cpath d='M13 10A5 2.6 0 0 1 23 10'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.microblog_reply_signin { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }
.microblog_reply_signin a { color: var(--ink); }
.microblog_reply_textarea { margin: 0 0 10px; }
.microblog_reply_textarea textarea {
  display: block; width: 100%; min-height: 96px; resize: vertical;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule);
  padding: 10px 12px; font: 15px/1.5 var(--font-u);
}
.microblog_reply_textarea textarea:focus { border-color: var(--ink); }
.microblog_reply_textarea textarea:disabled { opacity: .55; cursor: not-allowed; }
.microblog_reply_button { margin: 0; text-align: right; }
.microblog_reply_button input {
  font: 600 12px/1 var(--font-u); letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  padding: 10px 18px; cursor: pointer;
}
.microblog_reply_button input:hover { background: var(--paper-2); color: var(--ink); }
.microblog_reply_button input:disabled { background: transparent; color: var(--ink-faint); border-color: var(--rule); cursor: not-allowed; }

/* --------------------------------------------------------------- footer */
.site-foot { margin-top: 72px; border-top: 1px solid var(--rule); }
.foot-inner {
  display: flex; flex-wrap: wrap; gap: 22px 56px; align-items: flex-start;
  padding-block: 36px 56px;
}
.foot-card { display: flex; align-items: center; gap: 12px; }
.foot-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--ink); padding: 2px; background: var(--paper-2);
}
.foot-name { font-family: var(--font-d); font-size: 19px; text-decoration: none; }
.foot-name:hover { text-decoration: underline; }
.foot-profiles { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 0; font-size: 12px; }
.foot-profiles a { color: var(--ink-soft); }
.foot-profiles:empty { display: none; }

/* The koi lives IN the pattern, never in the chrome: the archive's water,
   each category's wallpaper and the home page falls. Twice the pattern's own
   opacity, so it reads as part of the linework, not as a logo. */
.koi-swim {
  position: absolute; z-index: 0; pointer-events: none; line-height: 0;
  opacity: calc(var(--tile-op) * 2);
}
.koi-swim .koi { width: 100%; height: auto; display: block; }
.koi-swim--fall {
  top: 50%; right: clamp(16px, 8vw, 140px);
  width: clamp(130px, 16vw, 220px); transform: translateY(-50%);
}
.koi-swim--banner {
  top: 50%; right: clamp(16px, 6vw, 110px);
  width: clamp(110px, 12vw, 170px); transform: translateY(-50%);
}
/* home page: falls.js sizes it to the gutter and hangs it on the longest fall,
   turned so its head points up the water */
.koi-swim--climb { transform: rotate(-56deg); transform-origin: 50% 50%; }
/* on a phone the banner koi would swim straight under the category title */
@media (max-width: 640px) { .koi-swim--banner { display: none; } }
/* a post banner's title is centred in the reading column, so the koi runs into
   long titles sooner — keep it only where there's clear water beside them */
@media (max-width: 1100px) { .banner--post .koi-swim--banner { display: none; } }
.foot-txt { flex: 1 1 280px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.foot-nav a { font-size: 13px; text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.foot-feeds { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 13px; }
.foot-feeds a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.foot-feeds a:hover { text-decoration: underline; }
.feed-glyph { flex: none; color: var(--ink-soft); }
.foot-fine { font-size: 12px; color: var(--ink-soft); margin: 0; }

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