html, body {
	height: 100%;
}
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
#blanket, .popup { display: none; }
.show-popup #blanket {
	display: block;
	position: fixed;
	z-index: 5;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background: #eee;
}
.show-popup .popup {
	display: block;
	position: absolute;
	z-index: 6;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 600px;
	background: #fff;
	border: 1px solid #666;
	box-shadow: 0 4px 6px #0004;
	padding: 20px;
}
.popup h2 {
	margin: 0 0 .5em 0;
}
#entrance-alert {
	color: red;
	font-weight: bold;
}
#ui {
	display: inline-block;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	box-sizing: border-box;
	border-left: 1px solid #888;
	border-right: 1px solid #888;
	white-space: nowrap;
}
#ui > * {
	white-space: wrap;
}
#rooms, #chat {
	display: inline-block;
	vertical-align: top;
	box-sizing: border-box;
	height: 100%;
	padding: 6px;
}
#rooms {
	width: 150px;
}
#rooms h2 {
	margin: 0;
	font-size: 1.3em;
}
#messages, #rooms-list {
	list-style-type: none;
	padding: 0;
}
#messages {
	margin: 0 0 8px 0;
}
#messages::before {
	content: '';
	display: block;
	height: 40px;
	border-bottom: 1px solid #888;
	background: linear-gradient(transparent, #0002);
}
#chat {
	position: relative;
	width: 700px;
	border-left: 1px solid #888;
}
#chat-content {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 20px;
}
#sendbox {
	box-sizing: border-box;
	width: 100%;
}
.message {
	position: relative;
}
.message, .room {
	background: #fff;
}
.message:nth-child(2n), .room:nth-child(2n) {
	background: #f8f8f8;
}
.author, .message-content {
	box-sizing: border-box;
	position: relative;
	display: inline-block;
	vertical-align: top;
	overflow-wrap: break-word;
	height: 100%;
}
.author {
	border-right: 1px solid #ccc;
	width: 12em;
	padding-right: .5em;
	text-align: right;
	font-weight: bold;
	background: inherit;
}
.message-date {
	display: none;
}
.message:hover .message-date {
	z-index: 2;
	font-weight: normal;
	display: inline-block;
	position: absolute;
	right: 100%;
	top: 0;
	padding: 2px 6px;
	border: 1px solid #aaa;
	box-shadow: 0 0 4px #0004;
	background: inherit;
	white-space: nowrap;
}
code, .trip {
	font-family: 'Source Code Pro', Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Menlo, Consolas, monospace;
}
.trip {
	font-weight: normal;
	color: #888;
}
.message-content {
	border-left: 1px solid #ccc;
	padding-left: .5em;
	margin-left: -1px;
	width: calc(100% - 12em);
}
#rooms-list {
	border-top: 1px solid #666;
	border-bottom: 1px solid #666;
}
.room {
	cursor: pointer;
}
.room:hover {
	background: #eee;
}
.current-room {
	font-weight: bold;
}
.mention {
	display: inline-block;
	padding: 0 4px;
	border-radius: 4px;
	background: #4e9;
	border: 1px solid #1b3;
	vertical-align: middle;
}

.sqrt {
	display: inline-block;
	position: relative;
}
.sqrt-symbol {
	display: inline-block;
	background-image: url('sqrt.png');
	background-repeat: no-repeat;
	background-size: 100% 100%;
	width: 16px;
	height: 100%;
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
}
.sqrt-body {
	display: inline-block;
	margin-left: 16px;
	padding: 1px 2px 0 2px;
	border-top: 1px solid #000;
}
