/* Dev Chronicles · cute cartoon dev theme.
   Layout: sticky header, sticker cards (ink outline + offset shadow), reading column of ~70ch with a sticky TOC on wide screens.
   Pastel category colours (--cat) always carry ink text, so they read the same in both themes. */
:root {
  --bg: #F3F6FF;
  --bg-dot: rgba(42, 35, 70, .07);
  --surface: #FFFFFF;
  --surface-2: #F6F2FF;
  --text: #2A2346;
  --muted: #5B5480;
  --line: #2A2346;
  --shadow: #2A2346;
  --accent: #C8326D;
  --accent-soft: #FFD7E6;
  --pink: #FF6FA3;
  --sun: #FFC93C;
  --mint: #3DD6A8;
  --blue: #4F7CFF;
  --hl: #FFE36E;
  --th-bg: #2A2346;
  --th-text: #FFFFFF;
  --ink-fixed: #2A2346;
  --outline: #2A2346;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 24px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1830; --bg-dot: rgba(255, 255, 255, .05); --surface: #272241; --surface-2: #312A52;
    --text: #F2EFFF; --muted: #BDB6E0; --line: #0F0C1E; --shadow: #0F0C1E;
    --accent: #FF9CC3; --accent-soft: #4A2C4F; --hl: #6A4FD6; --th-bg: #3B3363; --th-text: #F2EFFF;
    --shadow: #5B4DA8; --outline: #7B6CE0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1C1830; --bg-dot: rgba(255, 255, 255, .05); --surface: #272241; --surface-2: #312A52;
  --text: #F2EFFF; --muted: #BDB6E0; --line: #0F0C1E; --shadow: #0F0C1E;
  --accent: #FF9CC3; --accent-soft: #4A2C4F; --hl: #6A4FD6; --th-bg: #3B3363; --th-text: #F2EFFF;
  --shadow: #5B4DA8; --outline: #7B6CE0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 500;
  overflow-x: hidden;
}
img, svg, iframe { max-width: 100%; }
/* Mascot/face outline and antenna: dark ink on light, light peach on dark (ink would vanish on the dark page). */
.mascot .ol, .face .ol { stroke: var(--outline); }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--sun); color: var(--ink-fixed); padding: 10px 16px; border-radius: 12px; font-weight: 800; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand b { display: block; font-family: var(--display); font-size: 22px; line-height: 1; font-weight: 800; }
.brand small { display: block; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .5px; }
.brand:hover .face { transform: rotate(-8deg); }
.face { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); flex: none; }
.menu { display: flex; gap: 6px; margin-left: auto; }
.menu a { text-decoration: none; font-weight: 800; font-size: 16px; padding: 7px 16px; border-radius: 999px; border: 2.5px solid transparent; }
.menu a:hover { background: var(--surface); border-color: var(--line); }
.menu a[aria-current="page"] { background: var(--accent-soft); border-color: var(--line); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--line); background: var(--surface); color: var(--text); box-shadow: 2px 3px 0 var(--shadow); cursor: pointer; padding: 0; transition: transform .2s; }
.icon-btn:hover { transform: translate(-1px, -2px) rotate(-6deg); }
.icon-btn svg { width: 20px; height: 20px; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 10px 12px; padding-block: 10px; }
  .nav-actions { margin-left: auto; }
  .menu { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .menu a { flex: none; font-size: 15px; padding: 5px 14px; }
}

/* ---------- shared bits ---------- */
.eyebrow { display: inline-block; font-weight: 800; font-size: 14px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 19px; color: var(--muted); max-width: 38em; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1;
  padding: 12px 22px 10px; border-radius: 999px; border: 3px solid var(--line);
  background: var(--sun); color: var(--ink-fixed); box-shadow: 4px 4px 0 var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--cat); color: var(--ink-fixed); border: 2.5px solid var(--line);
  border-radius: 999px; padding: 3px 12px 3px 6px; font-weight: 800; font-size: 14px; line-height: 1.4;
}
a.cat-chip:hover { transform: rotate(-2deg); }
.badge { display: inline-flex; align-items: center; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--sun); color: var(--ink-fixed); border: 2.5px solid var(--line); transform: rotate(-3deg); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 13px; font-weight: 800; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; font-weight: 700; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

.sparkle { position: absolute; width: 34px; height: 34px; animation: twinkle 2.8s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .55; } 50% { transform: scale(1.05) rotate(45deg); opacity: 1; } }
.m-bob { animation: bob 2.4s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-9px); } }
.m-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.4s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }

/* ---------- hero ---------- */
.hero { padding-block: 56px 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6.2vw, 74px); font-weight: 800; letter-spacing: -1px; line-height: 1.02; }
.hl { background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); padding-inline: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.nb { white-space: nowrap; }
:lang(ja) .lead, :lang(ja) .prose p { word-break: auto-phrase; text-wrap: pretty; }
:lang(ja) .hero h1 { font-size: clamp(32px, 4.6vw, 62px); line-height: 1.3; }
:lang(ja) .hl { background: linear-gradient(transparent 68%, var(--hl) 68%, var(--hl) 94%, transparent 94%); }
.search {
  display: flex; align-items: center; gap: 10px; max-width: 560px;
  background: var(--surface); border: 3px solid var(--line); border-radius: 999px;
  padding: 6px 8px 6px 18px; box-shadow: 5px 5px 0 var(--shadow); margin-top: 6px;
}
.search:focus-within { box-shadow: 5px 5px 0 var(--pink); }
.search svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 700 18px/1.4 var(--body); padding: 8px 0; }
.search input::placeholder { color: var(--muted); opacity: .8; }
.search kbd { font: 700 14px var(--mono); border: 2px solid var(--line); border-radius: 8px; padding: 2px 8px; background: var(--surface-2); }
.hero-stats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats li { background: var(--surface); border: 2.5px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 15px; }
.hero-stats b { font-family: var(--display); font-size: 19px; }
.hero-art { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-art .mascot { width: min(360px, 100%); height: auto; position: relative; z-index: 1; }
.chip-float {
  position: absolute; z-index: 2; font: 700 15px var(--mono); white-space: nowrap;
  background: var(--surface); border: 3px solid var(--line); border-radius: 12px; padding: 6px 12px;
  box-shadow: 3px 3px 0 var(--shadow); animation: floaty 3.2s ease-in-out infinite alternate;
}
.chip-float.c1 { top: 6%; left: 0; }
.chip-float.c2 { top: 18%; right: 0; animation-delay: -1.6s; }
.chip-float.c3 { bottom: 4%; right: 6%; background: var(--hl); color: var(--text); animation-delay: -.8s; }
@keyframes floaty { from { transform: translateY(5px); } to { transform: translateY(-8px); } }
.hero-art .s1 { top: 0; right: 30%; }
.hero-art .s2 { bottom: 22%; left: 4%; animation-delay: .9s; }
.hero-art .s3 { top: 46%; right: 2%; width: 24px; height: 24px; animation-delay: .4s; }
@media (max-width: 860px) {
  .hero { padding-block: 32px 8px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 0; max-width: 340px; width: 100%; margin-inline: auto; padding-block: 28px 4px; }
  .hero-art .mascot { width: 220px; }
  .chip-float { font-size: 13px; padding: 4px 9px; }
  .chip-float.c1 { top: 0; left: 0; }
  .chip-float.c2 { top: 38%; right: 0; }
  .chip-float.c3 { display: none; }
  .search kbd { display: none; }
}

/* ---------- sections and cards ---------- */
.section { padding-block: 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; position: relative; padding-bottom: 10px; }
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 88px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 10'%3E%3Cpath d='M2 6 Q9 1 16 6 T30 6 T44 6 T58 6 T72 6 T86 6' fill='none' stroke='%23FF6FA3' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
}
.section-head .more { font-weight: 800; color: var(--accent); text-underline-offset: 4px; }
.search-status { font-weight: 700; color: var(--muted); }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.post-card { min-width: 0; }
.card-link {
  display: flex; height: 100%; text-decoration: none; color: inherit; overflow: hidden;
  background: var(--surface); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: 6px 7px 0 var(--shadow); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s;
}
.card-link:hover { transform: translate(-3px, -4px) rotate(-.4deg); box-shadow: 9px 11px 0 var(--shadow); }
.card-body { flex: 1; min-width: 0; padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-card h3 { font-size: 25px; font-weight: 800; }
.post-card p { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 800; color: var(--muted); margin-top: auto; }
.post-card.featured { grid-column: 1 / -1; }
.post-card.featured h3 { font-size: clamp(28px, 3.2vw, 40px); }
.post-card.featured p { font-size: 18px; max-width: 40em; }
.card-art {
  position: relative; flex: 0 0 38%; display: grid; place-items: center; min-height: 260px;
  background-color: var(--cat); background-image: radial-gradient(rgba(42, 35, 70, .12) 1.4px, transparent 1.4px); background-size: 18px 18px;
  border-left: 3px solid var(--line);
}
.card-art > .ico { width: 110px; height: 110px; transform: rotate(-6deg); filter: drop-shadow(4px 4px 0 rgba(42, 35, 70, .35)); }
.card-art .s1 { top: 14%; right: 16%; }
.card-art .s2 { bottom: 16%; left: 14%; width: 26px; height: 26px; animation-delay: 1s; }
.art-screen { position: absolute; right: 12%; bottom: 12%; width: 92px; height: 58px; border: 3px solid var(--ink-fixed); border-radius: 10px; background: #fff; box-shadow: 3px 3px 0 var(--ink-fixed); display: flex; align-items: end; gap: 5px; padding: 8px; }
.art-screen i { flex: 1; background: var(--pink); border-radius: 3px; height: 40%; }
.art-screen i:nth-child(2) { height: 75%; background: var(--sun); }
.art-screen i:nth-child(3) { height: 55%; background: var(--mint); }
@media (max-width: 720px) {
  .post-card.featured .card-link { flex-direction: column-reverse; }
  .card-art { flex-basis: auto; min-height: 150px; border-left: 0; border-bottom: 3px solid var(--line); }
  .card-art > .ico { width: 76px; height: 76px; }
  .card-body { padding: 20px; }
}

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.cat-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.cat-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px; text-decoration: none; color: inherit;
  background: var(--surface); border: 3px solid var(--line); border-radius: 20px; padding: 14px 16px;
  box-shadow: 4px 5px 0 var(--shadow); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.cat-card:hover { transform: translate(-2px, -3px) rotate(-1deg); }
.cat-ico { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--cat); border: 2.5px solid var(--line); border-radius: 16px; }
.cat-ico.big { width: 92px; height: 92px; border-radius: 26px; border-width: 3px; box-shadow: 4px 5px 0 var(--shadow); transform: rotate(-4deg); }
.cat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-text b { font-family: var(--display); font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
.cat-text small { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .4px; }
.cat-desc { margin-top: 6px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.cat-count { grid-column: 2; justify-self: start; font-size: 13px; font-weight: 800; line-height: 1.5; background: var(--surface-2); border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.cat-grid.wide .cat-card { align-items: start; padding: 18px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 32px 16px; color: var(--muted); font-weight: 700; font-size: 18px; }

/* ---------- page heads ---------- */
.page-head { padding-block: 48px 8px; display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; }
.page-head h1 small { font-size: .45em; color: var(--muted); font-weight: 700; }
.cat-head { flex-direction: row; align-items: center; gap: 28px; }
.cat-head > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.about-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
.about-head > div { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 720px) {
  .cat-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cat-ico.big { width: 72px; height: 72px; }
  .about-head .mascot { display: none; }
}

/* ---------- post ---------- */
.progress { position: fixed; left: 0; top: 0; z-index: 30; height: 5px; width: 100%; background: var(--pink); transform-origin: 0 50%; transform: scaleX(0); }
.post-body { display: grid; grid-template-columns: 240px minmax(0, 760px); column-gap: 56px; justify-content: start; }
.post-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-block: 44px 28px; }
.post-head > * { max-width: 820px; }
.post-head h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.5px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); font-size: 15px; }
.post-meta .by { color: var(--text); font-weight: 800; }

.post-body.no-toc { grid-template-columns: minmax(0, 760px); }
@media (max-width: 1080px) {
  .post-body { grid-template-columns: minmax(0, 760px); }
  .post-body.no-toc > .prose { grid-column: 1; }
}

.slide-block { margin-block: 8px 44px; }
.slide-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 18px; }
.slide-head h2 { font-size: 28px; font-weight: 800; }
.slide-head p { color: var(--muted); font-size: 15px; font-weight: 700; margin-top: 4px; max-width: 46em; }
.slide-frame { aspect-ratio: 16 / 9; width: 100%; max-width: 100%; border: 3px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #2A2346; box-shadow: 7px 8px 0 var(--shadow); }
.slide-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.toc { position: relative; min-width: 0; }
.toc details { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow: auto; background: var(--surface); border: 3px solid var(--line); border-radius: 20px; padding: 14px 16px 16px; box-shadow: 4px 5px 0 var(--shadow); }
.toc summary { cursor: pointer; font-family: var(--display); font-weight: 800; font-size: 19px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 24px; line-height: 1; transition: transform .2s; }
.toc details[open] summary::after { transform: rotate(45deg); }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.toc ol ol { margin: 4px 0 6px 12px; padding-left: 10px; border-left: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent); }
.toc a { display: block; text-decoration: none; font-size: 14.5px; line-height: 1.35; font-weight: 700; color: var(--muted); padding: 3px 6px; border-radius: 8px; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.on { color: var(--ink-fixed); background: var(--accent-soft); }
:root[data-theme="dark"] .toc a.on { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toc a.on { color: var(--text); } }
@media (max-width: 1080px) {
  .toc { margin-bottom: 28px; }
  .toc details { position: static; max-height: none; }
}

/* ---------- prose ---------- */
.prose { min-width: 0; font-size: 18px; line-height: 1.78; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(26px, 3vw, 33px); font-weight: 800; margin-top: 2.2em; padding-top: 4px; }
.prose h2::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 12px; vertical-align: .12em; border-radius: 50%; background: var(--pink); border: 3px solid var(--line); }
.prose h3 { font-size: clamp(21px, 2.3vw, 25px); font-weight: 800; margin-top: 1.8em; }
.prose h4 { font-size: 20px; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.anchor { margin-left: .35em; text-decoration: none; color: var(--muted); opacity: 0; font-weight: 600; transition: opacity .2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .anchor:focus-visible { opacity: .7; }
.prose a { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--accent-soft); border-radius: 4px; }
.prose strong { font-weight: 800; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: .35em; }
.prose ul { list-style: none; padding-left: 1.4em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.15em; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); border: 2.5px solid var(--line); }
.prose ol > li::marker { font-family: var(--display); font-weight: 800; color: var(--accent); }
.prose blockquote {
  margin-inline: 0; padding: 18px 22px 18px 58px; position: relative;
  background: var(--surface-2); border: 3px solid var(--line); border-radius: 20px; box-shadow: 4px 5px 0 var(--shadow);
}
.prose blockquote::before { content: "“"; position: absolute; left: 16px; top: 2px; font-family: var(--display); font-size: 60px; line-height: 1; color: var(--pink); }
.prose blockquote > * + * { margin-top: .6em; }
.prose hr { border: 0; height: 10px; margin-block: 2.4em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M2 5 Q11 0 20 5 T38 5' fill='none' stroke='%23A39BD0' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 40px 10px; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1.5px solid color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 7px; padding: .1em .4em; }
.prose pre { overflow-x: auto; background: #2A2346; color: #F2EFFF; border: 3px solid var(--line); border-radius: 18px; padding: 18px 20px; font-size: 15px; line-height: 1.6; box-shadow: 4px 5px 0 var(--shadow); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose img { height: auto; border-radius: 16px; border: 3px solid var(--line); }
.table-wrap { overflow-x: auto; border: 3px solid var(--line); border-radius: 18px; box-shadow: 4px 5px 0 var(--shadow); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th { background: var(--th-bg); color: var(--th-text); font-family: var(--display); font-weight: 700; font-size: 16px; text-align: left; padding: 11px 14px 9px; white-space: nowrap; }
.prose td { padding: 10px 14px; border-top: 2px dashed color-mix(in srgb, var(--muted) 35%, transparent); vertical-align: top; min-width: 120px; }
.prose tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.about h2 { margin-top: 1.6em; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block: 56px 8px; max-width: 1056px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: var(--surface); border: 3px solid var(--line); border-radius: 20px; padding: 16px 20px; box-shadow: 4px 5px 0 var(--shadow); transition: transform .2s; }
.post-nav a:hover { transform: translate(-2px, -3px); }
.post-nav small { font-weight: 800; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.post-nav b { font-family: var(--display); font-size: 19px; line-height: 1.2; }
.post-nav .older { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav .older { grid-column: 1; text-align: left; } }

/* ---------- 404 ---------- */
.lost { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding-block: 72px 24px; }
.lost h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 3px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot { padding-block: 40px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 40px; align-items: center; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand b { font-family: var(--display); font-size: 21px; }
.foot-brand p { color: var(--muted); font-size: 15px; }
.motto { font-family: var(--display); font-weight: 700; font-size: 19px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 800; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
.copy { font-size: 14px; color: var(--muted); font-weight: 600; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr; } }

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

/* ---------- languages ---------- */
:root:lang(ja) {
  --display: "Baloo 2", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  --body: "Nunito", "M PLUS Rounded 1c", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; line-height: 1.25; }
:lang(ja) .prose { line-height: 1.9; line-break: strict; }
:lang(ja) .eyebrow { letter-spacing: .4px; }
.lang-switch { display: flex; align-items: center; gap: 2px; padding: 3px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: 2px 3px 0 var(--shadow); }
.lang-switch a { text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1; padding: 8px 10px 6px; border-radius: 999px; color: var(--muted); }
.lang-switch a:hover { color: var(--text); background: var(--surface-2); }
.lang-switch a[aria-current] { background: var(--pink); color: var(--ink-fixed); }
@media (max-width: 720px) {
  .rss-btn { display: none; }
  .lang-switch a { padding: 7px 8px 5px; font-size: 13px; }
}

/* ---------- about ---------- */
.about-head .mascot { flex: none; }
.about-section { padding-block: 36px; display: flex; flex-direction: column; gap: 22px; }
.about-section h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; }
.about-why { flex-direction: row; align-items: center; gap: 48px; }
.about-col { flex: 1.3; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 18px; line-height: 1.75; max-width: 46em; }
.about-quote { flex: 1; min-width: 0; margin: 0; position: relative; padding: 30px 30px 30px 72px; background: var(--hl); color: var(--ink-fixed); border: 3px solid var(--line); border-radius: 26px; box-shadow: 6px 7px 0 var(--shadow); transform: rotate(-1.5deg); font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1.35; }
.about-quote::before { content: "“"; position: absolute; left: 20px; top: 8px; font-size: 76px; line-height: 1; color: var(--pink); }
:root[data-theme="dark"] .about-quote { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .about-quote { color: var(--text); } }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; counter-reset: p; }
.principles li { counter-increment: p; position: relative; background: var(--surface); border: 3px solid var(--line); border-radius: 22px; padding: 22px 22px 22px 76px; box-shadow: 4px 5px 0 var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.principles li::before { content: counter(p); position: absolute; left: 20px; top: 20px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: var(--ink-fixed); border: 3px solid var(--line); font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1; }
.principles b { font-family: var(--display); font-size: 20px; line-height: 1.2; }
.principles p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.about-pair { flex-direction: row; align-items: stretch; }
.about-card { flex: 1; min-width: 0; background: var(--surface); border: 3px solid var(--line); border-radius: 24px; padding: 26px 28px; box-shadow: 5px 6px 0 var(--shadow); display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 1.7; }
.about-card h2 { font-size: 26px; }
.about-card-head { display: flex; align-items: center; gap: 14px; }
.about-follow { align-items: flex-start; }
.about-follow > p { font-size: 18px; max-width: 40em; }
.about-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-soft { background: var(--surface); color: var(--text); }
.closing { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--muted); margin-top: 8px; }
@media (max-width: 860px) {
  .about-why, .about-pair { flex-direction: column; align-items: stretch; }
  .about-quote { transform: none; font-size: 20px; }
}

/* ---------- 404 ---------- */
.lost h1 { font-size: 64px; }
.lost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; width: 100%; max-width: 980px; }
.lost-lang { background: var(--surface); border: 3px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 4px 5px 0 var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lost-lang h2 { font-size: 22px; }
.lost-lang p { color: var(--muted); font-size: 15px; }

/* Brand name keeps its own casing (Thinnd), even in uppercase eyebrows. */
.hero .eyebrow { text-transform: none; letter-spacing: .6px; }
