/* itch.io layout: one wooden TV set, picture tube on the left, the controls on the right.
   Everything is laid out at 1360 x 600 and scaled to fit the game window by itch.js. */

html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: #120c10; }

.fit { position: fixed; inset: 0; background: #120c10; }
.cabinet-scale { position: absolute; width: 1360px; height: 600px; transform-origin: 0 0; }

.cabinet {
	position: relative;
	width: 1360px;
	height: 600px;
	display: flex;
	gap: 18px;
	padding: 22px;
	border-radius: 34px;
	background:
		repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.05) 0 3px, transparent 3px 11px),
		linear-gradient(160deg, #94603a, #7a4b2c 42%, #5a341d);
	box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), inset 0 -6px 0 rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.6);
	transition: box-shadow 0.4s;
}
.cabinet.directing { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.16), inset 0 -6px 0 rgba(0, 0, 0, 0.25), 0 0 0 5px var(--gold), 0 10px 30px rgba(0, 0, 0, 0.6); }

/* the picture tube */
.tube {
	flex: 0 0 auto;
	width: 988px;
	height: 556px;
	padding: 10px;
	border-radius: 30px;
	background: linear-gradient(145deg, #2a1d16, #120c09);
	box-shadow: inset 0 0 0 3px #3d2a1f, inset 0 6px 14px rgba(0, 0, 0, 0.7);
}
.tube .screen {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	border-radius: 24px;
	box-shadow: inset 0 0 0 4px #0b0806;
}
.tube .screen::after {
	border-radius: 24px;
	background:
		radial-gradient(ellipse at 30% 18%, rgba(255, 255, 255, 0.07), transparent 40%),
		radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.4));
}
.tune-logo { font-size: 50px; }
.tune-card p { font-size: 17px; }

/* the control side */
.controls {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 556px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dials {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 16px;
	background: rgba(0, 0, 0, 0.18);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}
.dial {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	border: 0;
	background: none;
	color: #f2e3c4;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
}
.dial i {
	position: relative;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #efe0c0, #8c7553 70%, #5d4a31);
	box-shadow: 0 3px 4px rgba(0, 0, 0, 0.45), inset 0 -2px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.25s;
}
.dial i::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 4px;
	width: 4px;
	height: 11px;
	margin-left: -2px;
	border-radius: 2px;
	background: #3a2a18;
}
.dial span {
	max-width: 58px;
	line-height: 1.15;
	text-align: center;
}
.dial:hover i { transform: rotate(35deg); }
.dial:active i { transform: rotate(80deg); }

/* the "now playing" readout looks like a lit channel display */
.readout {
	padding: 10px 14px 11px;
	border-radius: 14px;
	background: linear-gradient(180deg, #1d2a24, #121b17);
	box-shadow: inset 0 0 0 2px #0a100d, inset 0 0 18px rgba(80, 220, 150, 0.12);
	color: #bff5d4;
}
.readout-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.readout .badge { font-size: 11px; padding: 3px 9px; }
.readout .viewers { color: #8fd3ad; font-size: 12px; display: inline; }
.readout .story-title { font-size: 18px; color: #e9ffef; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout-line { display: flex; gap: 10px; font-size: 13px; min-height: 1.2em; }
.readout .beat { color: #7fe0b0; }
.readout .set-name { color: #a9cdb9; margin: 0; font-size: 13px; }
.readout .mode-text { margin-top: 3px; font-size: 12px; color: #86b39a; line-height: 1.3; }

/* the Director's Chair fills the rest of the height and scrolls inside itself */
.controls .chair {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 0;
	border-radius: 14px;
}
.controls .clapper { margin: 0; padding: 9px 14px; flex: 0 0 auto; }
.controls .clapper span { font-size: 14px; }
.chair-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 12px 14px 14px;
	scrollbar-width: thin;
	scrollbar-color: #c9a87a transparent;
}
.chair-body::-webkit-scrollbar { width: 8px; }
.chair-body::-webkit-scrollbar-thumb { background: #c9a87a; border-radius: 4px; }
.controls .chair-status { font-size: 14px; }
.controls .how li { font-size: 13px; padding-bottom: 8px; }
.controls .how li b { font-size: 14px; }
.controls .pick { font-size: 12px; padding: 4px 9px; }
.controls .step-label { margin: 10px 0 5px; font-size: 13px; }
.controls textarea, .controls input[type="text"] { font-size: 15px; }
.controls .examples .chip { font-size: 12px; }
.controls .rules-cols { grid-template-columns: 1fr; }

/* messages appear over the dials and readout, never over the picture */
.controls .toasts {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: auto;
	width: auto;
	transform: none;
	align-items: stretch;
	gap: 6px;
}
.controls .toast { font-size: 13px; padding: 9px 12px; }

/* keep the name box and Get in Line button in view while the steps above them scroll */
.controls #joinArea {
	position: sticky;
	bottom: -14px;
	margin: 0 -14px -14px;
	padding: 10px 14px 14px;
	background: var(--card);
	box-shadow: 0 -8px 12px -8px rgba(60, 40, 20, 0.25);
}
.controls #joinArea .btn { margin-top: 8px; }
.controls .how { margin-bottom: 10px; }
.controls .how li { padding-bottom: 6px; line-height: 1.3; }
