body:has([data-tangram]){height:100svh;overflow:hidden}body:has([data-tangram]) main.wrap{width:min(1200px,100%);max-width:none;margin:0 auto;padding:6px 12px;min-height:0;flex:1;overflow:hidden}body:has([data-tangram]) .site-footer,body:has([data-tangram]) .floating-actions,body:has([data-tangram]) #domain-notice{display:none!important}body:has([data-tangram]) .site-header{flex:0 0 auto}body:has([data-tangram]) .site-header .bar{min-height:48px;padding-block:4px;gap:12px}body:has([data-tangram]) .site-header .brand{flex:1;min-width:0}body:has([data-tangram]) .site-header .brand img{width:30px;height:30px}body:has([data-tangram]) .site-header .brand span{font-size:1rem}body:has([data-tangram]) .menu-toggle{min-width:36px;margin:0}body:has([data-tangram]) #site-menu{z-index:40}
.tg-game{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;height:100%;min-height:0;gap:5px}.tg-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px}.tg-heading h1{margin:0;font-size:1.15rem;line-height:1.2;white-space:nowrap;text-wrap:balance}.tg-heading select{font:inherit;font-size:1rem!important;max-width:300px;min-width:0;width:45%;min-height:40px;border:1.5px solid #171717;border-radius:10px;background:#fffaf3;padding:5px 24px 5px 9px}.tg-stage{position:relative;min-height:0;min-width:0;overflow:hidden;overflow:clip;border:1.8px solid #171717;border-radius:16px;background:radial-gradient(circle at 18% 24%,rgba(255,237,213,.65),transparent 46%),#fff7ed;box-shadow:0 4px 16px rgba(124,45,18,.07);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.tg-board{display:block;width:100%;height:100%;overflow:visible}.tg-piece{cursor:grab;outline:none;touch-action:none;-webkit-user-select:none;user-select:none}.tg-piece:active,.tg-dragging .tg-piece.selected{cursor:grabbing}.tg-piece .tg-hit{fill:transparent;stroke:transparent;stroke-width:8;stroke-linejoin:round;pointer-events:all}.tg-piece .tg-face,.tg-piece .tg-paper,.tg-piece .tg-ink{pointer-events:none;stroke-linecap:round;stroke-linejoin:round}.tg-piece .tg-ink{fill:none;stroke:#171717;stroke-width:3.2}.tg-style-crayon-soft .tg-piece .tg-ink{stroke-width:4.4}.tg-style-crayon-bold .tg-piece .tg-ink{stroke-width:5.4}.tg-piece.selected .tg-ink{stroke:#9a3412;stroke-width:4.4}.tg-style-crayon-soft .tg-piece.selected .tg-ink{stroke-width:5.4}.tg-style-crayon-bold .tg-piece.selected .tg-ink{stroke-width:6.2}.tg-piece:focus-visible .tg-ink{stroke:#ea580c;stroke-width:5;stroke-dasharray:8 3}.tg-actions{display:flex;align-items:center;gap:5px}.tg-icon-button{display:inline-grid!important;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:9px!important;background:#fff7ed!important;color:#171717!important;border:1.6px solid #171717!important;border-radius:12px 9px 13px 10px!important;box-shadow:1.5px 1.5px 0 rgba(23,23,23,.14)!important;font:inherit;transition:background-color 120ms ease-out,border-color 120ms ease-out,box-shadow 120ms ease-out}.tg-icon-button svg{display:block;width:24px;height:24px;pointer-events:none}.tg-icon-button:hover:not(:disabled){background:#ffedd5!important;border-color:#ea580c!important}.tg-icon-button:active:not(:disabled){box-shadow:inset 0 1px 2px rgba(23,23,23,.18)!important}.tg-icon-button:disabled{opacity:.4;cursor:default}.tg-icon-button:focus-visible,.tg-pattern:focus-visible,.tg-categories button:focus-visible{outline:3px solid #ea580c;outline-offset:2px}.tg-icon-button[aria-pressed=true]{background:#ea580c!important;color:#fff7ed!important;border-color:#171717!important}.tg-context,.tg-nudge{position:absolute;left:0;top:0;padding:4px;border:1px solid #e7c9a9;border-radius:14px;background:#fffdf8f5;box-shadow:0 3px 14px #17171714;z-index:3;will-change:transform}.tg-context{gap:3px}.tg-nudge{display:none}.tg-show-nudge .tg-nudge{display:flex}.tg-dragging .tg-context,.tg-dragging .tg-nudge{visibility:hidden}.tg-feedback{display:flex;align-items:center;gap:10px;min-height:30px;font-size:.875rem;line-height:1.25}.tg-feedback [data-selection]{font-weight:700;flex:0 0 auto}.tg-feedback [role=status]{margin:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.tg-dock{justify-content:center;padding:4px 0 max(4px,env(safe-area-inset-bottom));gap:7px}.tg-complete .tg-stage{border-color:#ea580c;box-shadow:inset 0 0 0 1.5px #ea580c,0 4px 18px rgba(234,88,12,.14)}.tg-complete [role=status]{color:#9a3412;font-weight:600}.tg-dialog{width:min(780px,calc(100vw - 24px));max-width:none;max-height:85svh;border:1.6px solid #171717;border-radius:18px;padding:16px;background:#fffaf3;color:#171717;overflow:auto;overscroll-behavior:contain}.tg-dialog::backdrop{background:#17171766}.tg-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:12px;position:sticky;top:-16px;background:#fffaf3;z-index:2;padding:5px 0}.tg-dialog-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;min-width:0}.tg-dialog h2{font-size:1.25rem;margin:0;text-wrap:balance}.tg-catalog-count{font-size:.85rem;font-weight:600;color:#9a3412;background:#ffedd5;border:1px solid #e7c9a9;border-radius:999px;padding:2px 9px}.tg-dialog p{font-size:1rem;line-height:1.55;text-wrap:pretty}.tg-categories{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.tg-categories button{min-height:44px;padding:6px 10px;border:1px solid #d6c7b5;border-radius:10px;background:white;color:#525252;font:inherit;box-shadow:none}.tg-categories button[aria-pressed=true]{background:#ffedd5;color:#9a3412;border-color:#ea580c}.tg-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.tg-gallery .tg-pattern{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:110px;padding:8px;background:#fffdf8;color:#171717;border:1px solid #e7c9a9;border-radius:12px;box-shadow:none;font:inherit;font-size:.9rem;line-height:1.3}.tg-gallery .tg-pattern.is-completed::after{content:"✓";position:absolute;top:6px;right:6px;width:20px;height:20px;border-radius:999px;display:grid;place-items:center;font-size:.75rem;font-weight:700;background:#ffedd5;color:#9a3412;border:1px solid #ea580c}.tg-pattern svg{display:block;width:100%;height:70px;margin-bottom:5px;overflow:visible;pointer-events:none}.tg-gallery .tg-pattern[aria-pressed=true]{border-color:#ea580c;background:#ffedd5}.tg-pattern span{overflow-wrap:break-word}.tg-sources{margin:14px 0}.tg-sources p{font-size:.9rem}.tg-help-move{display:flex;align-items:center;gap:10px}.tg-noscript{padding:1rem;background:#ffedd5}.puzzle-hub{margin:1rem 0}.puzzle-hub .card h2{font-size:1.3rem}@media(max-width:600px){body:has([data-tangram]) main.wrap{padding:4px 8px}.tg-heading{gap:5px}.tg-heading h1{font-size:1rem}.tg-heading select{width:48%;font-size:.95rem}.tg-feedback{gap:5px;font-size:.875rem}.tg-feedback [data-selection]{max-width:42%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tg-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.tg-dialog{padding:12px}.tg-dialog>header{top:-12px}.tg-dock{gap:6px}.tg-game{gap:3px}.tg-stage{border-radius:12px}}@media(max-height:500px){.tg-heading{min-height:32px}.tg-heading h1{font-size:1rem}.tg-heading select{min-height:32px}.tg-feedback{min-height:20px}.tg-dock{padding:1px 0}.tg-game{gap:2px}}
@media(max-width:450px){body:has([data-tangram]) .site-header .brand span{display:none}body:has([data-tangram]) .site-header .bar{gap:8px}}
/* Gameplay controls stay under the pointer; override the site-wide hover lift. */
.tg-game button{transform:none!important}
