/* 모아진 (Moazine): the frame every 모아진 page shares (lib/moazine-page.mjs). The wordmark in the site bar
   (메타모아 · Moazine), the list page (/moazine), the back link and the admin preview's line. An article's own look lives in
   layout-<key>.css, which only sets the --mz-* tokens below and dresses .mz-article; the frame stays the same.
   Fonts: our own subset copies (fonts.css). The list page follows the site's light/dark tokens. */
.mz {
  --mz-paper: var(--paper);
  --mz-ink: var(--ink);
  --mz-ink-2: var(--ink-2);
  --mz-rule: var(--rule);
  --mz-accent: var(--lantern);
  --mz-sans: "MZ Sans", var(--font);
  --mz-mono: "MZ Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --mz-gutter: clamp(16px, 4vw, 56px);
  display: block;
  background: var(--mz-paper);
  color: var(--mz-ink);
  font-family: var(--mz-sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.mz img { display: block; max-width: 100%; }
.mz a:focus-visible { outline: 3px solid var(--mz-accent); outline-offset: 3px; border-radius: 2px; }

/* the Moazine wordmark (a CSS mask of moazine.svg, so it takes the text colour) */
.mz-logo-mark { display: block; aspect-ratio: 2870 / 704; background: currentColor;
  -webkit-mask: url("./moazine.02d86b431a.svg") center / contain no-repeat; mask: url("./moazine.02d86b431a.svg") center / contain no-repeat; }

/* the list (/moazine) */
.mz-list-page { padding-bottom: 72px; }
.mz-list-head { padding: clamp(28px, 5vw, 64px) var(--mz-gutter) 28px; }
.mz-list-title { margin: 0; font: 800 clamp(2rem, 1.4rem + 2.6vw, 3.4rem)/1.1 var(--mz-sans); letter-spacing: -.04em; }
.mz-list-lead { margin: 12px 0 0; max-width: 34em; color: var(--mz-ink-2); font-size: 1.02rem; line-height: 1.7; }
.mz-list { list-style: none; margin: 0; padding: 0 var(--mz-gutter); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 40px 28px; }
.mz-item a { display: grid; gap: 8px; color: inherit; text-decoration: none; }
.mz-item-pic { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface); border: 1px solid var(--mz-rule); }
.mz-item-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mz-item a:hover .mz-item-pic img { transform: scale(1.035); }
.mz-item-corner { margin-top: 6px; font: 600 .78rem/1 var(--mz-sans); letter-spacing: .3em; color: var(--mz-accent); }
.mz-item-vol { margin-left: .7em; font: 500 .74rem/1 var(--mz-mono); letter-spacing: .06em; color: var(--mz-ink-2); }
.mz-item-title { font: 700 1.3rem/1.35 var(--mz-sans); letter-spacing: -.02em; overflow-wrap: anywhere; }
.mz-item a:hover .mz-item-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.mz-item-dek { color: var(--mz-ink-2); font-size: .95rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mz-item-meta { font-size: .8rem; line-height: 1.4; color: var(--mz-ink-2); font-variant-numeric: tabular-nums; }

/* the article's last line and the admin preview's first */
.mz-back { margin: 0; padding: 28px var(--mz-gutter) 64px; text-align: center; }
.mz-back a { display: inline-block; padding: 12px 22px; border: 1px solid currentColor; color: var(--mz-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.mz-back a:hover { background: var(--mz-ink); color: var(--mz-paper); }
.mz-preview-bar { position: sticky; top: 0; z-index: 30; margin: 0; padding: 10px var(--mz-gutter); background: #fff3b0; color: #1d192a; border-bottom: 2px solid #1d192a; font: 700 14px/1.4 var(--font); }

/* the maker kit under the article (lib/moazine-page.mjs makerKit): folded, the layout's paper, ink and fonts */
.mz-kit { max-width: 680px; margin: 0 auto; padding: 8px var(--mz-gutter) 0; box-sizing: content-box; }
.mz-kit-box { border: 2px solid var(--mz-ink); background: var(--mz-paper); box-shadow: 6px 6px 0 var(--mz-ink); }
.mz-kit-sum { cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 15px; line-height: 1.5; word-break: keep-all; list-style-position: inside; }
.mz-kit-sum:hover { background: var(--mz-lime, var(--mz-paper)); }
.mz-kit-sum:focus-visible { outline: 3px solid var(--mz-accent); outline-offset: 2px; }
.mz-kit-box[open] .mz-kit-sum { border-bottom: 2px solid var(--mz-ink); }
.mz-kit-body { display: grid; gap: 22px; padding: 18px; }
.mz-kit-lead { margin: 0; font-size: 14px; line-height: 1.7; color: var(--mz-ink-2); word-break: keep-all; }
.mz-kit-part { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.mz-kit-h { margin: 0; display: inline-block; background: var(--mz-ink); color: var(--mz-paper); padding: 3px 9px; font-size: 13px; line-height: 1.4; font-weight: 800; }
.mz-kit-pic { margin: 0; max-width: 100%; }
.mz-kit-pic img { display: block; max-width: 100%; height: auto; border: 2px solid var(--mz-ink); }
.mz-kit-pic--badge img { border: 0; }
.mz-kit-label { font-size: 13px; font-weight: 700; }
.mz-kit-code { box-sizing: border-box; width: 100%; resize: vertical; padding: 10px 12px; border: 2px solid var(--mz-ink); border-radius: 0; background: #fff; color: var(--mz-ink); font: 400 12px/1.6 var(--mz-mono); overflow-wrap: anywhere; }
.mz-kit-btn { display: inline-block; padding: 9px 16px; border: 2px solid var(--mz-ink); border-radius: 0; background: var(--mz-ink); color: var(--mz-paper); font: inherit; font-size: 14px; font-weight: 800; line-height: 1.4; text-decoration: none; cursor: pointer; }
.mz-kit-btn:hover { background: var(--mz-lime, var(--mz-accent)); color: var(--mz-ink); }
.mz-kit-btn:focus-visible { outline: 3px solid var(--mz-accent); outline-offset: 2px; }

/* the table of contents is a 서울 미니멀 rail; other layouts leave it out */
.mz-toc { display: none; }


/* The space card's name and line come from the space list, not from the article: no subset font can be sure to hold
   their characters, so every layout shows them in the site's font (one face, no mixed glyphs). */

/* a set of pictures side by side (an 'images' block, e.g. a pair of portrait photos): the same in every layout, a layout
   only dresses each .mz-fig. Specific enough to win over a layout's own .mz-fig / .mz-fig-crop size rules. */
.mz .mz-article .mz-body > .mz-figs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 32px; margin: 0 0 72px; align-items: start; }
.mz .mz-body .mz-figs > .mz-fig { display: block; grid-column: auto; margin: 0; }
.mz .mz-body .mz-figs .mz-fig-crop { overflow: hidden; aspect-ratio: 3 / 4; }

/* a picture shown whole (an 'image' block with "fit": "whole", e.g. a card or a collage the maker made): no crop, its own
   proportions, never taller than the screen; every layout. Specific enough to win over a layout's .mz-fig-crop size. */
.mz .mz-body .mz-fig.mz-fig--whole .mz-fig-crop { aspect-ratio: auto; }
.mz .mz-body .mz-fig.mz-fig--whole img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(88vh, 1100px); margin: 0 auto; object-fit: contain; }

/* notes (주석): the number in the text and the list it points to, the same in every layout */
.mz .mz-fn { font-size: .68em; line-height: 0; vertical-align: super; margin-left: 1px; }
.mz .mz-fn a { color: var(--mz-accent); font-weight: 800; text-decoration: none; padding: 0 2px; scroll-margin-top: 96px; }
.mz .mz-fn a:hover { text-decoration: underline; }
.mz .mz-body > .mz-notes { margin: 0 0 64px; padding: 16px 0 0; border-top: 1px solid var(--mz-ink); font-size: 14px; line-height: 1.75; }
.mz .mz-notes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mz .mz-notes li { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); gap: 2px; scroll-margin-top: 96px; }
.mz .mz-note-n { font-weight: 800; color: var(--mz-accent); }
.mz .mz-note-text { margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.mz .mz-note-title { font-weight: 800; }
.mz .mz-note-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.mz .mz-note-back { color: var(--mz-ink-2); text-decoration: none; }

/* a Threads post: Threads' embed draws it in a frame (sized here: the page's policy keeps the script's inline style
   out); until then, or where the script cannot run, the link card inside the blockquote */
.mz .mz-body > .mz-threads { margin: 0 0 72px; }
.mz .mz-threads blockquote { margin: 0; }
.mz .mz-threads iframe { display: block; width: 100%; max-width: 540px; margin: 0 auto; border: 0; border-radius: 12px; background: #fff; }
.mz .mz-threads-link { display: grid; gap: 8px; max-width: 540px; margin: 0 auto; padding: 18px 20px; border: 2px solid var(--mz-ink); border-radius: 12px; background: var(--mz-paper); color: var(--mz-ink); text-decoration: none; }
.mz .mz-threads-title { font-weight: 800; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.mz .mz-threads-go { font-size: 14px; color: var(--mz-accent); font-weight: 700; }
.mz .mz-threads-link:hover .mz-threads-go { text-decoration: underline; text-underline-offset: 3px; }
.mz .mz-threads figcaption { max-width: 540px; margin: 10px auto 0; font-size: 12px; line-height: 1.5; color: var(--mz-ink-2); text-align: center; word-break: keep-all; }

/* every 모아진 page's top bar: 메타모아 · Moazine (lib/moazine-page.mjs withMoazineBrand), inside the site bar's height */
.mz-top-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mz-top-dot { color: var(--ink-2); font-weight: 700; }
.mz-top-zine { display: block; flex: none; width: 68px; color: var(--ink); }
.mz-top-zine:hover { color: var(--lantern); }
.mz-list-page .mz-list-head { padding-top: clamp(20px, 3vw, 36px); }
.mz-list-page .mz-list-lead { margin-top: 0; }
/* the wordmark's M as tall as the 메타모아 letters (owner 11/16 「더 작게」): 68px beside 18.4px text, 58px beside 16px,
   54px beside 14px; the bar keeps its width at 320 (the · and some room go first) */
@media (max-width: 459px) { .mz-top-brand { gap: 5px; } .mz-top-zine { width: 62px; } }
@media (max-width: 380px) { .mz-top-brand { gap: 4px; } .mz-top-dot { display: none; } .mz-top-zine { width: 58px; } }
@media (max-width: 350px) { .mz-top-brand .brand { gap: 6px; font-size: .875rem; } .mz-top-zine { width: 54px; } }
