@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap");

:root {
	/* Surfaces */
	--bg: #18181b;
	--surface: #1d1d20;
	/* card */
	--surface-2: #232326;
	/* input */
	--border: #37373a;

	/* Foreground */
	--text: #ffffff;
	--text-muted: rgba(255, 255, 255, 0.75);
	--text-dim: rgba(255, 255, 255, 0.45);

	/* Brand (teal) */
	--accent: #00bba7;
	--accent-hover: #19d4c0;
	--accent-dim: rgba(0, 187, 167, 0.15);
	--accent-soft: rgba(0, 187, 167, 0.24);

	/* Status */
	--danger: #fb2c36;
	--danger-dim: rgba(251, 44, 54, 0.15);
	--danger-soft: rgba(251, 44, 54, 0.25);
	/* Success */
	--success: #10b981;
	--success-dim: rgba(16, 185, 129, 0.18);
	--success-soft: rgba(16, 185, 129, 0.28);

	/* Shape */
	--radius-xs: 0.125rem;
	--radius: 0.25rem;
	--radius-lg: 0.5rem;
	--radius-xl: 0.5rem;

	/* Typography */
	--font-sans: "Orbitron", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

*,
::before,
::after {
	border: 0 solid var(--border);
}

html,
body {
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
}

body {
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		radial-gradient(60% 40% at 50% -10%, var(--accent-dim), transparent 70%),
		radial-gradient(40% 30% at 100% 100%, rgba(0, 187, 167, 0.06), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

/* Scrollbar */
* {
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-dim);
}

::selection {
	background: var(--accent);
	color: var(--bg);
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
}

input,
select,
textarea {
	font: inherit;
	color: inherit;
}

code,
kbd,
pre {
	font-family: var(--font-mono);
}

#app {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.nav {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.nav-inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-block: 1rem;
	padding-inline: 0.5rem;
}

.nav-logo {
	display: inline-flex;
	align-items: center;
	padding: 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--text);
}

.nav-logo-name {
	color: var(--text);
}

.nav-logo-tld {
	color: var(--accent);
	background: var(--accent-dim);
	padding: 0 0.125rem;
}

.logo,
.logo-icon,
.logo-box-icon {
	color: var(--accent);
}

.logo-icon,
.logo-box-icon {
	width: 1.75rem;
	height: 1.75rem;
	flex-shrink: 0;
}

#main {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

#main:has(.inbox-layout) {
	align-items: stretch;
	justify-content: flex-start;
	padding: 0;
	min-height: 0;
	overflow: hidden;
}

.hero {
	text-align: center;
	margin-bottom: 2.5rem;
	max-width: 40rem;
}

.hero h1 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.875rem, 4.5vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
	text-transform: none;
}

.hero h1 .highlight {
	color: var(--accent);
}

.hero p {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--text-muted);
	font-weight: 500;
}

.inbox-form {
	width: 100%;
	max-width: 32rem;
}

.inbox-form-card {
	position: relative;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--surface);
	padding: 1.5rem;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}

.inbox-form-title {
	margin: 0 0 0.375rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--text);
	letter-spacing: -0.01em;
}

.inbox-form-desc {
	margin: 0 0 1.25rem;
	font-size: 0.8125rem;
	color: var(--text-muted);
	line-height: 1.5;
}

.inbox-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.inbox-form-group {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
}

.inbox-form-group-full {
	grid-column: 1 / -1;
	margin-bottom: 0;
}

.inbox-form-label {
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	line-height: 1.25;
}

.inbox-form-input-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
}

.inbox-form-input,
.inbox-form-select {
	flex: 1;
	min-width: 0;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	font-size: 0.875rem;
	font-family: var(--font-mono);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.inbox-form-input:focus,
.inbox-form-select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-dim);
}

.inbox-form-select-wrap {
	position: relative;
	display: flex;
	flex: 1;
}

.inbox-form-select {
	width: 100%;
	padding-right: 2rem;
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300bba7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
}

.inbox-form-email {
	flex: 1;
	min-width: 0;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	font-size: 0.875rem;
	font-family: var(--font-mono);
	font-weight: 400;
	font-style: normal;
	display: flex;
	align-items: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.inbox-form-icon-btn {
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text-muted);
	cursor: pointer;
	transition: color 0.15s, background 0.15s, transform 0.15s;
}

.inbox-form-icon-btn:hover {
	color: var(--accent);
	background: var(--accent-dim);
}

.inbox-form-icon-btn-accent {
	background: var(--accent-dim);
	color: var(--accent);
}

.inbox-form-icon-btn-accent:hover {
	background: var(--accent-soft);
	color: var(--accent);
}

#btn-random svg {
	display: inline-block;
	transition: transform 0.2s;
}

#btn-random:hover svg {
	transform: rotate(-90deg);
}

.inbox-form-subdomain-wrap {
	display: flex;
	justify-content: stretch;
	width: 100%;
	margin: 0;
	padding-top: 1rem;
	box-sizing: border-box;
}

.inbox-form-subdomain-wrap .switch-label {
	display: flex;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.inbox-form-subdomain-wrap .switch-text {
	flex: 1;
	min-width: 0;
	text-align: left;
}

.inbox-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
	align-items: stretch;
}

.inbox-form-actions>.inbox-form-btn {
	flex: 1 1 auto;
	min-width: 0;
}

.inbox-form-actions .inbox-form-btn svg {
	flex-shrink: 0;
}

.inbox-form-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 2.5rem;
	padding: 0 1.5rem;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	white-space: nowrap;
	border-radius: var(--radius);
	border: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, transform 0.08s;
}

.inbox-form-btn svg {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.inbox-form-btn:active {
	transform: scale(0.98);
}

.inbox-form-btn:disabled {
	opacity: 0.5;
	pointer-events: none;
}

.inbox-form-btn-primary {
	background: var(--accent-dim);
	color: var(--accent);
}

.inbox-form-btn-primary:hover {
	background: var(--accent-soft);
}

.inbox-form-btn-secondary {
	background: var(--surface-2);
	color: var(--text-muted);
}

.inbox-form-btn-secondary:hover {
	color: var(--text);
	background: var(--surface);
}

.inbox-form-btn.copy-success {
	color: var(--success);
	background: var(--success-dim);
}

.inbox-form-icon-btn.copy-success,
.btn-icon.copy-success,
.btn-icon-sidebar.copy-success {
	color: var(--success);
	background: var(--success-dim);
	animation: copy-blink 0.4s ease;
}

.inbox-form-icon-btn.copy-success:hover,
.btn-icon.copy-success:hover,
.btn-icon-sidebar.copy-success:hover {
	color: var(--success);
}

@keyframes copy-blink {
	0% {
		opacity: 0.7;
		transform: scale(0.94);
	}

	50% {
		opacity: 1;
		transform: scale(1.04);
	}

	100% {
		opacity: 1;
		transform: scale(1);
	}
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s, visibility 0.2s;
}

.modal.modal--hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

.modal-box {
	position: relative;
	width: 100%;
	max-width: 32rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 1.5rem;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.modal-title {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--text);
	letter-spacing: -0.01em;
}

.modal-body {
	margin-bottom: 1.25rem;
}

.modal-body.inbox-form-card-fields .inbox-form-grid {
	gap: 0.75rem;
}

.modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0 1rem;
	height: 2.125rem;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	white-space: nowrap;
	border-radius: var(--radius);
	border: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, transform 0.08s;
}

.btn svg {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.btn:active {
	transform: scale(0.98);
}

.btn:disabled {
	opacity: 0.5;
	pointer-events: none;
}

.btn-primary {
	background: var(--accent-dim);
	color: var(--accent);
}

.btn-primary:hover {
	background: var(--accent-soft);
}

.btn-secondary,
.btn-outline,
.btn-sidebar {
	background: var(--surface-2);
	color: var(--text-muted);
}

.btn-secondary:hover,
.btn-outline:hover,
.btn-sidebar:hover {
	color: var(--text);
	background: var(--surface);
}

.btn-icon {
	flex-shrink: 0;
	width: 2.125rem;
	height: 2.125rem;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text-muted);
	cursor: pointer;
	transition: color 0.15s, background 0.15s;
}

.btn-icon:hover {
	color: var(--accent);
	background: var(--accent-dim);
}

.btn-danger {
	background: var(--danger-dim);
	color: #fca5a5;
	border: none;
}

.btn-danger:hover {
	background: var(--danger-soft);
	color: #fecaca;
}

.btn-danger:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-danger:disabled:hover {
	background: var(--danger-dim);
	color: #fca5a5;
}

.loading,
.error {
	text-align: center;
	padding: 2rem;
	color: var(--text-muted);
	font-size: 0.875rem;
}

.error {
	color: #f87171;
}

.empty-state-art {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	flex-shrink: 0;
	min-height: 6.75rem;
	box-sizing: border-box;
}

.empty-state-art-disk {
	width: 6rem;
	height: 6rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	box-sizing: border-box;
}

.empty-state-art-disk--accent {
	background: var(--accent-dim);
	color: var(--accent);
}

.empty-state-art-disk--error {
	background: var(--danger-dim);
	color: var(--danger);
}

.empty-state-art-disk--muted {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text-muted);
}

.empty-state-art-icon-svg {
	width: 54%;
	height: 54%;
	overflow: visible;
	display: block;
}

.empty-state-spinner {
	width: 2.625rem;
	height: 2.625rem;
	box-sizing: border-box;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: empty-state-spin 0.65s linear infinite;
	flex-shrink: 0;
}

.empty-state-art-disk .empty-state-spinner {
	width: 2.125rem;
	height: 2.125rem;
}

@keyframes empty-state-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.empty-state-spinner {
		animation: none;
		border-color: rgba(0, 187, 167, 0.45);
		opacity: 0.9;
	}
}

.api-offline-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0 1.5rem;
	height: 2.125rem;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	border: none;
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text-muted);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, transform 0.08s;
}

.api-offline-btn:hover {
	color: var(--text);
	background: var(--surface);
}

.api-offline-btn:active {
	transform: scale(0.98);
}

.state-note {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	max-width: 28rem;
	width: 100%;
	margin: 0;
	padding: 0;
	align-self: center;
	box-sizing: border-box;
	text-align: center;
}

.empty-state>.state-note {
	flex-shrink: 0;
}

.empty-state>.api-offline-btn {
	align-self: center;
	flex-shrink: 0;
}

.state-note-label {
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	line-height: 1.25;
}

.state-note-chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	justify-content: center;
}

.state-note-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.5rem;
	border-radius: var(--radius-xs);
	background: var(--surface-2);
	color: var(--accent);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.25;
}

.hero:has(.empty-state) {
	display: flex;
	align-items: stretch;
	justify-content: center;
	width: 100%;
	max-width: none;
	min-height: 60vh;
	margin: 0;
	padding: 0;
}

.hero:has(.empty-state) .empty-state {
	width: 100%;
	max-width: 36rem;
	margin-inline: auto;
}

.inbox-layout {
	display: grid;
	grid-template-columns: 400px 1fr;
	width: 100%;
	min-height: 0;
	flex: 1;
	align-self: stretch;
	align-items: stretch;
}

.inbox-sidebar {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	border-right: 1px solid var(--border);
	background: var(--bg);
	overflow: hidden;
}

.sidebar-card {
	display: flex;
	flex-direction: column;
	gap: 0.44rem;
	padding: 1rem;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.sidebar-identity-head {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sidebar-identity-subhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.44rem;
	margin-top: 0;
	min-width: 0;
}

.sidebar-subhead-badges {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	flex-shrink: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.sidebar-identity-desc {
	margin: 0;
	flex: 1;
	min-width: 0;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	color: var(--text-muted);
}

.sidebar-identity {
	display: flex;
	flex-direction: column;
	gap: 0.44rem;
}

.identity-row {
	display: flex;
	align-items: center;
	gap: 0.44rem;
	min-width: 0;
}

.identity-code {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	height: 2.125rem;
	padding: 0 0.75rem;
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text);
	font-family: var(--font-mono);
	font-weight: 400;
	font-style: normal;
	font-size: 0.875rem;
	line-height: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.identity-copy-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.125rem;
	height: 2.125rem;
	padding: 0;
	border: none;
	border-radius: var(--radius);
	background: var(--accent-dim);
	color: var(--accent);
	cursor: pointer;
	transition: background 0.15s, transform 0.08s;
}

.identity-copy-btn:hover {
	background: var(--accent-soft);
}

.identity-copy-btn:active {
	transform: scale(0.98);
}

.identity-copy-btn svg {
	width: 1rem;
	height: 1rem;
}

.identity-copy-btn.copy-success {
	color: var(--success);
	background: var(--success-dim);
	animation: copy-blink 0.4s ease;
}

/* Actions rows */
.identity-actions {
	display: flex;
	flex-direction: column;
	gap: 0.44rem;
}

.identity-actions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.44rem;
}

.identity-actions-row>* {
	flex: 1 1 0;
	min-width: 0;
}

.btn-identity {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 2.125rem;
	padding: 0 1rem;
	border-radius: var(--radius);
	border: none;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, transform 0.08s;
}

.btn-identity:active {
	transform: scale(0.98);
}

.btn-identity:disabled {
	opacity: 0.5;
	pointer-events: none;
}

.btn-identity-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.btn-identity-icon svg {
	width: 1rem;
	height: 1rem;
}

.btn-identity-default {
	background: var(--surface-2);
	color: var(--text-muted);
}

.btn-identity-default:hover {
	background: var(--accent-soft);
	color: var(--accent);
}

.btn-identity-default .btn-identity-icon {
	transition: transform 0.2s;
}

.btn-identity-default:hover .btn-identity-icon {
	transform: rotate(-90deg);
}

.btn-identity-primary {
	background: var(--accent-dim);
	color: var(--accent);
}

.btn-identity-primary:hover {
	background: var(--accent-soft);
}

.btn-identity-danger {
	background: var(--danger-dim);
	color: var(--danger);
}

.btn-identity-danger:hover:not(:disabled) {
	background: var(--danger-soft);
}

.switch-label {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	flex-direction: row-reverse;
	gap: 0.5rem;
	height: 2.125rem;
	padding: 0 0.75rem;
	border-radius: var(--radius);
	background: var(--surface-2);
	color: var(--text-muted);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.25;
	cursor: pointer;
	user-select: none;
	transition: background 0.15s, color 0.15s;
}

.switch-label:hover {
	background: var(--surface);
	color: var(--text);
}

.switch-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.switch-wrap input {
	position: absolute;
	opacity: 0;
	inset: 0;
	cursor: pointer;
}

.switch-track {
	width: 2rem;
	height: 1.125rem;
	border-radius: var(--radius-xs);
	background: var(--surface);
	outline: 1px solid var(--border);
	position: relative;
	transition: background 0.2s;
	display: block;
}

.switch-thumb {
	position: absolute;
	width: 0.875rem;
	height: 0.875rem;
	top: 0.125rem;
	left: 0.125rem;
	background: var(--border);
	border-radius: var(--radius-xs);
	transition: transform 0.2s, background 0.2s;
}

.switch-wrap input:checked+.switch-track .switch-thumb {
	transform: translateX(0.875rem);
	background: var(--accent);
}

.switch-text {
	line-height: 1.25;
}

.identity-count {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	padding: 0 0.5rem;
	height: 1.25rem;
	border-radius: var(--radius-xs);
	background: var(--accent-dim);
	color: var(--accent);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1;
}

.identity-count--with-icon {
	gap: 0.375rem;
}

.identity-count--with-icon svg {
	width: 0.75rem;
	height: 0.75rem;
	flex-shrink: 0;
}

.sidebar-secondary {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.sidebar-secondary:empty {
	display: none;
}

.sidebar-label {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	line-height: 1.25;
}

.sidebar-inbox-card {
	width: 100%;
	padding: 0.375rem;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
}

.sidebar-inbox-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	max-height: 14rem;
	overflow-y: auto;
}

.sidebar-inbox-list-item {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	min-width: 0;
	padding: 0.125rem 0.25rem;
	border-radius: var(--radius-xs);
	transition: background 0.15s;
}

.sidebar-inbox-list-item:hover {
	background: var(--accent-dim);
}

.sidebar-inbox-list-link {
	font-size: 0.75rem;
	font-family: var(--font-mono);
	font-weight: 400;
	font-style: normal;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
	min-width: 0;
	padding: 0.25rem 0.125rem;
	transition: color 0.15s;
}

.sidebar-inbox-list-item:hover .sidebar-inbox-list-link {
	color: var(--accent);
}

.sidebar-inbox-list-remove {
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	background: transparent;
	color: var(--text-dim);
	cursor: pointer;
	border-radius: var(--radius-xs);
	transition: color 0.15s, background 0.15s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sidebar-inbox-list-remove svg {
	width: 0.875rem;
	height: 0.875rem;
}

.sidebar-inbox-list-remove:hover {
	color: var(--danger);
	background: var(--danger-dim);
}

.inbox-main-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bg);
}

.inbox-main-content {
	flex: 1;
	min-height: 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#inbox-content {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.empty-state {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	padding: 1rem;
	overflow: hidden;
	min-height: 0;
	width: 100%;
	box-sizing: border-box;
}

.empty-state.empty-state--loading .empty-desc {
	margin: 0;
}

.empty-state-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	text-align: center;
	max-width: 28rem;
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.empty-state .empty-title {
	margin: 0;
	width: 100%;
	max-width: 28rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	color: var(--text);
	letter-spacing: 0;
	text-align: center;
}

.empty-state .empty-desc {
	margin: 0;
	width: 100%;
	max-width: 28rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--text-muted);
	text-align: center;
	text-wrap: pretty;
}

.empty-state .empty-email {
	font-family: var(--font-mono);
	font-weight: 400;
	font-style: normal;
	color: var(--text);
}

.email-list-wrap {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.email-list-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.email-list-header-icon {
	width: 0.875rem;
	height: 0.875rem;
	color: var(--accent);
	flex-shrink: 0;
}

.email-list {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 0.5rem;
	gap: 0.125rem;
}

.email-item {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	width: 100%;
	padding: 0.625rem;
	text-align: left;
	background: transparent;
	border: none;
	border-radius: var(--radius);
	color: var(--text);
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	transition: background 0.15s;
}

.email-item:hover {
	background: var(--surface);
}

.email-item:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	background: var(--surface);
}

.email-item-avatar {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: var(--radius-lg);
	background: var(--accent-dim);
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9375rem;
	font-weight: 700;
}

.email-item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.email-item-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.email-item-from {
	font-size: 0.8125rem;
	font-family: var(--font-mono);
	font-weight: 400;
	font-style: normal;
	color: var(--text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	letter-spacing: 0;
}

.email-item-time {
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--text-muted);
	flex-shrink: 0;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.email-item-subject {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.email-item-attachments {
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-left: 0.375rem;
}

.email-detail {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	max-width: 100%;
	padding: 0;
	background: var(--surface);
}

.email-detail-toolbar {
	flex-shrink: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
}

.email-detail-back-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 0.5rem 0.75rem;
	border: none;
	border-radius: var(--radius);
	background: transparent;
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition:
		color 0.15s,
		background 0.15s,
		transform 0.08s;
}

.email-detail-back-btn:hover {
	color: var(--accent);
	background: var(--accent-dim);
}

.email-detail-back-btn:active {
	transform: scale(0.98);
}

.email-detail-back-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.email-detail-back-icon {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.email-detail-toolbar-actions {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 0.5rem;
}

.email-view-tablist {
	display: flex;
	flex-shrink: 0;
	align-items: stretch;
	height: 2.125rem;
	padding: 0.125rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--bg);
	box-sizing: border-box;
}

.email-view-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	padding: 0 1rem;
	font-size: 0.75rem;
	font-family: var(--font-sans);
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1;
	border: none;
	border-radius: var(--radius-xs);
	background: transparent;
	color: var(--text-muted);
	cursor: pointer;
	transition:
		background 0.15s,
		color 0.15s;
	box-sizing: border-box;
}

.email-view-tab:hover:not(:disabled) {
	color: var(--text);
}

.email-view-tab:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.email-view-tab--active {
	background: var(--accent-dim);
	color: var(--accent);
}

.email-view-tab-label {
	display: block;
	width: 4ch;
	text-align: center;
}

.email-detail-delete-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.125rem;
	height: 2.125rem;
	flex-shrink: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: var(--danger-dim);
	color: var(--danger);
	cursor: pointer;
	transition:
		background 0.15s,
		color 0.15s,
		border-color 0.15s,
		transform 0.08s;
}

.email-detail-delete-icon:hover {
	background: var(--danger-soft);
	color: var(--danger);
	border-color: transparent;
}

.email-detail-delete-icon:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px var(--danger);
}

.email-detail-toolbar-trash-svg {
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
}

.email-detail-section {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
	padding: 1rem;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.email-detail-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem;
	min-width: 0;
}

.email-detail-subject {
	margin: 0;
	flex: 1;
	min-width: 0;
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--text);
	word-break: break-word;
	letter-spacing: -0.01em;
}

@media (min-width: 640px) {
	.email-detail-subject {
		font-size: 1.375rem;
	}
}

.email-detail-section-time {
	flex-shrink: 0;
	font-size: 0.75rem;
	line-height: 1.25;
	font-weight: 600;
	color: var(--text-muted);
}

.email-detail-sender-block {
	display: flex;
	min-width: 0;
	align-items: flex-start;
	gap: 0.5rem;
}

@media (min-width: 640px) {
	.email-detail-sender-block {
		align-items: center;
	}
}

.email-detail-sender-block .email-detail-avatar {
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1rem;
}

@media (min-width: 1024px) {
	.email-detail-sender-block .email-detail-avatar {
		width: 3rem;
		height: 3rem;
		font-size: 1.125rem;
	}
}

.email-detail-sender-block .email-detail-meta {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.email-detail-sender-block .email-detail-from-line {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.125rem;
	margin-bottom: 0;
	min-width: 0;
}

@media (min-width: 640px) {
	.email-detail-sender-block .email-detail-from-line {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.5rem;
	}
}

.email-detail-from-name {
	min-width: 0;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.1;
	color: var(--text);
	word-break: break-word;
}

.email-detail-sender-block .email-detail-from-address {
	font-size: 0.875rem;
	line-height: 1.25;
	color: var(--text-muted);
	word-break: break-all;
}

.email-detail-sender-block .email-detail-to {
	font-size: 0.875rem;
	line-height: 1;
	color: var(--text-muted);
	white-space: normal;
	word-break: break-all;
}

.email-detail-avatar {
	flex-shrink: 0;
	border-radius: var(--radius-lg);
	background: var(--accent-dim);
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.email-detail-body-wrap {
	flex: 1;
	min-height: 0;
	overflow: auto;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	padding: 1rem;
	box-sizing: border-box;
}

.email-detail-body {
	flex: 0 0 auto;
	height: clamp(300px, 50vh, 540px);
	display: flex;
	flex-direction: column;
	position: relative;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
	box-sizing: border-box;
}

.email-body-content {
	flex: 1;
	min-height: 0;
	width: 100%;
	overflow: auto;
	box-sizing: border-box;
}

.email-body-txt {
	white-space: pre-wrap;
	word-break: break-word;
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 0.875rem;
	line-height: 1.6;
	padding: 1rem;
	background: transparent;
	min-height: 100%;
	box-sizing: border-box;
}

.email-body-html {
	max-width: 100%;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	overflow: hidden;
}

.email-body-html-iframe {
	flex: 1;
	min-height: 0;
	width: 100%;
	height: 100%;
	border: none;
	background: #fff;
}

.email-body-html img {
	max-width: 100%;
	height: auto;
}

.email-body-html a {
	color: var(--accent);
}

.toast {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	padding: 0.625rem 1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text);
	z-index: 1000;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
	animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translate(-50%, 8px);
	}

	to {
		opacity: 1;
		transform: translate(-50%, 0);
	}
}

.footer {
	flex-shrink: 0;
	text-align: center;
	padding: 1rem;
	border-top: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-dim);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
}

.footer p {
	margin: 0;
}

.inbox-mobile-header {
	display: none;
}

.inbox-sidebar-backdrop {
	display: none;
}

@media (max-width: 900px) {
	.inbox-layout {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.inbox-sidebar {
		border-right: none;
		border-bottom: 1px solid var(--border);
		flex-shrink: 0;
		overflow: visible;
	}

	.sidebar-card {
		border-bottom: none;
	}

	.sidebar-secondary {
		padding: 0 1rem 1rem;
		overflow: visible;
	}

	.sidebar-identity {
		flex-direction: column;
	}

	.switch-label--auto-refresh {
		display: none;
	}

	.inbox-main-wrap {
		min-height: 360px;
	}
}

@media (max-width: 480px) {
	.inbox-form-grid {
		grid-template-columns: 1fr;
	}

	.inbox-form-actions>.inbox-form-btn {
		flex: 1 1 100%;
	}

	.identity-actions-row>* {
		flex: 1 1 100%;
	}
}