:root {
	--tty-accent: #7ee787;
}
html[data-tty-theme="amber"] { --tty-accent: #d8a657; }
html[data-tty-theme="cyan"]  { --tty-accent: #7fc7ff; }
html[data-tty-theme="mono"]  { --tty-accent: #e8e6df; }

.tty-html, .tty-body {
	margin: 0;
	padding: 0;
	background: #06100b;
}

.tty-body {
	font-family: ui-monospace, Menlo, Consolas, "Noto Sans Mono CJK SC", "Noto Sans Mono CJK JP",
		"Sarasa Mono SC", "Hiragino Sans", "Microsoft YaHei Mono", "Noto Sans Mono", monospace,
		"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
	-webkit-font-smoothing: antialiased;
}

.tty-body a {
	color: var(--tty-accent);
	text-decoration: none;
}
.tty-body a:hover {
	text-decoration: underline;
}

.tty-small {
	display: none;
	min-height: 100vh;
	align-items: center;
	justify-content: center;
	padding: 32px;
	background: #06100b;
}
.tty-small-box {
	max-width: 420px;
	border: 1px solid #2c4436;
	padding: 22px 24px;
	color: #9fb3a4;
	font-size: 13px;
	line-height: 1.7;
}
.tty-small-heading {
	color: #d8a657;
	font-size: 13px;
	letter-spacing: 0.1em;
	margin-bottom: 10px;
}
.tty-small-muted {
	margin-top: 14px;
	color: #5f7566;
}

@media (max-width: 1499px) {
	.tty-page { display: none !important; }
	.tty-small { display: flex !important; }
}

.tty-page {
	min-height: 100vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 20px;
	padding: 22px 20px 28px;
}

.tty-center {
	flex: none;
	width: 900px;
	display: flex;
	flex-direction: column;
}

.tty-topbar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-size: 12.5px;
	color: #5f7566;
	padding: 0 2px 8px;
}
.tty-topbar-left, .tty-topbar-right {
	display: flex;
	gap: 10px;
	align-items: baseline;
}
.tty-topbar-right { gap: 14px; }
.tty-brand { color: var(--tty-accent); font-weight: 600; }
.tty-sep { color: #2c4436; }
.tty-breadcrumb { color: #9fb3a4; }
.tty-unread { color: #d8a657; }
.tty-theme-label { color: #4d6455; }

.tty-frame {
	position: relative;
	border: 1px solid #2c4436;
	background: #08150e;
	height: 604px;
	display: flex;
	flex-direction: column;
}

.tty-notch {
	position: absolute;
	top: -1px;
	left: 14px;
	transform: translateY(-50%);
	background: #06100b;
	padding: 0 8px;
	font-size: 11.5px;
	letter-spacing: 0.12em;
	color: var(--tty-accent);
}

.tty-colhead {
	flex: none;
	display: flex;
	padding: 14px 16px 6px;
	font-size: 11.5px;
	letter-spacing: 0.08em;
	color: #4d6455;
	border-bottom: 1px solid #16281d;
}

.tty-pane {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 6px 0 18px;
	font-size: 13.5px;
	line-height: 1.62;
	color: #b9c9bd;
}

.tty-head {
	color: #4d6455;
	letter-spacing: 0.1em;
	font-size: 11.5px;
	padding: 12px 16px 2px;
	text-transform: uppercase;
}

.tty-row {
	display: flex;
	padding: 1px 16px;
	white-space: nowrap;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}
.tty-row:hover { text-decoration: none; }

[data-tty-row].tty-sel {
	background: var(--tty-accent);
	color: #06120b;
	font-weight: 600;
}
[data-tty-row].tty-sel * { color: inherit; }
[data-tty-row].tty-sel .tty-dim,
[data-tty-row].tty-sel .tty-flag {
	color: #0f2e1a;
}

[data-tty-row].tty-hidden,
[data-tty-head].tty-hidden {
	display: none;
}

.tty-cell-flag {
	width: 6ch;
	flex: none;
	color: #d8a657;
}
.tty-cell-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #b9c9bd;
}
.tty-cell-num {
	width: 11ch;
	flex: none;
	text-align: right;
	color: #6f8877;
}
.tty-cell-last {
	width: 30ch;
	flex: none;
	text-align: right;
	color: #6f8877;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tty-colhead-flag { width: 6ch; flex: none; }
.tty-colhead-name { flex: 1; min-width: 0; }
.tty-colhead-num  { width: 11ch; flex: none; text-align: right; }
.tty-colhead-last { width: 30ch; flex: none; text-align: right; }

.tty-cell-author {
	width: 16ch;
	flex: none;
	color: #6f8877;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tty-cell-small {
	width: 8ch;
	flex: none;
	text-align: right;
	color: #6f8877;
}
.tty-cell-lastnarrow {
	width: 17ch;
	flex: none;
	text-align: right;
	color: #6f8877;
}
.tty-colhead-author { width: 16ch; flex: none; }
.tty-colhead-small  { width: 8ch; flex: none; text-align: right; }
.tty-colhead-lastnarrow { width: 17ch; flex: none; text-align: right; }

.tty-cell-postnum {
	width: 4ch;
	flex: none;
	color: #6f8877;
}
.tty-cell-postauthor {
	flex: none;
	color: var(--tty-accent);
}
.tty-cell-postrank {
	flex: none;
	color: #6f8877;
	padding-left: 1ch;
}
.tty-cell-postspacer {
	flex: 1;
	min-width: 0;
}
.tty-cell-postdate {
	flex: none;
	color: #6f8877;
}
.tty-post-block { margin-bottom: 10px; }
.tty-post-body {
	padding: 2px 16px 0 26px;
	color: #a8bcad;
	white-space: pre-wrap;
	max-width: 82ch;
}
.tty-colhead-topictitle { flex: 1; min-width: 0; }
.tty-colhead-topicmeta { flex: none; color: #4d6455; }

.tty-error {
	padding: 60px 16px;
	text-align: center;
}
.tty-error-code {
	color: #d8a657;
	font-size: 15px;
	letter-spacing: 0.08em;
	margin-bottom: 8px;
}
.tty-error-message {
	color: #9fb3a4;
	font-size: 13.5px;
}

.tty-help {
	position: absolute;
	inset: 0;
	background: rgba(4, 12, 8, 0.94);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 26px;
	overflow-y: auto;
}
.tty-help[hidden] { display: none; }
.tty-help-panel {
	border: 1px solid #2c4436;
	background: #08150e;
	width: 100%;
	max-width: 800px;
	padding: 26px 32px 30px;
}
.tty-help-title {
	color: var(--tty-accent);
	font-size: 13.5px;
	letter-spacing: 0.12em;
	margin-bottom: 20px;
}
.tty-help-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 36px;
	font-size: 14.5px;
	line-height: 1.5;
	color: #b9c9bd;
}
.tty-help-row { display: flex; gap: 12px; }
.tty-help-key { flex: none; width: 13ch; color: #d8a657; }
.tty-help-desc { color: #93a998; }

.tty-compose {
	padding: 10px 16px 0;
}
.tty-compose-error {
	border: 1px solid #d8a657;
	color: #d8a657;
	font-size: 12.5px;
	padding: 6px 10px;
	margin-bottom: 10px;
}
.tty-quote-block {
	border-left: 2px solid #2c4436;
	padding: 2px 0 2px 12px;
	color: #6f8877;
	font-size: 12.5px;
	white-space: pre-wrap;
	max-width: 82ch;
	margin-bottom: 14px;
}
.tty-textarea {
	width: 100%;
	box-sizing: border-box;
	height: 300px;
	resize: none;
	background: #06120c;
	border: 1px solid #2c4436;
	outline: none;
	color: #d3e2d6;
	font-family: inherit;
	font-size: 13.5px;
	line-height: 1.6;
	padding: 10px 12px;
	caret-color: var(--tty-accent);
}
.tty-textarea-short { height: 262px; }
.tty-compose-hints {
	display: flex;
	gap: 18px;
	padding-top: 10px;
	font-size: 12px;
	color: #5f7566;
}
.tty-compose-hints b { color: var(--tty-accent); font-weight: 400; }

.tty-subject-row {
	display: flex;
	align-items: baseline;
	border: 1px solid #2c4436;
	background: #06120c;
	padding: 4px 10px;
	margin-bottom: 10px;
}
.tty-subject-label {
	flex: none;
	color: #6f8877;
	font-size: 12.5px;
	letter-spacing: 0.06em;
	padding-right: 1ch;
}
.tty-subject-input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: #d3e2d6;
	font-family: inherit;
	font-size: 13.5px;
	padding: 2px 0;
	caret-color: var(--tty-accent);
}
.tty-subject-count {
	flex: none;
	color: #4d6455;
	font-size: 11.5px;
}

.tty-status {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-size: 12px;
	padding: 7px 2px 0;
	color: #6f8877;
	background: #06100b;
}
.tty-status-left { display: flex; gap: 12px; }
.tty-mode {
	color: #06120b;
	background: var(--tty-accent);
	padding: 0 6px;
	font-weight: 600;
	letter-spacing: 0.06em;
}
.tty-status-msg { color: #9fb3a4; }

.tty-cmdline {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid #2c4436;
	background: #08150e;
	margin-top: 7px;
	padding: 4px 10px;
}
.tty-cmdline[hidden] { display: none; }
.tty-sigil { color: var(--tty-accent); font-size: 13.5px; flex: none; }
.tty-cmdinput {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: #d3e2d6;
	font-family: inherit;
	font-size: 13.5px;
	padding: 2px 0 2px 1px;
	caret-color: var(--tty-accent);
}
.tty-cmdhint {
	flex: none;
	color: #4d6455;
	font-size: 11.5px;
	letter-spacing: 0.06em;
}

.tty-keybar {
	margin-top: 7px;
	border-top: 1px solid #16281d;
	padding-top: 7px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	font-size: 12px;
}
.tty-key {
	display: flex;
	gap: 5px;
	align-items: baseline;
}
.tty-key b {
	font-weight: 400;
	color: #08150e;
	background: #6f8877;
	padding: 0 4px;
}
.tty-key i {
	font-style: normal;
	color: #7d9384;
}
