body {
	font-family: 'Segoe UI', system-ui, sans-serif;
	background-color: #f8fafc; /* Soft, light grey-blue backdrop */
	color: #334155; /* Dark slate text for sharp readability */
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;
	margin: 0;
	padding: 12px;
	box-sizing: border-box;
}
.main-wrapper {
	display: flex;
	max-width: 720px; 
	width: 100%;
	justify-content: center;
}
.card-container {
	background-color: #ffffff; /* Clean white canvas card base */
	border: 1px solid #e2e8f0; /* Crisp slate-tint borders */
	box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
	border-radius: 16px;
	padding: 24px;
	box-sizing: border-box;
}
.header-section {
	text-align: center;
}
.team-top-input {
	width: 111%;
	border: 1px solid transparent;
	font-family: inherit;
	text-align: center;
	font-size: 32px;
	font-weight: 800;
	text-transform: uppercase;
	color: #0f172a; /* Rich dark primary headline */
	background: transparent;
	outline: none;
	border-radius: 6px;
}
.team-left-input {
	transform: rotate(-90deg);
	width: 350px;
	background: transparent;
	border: none;
	font-family: inherit;
	font-size: 32px;
	font-weight: 800;
	color: #0f172a;
	text-align: center;
	outline: none;
	text-transform: uppercase;
	border-radius: 6px;
}
.team-top-input:focus {
	background: #f1f5f9;
	border-color: #cbd5e1; 
}
.top-dashboard {
	display: flex;
	background: linear-gradient(135deg, #e2e8f0 0%, #e2e8f0 100%);
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px;
	gap: 16px;
	align-items: center;
	margin-bottom: 4px;
}
.cost-badge {
	border-right: 1px solid #e2e8f0;
	padding-right: 16px;
	text-align: center;
	min-width: 100px;
}
.badge-title {
	font-size: 11px;
	font-weight: 800;
	color: #2563eb; /* Vibrant royal blue accent */
	letter-spacing: 1.5px;
	margin-bottom: 2px;
	text-transform: uppercase;
}
.badge-value {
	font-size: 20px;
	font-weight: 800;
	color: #0284c7; /* Sky blue value text */
	background: transparent;
	border: none;
	text-align: center;
	width: 100%;
	outline: none;
}
.payout-grid {
	display: flex;
	flex-wrap: wrap;
	flex-grow: 1;
	gap: 12px;
}
.payout-item {
	flex: 1;
	display: grid;
	flex-direction: column;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
}
.payout-label {
	font-size: 9px;
	font-weight: 800;
	color: #64748b;
	margin-bottom: 2px;
	text-align: center;
}
.payout-input {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #15803d; /* Smooth leaf green instead of harsh neon */
	font-weight: 700;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
	padding: 1px;
	border-radius: 6px;
	outline: none;
	text-align: center;
}
.payout-input:focus {
	border-color: #16a34a;
}
.payout-input:disabled, .badge-value:disabled {
	background: transparent;
	border-color: transparent;
	color: inherit;
}
.amusement-text {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 2px;
	text-align: center;
	margin: 10px 0;
	color: #94a3b8;
}
.grid-scroll-viewport {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 8px;
}
.grid-wrapper {
	display: grid;
	grid-template-columns: 44px repeat(10, minmax(56px, 1fr));
	gap: 4px;
	position: relative;
	min-width: 600px;
}
.grid-cell {
	background-color: #f1f5f9; /* Soft grid cell boxes */
	border: 1px solid #cbd5e1;
	aspect-ratio: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.15s ease;
}
.grid-cell:hover:not(.header-cell):not(.taken-cell) {
	background-color: #e2e8f0;
	border-color: #cbd5e1;
}
.header-cell {
	background-color: #ffffff;
	border: 0px solid #e2e8f0;
	box-sizing: border-box;
	font-weight: 800;
	color: #16a34a;
	cursor: default;
	font-size: 28px;
	margin-top: 0px;
	height: 55px;
}
.axis-label-cell {
	background-color: transparent;
	border: none;
	cursor: default;
}
.square-id {
	font-size: 9px;
	color: #0f172a;
	position: absolute;
	top: 2px;
	left: 4px;
}
.grid-cell.paid-cell {
	background-color: rgba(16, 185, 129, 0.15) !important;
	border-color: #10b981 !important;
	box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.2);
	color: #0f172a;
}
.player-initials {
	font-size: 12px;
	font-weight: 700;

	text-align: center;
	max-width: 90%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.taken-cell {
	background-color: #ff1010;);
	color: #ffffff;
}
.mask-overlay {
	position: absolute;
	background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 6px, #e2e8f0 6px, #e2e8f0 12px);
	z-index: 5;
	color: #475569;
	font-size: 24px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 1px;
}
.top-mask {
	top: 0;
	left: 48px;
	width: calc(100% - 48px);
	height: 52px;
	border-radius:
	4px; min-width:
	560px;
}
.left-mask { 
	top: 56px; 
	left: 0; 
	width: 44px; 
	height: calc(100% - 82px);
	border-radius: 4px; 
	writing-mode: tb;
	writing-mode: sideways-lr;
	text-orientation: mixed;
	letter-spacing: 4px; 
	text-transform: uppercase;
}
.mask-hidden {
	display: none !important;
}
.hidden-controls {
	display: none !important;
}
@media (max-width: 480px) {
.top-dashboard {
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}
.cost-badge {
	border-right: none;
	border-bottom: 1px solid #e2e8f0;
	padding-right: 0;
	padding-bottom: 8px;
}
}
.pgtooltip3 {	
	cursor: pointer;
	font-weight: 300;
}
.pgtooltip3::after {
	content: attr(data-tooltip);
	position: absolute;
	top: 125%;
	left: 50%;
	transform: translateX(-50%) scale(0.9);
	background-color: #1f2937;
	color: #ffffff;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 18px;
	white-space: normal;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 100;
	width: 300px;
	text-align: center;
}
.pgtooltip3::before {
    content: "";
    position: absolute;
    top: 110%;
    left: 50%;    
    transform: translateX(-50%) scale(0.9);
    border-width: 6px;
    border-style: solid;    
    border-color: transparent transparent #1f2937 transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease; /* Synchronized the transition track */
    z-index: 100;
}
.pgtooltip3:hover::after, .pgtooltip:hover::before {
	opacity: 1;
    transform: translateX(-50%) scale(1);
}
.pgtooltip3:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1); /* Smoothly matches the scale profile of the bubble */
}
.pgtooltip2 {
	position: relative;
	cursor: pointer;
	font-weight: 300;
}
.pgtooltip2::after {
	content: attr(data-tooltip);
	position: absolute;
	top: 125%;
	left: 50%;
	transform: translateX(-50%) scale(0.9);
	background-color: #1f2937;
	color: #ffffff;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 18px;
	white-space: normal;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 100;
	width: 300px;
	text-align: center;
}
.pgtooltip2::before {
    content: "";
    position: absolute;
    top: 110%;
    left: 50%;    
    transform: translateX(-50%) scale(0.9);
    border-width: 6px;
    border-style: solid;    
    border-color: transparent transparent #1f2937 transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease; /* Synchronized the transition track */
    z-index: 100;
}
.pgtooltip2:hover::after, .pgtooltip:hover::before {
	opacity: 1;
    transform: translateX(-50%) scale(1);
}
.pgtooltip2:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1); /* Smoothly matches the scale profile of the bubble */
}
.pgtooltip {
    position: relative;    
    cursor: pointer;
	display: inline-block;
    font-weight: 300;
}
.pgtooltip::after {
	content: attr(data-tooltip);
	position: absolute;
	top: 125%;
	left: 50%;
	transform: translateX(-50%) scale(0.9);
	background-color: #1f2937;
	color: #ffffff;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 18px;
	white-space: normal;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 100;
	width: 300px;
	text-align: center;
}
.pgtooltip::before {
    content: "";
    position: absolute;
    top: 110%;
    left: 50%;
    /* Added scale(0.9) to match the starting state animation profile of your bubble */
    transform: translateX(-50%) scale(0.9);
    border-width: 6px;
    border-style: solid;
    /* CHANGED: Swapped #333333 for #1f2937 so the triangle color blends smoothly into your bubble */
    border-color: transparent transparent #1f2937 transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease; /* Synchronized the transition track */
    z-index: 100;
}
.pgtooltip:hover::after, .pgtooltip:hover::before {
	opacity: 1;
    transform: translateX(-50%) scale(1);
}
.pgtooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1); /* Smoothly matches the scale profile of the bubble */
}
[data-title] {
	position: relative;
}
[data-title]:hover::after {
	content: attr(data-title);
	position: absolute;
	bottom: 110%;
	left: 50%;
	transform: translateX(-10%);
	background-color: #1f2937;
	color: #ffffff;
	font-size: 18px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid #374151;
	white-space: nowrap;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
	z-index: 99;
	opacity: 0;
	animation: tooltipFadeIn 0.2s ease forwards;
	pointer-events: none;
}
[data-title].tooltip-right-edge:hover::after {
	left: auto;
	right: 0%;
	transform: translateX(0%);
}
@keyframes tooltipFadeIn {
	to {
	opacity: 1;
	bottom: 120%;
	}
}
@keyframes tooltipFadeIn {
	to {
	opacity: 1;
	bottom: 120%; /* Subtle floating lift effect */
	}
}
textarea#notesInput {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 13px;
	border: 1px solid #334155;
	border-radius: 8px;
	padding: 10px;
	resize: none;
	background: #fff !important;
	color: #334155;
	margin-top: 6px;
}
textarea#notesInput:focus {
	border-color: #3b82f6;
	outline: none;
}
textarea#notesInput:disabled {
	border: none;
	padding: 8px 0;
	background: transparent !important;
	color: #9ca3af;
}
.action-btn {
	flex: 1;
	background-color: #374151;
	color: #fff;
	border: 1px solid #4b5563;
	padding: 10px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border-radius: 8px;
	transition: background-color 0.2s;
}
.disclaimer {
	margin-top: 70px;
	text-align: center;
	font-size: 12px;
}

@media print {
.main-wrapper, .card-container {
	width: 97% !important;
	max-width: 97% !important;
	min-width: 97% !important;
	box-shadow: none !important;
	border: none !important;
	background: #fff !important;
	padding: 3px !important;
	margin: 3px !important;
}
.top-dashboard {
	display: flex !important;
	background: #fff !important;
	border: 1px solid #374151 !important;
	padding: 8px !important;
	margin-bottom: 4px !important;
}
.payout-input {
	background: #fff !important;
	border: 1px solid #374151 !important;
	color: #111827 !important;
	font-weight: 700 !important;
}
.badge-value {
	color: #0f172a !important;
	font-weight: 800 !important;
}
.badge-title, .payout-label {
	color: #4b5563 !important;
}
.grid-scroll-viewport {
	overflow: visible !important;
	width: 100% !important;
	height: auto !important;
}
textarea#notesInput {
	padding: 0px!important;
	border: 0px solid #374151!important;
}
.grid-wrapper {
	width: 100% !important;
	min-width: 100% !important;
	display: grid !important;
	grid-template-columns: 44px repeat(10, 1fr) !important; 
	gap: 2px !important;
}
.grid-cell:not(.header-cell):not(.axis-label-cell) {
	display: grid !important;
	grid-template-rows: auto 1fr !important; 
	align-items: stretch !important;
	justify-content: stretch !important;
	border: 1px solid #374151 !important;
	background-color: #fff !important;
	aspect-ratio: auto !important; 	
	height: 48px !important; 
	padding: 2px !important;
	box-sizing: border-box !important;
}
.square-id {
	position: static !important;
	font-size: 7px !important;
	color: #6b7280 !important;
	text-align: left !important;
	line-height: 1 !important;
	margin-bottom: 1px !important;
}
.player-initials {
	color: #0b0f19;
	display: flex !important;
	align-items: center !important; 
	justify-content: center !important; 
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	font-size: 14px !important; 
	font-weight: 700 !important;
	background: transparent !important;
	box-sizing: border-box !important;
	text-align: center !important;
}
.header-cell {
	color: #000 !important;
	font-weight: 800 !important;
	font-size: 22px !important; 
	margin-top: 0px !important;
	border: none !important; 
	background: transparent !important;
	box-shadow: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	width: 100% !important;
	height: 36px !important; 
	line-height: 36px !important;	
}
.top-mask, .left-mask {
	border: 1px solid #374151 !important;
	font-weight: 700 !important;
}
.left-mask {
	height: calc(100% - 58px) !important;
	width: 4% !important;
}
.top-mask {
	height: 7% !important;
}
.axis-label-cell {
	border: 0px solid #fff !important;
	background: transparent !important;
}
.team-top-input {		
	color: #0b0f19;
	background: transparent !important;
	border: none !important;
	font-size: 24px !important;
	margin: 4px 0 !important;
}
.team-left-input, #teamLeft {
	color: #0b0f19;
	background: transparent !important;
	border: none !important;
	font-size: 22px !important;
}
header, footer, nav, .no-print, .btn-container, button, .lock-btn, #adminPanel {
	display: none !important;
}
.disclaimer {
	margin-top: 0px!important;
	text-align: center!important;
	font-size: 12px!important;
}
.grid-cell.paid-cell {
	background-color: #d1fae5 !important;
	border: 1px solid #10b981 !important;
}