/* bunny-garden — style.css
 * a plain, dark night: blue-black, moonlight, a few clouds. colours and fonts live in the :root block. */

/* ───────── fonts (self-hosted, see fonts/LICENSES.txt) ───────── */
@font-face { font-family: 'IM Fell English'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/im-fell-english-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IM Fell English'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/im-fell-english-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/spectral-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/spectral-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/spectral-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Reenie Beanie'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/reenie-beanie-latin-400-normal.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #06070a;          /* the night itself */
  --bg2: #0b0d12;         /* inputs, dialogs */
  --bed: #12151c;         /* raised bits */
  --line: #1a1e28;        /* hairlines */
  --line2: #2b3140;       /* stronger lines */
  --text: #b8bbc5;        /* body text */
  --moon: #e9e7de;        /* headings, the bright stuff */
  --dim: #858b9b;         /* quiet text */
  --accent: #a9b2cc;      /* links and small accents (moonlit blue-grey) */
  --accent-deep: #1e2336; /* filled buttons */
  --rose: #bf90aa;        /* locked things and warnings */
  --rose-deep: #2a1c26;

  --f-display: 'IM Fell English', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Spectral', Georgia, 'Times New Roman', serif;
  --f-hand: 'Reenie Beanie', 'Segoe Print', 'Bradley Hand', cursive;
  --f-code: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --w: 54rem;             /* width of the page column */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; position: relative;
  background: var(--bg); color: var(--text);
  font: 400 1.125rem/1.7 var(--f-body);
  overflow-x: hidden;
}
body::after {    /* fine grain so the black is not flat */
  content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background-image: var(--noise); opacity: .04;
}
[hidden] { display: none !important; }
::selection { background: var(--accent-deep); color: var(--moon); }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--moon); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4, h5 { font-family: var(--f-display); font-weight: 400; color: var(--moon); margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; }
.ic { width: 1em; height: 1em; vertical-align: -.14em; flex: none; }
.dim { color: var(--dim); }
.small { font-size: .9rem; }
.err { color: var(--rose); font-style: italic; margin: .6rem 0 0; }

/* the night sky behind the top of every page: a cloudy backdrop (the #sky background) with the moon
 * (#moon) as its own picture on top. the moon's place, size and glow and the sky's darkness are set
 * from "site text" (they arrive here as --moon-* and --sky-dim). it fades into the page below. */
#sky {
  position: absolute; top: 0; left: 0; right: 0; height: clamp(560px, 105vh, 1000px); z-index: 0; pointer-events: none;
  background: var(--bg) no-repeat 50% 20% / cover; overflow: hidden;
}
body:not([data-page=home]) #sky { opacity: .4; }
#sky { transition: opacity .4s; }
#moonbox {   /* a zero-size anchor at the moon's spot; the glow and the picture are centred on it */
  --mw: max(calc(var(--moon-size, 13) * 1vw), calc(var(--moon-size, 13) * 9px));
  position: absolute; left: calc(var(--moon-x, 72) * 1%); top: calc(var(--moon-y, 36) * 1%); width: 0; height: 0;
}
/* the soft light around the moon: a round glow, so it works for any picture, whatever its shape */
#moonbox::before {
  content: ''; position: absolute; left: 0; top: 0; width: calc(var(--mw) * 3); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side,
    rgb(214 220 242 / calc(var(--moon-glow, .55) * .5)) 0%,
    rgb(214 220 242 / calc(var(--moon-glow, .55) * .46)) 32%,
    rgb(170 182 224 / calc(var(--moon-glow, .55) * .2)) 44%,
    rgb(150 163 210 / calc(var(--moon-glow, .55) * .07)) 68%,
    rgb(150 163 210 / 0) 100%);
}
#moon { position: absolute; left: 0; top: 0; width: var(--mw); height: auto; max-width: none; transform: translate(-50%, -50%); }
#moon.blend { mix-blend-mode: screen; }   /* for a moon photo on a black background: the black melts away */
/* on inner pages the whole sky is already faded; the moon steps back a little more so it never sits crisply behind the writing */
#moon, #moonbox::before { transition: opacity .4s; }
body:not([data-page=home]) #moon, body:not([data-page=home]) #moonbox::before { opacity: .6; }
#sky::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgb(6 7 10 / .5), rgb(6 7 10 / 0) 62%),
    linear-gradient(180deg, rgb(6 7 10 / var(--sky-dim, .08)) 0%, rgb(6 7 10 / var(--sky-dim, .08)) 45%, #06070a 100%);
}

/* ───────── gardener bar ───────── */
#adminbar {
  position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem 1.3rem;
  padding: .4rem max(1rem, calc((100vw - var(--w)) / 2)); background: #0e1017; border-bottom: 1px solid var(--line2);
  font: italic 1rem/1.4 var(--f-display);
}
#adminbar .ab-who { margin-right: auto; font: 1.35rem/1 var(--f-hand); color: var(--dim); }
#adminbar a, #adminbar button { color: var(--moon); background: none; border: 0; padding: .1rem 0; font: inherit; cursor: pointer; text-decoration: underline dotted var(--accent); text-underline-offset: .25em; }
#adminbar a:hover, #adminbar button:hover { color: var(--accent); }

/* ───────── header ───────── */
.top { position: relative; z-index: 1; width: 100%; max-width: var(--w); margin: 0 auto; padding: 1.4rem 1.25rem 0; }
.top-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; min-width: 0; }
.brand-moon { width: 52px; height: 52px; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { font: 400 1.85rem/1.05 var(--f-display); color: var(--moon); letter-spacing: .01em; }
.brand-text small { font: italic .98rem/1.3 var(--f-body); color: var(--dim); margin-top: .15rem; }
.brand:hover b { color: #fff; }
.sky { display: flex; align-items: center; gap: 1.3rem; font: 1.3rem/1 var(--f-hand); color: var(--dim); white-space: nowrap; }
.moonphase { display: inline-flex; align-items: center; gap: .45rem; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: default; padding: .6rem; margin: -.6rem; }
.moonphase svg { width: 19px; height: 19px; }
.strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; margin-top: 1.3rem; padding: .65rem 0 .7rem; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.strip-label { font: 1.4rem/1 var(--f-hand); color: var(--accent); }
.strip-tags { display: flex; flex-wrap: wrap; gap: .15rem 1.4rem; min-width: 0; }
.tag { display: inline-flex; align-items: baseline; gap: .4rem; font: italic 1.08rem/1.5 var(--f-display); color: var(--text); text-decoration: none; }
.tag .n { font: 1.2rem/1 var(--f-hand); color: var(--accent); }
.tag .ic { color: var(--rose); font-size: .85em; align-self: center; }
.tag:hover { color: var(--moon); }
.tag[aria-current] { color: var(--moon); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .3em; }
.strip-none { font: italic 1rem var(--f-body); color: var(--dim); }

/* ───────── page column ───────── */
main:focus, main:focus-visible { outline: none; }
main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: var(--w); margin: 0 auto; padding: 2.4rem 1.25rem 3rem; }
.loading, .noscript { display: flex; align-items: center; gap: .8rem; color: var(--dim); font-style: italic; }
.noscript { padding: 2rem; }
.hop { width: 1.9em; height: 1.9em; object-fit: contain; animation: hop 1s ease-in-out infinite; flex: none; }
@keyframes hop { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-.35em); } }

/* ───────── home: just the headline, over the sky ───────── */
.hero { max-width: 36rem; padding: 3.2rem 0 1rem; }
.tagline { font: italic 400 clamp(3.3rem, 9.2vw, 6.4rem)/.96 var(--f-display); color: var(--moon); letter-spacing: -.01em; text-shadow: 0 0 .8em rgba(0, 0, 0, .5); overflow-wrap: break-word; }
.tagline.stack .w { display: block; }
.tagline.stack .w:nth-child(even) { padding-left: .75em; }
.scrawl { display: inline-block; margin: 1.1rem 0 0; font: 2rem/1 var(--f-hand); color: var(--accent); transform: rotate(-2deg); transform-origin: left center; }
.welcome { margin-top: 1.6rem; max-width: 32rem; }
.hero-tools { margin: 1rem 0 0; }

/* ───────── sections ───────── */
.plate { margin-top: 3.6rem; }
.plate:first-child { margin-top: 0; }
.plate-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; padding-bottom: .55rem; margin-bottom: .4rem; border-bottom: 1px solid var(--line2); }
.plate-h h2 { font-size: 2rem; line-height: 1.1; }
.plate-h .sub { font: 1.45rem/1 var(--f-hand); color: var(--dim); }
.plate-h .crumbs { font: italic 1.02rem/1.4 var(--f-display); color: var(--dim); }
.plate-h .crumbs a { color: var(--dim); text-decoration: none; }
.plate-h .crumbs a:hover { color: var(--moon); }
.plate-tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.plate-b { padding: 1rem 0; }
.plate-b.empty { text-align: center; color: var(--dim); font-style: italic; padding: 2.4rem 0; }
.plate-b.empty .empty-art { display: block; width: min(240px, 80%); height: auto; margin: 0 auto .4rem; }
.plate-b.note { border-left: 2px solid var(--accent); padding-left: 1rem; margin: 1rem 0; font-style: italic; }
.plate-f { padding-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.stamp { display: inline-flex; align-items: center; gap: .35rem; padding: .05rem .7rem; border: 1px solid var(--rose); border-radius: 999px; color: var(--rose); font: italic .95rem/1.5 var(--f-display); }
.plot-desc { margin: 0; font-style: italic; color: var(--dim); max-width: 36rem; }

/* the plots: a contents page with dotted leaders */
.beds { list-style: none; margin: 0; padding: 0; }
.bed { display: grid; grid-template-columns: 2.7rem auto minmax(1rem, 1fr) auto; column-gap: .55rem; align-items: baseline; padding: .95rem 0 .85rem; text-decoration: none; color: inherit; border-bottom: 1px dashed var(--line2); }
.bed:hover .b-name { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .22em; }
.b-no { font: italic 1.15rem/1 var(--f-display); color: var(--accent); text-align: right; padding-right: .35rem; }
.b-name { font: 1.5rem/1.2 var(--f-display); color: var(--moon); display: inline-flex; align-items: baseline; gap: .5rem; }
.b-name .ic { color: var(--rose); font-size: .72em; align-self: center; }
.b-dots { align-self: end; margin-bottom: .32em; border-bottom: 2px dotted var(--line2); min-width: 1rem; }
.b-meta { display: inline-flex; gap: 1.1rem; font: 1.3rem/1 var(--f-hand); color: var(--dim); white-space: nowrap; }
.b-desc { grid-column: 2 / -1; margin-top: .2rem; font: italic .98rem/1.5 var(--f-body); color: var(--dim); }

/* entries: the date sits in the margin, in handwriting */
.entries { display: block; }
.entry { display: grid; grid-template-columns: 8rem minmax(0, 1fr); column-gap: 1.2rem; padding: 1.1rem 0 1rem; text-decoration: none; color: inherit; border-bottom: 1px dashed var(--line2); }
.e-date { font: 1.55rem/1.15 var(--f-hand); color: var(--accent); padding-top: .15rem; }
.e-main b { display: block; font: 400 1.45rem/1.25 var(--f-display); color: var(--moon); }
.entry:hover .e-main b { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .22em; }
.e-main small { margin-top: .25rem; color: var(--dim); font: italic 1rem/1.5 var(--f-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.e-plot { display: block; margin-top: .3rem; font: 1.25rem/1 var(--f-hand); color: var(--dim); }
.entry.sealed .e-main b { color: var(--dim); font-style: italic; }
.entry.sealed .ic { color: var(--rose); }

/* ───────── a post ───────── */
.post .doc { max-width: 38rem; padding: 2rem 0 .5rem; }
.post-title { font-size: clamp(2.3rem, 5.4vw, 3.5rem); line-height: 1.04; letter-spacing: -.005em; }
.meta { display: flex; flex-wrap: wrap; gap: .1rem 1.4rem; margin: .9rem 0 2rem; font: 1.5rem/1.1 var(--f-hand); color: var(--dim); }
.pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line2); font: italic 1.15rem/1.35 var(--f-display); }
.pager span { display: flex; flex-direction: column; min-width: 0; }
.pager span:last-child { text-align: right; align-items: flex-end; }
.pager small { font: 1.35rem/1 var(--f-hand); color: var(--dim); }
.pager a { text-decoration: none; }

/* ───────── written text (markdown) ───────── */
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose pre { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.9rem; margin: 2.1em 0 .55em; line-height: 1.15; }
.prose h3 { font-size: 1.5rem; margin: 1.8em 0 .45em; font-style: italic; }
.prose h4, .prose h5 { font-size: 1.2rem; margin: 1.6em 0 .4em; font-style: italic; color: var(--text); }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--moon); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding: .1em 0 .1em 1.3rem; border-left: 2px solid var(--accent); font-style: italic; color: var(--text); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font: .86em var(--f-code); background: var(--bed); padding: .12em .4em; border-radius: 4px; color: var(--moon); }
.prose pre { background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin: 1.5em 0; }
.prose del { color: var(--dim); }
/* the divider (--- in an entry): a picture of its own (art/divider.svg), wide and short */
.bun-rule { margin: 2.4rem 0; text-align: center; }
.bun-rule .rule-art { display: block; width: auto; height: auto; max-width: 100%; max-height: 3.4rem; margin: 0 auto; border-radius: 0; }

/* voice notes */
.audio-note { display: block; margin: 1.2em 0; }
.audio-note audio { display: block; width: 100%; max-width: 26rem; height: 2.7rem; color-scheme: dark; }
.audio-note small { display: block; margin-top: .3rem; font: 1.35rem/1 var(--f-hand); color: var(--dim); }
.audio-note em { color: var(--dim); }
.rec-time { font: 3.2rem/1 var(--f-hand); color: var(--moon); text-align: center; margin: .6rem 0 1rem; }
.rec-play { display: block; width: 100%; margin: 0 0 .8rem; color-scheme: dark; }

/* ───────── buttons & forms ───────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.25rem; border: 1px solid var(--line2); border-radius: 999px; background: transparent; color: var(--text); font: italic 1.08rem/1.2 var(--f-display); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--accent); color: var(--moon); }
.btn.pri { background: var(--accent-deep); border-color: #3a4260; color: var(--moon); }
.btn.pri:hover { background: #283050; border-color: var(--accent); }
.btn.danger { border-color: #603a55; color: var(--rose); }
.btn.danger:hover { background: var(--rose-deep); border-color: var(--rose); color: #efcfe2; }
.btn:disabled { opacity: .5; cursor: default; }
.mini { display: inline-flex; align-items: center; padding: .12rem .8rem; border: 1px solid var(--line2); border-radius: 999px; background: transparent; color: var(--text); font: italic .95rem/1.4 var(--f-display); text-decoration: none; cursor: pointer; }
.mini:hover { border-color: var(--accent); color: var(--moon); }
.mini.danger { color: var(--rose); border-color: #55354c; }
.mini.danger:hover { background: var(--rose-deep); }
.mini:disabled { opacity: .45; cursor: default; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }
.linkish:hover { color: var(--moon); }

.f { display: block; margin: 0 0 1rem; color: var(--dim); font-style: italic; font-size: 1rem; }
.f small { font-size: .85rem; }
.f input, .f textarea, .f select { display: block; width: 100%; margin-top: .3rem; padding: .6rem .8rem; background: var(--bg2); color: var(--moon); border: 1px solid var(--line2); border-radius: 8px; font: 400 1.02rem/1.5 var(--f-body); }
.f input[type=range] { padding: 0; height: 1.6rem; background: none; border: 0; accent-color: var(--accent); }
.f textarea { resize: vertical; min-height: 6rem; }
.f select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.f input:focus, .f textarea:focus, .f select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169, 178, 204, .2); }
.f input::placeholder, .f textarea::placeholder { color: #565c6c; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.chk { display: flex; align-items: center; gap: .55rem; margin: 0 0 1rem; color: var(--dim); font-size: .98rem; }
.chk input, .opt input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
.opt { display: flex; align-items: center; gap: .55rem; margin: .45rem 0; cursor: pointer; }
.fence { border: 1px solid var(--line2); border-radius: 10px; padding: .7rem 1rem 1rem; margin: 0 0 1rem; }
.fence legend { padding: 0 .5rem; font: italic 1.05rem var(--f-display); color: var(--moon); }
.pw-fields { display: none; margin-top: 1rem; }
form[data-lock="set"] .pw-fields { display: block; }
form[data-lock="keep"] .cur, form[data-lock="open"] .cur { display: none; }
.fence-note { margin: 0 0 1rem; padding: .5rem .8rem; border-left: 2px solid var(--rose); background: rgba(191, 144, 170, .07); font-style: italic; font-size: .98rem; }
/* the secret gate: a whisper, not a form to fill in */
.gate-door .plate-h h2 { font-style: italic; letter-spacing: .02em; }
.whisper { margin: .5rem 0 1.5rem; font: 2.2rem/1.1 var(--f-hand); color: var(--accent); text-shadow: 0 0 .9em rgba(169, 178, 204, .35); animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.hint { margin: .2rem 0 1rem; padding: .5rem .8rem; border-left: 2px solid var(--rose); background: rgba(191, 144, 170, .07); font-style: italic; color: var(--text); }
.hint span { font: 1.35rem/1 var(--f-hand); color: var(--rose); margin-right: .4rem; font-style: normal; }
.hint-f { display: none; }
form[data-lock="set"] .hint-f, form[data-lock="keep"] .hint-f { display: block; }
.shed-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.rows { margin-top: .3rem; }
.row-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px dashed var(--line2); }
.row-line .ic { color: var(--rose); }

/* editor */
.tools { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .5rem; }
.tools button { padding: .22rem .8rem; border: 1px solid var(--line2); border-radius: 999px; background: transparent; color: var(--text); font: italic .95rem/1.3 var(--f-display); cursor: pointer; }
.tools button:hover:not(:disabled) { border-color: var(--accent); color: var(--moon); }
.tools button:disabled { opacity: .4; cursor: default; }
.tools .push { margin-left: auto; }
.split textarea { width: 100%; padding: .9rem 1rem; background: var(--bg2); color: var(--moon); border: 1px solid var(--line2); border-radius: 8px; font: 400 1.05rem/1.6 var(--f-body); resize: vertical; }
.split textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169, 178, 204, .2); }
.split.on { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.preview { padding: .8rem 1rem; border: 1px dashed var(--line2); border-radius: 8px; max-height: 32rem; overflow: auto; }

/* locked plot gate */
.gate-body { display: grid; grid-template-columns: 9rem 1fr; gap: 2rem; align-items: center; margin-top: 1.6rem; padding: 1.8rem; border: 1px solid var(--line2); border-radius: 14px; background: rgba(10, 12, 18, .88); }
.gate-art { width: 100%; height: auto; display: block; }
.gate-title { font-size: 1.7rem; margin-bottom: .3rem; font-style: italic; }
.gate-body p { margin: .3rem 0 1rem; }
.gate-form { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; }
.gate-form .f { flex: 1 1 14rem; margin: 0; }
.gate-form .f input { margin: 0; }

/* words and link preview in the site text dialog */
.words { border-top: 1px dashed var(--line2); padding: .45rem 0; }
.words summary { cursor: pointer; color: var(--accent); font: italic 1.05rem var(--f-display); padding: .2rem 0; }
.words[open] summary { margin-bottom: .6rem; color: var(--moon); }
.f input[type=color] { height: 2.6rem; padding: .2rem; cursor: pointer; }
.ep { --ep: #5a6fb0; display: grid; gap: .25rem; margin: 1rem 0 .4rem; max-width: 26rem; padding: .7rem .9rem .8rem; background: #1f2127; border-left: 4px solid var(--ep); border-radius: 4px; font: 400 .95rem/1.35 system-ui, sans-serif; color: #dbdee1; }
.ep-name { font-weight: 400; font-size: .75rem; color: #a3a6aa; }
.ep-name:empty, .ep-desc:empty { display: none; }
.ep-title { color: #7fb7ff; font-weight: 600; font-size: 1rem; }
.ep-desc { font-size: .88rem; }
.ep-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin-top: .4rem; border-radius: 4px; background: #101216; }
.ep.small { grid-template-columns: minmax(0, 1fr) 5rem; column-gap: .8rem; }
.ep.small > :not(.ep-img) { grid-column: 1; }
.ep.small .ep-img { grid-column: 2; grid-row: 1 / span 3; aspect-ratio: 1; margin: 0; }

/* pictures list in the site text dialog */
.art-row { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; margin: 1rem 0; align-items: start; }
.art-thumb { width: 5rem; height: 5rem; object-fit: contain; background: #030406; border: 1px solid var(--line2); border-radius: 8px; padding: .3rem; }
.art-fields .f { margin-bottom: .4rem; }
.art-fields .mini { margin-right: .3rem; }
.sky-ctl { margin-top: 1.2rem; padding-top: .8rem; border-top: 1px dashed var(--line2); }

/* ───────── dialog, toasts, busy ───────── */
dialog { padding: 0; border: 1px solid var(--line2); border-radius: 16px; background: #0d0f15; color: var(--text); width: min(34rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 2rem); box-shadow: 0 30px 90px rgba(0, 0, 0, .7); }
dialog::backdrop { background: rgba(2, 3, 5, .72); backdrop-filter: blur(3px); }
.dlg-box { padding: 1.6rem 1.7rem 1.4rem; }
dialog:has(.dlg-box.wide) { width: min(46rem, calc(100vw - 1.5rem)); }
.dlg-box h2 { font-size: 1.7rem; margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.dlg-box h2 .ic { color: var(--rose); }
.dlg-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; }
.dlg-actions .left { margin-right: auto; }
#toasts { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: .5rem; width: min(30rem, calc(100vw - 1.5rem)); pointer-events: none; }
.toast { background: #12151c; border: 1px solid var(--line2); border-radius: 999px; padding: .55rem 1.2rem; font: italic 1.05rem/1.3 var(--f-display); color: var(--moon); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); transition: opacity .5s, transform .5s; text-align: center; }
.toast.err { border-color: #74455f; color: #f0d3e4; }
.toast.out { opacity: 0; transform: translateY(8px); }
#busy { position: fixed; inset: 0; z-index: 95; background: rgba(2, 3, 5, .7); backdrop-filter: blur(2px); display: grid; place-items: center; }
.busy-box { display: flex; align-items: center; gap: .9rem; background: #0d0f15; border: 1px solid var(--line2); border-radius: 999px; padding: .9rem 1.6rem; font: italic 1.15rem var(--f-display); color: var(--moon); }

/* ───────── footer: a line, one small bunny sitting on it ───────── */
.site-foot { position: relative; z-index: 1; margin-top: 2rem; }
.horizon { position: relative; width: 100%; max-width: var(--w); margin: 0 auto; height: 48px; padding: 0 1.25rem; }
.horizon::after { content: ''; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 0; height: 1px; background: var(--line2); }
.sitter { position: absolute; left: 14%; bottom: 0; width: 54px; height: 54px; z-index: 1; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: var(--w); margin: 0 auto; padding: 1rem 1.25rem 2rem; font: italic 1rem/1.5 var(--f-body); color: var(--dim); }

/* ───────── small screens ───────── */
@media (max-width: 640px) {
  body { font-size: 1.06rem; }
  .sky .tended, .mp-name { display: none; }
  .brand-text b { font-size: 1.55rem; }
  .hero { padding-top: 2rem; }
  #sky { height: 620px; }
  .gate-body { grid-template-columns: 1fr; gap: 1rem; padding: 1.2rem; }
  .gate-art { width: 7.5rem; margin: 0 auto; }
  .entry { grid-template-columns: 1fr; row-gap: .1rem; }
  .e-date { font-size: 1.4rem; }
  .bed { grid-template-columns: 2.1rem minmax(0, 1fr) auto; }
  .b-dots { display: none; }
  .b-desc { grid-column: 2 / -1; }
  .row2, .split.on { grid-template-columns: 1fr; }
  .art-row { grid-template-columns: 3.6rem 1fr; }
  .art-thumb { width: 3.6rem; height: 3.6rem; }
  .dlg-box { padding: 1.2rem 1.1rem; }
  .sitter { left: 6%; }
  .pager { flex-direction: column; }
  .pager span:last-child { text-align: left; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  #sky, #moon, #moonbox::before { transition: none; }
  .hop, .whisper { animation: none; }
  .btn, .toast { transition: none; }
}
