/* How to Play Mahjong — "tile table", calm editorial edition.
   One reading column, a clear type scale, few element types: text, tile illustrations, plain tables,
   one callout style, one practice panel. Ivory paper, ink text, jade for links and accents, red only
   for tiny labels. */

@font-face { font-family: Fraunces; src: url(/fonts/fraunces.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: optional; }
@font-face { font-family: Fraunces; src: url(/fonts/fraunces-italic.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: optional; }
@font-face { font-family: Figtree; src: url(/fonts/figtree.woff2) format('woff2'); font-weight: 300 900; font-style: normal; font-display: optional; }
@font-face { font-family: 'Fraunces Fallback'; src: local('Georgia'); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; }
@font-face { font-family: 'Figtree Fallback'; src: local('Arial'); size-adjust: 99%; ascent-override: 95%; descent-override: 25%; }

:root {
  --bg: #f7f1e4; --bg-2: #efe6d3; --paper: #fffbf2;
  --ink: #1b2a24; --text: #2b3832; --muted: #5c6862; --faint: #5f6b64;
  --line: rgba(27, 42, 36, .12); --line-2: rgba(27, 42, 36, .22);
  --jade: #1f6f5c; --jade-ink: #175847; --jade-deep: #123f34; --jade-tint: #e3eee7;
  --red: #b23a2e; --gold: #c99a2e;
  --felt: #164a3d; --felt-2: #1c5a4a;
  --display: Fraunces, 'Fraunces Fallback', Georgia, serif;
  --body: Figtree, 'Figtree Fallback', -apple-system, system-ui, 'Segoe UI', Arial, sans-serif;
  --measure: 680px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.7 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: var(--jade-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--jade-deep); }
b, strong { font-weight: 650; color: var(--ink); }
p { margin: 0 0 1.1em; }
p, li, dd, figcaption, summary { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; border-radius: 4px; }
h3:focus { outline: none; }
::selection { background: #cfe3d9; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); font-weight: 600; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.eyebrow, .kicker { font: 650 12.5px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 14px; }

/* Header */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }
.top { display: flex; align-items: center; gap: 24px; padding: 20px 0; position: relative; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 650 19px/1 var(--display); color: var(--ink); text-decoration: none; white-space: nowrap; margin-right: auto; }
.brand svg { width: 24px; height: 32px; }
.links { display: flex; gap: 26px; }
.links a { text-decoration: none; font-weight: 550; font-size: 15.5px; color: var(--muted); }
.links a:hover, .links a[aria-current] { color: var(--ink); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; }
.menu-btn svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; display: block; margin: auto; }
.menu { display: none; }

/* Footer */
footer.site { margin-top: 96px; padding: 40px 0 56px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; font-size: 15px; color: var(--muted); }
footer.site .foot-h { margin: 0 0 12px; font: 650 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
footer.site a { display: block; text-decoration: none; color: var(--text); padding: 3px 0; }
footer.site a:hover { color: var(--jade-ink); }
footer.site a.brand { display: inline-flex; padding: 0; margin-bottom: 14px; color: var(--ink); }
footer.site p { max-width: 34em; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1 var(--body); padding: 15px 26px; border-radius: 999px; border: 0; background: var(--jade); color: #fff; text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--jade-ink); color: #fff; }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: #fff; color: var(--ink); }
.btn.small { padding: 11px 18px; font-size: 15px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn[hidden] { display: none; }

/* Tiles */
.mj { display: block; width: 44px; height: auto; flex: none; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.tiles .grp { display: flex; flex-wrap: wrap; gap: 2px; row-gap: 6px; }
.tiles.sm .mj { width: 34px; }
.tiles.xs .mj { width: 26px; }
/* Nine tiles across the whole reading column */
.tiles.full { flex-wrap: nowrap; gap: 0 14px; }
.tiles.full .grp { flex-wrap: nowrap; gap: 4px; min-width: 0; flex: 1 1 0; }
.tiles.full .mj { flex: 1 1 0; width: 0; min-width: 0; }
.tiles .grp.hl { padding: 4px; margin: -4px; border-radius: 8px; background: #f6e7bf; box-shadow: 0 0 0 2px var(--gold); }
.tiles .grp.dim { opacity: .4; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; padding: 64px 0 72px; }
.hero h1 { font-size: clamp(50px, 7vw, 86px); line-height: .98; margin: 0 0 24px; font-weight: 650; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--jade); }
.hero .sub { font-size: 21px; line-height: 1.55; color: var(--text); max-width: 26em; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 0; }
.hero-cta .meta { font-size: 14.5px; color: var(--muted); }
.table { position: relative; aspect-ratio: 1.12; border-radius: 30px; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, var(--felt-2), var(--felt) 72%); box-shadow: inset 0 0 0 9px #0f3a2f, inset 0 0 0 11px rgba(201, 154, 46, .4), 0 30px 60px -28px rgba(18, 63, 52, .6); }
.discards .mj { position: absolute; max-width: none; width: 12.5%; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .28)); }
.table .rack { position: absolute; left: 5%; right: 5%; bottom: 8%; padding: 10px 10px 16px; border-radius: 10px 10px 14px 14px; background: linear-gradient(#c9a46b, #a47a42); box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .18), 0 12px 24px -8px rgba(0, 0, 0, .5); }
.table .rack .tiles { flex-wrap: nowrap; gap: 0 5px; }
.table .rack .grp { flex: 3 1 0; min-width: 0; gap: 1px; flex-wrap: nowrap; }
.table .rack .grp.win { flex-grow: 2; border-radius: 6px; box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(243, 226, 181, .6); }
.table .rack .mj { flex: 1 1 0; width: auto; min-width: 0; }

/* Intro: the short answer + facts */
.intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; padding: 56px 0 64px; border-top: 1px solid var(--line); }
.intro h2 { font-size: 34px; line-height: 1.12; margin-bottom: 18px; }
.intro p { font-size: 19px; line-height: 1.65; margin: 0; }
.glance { margin: 6px 0 0; }
.glance div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.glance div:first-child { border-top: 1px solid var(--line); }
.glance dt { color: var(--muted); }
.glance dd { margin: 0; color: var(--ink); }

/* Guide layout: contents + reading column */
.article { display: grid; grid-template-columns: 236px minmax(0, var(--measure)); gap: 72px; justify-content: space-between; padding: 8px 0 0; }
.article.sub { padding-top: 22px; }
.article.sub .crumbs { padding-top: 0; }
.article.solo { grid-template-columns: minmax(0, var(--measure)); justify-content: center; }
.toc { position: sticky; top: 32px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; font-size: 14px; line-height: 1.35; padding-bottom: 24px; }
.toc b { display: block; font: 650 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.toc-part { display: block; margin: 18px 0 6px; font: 650 11px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); font-weight: 600; border-left-color: var(--jade); }

/* Reading column */
.prose { max-width: var(--measure); }
.prose > section { padding-top: 8px; }
.prose > section + section { margin-top: 64px; }
.prose h2 { font-size: 34px; line-height: 1.15; margin: 0 0 20px; }
.prose h3 { font-size: 21px; line-height: 1.3; margin: 34px 0 10px; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.prose li { margin-bottom: .45em; padding-left: .2em; }
.prose li::marker { color: var(--jade); }
.prose ol > li::marker { font-weight: 650; }

/* Parts: the top level of the hierarchy */
.part { display: flex; align-items: baseline; gap: 14px; margin: 104px 0 40px; padding-top: 22px; border-top: 2px solid var(--ink); }
.prose > .part:first-child { margin-top: 0; }
.part-n { font: 650 12.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.part-t { font: 500 italic 22px/1.2 var(--display); color: var(--muted); }

/* The ten rules: a numbered list set with hanging serif numerals */
.prose ol.rules { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: rule; }
.prose ol.rules li { counter-increment: rule; position: relative; padding: 14px 0 14px 52px; margin: 0; border-bottom: 1px solid var(--line); }
.prose ol.rules li:first-child { border-top: 1px solid var(--line); }
.prose ol.rules li::before { content: counter(rule); position: absolute; left: 0; top: 12px; width: 32px; font: 600 24px/30.6px var(--display); color: var(--jade); }
.print-link { margin: 18px 0 0; font-size: 15.5px; color: var(--muted); }
.linkish { padding: 0; border: 0; background: none; font: inherit; color: var(--jade-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--jade-deep); }

/* Figures: tiles on the page, caption underneath. No frames. */
.figure { margin: 26px 0 28px; }
.figure figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.figure figcaption b { color: var(--ink); }
.diagram { display: block; width: 100%; max-width: 400px; height: auto; }
.diagram.wide { max-width: 100%; }

/* The one callout */
.callout { margin: 26px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--jade); }
.callout p { margin: 0; }
.callout b { color: var(--jade-deep); }

/* Tables: thin rules, no boxes */
.table-wrap { overflow-x: auto; margin: 22px 0 26px; }
table.data { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
table.data th, table.data td { padding: 11px 14px 11px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data tr:first-child th { font: 650 12px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); }
table.data th[scope="row"] { font-weight: 600; color: var(--ink); }
table.data th:last-child, table.data td:last-child { padding-right: 0; }

/* Charleston diagrams */
.passes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0 26px; text-align: center; }
.pass svg.dir { width: 100%; max-width: 140px; display: block; margin: 0 auto 6px; }
.pass b { display: block; font: 600 17px/1.3 var(--display); }
.pass span { display: block; text-wrap: balance; font-size: 13.5px; color: var(--muted); line-height: 1.35; }

/* Glossary */
.prose dl.gloss { margin: 8px 0 0; border-top: 1px solid var(--line); }
.gloss .card { display: grid; grid-template-columns: 9.5em 1fr; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; box-shadow: none; font-size: 15.5px; line-height: 1.5; }
.gloss dt { font-weight: 650; color: var(--ink); }
.gloss dd { margin: 0; color: var(--text); }

/* Card notation (card guide) */
.notation { font: 650 21px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; margin: 8px 0 0; }
.n-g { color: #1f7a3a; } .n-r { color: var(--red); } .n-b { color: #24508f; }

/* Practice: one panel, four drills behind tabs */
.practice { margin-top: 24px; padding: 22px; border-radius: 22px; background: var(--felt); background: radial-gradient(ellipse at 20% 0%, var(--felt-2), var(--felt) 65%); }
.practice-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.practice-tabs button { font: 600 14.5px/1 var(--body); padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(246, 239, 224, .3); background: transparent; color: rgba(246, 239, 224, .85); cursor: pointer; }
.practice-tabs button:hover { color: #fff; border-color: rgba(246, 239, 224, .6); }
.practice-tabs button:focus-visible { outline-color: var(--paper); border-radius: 999px; }
.practice-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.drill { background: var(--paper); color: var(--text); border-radius: 16px; padding: 22px; }
.drill[hidden] { display: none; }
.prose .drill h3 { font-size: 21px; line-height: 1.3; margin: 0 0 16px; }
.drill p { font-size: 16px; }
.drill .label-sm { font: 650 11.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.drill .target { padding: 14px; border-radius: 12px; background: var(--bg); }
.drill .target b { display: block; margin-bottom: 10px; font-size: 15px; }
.drill .rack { padding: 12px 12px 10px; border-radius: 10px; background: linear-gradient(#e9dcc0, #d9c8a4); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .1); }
.drill .rack .tiles { gap: 2px; }
.drill .discard { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-weight: 600; }
.drill .discard .mj { width: 54px; transform: rotate(-5deg); }
.spot-tile { display: flex; justify-content: center; padding: 12px 0 4px; }
.spot-tile .mj { width: 100px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.choices .btn { flex: 1 1 auto; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.choice-grid .btn { padding: 14px 10px; min-height: 50px; }
.drill .btn { white-space: normal; text-align: center; line-height: 1.25; }
.btn.right, .btn.right[disabled] { background: var(--jade); color: #fff; box-shadow: none; opacity: 1; }
.btn.wrong, .btn.wrong[disabled] { background: var(--red); color: #fff; box-shadow: none; opacity: 1; }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 15.5px; display: none; }
.feedback.show { display: block; }
.feedback.ok { background: var(--jade-tint); color: var(--jade-deep); }
.feedback.no { background: #f6e1dc; color: #7a1f19; }
.feedback b { display: block; color: inherit; margin-bottom: 2px; }
.drill-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; min-height: 37px; scroll-margin-bottom: 24px; }
.drill-foot .score { margin-left: auto; font-size: 14px; color: var(--muted); }
.pips { display: flex; gap: 6px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.pips i.ok { background: var(--jade); } .pips i.no { background: var(--red); } .pips i.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }

/* Questions */
.faq-wrap { max-width: var(--measure); margin: 112px auto 0; }
.prose > .faq-wrap { margin: 104px 0 0; padding-top: 30px; border-top: 2px solid var(--ink); }
.faq-wrap h2, .more h2 { font-size: 34px; line-height: 1.15; margin-bottom: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { padding: 16px 0; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 10px; height: 10px; margin: 6px 3px 0 0; border: solid var(--jade); border-width: 0 1.75px 1.75px 0; transform: translateY(0) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(5px) rotate(225deg); }
.faq summary:hover { color: var(--jade-ink); }
.faq details p { margin: 0 0 18px; font-size: 16.5px; }

/* More guides */
.more { max-width: var(--measure); margin: 88px auto 0; }
.prose > .more { margin: 80px 0 0; }
.prose .more-list { list-style: none; margin: 0; padding: 0; }
.prose .more-list li { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.prose .more-list li:last-child { border-bottom: 0; }
.more-list li:first-child { border-top: 1px solid var(--line); }
.more-list a { display: block; padding: 18px 0; text-decoration: none; }
.more-list a b { display: block; font: 600 20px/1.3 var(--display); text-wrap: balance; margin-bottom: 3px; }
.more-list a span { display: block; font-size: 15.5px; color: var(--muted); }
.more-list a:hover b { color: var(--jade-ink); }

/* Sub pages */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.page-head { max-width: var(--measure); margin: 0 auto; padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(38px, 5.4vw, 58px); line-height: 1.04; margin: 0 0 18px; }
.page-head .lede { font-size: 20px; line-height: 1.55; margin: 0; }
.page-head .updated { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.prose .page-head { margin: 0; padding: 36px 0 4px; }
.summary { max-width: var(--measure); margin: 28px auto 48px; padding: 18px 0 18px 20px; border-left: 3px solid var(--jade); font-size: 17.5px; line-height: 1.65; }
.prose .summary { margin: 30px 0 56px; }
.summary-k { display: block; font: 650 11.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--jade-ink); margin-bottom: 8px; }
.prose .tile-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 22px; }
.prose .tile-list .card { display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 600; }
.prose .tile-list .card small { display: block; font-weight: 400; color: var(--muted); }

/* Phone contents bar (where the sidebar is hidden) */
.jump { display: none; }

@media (max-width: 1020px) {
  .links { display: none; }
  .menu-btn { display: block; }
  .menu:not([hidden]) { display: block; position: absolute; top: 100%; left: 0; right: 0; z-index: 40; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px -16px rgba(27, 42, 36, .35); max-height: 75vh; overflow: auto; }
  .menu a { display: block; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 550; }
  .menu a:hover { background: var(--bg); }
  .menu-part { display: block; padding: 14px 12px 4px; font: 650 11px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
  .article { grid-template-columns: minmax(0, var(--measure)); gap: 0; justify-content: center; }
  .article.sub { padding-top: 16px; }
  .toc { display: none; }
  .jump { display: block; position: sticky; top: 0; z-index: 30; max-width: var(--measure); margin: 0 auto 8px; padding: 10px 0; background: rgba(247, 241, 228, .95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .jump.stuck { box-shadow: 0 1px 0 var(--line); }
  .jump-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: 600 15px/1.2 var(--body); cursor: pointer; text-align: left; }
  .jump-k { flex: none; font: 650 11px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .jump-cur { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .jump-btn svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
  .jump.open .jump-btn svg { transform: rotate(180deg); }
  .jump-list { position: absolute; left: 0; right: 0; top: calc(100% - 4px); max-height: 66vh; overflow: auto; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(27, 42, 36, .35); }
  .jump-list a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-size: 15px; color: var(--text); }
  .jump-list a.on { background: var(--jade-tint); color: var(--jade-deep); font-weight: 600; }
  .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; opacity: 0; transition: opacity .2s; }
  .jump.stuck .progress { opacity: 1; }
  .progress i { display: block; height: 100%; background: var(--jade); transform-origin: left; transform: scaleX(0); }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 44px 0 52px; }
  .hero .table { max-width: 520px; width: 100%; }
  .intro { grid-template-columns: 1fr; gap: 32px; }
  footer.site { grid-template-columns: 1fr 1fr; }
  footer.site > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .top { padding: 14px 0; }
  .hero { padding: 32px 0 44px; gap: 32px; }
  .hero h1 { font-size: 52px; margin-bottom: 18px; }
  .hero .sub { font-size: 18.5px; margin-bottom: 24px; }
  .hero-cta .btn { width: 100%; }
  .intro { padding: 40px 0 44px; }
  .intro h2, .prose h2, .faq-wrap h2, .more h2 { font-size: 28px; }
  .intro p { font-size: 17.5px; }
  .glance div { grid-template-columns: 8em 1fr; font-size: 15px; }
  .part { margin: 80px 0 32px; }
  .part-t { font-size: 19px; }
  .prose > section + section { margin-top: 52px; }
  .prose h3 { font-size: 19.5px; margin-top: 28px; }
  .prose ol.rules li { padding-left: 42px; }
  .prose ol.rules li::before { top: 14px; width: 28px; font-size: 21px; line-height: 28.9px; }
  .mj { width: 34px; }
  .tiles { gap: 8px 12px; }
  .tiles.sm .mj { width: 32px; }
  .tiles.full { gap: 0 8px; }
  .tiles.full .grp { gap: 2px; }
  /* Long hands break into two even lines of whole groups */
  .figure .tiles:not(.full), .drill .target .tiles { display: block; text-wrap: balance; margin-bottom: -8px; }
  .figure .tiles:not(.full) .grp, .drill .target .grp { display: inline-flex; flex-wrap: nowrap; vertical-align: bottom; margin: 0 10px 8px 0; }
  .figure .tiles:not(.full) .grp:last-child, .drill .target .grp:last-child { margin-right: 0; }
  table.compare, table.compare tbody { display: block; }
  table.compare tr { display: flex; gap: 14px; border-bottom: 1px solid var(--line); padding: 11px 0; flex-wrap: wrap; }
  table.compare th, table.compare td { flex: 1 1 0; min-width: 0; padding: 0; border: 0; }
  table.compare tr:first-child { border-bottom-color: var(--line-2); padding-top: 0; }
  table.compare tr:first-child th { border: 0; letter-spacing: .06em; font-size: 11.5px; }
  table.compare tr:first-child th:first-child { display: none; }
  table.compare th[scope="row"] { flex: 0 0 100%; margin-bottom: -10px; }
  .passes { gap: 8px; }
  .pass b { font-size: 15px; }
  .pass span { font-size: 12px; }
  .gloss .card { grid-template-columns: 7.2em 1fr; gap: 14px; font-size: 15px; }
  .practice { padding: 14px; margin-left: -6px; margin-right: -6px; border-radius: 18px; }
  .practice-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .practice-tabs button { padding: 10px 8px; font-size: 14px; }
  .drill { padding: 16px 14px; }
  .drill .rack .grp { flex-wrap: wrap; row-gap: 6px; width: 100%; }
  .drill .rack .mj { width: calc((100% - 12px) / 7); max-width: 34px; }
  .drill .target .mj { width: 25px; }
  .drill .target .tiles .grp { margin-right: 8px; }
  .drill .target .tiles .grp.hl { margin: -4px 4px 4px -4px; }
  .faq-wrap { margin-top: 88px; }
  .summary, .prose .summary { margin: 22px 0 36px; font-size: 16.5px; }
  .prose > .faq-wrap { margin-top: 80px; }
  .prose > .more { margin-top: 64px; }
  .page-head, .prose .page-head { padding-top: 26px; }
  .page-head .lede { font-size: 18px; }
}

/* Print: the whole guide, or (html.print-rules) only the rules as a one-page cheat sheet */
.print-foot { display: none; }
@media print {
  body { background: #fff; font-size: 11.5pt; }
  .top, footer.site, .toc, .jump, .more, .practice, #mj-cookies, .hero .table { display: none !important; }
  .article { display: block; }
  a { color: inherit; text-decoration: none; }
  h2, h3 { break-after: avoid; }
  table, figure, li { break-inside: avoid; }
  .skip, .print-link, .hero-cta { display: none !important; }
  .hero, .intro { padding: 12pt 0; }
  .print-rules body { font-size: 11pt; line-height: 1.45; }
  .print-rules .hero, .print-rules .prose > *:not(#rules-on-one-page):not(#tiles), .print-rules .intro { display: none !important; }
  .print-rules #rules-on-one-page > h2::before { content: 'How to play mahjong'; display: block; margin-bottom: 6pt; font: 650 9pt/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
  .print-rules #tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10pt 28pt; margin-top: 14pt !important; padding: 0; }
  .print-rules #tiles > *:not(.figure) { display: none; }
  .print-rules #tiles .figure { margin: 0; }
  .print-rules #tiles figcaption { margin-top: 4pt; font-size: 8.5pt; line-height: 1.35; }
  .print-rules .tiles.full { gap: 0 6px; }
  .print-rules .tiles.full .grp { gap: 2px; }
  .print-rules .prose { max-width: none; }
  .print-rules .prose h2 { font-size: 24pt; margin: 0 0 8pt; }
  .print-rules #rules-on-one-page > p { display: none; }
  .print-rules .prose ol.rules li { padding: 5pt 0 5pt 34pt; }
  .print-rules .prose ol.rules li::before { top: 4pt; font-size: 15pt; line-height: 1.2; }
  .print-rules .print-foot { display: block; margin-top: 16pt; font-size: 9.5pt; color: #444; }
}
.note { margin: 26px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--jade); }
.note p { margin: 0; }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 620px) { .hero .table { aspect-ratio: 1.4; border-radius: 22px; } .discards .mj { width: 11.5%; } }
