:root {
	--grid-size: 400px;
	--cgrid-size: 380px;
	--ink: #1a2332;
	--muted: #6b7380;
	--line: #2c3544;
	--box: #0f1724;
	--paper: #f4efe4;
	--cell: #fbf7ef;
	--given: #152033;
	--select: #ffe08a;
	--select-ring: #d97706;
	--pad: #1e293b;
	--pad-btn: #334155;
	--pad-btn-hover: #475569;
	--pad-on: #0f766e;
	--gap: 6px;
}

body {
	font-family: 'Noto Sans', Verdana, Arial, Helvetica, Garamond, sans-serif;
	margin: 0;
	color: #eeeeef;
	background-color: #000;
	background-image: url(images/BACK6.jpg);
	background-repeat: no-repeat;
	font-size: 100%;
}

html, body {
	max-width: 100%;
	overflow-x: hidden; /* avoid horizontal scroll expanding layout */
}

th, td {
	padding: 0; /* cellpadding */
	vertical-align: top;
	border: 0;
	font-size: 10pt;
}

table {
	border-collapse: collapse;
	border-spacing: 0; /* cellspacing="0" */
}

.ctop {
	vertical-align: top;
}

.ccenter {
	text-align: center;
}

p {
	margin-top: 0;
	padding: 0 0 1em 0;
}

pre {
	color: #88ffff;
}

img {
	border: 0;
	max-width: 100%;
}

.okmessage {
	font-size: 10pt;
	font-weight: bold;
	color: #44ff44;
}

.errmessage {
	font-size: 10pt;
	font-weight: bold;
	color: #ff4444;
}

.css-3d-text {
	font-size: 22pt;
	color: #fcd4a4;
	font-weight: bold;
	text-align: center;
	font-family: 'Copperplate Gothic', 'Trebuchet MS', Helvetica, sans-serif;
	text-shadow: 0 0 0 rgb(140,100,52), 1px 1px 0 rgb(28,-12,0), 2px 2px 1px rgba(0,0,0,0.37), 2px 2px 1px rgba(0,0,0,0.5), 0 0 1px rgba(0,0,0,.2);
	overflow:hidden;
}

.solvertitle {
	font-size: x-large;
	font-weight: normal;
	color: #fff;
}

.strat30 {
	width: 30px;
	text-align: right;
}

.t100pc {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	margin: 0 auto; /* table align (center) */
}

.t100pc td {
	padding: 0;
}

/* ========== Layout grid (mobile-first) ========== */
.gridwrapper660 {
	display: grid;
	width: 100%;
	max-width: 920px;
	box-sizing: border-box;
	align-content: flex-start;
	grid-template-columns: auto;
	grid-template-rows: 53px auto auto auto auto auto;
	grid-template-areas:
		"leaderboard"
		"buttonarea"
		"boardarea"
		"buttonarealower"
		"resultarea"
		"optionsarea"
}

.leaderboard {
	grid-area: leaderboard;
}

.buttonarea {
	grid-area: buttonarea;
}
.buttonarealower {
	grid-area: buttonarealower;
}

.optionsarea {
	grid-area: optionsarea;
	color: #888;
	font-size: 9pt;
}
.coordarea {
	display: none;
	position: absolute;
	left: -1000px;
}

.boardarea {
	grid-area: boardarea;
	width: 100%;
	max-width: min(100%, 422px);
	container-type: inline-size; /* enables cqw below */
	container-name: board;
	margin: 0 auto; /* optional: centre on very narrow screens */
	box-sizing: border-box;
}

.resultarea {
	grid-area: resultarea;
}

.footerarea {
	grid-area: footerarea;
	text-align: center;
	background-color: #222;
	border-left: solid 1px #666;
	border-bottom: solid 1px #666;
	color: #aaa;
	padding: 10px 20px;
	font-size: smaller;
}

/* ========== Solve path / example popup ========== */
#solvepathdiv,
#importhtmlback,
#solvepathdivnotice,
#choosestrats,
#actionspopup,
#newpuzpopup,
#pickexamplepopup {
	margin: auto;
	bottom: 20px;
	overflow-x: hidden;
	background-color: #246;
	color: #eeeeef;
}
#actionspopup {
	bottom: inherit;
}
#solvepathsub {
	margin-top: 12px;
	bottom: 20px;
	word-wrap: break-word;
	overflow-y: auto;
	background-color: #222;
	color: #eeeeef;
	border-top: 2px solid #06a;
	height: calc(100% - 110px);
}
#newpuzpopup {
	top: 20px;
	bottom: 5px;
}
#entryboard {
	position: fixed;
	/*left: 30px;
	top: 150px;*/
	width: fit-content;
	border: 3px solid black;
}
#solvepathdiv .sname {
	border-bottom: #aaa solid 2px;
	color: #888;
	font-size: 9pt;
	text-align: right;
	width: 100%;
	padding-bottom: 2px;
}

#solvepathdiv .sstep {
	font-weight: normal;
	font-size: 12pt;
	color: rgb(221, 238, 255);
	width: 36px;
}

#solvepathsub ul,
#solvepathsub li {
	margin: 0;
}

#solvepathsub li {
	margin-left: -10px;
	list-style-type: square;
}

.entrypathshow,
.solvepathshow {
	display: block;
	top: 100px;
	left: 15px;
	right: 15px;
	position: absolute;
	-webkit-box-shadow: 0 0 8px 8px rgba(0,0,0,1);
	-moz-box-shadow: 0 0 8px 8px rgba(0,0,0,1);
	box-shadow: 0 0 8px 8px rgba(0,0,0,1);
	border: 2px solid #666;
	padding: 0 10px 15px 15px;
	z-index: 100;
}
.entrypathshow {
	z-index: 50;
}
.solvepathhide {
	display: none;
	position: absolute;
	left: -1000px;
	top: 0;
	height: 0;
	border: 0;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
}
table.sudoku {
	width: var(--grid-size);
	height: var(--grid-size);
	border-collapse: collapse;
	table-layout: fixed;
	background: var(--cell);
}
table.DTTable td {
	width: calc(var(--cgrid-size) / 9);
	height: calc(var(--cgrid-size) / 9);
	padding: 0;
	margin: 0;
	text-align: center;
	vertical-align: middle;
	font-size: 22px;
	font-weight: 700;
	color: var(--given);
	border: 1px solid #c9c1b0;
	cursor: pointer;
	position: relative;
}

table.DTTable td.selected {
	background: var(--select);
	box-shadow: inset 0 0 0 2px var(--select-ring);
}

table.DTTable td.empty {
	color: transparent;
}
table.DTTable td.errval {
	background-color:#d55;
}


.gridcluepopup {
	display: grid;
	width: 100%;
	box-sizing: border-box;
	align-content: flex-start;
	grid-template-columns: auto;
	grid-template-rows: auto;
	grid-template-areas:
		"clueclose"
		"cluebuts"
		"clueboard"
}
.clueclose {
	grid-area: clueclose;
	padding-top: 12px;
	text-align: right;
}
.cluebuts {
	grid-area: cluebuts;
}
.clueboard {
	grid-area: clueboard;
	padding-top: 10px;
}



/* Number pad — CSS only, no images */
.numpad {
	position: absolute;
	z-index: 20;
	display: none;
	width: 156px;
	padding: 8px;
	background: var(--pad);
	border: 1px solid #475569;
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
	pointer-events: auto;
}
.numpad.open {
	display: block;
}
.numpad .pad-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gap);
}
.numpad button {
	height: 42px;
	border: 0;
	border-radius: 7px;
	background: var(--pad-btn);
	color: #f8fafc;
	font-size: 20px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	line-height: 1;
}
.numpad button:active {
	transform: scale(0.96);
	background: var(--pad-btn-hover);
}
.numpad button.active {
	background: var(--pad-on);
}
/* Caret pointing at the selected cell */
.numpad .caret {
	position: absolute;
	width: 10px;
	height: 10px;
	background: var(--pad);
	border: 1px solid #475569;
	transform: rotate(45deg);
	pointer-events: none;
}
.numpad[data-side="below"] .caret {
	top: -6px;
	border-right: 0;
	border-bottom: 0;
}
.numpad[data-side="above"] .caret {
	bottom: -6px;
	border-left: 0;
	border-top: 0;
}
.numpad[data-side="right"] .caret {
	left: -6px;
	border-right: 0;
	border-top: 0;
}
.numpad[data-side="left"] .caret {
	right: -6px;
	border-left: 0;
	border-bottom: 0;
}

@media screen and (min-width: 700px) {
	.gridwrapper660 {
		display: grid;
		align-content: flex-start;
		grid-template-columns: min(422px, 100%) auto;
		grid-template-rows: auto auto auto auto;
		grid-template-areas:
			"boardarea leaderboard"
			"boardarea buttonarea"
			"boardarea buttonarealower"
			"boardarea resultarea"
			"boardarea optionsarea ";
	}

	.gridcluepopup {
		grid-template-columns: 40% 50% 10%;
		grid-template-rows: auto;
		grid-template-areas:
			"cluebuts clueboard clueclose"
	}

	.leaderboard {
		/*	display: none;*/
	}

	.boardarea {
		background-color: #000;
	}

	.solvepathshow {
		top: 20px;
		left: 455px;
	}

	.entrypathshow {
		top: 20px;
		left: 50px;
	}

/*	#entryboard {
		position: fixed;
		left: 450px;
		top: 40px;
	} */
}

#ifrm {
	overflow-x: hidden;
}

/* ========== Buttons ========== */
.ufirstletter:first-letter {
	text-decoration: underline;
}
.SButton,
.BButton,
.GButton,
.RedButton,
.YButton {
	font-weight: 600;
	font-family: Lato, Arial, Helvetica, sans-serif;
	font-size: 9pt;
	color: white;
	border-radius: 0;
	margin:4px;
	-webkit-appearance: none;
	padding: 2px 6px;
	border-radius: 5px;
	letter-spacing: 1px;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
	-webkit-box-shadow: 0 0 4px 4px rgba(0,0,0,1);
	-moz-box-shadow: 0 0 4px 4px rgba(0,0,0,1);
	box-shadow: 0 0 4px 4px rgba(0,0,0,1);
}
.RedButton {
	border-top: #f77 2px solid;
	border-left: #f77 2px solid;
	border-right: #900 2px solid;
	border-bottom: #900 2px solid;
	background-color: #f22;
	font-size: 9pt;
}
.RedButton:hover {
	border-top: #d55 2px solid;
	border-left: #d55 2px solid;
	border-right: #900 2px solid;
	border-bottom: #900 2px solid;
	background-color: #c00;
}
.SButton {
	border-top: #d55 2px solid;
	border-left: #d55 2px solid;
	border-right: #900 2px solid;
	border-bottom: #900 2px solid;
	background-color: #c00;
}
.SButton:hover {
	border-top: #f77 2px solid;
	border-left: #f77 2px solid;
	border-right: #900 2px solid;
	border-bottom: #900 2px solid;
	background-color: #f22;
}
.SButton:active {
	border-top: #900 2px solid;
	border-left: #900 2px solid;
	border-right: #d55 2px solid;
	border-bottom: #d55 2px solid;
}
.BButton {
	border-top: #55f 2px solid;
	border-left: #55f 2px solid;
	border-right: #009 2px solid;
	border-bottom: #009 2px solid;
	background-color: #3453bb;
	color: #a1ddf5;
}
.BButton:hover {
	border-top: #88f 2px solid;
	border-left: #88f 2px solid;
	border-right: #66f 2px solid;
	border-bottom: #66f 2px solid;
	background-color: #2f56ef;
	color: #fff;
}
.BButton:active {
	border-top: #009 2px solid;
	border-left: #009 2px solid;
	border-right: #55f 2px solid;
	border-bottom: #55f 2px solid;
	background-color: #00a;
}
.GButton {
	border-top: #999 2px solid;
	border-left: #999 2px solid;
	border-right: #222 2px solid;
	border-bottom: #222 2px solid;
	background-color: #555;
}
.GButton:hover {
	border-top: #aaa 2px solid;
	border-left: #aaa 2px solid;
	border-right: #333 2px solid;
	border-bottom: #333 2px solid;
	background-color: #777;
	color: #ff0;
}
.YButton {
	border-top: #fc3 2px solid;
	border-left: #fc3 2px solid;
	border-right: #662 2px solid;
	border-bottom: #662 2px solid;
	background-color: #ebb73b;
	color: black;
}
	.YButton:hover {
		border: #fb0 2px solid;
		background-color: #ffdd00;
	}
.basicsel {
	font-size: 10pt;
	font-family: 'Lato';
	color: black;
	border-radius: 0;
	-webkit-appearance: none;
	padding: 2px 4px;
	border-radius:6px;
}

/* ========== Text / link helpers ========== */
.smallest {
	font-family: arial, sans-serif;
	font-size: 8pt;
}

.mycyan {
	color: #6ecaca;
}

a {
	text-decoration: none;
	font-weight: normal;
}

a:link,
a:visited {
	color: #fcc;
}

a:hover {
	color: #e3996c;
}

A:link.sudmenu,
A:visited.sudmenu {
	text-decoration: underline;
	color: #fcc;
	font-weight: normal;
	font-family: Verdana, Arial, sans-serif;
}

A:hover.sudmenu {
	text-decoration: underline;
	color: #ff0;
	font-weight: normal;
	font-family: Verdana, Arial, sans-serif;
}

A:link.darklnk,
A:visited.darklnk {
	text-decoration: underline;
	color: #444;
	font-weight: normal;
	font-family: Verdana, Arial, sans-serif;
}

A:hover.darklnk {
	text-decoration: underline;
	color: #00f;
	font-weight: normal;
	font-family: Verdana, Arial, sans-serif;
}

/* ========== Popups ========== */
.popupbackgroundhide {
	display: none;
	position: absolute;
	left: -1000px;
	top: 0;
}

.popupbackgroundshow {
	position: absolute;
	opacity: 1;
	top: 20px;
	right: 15px;
	left: 10px;
	height: auto;
	z-index: 15;
}

#emailhtml,
#solutioncount,
#importhtml2,
#minimisepuzzle {
	z-index: 20;
	margin: 0 auto;
	background-color: #246;
	color: #eeeeef;
	line-height: 1.1em;
	text-align: left;
	padding: 0 0 0 10px;
}

.emailtextarea {
	background-color: #efe;
	border: solid 2px #060;
	box-shadow: inset 2px 2px 2px 0 #707070;
	transition: box-shadow 0.3s;
	padding: 10px;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0;
	overflow-y: auto;
	overflow-x: hidden;
	font-size: 10pt;
}

.cancelpopup {
	height: 32px;
	font-family: Arial Black, 'Trebuchet MS', sans-serif;
	font-size: 14pt;
	color: #fff;
	border: 3px solid #888888;
	border-radius: 8px;
	cursor: pointer;
	padding: 0 5px;
	line-height: 1.4em;
	background-color: #000;
	-webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
	transition: all 0.3s;
	-webkit-box-shadow: 0 0 4px 4px rgba(0,0,0,1);
	-moz-box-shadow: 0 0 4px 4px rgba(0,0,0,1);
	box-shadow: 0 0 4px 4px rgba(0,0,0,1);
}
.cancelpopup:hover {
	background-color: #900;
}
.solstextarea {
	background-color: #efe;
	border: solid 2px #060;
	box-shadow: inset 2px 2px 2px 0 #707070;
	transition: box-shadow 0.3s;
	padding: 10px;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0;
	overflow-y: auto;
	overflow-x: hidden;
	font-size: 8pt;
}

.popupformshow {
	display: block;
	opacity: 1;
	-webkit-box-shadow: 0 0 8px 8px rgba(0,0,0,1);
	-moz-box-shadow: 0 0 8px 8px rgba(0,0,0,1);
	box-shadow: 0 0 8px 8px rgba(0,0,0,1);
	border: 2px solid #666;
}

.popupformhide {
	display: none;
	position: absolute;
	left: -1000px;
	top: 0;
	height: 0;
	border: 0;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
}
#resboxDiv {
	margin: 10px 0 10px 0;
	font-family: 'Courier New';
	background-color: #efe;
	overflow-y: scroll;
	font-size: 8pt;
	padding: 5px;
	width: 95%;
	max-height: 260px;
}

#minlexbox {
	margin: 0 0 10px 0;
	font-family: 'Courier New';
	background-color: #efe;
	font-size: 8pt;
	padding: 5px;
	width: 95%;
	height: auto;
	color: #000;
	overflow-wrap: anywhere;
}

#divPulse {
	animation: fadeInOut 1s ease-in-out infinite alternate;
	background-color: red;
	font-size: 11pt;
	padding: 2px 5px;
	color: black;
	margin-top: 2px;
}

@keyframes fadeInOut {
	0% {
		opacity: 0;
		background-color: rgba(255, 100, 100, 0);
	}

	100% {
		opacity: 1;
		background-color: rgba(255, 100, 100, 1);
	}
}

/* ========== Tooltips ========== */
.tooltip-container {
	position: relative;
	display: inline-block;
	cursor: pointer;
}

.tooltip {
	visibility: hidden;
	position: absolute;
	bottom: 100%;
	left: 50%;
	margin-bottom: 3px;
	padding: 6px 10px;
	background: #666;
	color: white;
	font-weight: normal;
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
	font-size: 13px;
	z-index: 10;
	opacity: 0;
	text-align: left;
	width: max-content;
	max-width: 250px;
	white-space: normal;
	word-wrap: break-word;
	transition: opacity 0.2s;
	pointer-events: none;
}

.ttStrat {
	color: #ff0;
	min-width: 10em;
}

.tooltip-container:hover .tooltip {
	visibility: visible;
	transition-delay: 0s;
	opacity: 1;
}

/* ========== Range slider (chaining) ========== */
input[type="range"] {
	-webkit-appearance: none;
	margin: 20px 0;
	width: 100%;
}

input[type="range"]:focus {
	outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
	width: 100%;
	height: 4px;
	cursor: pointer;
	background: #03a9f4;
	border-radius: 25px;
}

input[type="range"]::-webkit-slider-thumb {
	height: 20px;
	width: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 4px 0 rgba(0, 0, 0, 1);
	cursor: pointer;
	-webkit-appearance: none;
	margin-top: -8px;
}

input[type="range"]:focus::-webkit-slider-runnable-track {
	background: #03a9f4;
}

.range-wrap {
	width: 100%;
	position: relative;
}

.range-value {
	position: absolute;
	top: -50%;
}

.range-value span {
	width: 30px;
	height: 24px;
	line-height: 24px;
	text-align: center;
	background: #03a9f4;
	color: #fff;
	font-size: 12px;
	display: block;
	position: absolute;
	left: 50%;
	transform: translate(-50%, 0);
	border-radius: 6px;
}

.range-value span:before {
	content: "";
	position: absolute;
	width: 0;
	height: 0;
	border-top: 10px solid #03a9f4;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	margin-top: -1px;
}

/* ========== Buy Me a Coffee widget position (mobile) ========== */
body #bmc-wbtn {
	position: absolute !important;
	border: 2px solid black;
	box-shadow: rgb(223 151 75 / 60%) 1px 0 10px 11px !important;
	top: 18px;
	left: 320px;
	width: 48px !important;
	bottom: auto !important;
}

body #bmc-wbtn a:link,
body #bmc-wbtn a:visited,
body .bmc-btn a:link,
body .bmc-btn a:visited {
	color: #000;
	font-size: 22pt;
}
#Example select {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	box-sizing: border-box;
}
#Example select::-webkit-scrollbar {
	width: 22px; /* wider than default */
}
select::-webkit-scrollbar-track {
	background: #2a3140;
}

select::-webkit-scrollbar-thumb {
	background: #6b7cff;
	border-radius: 8px;
	border: 3px solid #2a3140; /* inset so thumb doesn’t look huge */
}

select::-webkit-scrollbar-thumb:hover {
	background: #8b97ff;
}
