.in4u-su { max-width: 720px; margin: 0 auto; font-family: inherit; }

/* ---- controls + actions (shared with the site's other tools) ---- */
.in4u-su-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	background: #f7f8fa;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 14px;
}
.in4u-su-ctrl { display: flex; flex-direction: column; gap: 6px; }
.in4u-su-ctrl > span { font-size: 14px; font-weight: 600; color: #374151; }
.in4u-su-ctrl select,
.in4u-su-ctrl input {
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
	min-height: 40px;
}
.in4u-su-ctrl input[type="number"] { width: 90px; }
.in4u-su-toggle { flex-direction: row; align-items: center; gap: 8px; }
.in4u-su-toggle input { min-height: 0; width: 18px; height: 18px; }

.in4u-su-timerbox { display: flex; flex-direction: column; gap: 4px; }
.in4u-su-timerbox > span { font-size: 14px; font-weight: 600; color: #374151; }
.in4u-su-timer { font-size: 22px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; }

.in4u-su-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.in4u-su-btn {
	padding: 10px 18px;
	border-radius: 8px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.in4u-su-btn-primary { background: #2563eb; color: #fff; }
.in4u-su-btn-primary:hover { background: #1d4ed8; }
.in4u-su-btn-secondary { background: #fff; color: #1f2937; border-color: #cbd5e1; }
.in4u-su-btn-secondary:hover { background: #f3f4f6; }
.in4u-su-btn:disabled { opacity: .6; cursor: default; }
.in4u-su-status { font-size: 14px; color: #059669; font-weight: 600; }

/* ---- playable board ---- */
.in4u-su-play { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; justify-content: center; }

.in4u-su-board {
	display: grid;
	width: min(92vw, 470px);
	aspect-ratio: 1 / 1;
	margin: 0 auto;
	border: 3px solid #111;
	background: #fff;
	touch-action: manipulation;
}
.in4u-su-n9 { grid-template-columns: repeat(9, 1fr); }
.in4u-su-n6 { grid-template-columns: repeat(6, 1fr); }
.in4u-su-n4 { grid-template-columns: repeat(4, 1fr); }

.in4u-su-cell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #cbd5e1;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	color: #2563eb;
	font-weight: 600;
	line-height: 1;
}
.in4u-su-cell.bx-r { border-right: 2px solid #111; }
.in4u-su-cell.bx-b { border-bottom: 2px solid #111; }
.in4u-su-cell.is-given { color: #111827; font-weight: 700; background: #f3f4f6; cursor: default; }
.in4u-su-cell.is-same { background: #dbeafe; }
.in4u-su-cell.is-given.is-same { background: #cfe0fb; }
.in4u-su-cell.is-sel { background: #bfdbfe; box-shadow: inset 0 0 0 2px #2563eb; }
.in4u-su-cell.is-bad { color: #dc2626; background: #fee2e2; }

.in4u-su-n9 .in4u-su-cell { font-size: clamp(16px, 4.4vw, 26px); }
.in4u-su-n6 .in4u-su-cell { font-size: clamp(20px, 6vw, 34px); }
.in4u-su-n4 .in4u-su-cell { font-size: clamp(24px, 8vw, 40px); }

.su-notes { display: grid; width: 100%; height: 100%; padding: 1px; box-sizing: border-box; }
.in4u-su-n9 .su-notes { grid-template-columns: repeat(3, 1fr); }
.in4u-su-n6 .su-notes { grid-template-columns: repeat(3, 1fr); }
.in4u-su-n4 .su-notes { grid-template-columns: repeat(2, 1fr); }
.su-notes i {
	display: flex; align-items: center; justify-content: center;
	font-style: normal; font-weight: 500; color: #6b7280;
	font-size: clamp(8px, 1.6vw, 11px);
}

/* ---- numpad ---- */
.in4u-su-padwrap { display: flex; flex-direction: column; gap: 10px; min-width: 150px; }
.in4u-su-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.in4u-su-key {
	min-height: 52px;
	font-size: 22px;
	font-weight: 700;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
	color: #1f2937;
	cursor: pointer;
}
.in4u-su-key:hover { background: #f3f4f6; }
.in4u-su-key:active { background: #e5e7eb; }
.in4u-su-padactions { display: flex; gap: 8px; }
.in4u-su-padactions .in4u-su-key { flex: 1; font-size: 15px; min-height: 46px; }
.in4u-su-pencil.is-on { background: #2563eb; color: #fff; border-color: #2563eb; }

/* on wider screens the numpad sits beside the board; on phones it wraps below */
@media (max-width: 560px) {
	.in4u-su-play { flex-direction: column; align-items: stretch; }
	.in4u-su-padwrap { min-width: 0; }
	.in4u-su-pad { grid-template-columns: repeat(5, 1fr); }
}

/* ---- printable preview ---- */
.in4u-su-render { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.in4u-su-cardfig { margin: 0; text-align: center; }
.in4u-su-cardfig figcaption { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.in4u-su-svg svg { width: 100%; height: auto; display: block; border: 1px solid #e5e7eb; border-radius: 6px; }
@media (max-width: 560px) { .in4u-su-render { grid-template-columns: 1fr; } }

/* never print an ad or the tool chrome if someone Ctrl+P's the page itself
   (the tool's own print/PDF renders a clean sheet in an iframe instead) */
@media print {
	.ad, .in4u-ad-inline, .adsbygoogle,
	.in4u-su-controls, .in4u-su-actions, .in4u-su-padwrap { display: none !important; }
}
