/* Tales of the Elfin Oak · The Games Room */
body.gm-page { background: radial-gradient(ellipse at 50% -10%, rgba(245,200,66,0.12), transparent 46%), radial-gradient(ellipse at 10% 60%, rgba(39,64,126,0.35), transparent 50%), var(--ink); min-height: 100vh; }
#gmFx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
.gm-wrap { max-width: 1180px; margin: 0 auto; padding: 3.2rem 1.4rem 4.5rem; }
.gm-head { text-align: center; margin-bottom: 2.2rem; }
.gm-head .kicker { font-family: var(--caps); letter-spacing: 0.38em; font-size: 0.74rem; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 0.7rem; }
.gm-head h1 { font-family: var(--serif-display); font-weight: 600; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; margin: 0;
  background: linear-gradient(100deg, #b8862b 0%, #f8d565 28%, #fff6cf 50%, #f5c842 72%, #b8862b 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 26px rgba(0,0,0,0.8)) drop-shadow(0 0 34px rgba(245,200,66,0.25)); animation: giltSlide 9s linear infinite; }
.gm-head p { font-family: var(--serif-display); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--moon, #cfd8ee); margin: 0.8rem auto 0; max-width: 640px; }
.gm-tally { font-family: var(--caps); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: #ffe9a8; margin-top: 1.1rem; }
/* the six doors */
.gm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gm-card { position: relative; text-align: left; padding: 0; border: 1px solid rgba(245,200,66,0.4); border-radius: 20px; overflow: hidden; cursor: pointer; color: inherit; font: inherit;
  background: linear-gradient(160deg, rgba(22,34,66,0.95), rgba(9,15,32,0.98)); box-shadow: 0 18px 44px rgba(0,0,0,0.55); transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s, border-color 0.35s; }
.gm-card:hover, .gm-card:focus-visible { transform: translateY(-6px); border-color: #f5c842; box-shadow: 0 0 44px rgba(245,200,66,0.32), 0 24px 54px rgba(0,0,0,0.6); outline: none; }
.gm-art { display: block; position: relative; height: 190px; overflow: hidden; background: radial-gradient(ellipse at 50% 120%, rgba(245,200,66,0.28), transparent 70%), #101a34; }
.gm-art img { position: absolute; left: 50%; top: 18px; width: 62%; translate: -50% 0; rotate: -3deg; border-radius: 4px; box-shadow: 0 10px 26px rgba(0,0,0,0.6); transition: rotate 0.5s, translate 0.5s; }
.gm-card:nth-child(even) .gm-art img { rotate: 3deg; }
.gm-card:hover .gm-art img { rotate: 0deg; translate: -50% -6px; }
.gm-chip { position: absolute; left: 14px; top: 14px; z-index: 2; font-family: var(--caps); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: #241703; padding: 0.4rem 0.8rem; border-radius: 999px;
  background: linear-gradient(100deg, #b8862b, #f8d565 30%, #fff6cf 50%, #f5c842 72%, #b8862b); box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.gm-info { display: block; padding: 1.1rem 1.3rem 1.3rem; }
.gm-info b { display: block; font-family: var(--serif-display); font-weight: 600; font-size: 1.55rem; line-height: 1.15; color: #fff6dc; }
.gm-info i { display: block; font-style: normal; color: var(--cream-dim, #cfc7b0); font-size: 1rem; line-height: 1.45; margin: 0.4rem 0 0.9rem; min-height: 2.9em; }
.gm-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gm-go { font-family: var(--caps); font-size: 0.68rem; letter-spacing: 0.26em; text-transform: uppercase; color: #f5c842; }
.gm-stars i, #gmWinStars i { font-style: normal; color: rgba(245,200,66,0.22); font-size: 1.15rem; margin-left: 2px; min-height: 0; display: inline; }
.gm-stars i.on, #gmWinStars i.on { color: #f5c842; text-shadow: 0 0 10px rgba(245,200,66,0.8); }
/* the stage a game is played on */
.gm-stage[hidden], .gm-hub[hidden] { display: none; }
.gm-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gm-bar .linklike { font-size: 1rem; }
.gm-status { font-family: var(--caps); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: #ffe9a8; }
.gm-title { text-align: center; margin: 0 0 0.4rem; font-family: var(--serif-display); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1;
  background: linear-gradient(180deg, #fffdf0 0%, #fbe9a6 20%, #f0c85a 43%, #b8862b 53%, #e9c360 66%, #fff3c4 84%, #c9993a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 #8a5f14) drop-shadow(0 2px 0 #5c3d0a) drop-shadow(0 8px 18px rgba(0,0,0,0.6)); }
.gm-how { text-align: center; font-family: var(--serif-display); font-style: italic; font-size: clamp(1.05rem, 2.1vw, 1.3rem); color: var(--moon, #cfd8ee); max-width: 720px; margin: 0 auto 1.5rem; }
.gm-board { position: relative; border: 1px solid rgba(245,200,66,0.4); border-radius: 22px; padding: 1.6rem; background: linear-gradient(160deg, rgba(20,31,62,0.92), rgba(8,13,28,0.96)); box-shadow: 0 0 60px rgba(245,200,66,0.12), 0 24px 60px rgba(0,0,0,0.6); }
.gm-win { margin: 1.4rem auto 0; max-width: 620px; text-align: center; padding: 1.4rem 1.4rem 1.6rem; border-radius: 20px; border: 1px solid #f5c842; background: linear-gradient(160deg, rgba(60,44,10,0.55), rgba(16,24,48,0.95)); box-shadow: 0 0 60px rgba(245,200,66,0.35); animation: gmPop 0.6s cubic-bezier(.2,1.4,.4,1) both; }
.gm-win[hidden] { display: none; }
@keyframes gmPop { from { opacity: 0; transform: scale(0.9) translateY(12px); } to { opacity: 1; transform: none; } }
.gm-win h3 { font-family: var(--serif-display); font-weight: 600; font-size: 2rem; color: #ffe9a8; margin: 0.2rem 0 0.3rem; }
.gm-win p { font-family: var(--serif-display); font-style: italic; font-size: 1.2rem; color: #fff6dc; margin: 0 0 1rem; }
#gmWinStars i { font-size: 2rem; margin: 0 3px; }
.gm-win-btns { display: flex; gap: 1.2rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.gm-print { display: block; text-align: center; margin-top: 1.3rem; }
.gm-print[hidden] { display: none; }

/* 1 · word search */
.ws-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 1.6rem; align-items: start; }
.ws-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; max-width: 620px; width: 100%; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.ws-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px; cursor: pointer; font-family: var(--serif-display); font-weight: 600; font-size: clamp(0.95rem, 2.5vw, 1.5rem); color: #fff6dc; background: rgba(255,252,234,0.06); transition: background 0.15s, color 0.15s, transform 0.15s; -webkit-tap-highlight-color: transparent; }
.ws-cell:hover { background: rgba(245,200,66,0.18); }
.ws-cell:focus-visible { outline: 2px solid #f5c842; outline-offset: 1px; }
.ws-cell.sel { background: #f5c842; color: #241703; transform: scale(1.06); }
.ws-cell.found { color: #241703; font-weight: 600; }
.ws-cell.found.h0 { background: #f5c842; } .ws-cell.found.h1 { background: #e9a84f; } .ws-cell.found.h2 { background: #f1dc8a; } .ws-cell.found.h3 { background: #c9d38a; } .ws-cell.found.h4 { background: #f0b9a0; }
.ws-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0.3rem; font-family: var(--serif-display); font-size: 1.25rem; color: #fff6dc; }
.ws-list li { padding: 0.15rem 0.7rem; border-radius: 999px; transition: opacity 0.4s, color 0.4s; }
.ws-list li.done { color: #f5c842; text-decoration: line-through; text-decoration-color: rgba(245,200,66,0.8); opacity: 0.75; }
/* 2 · maze */
.mz-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.mz-svg { width: 100%; max-width: 860px; height: auto; display: block; touch-action: none; border-radius: 16px; box-shadow: 0 0 0 1px rgba(245,200,66,0.35), 0 12px 34px rgba(0,0,0,0.5); }
#mzDog { filter: drop-shadow(0 0 6px rgba(245,200,66,0.8)); }
#mzDog.bump { animation: mzBump 0.22s; }
@keyframes mzBump { 50% { opacity: 0.55; } }
.mz-goalglow { animation: mzGlow 2.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes mzGlow { 50% { opacity: 0.45; } }
.mz-pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(2, 58px); gap: 6px; justify-content: center; }
.mz-btn { border: 1px solid #f5c842; border-radius: 14px; background: rgba(245,200,66,0.12); color: #f5c842; font-size: 1.3rem; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mz-btn:active { background: #f5c842; color: #241703; }
.mz-up { grid-column: 2; grid-row: 1; } .mz-left { grid-column: 1; grid-row: 2; } .mz-down { grid-column: 2; grid-row: 2; } .mz-right { grid-column: 3; grid-row: 2; }
/* 3 · colour by numbers */
.cb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1.2rem 1.6rem; align-items: start; }
.cb-svg { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; background: #fff; border-radius: 16px; grid-row: span 2; touch-action: manipulation; }
.cb-svg [data-n] { fill: #fffdf5; stroke: #1d1a14; stroke-width: 1.8; stroke-linejoin: round; cursor: pointer; }
.cb-svg [data-n].want { fill: #ffeeb0; }
.cb-svg [data-n].done { cursor: default; animation: none; }
.cb-svg [data-n].no { stroke: #c8402f; stroke-width: 4; }
@keyframes cbNo { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.cb-svg [data-n]:focus-visible { outline: none; stroke: #c8402f; stroke-width: 3; }
.cb-white { fill: #fffdf5; stroke: #1d1a14; stroke-width: 1.8; pointer-events: none; }
.cb-knob { fill: #9aa0a6; stroke: #1d1a14; stroke-width: 1.4; pointer-events: none; }
.cb-line { fill: none; stroke: #1d1a14; stroke-width: 1.2; pointer-events: none; }
.cb-frame { fill: none; stroke: #1d1a14; stroke-width: 2; pointer-events: none; }
.cb-num { font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: 13px; fill: #1d1a14; text-anchor: middle; pointer-events: none; }
.cb-num.gone { display: none; }
.cb-wrap.complete .cb-svg { box-shadow: 0 0 70px rgba(245,200,66,0.6); }
.cb-pal { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.cb-swatch { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.8rem 0.45rem 0.5rem; border-radius: 999px; border: 2px solid rgba(255,252,234,0.18); background: rgba(255,252,234,0.05); color: #fff6dc; cursor: pointer; font: inherit; font-size: 1.05rem; text-align: left; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.cb-swatch b { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c); color: #fff; font-family: var(--serif-display); font-size: 1.2rem; text-shadow: 0 1px 3px rgba(0,0,0,0.75); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35), 0 3px 8px rgba(0,0,0,0.45); flex: none; }
.cb-swatch.on { border-color: #f5c842; background: rgba(245,200,66,0.16); transform: translateX(4px); }
.cb-swatch.used { opacity: 0.45; }
.cb-msg { grid-column: 2; min-height: 2.6em; margin: 0; font-family: var(--serif-display); font-style: italic; font-size: 1.1rem; color: #ffd9c9; }
/* 4 · crossword */
.cw-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.cw-now { min-height: 3.1em; margin: 0 0 0.8rem; font-size: 1.15rem; line-height: 1.4; color: #fff6dc; padding: 0.6rem 0.9rem; border-radius: 12px; background: rgba(245,200,66,0.1); border: 1px solid rgba(245,200,66,0.35); }
.cw-now b { color: #f5c842; font-family: var(--caps); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; margin-right: 0.5rem; }
.cw-now em, .cw-clues em { color: rgba(255,246,220,0.55); font-style: normal; font-size: 0.9em; }
.cw-grid { display: grid; grid-template-columns: repeat(var(--w), 1fr); grid-template-rows: repeat(var(--h), 1fr); gap: 3px; width: 100%; max-width: 560px; aspect-ratio: var(--w) / var(--h); margin: 0 auto; }
.cw-cell { position: relative; background: #fffdf5; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.4); transition: background 0.25s; }
.cw-cell i { position: absolute; left: 3px; top: 1px; font-style: normal; font-size: clamp(0.5rem, 1.1vw, 0.68rem); color: #5a4a2a; pointer-events: none; z-index: 1; }
.cw-cell input { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font-family: var(--serif-display); font-weight: 600; font-size: clamp(1rem, 2.6vw, 1.55rem); color: #1d1a14; text-transform: uppercase; padding: 0.15em 0 0; border-radius: 5px; caret-color: #b8862b; }
.cw-cell.in { background: #fbe9a6; }
.cw-cell input:focus { outline: 3px solid #f5c842; outline-offset: -1px; background: #fff3bf; }
.cw-cell.ok { background: #dfe9b0; } .cw-cell.ok input { color: #2f5a1e; }
.cw-cell.gift input { color: #8a5d12; }
.cw-cell.bad { background: #f7c7bd; } .cw-cell.bad input { color: #a3241a; }
.cw-tools { display: flex; gap: 1.6rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.cw-clues { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.cw-col h3 { font-family: var(--caps); font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase; color: #f5c842; margin: 0 0 0.6rem; }
.cw-col ol { list-style: none; margin: 0; padding: 0; }
.cw-col li { padding: 0.35rem 0.55rem; border-radius: 8px; cursor: pointer; font-size: 1rem; line-height: 1.35; color: #e9e3d0; transition: background 0.2s; }
.cw-col li b { color: #f5c842; margin-right: 0.3rem; }
.cw-col li:hover, .cw-col li:focus-visible { background: rgba(245,200,66,0.12); outline: none; }
.cw-col li.on { background: rgba(245,200,66,0.2); color: #fff6dc; }
.cw-col li.done { opacity: 0.5; text-decoration: line-through; }
/* 5 · who said it */
.wq-wrap { max-width: 860px; margin: 0 auto; text-align: center; }
.wq-bubble { position: relative; margin: 0.4rem auto 2.4rem; max-width: 640px; padding: 1.5rem 1.8rem; border-radius: 26px; background: linear-gradient(#fbefc9, #f0dca0); color: #3a2a10; font-family: var(--serif-display); font-style: italic; font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1.3; box-shadow: 0 14px 34px rgba(0,0,0,0.5), 0 0 40px rgba(245,200,66,0.2); animation: gmPop 0.5s cubic-bezier(.2,1.3,.4,1) both; }
.wq-bubble::after { content: ""; position: absolute; left: 50%; bottom: -18px; translate: -50% 0; border: 20px solid transparent; border-top-color: #f0dca0; border-bottom: 0; }
.wq-opts, .sh-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.wq-opt, .sh-opt { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 0.9rem 0.6rem 0.8rem; border-radius: 18px; border: 2px solid rgba(245,200,66,0.3); background: rgba(255,252,234,0.04); color: #fff6dc; cursor: pointer; font: inherit; transition: transform 0.25s, border-color 0.25s, background 0.25s, opacity 0.3s; -webkit-tap-highlight-color: transparent; }
.wq-opt:hover:not(:disabled), .sh-opt:hover:not(:disabled) { transform: translateY(-5px); border-color: #f5c842; background: rgba(245,200,66,0.1); }
.wq-opt img { width: 100%; max-width: 150px; aspect-ratio: 1; object-fit: cover; object-position: center 20%; border-radius: 50%; border: 3px solid #f5c842; box-shadow: 0 8px 20px rgba(0,0,0,0.5); }
.wq-opt span, .sh-opt span { font-family: var(--serif-display); font-weight: 600; font-size: 1.2rem; }
.wq-opt.yes, .sh-opt.yes { border-color: #f5c842; background: rgba(245,200,66,0.24); box-shadow: 0 0 40px rgba(245,200,66,0.6); opacity: 1 !important; }
.wq-opt.no, .sh-opt.no { opacity: 0.3; animation: cbNo 0.35s; cursor: default; }
.wq-opt:disabled:not(.yes):not(.no), .sh-opt:disabled:not(.yes):not(.no) { opacity: 0.45; }
/* 6 · whose shadow */
.sh-wrap { max-width: 860px; margin: 0 auto; text-align: center; }
.sh-wall { position: relative; height: 300px; margin: 0 auto 1.6rem; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse 55% 85% at 50% 55%, #f3dfa6 0%, #c9a45e 55%, #6b4a1e 100%); box-shadow: inset 0 0 60px rgba(40,22,4,0.7), 0 12px 30px rgba(0,0,0,0.5); }
.sh-lamp { position: absolute; left: 50%; top: -30%; width: 70%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle, rgba(255,246,207,0.75), rgba(255,246,207,0) 65%); animation: mzGlow 3s ease-in-out infinite; }
.sh-shadow { position: absolute; left: 50%; bottom: 14px; height: 88%; width: auto; translate: -50% 0; filter: brightness(0) blur(0.6px); opacity: 0.86; transition: filter 0.9s ease, opacity 0.9s ease; animation: gmPop 0.5s both; }
.sh-shadow.lit { filter: none; opacity: 1; }
.sh-opt img { height: 130px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5)); }

@media (max-width: 900px) {
  .gm-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-wrap, .cb-wrap, .cw-wrap { grid-template-columns: 1fr; }
  .ws-list { grid-template-columns: repeat(3, 1fr); font-size: 1.1rem; }
  .cb-svg { grid-row: auto; } .cb-pal { grid-template-columns: repeat(4, 1fr); } .cb-swatch { padding: 0.35rem 0.5rem 0.35rem 0.35rem; gap: 0.45rem; font-size: 0.95rem; } .cb-swatch.on { transform: none; } .cb-msg { grid-column: 1; min-height: 1.6em; text-align: center; }
}
@media (max-width: 640px) {
  .gm-wrap { padding: 2.2rem 0.8rem 3.5rem; }
  .gm-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  .gm-art { height: 150px; } .gm-art img { width: 46%; }
  .gm-info i { min-height: 0; }
  .gm-board { padding: 0.8rem; border-radius: 16px; }
  .ws-grid { gap: 2px; } .ws-cell { border-radius: 5px; }
  .ws-list { grid-template-columns: repeat(2, 1fr); }
  .cb-pal { grid-template-columns: repeat(2, 1fr); } .cb-swatch b { width: 32px; height: 32px; font-size: 1.05rem; }
  .cw-clues { grid-template-columns: 1fr; gap: 1rem; } .cw-grid { gap: 2px; } .cw-cell { border-radius: 3px; }
  .wq-opts, .sh-opts { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .wq-opt img { max-width: 110px; } .sh-opt img { height: 104px; } .sh-wall { height: 230px; }
  .gm-bar { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .gm-head h1, .mz-goalglow, .sh-lamp { animation: none; } }
/* boards keep to the height of the screen where they can, so a whole game is in view at once */
@media (min-width: 901px) {
  .ws-grid { max-width: min(620px, max(380px, calc(100svh - 300px))); }
  .mz-svg { max-width: min(860px, max(480px, calc((100svh - 400px) * 1.5))); }
  .cb-svg { max-width: min(520px, max(300px, calc((100svh - 290px) * 0.852))); }
  .cw-grid { max-width: min(560px, max(330px, calc((100svh - 400px) * 0.8667))); }
}
.gm-hub, .gm-stage { padding: 0; background: none; }
.gm-wrap { padding-top: 2.4rem; }
.cb-num { font-size: 15px; paint-order: stroke; stroke: #fffdf5; stroke-width: 3px; stroke-linejoin: round; }
.cb-svg [data-n].done { animation: none !important; }
.cb-svg [data-n]:focus { outline: none; }
/* colour by numbers: the guide line sits above the picture, and the colour a shape needs flashes when the wrong one is used */
.cb-msg { grid-column: 1 / -1; grid-row: 1; min-height: 1.5em; margin: 0 0 0.2rem; text-align: center; font-size: 1.2rem; color: #ffe9a8; }
.cb-swatch.flash { border-color: #fff3bf; background: rgba(245,200,66,0.35); animation: cbFlash 0.4s ease-in-out 4; }
@keyframes cbFlash { 50% { transform: scale(1.08); box-shadow: 0 0 26px rgba(245,200,66,0.9); } }
@media (max-width: 900px) { .cb-msg { grid-column: 1; } }
.cb-swatch.used { opacity: 0.75; }
.cb-swatch.used span::after { content: "  ✓"; color: #f5c842; }
/* phones: boards run nearly edge to edge so the squares are as large as a finger can have them */
@media (max-width: 640px) {
  .gm-wrap { padding-left: 0.45rem; padding-right: 0.45rem; }
  .gm-board { padding: 0.6rem 0.3rem; }
  .gm-hub .gm-grid, .gm-head { padding-left: 0.35rem; padding-right: 0.35rem; }
  .ws-cell { font-size: 1.05rem; }
}
/* phones held sideways: each board is sized to the height of the screen, with its list, palette or arrows beside it */
@media (max-height: 520px) and (orientation: landscape) {
  .gm-wrap { padding-top: 1rem; }
  .gm-how { margin-bottom: 0.8rem; font-size: 1.05rem; }
  .gm-title { font-size: 1.8rem; }
  .ws-wrap { grid-template-columns: auto minmax(0, 1fr); gap: 1rem; }
  .ws-grid { width: max(250px, calc(100svh - 84px)); max-width: none; margin: 0; }
  .ws-list { grid-template-columns: repeat(2, 1fr); font-size: 1rem; }
  .mz-wrap { flex-direction: row; justify-content: center; gap: 1.2rem; }
  .mz-svg { width: auto; max-width: none; height: max(230px, calc(100svh - 84px)); flex: none; }
  .cb-wrap { grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem 1rem; }
  .cb-svg { width: max(200px, calc((100svh - 110px) * 0.852)); max-width: none; margin: 0; grid-row: 2; }
  .cb-pal { grid-template-columns: repeat(2, 1fr); grid-row: 2; align-content: start; }
  .cb-msg { grid-column: 1 / -1; }
  .cw-wrap { grid-template-columns: auto minmax(0, 1fr); gap: 1.2rem; }
  .cw-grid { width: max(230px, calc((100svh - 150px) * 0.8667)); max-width: none; }
  .cw-clues { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .cw-col li { font-size: 0.92rem; padding: 0.25rem 0.4rem; }
  .sh-wall { height: 170px; margin-bottom: 0.8rem; }
  .wq-opts, .sh-opts { grid-template-columns: repeat(4, 1fr); }
  .wq-opt img { max-width: 84px; } .sh-opt img { height: 84px; }
  .wq-bubble { margin-bottom: 1.6rem; padding: 0.9rem 1.2rem; font-size: 1.3rem; }
}
.ws-cell { line-height: 1; overflow: hidden; }
@media (max-height: 520px) and (orientation: landscape) {
  .ws-wrap { gap: 1.4rem; }
  .ws-cell { font-size: 0.95rem; }
  .cw-grid { width: min(46vw, 420px); }   /* squares big enough to tap; the grid scrolls with the page */
}

/* v148 · phones and tablets: readable labels, finger-sized links */
@media (max-width: 1200px) { .gm-chip { font-size: 0.68rem; } .gm-print { display: inline-flex; align-items: center; min-height: 40px; } }

/* v151 · Colour by Numbers: Start again under the last colour */
.cb-again { grid-column: 1 / -1; width: 100%; justify-content: center; margin-top: 0.8rem; padding: 0.8rem 1rem; font-size: 0.76rem; letter-spacing: 0.18em; min-height: 46px; }
