/* smohith.com — "a notebook, kept in public". Tokens measured from the original page. */
:root {
  --bg: #F2F5FB;
  --line: #E1E7F4;
  --ink: #161C40;
  --muted: #4B5578;
  --accent: #3B60B5;      /* blue headline + links */
  --hand: #3B60B5;        /* handwritten notes */
  --teal-ink: #1E766D;
  --card: #FFFFFF;
  --rule: #B9C4E0;
  --btn-bg: #161C40;
  --btn-fg: #F2F5FB;
  --yellow: #FFC75A;
  --blue: #6E93E0;
  --blue-soft: #8FB0F0;
  --teal: #5FB8AE;
  --teal-soft: #7FD3C8;
  --sky: #8FC9F7;
  --mint: #A8DCC6;
  --night: #0B0F24;
  --night-muted: #A9B2D0;
  --margin-rule: #5FB8AE;
  --marquee-bg: #161C40;
  --marquee-fg: #FFC75A;
  --shadow-photo: 0 2px 0 rgba(22, 28, 64, .08), 0 24px 50px -18px rgba(22, 28, 64, .45);
  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-hand: "Caveat", cursive;
  --gutter: clamp(24px, 5vw, 64px);
  --max: 1320px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1328;
  --line: #1A2144;
  --ink: #EEF1FA;
  --muted: #A9B2D0;
  --accent: #8FB0F0;
  --hand: #FFC75A;
  --teal-ink: #7FD3C8;
  --card: #171D3A;
  --rule: #3A4470;
  --btn-bg: #FFC75A;
  --btn-fg: #161C40;
  --marquee-bg: #FFC75A;
  --marquee-fg: #161C40;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(transparent 0, transparent 39px, var(--line) 39px, var(--line) 40px);
  color: var(--ink);
  font-family: var(--f-display);
  transition: background-color .5s, color .5s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; z-index: 50; border-radius: 999px; }
.skip:focus { left: 16px; }

.page { position: relative; overflow: clip; min-height: 100vh; }
.margin-rule { position: absolute; top: 0; bottom: 0; left: clamp(10px, 3vw, 44px); width: 2px; background: var(--margin-rule); opacity: .55; pointer-events: none; }
.margin-rule.thin { left: calc(6px + clamp(10px, 3vw, 44px)); width: 1px; opacity: .35; }
.wrap { position: relative; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* type helpers */
.mono { font-family: var(--f-mono); }
.hand { font-family: var(--f-hand); font-weight: 700; color: var(--hand); }
.kicker { margin: 0 0 14px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kicker .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 5px rgba(255, 199, 90, .25); vertical-align: -1px; margin-right: 12px; }
.display { margin: 0; font-weight: 800; letter-spacing: -.04em; font-stretch: 80%; line-height: .9; }
.h-xl { font-size: clamp(44px, 6vw, 92px); }
.h-xxl { font-size: clamp(56px, 8vw, 128px); line-height: .85; letter-spacing: -.05em; font-stretch: 75%; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px; border-radius: 999px; font-family: var(--f-display); font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .25s, background-color .3s, color .3s; }
.btn-solid { background: var(--btn-bg); color: var(--btn-fg); }
.btn-solid:hover { color: var(--btn-fg); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-gold { border-color: var(--yellow); color: var(--yellow); background: transparent; }
.btn-yellow { background: var(--yellow); color: #161C40; border-color: #161C40; }
.btn-yellow:hover { color: #161C40; }
.btn-gold:hover { color: var(--yellow); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.lift { transition: transform .25s; }
.lift:hover { transform: translateY(-6px) rotate(-.6deg); }

/* ---------- header ---------- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-top: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 54px; height: 54px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-stretch: 80%; }
.brand-sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: .18em; color: var(--muted); margin-top: 4px; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.main-nav a { text-decoration: none; color: var(--ink); padding: 12px 0; }
.main-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.main-nav .nav-cta { color: var(--btn-fg); background: var(--btn-bg); padding: 13px 20px; border-radius: 999px; }
.main-nav .nav-cta:hover { color: var(--btn-fg); }
.main-nav .nav-ask { background: var(--yellow); color: #161C40; border: 2px solid #161C40; padding: 11px 18px; transform: rotate(-2deg); display: inline-block; }
.main-nav .nav-ask:hover { color: #161C40; transform: rotate(0); }
.lights { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; background: transparent; border: 0; cursor: pointer; color: var(--accent); font-family: var(--f-hand); font-size: 22px; font-weight: 700; }
:root[data-theme="dark"] .lights { color: var(--yellow); }
.lights .on-label { display: none; }
:root[data-theme="dark"] .lights .on-label { display: inline; }
:root[data-theme="dark"] .lights .off-label { display: none; }

/* ---------- hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: clamp(40px, 7vw, 96px); padding-bottom: 40px; }
.hero-copy { flex: 999 1 560px; min-width: 0; position: relative; z-index: 2; }
.hero-title { margin: 0; font-size: clamp(58px, 9.4vw, 152px); line-height: .86; font-weight: 800; letter-spacing: -.045em; font-stretch: 78%; }
.hero-title > span { display: block; }
.hero-title .blue { color: var(--accent); }
.hero-title .last { display: flex; align-items: baseline; gap: .18em; flex-wrap: wrap; }
.hero-title .fly { font-family: var(--f-hand); font-weight: 700; font-size: 1.12em; letter-spacing: 0; color: var(--teal-ink); display: inline-block; transform: rotate(-7deg) translateY(-.08em); }
.underline-wrap { position: relative; display: inline-block; }
.underline-wrap svg { position: absolute; left: -2%; bottom: -.06em; width: 104%; height: .26em; z-index: -1; }
.hero .lede { margin: 36px 0 0; max-width: 540px; }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.start-here { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-hand); font-size: 26px; font-weight: 700; color: var(--hand); transform: rotate(-4deg); }

.hero-photo { flex: 1 1 340px; min-width: 0; position: relative; display: flex; justify-content: center; padding: 30px 0 40px; }
/* the sun rises from behind the photo's right edge: its centre sits on that edge, so half of it shows */
.sun { position: absolute; z-index: 1; top: 10px; left: calc(50% + min(50%, 180px) - 140px); width: 280px; opacity: .95; pointer-events: none; }
@media (max-width: 600px) { .sun { width: 200px; top: -20px; left: auto; right: -60px; } }
.polaroid { position: relative; z-index: 2; margin: 0; width: min(100%, 360px); background: #fff; padding: 16px 16px 20px; transform: rotate(3deg); box-shadow: var(--shadow-photo); }
.polaroid .tape { position: absolute; top: -16px; left: 34%; width: 110px; height: 32px; background: rgba(143, 201, 247, .75); transform: rotate(-5deg); }
.polaroid img { display: block; aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; object-position: 50% 20%; background: #E7EEFB; }
.polaroid figcaption { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.polaroid .cap { font-family: var(--f-hand); font-size: 30px; font-weight: 700; color: #161C40; line-height: 1; }
.polaroid .yr { font-family: var(--f-mono); font-size: 11px; color: #4B5578; }
.sticky { position: absolute; z-index: 3; left: 0; bottom: 0; width: 180px; background: var(--mint); color: #12332E; padding: 16px 16px 18px; box-shadow: 0 16px 30px -14px rgba(22, 28, 64, .5); }
.sticky p { margin: 0; }
.sticky .t { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.sticky .b { margin-top: 6px; font-family: var(--f-hand); font-size: 25px; font-weight: 700; line-height: 1.05; }

.ribbons { position: relative; height: clamp(110px, 14vw, 210px); margin-top: -10px; }
.ribbons svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.marquee { position: relative; margin: 30px -2% 0; transform: rotate(-1.6deg); background: var(--marquee-bg); color: var(--marquee-fg); padding: 18px 0; overflow: hidden; transition: background-color .5s, color .5s; }
.marquee-track { display: flex; width: max-content; font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -.01em; font-stretch: 75%; text-transform: uppercase; white-space: nowrap; }
.marquee-track span { padding-right: 40px; }

/* ---------- sections ---------- */
.section { padding-top: clamp(80px, 10vw, 140px); padding-bottom: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: 64px; }
.section-note { margin: 0; max-width: 360px; font-family: var(--f-hand); font-size: 28px; line-height: 1.1; font-weight: 600; color: var(--hand); transform: rotate(-2deg); }

/* chapter cards */
.chapters { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 56px 28px; }
.chapter { position: relative; display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--ink); padding: 40px 30px 128px; min-height: 340px; transition: transform .25s, background-color .5s; }
.chapter:hover { color: var(--ink); }
.chapter .tab { position: absolute; top: -30px; height: 30px; padding: 0 18px; display: flex; align-items: center; color: #161C40; font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; border: 2px solid var(--ink); border-bottom: 0; }
.chapter:nth-child(4n+1) .tab { left: -2px; }
.chapter:nth-child(4n+2) .tab { left: 30%; }
.chapter:nth-child(4n+3) .tab { right: -2px; }
.chapter:nth-child(4n+4) .tab { left: 18%; }
.chapter h3 { margin: 26px 0 0; font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-stretch: 80%; }
.chapter p { margin: 14px 0 0; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 30ch; }
.chapter .count { position: absolute; left: 30px; bottom: 30px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chapter .num { position: absolute; right: 22px; bottom: 6px; font-size: 120px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--c, var(--yellow)); font-stretch: 75%; }

/* contents list */
.contents-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 24px; padding-bottom: 22px; border-bottom: 3px solid var(--ink); }
.contents-head .hand { font-size: 28px; }
.contents-head .kicker { margin: 0 0 0 auto; letter-spacing: .14em; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; padding: 28px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: padding-left .25s; }
.row:hover { padding-left: 14px; color: var(--ink); }
.row .no { font-family: var(--f-mono); font-size: 15px; font-weight: 600; color: var(--muted); min-width: 34px; }
.row .main { flex: 1 1 320px; min-width: 0; display: flex; align-items: baseline; gap: 18px; }
.row .title { font-size: clamp(24px, 2.6vw, 38px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.row .dots { flex: 1 1 40px; min-width: 40px; border-bottom: 3px dotted var(--rule); transform: translateY(-6px); }
.row .meta { display: flex; align-items: center; gap: 14px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.row .ex { flex: 1 1 100%; padding-left: 56px; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 820px; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; color: #161C40; font-weight: 600; font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; text-decoration: none; white-space: nowrap; }
a.pill:hover { color: #161C40; filter: brightness(1.05); }
.contents-foot { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.contents-foot .hand { font-size: 26px; font-weight: 600; color: var(--muted); }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; font-size: 17px; color: var(--ink); }

/* recess (games) */
.recess-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
@media (max-width: 900px) { .recess-grid { grid-template-columns: 1fr; } }
.game-feature { position: relative; background: var(--card); border: 2px solid var(--ink); padding: clamp(28px, 4vw, 48px); box-shadow: 14px 14px 0 var(--c, var(--yellow)); transform: rotate(-.6deg); transition: background-color .5s; }
.game-feature .emoji { font-size: 54px; line-height: 1; }
.game-feature h3 { margin: 18px 0 0; font-size: clamp(40px, 4.6vw, 68px); line-height: .92; font-weight: 800; letter-spacing: -.04em; font-stretch: 78%; }
.game-feature .tagline { margin: 14px 0 0; font-family: var(--f-hand); font-size: 28px; font-weight: 700; color: var(--hand); }
.game-feature p.desc { margin: 16px 0 0; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 52ch; }
.modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.modes li { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; padding: 6px 10px; border: 1.5px dashed var(--rule); border-radius: 999px; color: var(--muted); }
.game-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.game-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.game-list { display: flex; flex-direction: column; gap: 18px; }
.game-mini { display: flex; gap: 18px; align-items: center; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--ink); padding: 20px 22px; transition: transform .25s, background-color .5s; }
.game-mini:hover { color: var(--ink); transform: translateX(6px); }
.game-mini .emoji { flex: none; width: 58px; height: 58px; display: grid; place-items: center; font-size: 30px; background: var(--c, var(--yellow)); border: 2px solid var(--ink); }
.game-mini strong { display: block; font-size: 24px; letter-spacing: -.02em; font-stretch: 85%; }
.game-mini span { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; margin-top: 4px; }
.teacher-note { background: var(--mint); color: #12332E; padding: 18px 20px; transform: rotate(1deg); box-shadow: 0 16px 30px -14px rgba(22, 28, 64, .5); }
.teacher-note .t { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.teacher-note .b { font-family: var(--f-hand); font-size: 24px; font-weight: 700; line-height: 1.1; margin: 6px 0 0; }

/* lightbulb */
.night { position: relative; margin-top: clamp(70px, 9vw, 120px); background: var(--night); color: #EEF1FA; }
.night-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 60px; padding-top: clamp(70px, 9vw, 120px); padding-bottom: clamp(70px, 9vw, 120px); }
.bulb-wrap { flex: 1 1 300px; display: flex; justify-content: center; }
.bulb { position: relative; width: 280px; height: 360px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.bulb svg { width: 100%; height: 100%; }
.bulb .glow { opacity: 0; transition: opacity .4s; }
.bulb .glass { transition: fill .4s; }
:root[data-theme="dark"] .bulb .glow { opacity: 1; }
:root[data-theme="dark"] .bulb .glass { fill: rgba(255, 199, 90, .18); }
.bulb .cord { transition: transform .25s; transform-origin: 196px 250px; }
.bulb:active .cord, .bulb.pulled .cord { transform: translateY(14px); }
.night-copy { flex: 999 1 480px; min-width: 0; }
.night-copy .kicker { color: var(--night-muted); margin-bottom: 18px; }
.night-copy h2 { font-size: clamp(44px, 6.2vw, 96px); line-height: .92; }
.night-copy p { margin: 26px 0 0; max-width: 520px; font-size: 19px; line-height: 1.55; color: var(--night-muted); }
.night-copy .btn { margin-top: 34px; }

/* postcard */
.postcard { position: relative; background: var(--card); border: 2px solid var(--ink); box-shadow: 14px 14px 0 var(--sky); transform: rotate(-.8deg); display: flex; flex-wrap: wrap; transition: background-color .5s; }
.postcard .left { flex: 999 1 420px; min-width: 0; padding: clamp(32px, 5vw, 64px); border-right: 2px dashed var(--rule); }
.postcard .left h2 { font-size: clamp(42px, 5.4vw, 80px); line-height: .92; }
.postcard .left p { margin: 22px 0 0; max-width: 440px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.postcard .left .sign { margin: 30px 0 0; font-family: var(--f-hand); font-size: 30px; font-weight: 700; color: var(--hand); transform: rotate(-2deg); }
.postcard form { flex: 1 1 340px; min-width: 0; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 26px; position: relative; }
.stamps { display: flex; justify-content: flex-end; align-items: flex-start; gap: 16px; }
.stamp { width: 96px; height: 116px; padding: 8px; background: #fff; border: 3px dotted var(--blue); transform: rotate(4deg); display: flex; align-items: center; justify-content: center; }
.stamp img { width: 100%; height: 100%; object-fit: contain; }
.field-label { display: flex; flex-direction: column; gap: 10px; }
.field-label > span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.line-input { min-height: 52px; border: 0; border-bottom: 2px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--f-hand); font-size: 30px; font-weight: 600; padding: 4px 2px; outline-offset: 4px; width: 100%; }
.line-input::placeholder { color: var(--muted); opacity: .7; }
.ruled { height: 2px; background: var(--rule); }
.hp { position: absolute !important; left: -5000px !important; width: 1px; height: 1px; overflow: hidden; }

/* flash */
.flash { margin: 0; padding: 14px 18px; border: 2px solid var(--ink); font-weight: 600; background: var(--mint); color: #12332E; }
.flash.error { background: #FFD9CF; color: #5A1A0C; }

/* footer */
.site-footer { position: relative; border-top: 3px solid var(--ink); margin-top: clamp(40px, 6vw, 80px); }
.footer-inner { padding-top: 48px; padding-bottom: 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.footer-top a { text-decoration: none; color: var(--ink); padding: 12px 0; display: inline-block; }
.footer-big { margin: 30px 0 0; font-size: clamp(84px, 21vw, 330px); line-height: .78; font-weight: 800; letter-spacing: -.06em; font-stretch: 75%; color: var(--accent); }
.footer-big span { color: var(--yellow); }
.footer-bottom { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--muted); }
.footer-bottom .hand { font-size: 24px; font-weight: 600; }

/* ---------- inner page hero ---------- */
.page-hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: 24px; }
.page-hero h1 { font-size: clamp(56px, 9vw, 140px); line-height: .85; letter-spacing: -.05em; font-stretch: 75%; font-weight: 800; margin: 0; }
.page-hero .lede { margin: 24px 0 0; max-width: 620px; }
.chapter-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; }
.chapter-filter a { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--card); }
.chapter-filter a.on { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.search { display: flex; gap: 10px; align-items: flex-end; margin-top: 28px; max-width: 560px; }
.search .line-input { font-size: 26px; }
.search button { flex: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 36px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.empty { padding: 60px 0; font-family: var(--f-hand); font-size: 32px; color: var(--muted); }

/* ---------- article ---------- */
.article-hero { padding-top: clamp(40px, 6vw, 80px); max-width: 1000px; }
.article-hero .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.article-title { margin: 22px 0 0; font-size: clamp(46px, 7.4vw, 112px); line-height: .9; font-weight: 800; letter-spacing: -.045em; font-stretch: 78%; text-wrap: balance; }
.article-excerpt { margin: 26px 0 0; font-family: var(--f-hand); font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.15; color: var(--hand); transform: rotate(-1deg); max-width: 760px; }
.article-meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.preview-banner { margin-top: 24px; display: inline-block; background: var(--yellow); color: #161C40; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 14px; border: 2px solid #161C40; }
.cover { margin: clamp(36px, 5vw, 64px) auto 0; max-width: 980px; background: #fff; padding: 16px 16px 20px; transform: rotate(-1deg); box-shadow: var(--shadow-photo); position: relative; }
.cover .tape { position: absolute; top: -16px; left: 44%; width: 120px; height: 32px; background: rgba(255, 199, 90, .7); transform: rotate(4deg); }
.cover img { display: block; width: 100%; max-height: 620px; object-fit: cover; }
.cover figcaption { margin-top: 10px; font-family: var(--f-hand); font-size: 22px; color: #4B5578; }

.prose { max-width: 720px; margin: clamp(40px, 6vw, 72px) auto 0; font-size: clamp(18px, 1.35vw, 20px); line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { margin: 2em 0 0; font-size: clamp(32px, 3.2vw, 46px); line-height: 1; font-weight: 800; letter-spacing: -.03em; font-stretch: 80%; }
.prose h3 { margin: 1.8em 0 0; font-size: clamp(25px, 2.2vw, 32px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-stretch: 85%; }
.prose h4 { margin: 1.6em 0 0; font-family: var(--f-mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.prose a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose a.btn-link { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; margin: 6px 6px 6px 0; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: 17px; text-decoration: none; transition: transform .25s; }
.prose a.btn-link::after { content: "→"; }
.prose a.btn-link:hover { transform: translateY(-4px) rotate(-.6deg); color: var(--btn-fg); }
.prose mark { background: linear-gradient(transparent 55%, rgba(255, 199, 90, .7) 55%); color: inherit; padding: 0 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ol li[data-list="bullet"] { list-style-type: disc; }
.prose ol li[data-list="ordered"] { list-style-type: decimal; }
.prose .ql-indent-1 { margin-left: 1.5em; } .prose .ql-indent-2 { margin-left: 3em; } .prose .ql-indent-3 { margin-left: 4.5em; }
.prose .ql-code-block-container { background: #161C40; color: #EEF1FA; padding: 18px 20px; overflow-x: auto; font-family: var(--f-mono); font-size: 14px; line-height: 1.6; border-radius: 4px; white-space: pre; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { margin: 2em 0; padding: 22px 26px; background: var(--mint); color: #12332E; font-family: var(--f-hand); font-size: clamp(26px, 2.4vw, 32px); font-weight: 600; line-height: 1.2; transform: rotate(-.8deg); box-shadow: 0 16px 30px -14px rgba(22, 28, 64, .5); border: 0; }
.prose hr { border: 0; height: 30px; margin: 2.4em 0; background: none; text-align: center; }
.prose hr::after { content: "✶ ✶ ✶"; color: var(--yellow); font-size: 22px; letter-spacing: .6em; }
.prose img { display: block; max-width: 100%; height: auto; margin: 2em auto; background: #fff; padding: 10px; box-shadow: var(--shadow-photo); }
.prose iframe, .prose video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 2em 0; border: 2px solid var(--ink); background: #000; box-shadow: 10px 10px 0 var(--sky); }
.prose iframe[src*="smohith.com"] { aspect-ratio: 4 / 5; max-height: 760px; background: var(--card); box-shadow: 10px 10px 0 var(--yellow); }
.prose pre { background: #161C40; color: #EEF1FA; padding: 18px 20px; overflow-x: auto; font-family: var(--f-mono); font-size: 14px; line-height: 1.6; border-radius: 4px; }
.prose code { font-family: var(--f-mono); font-size: .86em; background: var(--line); padding: 2px 6px; border-radius: 4px; }
.prose pre code { background: none; padding: 0; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose th, .prose td { border: 1.5px solid var(--rule); padding: 8px 12px; text-align: left; }

.after-article { max-width: 720px; margin: 56px auto 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-row a { font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em; text-decoration: none; color: var(--ink); padding: 7px 12px; border: 1.5px dashed var(--rule); border-radius: 999px; }

/* like + share strip */
.pass-note { margin-top: 36px; padding: 26px 0; border-top: 2px dashed var(--rule); border-bottom: 2px dashed var(--rule); display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.like-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 16px; cursor: pointer; transition: transform .2s, background-color .3s; }
.like-btn svg { width: 22px; height: 22px; transition: transform .3s; }
.like-btn[aria-pressed="true"] { background: var(--yellow); color: #161C40; border-color: #161C40; }
.like-btn[aria-pressed="true"] svg { transform: scale(1.15); }
.like-btn[aria-pressed="true"] svg path { fill: #E5484D; stroke: #E5484D; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share .hand { font-size: 26px; margin-right: 6px; }
.share a, .share button { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; transition: transform .2s, background-color .2s, color .2s; padding: 0; }
.share a:hover, .share button:hover { transform: translateY(-4px) rotate(-6deg); background: var(--btn-bg); color: var(--btn-fg); }
.share svg { width: 20px; height: 20px; }
.share .native { width: auto; padding: 0 18px; border-radius: 999px; gap: 8px; display: none; font-family: var(--f-display); font-weight: 700; font-size: 15px; }
.share .native.show { display: inline-flex; align-items: center; }
.copied { font-family: var(--f-hand); font-size: 22px; color: var(--teal-ink); opacity: 0; transition: opacity .3s; }
.copied.show { opacity: 1; }

.prev-next { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .prev-next { grid-template-columns: 1fr; } }
.prev-next a { display: block; padding: 20px 22px; border: 2px solid var(--ink); background: var(--card); text-decoration: none; color: var(--ink); transition: transform .25s; }
.prev-next a:hover { transform: translateY(-4px); color: var(--ink); }
.prev-next small { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.prev-next strong { display: block; margin-top: 8px; font-size: 22px; line-height: 1.15; letter-spacing: -.02em; }
.prev-next .next { text-align: right; }

/* margin notes (comments) */
.notes { max-width: 720px; margin: 80px auto 0; }
.notes h2 { font-size: clamp(40px, 5vw, 72px); }
.notes .sub { margin: 10px 0 0; font-family: var(--f-hand); font-size: 26px; font-weight: 600; color: var(--hand); }
.note-list { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.note { position: relative; padding: 18px 22px 20px 26px; background: var(--card); border: 1.5px solid var(--rule); border-left: 4px solid var(--teal); }
.note.author { border-left-color: var(--yellow); }
.note .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.note .name { font-family: var(--f-hand); font-size: 28px; font-weight: 700; line-height: 1; color: var(--ink); }
.note .badge { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; background: var(--yellow); color: #161C40; padding: 3px 8px; }
.note time { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.note .body { margin: 10px 0 0; font-size: 17px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.note .reply-link { margin-top: 10px; background: none; border: 0; padding: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); cursor: pointer; }
.note .replies { list-style: none; margin: 18px 0 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 16px; border-left: 2px dashed var(--rule); }
.note .replies .note { background: transparent; border: 0; border-left: 4px solid var(--blue-soft); padding: 4px 0 4px 18px; }
.note-form { margin-top: 44px; position: relative; background: var(--card); border: 2px solid var(--ink); box-shadow: 12px 12px 0 var(--mint); padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 22px; transform: rotate(-.4deg); }
.note-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .note-form .two { grid-template-columns: 1fr; } }
.note-form .line-input { font-size: 26px; }
.note-form textarea.line-input { min-height: 140px; resize: vertical; line-height: 1.3; background-image: repeating-linear-gradient(transparent 0, transparent 33px, var(--rule) 33px, var(--rule) 35px); border-bottom: 0; }
.note-form .hint { font-size: 14px; color: var(--muted); margin: 0; }
.replying { display: none; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.replying.show { display: flex; }
.replying button { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.noted { margin-top: 24px; padding: 16px 20px; background: var(--yellow); color: #161C40; font-family: var(--f-hand); font-size: 26px; font-weight: 700; transform: rotate(-1deg); display: inline-block; }

.related { margin-top: 90px; }
.related .row .ex { padding-left: 0; }

/* ---------- games ---------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 28px; margin-top: 56px; }
.game-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--ink); padding: 34px 28px 28px; transition: transform .25s, background-color .5s; }
.game-card:hover { transform: translateY(-6px) rotate(-.6deg); }
.game-card .tab { position: absolute; top: -30px; left: -2px; height: 30px; padding: 0 16px; display: flex; align-items: center; background: var(--c, var(--yellow)); color: #161C40; font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; border: 2px solid var(--ink); border-bottom: 0; text-transform: uppercase; }
.game-card .emoji { font-size: 46px; line-height: 1; }
.game-card h2 { margin: 18px 0 0; font-size: 38px; line-height: .95; font-weight: 800; letter-spacing: -.03em; font-stretch: 80%; }
.game-card .tagline { margin: 10px 0 0; font-family: var(--f-hand); font-size: 24px; font-weight: 700; color: var(--hand); line-height: 1.1; }
.game-card p.desc { margin: 12px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; flex: 1; }
.game-card .game-actions { margin-top: 22px; }
.how { margin-top: 90px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; counter-reset: step; }
.how li { list-style: none; background: var(--card); border: 2px dashed var(--rule); padding: 24px; counter-increment: step; position: relative; }
.how li::before { content: counter(step); display: block; font-size: 64px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--teal); font-stretch: 75%; }
.how strong { display: block; margin-top: 8px; font-size: 22px; }
.how span { display: block; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.how { padding: 0; }
.play-frame { margin-top: 40px; border: 2px solid var(--ink); background: var(--card); box-shadow: 14px 14px 0 var(--c, var(--yellow)); }
.play-frame iframe { display: block; width: 100%; height: min(78vh, 820px); border: 0; }
.play-frame .bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 2px solid var(--ink); font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* error page */
.error-page { padding-top: clamp(60px, 10vw, 140px); padding-bottom: 60px; }
.error-page .code { font-size: clamp(120px, 24vw, 320px); line-height: .8; font-weight: 800; letter-spacing: -.06em; font-stretch: 75%; color: transparent; -webkit-text-stroke: 3px var(--accent); margin: 0; }
.error-page h1 { margin: 20px 0 0; font-size: clamp(40px, 6vw, 80px); line-height: .9; font-weight: 800; letter-spacing: -.04em; font-stretch: 80%; }
.error-page p { margin: 20px 0 0; font-size: 20px; color: var(--muted); max-width: 560px; }

/* animations (from the original page) */
@keyframes sm-marquee { to { transform: translateX(-50%); } }
@keyframes sm-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sm-flicker { 0%, 100% { opacity: .9; } 45% { opacity: .55; } 50% { opacity: 1; } 55% { opacity: .7; } }
@keyframes sm-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(-4deg); } }
@keyframes sm-spin { to { transform: rotate(360deg); } }
.sm-mq { animation: sm-marquee 32s linear infinite; }
.sm-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sm-draw 2.6s cubic-bezier(.6, .1, .2, 1) .3s forwards; }
.sm-draw2 { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sm-draw 2.6s cubic-bezier(.6, .1, .2, 1) .7s forwards; }
.sm-rays { animation: sm-flicker 3.4s ease-in-out infinite; }
.sm-bob { animation: sm-bob 6s ease-in-out infinite; }
.sm-spin { animation: sm-spin 40s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .sm-mq, .sm-rays, .sm-bob, .sm-spin { animation: none; }
  .sm-draw, .sm-draw2 { animation: none; stroke-dashoffset: 0; }
  .lift:hover, .game-card:hover { transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .main-nav { gap: 4px 18px; font-size: 12px; }
  .row .ex { padding-left: 0; }
  .contents-head .kicker { margin-left: 0; }
  .chapter { min-height: 300px; }
  .sticky { width: 150px; }
}

/* ---------- contact (a letter) ---------- */
.letter-wrap { max-width: 860px; margin: 0 auto; }
.letter { position: relative; display: flex; flex-direction: column; gap: 24px; background: var(--card); border: 2px solid var(--ink); padding: clamp(26px, 5vw, 56px); box-shadow: 14px 14px 0 var(--mint); transform: rotate(-.5deg); background-image: repeating-linear-gradient(transparent 0, transparent 43px, var(--line) 43px, var(--line) 44px); transition: background-color .5s; }
.letter::before { content: ""; position: absolute; top: -16px; left: 40%; width: 120px; height: 32px; background: rgba(255, 199, 90, .75); transform: rotate(3deg); }
.letter .two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .letter .two { grid-template-columns: 1fr; } }
.letter .line-input { font-size: 26px; }
.letter-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.letter-date { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.letter-body { min-height: 260px; resize: vertical; line-height: 44px !important; border-bottom: 0 !important; padding-top: 0 !important; }
.letter-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.letter-foot .hand { font-size: 26px; font-weight: 600; transform: rotate(-2deg); }
.letter-sent { align-items: flex-start; text-align: left; }
.sent-stamp { display: inline-block; font-family: var(--f-mono); font-weight: 600; font-size: 20px; letter-spacing: .2em; color: #C2412D; border: 3px solid #C2412D; padding: 8px 16px; transform: rotate(-8deg); margin-bottom: 18px; opacity: .85; }

/* ---------- ask me (postcards) ---------- */
.ask-form .left { flex: 999 1 420px; }
.ask-question { min-height: 220px; resize: vertical; line-height: 44px !important; border-bottom: 0 !important; background-image: repeating-linear-gradient(transparent 0, transparent 43px, var(--rule) 43px, var(--rule) 45px); font-size: 30px !important; }
.ask-side { flex: 1 1 320px; min-width: 0; padding: clamp(26px, 4vw, 48px); display: flex; flex-direction: column; gap: 22px; }
.ask-side .line-input { font-size: 24px; }
.hint-small { margin: 0; font-size: 13px; color: var(--muted); }
.ask-sent .left { display: flex; flex-direction: column; align-items: flex-start; }
.ask-sent .ask-side { justify-content: center; }
.qa-grid { margin-top: 44px; columns: 2 380px; column-gap: 32px; }
.qa-card { position: relative; break-inside: avoid; margin: 0 0 34px; background: var(--card); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--sky); transform: rotate(var(--tilt, 0deg)); transition: transform .25s, background-color .5s; display: block; }
.qa-card:hover, .qa-card:target { transform: rotate(0) translateY(-4px); }
.qa-card:target { box-shadow: 10px 10px 0 var(--yellow); }
.qa-q { padding: 26px 28px 20px; border-bottom: 2px dashed var(--rule); }
.qa-question { margin: 0; font-family: var(--f-hand); font-size: clamp(26px, 2.4vw, 32px); font-weight: 600; line-height: 1.15; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.qa-a { margin: 18px 18px 20px; padding: 16px 18px; background: var(--mint); color: #12332E; transform: rotate(.6deg); box-shadow: 0 12px 24px -14px rgba(22, 28, 64, .5); }
.qa-answer { margin: 0; font-size: 17px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.qa-pin { position: absolute; top: -14px; right: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 14px; color: #161C40; }
.qa-link { position: absolute; top: 10px; right: 14px; text-decoration: none; color: var(--muted); font-size: 14px; }
.ask-form .left { display: flex; flex-direction: column; }
.ask-form .left .field-label { flex: 1; }
.ask-form .left .ask-question { flex: 1; }


/* Footer fix (31 Oct 2026): the big "smohith." wordmark's glyphs overflow upward and covered
   the Email / RSS / Back-to-top links, so clicks never reached them. Keep the link row on top. */
.site-footer .footer-top { position: relative; z-index: 1; }

/* ---------- Sent! A postcard / sealed letter flies away (views/partials/send-fly.ejs), then the thank-you card appears ---------- */
.send-scene { position: relative; }
.send-fly { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; pointer-events: none; }
.send-fly svg { display: block; width: min(260px, 70vw); height: auto; overflow: visible; filter: drop-shadow(8px 8px 0 rgba(22, 28, 64, .12)); }
.fly-card { position: relative; animation: sf-in .45s cubic-bezier(.2, .8, .3, 1) both, sf-away 1s cubic-bezier(.55, 0, .8, .3) 1.6s forwards; }
.fly-card .flap { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(-1); animation: sf-flap .45s cubic-bezier(.4, 0, .2, 1) .5s forwards; }
.fly-card .seal, .fly-card .postmark { transform-box: fill-box; transform-origin: center; opacity: 0; animation: sf-stamp .35s cubic-bezier(.3, 1.6, .5, 1) 1s forwards; }
.fly-card .whoosh { position: absolute; left: -46px; bottom: 18px; display: flex; flex-direction: column; gap: 9px; }
.fly-card .whoosh i { display: block; height: 4px; border-radius: 4px; background: var(--yellow); opacity: 0; animation: sf-whoosh .7s ease-out 1.75s forwards; }
.fly-card .whoosh i:nth-child(1) { width: 40px; margin-left: 10px; }
.fly-card .whoosh i:nth-child(2) { width: 56px; animation-delay: 1.82s; }
.fly-card .whoosh i:nth-child(3) { width: 34px; margin-left: 18px; animation-delay: 1.9s; }
.fly-caption { margin: 0; font-family: var(--f-hand); font-size: 28px; font-weight: 700; color: var(--hand); opacity: 0; animation: sf-caption 1.2s ease 1s forwards; }
.send-scene > .ask-sent, .send-scene > .letter-sent, .send-scene .sf-later { animation: sf-reveal .6s ease 2.4s both; }
@keyframes sf-in { from { opacity: 0; transform: translateY(40px) scale(.8) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes sf-flap { to { transform: scaleY(1); } }
@keyframes sf-stamp { 0% { opacity: 0; transform: scale(1.8); } 100% { opacity: 1; transform: scale(1); } }
@keyframes sf-away { 0% { transform: none; opacity: 1; } 18% { transform: translate(-16px, 10px) rotate(5deg); } 100% { transform: translate(65vw, -70vh) rotate(-26deg) scale(.35); opacity: 0; } }
@keyframes sf-whoosh { 0% { opacity: 0; transform: translateX(20px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(-30px); } }
@keyframes sf-caption { 0% { opacity: 0; transform: translateY(6px); } 25%, 60% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes sf-reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .send-fly { display: none; }
  .send-scene > .ask-sent, .send-scene > .letter-sent, .send-scene .sf-later { animation: none; }
}

/* ---- Moved out of inline <style> blocks (2026-11-07) ---- */
/* Gameplay badges, How to Play, Play your way (was inline in views/partials/play-modes-css.ejs) */
/* gameplay badges (Solo · Multiplayer · Teacher-hosted · Turn-based) */
.play-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.play-badges li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; background: var(--pm); color: #161C40; border: 1.5px solid #161C40; font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.play-badges svg, .pm-ic svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* How to Play */
.htp { margin-top: clamp(70px, 9vw, 110px); }
.htp-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 30px; }
.htp-head h2 { margin: 6px 0 0; font-size: clamp(38px, 5vw, 60px); line-height: .95; font-weight: 800; letter-spacing: -.035em; font-stretch: 80%; }
.htp-head p { margin: 0; max-width: 430px; font-size: 18px; line-height: 1.5; color: var(--muted); }
.htp .how { margin-top: 34px; }
.htp .how li::before { font-size: 54px; }
.htp .how .step-ic { position: absolute; top: 22px; right: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--sc); border: 1.5px solid #161C40; color: #161C40; }
.htp .how .step-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Play your way: one card per mode, with its steps and games */
.pyw { margin-top: 56px; }
.pyw-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.pyw-title h3 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.pyw-title p { margin: 0; font-family: var(--f-hand); font-size: 24px; font-weight: 700; color: var(--hand); }
.pyw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 22px; }
.pyw-card { background: var(--card); border: 2px solid var(--ink); border-top: 10px solid var(--pm); padding: 20px 20px 18px; scroll-margin-top: 20px; }
.pyw-card .pm-name { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.pm-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--pm); border: 1.5px solid #161C40; color: #161C40; }
.pm-ic svg { width: 18px; height: 18px; }
.pyw-card .pm-short { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.pm-steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: pm; display: grid; gap: 6px; }
.pm-steps li { counter-increment: pm; display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 15px; line-height: 1.4; }
.pm-steps li::before { content: counter(pm); font-family: var(--f-mono); font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--rule); color: var(--muted); }
.pm-games { margin: 14px 0 0; padding-top: 12px; border-top: 1.5px dashed var(--rule); display: flex; flex-wrap: wrap; gap: 6px; }
.pm-games a { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.pm-games a:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.pyw-sign { margin: 34px 0 0; text-align: center; font-family: var(--f-hand); font-size: clamp(28px, 4vw, 40px); font-weight: 700; color: var(--hand); transform: rotate(-1.5deg); }

/* a game's own page */
.game-howto { margin-top: 34px; max-width: 980px; }
.game-howto .pyw-grid { margin-top: 14px; }
@media (max-width: 640px) { .htp .how .step-ic { top: 18px; right: 18px; } .pyw-card { padding: 18px 16px 16px; } }

/* Footer (was inline in views/partials/footer.ejs) */
/* Footer — "Simple bar" (Option D), 2026-10-31. Previous version: footer.ejs.bak-20261031 */
.sf{--sf-bg:#F2F5FB;--sf-ink:#161C40;--sf-muted:#4B5578;--sf-line:#C9D3EA;--sf-rule:#161C40;--sf-hand:#3B60B5;--sf-blue:#3B60B5;--sf-hover-bg:#161C40;--sf-hover-fg:#F2F5FB}
:root[data-theme="dark"] .sf{--sf-bg:#0F1328;--sf-ink:#EEF1FA;--sf-muted:#A9B2D0;--sf-line:#323A63;--sf-rule:#B9C4E0;--sf-hand:#FFC75A;--sf-blue:#8FB0F0;--sf-hover-bg:#FFC75A;--sf-hover-fg:#161C40}
.sf{position:relative;z-index:1;margin-top:28px;background:var(--sf-bg);color:var(--sf-ink);border-top:1px solid var(--sf-rule);font-family:var(--f-display,"Bricolage Grotesque",system-ui,sans-serif)}
.sf .sf-inner{display:flex;flex-wrap:wrap;align-items:center;gap:20px 32px;min-height:120px;padding-top:28px;padding-bottom:28px;box-sizing:border-box}
.sf .sf-copy{flex:1 1 260px;margin:0;font-family:var(--f-mono,"JetBrains Mono",monospace);font-size:12px;letter-spacing:.04em;color:var(--sf-muted)}
.sf .sf-note{flex:1 1 260px;margin:0;text-align:center;font-family:var(--f-hand,"Caveat",cursive);font-size:26px;font-weight:600;line-height:1.1;color:var(--sf-hand)}
.sf .sf-end{flex:1 1 260px;display:flex;align-items:center;justify-content:flex-end;gap:10px}
.sf a{color:inherit;text-decoration:none;transition:color .15s,background-color .15s,border-color .15s,transform .15s}
.sf .sf-ic{width:44px;height:44px;box-sizing:border-box;border-radius:50%;border:1px solid var(--sf-line);display:flex;align-items:center;justify-content:center;color:var(--sf-ink)}
.sf .sf-pill{display:inline-flex;align-items:center;height:44px;padding:0 16px;box-sizing:border-box;border-radius:999px;border:1px solid var(--sf-line);font-family:var(--f-mono,"JetBrains Mono",monospace);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--sf-ink)}
.sf .sf-ic:hover,.sf .sf-pill:hover{background:var(--sf-hover-bg);border-color:var(--sf-hover-bg);color:var(--sf-hover-fg);transform:translateY(-2px)}
.sf .sf-sep{width:1px;height:28px;margin:0 8px;background:var(--sf-line)}
.sf .sf-mark{font-size:30px;font-weight:800;letter-spacing:-.045em;line-height:1;color:var(--sf-blue)}
.sf .sf-mark span{color:#FFC75A}
.sf .sf-top{position:absolute;top:0;left:50%;transform:translate(-50%,-50%);display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 18px;box-sizing:border-box;border-radius:999px;background:var(--sf-bg);border:1px solid var(--sf-rule);font-family:var(--f-mono,"JetBrains Mono",monospace);font-size:11px;letter-spacing:.16em;text-transform:uppercase;white-space:nowrap;color:var(--sf-ink)}
.sf .sf-top:hover{background:var(--sf-hover-bg);border-color:var(--sf-hover-bg);color:var(--sf-hover-fg);transform:translate(-50%,calc(-50% - 2px))}
.sf a:focus-visible{outline:2px solid #FFC75A;outline-offset:3px;border-radius:999px}
@media (max-width:720px){.sf .sf-copy,.sf .sf-note,.sf .sf-end{flex-basis:100%;text-align:center;justify-content:center}.sf .sf-inner{padding-top:40px}}

/* Home: hero photo (was inline in views/home.ejs) */
/* the "Currently reading" note sits on the photo's lower-left corner; the caption goes right so both stay readable */
  .hero-photo .polaroid figcaption { justify-content: flex-end; text-align: right; gap: 12px; }
  .hero-photo .sticky { bottom: 96px; }

/* Home: chapters (was inline in views/home.ejs) */
.chapter .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.chapter .chips span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--rule); }
.chapter .duo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chapter .duo a { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 10px 14px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); }
.chapter .duo a.solid { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.chapter .duo a:hover { transform: translateY(-1px); }
.chapter.as-div { cursor: default; }

/* About page (was inline in views/about.ejs) */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 6vw, 80px); align-items: start; padding-bottom: clamp(36px, 5vw, 60px); }
.about .polaroid { margin: 0; max-width: 300px; }
.about .polaroid img { width: 100%; height: auto; aspect-ratio: 439 / 389; object-fit: contain; }
.facts { margin: clamp(28px, 4vw, 44px) 0 0; max-width: 620px; border-top: 1px dashed var(--line); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.facts dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; font-size: 17px; line-height: 1.5; }
.facts a, .inside a { color: var(--accent); text-underline-offset: 3px; }
.inside { list-style: none; margin: 14px 0 0; padding: 0; max-width: 620px; }
.inside li { padding: 6px 0; font-size: 17px; line-height: 1.5; }
.inside strong { font-family: var(--f-display); }
.about h2 { margin: clamp(36px, 5vw, 56px) 0 0; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
.thanks { padding-bottom: clamp(40px, 6vw, 72px); }
.thanks p { margin: 0; max-width: 620px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.thanks a { color: var(--accent); text-underline-offset: 3px; }
.about .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 760px) {
.about { grid-template-columns: 1fr; }
.about .polaroid { order: -1; max-width: 220px; }
.facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* Download page (was inline in views/download.ejs) */
.dl-card { position: relative; max-width: 640px; background: var(--card); border: 1.5px solid var(--rule); border-radius: 4px; padding: 30px 24px 24px; margin-bottom: 40px; }
.dl-tab { position: absolute; top: -14px; left: 18px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; color: #161C40; font-weight: 600; background: #FFC75A; }
.dl-code { font: 700 clamp(30px, 6vw, 44px) var(--f-mono); letter-spacing: .3em; width: 100%; max-width: 330px; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 4px; background: var(--card); color: var(--ink); }
.dl-msg { font-family: var(--f-hand); font-size: 24px; color: var(--hand); margin: 14px 0 0; }
.dl-meta { font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.dl-card audio, .dl-card video { width: 100%; margin-top: 16px; }
.dl-hint { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.dl-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dl-acts .btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-acts .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.dl-canva summary { list-style: none; }
.dl-canva summary::-webkit-details-marker { display: none; }
.dl-canva[open] { flex-basis: 100%; }
.dl-canva-box { margin-top: 12px; padding: 14px 16px; border: 1.5px dashed var(--rule); border-radius: 4px; font-size: 16px; line-height: 1.55; }
.dl-canva-box p { margin: 0; }
.dl-canva-box ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
@media (max-width: 560px) { .dl-acts .btn, .dl-canva { width: 100%; } }
.dl-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; max-width: 980px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: step; }
.dl-steps li { position: relative; padding: 0 0 0 52px; font-size: 17px; line-height: 1.55; counter-increment: step; }
.dl-steps li::before { content: counter(step); position: absolute; left: 0; top: -6px; font-family: var(--f-hand); font-size: 40px; line-height: 1; color: var(--hand); transform: rotate(-6deg); }
.dl-steps b { display: block; font-size: 19px; margin-bottom: 2px; }
.dl-good { max-width: 980px; margin: 44px 0 0; padding-top: 24px; border-top: 1.5px dashed var(--rule); }
.dl-good ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; line-height: 1.55; color: var(--ink); }
.dl-lab { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---- Moved out of inline style="" attributes (2026-11-07). !important keeps the old inline precedence. ---- */
.c-yellow { --c: #FFC75A; --soft: #FFC75A; }
.c-blue { --c: #6E93E0; --soft: #8FB0F0; }
.c-teal { --c: #5FB8AE; --soft: #7FD3C8; }
.c-sky { --c: #8FC9F7; --soft: #8FC9F7; }
.c-mint { --c: #A8DCC6; --soft: #A8DCC6; }
.c-lilac { --c: #D9C2F5; --soft: #D9C2F5; }
.c-pink { --c: #F2B8D0; --soft: #F2B8D0; }
.c-soft { --c: var(--soft); }
.bg-soft { background: var(--soft) !important; }
.chapter > .tab { background: var(--c); }
.pm-solo { --pm: #A8DCC6; }
.pm-multiplayer { --pm: #8FC9F7; }
.pm-teacher { --pm: #FFC75A; }
.pm-turns { --pm: #8FB0F0; }
.sc-yellow { --sc: #FFC75A; }
.sc-sky { --sc: #8FC9F7; }
.sc-mint { --sc: #A8DCC6; }
.sc-blue { --sc: #8FB0F0; }
.tilt-0 { --tilt: -1.2deg; }
.tilt-1 { --tilt: .8deg; }
.tilt-2 { --tilt: -.5deg; }
.tilt-3 { --tilt: 1.1deg; }
.u-mt0 { margin-top: 0 !important; }
.u-mt8 { margin-top: 8px !important; }
.u-mt14 { margin-top: 14px !important; }
.u-mt40 { margin-top: 40px !important; }
.u-ml0 { margin-left: 0 !important; }
.u-m0 { margin: 0 !important; }
.u-mb18 { margin-bottom: 18px !important; }
.u-mb28 { margin-bottom: 28px !important; }
.u-mb8x { margin: 0 0 8px !important; }
.u-m16t { margin: 16px 0 0 !important; }
.u-m18t { margin: 18px 0 0 !important; }
.u-m26t { margin: 26px 0 0 !important; }
.u-m8-18 { margin: 8px 0 18px !important; }
.u-pt20 { padding-top: 20px !important; }
.u-pt30 { padding-top: 30px !important; }
.u-pt60 { padding-top: clamp(60px, 8vw, 110px) !important; }
.u-pt70 { padding-top: clamp(70px, 9vw, 120px) !important; }
.u-pb60 { padding-bottom: clamp(60px, 8vw, 110px) !important; }
.u-pb80 { padding-bottom: clamp(80px, 10vw, 140px) !important; }
.u-mw720 { max-width: 720px !important; }
.u-mw900 { max-width: 900px !important; }
.u-flex1 { flex: 1 !important; }
.u-row14 { display: flex !important; flex-wrap: wrap !important; gap: 14px !important; align-items: center !important; }
.u-row16 { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 16px !important; }
.u-self-start { align-self: flex-start !important; }
.u-o80 { opacity: .8 !important; }
.u-yellow { color: var(--yellow) !important; }
.u-ink-teal { color: #12332E !important; }
.u-bg-teal { background: #7FD3C8 !important; }
.u-nodec { text-decoration: none !important; }
.u-plain-link { color: inherit !important; text-decoration: none !important; }
.u-inherit-link { color: inherit !important; text-underline-offset: 3px !important; }
.u-short { height: .62em !important; bottom: -.04em !important; }
.hand-thanks { font-size: clamp(28px, 3vw, 40px) !important; margin: 0 !important; line-height: 1.15 !important; }
.hand-thanks-lg { font-size: clamp(30px, 3.4vw, 44px) !important; margin: 0 !important; line-height: 1.15 !important; }
.h-ask { font-size: clamp(40px, 5vw, 72px) !important; }
.dl-title { margin: 0 0 6px !important; font-size: clamp(26px, 3vw, 34px) !important; letter-spacing: -.02em !important; }
.game-emoji { font-size: 64px !important; line-height: 1 !important; margin-top: 10px !important; }
.tools-more { margin-top: 28px !important; color: var(--muted) !important; font-size: 16px !important; }
.signed-in { margin: 0 !important; font-size: 12px !important; letter-spacing: .1em !important; text-transform: uppercase !important; color: var(--muted) !important; }
