/* Takeshi: own design, no third-party images or fonts. */

:root {
	--bg: #120f0d;
	--bg-2: #1a1512;
	--panel: #211b16;
	--panel-2: #2a221b;
	--line: #4a3b2a;
	--gold: #c9a45c;
	--gold-2: #e2c27d;
	--gold-dark: #8a6a35;
	--red: #8e2a1f;
	--red-dark: #4a140f;
	--text: #e7dcc6;
	--muted: #a39580;
	--good: #7fbf6a;
	--bad: #e0705f;
	--radius: 6px;
	--serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	background: var(--bg);
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	font-family: var(--sans);
	font-size: 15px;
	line-height: 1.55;
	background:
		radial-gradient(ellipse at 50% -10%, rgba(142, 42, 31, 0.35), transparent 60%),
		radial-gradient(ellipse at 50% 120%, rgba(201, 164, 92, 0.08), transparent 55%),
		var(--bg);
	background-attachment: fixed;
}

a {
	color: var(--gold-2);
	text-decoration: none;
}

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

:focus-visible {
	outline: 2px solid var(--gold-2);
	outline-offset: 2px;
}

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: normal;
	letter-spacing: 0.02em;
}

p {
	margin: 0 0 0.8em 0;
}

.wrap {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px;
}

/* Header */

.site-header {
	border-bottom: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15));
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--text);
}

.brand:hover {
	text-decoration: none;
	color: var(--text);
}

.brand img {
	width: 52px;
	height: 58px;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.brand-name {
	display: block;
	font-family: var(--serif);
	font-size: 2.1em;
	line-height: 1.05;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gold-2);
	text-shadow: 0 2px 0 #000, 0 0 18px rgba(201, 164, 92, 0.25);
}

.brand-sub {
	display: block;
	font-family: var(--serif);
	font-style: italic;
	color: var(--muted);
	letter-spacing: 0.08em;
}

.header-status {
	text-align: right;
	font-size: 0.92em;
	color: var(--muted);
}

.header-status strong {
	color: var(--text);
}

/* Layout */

.layout {
	display: grid;
	grid-template-columns: 210px minmax(0, 1fr) 270px;
	gap: 20px;
	align-items: start;
	padding-top: 22px;
	padding-bottom: 22px;
}

.content > .box:first-child {
	margin-top: 0;
}

/* Navigation */

.nav-section {
	margin-bottom: 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	overflow: hidden;
}

.nav-section h3 {
	margin: 0;
	padding: 7px 12px;
	font-size: 0.95em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold-2);
	background: linear-gradient(180deg, var(--red), var(--red-dark));
	border-bottom: 1px solid var(--gold-dark);
}

.nav-section ul {
	list-style: none;
	margin: 0;
	padding: 4px 0;
}

.nav-section a {
	display: block;
	padding: 6px 12px 6px 22px;
	color: var(--text);
	position: relative;
}

.nav-section a::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 50%;
	width: 5px;
	height: 5px;
	margin-top: -2.5px;
	transform: rotate(45deg);
	background: var(--gold-dark);
}

.nav-section a:hover,
.nav-section a.active {
	background: var(--panel-2);
	color: var(--gold-2);
	text-decoration: none;
}

.nav-section a.active::before {
	background: var(--gold-2);
}

/* Boxes */

.box {
	margin: 0 0 18px 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(180deg, var(--panel-2), var(--panel) 120px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.box-title {
	margin: 0;
	padding: 10px 16px;
	font-size: 1.25em;
	color: var(--gold-2);
	background: linear-gradient(180deg, rgba(142, 42, 31, 0.9), rgba(74, 20, 15, 0.9));
	border-bottom: 1px solid var(--gold-dark);
	text-shadow: 0 1px 0 #000;
}

.box-title a {
	color: inherit;
}

.box-body {
	padding: 14px 16px;
}

.box-body > :last-child {
	margin-bottom: 0;
}

.side .box-title {
	font-size: 1.05em;
	padding: 8px 14px;
}

.side .box-body {
	padding: 12px 14px;
}

.lead {
	font-family: var(--serif);
	font-size: 1.15em;
	color: var(--text);
}

.muted {
	color: var(--muted);
}

.good {
	color: var(--good);
}

.bad {
	color: var(--bad);
}

.small {
	font-size: 0.88em;
}

.mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85em;
	overflow-wrap: anywhere;
}

.key {
	word-break: break-all;
	display: block;
	max-height: 7.5em;
	overflow: auto;
	padding: 8px 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
}

hr.sep {
	border: 0;
	height: 1px;
	margin: 14px 0;
	background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

/* Tables */

table {
	width: 100%;
	border-collapse: collapse;
}

table.data th,
table.data td,
table.info th,
table.info td {
	padding: 7px 10px;
	text-align: left;
	vertical-align: top;
}

table.data th {
	font-family: var(--serif);
	font-weight: normal;
	color: var(--gold-2);
	border-bottom: 1px solid var(--gold-dark);
	background: rgba(0, 0, 0, 0.2);
}

table.data tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.025);
}

table.data tr:hover td {
	background: rgba(201, 164, 92, 0.07);
}

table.data td {
	border-bottom: 1px solid rgba(74, 59, 42, 0.5);
}

table.data td.num,
table.data th.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

table.info th {
	width: 38%;
	font-weight: normal;
	color: var(--muted);
}

table.info tr + tr th,
table.info tr + tr td {
	border-top: 1px solid rgba(74, 59, 42, 0.5);
}

.table-scroll {
	overflow-x: auto;
}

/* Forms and buttons */

.form label {
	display: block;
	margin: 12px 0 4px 0;
	font-size: 0.85em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.form label:first-of-type {
	margin-top: 0;
}

.form input[type=text],
.form input[type=password],
.form input[type=email],
.form input[type=number],
.form select,
.form textarea {
	width: 100%;
	max-width: 420px;
	padding: 8px 10px;
	color: var(--text);
	font: inherit;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
}

.form textarea {
	max-width: none;
	min-height: 10em;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
	border-color: var(--gold);
	outline: none;
	box-shadow: 0 0 0 2px rgba(201, 164, 92, 0.25);
}

.form .actions {
	margin-top: 16px;
}

.form .hint {
	margin: 4px 0 0 0;
	font-size: 0.85em;
	color: var(--muted);
}

.btn,
.form input[type=submit] {
	display: inline-block;
	padding: 8px 18px;
	color: #1b130b;
	font: inherit;
	font-family: var(--serif);
	letter-spacing: 0.05em;
	cursor: pointer;
	border: 1px solid #f0d59a;
	border-radius: var(--radius);
	background: linear-gradient(180deg, var(--gold-2), var(--gold-dark));
	box-shadow: 0 2px 0 #000;
}

.btn:hover,
.form input[type=submit]:hover {
	color: #000;
	text-decoration: none;
	filter: brightness(1.08);
}

.btn:disabled,
.form input[type=submit]:disabled {
	cursor: not-allowed;
	filter: grayscale(1) brightness(0.7);
}

.btn-secondary {
	color: var(--gold-2);
	border-color: var(--gold-dark);
	background: transparent;
	box-shadow: none;
}

.btn-secondary:hover {
	color: #fff2cf;
	background: rgba(201, 164, 92, 0.12);
}

.btn-danger {
	color: #fff;
	border-color: #e28b7c;
	background: linear-gradient(180deg, #b0392b, var(--red-dark));
}

.btn-danger:hover {
	color: #fff;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.btn-block {
	display: block;
	width: 100%;
	text-align: center;
}

/* Side boxes */

.status-line {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 0;
}

.status-line + .status-line {
	border-top: 1px solid rgba(74, 59, 42, 0.5);
}

.dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 6px;
	border-radius: 50%;
	vertical-align: middle;
}

.dot.good {
	background: var(--good);
	box-shadow: 0 0 6px var(--good);
}

.dot.bad {
	background: var(--bad);
}

/* Footer */

.site-footer {
	border-top: 1px solid var(--line);
	padding: 16px 0 26px 0;
	color: var(--muted);
	font-size: 0.85em;
	text-align: center;
}

/* Responsive */

@media (max-width: 1020px) {
	.layout {
		grid-template-columns: 200px minmax(0, 1fr);
	}

	.side {
		grid-column: 2;
	}
}

@media (max-width: 720px) {
	.layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.side {
		grid-column: auto;
	}

	.nav {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 10px;
	}

	.nav-section {
		margin-bottom: 0;
	}

	.site-header .wrap {
		flex-direction: column;
		align-items: flex-start;
	}

	.header-status {
		text-align: left;
	}

	.brand-name {
		font-size: 1.7em;
	}

	table.info th {
		width: 45%;
	}
}

/* Tabs and pager */

.tabs,
.pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px 0;
}

.pager {
	margin: 14px 0 0 0;
}

.tab {
	padding: 4px 11px;
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg-2);
	font-size: 0.92em;
}

.tab:hover {
	text-decoration: none;
	border-color: var(--gold-dark);
	color: var(--gold-2);
}

.tab.active {
	color: #1b130b;
	border-color: #f0d59a;
	background: linear-gradient(180deg, var(--gold-2), var(--gold-dark));
}

/* Notices (bid results, warnings) */

.notice {
	margin: 0 0 14px 0;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-left-width: 4px;
	border-radius: var(--radius);
	background: var(--bg-2);
}

.notice-good {
	border-color: var(--good);
}

.notice-bad {
	border-color: var(--bad);
}

/* Guilds */

.guild-description {
	margin: 0 0 12px 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.form-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.form-inline + .form-inline {
	margin-top: 10px;
}

.form.form-inline input[type=text],
.form.form-inline select {
	flex: 1 1 170px;
	width: auto;
	max-width: 300px;
}

.form .form-label {
	margin: 0;
	min-width: 130px;
	font-size: 0.85em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.manage-section + .manage-section {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid rgba(74, 59, 42, 0.5);
}

.manage-section h3 {
	margin: 0 0 8px 0;
	font-size: 1em;
}

.btn-small {
	padding: 4px 12px;
	font-size: 0.9em;
}

.table-scroll + .form {
	margin-top: 16px;
}

/* Premium shop */

.ticket-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 4px 0 14px 0;
}

.ticket {
	padding: 10px 8px 8px 8px;
	text-align: center;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: rgba(0, 0, 0, 0.2);
}

.ticket img {
	display: block;
	width: 100%;
	max-width: 176px;
	height: auto;
	margin: 0 auto;
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

.ticket h3 {
	margin: 8px 0 2px 0;
	font-size: 1.1em;
	color: var(--gold-2);
}

.ticket p {
	margin: 0;
}

.shop-form {
	margin-top: 14px;
}

.form input.code-input {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.benefits {
	margin: 0 0 12px 0;
	padding-left: 20px;
}

.benefits li + li {
	margin-top: 5px;
}

.code-label {
	display: block;
	margin: 0 0 4px 0;
	font-size: 0.85em;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.code-list {
	display: block;
	width: 100%;
	margin: 0 0 14px 0;
	padding: 8px 10px;
	color: var(--text);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.95em;
	line-height: 1.5;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
	resize: vertical;
}

.nowrap {
	white-space: nowrap;
}

p.spaced {
	margin-top: 12px;
}

.code-cell {
	letter-spacing: 0.06em;
	white-space: nowrap;
}

@media (max-width: 860px) {
	.ticket-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
