/* Results Desk: built for a phone in bright sunlight at the pitch side. */
.nrd-desk {
	--nrd-ink: #0f1b2d;
	--nrd-muted: #4f5f73;
	--nrd-line: #cfd8e3;
	--nrd-soft: #f2f5f8;
	--nrd-primary: #0b6e4f;
	--nrd-primary-ink: #ffffff;
	--nrd-ok: #067647;
	--nrd-wait: #9a5b00;
	--nrd-alert: #b42318;
	box-sizing: border-box;
	max-width: 640px;
	margin: 0 auto;
	padding: 16px;
	background: #ffffff;
	color: var(--nrd-ink);
	font-size: 17px;
	line-height: 1.45;
}
.nrd-desk *, .nrd-desk *::before, .nrd-desk *::after { box-sizing: inherit; }
.nrd-desk h2 { font-size: 1.5rem; margin: 0 0 .25rem; line-height: 1.2; }
.nrd-desk h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--nrd-muted); margin: 1.75rem 0 .5rem; }
.nrd-desk p { margin: .35rem 0; }
.nrd-desk a { color: var(--nrd-primary); }

.nrd-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.nrd-sub, .nrd-meta, .nrd-league { color: var(--nrd-muted); font-size: .9rem; }
.nrd-empty { color: var(--nrd-muted); font-style: italic; }
.nrd-back { font-weight: 600; text-decoration: none; }

.nrd-notice { padding: 12px 14px; border-radius: 8px; margin: 0 0 16px; font-weight: 600; }
.nrd-notice--ok { background: #e7f6ee; color: var(--nrd-ok); }
.nrd-notice--error { background: #fdecea; color: var(--nrd-alert); }

.nrd-review-banner {
	display: block; margin: 12px 0; padding: 14px 16px; border-radius: 10px;
	background: var(--nrd-ink); color: #fff !important; font-weight: 700; text-decoration: none;
}
.nrd-review-banner::after { content: " \2192"; }

.nrd-match {
	border: 1px solid var(--nrd-line); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; background: #fff;
}
.nrd-teams { font-size: 1.15rem; font-weight: 700; }
.nrd-teams span { font-weight: 400; color: var(--nrd-muted); padding: 0 .2em; }
.nrd-bigscore { font-size: 1.2rem; font-weight: 600; }
.nrd-bigscore strong { font-size: 1.6rem; padding: 0 .3em; white-space: nowrap; }
.nrd-note { background: #fff6e5; border-left: 4px solid var(--nrd-wait); padding: 8px 12px; border-radius: 4px; }

.nrd-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--nrd-soft); color: var(--nrd-muted); }
.nrd-badge--done, .nrd-badge--ok { background: #e7f6ee; color: var(--nrd-ok); }
.nrd-badge--wait { background: #fff1d6; color: var(--nrd-wait); }
.nrd-badge--alert { background: #fdecea; color: var(--nrd-alert); }

.nrd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nrd-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
	border: 2px solid var(--nrd-primary); border-radius: 10px; background: #fff; color: var(--nrd-primary) !important;
	font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.nrd-btn--primary { background: var(--nrd-primary); color: var(--nrd-primary-ink) !important; }
.nrd-btn--wide { width: 100%; margin-top: 16px; }
.nrd-btn[disabled] { opacity: .6; cursor: progress; }

/* Forms */
.nrd-sheet fieldset { border: 1px solid var(--nrd-line); border-radius: 12px; padding: 12px 14px 14px; margin: 16px 0; }
.nrd-sheet legend { font-weight: 700; padding: 0 6px; }
.nrd-field { display: block; margin: 14px 0; }
.nrd-field > span, .nrd-goal label > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.nrd-desk input[type="text"], .nrd-desk input[type="number"], .nrd-desk input[type="date"], .nrd-desk input[type="time"],
.nrd-desk select, .nrd-desk textarea {
	width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--nrd-line); border-radius: 10px;
	background: #fff; color: var(--nrd-ink); font: inherit; font-size: 17px;
}
.nrd-desk input:focus, .nrd-desk select:focus, .nrd-desk textarea:focus { outline: 3px solid #8fd3b9; border-color: var(--nrd-primary); }
.nrd-desk input[type="file"] { width: 100%; font-size: 16px; }
.nrd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.nrd-score { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nrd-score__team { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.nrd-score__team span { min-height: 2.6em; display: flex; align-items: flex-end; }
.nrd-score input[type="number"] { font-size: 2.5rem; font-weight: 800; text-align: center; min-height: 72px; }
.nrd-so { margin: 8px 0 16px; }
.nrd-so summary, .nrd-sendback summary { cursor: pointer; font-weight: 600; color: var(--nrd-primary); min-height: 44px; display: flex; align-items: center; }

.nrd-count { font-weight: 600; font-size: .85rem; margin-left: 6px; color: var(--nrd-muted); }
.nrd-count.is-done { color: var(--nrd-ok); }
.nrd-count.is-over { color: var(--nrd-alert); }

.nrd-goal {
	position: relative; display: grid; gap: 8px; padding: 12px 44px 12px 12px; margin: 0 0 10px;
	background: var(--nrd-soft); border-radius: 10px;
}
.nrd-remove {
	position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: #fff; color: var(--nrd-alert); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.nrd-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.nrd-check input { width: 22px; height: 22px; }

.nrd-photo img, .nrd-card { display: block; width: 100%; height: auto; border-radius: 10px; margin: 10px 0; border: 1px solid var(--nrd-line); }
.nrd-share { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px !important; }
.nrd-review form { margin: 0; }

.nrd-desk form#loginform p { margin: 12px 0; }
.nrd-desk #loginform input[type="text"], .nrd-desk #loginform input[type="password"] { width: 100%; min-height: 48px; font-size: 17px; }
.nrd-desk #loginform input[type="submit"] { min-height: 48px; padding: 0 24px; font-weight: 700; }

/* Match photos and notes (v0.6). */
.nrd-photos { border: 1px solid var(--nrd-line); border-radius: 10px; padding: 10px 14px 12px; margin: 14px 0; }
.nrd-photos legend { font-weight: 600; padding: 0 4px; }
.nrd-help { font-size: .9rem; color: #4a5160; margin: 6px 0; }
.nrd-photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.nrd-photo-add { display: inline-flex; align-items: center; justify-content: center; margin: 8px 0 4px; cursor: pointer; }
.nrd-photo-sent li:has(input:checked) img { opacity: .35; }
.nrd-photo-add.is-off { opacity: .45; pointer-events: none; }
.nrd-photos:focus-within .nrd-photo-add { outline: 3px solid #f2a900; outline-offset: 2px; }
.nrd-photo-list { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nrd-photo-list li { margin: 0; }
.nrd-photo-list img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--nrd-line); }
.nrd-photo-remove { display: block; width: 100%; margin-top: 4px; min-height: 36px; font: inherit; font-size: .85rem; font-weight: 600; border: 1px solid var(--nrd-line); border-radius: 6px; background: #fff; color: #b42318; cursor: pointer; }
.nrd-photo-sent .nrd-check { font-size: .85rem; margin-top: 4px; }
.nrd-photo-how { font-size: .85rem; }
.nrd-photo-status { font-weight: 600; margin: 4px 0 0; }
.nrd-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.nrd-pick { border: 1px solid var(--nrd-line); border-radius: 8px; padding: 6px; }
.nrd-pick img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.nrd-pick .nrd-check { min-height: 36px; font-size: .95rem; }

/* Cricket and tennis sheets (0.8). */
.nrd-row--3 { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
.nrd-row--3 .nrd-field { margin: 6px 0; }
.nrd-check--inline { min-height: 48px; }
.nrd-innings input, .nrd-set input { font-size: 1.4rem; font-weight: 700; text-align: center; }
.nrd-perf { border-top: 1px solid #e3e6eb; padding: 8px 0; }
.nrd-perf:first-of-type { border-top: 0; }
.nrd-pick-player { display: block; }
.nrd-pick-player > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.nrd-pick-player + .nrd-new-player { margin-top: 6px; }
.nrd-set { display: grid; grid-template-columns: 4.2rem 1fr 1fr 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.nrd-set--head span { font-size: .8rem; font-weight: 600; line-height: 1.2; text-align: center; overflow-wrap: break-word; }
.nrd-set > span:first-child { font-weight: 600; font-size: .9rem; text-align: left; }
.nrd-more-sets { margin: 8px 0; }
.nrd-more-sets summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.nrd-finish select, .nrd-tennis select { width: 100%; }
[data-show-when][hidden] { display: none !important; }
.nrd-check input { flex: 0 0 auto; }
.nrd-cricket .nrd-row { grid-template-columns: 7.5rem 1fr; }

/* Other platforms (0.11). */
.nrd-sharekit { margin: 18px 0; border: 1px solid #dde1e7; border-radius: 8px; padding: 10px 14px; background: #fff; }
.nrd-sharekit summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
.nrd-sharekit textarea { width: 100%; font: inherit; font-size: .9rem; }
.nrd-sharecard[hidden] { display: none; }
