:root {
	--ndtgh-green: var(--ndtcc-primary, #164b2b);
	--ndtgh-green-dark: #103c26;
	--ndtgh-canvas: #fafaf7;
	--ndtgh-mist: #e8eee9;
	--ndtgh-line: #d7ddd8;
	--ndtgh-text: #17221b;
	--ndtgh-yellow: #f0c900;
	--ndtgh-blue: #2b55a4;
	--ndtgh-red: #bf2d32;
	--ndtgh-orange: #ef711f;
}

.ndtgh-course-guide,
.ndtgh-scorecard-print-scope,
.ndtgh-slope,
.ndtgh-hole-detail {
	color: var(--ndtgh-text);
	font-family: var(--ndtcc-body-font, "Source Sans 3", sans-serif);
}

.ndtgh-hole-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
}

.ndtgh-course-guide[data-columns="5"] .ndtgh-hole-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ndtgh-course-guide[data-columns="4"] .ndtgh-hole-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ndtgh-course-guide[data-columns="3"] .ndtgh-hole-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ndtgh-course-guide[data-columns="2"] .ndtgh-hole-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ndtgh-hole-card-wrap {
	border: 1px solid var(--ndtgh-line);
	background: #fff;
	min-width: 0;
}

.ndtgh-hole-card {
	display: flex;
	min-height: 100%;
	color: var(--ndtgh-text);
	text-decoration: none;
	flex-direction: column;
	outline-offset: 3px;
}

.ndtgh-hole-card:hover,
.ndtgh-hole-card:focus-visible {
	box-shadow: 0 8px 22px rgb(16 60 38 / 12%);
	transform: translateY(-2px);
}

.ndtgh-hole-card:focus-visible,
.ndtgh-button:focus-visible,
.ndtgh-dialog button:focus-visible,
.ndtgh-slope-tabs button:focus-visible {
	outline: 3px solid #f3c84b;
	outline-offset: 3px;
}

.ndtgh-hole-number {
	background: var(--ndtgh-green-dark);
	color: #fff;
	font-family: var(--ndtcc-heading-font, Manrope, sans-serif);
	font-size: 1rem;
	font-weight: 750;
	letter-spacing: .03em;
	padding: 9px 12px;
}

.ndtgh-hole-card img {
	width: 100%;
	height: 116px;
	object-fit: contain;
	background: #f5f7f4;
	padding: 7px;
}

.ndtgh-hole-meta {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 11px 12px 7px;
	font-size: .9rem;
}

.ndtgh-card-distances {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 5px 8px;
	padding: 0 12px 10px;
	font-size: .82rem;
}

.ndtgh-card-distances > span,
.ndtgh-detail-distances > span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.ndtgh-tee-dot {
	display: inline-block;
	width: 11px;
	height: 11px;
	border: 1px solid rgb(0 0 0 / 18%);
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 11px;
}

.ndtgh-tee-yellow,
.ndtgh-row-yellow .ndtgh-tee-dot { color: var(--ndtgh-yellow); }
.ndtgh-tee-blue,
.ndtgh-row-blue .ndtgh-tee-dot { color: var(--ndtgh-blue); }
.ndtgh-tee-red,
.ndtgh-row-red .ndtgh-tee-dot { color: var(--ndtgh-red); }
.ndtgh-tee-orange,
.ndtgh-row-orange .ndtgh-tee-dot { color: var(--ndtgh-orange); }

.ndtgh-open-label {
	margin-top: auto;
	border-top: 1px solid var(--ndtgh-line);
	color: var(--ndtgh-green);
	font-size: .78rem;
	font-weight: 700;
	padding: 9px 12px;
}

.ndtgh-dialog-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	background: rgb(5 18 11 / 78%);
	padding: 24px;
}

.ndtgh-dialog-backdrop[hidden] { display: none; }

.ndtgh-dialog {
	position: relative;
	width: min(980px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: var(--ndtgh-canvas);
	box-shadow: 0 24px 70px rgb(0 0 0 / 35%);
}

.ndtgh-dialog-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 1px solid rgb(255 255 255 / 65%);
	border-radius: 0;
	background: var(--ndtgh-green-dark);
	color: #fff;
	font-size: 1.8rem;
	cursor: pointer;
}

.ndtgh-dialog-content {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.ndtgh-dialog-media {
	min-height: 520px;
	background: #e4e9e3;
}

.ndtgh-dialog-media > img {
	display: block;
	width: 100%;
	height: 520px;
	object-fit: contain;
	padding: 24px;
}

.ndtgh-dialog-body { padding: 54px 42px 32px; }
.ndtgh-dialog-kicker { color: var(--ndtgh-green); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ndtgh-dialog-body h2 { margin: 7px 0; color: var(--ndtgh-green-dark); font-family: var(--ndtcc-heading-font, Manrope, sans-serif); font-size: clamp(1.8rem, 4vw, 3rem); }
.ndtgh-dialog-meta { font-weight: 700; }

.ndtgh-detail-distances {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 18px;
	margin: 20px 0;
}

.ndtgh-detail-distances > span { border-bottom: 1px solid var(--ndtgh-line); padding: 8px 0; }
.ndtgh-detail-distances strong { margin-right: auto; }

.ndtgh-pro-tip {
	border-left: 4px solid var(--ndtgh-green);
	background: var(--ndtgh-mist);
	padding: 14px 18px;
	margin: 18px 0;
}

.ndtgh-pro-tip p { margin: 5px 0 0; }

.ndtgh-button,
.ndtgh-dialog-nav button,
.ndtgh-slope-tabs button {
	min-height: 44px;
	border: 1px solid var(--ndtgh-green);
	border-radius: 0;
	background: var(--ndtgh-green);
	color: #fff;
	font: inherit;
	font-weight: 750;
	padding: 11px 18px;
	cursor: pointer;
}

.ndtgh-dialog-nav {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	border-top: 1px solid var(--ndtgh-line);
	padding: 14px 18px;
}

.ndtgh-dialog-nav button { background: transparent; color: var(--ndtgh-green); }
body.ndtgh-dialog-open { overflow: hidden; }

.ndtgh-video-slot iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

.ndtgh-dialog-media .ndtgh-video-slot:not(:empty) + img,
.ndtgh-dialog-media.is-playing > img { display: none; }

.ndtgh-print-heading { display: none; }
.ndtgh-table-scroll { overflow-x: auto; border: 1px solid var(--ndtgh-line); background: #fff; }

.ndtgh-scorecard {
	width: 100%;
	min-width: 1160px;
	border-collapse: collapse;
	font-size: .82rem;
}

.ndtgh-scorecard caption {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ndtgh-scorecard th,
.ndtgh-scorecard td {
	border: 1px solid var(--ndtgh-line);
	text-align: center;
	padding: 8px 6px;
}

.ndtgh-scorecard thead th { background: var(--ndtgh-green-dark); color: #fff; }
.ndtgh-scorecard tbody th { text-align: left; white-space: nowrap; }
.ndtgh-scorecard tbody th .ndtgh-tee-dot { margin-right: 7px; }
.ndtgh-total-cell { font-weight: 800; background: var(--ndtgh-mist); }
.ndtgh-print-button { margin-top: 16px; }

.ndtgh-slope-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 14px;
}

.ndtgh-slope-tabs button[aria-selected="false"] { background: #fff; color: var(--ndtgh-green); }
.ndtgh-slope-panel { border: 1px solid var(--ndtgh-line); background: #fff; padding: 18px; }
.ndtgh-slope-panel[hidden] { display: none; }
.ndtgh-slope-panel h3 { margin-top: 0; color: var(--ndtgh-green-dark); }
.ndtgh-slope-panel img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: contain; }
.ndtgh-slope-panel[data-slope-panel="all"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ndtgh-slope-panel[data-slope-panel="all"][hidden] { display: none; }

.ndtgh-hole-detail { max-width: 1100px; margin: 0 auto; }
.ndtgh-detail-summary { display: flex; justify-content: space-between; gap: 16px; background: var(--ndtgh-green-dark); color: #fff; padding: 14px 18px; }
.ndtgh-detail-image { display: block; width: 100%; max-height: 720px; object-fit: contain; background: #f4f6f3; }
.ndtgh-empty { border-left: 4px solid var(--ndtgh-green); background: var(--ndtgh-mist); padding: 14px 18px; }

@media (max-width: 1024px) {
	.ndtgh-hole-grid,
	.ndtgh-course-guide[data-columns] .ndtgh-hole-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ndtgh-dialog-content { grid-template-columns: 1fr 1fr; }
	.ndtgh-dialog-media,
	.ndtgh-dialog-media > img { min-height: 440px; height: 440px; }
}

@media (max-width: 700px) {
	.ndtgh-hole-grid,
	.ndtgh-course-guide[data-columns] .ndtgh-hole-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ndtgh-hole-card img { height: 102px; }
	.ndtgh-dialog-backdrop { padding: 0; align-items: end; }
	.ndtgh-dialog { width: 100%; max-height: 96vh; }
	.ndtgh-dialog-content { display: block; }
	.ndtgh-dialog-media,
	.ndtgh-dialog-media > img { min-height: 0; height: 300px; }
	.ndtgh-dialog-body { padding: 28px 20px 22px; }
	.ndtgh-dialog-close { position: fixed; }
	.ndtgh-detail-distances { grid-template-columns: 1fr 1fr; }
	.ndtgh-slope-tabs { grid-template-columns: 1fr; }
	.ndtgh-slope-panel[data-slope-panel="all"] { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
	.ndtgh-hole-grid,
	.ndtgh-course-guide[data-columns] .ndtgh-hole-grid { grid-template-columns: 1fr; }
	.ndtgh-hole-card img { height: 150px; }
}

@media (prefers-reduced-motion: no-preference) {
	.ndtgh-hole-card { transition: transform .16s ease, box-shadow .16s ease; }
}

@media print {
	@page { size: A4 landscape; margin: 10mm; }
	body.ndtgh-print-scorecard * { visibility: hidden; }
	body.ndtgh-print-scorecard .ndtgh-scorecard-print-scope,
	body.ndtgh-print-scorecard .ndtgh-scorecard-print-scope * { visibility: visible; }
	body.ndtgh-print-scorecard .ndtgh-scorecard-print-scope { position: absolute; inset: 0 auto auto 0; width: 100%; background: #fff; color: #000; }
	.ndtgh-print-heading { display: flex; justify-content: space-between; font-size: 13pt; margin-bottom: 6mm; }
	.ndtgh-table-scroll { overflow: visible; border-color: #000; }
	.ndtgh-scorecard { min-width: 0; font-size: 7.6pt; }
	.ndtgh-scorecard th,
	.ndtgh-scorecard td { border-color: #000; padding: 2.2mm 1.2mm; color: #000; }
	.ndtgh-scorecard thead th { background: #fff; color: #000; }
	.ndtgh-total-cell { background: #eee; }
	.ndtgh-print-button { display: none; }
}
