:root {
	--remote-bg: #0b1113;
	--remote-surface: #152024;
	--remote-surface-strong: #1d2a2e;
	--remote-border: rgba(159, 196, 188, 0.24);
	--remote-text: #f1f7f5;
	--remote-muted: #a9bbb6;
	--remote-gold: #ffd166;
	--remote-green: #79dfa8;
	--remote-coral: #ff9e7a;
	--remote-red: #ff8383;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

body {
	margin: 0;
	background: var(--remote-bg);
	color: var(--remote-text);
	font-family: Arial, sans-serif;
	letter-spacing: 0;
}

.remote-shell [hidden] {
	display: none;
}

button,
input {
	font: inherit;
	letter-spacing: 0;
}

button {
	touch-action: manipulation;
}

.remote-shell {
	width: min(100%, 820px);
	min-height: 100vh;
	margin: 0 auto;
	padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.remote-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 58px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--remote-border);
}

.remote-header > div {
	display: grid;
	gap: 3px;
}

.remote-brand {
	color: var(--remote-text);
	font-size: 20px;
	font-weight: 800;
	text-decoration: none;
}

.remote-product {
	color: var(--remote-gold);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.remote-text-button {
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid var(--remote-border);
	border-radius: 8px;
	background: transparent;
	color: var(--remote-muted);
	cursor: pointer;
}

.remote-pairing-view {
	display: grid;
	gap: 24px;
	width: min(100%, 460px);
	margin: 10vh auto 0;
}

.remote-pairing-copy {
	display: grid;
	gap: 9px;
}

.remote-kicker {
	margin: 0;
	color: var(--remote-gold);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.remote-pairing-copy h1,
.remote-control-section h1,
.remote-control-section h2 {
	margin: 0;
}

.remote-pairing-copy h1 {
	font-size: 36px;
}

.remote-pairing-copy p:last-child {
	margin: 0;
	color: var(--remote-muted);
	line-height: 1.5;
}

.remote-pairing-form {
	display: grid;
	gap: 10px;
	padding: 18px;
	border: 1px solid var(--remote-border);
	border-radius: 8px;
	background: var(--remote-surface);
}

.remote-pairing-form label {
	margin-top: 4px;
	color: var(--remote-muted);
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
}

.remote-pairing-form input {
	width: 100%;
	min-height: 50px;
	padding: 10px 12px;
	border: 1px solid var(--remote-border);
	border-radius: 8px;
	background: #0e171a;
	color: var(--remote-text);
	font-size: 18px;
}

#remotePairingCode {
	font-family: Consolas, Monaco, monospace;
	font-size: 24px;
	font-weight: 800;
	text-transform: uppercase;
}

.remote-primary-button {
	min-height: 52px;
	margin-top: 8px;
	border: 1px solid #cfa74d;
	border-radius: 8px;
	background: var(--remote-gold);
	color: #251b04;
	font-weight: 800;
	cursor: pointer;
}

.remote-primary-button:disabled,
.remote-launch-card button:disabled,
.remote-pattern-button:disabled {
	cursor: not-allowed;
	opacity: 0.42;
}

.remote-status-line {
	min-height: 20px;
	margin: 0;
	color: var(--remote-muted);
	font-size: 13px;
}

.remote-control-view {
	display: grid;
	gap: 26px;
	padding-top: 18px;
}

.remote-workspace-band {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
}

.remote-workspace-band > div {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.remote-workspace-band strong {
	overflow-wrap: anywhere;
	font-size: 17px;
}

.remote-connection-badge {
	flex: 0 0 auto;
	padding: 7px 10px;
	border: 1px solid var(--remote-border);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
}

.remote-connection-badge.is-online {
	border-color: rgba(121, 223, 168, 0.44);
	color: var(--remote-green);
}

.remote-connection-badge.is-offline {
	border-color: rgba(255, 131, 131, 0.4);
	color: var(--remote-red);
}

.remote-control-section {
	display: grid;
	gap: 14px;
}

.remote-control-section h1 {
	font-size: 24px;
}

.remote-control-section h2 {
	font-size: 18px;
}

.remote-launch-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.remote-launch-card {
	display: grid;
	align-content: space-between;
	gap: 14px;
	min-width: 0;
	min-height: 132px;
	padding: 14px 10px;
	border: 1px solid var(--remote-border);
	border-radius: 8px;
	background: var(--remote-surface);
	color: var(--remote-text);
}

.remote-launch-card > span {
	color: var(--remote-muted);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
}

.remote-launch-card > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.remote-launch-card button {
	min-width: 0;
	min-height: 68px;
	border: 1px solid var(--remote-border);
	background: var(--remote-surface-strong);
	color: var(--remote-text);
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
}

.remote-launch-card button:first-child {
	border-radius: 6px 0 0 6px;
}

.remote-launch-card button:last-child {
	border-left: 0;
	border-radius: 0 6px 6px 0;
}

.remote-launch-card button:disabled {
	cursor: not-allowed;
	filter: brightness(0.68);
}

.remote-launch-card--standard {
	border-top: 4px solid var(--remote-gold);
}

.remote-launch-card--custom {
	border-top: 4px solid var(--remote-green);
}

.remote-launch-card--all {
	border-top: 4px solid var(--remote-coral);
}

.remote-section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.remote-section-heading span {
	color: var(--remote-muted);
	font-size: 13px;
}

.remote-pattern-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
}

.remote-pattern-button {
	min-width: 0;
	min-height: 64px;
	padding: 10px 12px;
	border: 1px solid var(--remote-border);
	border-radius: 8px;
	background: var(--remote-surface-strong);
	color: var(--remote-text);
	font-weight: 800;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.remote-pattern-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 18px 0;
	border-top: 1px solid var(--remote-border);
	border-bottom: 1px solid var(--remote-border);
	color: var(--remote-muted);
	font-size: 13px;
}

.remote-runtime-strip {
	position: sticky;
	bottom: max(10px, env(safe-area-inset-bottom));
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	min-height: 58px;
	padding: 10px 12px;
	border: 1px solid var(--remote-border);
	border-radius: 8px;
	background: #111b1e;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.remote-runtime-strip span {
	color: var(--remote-muted);
	font-size: 12px;
	overflow-wrap: anywhere;
}

.remote-runtime-strip strong {
	color: var(--remote-gold);
	font-size: 12px;
	text-align: right;
}

@media (max-width: 560px) {
	.remote-launch-grid {
		grid-template-columns: 1fr;
	}

	.remote-launch-card {
		min-height: 92px;
	}
}

@media (max-width: 380px) {
	.remote-pattern-grid {
		grid-template-columns: 1fr;
	}

	.remote-workspace-band {
		align-items: flex-start;
		flex-direction: column;
	}
}
