
.tssd-game {
	--tssd-bg: #fff;
	--tssd-line: #333;
	--tssd-line-thin: #bbb;
	--tssd-given: #000;
	--tssd-user: #0066cc;
	--tssd-sel: #fff3c4;
	--tssd-same: #fdf0c0;
	--tssd-conflict: #ffd5d5;

	--tssd-accent: var(--sd-gold);

	max-width: 540px;
	margin: 1em auto;
	font-family: var(--sd-font);
}

.tssd-game__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-weight: 700;
}
.tssd-game__mode {
	background: var(--tssd-accent);
	color: var(--sd-gold-ink);
	padding: 2px 10px;
	border-radius: var(--sd-radius-sm);
	font-size: 0.9em;
}

.tssd-game__rankbadge {
	padding: 2px 10px;
	border-radius: var(--sd-radius-pill);
	font-size: var(--sd-fs-xs);
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
	border: 1px solid transparent;
}
.tssd-game__rankbadge--ranked {
	background: #1f7a3d;
	color: #fff;
	border-color: #155a2c;
}
.tssd-game__rankbadge--casual {
	background: #eef0f2;
	color: #444;
	border-color: #d3d7db;
}

.tssd-game__rankbadge--assisted {
	background: #e7e3ee;
	color: #6b21a8;
	border-color: #c4b5d8;
}

.tssd-game__rankbadge-strike { text-decoration: line-through; }
.tssd-game__rankbadge-note { text-decoration: none; margin-left: .25em; }
.tssd-game__timer { font-variant-numeric: tabular-nums; font-size: 1.1em; }

/* "Zeit einblenden" label below takes over the slot (Joomla parity). */
.tssd-game__timer.is-hidden,
.tssd-game__timehide.is-hidden { display: none; }

.tssd-game__timehide { padding: 2px; }
.tssd-game__timehide .tssd-game__ico { width: 18px; height: 18px; }

.tssd-game__timeshow {
	display: none;
	border: 0;
	background: none;
	padding: 2px 4px;
	font: inherit;
	color: var(--tssd-accent, #b8860b);
	text-decoration: underline;
	cursor: pointer;
}
.tssd-game__timeshow.is-active { display: inline-block; }
.tssd-game__timeshow:hover,
.tssd-game__timeshow:focus-visible { text-decoration: none; }

.tssd-game__eligib { display: inline-flex; align-items: center; }
.tssd-game__eligib-ico { width: 22px; height: 22px; }
.tssd-game__modewrap { display: inline-flex; align-items: center; gap: 8px; }

.tssd-game__daynav { display: inline-flex; flex-direction: column; gap: 2px; }
.tssd-game__day {
	min-width: 30px; min-height: 18px; padding: 0 6px;
	border: 1px solid #8a8a8a; border-radius: var(--sd-radius-sm);
	background: #e9e9e9; color: #1e1e1e; cursor: pointer; font-weight: var(--sd-btn-weight);
	line-height: 1; font-size: 0.8em;
}
.tssd-game__day:hover:not(:disabled) { background: #d5d5d5; border-color: #666; }
.tssd-game__day:disabled { opacity: 0.35; cursor: default; }

.tssd-game__day.is-atmax { opacity: 0.5; cursor: help; }

.tssd-game__nonav { display: inline-flex; align-items: center; gap: 4px; }
.tssd-game__no {
	min-width: 30px; min-height: 30px;
	border: 1px solid #8a8a8a; border-radius: var(--sd-radius-sm);
	background: #e9e9e9; color: #1e1e1e; cursor: pointer; font-weight: var(--sd-btn-weight);
	line-height: 1; font-size: 1em;
}
.tssd-game__no:hover:not(:disabled) { background: #d5d5d5; border-color: #666; }
.tssd-game__no:disabled { opacity: 0.35; cursor: default; }
.tssd-game__nolabel { font-size: 0.95em; font-weight: 700; white-space: nowrap; padding: 0 2px; font-variant-numeric: tabular-nums; cursor: help; }
.tssd-game__barright { display: inline-flex; align-items: center; gap: 12px; }

.tssd-game__guide { font-weight: 700; text-decoration: none; }

.tssd-game__board { width: 100%; }

.tssd-game__jtop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 8px;
	border: 1px solid var(--tssd-accent);
	border-bottom: none;
	background: var(--sd-surface);
	font-weight: 700;
}
.tssd-game__jtitle { display: inline-flex; align-items: center; gap: 8px; }
.tssd-game__jactions { display: inline-flex; align-items: center; gap: 6px; }

.tssd-game__jhead {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border: 1px solid var(--tssd-accent);
	border-bottom: none;
	background: #fff;
}
.tssd-game__jcol { border-left: 1px solid var(--tssd-accent); }
.tssd-game__jcol:first-child { border-left: none; }
.tssd-game__jlabel {
	text-align: center;
	font-weight: 700;
	font-size: 0.92em;
	padding: 3px 4px;
	border-bottom: 1px solid var(--tssd-accent);
	background: var(--sd-surface);
}
.tssd-game__jbody {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 4px 6px;
}
.tssd-game__stars { display: inline-flex; gap: 1px; }

.tssd-game__star {
	border: 0;
	background: none;
	padding: 1px;
	margin: 0;
	cursor: pointer;
	line-height: 0;
	border-radius: var(--sd-radius-sm);
}
.tssd-game__star:hover,
.tssd-game__star:focus-visible { background: var(--tssd-sel); outline: none; }
.tssd-game__star.is-current { background: var(--tssd-accent); }

.tssd-game__star-img { width: 18px; height: 18px; display: block; }
.tssd-game__star-img svg { width: 100%; height: 100%; display: block; }

.tssd-game__jfoot {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border: 1px solid var(--tssd-accent);
	border-top: none;
	background: var(--sd-surface);
	font-size: 0.8em;
	color: #555;
	line-height: 1.25;
}

.tssd-game__grid {
	display: grid;
	grid-template-rows: repeat(9, 1fr);
	aspect-ratio: 1 / 1;
	border: 3px solid var(--tssd-line);
	background: var(--tssd-bg);
}
.tssd-game__row { display: grid; grid-template-columns: repeat(9, 1fr); }

.tssd-game__cell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--tssd-line-thin);
	font-size: clamp(16px, 5vw, 28px);
	color: var(--tssd-user);
	cursor: pointer;
	user-select: none;
	aspect-ratio: 1 / 1;
}
/* thick 3×3 separators */
.tssd-game__row .tssd-game__cell:nth-child(3n) { border-right: 2px solid var(--tssd-line); }
.tssd-game__row .tssd-game__cell:nth-child(1) { border-left: 2px solid var(--tssd-line); }
.tssd-game__grid .tssd-game__row:nth-child(3n) .tssd-game__cell { border-bottom: 2px solid var(--tssd-line); }
.tssd-game__grid .tssd-game__row:nth-child(1) .tssd-game__cell { border-top: 2px solid var(--tssd-line); }

.tssd-game__cell.is-given { color: var(--tssd-given); font-weight: 700; }
.tssd-game__cell.is-selected { background: var(--tssd-sel); }
.tssd-game__cell.is-same { background: var(--tssd-same); }
.tssd-game__cell.is-conflict { background: var(--tssd-conflict); }
.tssd-game__cell:focus { outline: 3px solid var(--tssd-accent); outline-offset: -3px; }

.tssd-game__notes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	width: 100%;
	height: 100%;
	font-size: 0.34em;
	color: #666;
	line-height: 1;
}
.tssd-game__note { display: flex; align-items: center; justify-content: center; }

.tssd-game__klicks {
	position: absolute;
	inset: 0;
	pointer-events: none; /* children re-enable; centre passes through to cell */
}
.tssd-game__val {
	position: relative;
	z-index: 1;
	pointer-events: none;
}
.tssd-game__klick {
	position: absolute;
	width: 20%;
	height: 30%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	color: transparent;
	cursor: pointer;
	pointer-events: auto;
	font-weight: 400;
}

.tssd-game__klick.is-noted { color: var(--sd-warn); font-weight: 700; }
.tssd-game__cell:hover .tssd-game__klick { color: #bbb; }
.tssd-game__cell:hover .tssd-game__klick.is-noted { color: var(--sd-warn); }
.tssd-game__klick:hover { background: rgba(240, 186, 55, 0.5); color: #000; border-radius: var(--sd-radius-sm); }

.tssd-game__klick[data-d="1"] { top: 0; left: 0; }
.tssd-game__klick[data-d="2"] { top: 0; left: 20%; }
.tssd-game__klick[data-d="3"] { top: 0; left: 40%; }
.tssd-game__klick[data-d="4"] { top: 0; left: 60%; }
.tssd-game__klick[data-d="5"] { top: 0; left: 80%; }
.tssd-game__klick[data-d="6"] { bottom: 0; left: 0; }
.tssd-game__klick[data-d="7"] { bottom: 0; left: 20%; }
.tssd-game__klick[data-d="8"] { bottom: 0; left: 40%; }
.tssd-game__klick[data-d="9"] { bottom: 0; left: 60%; }
.tssd-game__klick--clear { bottom: 0; left: 80%; color: transparent; }
.tssd-game__cell:hover .tssd-game__klick--clear { color: var(--sd-warn); }
.tssd-game__klick--clear:hover { background: rgba(204, 0, 0, 0.15); color: var(--sd-warn); }

.tssd-game--notes-small  .tssd-game__klick { font-size: clamp(7px, 1.4vw, 10px); }
.tssd-game--notes-medium .tssd-game__klick { font-size: clamp(9px, 1.8vw, 13px); }
.tssd-game--notes-large  .tssd-game__klick { font-size: clamp(11px, 2.2vw, 16px); }

.tssd-game__klickhint { font-size: 0.8em; color: #666; margin: 4px 2px 0; }
.tssd-game__signuphint { font-size: 0.85em; color: #444; margin: 4px 2px 0; background: var(--sd-surface-2); border: 1px solid var(--sd-gold); border-radius: var(--sd-radius); padding: 6px 10px; }

.tssd-notice {
	min-height: 1.4em;
	margin: 6px 2px;
	padding: 6px 12px;
	font-weight: 700;
	border: 1px solid transparent;
	border-radius: var(--sd-radius-sm);
	background: transparent;
	color: #333;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.tssd-notice.is-info    { background: #eef3fb; border-color: #b6c8e6; color: #2b4a73; }
.tssd-notice.is-success { background: var(--sd-ok-bg); border-color: var(--sd-ok); color: #1c6b32; }
.tssd-notice.is-warning { background: #fff7da; border-color: #f0ba37; color: #6b5300; }
.tssd-notice.is-error   { background: #fdecea; border-color: #d93025; color: #a31a12; }
/* Cleared: collapse to nothing so an empty status leaves no visible frame. */
.tssd-notice.is-empty   { min-height: 0; margin-block: 0; padding: 0; border-color: transparent; background: transparent; }

/* The game status bar IS such a box. */
.tssd-game__statusbar { /* base box comes from .tssd-notice */ }

.tssd-game__readercta {
	margin: .6em 0 0;
	padding: .8em 1em;
	border: 1px solid var(--sd-gold-line);
	border-radius: var(--sd-radius);
	background: var(--sd-gold-soft);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .55em;
}
.tssd-game__readercta[hidden] { display: none; }
.tssd-game__readerctatext { margin: 0; font-weight: 600; }

/* Outline pulse so a new (even identical) message is noticed WITHOUT overwriting
   the kept severity colour. Shared class `.tssd-notice-flash`. */
.tssd-notice-flash { animation: tssd-notice-flash 900ms ease-out; }
@keyframes tssd-notice-flash {
	0%   { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.28); }
	25%  { box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12); }
	100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.tssd-game__pad {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6px;
	margin-top: 8px;
}
.tssd-game__num {
	min-height: 44px;
	font-size: 1.2em;
	font-weight: 700;
	border: 1px solid var(--tssd-line-thin);
	border-radius: var(--sd-radius-sm);
	background: #fafafa;
	cursor: pointer;
}
.tssd-game__num:hover, .tssd-game__num:focus { background: var(--tssd-sel); }
.tssd-game__erase { grid-column: span 1; }

.tssd-game__num.is-armed { background: var(--tssd-accent); color: #000; border-color: var(--sd-gold-line); font-weight: 700; }
.tssd-game__inputmode { font-size: 0.85em; margin-bottom: 6px; align-self: flex-start; }

.tssd-game__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.tssd-game__btn {

	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--sd-line);
	border-radius: var(--sd-radius);
	background: var(--sd-white);
	cursor: pointer;
	font-weight: var(--sd-btn-weight);
	line-height: 1.2;
}
.tssd-game__btn:hover, .tssd-game__btn:focus { background: var(--sd-surface-2); }
.tssd-game__btn.is-active { background: var(--tssd-accent); border-color: var(--sd-gold-line); }
.tssd-game__btn--primary {
	background: var(--tssd-accent);
	border-color: var(--sd-gold-line);
	color: var(--sd-gold-ink);
}

.tssd-game__btn--primary:hover, .tssd-game__btn--primary:focus { background: var(--sd-gold-dark); color: var(--sd-gold-ink); }

.tssd-game__btn--link {
	color: var(--sd-text);
	text-decoration: none;
}

/* Icon-only control — same border/hover roles, its own compact box (own role). */
.tssd-game__ibtn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 3px; min-width: 34px; min-height: 34px;
	border: 1px solid var(--sd-line); border-radius: var(--sd-radius);
	background: var(--sd-white); cursor: pointer; line-height: 1;
	/* Dieselbe EINE Button-Schriftstärke wie jeder andere Knopf (--sd-btn-weight).
	 * Sichtbar ändert das hier nichts — der Knopf trägt nur ein SVG —, aber die
	 * Speicher-Reihe mischt Icon- und Textknöpfe, und der Design-Wächter vergleicht
	 * die Signatur einer REIHE: ohne diese Zeile stand dort 400 gegen 600. */
	font-weight: var(--sd-btn-weight);
}
.tssd-game__ibtn:hover, .tssd-game__ibtn:focus { background: var(--sd-surface-2); }
.tssd-game__ibtn.is-active { background: var(--tssd-accent); border-color: var(--sd-gold-line); }
.tssd-game__ibtn--primary { background: var(--tssd-accent); border-color: var(--sd-gold-line); }
.tssd-game__ico { width: 26px; height: 26px; object-fit: contain; display: block; }

.tssd-game__ico svg { width: 100%; height: 100%; display: block; }
.tssd-game__ilbl { font-size: 11px; font-weight: 700; color: #333; }
.tssd-game__controls2 { margin-top: 10px; }

/* Pause: blur the grid so the puzzle can't be peeked while paused. */
.tssd-game__grid.is-paused { filter: blur(7px); pointer-events: none; }

.tssd-game__notefield {
	flex: 1 1 200px;
	min-width: 160px;

	min-height: 44px;
	padding: 6px 10px;
	border: 1px solid var(--tssd-line-thin);
	border-radius: var(--sd-radius-sm);
}
.tssd-game__savespanel { margin-top: 8px; }
.tssd-game__saveitem {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 4px;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}
.tssd-game__saveinfo { flex: 1 1 220px; min-width: 0; }
.tssd-game__savemeta { font-weight: 700; font-variant-numeric: tabular-nums; }
.tssd-game__savenote { color: #555; font-style: italic; word-break: break-word; }
.tssd-game__saveactions { display: inline-flex; gap: 6px; flex: 0 0 auto; }

.tssd-game__rateline {
	display: flex;
	gap: 6px;
	margin: 4px 2px 0;
	justify-content: flex-end;
	align-items: center;
}
.tssd-game__rate-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--tssd-line-thin);
	border-radius: 50%;
	background: #fafafa;
	color: #555;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background 120ms ease, transform 120ms ease, color 120ms ease;
}
.tssd-game__rate-icon:hover,
.tssd-game__rate-icon:focus { background: var(--tssd-sel); color: #000; }
.tssd-game__rate-icon.is-chosen {
	background: var(--tssd-accent);
	color: #000;
	font-weight: 700;
	border-color: var(--sd-gold-line);
}
.tssd-game__report-icon { margin-left: 6px; color: #a23; }
.tssd-game__report-icon:hover, .tssd-game__report-icon:focus { background: #ffe9ea; color: #8a1a26; }

/* Report textarea pops up small under the icon row. */
.tssd-game__reportpanel {
	margin: 6px 2px 0;
	padding: 6px 8px;
	border: 1px solid var(--tssd-line-thin);
	border-radius: var(--sd-radius-sm);
	background: #fafafa;
	font-size: 0.9em;
}
.tssd-game__reportinput {
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
	font-family: inherit;
	font-size: 0.9em;
	min-height: 50px;
}
.tssd-game__reportactions {
	display: flex;
	gap: 6px;
	margin-top: 6px;
	justify-content: flex-end;
}

@media (max-width: 480px) {
	.tssd-game { margin: 0.5em auto; }
	.tssd-game__pad { grid-template-columns: repeat(5, 1fr); }

	.tssd-game__jhead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tssd-game__jcol:nth-child(3) {
		grid-column: 1 / -1;
		border-left: none;
		border-top: 1px solid var(--tssd-accent);
	}

	.tssd-game__jactions { flex: 1 1 100%; justify-content: space-between; gap: 4px; }
}

.tssd-game--static {
	max-width: 380px;
	cursor: default;
}
.tssd-game--static .tssd-game__board { width: 100%; }
/* The 9×9 grid is the square; rows/columns are equal fractions of it. In the
   article/.entry-content context the per-cell `aspect-ratio:1/1` + grid default
   `min-width:auto` made cells portrait and pushed the 9th column past the right
   border (reopen ss26). Let the square grid drive the track sizes instead:
   cells fill their track (min-width:0) and drop their own aspect-ratio. */
.tssd-game--static .tssd-game__grid { aspect-ratio: 1 / 1; width: 100%; }
.tssd-game--static .tssd-game__row  { min-width: 0; }
.tssd-game--static .tssd-game__cell {
	pointer-events: none;
	cursor: default;
	aspect-ratio: auto;
	min-width: 0;
	min-height: 0;
	box-sizing: border-box;
	font-size: clamp(14px, 3.6vw, 22px);
}
.tssd-game--static .tssd-game__cell:focus { outline: none; }

.tssd-game__settings[aria-expanded="true"] { background: var(--tssd-accent); }
.tssd-game__guide { text-decoration: none; color: inherit; }

.tssd-game__modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;

	align-items: flex-start;
	justify-content: center;
	padding: 16px;
	background: rgba( 0, 0, 0, 0.5 );
	overflow-y: auto;
}
.tssd-game__modal-overlay[hidden] { display: none; }
.tssd-game__modal {
	background: var(--sd-surface);
	border: 1px solid var(--tssd-accent);
	border-radius: var(--sd-radius-lg);
	box-shadow: var(--sd-shadow-lg);
	width: 100%;
	max-width: 460px;
	margin: auto;

	max-height: calc( 100vh - 32px );
	max-height: calc( 100dvh - 32px );
	overflow-y: auto;
	padding: 0 16px 16px; /* top padding lives in the sticky head */
	animation: tssd-modal-in 0.16s ease-out;
}
@keyframes tssd-modal-in {
	from { transform: translateY( 12px ) scale( 0.98 ); opacity: 0; }
	to   { transform: none; opacity: 1; }
}
.tssd-game__modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 8px;
	border-bottom: 1px solid var(--tssd-line-thin);
	padding: 14px 0 8px;
	position: sticky;
	top: 0;
	z-index: 1;
	background: inherit;
}
.tssd-game__modal-title { margin: 0; font-size: 1.1em; }
.tssd-game__modal-close {
	border: 1px solid var(--tssd-line-thin);
	background: #fff;
	border-radius: var(--sd-radius);
	cursor: pointer;
	line-height: 1;
	min-width: 34px;
	min-height: 34px;
	font-size: 1em;
}
.tssd-game__modal-close:hover,
.tssd-game__modal-close:focus { background: var(--tssd-sel); }

.tssd-game__toast {
	position: fixed;
	top: 14px;
	left: 50%;
	transform: translateX( -50% );
	z-index: 10001;
	max-width: calc( 100vw - 24px );
	padding: 10px 16px;
	background: #1c2330;
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, 0.3 );
	font-size: 0.9em;
	font-weight: 600;
	text-align: center;
	pointer-events: none;
}
.tssd-game__toast[hidden] { display: none; }
.tssd-game__toast.is-in { animation: tssd-toast-in 0.2s ease-out; }
@keyframes tssd-toast-in {
	from { transform: translate( -50%, -12px ); opacity: 0; }
	to   { transform: translate( -50%, 0 ); opacity: 1; }
}
.tssd-game__setrow {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 5px 0;
	font-size: 0.92em;
}
.tssd-game__setrow > span { flex: 1 1 auto; }

.tssd-game__setrow.is-disabled { opacity: 0.5; }
.tssd-game--notes-off .tssd-game__klicks { display: none; }
.tssd-game__setsize { margin-left: auto; }
.tssd-game__sethint { font-size: 0.82em; color: #555; margin: 8px 0 0; }

.tssd-game__padhint { font-size: 0.8em; color: #666; margin: 8px 2px 4px; }

.tssd-daily-page__intro {
	/*max-width: 60ch;*/
	color: #444;
	margin: 0 0 1em;
}

.tssd-daily-page__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 22px;
	margin: 1.2em 0 0.4em;
	text-align: center;
}

.tssd-game__jtop {
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}
.tssd-game__jtoprow {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.tssd-game__modebar > .tssd-game__jtitle {
	flex-wrap: wrap;
	row-gap: 4px;
	min-width: 0;
	overflow: visible;
	white-space: normal;
}
.tssd-game__modebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	border-top: 1px dashed var(--tssd-accent);
	padding-top: 5px;
}
.tssd-game__modepills { display: inline-flex; gap: 4px; }

.tssd-game__modepill {
	border: 1px solid var(--sd-line);
	background: var(--sd-white);
	border-radius: var(--sd-radius-pill);
	padding: 2px 10px;
	cursor: pointer;
	font-weight: var(--sd-btn-weight);
	font-size: var(--sd-fs-xs);
	color: var(--sd-text);
	line-height: 1.5;
}
.tssd-game__modepill:hover,
.tssd-game__modepill:focus-visible { background: var(--sd-surface-2); outline: none; }
.tssd-game__modepill.is-active {
	background: var(--tssd-accent);
	color: var(--sd-gold-ink);
	border-color: var(--sd-gold-line);
}
.tssd-game__dailytools { display: inline-flex; align-items: center; gap: 6px; }
.tssd-game__datepick {
	font: inherit;
	font-size: 0.85em;
	padding: 2px 5px;
	border: 1px solid var(--tssd-line-thin);
	border-radius: var(--sd-radius-sm);
	background: #fff;
}

.tssd-game__padtoggle { margin-top: 10px; }
.tssd-game__padwrap { margin-top: 4px; }

.tssd-game--notesmode .tssd-game__pad {
	outline: 2px solid var(--tssd-accent);
	outline-offset: 3px;
	border-radius: var(--sd-radius);
}
.tssd-game--notesmode .tssd-game__num { color: var(--sd-warn); }
.tssd-game--notesmode .tssd-game__erase { color: inherit; }

@media (hover: none) {
	.tssd-game__klick { color: #c9c9c9; }
	.tssd-game__klick.is-noted { color: var(--sd-warn); }
	.tssd-game__klick--clear { color: var(--sd-warn); }
}

.tssd-game__helplist { margin: 0; }
.tssd-game__helplist dt { margin: 8px 0 2px; display: flex; align-items: center; gap: 8px; }
.tssd-game__helplist dd { margin: 0 0 6px; color: #555; font-size: 0.92em; }

.tssd-game {
	--ico-line: #1d1d1f;   --ico-cell: #ffffff;
	--ico-gold: #f2b60c;   --ico-gold-d: #c98a00;
	--ico-blue: #2f7fd8;   --ico-blue-d: #1b5fa8;
	--ico-red: #d8322a;
	--ico-green: #57b84a;  --ico-green-d: #3f9636;
	--ico-silver: #c6cad1; --ico-silver-d: #868b95;
	--ico-wood: #e0a35a;
}
.tssd-game__helpsym {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}
.tssd-game__helpsym svg { width: 1.55em; height: 1.55em; display: block; }

html[data-theme="dark"] {
	.tssd-game {
		/* Dark board token set (mirrors the light vars at the top of the file). */
		--tssd-bg: #1e2128;        /* board background */
		--tssd-line: #c8ccd2;      /* thick 3×3 grid lines */
		--tssd-line-thin: #454a52; /* thin cell borders */
		--tssd-given: #f2f4f7;
		--tssd-user: #66b2ff;      /* user digits (brighter blue) */
		--tssd-sel: #3a4356;       /* selected cell */
		--tssd-same: #2f3948;      /* same-number highlight */
		--tssd-conflict: #5a2b2b;  /* conflict cell */
		--tssd-accent: #f0ba37;    /* amber accent stays (readable on dark) */
		/* Chrome tokens introduced for dark only (light chrome keeps its literals). */
		--tssd-surface: #2a2e37;   /* buttons / keypad / pills / inputs */
		--tssd-panel: #24272f;     /* headers, modal, foot bands */
		--tssd-text: #e6e8ec;      /* primary text on dark */
		--tssd-muted: #a0a6b0;     /* secondary/hint text */
		color: var(--tssd-text);

		--ico-line: #d7dce6;   --ico-cell: #eef2f8;
		--ico-gold: #f5c63b;   --ico-gold-d: #caa02f;
		--ico-blue: #4b95e6;   --ico-blue-d: #2f7fd8;
		--ico-red: #ff6b6b;
		--ico-green: #63c855;  --ico-green-d: #4aa53f;
		--ico-silver: #aeb4bf; --ico-silver-d: #767c86;
		--ico-wood: #d99f5c;
	}

	/* Interactive chrome surfaces (were #fafafa / #e9e9e9 / #fff). */
	.tssd-game__num,
	.tssd-game__btn,
	.tssd-game__ibtn,
	.tssd-game__day,
	.tssd-game__no,
	.tssd-game__rate-icon,
	.tssd-game__reportpanel,
	.tssd-game__modal-close,
	.tssd-game__modepill,
	.tssd-game__datepick,
	.tssd-game__notefield,
	.tssd-game__reportinput {
		background: var(--tssd-surface);
		color: var(--tssd-text);
		border-color: var(--tssd-line-thin);
	}
	.tssd-game__day:hover:not(:disabled),
	.tssd-game__no:hover:not(:disabled) { background: #343a45; border-color: #7a828d; }

	/* Panels / headers / modal (were #fffdf3 / #fff). */
	.tssd-game__jtop,
	.tssd-game__jhead,
	.tssd-game__jlabel,
	.tssd-game__jfoot,
	.tssd-game__modal,
	.tssd-game__jbody { background: var(--tssd-panel); }
	.tssd-game__modal { color: var(--tssd-text); }
	.tssd-game__jfoot { color: var(--tssd-muted); }

	.tssd-game__notes,
	.tssd-game__klickhint,
	.tssd-game__padhint,
	.tssd-game__sethint,
	.tssd-game__savenote,
	.tssd-game__ilbl,
	.tssd-daily-page__intro,
	.tssd-game__modepill { color: var(--tssd-muted); }
	.tssd-game__saveitem { border-bottom-color: #3a3f48; }

	/* Pencil-mark klicks: brighter red so it reads on the dark board. */
	.tssd-game__klick.is-noted,
	.tssd-game__cell:hover .tssd-game__klick.is-noted,
	.tssd-game__cell:hover .tssd-game__klick--clear { color: #ff6b6b; }
	.tssd-game__cell:hover .tssd-game__klick { color: #6b727d; }

	/* Signup hint (was cream #fffacd). */
	.tssd-game__signuphint {
		background: #3a3420; color: #f0e6c0; border-color: var(--tssd-accent);
	}

	/* Status/notice boxes — keep the semantic hue, darken the fill. */
	.tssd-notice { color: var(--tssd-text); }
	.tssd-notice.is-info    { background: #1c2c40; border-color: #3a5680; color: #bcd4f5; }
	.tssd-notice.is-success { background: #163524; border-color: #2f7a4c; color: #b7e6c6; }
	.tssd-notice.is-warning { background: #3a3216; border-color: #a5842f; color: #f0dca0; }
	.tssd-notice.is-error   { background: #3a1c1a; border-color: #a5453d; color: #f2b8b2; }

	/* Rank badges (light greys/violets → dark equivalents). */
	.tssd-game__rankbadge--casual { background: #2f333b; color: #c8ccd2; border-color: #454a52; }
	.tssd-game__rankbadge--assisted { background: #322a3f; color: #d3bdf0; border-color: #4d3d68; }

	/* The report icon keeps its warning-red but on a dark hover fill. */
	.tssd-game__report-icon:hover,
	.tssd-game__report-icon:focus { background: #3a1c1a; color: #f2b8b2; }
}

.tssd-game-print {
	max-width: 540px;            /* = .tssd-game max-width, fluchtet mit dem Gitter */
	margin: 18px auto 4px;
	padding-top: 14px;
	border-top: 1px solid var(--sd-line);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.tssd-game-print__link {
	min-height: 44px;
}

.tssd-game-print__hint {
	max-width: 46em;
}

.tssd-game-print__nr {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ST8 — die einzeilige Notiz ÜBER der Uhr. Sie darf die Kopfzeile des Bretts nicht
   auseinanderdrücken: eine Zeile, kleine Schrift, kein Kasten. */
.tssd-game__clocknotewrap {
	/* Steht INNERHALB von .tssd-game (540 px) — eine eigene Breite waere eine zweite
	   Wahrheit ueber dieselbe Spalte. */
	margin: 0 0 6px;
}

.tssd-game__clocknote {
	margin: 0;
	font-size: var(--sd-fs-sm);
	color: var(--sd-muted);
}

/* ST8 — der Platz, den die Zeit gehabt hätte. Er steht IM Anmelde-Kasten ganz oben
   und ist dessen Anlass, also etwas kräftiger als der Rest darin. */
.tssd-game__rankoffer {
	margin: 0 0 8px;
	font-weight: 700;
	color: var(--sd-text);
}

.tssd-game__rankoffer[hidden] {
	display: none;
}

.tssd-game__share {
	margin: 12px 0 0;
}

.tssd-game__share[hidden] {
	display: none;
}
