/* thcore.dev, built from concept A ("Quiet Core").
   One accent (gold), a light theme and a dark variant from prefers-color-scheme.
   Mellow Logic keeps its own navy, cream and gold inside its sign and its channel card.
   System fonts, plus one self-hosted subset (M PLUS Rounded 1c ExtraBold) for the name "Mellow Logic".
   Nothing is loaded from other sites. */

/* ---------- Font ---------- */
/* Printable ASCII only. SIL Open Font License 1.1: fonts/OFL-MPLUSRounded1c.txt next to the file. */
@font-face {
  font-family: "ML Rounded";
  src: url("fonts/MPLUSRounded1c-ExtraBold-latin.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #151a25;          /* headings, buttons: 16.7:1 on --bg */
  --text: #2f3542;         /* body: 11.8:1 */
  --muted: #5e6573;        /* secondary text: 5.6:1 on --bg, 5.9:1 on --surface */
  --line: #e4ded2;
  --line-strong: #d3ccbd;
  --accent: #a47a12;       /* the one accent: dots, underlines, icons, focus ring (graphics only) */
  --button-bg: #151a25;
  --button-text: #f4f0e8;
  --button-hover: #2b3446;
  --selection: #efe2bd;
  --icon-edge: rgb(21 26 37 / 0.07);
  --icon-shadow: 0 10px 22px -12px rgb(21 26 37 / 0.5);
  --avatar-ring: transparent;

  /* Mellow Logic's own colours, from its banner: the name is cream, the line sand, the wave gold */
  --ml-bg: #151a25;
  --ml-bg-2: #1e2638;
  --ml-edge: transparent;
  --ml-cream: #f4f0e8;     /* 15.3:1 on #151a25, 13.3:1 on #1e2638 */
  --ml-sand: #c8bea5;      /* 9.4:1 / 8.2:1 */
  --ml-soft: #aab1be;      /* 8.1:1 / 7.0:1 */
  --ml-gold: #e8c46a;      /* 10.4:1 */
  --ml-ring: rgb(244 240 232 / 0.42);   /* cream ring that keeps the navy disc of the mark apart from the sign */
  --ml-dots: rgb(244 240 232 / 0.085);

  /* English first with Latin UI fonts; Korean with Korean UI fonts (system-ui is Malgun Gothic on Korean Windows). */
  --font-en: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-ko: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --font-round: "ML Rounded", var(--font-en);

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a25;
    --surface: #1b2130;
    --ink: #f4f0e8;        /* 15.3:1 on --bg, 14.1:1 on --surface */
    --text: #d6d2c9;       /* 11.5:1 / 10.7:1 */
    --muted: #a3aab8;      /* 7.5:1 / 6.9:1 */
    --line: #2a3242;
    --line-strong: #3a4354;
    --accent: #e8c46a;
    --button-bg: #f4f0e8;
    --button-text: #151a25;
    --button-hover: #ffffff;
    --selection: #4a3f22;
    --icon-edge: rgb(244 240 232 / 0.16);
    --icon-shadow: 0 10px 22px -12px rgb(0 0 0 / 0.7);
    --avatar-ring: rgb(244 240 232 / 0.7);

    /* The page is navy itself here, so the sign steps one shade lighter and gets an edge,
       and the navy disc of the mark gets a brighter cream ring. */
    --ml-bg: #1f2737;
    --ml-bg-2: #29324a;
    --ml-edge: rgb(244 240 232 / 0.12);
    --ml-soft: #b3b9c5;    /* 7.6:1 on #1f2737, 6.5:1 on #29324a; cream 13.2:1, sand 8.1:1 */
    --ml-ring: rgb(244 240 232 / 0.72);
    --ml-dots: rgb(244 240 232 / 0.1);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

/* Korean breaks between words only, so a particle such as 을 never sits alone on a line.
   keep-all still allows a break between ")" and a particle, so the HTML wraps those few spots
   (and the name Mellow Logic in running text) in .nobr. Addresses wrap anywhere rather than overflow. */
:lang(ko) { font-family: var(--font-ko); word-break: keep-all; }
:lang(en) { font-family: var(--font-en); word-break: normal; }
.nobr { white-space: nowrap; }

::selection { background: var(--selection); color: var(--ink); }

h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 700; text-wrap: balance; }
p, li { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
picture { display: block; }
a { color: inherit; }

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

/* Language blocks. The script in <head> sets html[data-lang] and .js before the body is drawn,
   so only one language ever shows. Without the script both show, Korean first. */
.js[data-lang="ko"] [data-only="en"],
.js[data-lang="en"] [data-only="ko"] { display: none !important; }
html:not(.js) span[data-only="en"]::before { content: " / "; }
html:not(.js) p[data-only="en"] { margin-top: 0.6em; }
html:not(.js) .hero-title [data-only="en"],
html:not(.js) .ml-tagline [data-only="en"] { display: block; }
html:not(.js) .hero-title [data-only="en"]::before,
html:not(.js) .ml-tagline [data-only="en"]::before { content: none; }
html:not(.js) :is(.button, .ml-link, .back-link, .text-link, .footer-links a) { display: inline-block; }
html:not(.js) :is(.back-link, .text-link, .footer-links a) { min-height: 0; padding-block: 10px; line-height: 24px; }   /* still 44 px tall */
html:not(.js) .button { text-align: center; }
html:not(.js) :is(.button, .ml-link) .icon { margin-left: 6px; vertical-align: -0.125em; }
html:not(.js) .back-link .icon { margin-right: 6px; vertical-align: -0.125em; }

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
/* Every control here can be hit in an area of at least 44 x 44 px, the size a thumb needs. */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
  padding-block: 22px;
}

.wordmark {
  order: 1;
  margin-right: auto;
  display: inline-flex;
  padding: 11px 2px;
  border-radius: 6px;
  color: var(--ink);
}
.wordmark svg { width: 93px; height: 22px; }
.wordmark-core { fill: var(--accent); }

.site-nav { order: 3; flex-basis: 100%; }
.site-nav ul {
  display: flex;
  gap: 0;
  margin-left: -15px;          /* the first link's text lines up with the wordmark */
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  display: block;
  padding: 12px 15px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}

/* The switch shows only with the script. Its pressed look follows html[data-lang], which is set
   in <head>, so it is right from the first frame; aria-pressed is kept in step for assistive tech. */
.lang-switch { order: 2; display: none; }
.js .lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.lang-switch button {
  position: relative;
  margin: 0;
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.lang-switch button::after {   /* the pill stays 32 px; its hit band is 44 px */
  content: "";
  position: absolute;
  inset: -6px 0;
}
.lang-switch button:hover { color: var(--ink); }
[data-lang="ko"] .lang-switch [data-set-lang="ko"],
[data-lang="en"] .lang-switch [data-set-lang="en"] {
  background: var(--ink);
  color: var(--bg);
  cursor: default;
}

/* Phones: wordmark and switch on the first row, the menu below. */
@media (max-width: 639.98px) {
  .site-header .wrap { padding-block: 16px 14px; row-gap: 0; }
}
@media (min-width: 640px) {
  .site-nav { order: 2; flex-basis: auto; }
  .site-nav ul { margin-left: 0; }
  .lang-switch { order: 3; }
}

/* ---------- Hero ---------- */
main { display: block; }
main:focus { outline: none; }

.hero { padding-block: clamp(56px, 10vw, 144px) clamp(40px, 9vw, 128px); }   /* phones: the first project shows sooner */

.hero-title {
  max-width: 15em;
  font-size: clamp(2.25rem, 1.3rem + 4vw, 4rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
}
.hero-title :lang(ko) { letter-spacing: -0.02em; }
.dot { color: var(--accent); }

.lead {
  max-width: 34em;
  margin-top: clamp(18px, 2.4vw, 28px);
  color: var(--muted);
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.375rem);
  line-height: 1.6;
}

/* ---------- Sections ---------- */
.section {
  display: grid;
  gap: 18px 48px;
  margin-bottom: clamp(56px, 10vw, 128px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
@media (min-width: 880px) {
  .section { grid-template-columns: 200px minmax(0, 1fr); }
  .section-label { padding-top: 2px; }
}

.section-label {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.6;
}
.section-body { min-width: 0; max-width: 720px; }

.statement {
  color: var(--ink);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  padding: 0;
  list-style: none;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.eyebrow {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

/* ---------- Mellow Logic sign (home card and the hero of /mellowlogic/) ---------- */
.ml-sign {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  background: radial-gradient(130% 120% at 0% 0%, var(--ml-bg-2), var(--ml-bg) 62%) var(--ml-bg);
  box-shadow: inset 0 0 0 1px var(--ml-edge);
  color: var(--ml-cream);
}
.ml-sign::before {             /* the faint dot lattice of the channel banner */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle, var(--ml-dots) 1.3px, transparent 1.9px) 12px 12px / 24px 24px;
  -webkit-mask-image: linear-gradient(to left, #000 10%, transparent 75%);
  mask-image: linear-gradient(to left, #000 10%, transparent 75%);
}
.ml-sign :focus-visible { outline-color: var(--ml-gold); }

.ml-mark { flex: none; }
.ml-mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--ml-ring);
}

.ml-name {
  color: var(--ml-cream);
  font-family: var(--font-round);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}
.ml-tagline {
  color: var(--ml-sand);
  font-weight: 700;
  line-height: 1.4;
}
.ml-tagline :lang(en) { font-family: var(--font-round); font-weight: 800; letter-spacing: 0.005em; }

/* Home: the card */
.ml-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "mark head"
    "mark line"
    "mark link";
  align-items: center;
  column-gap: clamp(22px, 3.4vw, 36px);
  padding: clamp(26px, 4.2vw, 40px);
}
.ml-card .ml-mark { grid-area: mark; width: clamp(72px, 9vw, 104px); height: clamp(72px, 9vw, 104px); }
.ml-head { grid-area: head; display: flex; flex-direction: column; }
.ml-kind {
  order: -1;
  margin-bottom: 8px;
  color: var(--ml-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.03em;
}
.ml-card .ml-name { font-size: clamp(1.75rem, 1.45rem + 1.2vw, 2.375rem); }
.ml-card .ml-tagline { grid-area: line; margin-top: 8px; font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); }
.ml-link {
  grid-area: link;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-block: 4px;
  color: var(--ml-cream);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--ml-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.ml-link::after {              /* the whole card answers to the link */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
@supports selector(:has(*)) {    /* the focus ring goes round the whole card; older browsers keep it on the link */
  .ml-link:focus-visible { outline: none; }
  .ml-card:has(.ml-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
}
.ml-card:hover .ml-link { text-decoration-thickness: 2.5px; }

/* /mellowlogic/: the sign is the hero and carries the h1 */
.ml-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 48px;
  padding: clamp(28px, 6vw, 72px);
}
.ml-hero .ml-name { font-size: clamp(2.5rem, 1.35rem + 4.6vw, 5rem); }
.ml-hero .ml-tagline { margin-top: clamp(10px, 1.4vw, 18px); font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.5rem); }
.ml-hero .ml-mark { width: clamp(88px, 16vw, 200px); height: clamp(88px, 16vw, 200px); }

.ml-about { margin-top: clamp(32px, 4.4vw, 52px); }
.ml-about .lead { margin-top: 0; }
.mark-note {
  max-width: 44em;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ---------- Game card ---------- */
.game-card { padding: clamp(22px, 4.2vw, 40px); }

.game-head {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 28px);
}
.app-icon {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px var(--icon-edge), var(--icon-shadow);
}
.game-title { display: flex; flex-direction: column; min-width: 0; }
.game-title .eyebrow { order: -1; margin-bottom: 6px; }
.game-name {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.game-genre { margin-top: 4px; color: var(--muted); }

.game-pitch {
  margin-top: clamp(20px, 2.6vw, 26px);
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
}
.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
.facts .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.facts .icon * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ---------- Buttons and links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.button:hover { background: var(--button-hover); }
.button--outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 55%, var(--surface));   /* edge at 3:1 or more */
}
.button--outline:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--ink); text-decoration-color: var(--accent); }

/* ---------- YouTube channel card, laid out like the channel's own header ---------- */
/* The header strip is the sign's navy and dot lattice, drawn here, without a second logo:
   the avatar is the card's only mark (the hero above already shows the name and tagline). */
.channel-card { overflow: hidden; container-type: inline-size; }
.channel-card::before {
  content: "";
  display: block;
  height: 64px;
  background:
    radial-gradient(circle, var(--ml-dots) 1.3px, transparent 1.9px) 12px 12px / 24px 24px,
    radial-gradient(130% 120% at 0% 0%, var(--ml-bg-2), var(--ml-bg) 62%) var(--ml-bg);
  box-shadow: inset 0 -1px 0 var(--ml-edge);
}
@media (min-width: 560px) { .channel-card::before { height: 104px; } }
/* Narrow card (phones, and the narrower column at about 880 to 990 px): avatar and name, then the line,
   then a full-width button. A wide card puts the button beside the name and lifts the avatar onto
   the strip, as the channel page does. */
.channel-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "avatar id"
    "line line"
    "cta cta";
  align-items: center;
  gap: 16px 18px;
  padding: 18px clamp(20px, 4.2vw, 40px) clamp(22px, 4.2vw, 36px);
}
.channel-avatar {
  grid-area: avatar;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 5px var(--surface);
}
.channel-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--avatar-ring);
}
.channel-id { grid-area: id; min-width: 0; }
.channel-name {
  font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.channel-handle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.channel-cta { grid-area: cta; }
.channel-cta .button { width: 100%; }
.channel-line { grid-area: line; max-width: 40em; }

@container (min-width: 640px) {
  .channel-body {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "avatar id cta"
      "line line line";
    align-items: end;
    gap: 18px 20px;
    padding-top: 0;
  }
  .channel-avatar { width: 96px; height: 96px; margin-top: -34px; }
  .channel-id { padding-bottom: 6px; }
  .channel-cta { align-self: center; padding-top: 12px; }
  .channel-cta .button { width: auto; }
}

/* ---------- Contact ---------- */
.email {
  display: inline-block;
  margin-top: 3px;
  padding-block: 7px;
  color: var(--ink);
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.email:hover { text-decoration-thickness: 3px; }

/* ---------- Footer ---------- */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 32px;                 /* the 44 px links bring their own room when the row wraps */
  padding-block: 26px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -11px;        /* the outer links' text lines up with the page edges */
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Mellow Logic page ---------- */
.hero--ml { padding-top: clamp(28px, 5vw, 64px); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: clamp(22px, 3.4vw, 40px);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }

/* ---------- Not found ---------- */
.hero--404 { padding-bottom: clamp(96px, 14vw, 200px); }
.code {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.code::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.1em;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: clamp(28px, 4vw, 40px);
}

/* ---------- Phones ---------- */
/* The /mellowlogic/ sign stays stacked a little longer, so the name keeps to one line (568 px is a phone on its side). */
@media (max-width: 599.98px) {
  .ml-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .ml-hero .ml-mark { order: -1; }
}
@media (max-width: 559.98px) {
  .ml-card {
    grid-template-areas:
      "mark head"
      "line line"
      "link link";
    column-gap: 18px;
  }
  .ml-card .ml-mark { width: 64px; height: 64px; }
  .ml-card .ml-tagline { margin-top: 16px; }

  .app-icon { width: 76px; height: 76px; }
  .actions .button { flex: 1 1 100%; }
}
/* 360 px phones: a smaller avatar keeps "Mellow Logic Studio" on one line. */
@media (max-width: 399.98px) {
  .channel-avatar { width: 60px; height: 60px; }
  .channel-body { column-gap: 14px; }
}

/* ---------- Forced colours (Windows contrast themes) ---------- */
/* Backgrounds and shadows are dropped there, so the pressed language, the current page and the
   button edges get a form the system colours keep. */
@media (forced-colors: active) {
  [data-lang="ko"] .lang-switch [data-set-lang="ko"],
  [data-lang="en"] .lang-switch [data-set-lang="en"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
  .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
  .button { border: 1px solid; }
}

/* ---------- Motion: only after the script has drawn the first frame, and only when the visitor allows it ---------- */
@media (prefers-reduced-motion: no-preference) {
  .is-ready :is(.lang-switch button, .site-nav a, .button, .text-link, .footer-links a, .back-link) {
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, text-decoration-color 0.18s ease;
  }
  .is-ready :is(.ml-link, .email) { transition: text-decoration-thickness 0.18s ease; }
  .is-ready :is(.ml-link, .back-link) .icon { transition: transform 0.2s ease; }
  .ml-card:hover .ml-link .icon { transform: translateX(3px); }
  .back-link:hover .icon { transform: translateX(-3px); }
}
