:root {
	--orange: #F17900;
	--orange-dark: #c45f00;
	--ink: #222;
	--muted: #6b6b6b;
	--page: #e8e2d8;
	--card: #ffffff;
	--line: #c9bfb3;
	--dot: #b7aea3;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
}

body {
	background: var(--page);
	color: var(--ink);
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	line-height: 1.45;
}

img {
	border: 0;
	vertical-align: top;
	max-width: 100%;
}

#site {
	width: 960px;
	max-width: calc(100% - 24px);
	margin: 20px auto 36px;
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: 0 8px 24px rgba(60, 40, 20, 0.12);
}

#header {
	position: relative;
}

#headtop {
	height: 86px;
	border-bottom: 1px solid #333;
	background: url(../images/headback1.gif) repeat-x 0 0;
}

.headband {
	height: 64px;
	margin: 0 0 0 0;
	background: #fff;
	border-bottom: 1px solid #333;
}

.headlogo {
	height: 60px;
	margin: 10px 12px 0 18px;
	padding-left: 78px;
	background: url(../images/headlogo.png) no-repeat left center;
	background-size: 64px auto;
}

.headtitle {
	padding-top: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 36px;
	font-weight: bold;
	letter-spacing: -0.5px;
	cursor: default;
	white-space: nowrap;
}

#headbottom {
	position: relative;
	height: 14px;
	background: url(../images/headback2.gif) repeat-x 150px 0;
}

.head-gamepad {
	position: absolute;
	top: -52px;
	right: 22px;
	width: 64px;
	height: 52px;
}

#version {
	position: absolute;
	top: -78px;
	right: 96px;
	font-weight: bold;
	font-size: 12px;
	cursor: default;
}

#container {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	padding: 12px 16px 20px;
}

#left {
	flex: 0 0 140px;
	width: 140px;
	padding-right: 10px;
	border-right: 2px dotted var(--dot);
}

#lefttop a.navbtn {
	display: block;
	width: 125px;
	margin-bottom: 1px;
	line-height: 0;
}

#lefttop a.navbtn img {
	display: block;
}

.login-box {
	margin-top: 18px;
	padding: 10px 8px 12px;
	border: 1px dotted var(--dot);
	text-align: center;
	font-size: 12px;
}

.login-box label {
	display: block;
	margin-bottom: 8px;
	text-align: left;
	font-weight: bold;
}

.login-box input[type="text"],
.login-box input[type="password"] {
	width: 100%;
	margin-top: 2px;
}

.login-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin-top: 4px;
}

.login-user {
	margin-bottom: 10px;
	line-height: 1.4;
}

#middle {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 430px;
}

#bench {
	color: var(--muted);
	font-size: 11px;
	margin-bottom: 6px;
}

#pdescript {
	display: block;
	font-weight: bold;
	font-size: 15px;
	margin: 4px 0 10px;
}

#pcontent {
	font-weight: bold;
	line-height: 1.8;
}

#phpbrowse {
	max-height: 420px;
	overflow: auto;
	padding: 8px 10px;
	border: 1px dotted var(--dot);
	font-weight: bold;
	font-size: 12px;
	line-height: 1.6;
}

#otherfiles {
	font-weight: bold;
}

#otherfiles table {
	width: 100%;
	font-size: 13px;
}

#otherfiles img {
	vertical-align: middle;
}

#newslink,
#themearrows {
	text-align: center;
	font-weight: bold;
	margin-top: 8px;
}

#right {
	flex: 0 0 200px;
	width: 200px;
	border: 1px dotted var(--dot);
	background: #fff;
}

#right h2 {
	margin: 0;
	padding: 10px 8px;
	font-size: 15px;
	text-align: center;
	background: url(../images/headback1.gif) repeat;
	border-bottom: 1px solid #333;
}

#righttext {
	margin: 0;
	padding: 10px;
	font-size: 12px;
	line-height: 1.45;
}

#footer {
	padding: 12px 10px 16px;
	text-align: center;
	color: #333;
	font-size: 11px;
	font-weight: bold;
	border-top: 1px dotted var(--dot);
}

a:link,
a:visited {
	color: var(--orange);
	text-decoration: none;
}

a:hover,
a:active {
	color: #666;
	text-decoration: underline;
}

input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
	font: inherit;
	padding: 5px 7px;
	border: 1px solid var(--line);
	background: #fff;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
	outline: 2px solid var(--orange);
	outline-offset: 1px;
	border-color: var(--orange);
}

input[type="submit"] {
	background: var(--orange);
	color: #fff;
	border: 1px solid var(--orange-dark);
	padding: 5px 12px;
	font-weight: bold;
	cursor: pointer;
}

input[type="submit"]:hover {
	background: var(--orange-dark);
}

.pane-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
	padding: 6px;
	border: 1px dotted var(--dot);
}

.scrollpane {
	flex: 1 1 auto;
	min-width: 0;
	height: 330px;
	overflow: auto;
	background: #fff;
}

.arrows {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 18px;
	width: 28px;
	flex: 0 0 28px;
}

.arrows img {
	display: block;
}

.news-item {
	margin-bottom: 14px;
}

.news-old {
	display: none;
}

.news-all .news-old {
	display: block;
}

.flash-error,
.flash-ok {
	font-weight: bold;
	padding: 8px 10px;
	border: 1px dotted var(--dot);
}

.flash-error {
	color: #b00000;
	background: #fff4f0;
}

.flash-ok {
	color: var(--orange-dark);
	background: #fff7ee;
}

.theme-preview {
	text-align: center;
	font-weight: bold;
	font-size: 12px;
}

.theme-preview img {
	display: inline-block;
	width: min(100%, 420px);
	height: auto;
}

#controller-list {
	font-weight: bold;
	font-size: 13px;
	line-height: 1.55;
	padding: 4px 6px;
}

#links {
	font-weight: bold;
	line-height: 1.7;
}

span.linkstitle {
	display: inline-block;
	margin: 8px 0 2px;
	text-decoration: underline;
	font-size: 13px;
}

#newsscroll {
	padding: 4px 8px 8px;
	font-weight: bold;
	font-size: 14px;
	font-family: Georgia, "Times New Roman", Times, serif;
	text-align: left;
}

#newsscroll .news-meta {
	margin-top: 4px;
	font-size: 12px;
	text-align: right;
	color: #444;
}

#themescroll {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 10px;
	color: #000;
	text-align: center;
	font-weight: bold;
}

#themescroll > .themelabel {
	width: 100%;
	margin: 2px 0 4px;
}

#themescroll img {
	display: block;
	width: 104px;
	height: 72px;
	margin: 0 auto 4px;
	border: 1px solid #ddd;
}

div.themeimages {
	width: 120px;
	font-size: 11px;
}

div.themeimages a {
	display: block;
	margin-bottom: 10px;
}

#themearrows a {
	display: inline-block;
	padding: 0 4px;
}

#signupform table {
	width: 100%;
	border-collapse: collapse;
}

#signupform table td:first-child {
	width: 180px;
	padding: 6px 8px 6px 0;
	white-space: nowrap;
	text-align: right;
	font-weight: bold;
}

#signupform input[type="text"],
#signupform input[type="password"] {
	width: 220px;
}

.smallbold {
	font-weight: bold;
	font-size: 11px;
	color: var(--muted);
}

.contact-form table {
	width: 100%;
	border-collapse: collapse;
}

.contact-form td {
	padding: 6px 0;
	vertical-align: top;
}

.contact-form td:first-child {
	width: 90px;
	padding-top: 10px;
	font-weight: bold;
}

.contact-form input[type="text"],
.contact-form textarea,
.contact-form select {
	width: 100%;
	max-width: 360px;
}

.contact-form textarea {
	min-height: 140px;
	resize: vertical;
}

.tableleft {
	text-align: left;
}

.hp {
	position: absolute;
	left: -9999px;
}

@media (max-width: 820px) {
	#site {
		width: 100%;
		max-width: none;
		margin: 0;
		border: 0;
		box-shadow: none;
	}

	.headtitle {
		font-size: 22px;
		padding-top: 18px;
	}

	.headlogo {
		padding-left: 58px;
		background-size: 48px auto;
	}

	#container {
		flex-direction: column;
	}

	#left,
	#right,
	#middle {
		width: 100%;
		flex: none;
	}

	#left {
		border-right: 0;
		border-bottom: 2px dotted var(--dot);
		padding: 0 0 12px;
	}

	#lefttop {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 8px;
		align-items: flex-start;
	}

	.login-box {
		width: 100%;
		margin-top: 8px;
	}

	#right {
		order: 3;
	}
}
