/* Lomhats portal — visitor pages.
   Look: a page from a Khmer student's exercise book (ruled lines, red margin) tied off with a krama check.
   Fonts are the same self-hosted pair as the Chess and Rek apps. */

@font-face { font-family: 'Kantumruy Pro'; font-weight: 100 700; font-display: swap;
  src: url('../fonts/kantumruy-pro-khmer.woff2') format('woff2'); unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kantumruy Pro'; font-weight: 100 700; font-display: swap;
  src: url('../fonts/kantumruy-pro-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Moul'; font-weight: 400; font-display: swap;
  src: url('../fonts/moul-khmer.woff2') format('woff2'); unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC; }

:root {
  --paper: #F6F1E7;
  --paper-2: #EEE6D6;
  --sheet: #FFFDF8;
  --ink: #2A1E18;
  --ink-2: #63544A;
  --line: #DED3C0;
  --rule: #D3DEE8;
  --margin: #D08A84;
  --lacquer: #9E2B25;
  --lacquer-ink: #FFFDF8;
  --gold: #C99A2E;
  --gold-soft: #F3E3B8;
  --bamboo: #5E8F45;
  --krama: #9E2B25;
  --krama-check: rgba(255, 253, 248, .58);
  --focus: #C99A2E;

  --font: 'Kantumruy Pro', 'Noto Sans Thai', 'Leelawadee UI', Thonburi, system-ui, sans-serif;
  --display: 'Moul', 'Kantumruy Pro', serif;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --rule-gap: 2.25rem;
  --rules: repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule-gap) - 1px), var(--rule) calc(var(--rule-gap) - 1px) var(--rule-gap));
  --spine: rgba(42, 30, 24, .17);
  --stack: 0 2px 0 -1px var(--sheet), 0 3px 0 -1px var(--line), 0 5px 0 -2px var(--sheet), 0 6px 0 -2px var(--line);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1C1512;
    --paper-2: #231A16;
    --sheet: #2A201B;
    --ink: #EDE3D2;
    --ink-2: #BDAE9B;
    --line: #42342B;
    --rule: rgba(150, 175, 200, .13);
    --margin: rgba(214, 110, 100, .55);
    --lacquer: #C9473D;
    --lacquer-ink: #FFF8EE;
    --gold: #D9AE4A;
    --gold-soft: #4A3A18;
    --krama: #7E2621;
    --krama-check: rgba(237, 227, 210, .32);
    --spine: rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
:lang(km) { line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1288px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }

.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-gold { color: var(--gold); fill: var(--gold); }

/* ---------- krama check: the one decorative device ---------- */
.krama {
  height: 12px;
  background-color: var(--krama);
  background-image:
    linear-gradient(90deg, var(--krama-check) 50%, transparent 0),
    linear-gradient(var(--krama-check) 50%, transparent 0);
  background-size: 12px 12px;
}

/* ---------- top bar ---------- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-mark {
  align-self: center; width: 24px; height: 24px; border-radius: 6px; flex: none;
  background-color: var(--krama);
  background-image: linear-gradient(90deg, var(--krama-check) 50%, transparent 0), linear-gradient(var(--krama-check) 50%, transparent 0);
  background-size: 8px 8px;
}
.brand-km { font-family: var(--display); font-size: 1.15rem; line-height: 1.4; }
.brand-en { font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav-link, .lang-switch {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-md); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.topnav-link:hover, .lang-switch:hover { background: var(--paper-2); }
.lang-switch { border: 1.5px solid var(--line); }
@media (max-width: 420px) { .topnav-link span { display: none; } .brand-en { display: none; } }

/* ---------- the desk: every page is a sheet lying on it ---------- */
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; display: flex; flex-direction: column; }
.desk { flex: 1 0 auto; display: flex; justify-content: center; align-items: flex-start; padding: 14px 10px 28px; }
@media (min-width: 640px) { .desk { padding: 28px 24px 44px; } }
.page { background-color: var(--sheet); border: 1.5px solid var(--line); border-radius: var(--r-lg); }
.page-sheet { width: 100%; max-width: 1120px; padding: 20px 18px 32px; box-shadow: var(--stack); }
@media (min-width: 640px) { .page-sheet { padding: 28px 44px 48px; } }

/* ---------- home: an open exercise book ---------- */
.home .desk { align-items: stretch; }
.book { width: 100%; max-width: 1240px; display: grid; gap: 14px; grid-template-rows: auto 1fr; }
.book .page { box-shadow: var(--stack); }
@media (min-width: 960px) {
  .book { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto; gap: 0; border-radius: 20px; box-shadow: var(--stack); }
  .book .page-cover { border-radius: 20px 4px 4px 20px; border-right: 0; box-shadow: inset -34px 0 30px -30px var(--spine); }
  .book .page-contents { border-radius: 4px 20px 20px 4px; border-left: 1px solid var(--line); box-shadow: inset 34px 0 30px -30px var(--spine); }
}

/* left page: the cover, ruled, with the red double margin */
.page-cover { background-image: var(--rules); background-position: 0 14px; }
.cover-in { position: relative; height: 100%; display: flex; flex-direction: column; padding: 26px 18px 24px 44px; container-type: inline-size; }
.cover-in::before { content: ''; position: absolute; top: 0; bottom: 0; left: 20px; border-left: 4px double var(--margin); }
@media (min-width: 640px) { .cover-in { padding: 40px 40px 30px 72px; } .cover-in::before { left: 36px; } }
@media (min-width: 960px) { .cover-in { padding: 64px 44px 36px 84px; } .cover-in::before { left: 42px; } }

.cover-title { margin: 0 0 .35em; font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
/* Khmer has no spaces between words: break display lines only at the spaces the author typed. */
.cover-title:lang(km), .tool-name:lang(km), .page-title:lang(km), .lost-title:lang(km) { word-break: keep-all; overflow-wrap: anywhere; }
.cover-title:lang(km) { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 8.4cqi, 2.45rem); line-height: 1.8; letter-spacing: 0; }
.cover-intro { margin: 0 0 24px; max-width: 40ch; color: var(--ink-2); font-size: 1.05rem; }

.finder { display: grid; gap: 12px; max-width: 520px; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 56px;
  background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 4px 4px 0 var(--paper-2);
}
.search:focus-within { border-color: var(--lacquer); box-shadow: 4px 4px 0 var(--gold-soft); }
.search .ic { width: 22px; height: 22px; color: var(--ink-2); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 1.08rem; padding: 12px 0; }
.search input::placeholder { color: var(--ink-2); opacity: .8; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.who-label { flex-basis: 100%; color: var(--ink-2); font-size: .95rem; }
.seg {
  white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
  border-radius: 999px; text-decoration: none; font-weight: 500; border: 1.5px solid var(--line); background: var(--sheet);
}
.seg:hover { border-color: var(--ink-2); }
.seg.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.level select {
  min-height: 40px; padding: 0 36px 0 12px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363544A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  appearance: none; font-weight: 500;
}

/* right page: the contents */
.page-contents { display: flex; flex-direction: column; overflow: hidden; padding: 22px 16px 0; }
@media (min-width: 640px) { .page-contents { padding: 32px 36px 0; } }
@media (min-width: 960px) { .page-contents { padding: 52px 52px 0 60px; } }
.contents-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 4px double var(--ink); }
.contents-title { margin: 0; font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.contents-title:lang(km) { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.8; }
.count { color: var(--ink-2); font-size: .92rem; white-space: nowrap; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: var(--r-md); text-decoration: none; font-weight: 500; border: 1.5px solid var(--line);
}
.chip:hover { border-color: var(--ink-2); }
.chip.is-on { background: var(--lacquer); border-color: var(--lacquer); color: var(--lacquer-ink); }

.mini-rows { display: flex; flex-wrap: wrap; gap: 0 32px; }
.mini-row { margin-top: 16px; min-width: 0; max-width: 100%; }
.mini-title { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.mini-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.mini {
  flex: none; color: inherit; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); text-decoration: none; font-weight: 600; white-space: nowrap;
}
.mini:hover { border-color: var(--ink-2); }
.mini .tile { width: 34px; height: 34px; border-radius: 9px; font-size: 1.1rem; }

.contents { list-style: none; margin: 4px 0 0; padding: 0; }
.entry {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 18px 0; border-bottom: 2px dotted var(--line);
}
.entry-tile { position: relative; align-self: start; display: block; border-radius: 14px; text-decoration: none; }
.entry-name { margin: 0; font-size: 1.14rem; font-weight: 650; line-height: 1.4; }
.entry-name a { text-decoration: none; }
.entry-name a:hover { text-decoration: underline 2px var(--lacquer); text-underline-offset: 6px; }
.entry-sum { margin: 2px 0 0; color: var(--ink-2); font-size: .95rem; max-width: 60ch; }
.entry-actions { display: flex; align-items: center; gap: 0; }
.btn-open { margin-left: 8px; min-width: 92px; }
@media (max-width: 599px) {
  .entry { grid-template-columns: 52px minmax(0, 1fr); align-items: start; padding: 16px 0; }
  .entry-actions { grid-column: 2; margin-top: 6px; }
  .btn-open { order: -1; margin: 0 6px 0 0; }
  .entry .tile { width: 52px; height: 52px; }
}
.ribbon {
  position: absolute; top: -3px; right: 7px; width: 12px; height: 19px; background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%);
}

/* the unused lines at the end of the contents page */
.blank-lines {
  flex: 1 0 auto; min-height: 8rem; display: flex; align-items: flex-end;
  margin: 0 -16px; padding: 28px 16px 22px;
  background-image: var(--rules); background-position: 0 6px;
}
@media (min-width: 640px) { .blank-lines { margin: 0 -36px; padding: 32px 36px 26px; } }
@media (min-width: 960px) { .blank-lines { margin: 0 -52px 0 -60px; padding: 32px 52px 30px 60px; } }
.invite { margin: 0; color: var(--ink-2); font-size: .95rem; background: var(--sheet); padding: 2px 6px; margin-left: -6px; border-radius: 6px; }
.invite a { color: var(--lacquer); font-weight: 600; text-underline-offset: 4px; }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md);
  background: none; border: 0; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.fav[aria-pressed="true"] { color: var(--gold); }
.fav[aria-pressed="true"] .ic { fill: var(--gold); }
.fav.pop .ic { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.3); } }

.tile {
  flex: none; width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--acc, var(--lacquer)); color: #fff; font-size: 1.75rem; line-height: 1; overflow: hidden;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', var(--font);
}
.tile-img { background: var(--paper-2); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile-lg { width: 84px; height: 84px; border-radius: 20px; font-size: 2.6rem; }
.acc-lacquer { --acc: #9E2B25; } .acc-gold { --acc: #B0841F; } .acc-bamboo { --acc: #4F7F3A; } .acc-mekong { --acc: #2F5566; }
.acc-indigo { --acc: #34508C; } .acc-teak { --acc: #9A6233; } .acc-lotus { --acc: #B04A72; } .acc-celadon { --acc: #4C8378; }

.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.badge { font-size: .78rem; line-height: 1.5; padding: 1px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); font-weight: 500; }
.badge-new { background: var(--gold-soft); color: var(--ink); font-weight: 650; }

.nothing { margin-top: 16px; padding: 24px 18px; border: 2px dashed var(--line); border-radius: var(--r-lg); text-align: center; }
.nothing p { margin: 0 0 12px; font-size: 1.05rem; }
.nothing-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 0 !important; }
.empty { padding: 24px 0; color: var(--ink-2); font-size: 1.05rem; }

/* admin only: shown on the public site while logged in */
.adminbar { background: var(--ink); color: var(--paper); font-size: .88rem; }
.adminbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.adminbar span { opacity: .75; }
.adminbar a { color: inherit; font-weight: 600; text-underline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-md); border: 1.5px solid var(--ink); background: transparent; text-decoration: none;
  font-weight: 600; cursor: pointer; line-height: 1.3; text-align: center;
}
.btn:hover { background: var(--paper-2); }
.btn-primary { background: var(--lacquer); border-color: var(--lacquer); color: var(--lacquer-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--lacquer) 88%, #000); }
.btn-quiet { border-color: var(--line); }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 1.05rem; border-radius: 14px; }
.btn .ic { width: 1.2em; height: 1.2em; }

/* ---------- detail page ---------- */
.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.crumb:hover { color: var(--ink); }
.tool-head-in { padding-bottom: 28px; border-bottom: 4px double var(--ink); }
.tool-id { display: flex; gap: 18px; align-items: flex-start; margin-top: 8px; }
.tool-cat { display: inline-block; color: var(--lacquer); font-weight: 600; text-decoration: none; font-size: .95rem; }
.tool-cat:hover { text-decoration: underline; }
.tool-name { margin: 2px 0 6px; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.tool-name:lang(km) { font-family: var(--display); font-weight: 400; font-size: clamp(1.45rem, 4.2vw, 2.1rem); line-height: 1.7; letter-spacing: 0; }
.tool-sum { margin: 0; color: var(--ink-2); font-size: 1.08rem; max-width: 60ch; }
.tool-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 520px) { .tool-cta .btn { width: 100%; } .tool-id { flex-direction: column; } }
.note { color: var(--ink-2); }

.tool-body { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 40px; }
@media (min-width: 900px) { .tool-body { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 48px; } }
.tool-main h2, .side-title { font-size: 1.1rem; font-weight: 650; margin: 0 0 10px; }
.tool-main section + section { margin-top: 32px; }
.cover { border-radius: var(--r-lg); margin-bottom: 28px; border: 1.5px solid var(--line); }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--lacquer); }

.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.parts a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--sheet); text-decoration: none; font-weight: 550;
}
.parts a:hover { border-color: var(--ink-2); }
.parts .ic { color: var(--lacquer); }

.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.shots a { flex: none; scroll-snap-align: start; }
.shots img { height: min(440px, 70vh); width: auto; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper-2); }

.facts { margin: 0 0 24px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 16px; border-radius: var(--r-lg); background: var(--paper-2); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 550; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btns .btn { min-height: 42px; padding: 0 14px; font-weight: 550; }
.report { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--ink-2); min-height: 44px; }
.related { margin-top: 12px; padding-top: 28px; border-top: 2px dotted var(--line); }
.related > p { margin-top: 20px; }

/* ---------- forms ---------- */
.form-page.page-sheet { max-width: 760px; }
.page-title { margin: 8px 0 8px; font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.2; }
.page-title:lang(km) { font-family: var(--display); font-weight: 400; line-height: 1.75; font-size: clamp(1.45rem, 4.2vw, 2rem); }
.lead { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 24px; }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field legend, .label { font-weight: 600; padding: 0; margin-bottom: 6px; }
.hint { color: var(--ink-2); font-size: .9rem; }
.field input[type=text], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--sheet);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lacquer); box-shadow: 0 0 0 3px var(--gold-soft); }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: var(--sheet); }
.radio:has(input:checked) { border-color: var(--lacquer); box-shadow: inset 0 0 0 1px var(--lacquer); }
.radio input { accent-color: var(--lacquer); width: 18px; height: 18px; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 12px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--lacquer) 12%, var(--sheet)); border: 1.5px solid var(--lacquer); }
.sent { padding: 24px 0; }

.lost-in.page-sheet { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.lost-title { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.2; margin: 0 0 12px; }
.lost-title:lang(km) { font-family: var(--display); font-weight: 400; line-height: 1.75; font-size: clamp(1.4rem, 4vw, 2rem); }

/* ---------- footer ---------- */
.footer { background: var(--paper-2); }
.footer-in { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; }
.footer-brand { margin: 0; font-weight: 600; }
.footer-brand span { font-family: var(--display); font-weight: 400; }
.footer-note { margin: 2px 0 0; color: var(--ink-2); font-size: .93rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: var(--r-md); font-weight: 550;
  transition: opacity .2s var(--ease), transform .2s var(--ease); pointer-events: none; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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