/* Legend of the Green Dragon — lotgd skin */

html {
	box-sizing: border-box;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

html,
body {
	margin: 0;
	padding: 0;
	max-width: 100%;
}

body.lotgd-page {
	background: #0c100e;
	color: #e6e2d6;
	font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	min-height: 100vh;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: #d4b45a;
	text-decoration: none;
}

a:hover,
a:focus {
	color: #f0d78a;
	text-decoration: underline;
}

/* ----- shell ----- */

.lotgd-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
	max-width: 100%;
}

.lotgd-top {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.35rem;
	position: sticky;
	top: 0;
	z-index: 80;
	min-height: 52px;
	padding: 0.5rem 0.75rem;
	background: #141a16;
	border-bottom: 1px solid #3d4a2e;
}

.lotgd-top-bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.lotgd-title {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: bold;
	font-size: 1rem;
	color: #f3e6b8;
	overflow-wrap: anywhere;
}

.lotgd-top-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.4rem;
	flex: 0 1 auto;
}

.lotgd-top-stats {
	min-width: 0;
	width: 100%;
}

.lotgd-hstats {
	display: flex;
	flex-direction: column;
	gap: 0.28rem;
	width: 100%;
	min-width: 0;
	font-size: 0.82rem;
	line-height: 1.35;
}

.lotgd-hstats-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem 0.9rem;
	min-width: 0;
}

.lotgd-hstat {
	display: inline-flex;
	align-items: baseline;
	gap: 0.28rem;
	min-width: 0;
}

.lotgd-hstat-label {
	color: #a8a494;
	flex: 0 0 auto;
	white-space: nowrap;
}

.lotgd-hstat-label::after {
	content: ":";
}

.lotgd-hstat-value {
	color: #f3e6b8;
	min-width: 0;
}

.lotgd-hstat-name {
	flex: 0 1 auto;
	max-width: 100%;
	min-width: 0;
}

.lotgd-hstat-name .lotgd-hstat-value {
	overflow-wrap: anywhere;
}

.lotgd-hstats-clocks {
	color: #c8c0a8;
}

.lotgd-hstat-clock .lotgd-hstat-value,
.lotgd-hstats-clocks .lotgd-hstat-value {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	min-width: 9.5em;
}

.lotgd-hstat-exp {
	align-items: center;
	flex: 0 0 auto;
}

.lotgd-hstat-exp .lotgd-hstat-value {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: nowrap;
	white-space: nowrap;
}

.lotgd-hstat-exp .lotgd-hstat-value table {
	display: inline-table;
	width: 70px;
	height: 5px;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #000;
	vertical-align: middle;
}

.lotgd-hstat-exp .lotgd-hstat-value table td {
	display: table-cell;
	padding: 0;
	border: none;
}

.lotgd-nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0 0.85rem;
	border: 1px solid #6b5a2a;
	background: #24301c;
	color: #f3e6b8;
	font-family: inherit;
	font-size: 16px;
	cursor: pointer;
}

.lotgd-nav-toggle:hover,
.lotgd-nav-toggle:focus {
	background: #314226;
	outline: 2px solid #d4b45a;
	outline-offset: 2px;
}

.lotgd-sidebar {
	position: fixed;
	top: var(--lotgd-header-h, 52px);
	left: 0;
	z-index: 60;
	width: min(86vw, 280px);
	height: calc(100vh - var(--lotgd-header-h, 52px));
	height: calc(100dvh - var(--lotgd-header-h, 52px));
	padding: 0.75rem 0.7rem 1.25rem;
	background: #101610;
	border-right: 1px solid #3d4a2e;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	transform: translateX(-105%);
	transition: transform 0.2s ease-out;
	visibility: hidden;
	pointer-events: none;
}

body.lotgd-nav-open .lotgd-sidebar {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
}

.lotgd-sidebar-backdrop {
	display: none;
	position: fixed;
	top: var(--lotgd-header-h, 52px);
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 55;
	border: 0;
	padding: 0;
	background: rgba(0, 0, 0, 0.55);
}

body.lotgd-nav-open .lotgd-sidebar-backdrop {
	display: block;
}

.lotgd-main {
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 0.9rem 0.85rem 1.5rem;
	overflow-x: auto;
}

.lotgd-bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	justify-content: space-between;
	align-items: flex-start;
	padding: 0.75rem 0.85rem;
	background: #101410;
	border-top: 1px solid #3d4a2e;
	color: #b8b4a6;
	font-size: 0.9rem;
}

.lotgd-bottom-copy,
.lotgd-bottom-links {
	min-width: 0;
	overflow-wrap: anywhere;
}

.lotgd-sidebar-petition,
.lotgd-sidebar-meta {
	margin-top: 0.75rem;
	overflow-wrap: anywhere;
}

.lotgd-petition-count {
	margin: 0.5rem 0;
}

.lotgd-ad {
	margin: 0.4rem 0;
	max-width: 100%;
}

/* ----- nav (table fragments from style:classic) ----- */

table.lotgd-nav,
table.lotgd-nav table,
.lotgd-nav table,
.lotgd-sidebar table.noborder {
	width: 100%;
	max-width: 100%;
	border: none;
	border-collapse: collapse;
	float: none;
}

.lotgd-sidebar table.lotgd-nav td,
.lotgd-sidebar table.lotgd-nav tr,
.lotgd-nav td,
.lotgd-nav tr {
	display: block;
	width: 100%;
	border: none;
	padding: 0;
}

.navhead {
	display: block;
	width: 100%;
	margin: 0.65rem 0 0.2rem;
	padding: 0.4rem 0.5rem;
	background: #1d2a1c;
	color: #d4b45a;
	font-weight: bold;
	cursor: default;
	overflow-wrap: anywhere;
}

.navhelp {
	display: block;
	width: 100%;
	padding: 0.45rem 0.5rem;
	color: #c9c4b4;
	overflow-wrap: anywhere;
}

a.nav,
a.navhilite {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 0.45rem 0.6rem;
	background: #162016;
	color: #e6e2d6;
	text-decoration: none;
	overflow-wrap: anywhere;
	word-break: break-word;
	white-space: normal;
	line-height: 1.35;
}

a.nav:hover,
a.nav:focus,
a.navhilite:hover,
a.navhilite:focus {
	background: #243424;
	color: #f0d78a;
	text-decoration: none;
}

a.navhilite {
	color: #f0d78a;
	background: #2a2010;
}

.navhi {
	display: inline;
	color: #8fe08f;
	vertical-align: baseline;
}

/* ----- stats ----- */

table.charinfo,
table.charinfo.lotgd-stats {
	width: 100%;
	max-width: 100%;
	border: none;
	border-collapse: collapse;
	margin-top: 0.85rem;
}

table.charinfo > tbody,
table.charinfo > tr,
table.charinfo > tbody > tr,
table.charinfo > tbody > tr > td,
table.charinfo > tr > td {
	display: block;
	width: 100%;
	border: none;
}

td.charhead {
	margin-top: 0.5rem;
	padding: 0.4rem 0.5rem;
	background: #3a2418;
	color: #f3e6b8;
	font-weight: bold;
	cursor: default;
	overflow-wrap: anywhere;
}

td.charinfo {
	padding: 0.15rem 0.5rem 0.35rem;
	border-top: 1px solid #3a2418;
	cursor: default;
	overflow-wrap: anywhere;
}

.lotgd-stat-row {
	display: block;
	padding: 0.25rem 0 0.15rem;
}

.lotgd-stat-label {
	color: #c9c4b4;
	font-size: 0.92rem;
}

.lotgd-stat-value,
.lotgd-stat-buff {
	color: #f3e6b8;
}

/* ----- game content / tables ----- */

.lotgd-main table,
.lotgd-popup-main table,
.lotgd-auth table {
	max-width: 100%;
	border-collapse: collapse;
}

table {
	max-width: 100%;
	border-top: 1px solid #4a4030;
	border-left: 1px solid #4a4030;
	border-right: none;
	border-bottom: none;
}

td {
	font-family: inherit;
	font-size: 16px;
	border-top: none;
	border-left: none;
	border-right: 1px solid #4a4030;
	border-bottom: 1px solid #4a4030;
	padding: 0.35rem 0.45rem;
	vertical-align: top;
}

td.noborder,
table.noborder,
table.noborder td {
	border: none;
}

.lotgd-create table,
.lotgd-create tbody,
.lotgd-create tr,
.lotgd-create td {
	display: block;
	width: 100%;
	max-width: 100%;
	border: none;
	padding: 0.2rem 0;
}

.lotgd-create input[type="text"],
.lotgd-create input[type="password"],
.lotgd-create input[type="email"],
.lotgd-create input:not([type]) {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	font-size: 16px;
}

td.pageheader {
	background: #1d2a1c;
}

.trhead {
	background-color: #3a2418;
	color: #ffffff;
}

.trlight {
	background-color: #1a1610;
}

.trdark {
	background-color: #0c100e;
}

.trhilight {
	background-color: #2a2010;
}

/* ----- forms ----- */

input,
select,
textarea,
.input {
	font-family: inherit;
	font-size: 16px;
	max-width: 100%;
	background: #1a201c;
	border: 1px solid #6b5a2a;
	color: #e6e2d6;
	padding: 0.45rem 0.55rem;
}

input[type="submit"],
input[type="button"],
button.button,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.45rem 1rem;
	background: #314226;
	border: 1px solid #6b5a2a;
	color: #f3e6b8;
	font-family: inherit;
	font-size: 16px;
	cursor: pointer;
}

input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover {
	background: #3e5330;
}

/* ----- login ----- */

body.lotgd-login {
	min-height: 100vh;
	overflow-x: hidden;
}

body.lotgd-login .lotgd-nav-toggle,
body.lotgd-login .lotgd-sidebar {
	display: none !important;
}

.lotgd-auth {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	width: 100%;
	max-width: 28rem;
	margin: 0 auto;
	padding: 1.25rem;
}

.lotgd-login-card {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	width: 100%;
	padding: 1.15rem 1.1rem 1.25rem;
	background: #141a16;
	border: 1px solid #3d4a2e;
}

.lotgd-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.lotgd-login-card .input,
.lotgd-login-card input[type="password"],
.lotgd-login-card input[name="name"] {
	width: 100%;
	min-height: 44px;
	font-size: 16px;
}

.lotgd-login-card .button,
.lotgd-login-card input[type="submit"] {
	width: 100%;
	margin-top: 0.65rem;
}

.lotgd-login-register {
	margin: 0.85rem 0 0;
	text-align: center;
}

.lotgd-login-register a {
	display: inline-block;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	color: #d4c48a;
}

.lotgd-server-full {
	margin: 0;
	color: #e07070;
	text-align: center;
}

/* ----- popup ----- */

.lotgd-popup-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	max-width: 100%;
}

.lotgd-popup-top {
	padding: 0.7rem 0.9rem;
	background: #141a16;
	border-bottom: 1px solid #3d4a2e;
	color: #f3e6b8;
}

.lotgd-popup-main {
	flex: 1 1 auto;
	padding: 0.9rem;
	overflow-x: auto;
}

.lotgd-popup-bottom {
	padding: 0.65rem 0.9rem;
	background: #101410;
	border-top: 1px solid #3d4a2e;
	color: #b8b4a6;
	font-size: 0.9rem;
}

/* ----- motd / mail / translator ----- */

a.motd,
a.hotmotd {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.25rem 0.55rem;
	background: #2a2010;
	color: #f0d78a;
	text-decoration: none;
}

a.motd:hover,
a.hotmotd:hover {
	background: #3d2e14;
	text-decoration: none;
}

a.hotmotd {
	color: #ffd060;
	font-weight: bold;
}

a.t,
a.thot {
	display: inline-block;
	min-width: 1.1rem;
	padding: 0 0.2rem;
	font-size: 0.75rem;
	line-height: 1.2;
	text-decoration: none;
	vertical-align: super;
}

a.t {
	border: 1px dotted #6ea0ff;
	background: #2a3a66;
	color: #ffffff;
}

a.thot {
	border: 1px dotted #ff6e6e;
	background: #662a2a;
	color: #ffffff;
}

div.debug {
	background: #ffffff;
	color: #111111;
	border: 1px dotted #000000;
	font-size: 0.8rem;
	max-width: 100%;
	overflow-x: auto;
}

/* ----- LoGD color codes ----- */

.colDkBlue { color: #4a6ad4; }
.colDkGreen { color: #3a9a3a; }
.colDkCyan { color: #2a9a9a; }
.colDkRed { color: #c04040; }
.colDkMagenta { color: #b040c0; }
.colDkYellow { color: #b0a040; }
.colDkWhite { color: #b0b0b0; }
.colLtBlue { color: #6e90ff; }
.colLtGreen { color: #5ed45e; }
.colLtCyan { color: #5eeeee; }
.colLtRed { color: #ff6a6a; }
.colLtMagenta { color: #ff70ff; }
.colLtYellow { color: #ffe060; }
.colLtWhite { color: #ffffff; }
.colLtBlack { color: #9a9a9a; }
.colDkOrange { color: #c06a20; }
.colLtOrange { color: #ff9a30; }

/* ----- tablet ----- */

@media (min-width: 768px) {
	.lotgd-title {
		font-size: 1.15rem;
	}

	.lotgd-main {
		padding: 1.1rem 1.25rem 1.75rem;
	}

	.lotgd-sidebar {
		width: 240px;
	}

	.lotgd-auth {
		max-width: 32rem;
	}
}

/* ----- PC ----- */

@media (min-width: 1024px) {
	.lotgd-nav-toggle {
		display: none;
	}

	.lotgd-shell {
		display: grid;
		grid-template-columns: 240px minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		grid-template-areas:
			"top top"
			"sidebar main";
	}

	.lotgd-top { grid-area: top; }
	.lotgd-sidebar { grid-area: sidebar; }
	.lotgd-main { grid-area: main; }

	.lotgd-sidebar {
		position: static;
		z-index: auto;
		top: auto;
		width: 240px;
		height: auto;
		min-height: 100%;
		transform: none;
		transition: none;
		visibility: visible;
		pointer-events: auto;
	}

	.lotgd-sidebar-backdrop,
	body.lotgd-nav-open .lotgd-sidebar-backdrop {
		display: none;
	}

	.lotgd-main {
		max-width: 48rem;
		justify-self: start;
		width: 100%;
		padding: 1.25rem 1.5rem 2rem;
	}

	a.nav,
	a.navhilite,
	a.motd,
	a.hotmotd {
		min-height: 36px;
	}
}
