/* Moss & Mallow website - flat and cozy.
   Design notes (2026-10-23 redesign, after the sites of cozy games -
   warm, soft, hand-made cozy look):
   - no shadows and no outlined boxes anywhere: shapes come from flat colour
     (cream paper, mint, peach, wood) and soft round corners;
   - sections meet on hand-drawn waves instead of hard edges;
   - painted leafy icons carry the look (img/icons), free-standing, no tiles;
   - one bouncy green call to action; secondary buttons are cream pills;
   - big rounded Mitr headings, short lines, generous space.
   Mobile first, 320px to wide desktop. Class names are unchanged, so every
   page picks the look up. */
:root {
  --bg: #fff8ec;
  --bg-2: #f7ecd8;
  --mint: #e8f4d9;
  --peach: #ffeedd;
  --sky-soft: #e6f1f8;
  --card: #fffdf8;
  --ink: #3a2a14;
  --ink-2: #5c4a30;
  --muted: #75603f;      /* (darker for contrast, 2026-10-27) */
  --brown: #74351c;
  --wood: #8a5a2b;
  --wood-dark: #4a2e16;
  --leaf: #3f7f1f;       /* (darker: white text on it was 2.4:1, 2026-10-27) */
  --leaf-2: #4f9a25;
  --leaf-ink: #183a08;
  --rose: #e5566c;
  --gold: #f2b84b;
  --radius: 28px;
  --radius-sm: 18px;
  --font: "Noto Sans Thai", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
  --display: "Mitr", "Noto Sans Thai", system-ui, sans-serif;
  --header-h: 68px;
  /* the wave used where two colours meet (colour comes from the mask's bg) */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C90 4 170 4 260 18s170 22 260 6 180-26 270-10 170 24 260 8 110-20 150-16V40Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf-2); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--brown); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 0.45em; font-weight: 600; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.9vw, 2.45rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; color: var(--ink-2); }
ul, ol { color: var(--ink-2); }
b, strong { color: var(--ink); }

/* Language switch: show only the active language. */
[data-lang="th"] .en, [data-lang="en"] .th { display: none !important; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }

/* ---------- header: solid cream, nothing drawn around it ---------- */
.site-header { position: sticky; top: var(--maint-h, 0px); z-index: 50; background: var(--bg); }
/* The admin page's maintenance message (footer.html): above the top bar, which
   moves down by its height (--maint-h) - 2026-11-06: it used to cover the bar */
.maint-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #c9822b; color: #fff;
  padding: 8px 16px; text-align: center; font-weight: 600; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
body { padding-top: var(--maint-h, 0px); }
.site-header .wrap { display: flex; align-items: center; gap: 8px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 6px 12px 6px 8px; border-radius: 999px; white-space: nowrap;
}
.nav-ico { width: 28px; height: 28px; object-fit: contain; flex: none; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a:hover .nav-ico { transform: rotate(-8deg) scale(1.08); }
.nav a[aria-current="page"] { color: var(--leaf-ink); background: var(--mint); }
.nav .btn-nav .nav-ico { display: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 14px var(--font); color: var(--ink); background: var(--bg-2);
  border: 0; border-radius: 999px; padding: 4px 14px 4px 6px; cursor: pointer;
  min-height: 40px; min-width: 52px;
}
.lang-btn .nav-ico { width: 26px; height: 26px; }
.lang-btn:hover { background: var(--mint); }
.menu-btn { display: none; }
@media (prefers-reduced-motion: no-preference) { .nav-ico { transition: transform 0.2s ease; } }

@media (max-width: 1040px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 14px; border: 0;
    background: var(--bg-2); font-size: 22px; cursor: pointer; color: var(--ink);
  }
  .nav {
    position: absolute; left: 12px; right: 12px; top: calc(100% + 4px);
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-2); border-radius: var(--radius);
    display: none; padding: 12px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 14px 10px 10px; font-size: 17px; border-radius: 16px; }
  .nav a:hover, .nav a[aria-current="page"] { background: var(--card); }
  .nav-ico { width: 34px; height: 34px; }
  .nav .btn-nav { margin-top: 6px; justify-content: center; }
}

/* ---------- buttons: flat pills that bounce a little ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 12px 32px; border-radius: 999px; border: 0;
  font: 600 18px var(--display); text-decoration: none; cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.18s cubic-bezier(.3, 1.6, .6, 1), background-color 0.15s; }
  .btn:hover { transform: scale(1.04); }
}
.btn:active { transform: scale(0.97); }
.btn-play { background: var(--leaf); color: #fff; }
.btn-play:hover { background: var(--leaf-2); color: #fff; }
.btn-wood { background: var(--bg-2); color: var(--ink); }
.btn-wood:hover { background: #efdfc2; color: var(--ink); }
.btn-ghost { background: rgba(255, 255, 255, 0.18); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-nav { min-height: 40px; padding: 6px 18px; font-size: 15px; margin-left: 6px; color: #fff !important; }
.btn-nav:hover { transform: none; }

/* ---------- home hero: words left, key art right; stacked on phones ---------- */
.hero { position: relative; background: var(--mint); padding: clamp(26px, 5vw, 64px) 0 clamp(70px, 9vw, 120px); }
.hero::after {                       /* the wave into the cream page below */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(24px, 4vw, 44px);
  background: var(--bg); -webkit-mask: var(--wave) center / 100% 100% no-repeat; mask: var(--wave) center / 100% 100% no-repeat;
}
.hero-grid { display: grid; gap: clamp(22px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
/* Desktop: the key art gets most of a wider row (it read too small at half of 1160 px). */
@media (min-width: 960px) {
  .hero .wrap.hero-grid { width: min(1480px, 100% - 56px); grid-template-columns: minmax(340px, 0.62fr) 1.38fr; }
  .hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); }
}
.hero h1 { max-width: 14em; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 32em; margin: 0 0 26px; color: var(--ink-2); }
.hero .btn-row { justify-content: flex-start; }
.hero-art { display: block; }
.hero-art img { width: 100%; height: auto; border-radius: 40px 40px 40px 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.badges li { background: var(--card); color: var(--ink-2); padding: 4px 14px 4px 10px; border-radius: 999px; }
.badges li::before { content: "✔"; color: var(--leaf-2); margin-right: 6px; font-weight: 700; }
.hero .beta-note {
  display: inline-block; margin: 16px 0 0; padding: 6px 14px; border-radius: 999px;
  background: #fff3d6; color: var(--ink-2); font-size: 14px; line-height: 1.5;
}
.hero .beta-note b { color: #b07015; letter-spacing: 0.06em; margin-right: 6px; }
@media (max-width: 959px) {
  .hero-art { order: -1; }
  .hero-art img { border-radius: var(--radius); }
}

/* ---------- "at a glance": free-standing painted icons ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 10px;
  padding: 8px 0 0; margin: 0 auto; text-align: center;
}
.stats > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-ico { width: 84px; height: 84px; object-fit: contain; }
.stats span { font: 600 15px/1.35 var(--display); color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .stat-ico, .icon-card .ico { transition: transform 0.25s cubic-bezier(.3, 1.6, .6, 1); }
  .stats > div:hover .stat-ico, .icon-card:hover .ico { transform: translateY(-4px) rotate(-4deg); }
}

/* ---------- sections: colour bands that meet on waves ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section.alt, .section.mint { --band: var(--bg-2); background: var(--band); }
.section.mint { --band: var(--mint); }
.section.alt::before, .section.mint::before, .section.alt::after, .section.mint::after {
  content: ""; position: absolute; left: 0; right: 0; height: clamp(22px, 3.5vw, 40px); background: var(--band);
  -webkit-mask: var(--wave) center / 100% 100% no-repeat; mask: var(--wave) center / 100% 100% no-repeat;
}
.section.alt::before, .section.mint::before { bottom: 100%; margin-bottom: -1px; }
.section.alt::after, .section.mint::after { top: 100%; margin-top: -1px; transform: scaleY(-1); }
.section-title { text-align: center; margin: 0 auto 40px; max-width: 46em; }
.section-title p { color: var(--muted); font-size: 1.08rem; margin: 0 auto; }
.eyebrow {
  display: inline-block; font: 600 13.5px var(--font); letter-spacing: 0.08em;
  color: var(--leaf-ink); background: var(--mint); padding: 3px 14px; border-radius: 999px; margin-bottom: 12px;
}
.section.mint .eyebrow, .hero .eyebrow { background: var(--card); }

/* Zig-zag feature rows: picture one side, words the other. */
.zig { display: grid; gap: clamp(26px, 5vw, 72px); align-items: center; grid-template-columns: 1fr; }
.zig + .zig { margin-top: clamp(56px, 8vw, 104px); }
@media (min-width: 900px) { .zig { grid-template-columns: 1.15fr 0.85fr; } .zig.flip > :first-child { order: 2; } }
.zig img, .shot { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-2); }
.zig.flip img { border-radius: var(--radius) var(--radius) 12px var(--radius); }
.zig:not(.flip) img { border-radius: var(--radius) var(--radius) var(--radius) 12px; }
.zig h2 { margin-bottom: 0.4em; }
/* Cut-out illustrations (designer, 2026-10-27): no background, frame or shadow, never cropped */
.zig img.cutout, .zig.flip img.cutout, .zig:not(.flip) img.cutout { border-radius: 0; aspect-ratio: auto; object-fit: contain; background: none; box-shadow: none; border: 0; height: auto; }
.points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 32px; }
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%234f9a25' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- panels: flat paper, no border, no shadow ---------- */
.panel { background: var(--card); border: 0; border-radius: var(--radius); padding: 26px; }
.section.alt .panel, .section.mint .panel { background: var(--card); }
main.section > .wrap .panel { background: var(--bg-2); }
.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.feature img { border-radius: var(--radius-sm); margin-bottom: 16px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--bg-2); }
.feature h3 { color: var(--ink); }
/* the little-details cards: just a painted icon and words - no box at all */
.icon-card.panel, .section .icon-card.panel { background: none; padding: 6px 8px; text-align: center; }
.icon-card .ico { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 10px; }
.icon-card p { max-width: 24em; margin-inline: auto; }
.tag {
  display: inline-block; font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--mint); border: 0; color: var(--leaf-ink); margin: 0 6px 8px 0;
}
.tag.soon { background: #efe6fb; color: #5b3fa0; }

.split { display: grid; gap: clamp(26px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 0.9fr; } .split.flip > :first-child { order: 2; } }
.split img { border-radius: var(--radius); border: 0; background: var(--bg-2); }

.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.mallow-card { text-align: center; }
.mallow-card img { width: auto; height: 120px; max-width: 100%; object-fit: contain; margin: 0 auto 10px; }
.split .mallow-card img { border: 0; background: none; border-radius: 0; }
.mallow-card img.fam { height: 128px; width: auto; }        /* exactly half the 4x art: crisp pixels */
.mallow-card .theme { color: var(--muted); font-size: 14px; }
a.card-link { display: block; text-decoration: none; color: var(--ink); }
a.card-link small { display: block; color: var(--leaf-2); font-weight: 600; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  a.card-link, .lift { transition: transform 0.22s cubic-bezier(.3, 1.6, .6, 1), background-color 0.2s; }
  a.card-link:hover { transform: translateY(-4px); }
}

/* Characters to pick on the home page. */
.pick { background: var(--peach); }
.pick:hover { background: #ffe4cc; }
.pick img { height: 150px; }

/* ---------- numbered steps ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 18px 20px 18px 74px; border-radius: var(--radius-sm); }
.steps li::before {
  content: counter(s); position: absolute; left: 20px; top: 16px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--leaf); color: #fff; font: 700 17px var(--display);
}
.steps3 { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps3 li { counter-increment: s; text-align: center; padding: 8px 10px; }
.steps3 li::before {
  content: counter(s); display: grid; place-items: center; margin: 0 auto 16px;
  width: 60px; height: 60px; border-radius: 22px; background: var(--leaf); color: #fff;
  font: 600 24px var(--display); transform: rotate(-4deg);
}
.steps3 li:nth-child(2)::before { background: var(--gold); transform: rotate(3deg); }
.steps3 li:nth-child(3)::before { background: var(--rose); transform: rotate(-2deg); }
.steps3 h3 { margin-bottom: 6px; }

/* ---------- tables and keys ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 2px dashed rgba(138, 90, 43, 0.16); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--display); font-weight: 600; color: var(--ink); }
.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); border: 0; background: var(--card); }
kbd {
  display: inline-block; min-width: 1.9em; text-align: center; padding: 1px 8px;
  border: 0; border-radius: 8px; background: var(--card); font: 600 14px var(--font); color: var(--ink);
}
.key { display: inline-block; vertical-align: middle; width: 60px; height: auto; margin: 0 1px; }
.key.mouse { width: 38px; margin: 0 4px 0 6px; }
.spacebar { position: relative; display: inline-block; vertical-align: middle; }
.spacebar .key { width: 124px; }
.spacebar span { position: absolute; inset: 0 0 6px; display: grid; place-items: center; font: 600 15px var(--display); color: var(--brown); }
.season { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.season.spring { background: #f29bb8; } .season.summer { background: var(--gold); }
.season.fall { background: #e07a35; } .season.winter { background: #8cc8e8; }
.with-ico { display: flex; align-items: center; gap: 10px; }
.h-ico { width: 58px; height: 58px; object-fit: contain; flex: none; }

/* ---------- FAQ: soft paper strips that open ---------- */
details.faq { padding: 0; overflow: hidden; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary {
  cursor: pointer; padding: 18px 60px 18px 24px; font-weight: 600; list-style: none; position: relative;
  font-family: var(--display); font-size: 1.08rem; color: var(--ink);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--leaf); color: #fff; font-size: 20px; line-height: 1;
}
details.faq[open] summary::after { content: "–"; background: var(--wood); }
details.faq > div { padding: 0 24px 20px; }

.note { background: var(--mint); border: 0; border-radius: var(--radius-sm); padding: 14px 18px; }
.cta { text-align: center; }
.cta .panel { padding: 40px 24px; }
.update { position: relative; }
.update .date {
  display: inline-block; color: var(--leaf-ink); background: var(--mint); font-size: 13.5px; font-weight: 600;
  padding: 2px 12px; border-radius: 999px;
}
article.update + article.update { margin-top: 22px; }

main.section > .wrap > .section-title:first-child,
main.section > .wrap > h1.section-title:first-child { margin-bottom: 44px; }

/* ---------- closing call to action ---------- */
/* (designer, 2026-10-27: a new background picture - the Mallow garden - under
   a warm wood wash instead of the dark green, and a honey-gold button) */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 40px;
  padding: clamp(44px, 7vw, 84px) 24px; text-align: center; color: #fff;
}
.cta-band .cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 85% at 50% 50%, rgba(74, 46, 22, 0.72), rgba(74, 46, 22, 0.38));
}
.cta-band h2, .cta-band p { color: #fff; text-shadow: 0 2px 10px rgba(40, 22, 8, 0.55); }
.cta-band p { max-width: 34em; margin: 0 auto 24px; }
.cta-band .btn-play {
  background: linear-gradient(180deg, #ffd77a, var(--gold)); color: var(--wood-dark);
  border-color: #fff1c9; box-shadow: 0 5px 0 #b87a25, 0 10px 22px rgba(40, 22, 8, 0.35);
}
.cta-band .btn-play:hover { background: linear-gradient(180deg, #ffe08f, #f5c25c); color: var(--wood-dark); }

/* ---------- footer: wood, with a wavy top ---------- */
.site-footer {
  position: relative; margin-top: clamp(30px, 4vw, 44px); background: var(--wood-dark);
  color: rgba(255, 244, 230, 0.8); padding: 56px 0 44px; font-size: 15px;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: -1px; height: clamp(22px, 3.5vw, 40px);
  background: var(--wood-dark); -webkit-mask: var(--wave) center / 100% 100% no-repeat; mask: var(--wave) center / 100% 100% no-repeat;
}
.site-footer a { color: #fff4e6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer p { color: rgba(255, 244, 230, 0.8); }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h3 { color: #fff4e6; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: inherit; }
.site-footer .fine { grid-column: 1 / -1; opacity: 0.8; font-size: 14px; border-top: 2px dashed rgba(255, 244, 230, 0.14); padding-top: 20px; margin: 6px 0 0; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 8px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: 12px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Gentle fade-up as sections come into view (site.js adds .in). */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}


/* The character-select cards keep the painted wood frame (UI v2); the rest of
   the site keeps its flat look (designer, 2026-10-23). */
.pick { background: none; border-style: solid; border-color: transparent; border-radius: 0;
  border-width: 42px 29px 29px 41px; border-image: url("/img/ui/panel_tall.webp") 84 58 58 82 fill / 42px 29px 29px 41px; padding: 0 2px 4px 0; }
.pick:hover { background: none; filter: brightness(1.04); }
@media (max-width: 520px) { .pick { border-width: 30px 20px 20px 29px; border-image-width: 30px 20px 20px 29px; } .pick img { height: 110px; } }
.split > *, .grid > * { min-width: 0; }
.row-ico { display: inline-block; width: 28px; height: 28px; object-fit: contain; vertical-align: middle; margin-right: 8px; }

/* The Mallow families page (2026-10-25): every family's legend, then its
   three grown-up forms as the designer's silhouettes, each with its story. */
.intro-note { text-align: center; color: var(--muted); max-width: 46em; margin: -18px auto 28px; }
.fam-list { display: grid; gap: 26px; }
.fam-block h3 { font-family: var(--display); font-size: 1.6rem; margin: 0 0 2px; color: var(--brown); }
.fam-block .theme { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.fam-block .lore { line-height: 1.75; margin: 0 0 18px; }
.shadow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.shadow-card { margin: 0; background: var(--bg-2, #fff3df); border-radius: var(--radius-sm); padding: 16px 14px 14px; text-align: center; }
.shadow-card img { display: block; height: 150px; width: 100%; object-fit: contain; margin: 0 auto 10px;
  filter: drop-shadow(0 6px 6px rgba(58, 42, 20, .18)); transition: transform .25s ease; }
.shadow-card:hover img { transform: translateY(-4px) scale(1.04); }
.shadow-card figcaption { font-size: 14px; line-height: 1.6; color: var(--ink); }
.shadow-card figcaption b { display: block; font-family: var(--display); font-size: 1.1rem; color: var(--brown); margin-bottom: 4px; }
/* the Spiritbun: a night card, its shadows faintly glowing */
.fam-block.night { background: linear-gradient(160deg, #2d2550, #1c1830); color: #efe6ff; }
.fam-block.night h3 { color: #d8c8ff; }
.fam-block.night .theme { color: #a99cd8; }
.fam-block.night .shadow-card { background: rgba(255, 255, 255, .06); }
.fam-block.night .shadow-card figcaption { color: #e4dcff; }
.fam-block.night .shadow-card figcaption b { color: #ffe27a; }
.fam-block.night .shadow-card img { filter: invert(1) sepia(.5) hue-rotate(205deg) saturate(1.6) brightness(.85) drop-shadow(0 0 10px rgba(160, 140, 255, .55)); }
@media (max-width: 560px) {
  .shadow-card img { height: 120px; }
  .fam-block h3 { font-size: 1.35rem; }
}

/* Meet the Mallows (2026-10-26): each silhouette stands in its own painted
   scene (the Mallow's home), and a strip of six scenes opens the page. */
.shadow-card { position: relative; overflow: hidden; isolation: isolate; }
.shadow-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 190px; z-index: -1;
  background: var(--scene) center / cover no-repeat; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.shadow-card::after { content: ""; position: absolute; left: 0; right: 0; top: 120px; height: 72px; z-index: -1;
  background: linear-gradient(transparent, var(--bg-2, #fff3df)); }
.shadow-card img { height: 160px; filter: drop-shadow(0 4px 10px rgba(255, 250, 235, .9)) drop-shadow(0 6px 6px rgba(58, 42, 20, .25)); }
.fam-block.night .shadow-card::after { background: linear-gradient(transparent, #26203f); }
.scene-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 520px; justify-self: center; }
.scene-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; box-shadow: 0 6px 16px rgba(58, 42, 20, .18); }
@media (max-width: 640px) { .scene-strip { gap: 6px; } }
/* A picture set into the page, not dropped in (designer, 2026-10-26): a cream
   mat with rounded corners, a soft shadow, a slight tilt, and a capped size
   beside its text. */
.framed-art { position: relative; justify-self: center; width: 100%; max-width: 600px; margin: 0; }
.framed-art::before { content: ""; position: absolute; inset: 8% -4% -6% 6%; border-radius: 36px; z-index: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(124, 192, 75, .28), rgba(124, 192, 75, 0) 70%); }
.framed-art img { position: relative; z-index: 1; display: block; width: 100%; height: auto;
  padding: 10px; background: #fffaf0; border-radius: 28px; box-shadow: 0 18px 40px rgba(58, 42, 20, .18), 0 3px 8px rgba(58, 42, 20, .10);
  transform: rotate(1.4deg); transition: transform .35s ease; }
.framed-art:hover img { transform: rotate(0deg) scale(1.01); }
@media (prefers-reduced-motion: reduce) { .framed-art img { transition: none; } }
@media (max-width: 760px) { .framed-art { max-width: 520px; } .framed-art img { transform: none; padding: 7px; border-radius: 20px; } }
.framed-art picture { display: block; }
/* home: a calmer split - text and picture share the row evenly */
.hero .wrap.hero-grid { grid-template-columns: minmax(320px, 1fr) minmax(0, 1fr); width: min(1240px, 100% - 56px); }
@media (max-width: 900px) { .hero .wrap.hero-grid { grid-template-columns: 1fr; } }
.hero-art img { border-radius: 28px; }
/* Pictures beside text are as tall as the text and cropped to fill (designer,
   2026-10-26: "crop so it fits the space and balances the text"); the crop
   keeps the farmers and Mallows (object-position). On a phone the picture sits
   under the text at a fixed shape instead. */
.framed-art.fit-text { align-self: stretch; display: flex; max-width: 640px; }
.framed-art.fit-text picture { display: flex; width: 100%; }
.framed-art.fit-text img { width: 100%; height: 100%; min-height: 300px; max-height: 520px; object-fit: cover; aspect-ratio: auto; }
.framed-art.fit-text.focus-mid img { object-position: 50% 58%; }
.framed-art.fit-text.focus-hero img { object-position: 42% 62%; }    /* the two farmers and the Mallows at their feet */
@media (max-width: 900px) {
  .framed-art.fit-text { align-self: auto; }
  .framed-art.fit-text img { height: auto; min-height: 0; max-height: none; aspect-ratio: 1 / 1; }
  .framed-art.fit-text.focus-hero img { aspect-ratio: 4 / 3; }
}
/* Cover hero (designer, 2026-10-27, from their mock-up): the picture is the
   section's background - no mat, shadow or tilt - filling the right side and
   fading into the page colour behind the words; on a phone the words sit on
   top and the picture shows beneath them. Only the picture's display changes. */
/* (the page colour as r g b, so older Safari can fade it - no color-mix) */
.cover-hero { --cover: 255 248 236; position: relative; overflow: hidden; isolation: isolate; }
.cover-hero.hero { --cover: 232 244 217; }
.cover-hero > .wrap { position: static; }   /* (the picture fills the section, not the column) */
.cover-hero > .wrap > :not(.framed-art) { position: relative; z-index: 2; }
.cover-hero .framed-art {
  position: absolute; z-index: 0; top: 0; bottom: 0; right: 0; left: 0;
  width: auto; max-width: none; margin: 0; display: block;
  /* (2026-10-28: it is still a grid item, and newer browsers take the grid's
     "centre" for a positioned item too - it shrank to the picture's own width
     and left bare strips on wide screens) */
  justify-self: stretch; align-self: stretch;
}
@media (min-width: 901px) { .cover-hero .framed-art { width: 100%; } }
.cover-hero .framed-art::before { display: none; }
.cover-hero .framed-art picture { display: block; width: 100%; height: 100%; }
.cover-hero .framed-art img {
  width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto;
  object-fit: cover; padding: 0; background: none; border-radius: 0; box-shadow: none; transform: none;
}
.cover-hero .framed-art:hover img { transform: none; }
/* (2026-10-27: the designer's two wide paintings - open country on the left,
   the farmers and Mallows on the right - fill the whole band; a soft wash
   on the left keeps the words readable, like the mock-up) */
.cover-hero .framed-art img { object-position: 72% 50%; }
.cover-hero::before {                        /* the wash behind the words */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--cover) / 0.9) 0%, rgb(var(--cover) / 0.8) 28%, rgb(var(--cover) / 0.35) 46%, rgb(var(--cover) / 0) 60%);
}
.cover-hero.hero::after { z-index: 3; }      /* the wave stays over the picture */
.cover-hero .hero-grid, .cover-hero .split { min-height: clamp(500px, 46vw, 700px); }
@media (min-width: 901px) {                  /* the Mallow page: words kept to the open country on the left */
  .cover-hero .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .cover-hero:not(.hero) .framed-art img { object-position: 92% 50%; }
  .cover-hero:not(.hero)::before { background: linear-gradient(90deg, rgb(var(--cover) / 0.92) 0%, rgb(var(--cover) / 0.86) 34%, rgb(var(--cover) / 0.4) 50%, rgb(var(--cover) / 0) 62%); }
}
/* Phones (2026-10-27: on Safari the painting hid behind the words, washed
   out): the words first, then the painting itself, clear and edge to edge,
   cropped on the farmers and their Mallows. */
@media (max-width: 900px) {
  .cover-hero::before { display: none; }
  .cover-hero > .wrap { position: relative; }
  .cover-hero .hero-grid, .cover-hero .split { min-height: 0; padding-bottom: 0; }
  /* (2026-10-27: the painting on top, under the see-through bar, then the words) */
  .cover-hero .hero-grid, .cover-hero .split { display: flex; flex-direction: column; }
  .cover-hero .framed-art, .cover-hero .hero-art {
    position: relative; inset: auto; order: -1; z-index: 0;
    width: 100vw; max-width: none; margin: 0 0 4px calc(50% - 50vw); height: auto;
  }
  .cover-hero .framed-art img {
    width: 100%; height: auto; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 80% 60%;
    -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 16%); mask-image: linear-gradient(0deg, transparent 0, #000 16%);
  }
  .cover-hero:not(.hero) .framed-art img { object-position: 74% 70%; }
  .cover-hero.hero { padding-bottom: clamp(24px, 6vw, 44px); }
}
/* The buttons on the picture, as in the mock-up: the play button with a gold
   rim, the second one a soft cream pill. */
.cover-hero .btn-play { box-shadow: 0 0 0 3px #f0cf86, 0 6px 0 #2f5f16, 0 10px 22px rgba(40, 60, 20, 0.28); }
.cover-hero .btn-wood { background: rgb(255 248 236 / 0.88); box-shadow: 0 0 0 2px rgb(255 255 255 / 0.7), 0 6px 18px rgba(58, 42, 20, 0.16); }
.cover-hero .btn-wood:hover { background: #fff8ec; }
.cover-hero .badges li, .cover-hero .tag { background: rgb(255 253 248 / 0.82); }

/* The top bar over a cover picture (designer, 2026-10-27, from the mock-up):
   see-through at the top of the page, its buttons frosted pills; once you
   scroll it turns solid cream again so it stays readable. (site.js sets
   has-cover / scrolled.) */
html.has-cover .site-header {
  position: fixed; left: 0; right: 0; background: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
html.has-cover main > .cover-hero:first-child { padding-top: calc(var(--header-h) + clamp(20px, 4vw, 48px)); }
html.has-cover .site-header .lang-btn, html.has-cover .site-header .menu-btn,
html.has-cover .site-header .nav a:not(.btn-nav) {
  background: rgb(255 250 240 / 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7);
}
html.has-cover .site-header .nav a[aria-current="page"] { background: rgb(232 244 217 / 0.85); }
html.has-cover .site-header .nav a:not(.btn-nav):hover { background: rgb(255 250 240 / 0.88); }
html.has-cover .site-header .btn-nav { box-shadow: 0 0 0 2px #f0cf86; }
html.has-cover.scrolled .site-header { background: rgb(255 248 236 / 0.94); box-shadow: 0 2px 14px rgba(58, 42, 20, 0.1); }
@media (max-width: 1040px) {
  html.has-cover .site-header .nav a:not(.btn-nav) { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.has-cover .site-header .nav a[aria-current="page"] { background: var(--card); }
}
/* Phones: the painting runs up under the see-through bar, as on desktop (2026-10-27). */
@media (max-width: 900px) {
  html.has-cover main > .cover-hero:first-child { padding-top: 0; }
  /* (the characters stand at the painting's right edge: keep that edge in view) */
  html.has-cover main > .cover-hero:first-child .framed-art img { aspect-ratio: 4 / 3.5; object-position: 100% 60%; }
}
/* Storage notice: a small card at the bottom, out of the way (2026-10-26). */
.store-note { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px;
  background: #fffaf0; border-radius: 18px; box-shadow: 0 10px 30px rgba(58, 42, 20, .22); font-size: 14px; line-height: 1.5; color: var(--ink); }
.store-note p { margin: 0; flex: 1; }
.store-note a { color: var(--brown); font-weight: 600; }
.store-note button { flex: none; border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; color: #fff; background: #6fb23e; cursor: pointer; }
.store-note button:focus-visible { outline: 3px solid var(--brown); outline-offset: 2px; }
.store-note[hidden] { display: none; }
/* privacy tables */
.tbl-wrap { overflow-x: auto; }
.tbl-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; min-width: 560px; }
.tbl-wrap th, .tbl-wrap td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid rgba(58, 42, 20, .12); }
.tbl-wrap th { font-weight: 600; color: var(--brown); }
html[data-lang="th"] table.en, html[data-lang="en"] table.th { display: none; }
/* Supporters wall (designer, 2026-10-28) */
.donate-panel .donate-cta { margin: 18px 0 6px; }
.donate-note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.supporters { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.supporter { background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: 0 2px 0 rgba(120, 80, 40, .15); min-width: 0; }
.supporter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.supporter-head b { color: var(--brown); font-size: 1.05rem; overflow-wrap: anywhere; }
.supporter-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.supporter p { margin: 6px 0 0; color: var(--ink); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.supporters-empty { color: var(--muted); }
/* EasyDonate's widgets, opened from the supporters page */
.donor-top { margin: 18px 0 8px; }
.donor-note { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.donor-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.donor-small { min-height: 40px; padding: 6px 18px; font-size: 15px; background: var(--card); color: var(--brown) !important; }
