/* Sudoubleku game page. */
body {
	--z: 4;
}
#header {
	max-width: 42rem;
	margin: 0.25rem auto 0.5rem auto;
	padding: 0 0.5rem;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
}
.tray {
	display: grid;
	grid-template-columns: repeat(var(--z), minmax(0, 1fr));
	gap: 0.25rem;
	margin: 0.25rem 0;
}
.pick {
	position: relative;
	height: clamp(2.6rem, calc(var(--w) * 0.9), 3.6rem);
	border: 2px solid #888;
	border-radius: 0.4rem;
	background: white;
	font-family: inherit;
	font-size: clamp(1rem, 4vw, 1.4rem);
	font-weight: bold;
	cursor: pointer;
	padding: 0;
	overflow: hidden;
}
.pick.activePick {
	border: 3px solid #0A0;
	box-shadow: 0 0 0 2px #9F9;
}
/* Each number button: the number, and below it small squares for the colors that number can still use. */
.pick.num {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: space-between;
	padding: 2px 3px 3px 3px;
	line-height: 1.1;
}
.pick.num .left {
	display: flex;
	gap: 1px;
	height: 0.45rem;
}
.pick.num .left i {
	flex: 1;
	border-radius: 1px;
}
.letter {
	display: none;
}
body.letters .letter {
	display: inline;
}
.pick.col .letter {
	font-size: 0.8em;
}
.cardFull {
	display: grid;
	max-width: 42rem;
	margin: 0.25rem auto;
	padding: 0.5rem;
	position: relative;
	grid-template-columns: repeat(var(--z), minmax(0, 1fr));
}
#gameContainer {
	border: 4px solid black;
	padding: 0;
	box-sizing: content-box;
}
#gameContainer .cell {
	position: relative;
	height: var(--w);
	border: none;
	border-right: 1px solid #999;
	border-bottom: 1px solid #999;
	background: white;
	color: #000;
	font-family: inherit;
	font-size: min(calc(var(--w) * 0.5), 3rem);
	padding: 0;
	cursor: pointer;
	box-sizing: border-box;
}
#gameContainer .cell.edgeRight {
	border-right: none;
}
#gameContainer .cell.edgeBottom {
	border-bottom: none;
}
#gameContainer .cell.blockRight {
	border-right: 4px solid black;
}
#gameContainer .cell.blockBottom {
	border-bottom: 4px solid black;
}
#gameContainer .cell.givenNum .n {
	font-weight: bold;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}
/* A given color has a small white corner, so you can tell it's part of the puzzle. */
#gameContainer .cell.givenCol::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	border-top: calc(var(--w) * 0.22) solid white;
	border-right: calc(var(--w) * 0.22) solid transparent;
}
#gameContainer .cell .letter {
	position: absolute;
	right: 0.2em;
	bottom: 0.1em;
	font-size: 0.45em;
}
body.letters #gameContainer .cell .letter {
	display: block;
}
#gameContainer .cell.hint {
	outline: 4px solid #FC0;
	outline-offset: -4px;
	z-index: 1;
}
#gameContainer .cell.wrong {
	outline: 4px solid #E00;
	outline-offset: -4px;
	z-index: 1;
}
#gameContainer .cell.bad {
	animation: bad 0.4s;
}
@keyframes bad {
	0%, 100% { transform: none; }
	25% { transform: translateX(-3px); }
	75% { transform: translateX(3px); }
}
#status {
	text-align: center;
	min-height: 1.5rem;
	max-width: 42rem;
	margin: 0.25rem auto;
}
#options {
	text-align: center;
	font-size: 0.9rem;
	margin: 0.25rem;
}
.example {
	display: inline-grid;
	grid-template-columns: repeat(4, 2.2rem);
	border: 3px solid black;
	margin: 0.25rem;
	vertical-align: top;
}
.example span {
	height: 2.2rem;
	line-height: 2.2rem;
	text-align: center;
	font-weight: bold;
	border-right: 1px solid #999;
	border-bottom: 1px solid #999;
}
