.ss-app {
	--ss-ink: var(--wp--preset--color--contrast, #172a35);
	--ss-muted: var(--wp--preset--color--contrast-2, #52636c);
	--ss-accent: var(--wp--preset--color--primary, var(--wp--preset--color--accent, #155eef));
	--ss-light: #f0d9b5;
	--ss-dark: #b58863;
	--ss-border: rgba(23, 42, 53, .18);
	--ss-border: color-mix(in srgb, var(--ss-ink) 18%, transparent);
	color: var(--ss-ink);
}
.ss-app *, .ss-app *::before, .ss-app *::after { box-sizing: border-box; }
.ss-app [hidden] { display: none !important; }
.ss-app button { font: inherit; }
.ss-intro, .ss-result { max-width: 48rem; margin-inline: auto; }
.ss-eyebrow { margin: 0 0 .4rem; color: var(--ss-muted); font-size: .82rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.ss-intro h2, .ss-result h2, .ss-game h2 { margin: 0 0 .65rem; color: var(--ss-ink); }
.ss-intro > p:not(.ss-eyebrow), .ss-result > p:not(.ss-eyebrow) { max-width: 42rem; }
.ss-intro .ss-session-details { color: var(--ss-muted); font-size: .95rem; }
.ss-button { display: inline-flex; min-height: 2.8rem; align-items: center; justify-content: center; padding: .65rem 1rem; border: 1px solid var(--ss-ink); border-radius: .45rem; background: transparent; color: var(--ss-ink); font-weight: 700; cursor: pointer; touch-action: manipulation; }
.ss-primary { border-color: var(--ss-accent); background: var(--ss-accent); color: #fff; }
.ss-button:hover:not(:disabled) { filter: brightness(.94); }
.ss-button:disabled { cursor: wait; opacity: .62; }
.ss-app :focus-visible { outline: 3px solid var(--ss-accent); outline-offset: 3px; }
.ss-status { min-height: 1.6em; margin: .8rem 0; color: var(--ss-muted); }
.ss-status[data-kind="success"] { color: #17603b; font-weight: 650; }
.ss-status[data-kind="error"] { color: #8a261a; font-weight: 650; }
.ss-status[data-kind="notice"] { color: var(--ss-ink); font-weight: 650; }
.ss-start-status { min-height: 1.5em; margin: .65rem 0; color: #8a261a; }
.ss-game-header { display: grid; grid-template-columns: 1fr auto; gap: .8rem 1.5rem; align-items: center; margin-bottom: 1.2rem; }
.ss-game-header h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.75rem); }
.ss-game-metrics { display: flex; align-items: center; gap: 1rem; }
.ss-timer, .ss-score { margin: 0; font-variant-numeric: tabular-nums; font-weight: 750; }
.ss-timer { min-width: 5rem; padding: .45rem .7rem; border: 1px solid #a9d5b8; border-radius: .5rem; background: #edf8f0; color: #17603b; text-align: center; font-size: 1.25rem; }
.ss-timer[data-urgent="true"] { border-color: #d49a94; background: #fff1ef; color: #a92920; }
.ss-score { white-space: nowrap; }
.ss-progress { grid-column: 1 / -1; display: block; width: 100%; height: .7rem; overflow: hidden; border: 0; border-radius: 99px; accent-color: var(--ss-accent); }
.ss-progress::-webkit-progress-bar { border-radius: 99px; background: #e5e9eb; }
.ss-progress::-webkit-progress-value { border-radius: 99px; background: var(--ss-accent); }
.ss-progress::-moz-progress-bar { border-radius: 99px; background: var(--ss-accent); }
.ss-play-area { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(220px, .8fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: start; }
.ss-board-wrap { position: relative; width: 100%; max-width: 640px; min-width: 0; aspect-ratio: 1; container-type: inline-size; }
.ss-board-wrap.is-rewarding::after { position: absolute; z-index: 5; inset: -.45rem; border: 6px solid #16834a; border-radius: .18rem; box-shadow: 0 0 0 2px #fff, 0 0 16px rgba(22, 131, 74, .65); content: ""; opacity: 0; pointer-events: none; animation: ss-reward-frame 400ms steps(2, end) 5; }
.ss-board { position: absolute; inset: 0; display: grid; width: 100%; height: 100%; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); overflow: hidden; border: 3px solid var(--ss-ink); touch-action: manipulation; }
.ss-square { position: relative; display: grid; min-width: 0; min-height: 0; place-items: center; padding: 0; border: 0; border-radius: 0; color: var(--ss-ink); font-size: clamp(1.5rem, 7vw, 4.6rem); line-height: 1; cursor: pointer; }
.ss-square:disabled { cursor: default; }
.ss-square.ss-light { background: var(--ss-light); }
.ss-square.ss-dark { background: var(--ss-dark); }
.ss-coordinate { position: absolute; z-index: 2; color: #332519; font: 700 clamp(.58rem, 1.7cqw, .8rem)/1 sans-serif; font-variant-numeric: tabular-nums; line-height: 1; pointer-events: none; user-select: none; }
.ss-dark .ss-coordinate { color: #fff; text-shadow: 0 1px 2px #38271b; }
.ss-rank-label { inset-block-start: clamp(.18rem, .6cqw, .3rem); inset-inline-start: clamp(.2rem, .65cqw, .34rem); }
.ss-file-label { inset-inline-end: clamp(.2rem, .65cqw, .34rem); inset-block-end: clamp(.18rem, .6cqw, .3rem); }
.ss-piece { display: grid; width: 100%; height: 100%; place-items: center; pointer-events: none; user-select: none; }
.ss-piece-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; pointer-events: none; user-select: none; }
/* These PNGs have unequal transparent side-bearing; the offsets center the visible glyph inside its own board cell. */
.ss-piece-image-k { transform: translateX(9.6%); }
.ss-piece-image-q { transform: translateX(5.9%); }
.ss-piece-image-r { transform: translateX(8.2%); }
.ss-piece-image-b { transform: translateX(7.2%); }
.ss-piece-image-n { transform: translateX(7.4%); }
.ss-piece-image-p { transform: translateX(8.8%); }
.ss-square.is-found { box-shadow: inset 0 0 0 5px #145c39; background-image: repeating-linear-gradient(135deg, rgba(20, 92, 57, .22) 0 5px, transparent 5px 10px); }
.ss-square.is-revealed { z-index: 1; box-shadow: inset 0 0 0 5px #132e82, inset 0 0 0 9px #fff; animation: ss-reveal 650ms steps(2, end) 5; }
.ss-square.is-found::after, .ss-square.is-revealed::after { position: absolute; z-index: 3; top: .08rem; right: .08rem; display: grid; width: clamp(1rem, 2.8vw, 1.55rem); height: clamp(1rem, 2.8vw, 1.55rem); place-items: center; border: 1px solid #fff; border-radius: 50%; background: #145c39; color: #fff; font: 800 clamp(.65rem, 1.7vw, .95rem)/1 sans-serif; content: attr(data-marker); }
.ss-square.is-revealed:not(.is-found)::after { background: #b42318; }
.ss-square.is-revealed.is-found::after { background: #145c39; }
.ss-square.is-wrong { box-shadow: inset 0 0 0 5px #a92920; }
.ss-square:focus-visible { z-index: 4; outline: 3px solid #101820; outline-offset: -4px; }
.ss-panel { padding: .35rem 0; }
.ss-prompt { margin: 0; font-size: 1.2rem; font-weight: 750; }
.ss-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.ss-help { max-width: 34rem; color: var(--ss-muted); font-size: .92rem; }
.ss-result-score { font-size: 1.25rem; font-weight: 750; }
@keyframes ss-reveal { 50% { background-color: #fff; box-shadow: inset 0 0 0 5px #132e82, inset 0 0 0 9px #fff; } }
@keyframes ss-reward-frame { 50% { opacity: 1; } }
@media (max-width: 720px) {
	.ss-play-area { grid-template-columns: 1fr; }
	.ss-board-wrap { max-width: min(100%, 640px); margin-inline: auto; }
	.ss-game-header { align-items: start; }
}
@media (max-width: 460px) {
	.ss-game-header { grid-template-columns: 1fr; }
	.ss-game-metrics { justify-content: space-between; }
	.ss-board { border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
	.ss-square.is-revealed { animation: none; outline: 4px dashed #132e82; outline-offset: -7px; }
	.ss-board-wrap.is-rewarding::after { animation: none; opacity: 1; }
}
