:root {
  --sumtilo-tile-0: #dceafb;
  --sumtilo-tile-1: #fcebd4;
  --sumtilo-tile-2: #e2f2dc;
  --sumtilo-tile-3: #fce0e1;
  --sumtilo-tile-4: #ece7fa;
  --sumtilo-tile-5: #e1f1e6;
  --sumtilo-tile-6: #f9e5d4;
  --sumtilo-tile-7: #ddf0f5;
  --sumtilo-tile-8: #f6efd3;
  --sumtilo-tile-9: #eee2d9;
  --sumtilo-tile-10: #dce9f3;
  --sumtilo-tile-11: #eeebdc;
  --sumtilo-tile-12: #e1f2e5;
  --sumtilo-tile-13: #f1e2ed;
  --sumtilo-tile-14: #fae7db;
  --sumtilo-tile-15: #e7eee3;
  --sumtilo-grid-border: #d7e1ee;
  --sumtilo-board: #f7faff;
  --sumtilo-selection: #d6e8ff;
  --sumtilo-cell-hover: #ecf4ff;
}
/* Shared imagine-right shell and SUMTILO content styles. */
* { box-sizing: border-box; }
:root { color-scheme: light; --accent: var(--site-accent); --ink: var(--site-text); --muted: var(--site-muted); --line: var(--site-border); --paper: var(--site-panel); --background: var(--site-background); --sidebar-width: 276px; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--background); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button { border: 0; border-radius: 8px; padding: 10px 14px; background: var(--site-button); cursor: pointer; }
button:disabled { cursor: default; }
button:hover:not(:disabled) { background: var(--site-button-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { display: inline-block; width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.icon-grid,.icon-block { stroke-width: .9; }
.mobile-only { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: var(--site-panel); z-index: 20; }
.skip-link:focus { top: 8px; }
.site-header { height: 70px; display: flex; align-items: center; padding: 0 24px 0 34px; gap: 0; background: var(--site-panel); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 44px; }
/* Master PNG includes generous transparent space. Fit the full canvas without cropping. */
.brand-logo { display: block; width: 192px; height: 64px; object-fit: contain; }
.brand-icon { display: none; }
.desktop-navigation { display: flex; align-self: stretch; align-items: stretch; gap: 40px; margin-left: 60px; }
.desktop-navigation a, .desktop-navigation button { display: flex; align-items: center; padding: 0; border-radius: 0; background: transparent; font-size: 14px; font-weight: 400; }
.desktop-navigation a[aria-current] { border-bottom: 1px solid #a6c4fb; }
.header-tools { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; min-height: 44px; min-width: 44px; padding: 6px; }
.language-picker { position: relative; }
#language-toggle .icon-down { width: 12px; height: 12px; }
.header-tools .settings-toggle { border-left: 1px solid var(--line); border-radius: 0; padding-left: 16px; }
.header-tools .support-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; background: var(--accent); color: var(--site-on-accent); min-height: 43px; padding: 10px 16px; border-radius: 11px; font-weight: 600; }
.support-button:hover { filter:brightness(.94); }
.support-button .icon { width: 18px; height: 18px; }
.header-tools .mobile-only { display: none; }
.popover { position: absolute; top: calc(100% + 10px); right: 0; z-index: 10; display: grid; min-width: 130px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--site-panel); box-shadow: 0 10px 30px #22365518; }
.popover a, .popover button { padding: 10px 12px; min-height: 44px; text-align: left; background: transparent; border-radius: 6px; }
.popover a:hover, .popover a[aria-current] { background: var(--site-highlight); }
.site-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); min-height: calc(100vh - 70px); }
.sidebar { position: relative; isolation: isolate; overflow: hidden; background: var(--site-sidebar); border-right: 1px solid var(--line); min-height: max(680px, calc(100vh - 70px)); padding-bottom: 310px; }
.sidebar-nav { position: relative; z-index: 1; padding-top: 12px; }
.all-games { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 26px; margin-bottom: 0; font-weight: 600; }
.all-games .icon { width: 16px; height: 16px; }
.game-link { display: flex; gap: 16px; align-items: center; min-height: 104px; margin: 2px 12px 1px 0; padding: 10px 14px 10px 30px; position: relative; }
.game-link.active { background: var(--site-highlight); border-radius: 0 12px 12px 0; border-left: 2px solid var(--accent); padding-left: 28px; }
.sidebar-game-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 9px; color: #7187a1; background: #dce4ef; }
.sidebar-game-icon .icon { width: 38px; height: 38px; }
.sidebar-game-icon { color: #0642b8; background: #e4edfa; }
.sidebar-game-icon img { width: 48px; height: 48px; object-fit: contain; }
.game-link strong { display: block; font-size: 14px; font-weight: 700; line-height: 21px; }
.game-link small { display: block; color: var(--muted); font-size: 11px; line-height: 18px; margin-top: 2px; white-space: normal; }
.locked { color: #263b60; }
.locked .icon-lock { width: 14px; height: 14px; color: #7187a1; position: absolute; right: 12px; top: 28px; }
.sidebar-landscape { position: absolute; bottom: 0; left: 0; width: 100%; height: auto; pointer-events: none; z-index: 0; }
main { min-width: 0; padding: 24px; }
.content { width: 100%; max-width: 790px; }
.page-heading { display: grid; grid-template-columns: minmax(0,1fr) 297px; column-gap: 20px; align-items: start; min-height: 68px; margin-bottom: 24px; }
.game-heading { min-width: 0; }
.game-heading h1 { margin: 0 0 8px; line-height: 1; }
.sumtilo-title { display: block; width: 300px; max-width: 100%; height: auto; }
h1 { font-size: 28px; line-height: 34px; letter-spacing: -.8px; margin: -2px 0 2px; }
.game-heading p { margin: 0; font-size: 14px; line-height: 21px; }
.game-heading .desktop-only { max-width: 395px; }
.difficulty-segments { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); height: 38px; border-radius: 8px; background: #e6edf7; margin-top: 12px; }
.difficulty-segments button { min-width: 0; background: transparent; border-radius: 7px; padding: 0 7px; font-size: 13px; }
.difficulty-segments button[data-difficulty="easy"] { --difficulty-background: #DCEFE5; --difficulty-text: #365847; --difficulty-active: #2F9D69; --difficulty-active-text: #FFFFFF; --difficulty-hover: #C8E4D5; }
.difficulty-segments button[data-difficulty="medium"] { --difficulty-background: #F5E9C4; --difficulty-text: #66531E; --difficulty-active: #E3A51A; --difficulty-active-text: #17213A; --difficulty-hover: #EFDFAB; }
.difficulty-segments button[data-difficulty="hard"] { --difficulty-background: #E6DFF3; --difficulty-text: #574771; --difficulty-active: #7656B3; --difficulty-active-text: #FFFFFF; --difficulty-hover: #D8CCEC; }
.sumtilo-difficulty button[data-difficulty="easy"] { --difficulty-background: #E5F3DD; --difficulty-text: #285616; --difficulty-active: #1F8402; --difficulty-active-text: #FFFFFF; --difficulty-hover: #D1EABD; }
.sumtilo-difficulty button[data-difficulty="medium"] { --difficulty-background: #FFF0CC; --difficulty-text: #755000; --difficulty-active: #FCAD01; --difficulty-active-text: #071A30; --difficulty-hover: #FFE2A3; }
.sumtilo-difficulty button[data-difficulty="hard"] { --difficulty-background: #FDE3EC; --difficulty-text: #9D1744; --difficulty-active: #E7174E; --difficulty-active-text: #FFFFFF; --difficulty-hover: #FAC9DA; }
.difficulty-segments button[data-difficulty] { background: var(--difficulty-background); color: var(--difficulty-text); }
.difficulty-segments button[data-difficulty][aria-pressed="true"] { background: var(--difficulty-active); color: var(--difficulty-active-text); font-weight: 600; }
.difficulty-segments button[data-difficulty]:not([aria-pressed="true"]):hover:not(:disabled) { background: var(--difficulty-hover); }
.difficulty-segments button[data-difficulty]:focus-visible { outline-color: var(--difficulty-text); }
.game-card { background: var(--site-panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 7px 24px #304f820a; scroll-margin-top: 16px; }
.puzzle-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 52px; }
.puzzle-header h2 { margin: -2px 0 4px; font-size: 22px; line-height: 27px; letter-spacing: -.55px; }
.puzzle-header p { color: var(--muted); margin: 0; font-size: 16px; line-height: 24px; }
.puzzle-reference { margin: 12px 0 0; text-align: right; font-size: 11px; line-height: 1.4; color: var(--site-stat-muted); }
.puzzle-tools { display: flex; align-items: center; gap: 23px; }
.timer-control { display: flex; align-items: center; gap: 12px; background: var(--site-subtle-panel); border-radius: 13px; padding: 8px 14px; height: 48px; }
#timer { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer-control button { background: transparent; padding: 4px 0 4px 12px; }
.help-controls { display: flex; align-items: center; gap: 16px; border-left: 1px solid var(--line); padding-left: 24px; }
.hint-count { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.hint-count .icon { color: #79869b; fill: #ffdf98; width: 18px; }
.help-controls button { background: transparent; border-left: 1px solid var(--line); border-radius: 0; padding: 0 2px 0 16px; color: #8398b8; }
.help-controls #show-solution { border: 0; padding: 0; color: var(--ink); }
.help-controls #show-solution .solution-label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.help-controls .icon-help { width: 19px; height: 19px; }
#board { position: relative; width: min(100%,396px); margin: 28px auto 22px; }
.play-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border: 2px solid var(--ink); gap: 0; background: var(--sumtilo-board); touch-action: none; user-select: none; -webkit-user-select: none; width: 100%; }
.play-grid:empty { aspect-ratio: 1; background: repeating-linear-gradient(to right,transparent 0 calc(16.666% - 1px),var(--sumtilo-grid-border) calc(16.666% - 1px) 16.666%),repeating-linear-gradient(to bottom,var(--sumtilo-board) 0 calc(16.666% - 1px),var(--sumtilo-grid-border) calc(16.666% - 1px) 16.666%); }
.play-grid.cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.play-grid.cols-5 { grid-template-columns: repeat(5,minmax(0,1fr)); }
.play-grid.cols-6 { grid-template-columns: repeat(6,minmax(0,1fr)); }
.play-grid.cols-7 { grid-template-columns: repeat(7,minmax(0,1fr)); }
.grid-cell { display: grid; place-items: center; min-height: 0; min-width: 0; aspect-ratio: 1; padding: 0; border-radius: 0; border: .5px solid #718aaa30; background: var(--sumtilo-board); font-size: 29px; font-weight: 700; color: var(--ink); line-height: 1; }
.grid-cell:hover:not(:disabled) { background: var(--sumtilo-cell-hover); }
.grid-cell:focus-visible { position: relative; z-index: 1; outline: 3px solid var(--accent); outline-offset: -5px; }
.edge-left { border-left: 1px solid var(--ink) !important; }.edge-right { border-right: 1px solid var(--ink) !important; }
.edge-top { border-top: 1px solid var(--ink) !important; }.edge-bottom { border-bottom: 1px solid var(--ink) !important; }
.color-0 { background: var(--sumtilo-tile-0) !important; }.color-1 { background: var(--sumtilo-tile-1) !important; }.color-2 { background: var(--sumtilo-tile-2) !important; }.color-3 { background: var(--sumtilo-tile-3) !important; }
.color-4 { background: var(--sumtilo-tile-4) !important; }.color-5 { background: var(--sumtilo-tile-5) !important; }.color-6 { background: var(--sumtilo-tile-6) !important; }.color-7 { background: var(--sumtilo-tile-7) !important; }
.color-8 { background: var(--sumtilo-tile-8) !important; }.color-9 { background: var(--sumtilo-tile-9) !important; }.color-10 { background: var(--sumtilo-tile-10) !important; }.color-11 { background: var(--sumtilo-tile-11) !important; }
.color-12 { background: var(--sumtilo-tile-12) !important; }.color-13 { background: var(--sumtilo-tile-13) !important; }.color-14 { background: var(--sumtilo-tile-14) !important; }.color-15 { background: var(--sumtilo-tile-15) !important; }
.grid-cell.selection { box-shadow: inset 0 0 0 3px var(--accent); background: var(--sumtilo-selection) !important; }
.reference-preview .grid-cell { position: relative; }
.reference-clue { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1; }
.clue-0-0 { left: 86%; top: 56%; }.clue-0-3 { left: 62%; top: 0%; }
.clue-2-3 { left: 87%; top: 44%; }.clue-5-3 { left: 82%; top: 44%; }
.clue-0-5 { left: 98%; top: 54%; }.clue-4-5 { left: 59%; top: 89%; }
.toolbar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.toolbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 65px; min-width: 0; border-radius: 12px; font-weight: 600; font-size: 14px; padding: 8px; }
.toolbar button:disabled { color: #64728d; }
.toolbar #fullscreen { grid-column: 1 / -1; flex-direction: row; gap: 10px; min-height: 48px; color: var(--site-on-accent); background: var(--accent); }
.toolbar #fullscreen:disabled { background: #6b90d9; }
#status { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
#status:empty { display: none; }
.success { background: #e4f0e7; border: 1px solid #8bad96; border-radius: 8px; padding: 14px; margin-top: 16px; }
.info-cards { display: grid; grid-template-columns: 1.19fr 1fr; gap: 22px; margin-top: 24px; }
.info-card { background: var(--site-panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; min-width: 0; }
.info-card summary { display: flex; align-items: center; gap: 20px; list-style: none; cursor: pointer; font-size: 17px; font-weight: 700; min-height: 26px; }
.info-card summary::-webkit-details-marker { display: none; }
.info-card summary .icon { color: var(--accent); }
.info-card summary .icon-chevron { color: #8ca2c3; width: 16px; height: 16px; margin-left: auto; }
.info-body { margin-left: 42px; font-size: 13px; line-height: 19px; }
.info-body p { margin: 7px 0 0; color: #213b61; }
.info-body button { font-size: 12px; padding: 7px 10px; margin-top: 8px; text-align: left; }
.reference-preview .info-body button { display: none; }
.preview-notice { position: fixed; bottom: 2px; right: 8px; z-index: 6; font-size: 10px; color: var(--muted); background: #ffffffeb; padding: 2px 5px; margin: 0; }
dialog { width: min(580px,calc(100% - 32px)); max-height: calc(100% - 40px); overflow: auto; background: var(--site-panel); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 12px 60px #10152f26; }
dialog::backdrop { background: var(--site-backdrop); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.dialog-heading button { padding: 8px; }
.extra-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.toolbar #delete-mode[aria-pressed="true"] { color: var(--site-on-accent); background: #b42318; }
.play-grid.delete-active .grid-cell { color: #b42318; }
.extra-actions button[aria-pressed="true"] { color: var(--site-on-accent); background: var(--accent); }
dialog p { color: var(--muted); }
.stats-option { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; }
.stats-option input { width: 18px; height: 18px; accent-color: var(--accent); }
.statistics { background: var(--site-panel); border: 1px solid var(--site-stat-border); border-radius: 12px; padding: 0; overflow: hidden; }
.statistics h3 { margin: 0; padding: 22px 24px; font-size: 22px; line-height: 1.3; color: var(--site-stat-title); }
.statistics .scoreboard { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; border-bottom: 1px solid var(--site-stat-border); }
.statistics .scoreboard > div { min-width: 0; padding: 18px 24px; }
.statistics .scoreboard > div + div { border-left: 1px solid var(--site-stat-border); }
.statistics dt { color: var(--site-stat-muted); font-size: 14px; line-height: 1.4; }
.statistics dd { margin: 8px 0 0; color: var(--site-stat-value); font-size: 28px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.statistics .session-points { color: var(--site-stat-muted); font-size: 14px; font-weight: 400; white-space: nowrap; }
.statistics #total-points.not-saved { font-size: 16px; font-weight: 500; }
.statistics-levels { padding: 20px 24px; }
.statistics h4 { margin: 0 0 14px; color: var(--site-stat-heading); font-size: 15px; font-weight: 600; }
.statistics .local-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; }
.statistics .local-summary > div { min-width: 0; padding: 14px 16px; border-radius: 9px; }
.statistics .local-summary dd { font-size: 24px; }
.statistics-easy { background: #ecfdf5; }.statistics-easy dt { color: #065f46; }
.statistics-medium { background: #fffbeb; }.statistics-medium dt { color: #92400e; }
.statistics-hard { background: #f5f3ff; }.statistics-hard dt { color: #6d28d9; }
.statistics-footer { display: flex; justify-content: flex-end; padding: 20px 24px; border-top: 1px solid #eef2f7; }
.statistics-footer button { background: transparent; border-radius: 0; padding: 4px 0; color: var(--site-stat-muted); font-size: 14px; text-decoration: underline; text-decoration-color: #cbd5e1; text-underline-offset: 4px; }
.statistics-footer button:hover:not(:disabled) { background: transparent; color: var(--site-stat-heading); text-decoration-color: currentColor; }
@media (max-width: 480px) {
 .statistics h3 { padding: 18px 16px; font-size: 20px; }
 .statistics .scoreboard { grid-template-columns: 1fr; }
 .statistics .scoreboard > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
 .statistics .scoreboard > div + div { border-left: 0; border-top: 1px solid var(--site-stat-border); }
 .statistics .scoreboard dd { margin: 0; font-size: 24px; text-align: right; }
 .statistics-levels { padding: 18px 16px; }
 .statistics .local-summary { gap: 8px; }
 .statistics .local-summary > div { padding: 12px 10px; }
 .statistics .local-summary dt { font-size: 13px; }
 .statistics-footer { padding: 16px; }
}
.tutorial-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tutorial-pair figure { margin: 0; }
.tutorial-pair figcaption { color: var(--muted); text-align: center; font-size: 12px; margin-bottom: 8px; }
.tutorial-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 2px solid var(--ink); }
.tutorial-cell { aspect-ratio: 1; display: grid; place-items: center; font-weight: 700; border: .5px solid #718aaa30; }
.tutorial-equation { text-align: center; font-weight: 700; }
body.focus-mode .site-header,body.focus-mode .sidebar,body.focus-mode .page-heading,body.focus-mode .info-cards { display: none; }
body.focus-mode .site-shell { display: block; }
body.focus-mode main { width: min(838px,100%); margin: auto; }
#game-shell:fullscreen { background: var(--site-panel); overflow: auto; border-radius: 0; display: flex; flex-direction: column; justify-content: center; }
#game-shell:fullscreen .toolbar { width: min(750px,100%); margin-inline: auto; }
@media (min-width: 1000px) and (max-width: 1099px) {
 .desktop-navigation { margin-left: 50px; gap: 28px; }
 .page-heading { grid-template-columns: 1fr; row-gap: 12px; }
 .difficulty-segments { width: 297px; justify-self: end; margin-top: 0; }
 .game-heading .desktop-only { max-width: 100%; width: auto; }
 .puzzle-tools { gap: 10px; }.help-controls { gap: 10px; padding-left: 10px; }
 .timer-control { padding: 8px; gap: 8px; }
}
@media (min-width: 1100px) { .game-heading p.desktop-only { margin-bottom: -8px; } }
@media (max-width: 999px) {
 .desktop-only,.desktop-navigation,.sidebar { display: none !important; }
 .mobile-only { display: inline; }
 .site-header { height: 58px; padding: 0 18px; }
 .brand-logo { display: none; }
 .brand-icon { display: block; width: 44px; height: 44px; object-fit: contain; }
 .brand .icon { width: 23px; height: 23px; }
 .header-tools { gap: 14px; }
 .header-tools button { gap: 7px; font-size: 13px; padding: 4px 0; }
 .header-tools .mobile-only { display: inline-flex; border-left: 1px solid var(--line); border-radius: 0; padding-left: 14px; }
 #language-toggle .icon-globe { width: 18px; height: 18px; }
 #menu-toggle .icon { width: 22px; height: 22px; }
 .mobile-menu { position: absolute; top: 58px; left: auto; right: 8px; width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 74px); overflow-y: auto; padding: 12px 0; }
 .mobile-site-links { display: grid; gap: 6px; padding: 0 12px; }
 .mobile-site-links button, .mobile-site-links .support-button { display: flex; align-items: center; gap: 10px; min-height: 44px; }
 .mobile-site-links .support-button { background: var(--accent); color: var(--site-on-accent); }
 .games-overview { padding: 24px 8px; }
 .site-shell { display: block; min-height: calc(100vh - 58px); }
 main { padding: 0 10px 18px; }
 .content { max-width: 790px; margin: auto; }
 .page-heading { display: grid; grid-template-columns: minmax(0,1fr); gap: 27px; min-height: 0; padding: 22px 8px 20px; margin: 0; }
 .sumtilo-title { width: 270px; }
 h1 { font-size: 24px; line-height: 29px; letter-spacing: -.7px; margin: -2px 0 1px; }
 .game-heading p { font-size: 13px; line-height: 19px; }
 .game-heading p.mobile-only { display: block; }
 .difficulty-segments { height: 37px; margin: 0; width: 100%; }
 .difficulty-segments button { font-size: 12px; padding: 0 4px; }
 .game-card { padding: 16px 8px 8px; border-radius: 14px; }
 .puzzle-header { padding: 0 8px; min-height: 56px; gap: 8px; }
 .puzzle-header h2 { font-size: 18px; line-height: 23px; margin: 0 0 7px; letter-spacing: -.45px; }
 .puzzle-header p { font-size: 14px; line-height: 21px; }
 .puzzle-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
 .timer-control { height: 23px; gap: 8px; padding: 0; background: transparent; border-radius: 0; }
 .timer-control .icon { width: 18px; height: 18px; }
 #timer { font-size: 14px; font-weight: 400; }
 .timer-control button { border-radius: 6px; padding: 2px; background: var(--site-subtle-panel); margin-left: 4px; }
 .help-controls { border: 0; padding: 0; gap: 12px; }
 .hint-count { font-size: 13px; gap: 5px; }
 .hint-count .icon { width: 17px; height: 17px; }
 .help-controls button { padding-left: 11px; }
 .help-controls .icon-help { width: 17px; height: 17px; }
 #board { width: min(83%,396px); margin: 28px auto 20px; }
 .grid-cell { font-size: 20px; }
 .toolbar { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px 9px; }
 .toolbar button { min-height: 65px; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 400; padding: 8px 2px; }
 .toolbar button .icon { width: 21px; height: 21px; }
 
 .toolbar #fullscreen { grid-column: 1 / -1; min-height: 48px; flex-direction: row; gap: 10px; font-size: 13px; font-weight: 600; border-radius: 11px; }
 .toolbar #fullscreen .icon { width: 17px; height: 17px; }
 #status { font-size: 12px; padding-inline: 8px; }
 .info-cards { display: block; background: var(--site-panel); margin-top: 6px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
 .info-card { border: 0; border-radius: 0; padding: 0; }
 .info-card + .info-card { border-top: 1px solid var(--line); }
 .info-card summary { padding: 15px 16px; min-height: 50px; font-size: 14px; gap: 14px; }
 .info-card summary .icon { width: 19px; height: 19px; }
 .info-card summary .icon-chevron { width: 13px; height: 13px; transform: rotate(90deg); color: var(--ink); }
 .info-card[open] summary .icon-chevron { transform: rotate(-90deg); }
 .info-body { margin: 0; padding: 0 16px 16px 49px; }
 .preview-notice { padding-inline: 8px; }
}
@media (max-width: 340px) { .site-header { padding-inline: 12px; }.header-tools { gap: 10px; }.brand { gap: 8px; font-size: 18px; }.game-heading { gap: 12px; }.game-heading p { font-size: 12px; }.puzzle-header { padding-inline: 3px; }.puzzle-tools { gap: 12px; } }

/* A paused puzzle conceals its board and permits only the continue control. */
.pause-screen { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; min-height: 120px; background: var(--worm-clue-bg, #fffdf5); border: 1px solid var(--worm-grid-border, #d7e1ee); border-radius: 12px; color: var(--worm-ink, #0b2a59); font-size: 24px; font-weight: 700; }
#board.paused #play-grid, .worm-board.paused .worm-grid, .worm-board.paused #worm-svg { visibility: hidden; }
.timer-control #pause { min-width: 44px; min-height: 44px; border: 1px solid var(--worm-grid-border, #d7e1ee); border-radius: 12px; background: var(--site-panel); }
.timer-control #pause[aria-pressed="true"] { color: #0642b8; background: var(--site-highlight); }
.timer-control #pause:disabled { opacity: .45; }

/* The shell's blue belongs to imagine-right, independently of game difficulty. */
.site-header, .sidebar { --accent: var(--site-accent); }
.desktop-navigation a, .desktop-navigation button { min-height: 44px; }
.game-link:hover { background: var(--site-nav-hover); }
.game-link.active, .game-link.active:hover { background: var(--site-nav-active); border-left-color: var(--site-accent); }
.game-link > span:last-child { min-width: 0; }
.support-button:disabled { cursor: default; }
.overview-intro { color: var(--muted); margin: 10px 0 28px; }
/* Overview cards use title logos; compact navigation keeps its own layout. */
.game-catalog { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; }
.catalog-card { min-width: 0; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--site-panel); box-shadow: 0 7px 24px #304f820a; }
.catalog-title { margin: 0 0 20px; display: flex; justify-content: center; }
.catalog-title a { display: block; width: min(100%, 460px); border-radius: 8px; }
.catalog-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.catalog-logo-sumtilo { padding: 18px 0; }
.catalog-teaser { max-width: 64ch; margin: 0 auto 20px; color: var(--muted); font-size: 16px; line-height: 1.7; text-align: center; }
.catalog-details { border-top: 1px solid var(--line); }
.catalog-details summary { padding: 16px 0; min-height: 48px; color: var(--accent); font-weight: 600; cursor: pointer; }
.catalog-details summary:hover { text-decoration: underline; }
.catalog-description { max-width: 68ch; padding-bottom: 8px; font-size: 15px; line-height: 1.75; }
.catalog-description h3 { margin: 0 0 12px; font-size: 18px; line-height: 1.4; }
.catalog-description p { margin: 0 0 16px; }
.catalog-play { display: flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; margin: 12px auto 0; padding: 12px 22px; min-height: 48px; border-radius: 10px; background: var(--accent); color: var(--site-on-accent); font-weight: 600; }
.catalog-play:hover { filter: brightness(.94); }
@media (max-width: 599px) {
 .catalog-card { padding: 24px 20px; }
 .catalog-teaser { font-size: 15px; }
 .catalog-logo-sumtilo { padding: 12px 0; }
}


.language-offer { width:min(480px,calc(100% - 32px)); margin:auto; padding:28px; border:1px solid var(--line); border-radius:16px; background:var(--site-panel); box-shadow:0 20px 80px #0006; }
.language-offer::backdrop { background:rgb(0 0 0 / 65%); }
body.language-offer-open { overflow:hidden; }
.language-offer[hidden] { display:none; }
.language-offer p { margin:0 0 24px; color:var(--ink); font-size:22px; font-weight:600; line-height:1.4; }
.language-offer-actions { display:flex; flex-direction:column; gap:12px; }
.language-offer-actions a { display:flex; justify-content:center; align-items:center; min-height:48px; padding:12px 16px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--site-panel); font-weight:600; text-align:center; }
.language-offer-actions a:first-child { background:var(--accent); color:var(--site-on-accent); border-color:var(--accent); }
.storage-language-note { font-size:12px; line-height:1.5; color:var(--muted); margin:8px 0 12px; }
.site-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px 28px; padding:24px; border-top:1px solid var(--line); background:var(--site-panel); color:var(--muted); }
.site-footer a { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; text-underline-offset:4px; }
.site-footer a:hover, .site-footer a[aria-current] { color:var(--accent); }
.prose-page { max-width:76ch; padding:40px 16px 56px; font-size:16px; line-height:1.8; }
.prose-page h1 { font-size:32px; line-height:1.25; margin:0 0 20px; }
.prose-page h2 { font-size:22px; line-height:1.4; margin:32px 0 12px; }
.prose-page p { margin:0 0 20px; }
.prose-page .operator-address { margin:0 0 20px; font-style:normal; line-height:1.5; }
.prose-page .privacy-table { overflow-x:auto; margin:0 0 20px; }
.prose-page .privacy-table table { width:100%; border-collapse:collapse; text-align:left; }
.prose-page .privacy-table th,.prose-page .privacy-table td { border:1px solid var(--muted); padding:8px 12px; vertical-align:top; }
.page-intro { color:var(--muted); font-size:18px; }
.draft-notice { padding:16px 20px; border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:8px; background:var(--site-panel); }
body.focus-mode .site-footer { display:none; }
@media (max-width:599px) { .prose-page { padding:28px 12px 36px; }.prose-page h1 { font-size:28px; }.site-footer { gap:8px 20px; padding:16px; } }
.saving-offer { box-sizing: border-box; width: min(440px,calc(100% - 28px)); max-width: calc(100% - 28px); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 28px; border: 2px solid #75924d; border-radius: 22px; background: linear-gradient(145deg,#fffef8,#f6f2e1); color: #25452b; box-shadow: 0 18px 60px #10244740; text-align: center; }
.saving-offer::backdrop { background: #10244770; }
.saving-offer .saving-offer-symbol { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; border: 1px solid #b7cd8f; border-radius: 18px; background: #e4efcb; color: #426b32; }
.saving-offer .saving-offer-symbol .icon { width: 30px; height: 30px; }
.saving-offer h2 { margin: 0 0 14px; color: #28572c; font-size: clamp(23px,5vw,28px); line-height: 1.2; }
.saving-offer p { margin: 0 0 14px; line-height: 1.5; font-size: 16px; }
.saving-offer .saving-offer-hint { color: #5b6752; font-size: 14px; }
.saving-offer #saving-offer-error { color: #a22d32; font-size: 14px; }
.saving-offer #saving-offer-error:empty { display: none; }
.saving-offer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.saving-offer .saving-offer-actions button { min-height: 46px; padding: 11px 16px; border: 1px solid #bac8a4; border-radius: 11px; background: #fffdf5; color: #355333; box-shadow: none; text-shadow: none; font: inherit; font-weight: 700; }
.saving-offer-actions #saving-offer-enable { border-color: #426d30; background: #426d30; color: #fff; }
.saving-offer-actions button:focus-visible { outline: 3px solid #125ac4; outline-offset: 3px; }
@media(max-width:420px) { .saving-offer { padding: 22px 16px; } .saving-offer-actions { flex-direction: column; } }

/* Folder-based news and its responsive article navigation. */
.news-page { overflow-wrap: anywhere; }
.news-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.news-page .news-back { display: inline-block; margin-bottom: 20px; }
.news-list { list-style: none; margin: 24px 0 0; padding: 0; }
.news-list li { padding: 20px 0; border-top: 1px solid var(--line); }
.news-list time,.news-date { color: var(--muted); font-size: 14px; }
.news-list h2 { margin: 4px 0 0; }
.news-nav-link { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 48px; padding: 12px 26px; overflow-wrap: anywhere; }
.news-nav-link time { color: var(--muted); font-size: 12px; }
.news-nav-link:hover,.news-nav-link[aria-current] { background: var(--site-highlight); }
.news-nav-link[aria-current] { box-shadow: inset 2px 0 var(--accent); }
.mobile-menu { max-height: calc(100dvh - 90px); overflow-y: auto; }

.news-sidebar summary { display: none; }
@media (max-width: 999px) {
 .sidebar.news-sidebar { display: block !important; min-height: 0; padding-bottom: 0; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
 .news-sidebar .sidebar-landscape { display: none; }
 .news-sidebar summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px 18px; cursor: pointer; list-style: none; font-weight: 700; }
 .news-sidebar summary::-webkit-details-marker { display: none; }
 .news-sidebar summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
 .news-sidebar details[open] > summary .icon { transform: rotate(180deg); }
 .news-sidebar .sidebar-nav { padding: 0 0 8px; max-height: 60vh; max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; }
 .news-sidebar .news-nav-link { padding: 12px 18px; }
}
