html, body {
	margin: 0;
	height: 100%;
	background: #000000;
}
#app {
	width: 100%;
	height: 100%;
	overflow: hidden;
}
#app.vView {
	display: grid;
	grid-template-columns: 12% 88%;
	grid-template-rows: 1fr min-content;
	grid-template-areas:
		"tabs grid"
		"bttns grid";
}
#app.hView {
	display: grid;
	grid-template-columns: 1fr min-content;
	grid-template-rows: minmax(32px, 7%) 1fr;
	grid-template-areas:
		"tabs bttns"
		"grid grid";
}
#navHome {
	background: #000000;
	color: #66CCFF;
	border: 1px solid #66CCFF;
	grid-template-columns: 1fr;
	place-items: center;
}
#navTabs {
	grid-area: tabs;
	min-width: 0;
	min-height: 0;
}
#dialGrid {
	grid-area: grid;
	display: grid;
	gap: 4px;
	padding: 4px;
	box-sizing: border-box;
	min-width: 0;
	min-height: 0;
}
#navBttns {
	grid-area: bttns;
	display: grid;
	gap: 4px;
	padding: 5px;
	box-sizing: border-box;
	z-index: 30;
	background: #000000;
}
.tab {
	position: relative;
	padding: 2px 0;
	white-space: nowrap;
	display: grid;
	grid-template-columns: min-content 1fr;
	align-items: stretch;
	cursor: pointer;
	box-sizing: border-box;
	min-width: 0;
	min-height: 0;
	border: 1px solid rgba(255, 255, 255, 0.28);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
	overflow: hidden;
}
.tab.active {
	z-index: 2;
	outline: 0;
	border-color: #ffffff;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		0 0 0 1px rgba(255, 255, 255, 0.42);
}
.tabMenu, .tabName {
	display: grid;
	align-items: center;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	min-width: 0;
}
.tabMenu {
	justify-items: start;
	padding: 2px 4px;
	order: 1;
}
.tabName {
	justify-items: center;
	padding: 2px 8px;
	order: 2;
}
.tab.active .tabName {
	justify-items: end;
	padding-right: 10px;
}
.dial, .addDial {
	display: grid;
	place-items: center;
	min-width: 0;
	min-height: 0;
	border: 1px solid #444444;
	cursor: pointer;
	overflow: hidden;
}
.dial {
	position: relative;
}
.dialName {
	width: 100%;
	height: 100%;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-size: 1.1em;
}
.dialMenu {
	position: absolute;
	left: 2px;
	bottom: 2px;
	border: 1px solid #444444;
	background: rgba(0, 0, 0, 0.55);
	color: inherit;
	cursor: pointer;
	padding: 1px 4px;
}
.dialPin {
	position: absolute;
	top: 13px;
	right: 3px;
	width: 16px;
	height: 13px;
	border: 2px solid #444444;
	pointer-events: none;
	padding: 0;
}
.dialPin::before {
	content: "";
	position: absolute;
	left: 3px;
	top: -11px;
	width: 5px;
	height: 10px;
	border: 3px solid currentColor;
	border-bottom: 0;
	border-radius: 7px 7px 0 0;
}
.dialPin::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 5px;
	width: 2px;
	height: 5px;
	background: var(--pin-hole);
}

#app.vView #navTabs {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
#app.vView #navHome {
	flex: 0 0 16%;
	max-height: 16%;
}
#app.vView #navTabs > .tab:not(#navHome) {
	flex: 1 1 0;
	min-height: 0;
}
#app.vView .tab {
	margin: 2px 18px 2px 4px;
	border-radius: 8px;
}
#app.vView .tab.active {
	margin-right: -1px;
	border-right: 0;
	border-radius: 8px 0 0 8px;
}
#app.vView #dialGrid {
	border-left: 1px solid rgba(255, 255, 255, 0.45);
}
#app.vView #navBttns {
	grid-auto-flow: row;
	grid-auto-rows: min-content;
}
#app.hView #navTabs {
	display: flex;
	flex-direction: row;
	overflow-x: auto;
}
#app.hView #navHome {
	flex: 0 0 16%;
	max-width: 16%;
}
#app.hView #navTabs > .tab:not(#navHome) {
	flex: 1 1 0;
	min-width: 0;
}
#app.hView .tab {
	margin: 4px 2px 18px 2px;
	padding: 1px 6px;
	grid-template-columns: 1fr min-content;
	border-radius: 8px;
}
#app.hView .tab.active {
	margin-bottom: -1px;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
}
#app.hView .tabMenu {
	justify-items: end;
	order: 2;
}
#app.hView .tabName {
	justify-items: center;
	padding: 2px 8px;
	order: 1;
}
#app.hView .tab.active .tabName {
	justify-items: end;
	padding-right: 10px;
}
#app.hView #dialGrid {
	border-top: 1px solid rgba(255, 255, 255, 0.45);
}
#app.hView #navBttns {
	grid-auto-flow: column;
	grid-auto-columns: min-content;
	align-content: start;
}
#toggleBtn, #addTabBtn, #jsonBtn {
	padding: 2px 6px;
}
#blockScreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000000;
	text-align: center;
	padding-top: 20%;
}
#tabDlg, #dialDlg, #jsonDlg {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: start center;
	padding-top: 6vh;
	background: rgba(0, 0, 0, 0.35);
	z-index: 999;
	box-sizing: border-box;
}
#tabDlg[hidden], #dialDlg[hidden], #jsonDlg[hidden] {
	display: none;
}
#tabDlg, #tabDlg *, #dialDlg, #dialDlg *, #jsonDlg, #jsonDlg * {
	box-sizing: border-box;
	font: inherit;
}
#tabDlgPanel, #dialDlgPanel, #jsonDlgPanel {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-auto-rows: min-content;
	gap: 4px;
	padding: 10px;
	border: 1px solid #444444;
	background: #222222;
	color: #ffffff;
	min-width: 260px;
	max-height: 88vh;
	overflow: hidden;
}
#dialDlgPanel {
	width: min(560px, 92vw);
}
#jsonDlgPanel {
	width: min(760px, 92vw);
}
#tabDlgPanel h2, #dialDlgPanel h2, #jsonDlgPanel h2 {
	grid-column: 1 / -1;
	margin: 0 0 6px 0;
}
.dialogRow {
	display: contents;
}
.dialogRow label {
	display: grid;
	align-items: center;
	padding-right: 6px;
}
.dialogRow input, .dialogRow select, .dialogRow textarea {
	width: 100%;
	min-width: 0;
}
.dialogRow input[type="checkbox"] {
	width: auto;
}
.dialogActions {
	grid-column: 1 / -1;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min-content;
	justify-content: end;
	gap: 4px;
	margin-top: 6px;
}
.delRow label {
	color: #ff9999;
}
#tabDelBtn, #dialDelBtn {
	border-color: #aa3333;
	color: #ff9999;
}
#tabDelBtn[hidden], #dialDelBtn[hidden] {
	display: none;
}
#dialUrlInput {
	min-height: 4.8em;
	resize: vertical;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
#jsonTextWrap {
	grid-column: 1 / -1;
	display: grid;
	gap: 4px;
}
#jsonText {
	grid-column: 1 / -1;
	width: 100%;
	height: 28vh;
	min-height: 140px;
	resize: vertical;
	white-space: pre;
	overflow: auto;
}
#jsonMssg, #dialPlanMssg {
	grid-column: 1 / -1;
	max-height: 22vh;
	overflow: auto;
	white-space: pre-wrap;
	border: 1px solid #444444;
	padding: 6px;
	background: #111111;
}
#dialPlanMssg[hidden] {
	display: none;
}
#tabDlg button, #tabDlg input, #tabDlg select,
#dialDlg button, #dialDlg input, #dialDlg select, #dialDlg textarea,
#jsonDlg button, #jsonDlg input, #jsonDlg select, #jsonDlg textarea {
	margin: 0;
	border: 1px solid #555555;
	background: #111111;
	color: #ffffff;
	padding: 2px 6px;
}
#tabDlg input[type="color"], #dialDlg input[type="color"] {
	appearance: auto;
	background: transparent;
	color: initial;
	padding: 0;
	width: 44px;
	height: 24px;
}
#tabDlg button, #dialDlg button, #jsonDlg button {
	cursor: pointer;
}