:root {
	--bg: #fafafa;
	--surface: #ffffff;
	--ink: #0a0a0a;
	--ink-2: #737373;
	--line: #e5e5e5;
	--hover: #f2f7ff;
	--sel: #d9e8ff;
	--accent: #0069ff;
	--accent-2: #0052cc;
	--danger: #b3261e;
	--ok-bg: #ecfdf5;
	--search-bg: #e8f1ff;
	--radius: 12px;
	--bar: 56px;
	--labels: 240px;
	--list: minmax(16rem, 22rem);
	--t: 160ms;
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	font-family: "Segoe UI", system-ui, "Noto Sans", "Noto Sans Vietnamese", sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--ink);
	background: var(--bg);
	color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
::selection { background: var(--sel); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, textarea { caret-color: var(--accent); }
button, a { touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2 { font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 0.75rem; }

.bar {
	height: var(--bar);
	flex: none;
	display: flex; align-items: center; gap: 0.75rem;
	padding: 0 0.75rem 0 1rem;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}
.bar .brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	flex: none;
	margin: 0;
	color: inherit;
	text-decoration: none;
}
.bar .brand img {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	flex: none;
}
.bar .brand-text {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	min-width: 0;
}
.bar .brand-name {
	font-size: 1.05rem;
	font-weight: 650;
	letter-spacing: -0.03em;
	line-height: 1;
	white-space: nowrap;
}
.bar .brand-parent {
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--ink-2);
	line-height: 1;
	white-space: nowrap;
}
.bar .grow { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar nav { display: flex; gap: 0.5rem; align-items: center; margin-left: auto; }
.bar form { margin: 0; }
.bar-search {
	flex: 1;
	max-width: 36rem;
	margin: 0 1rem 0 0.5rem !important;
}
.bar-search input {
	width: 100%;
	height: 2.75rem;
	background: var(--search-bg);
	border: 0;
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
}
.bar-search input:focus { background: var(--surface); }
.nav-sec {
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-2);
	padding: 1rem 0.75rem 0.35rem;
	margin: 0;
}
.nav-box {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.nav-box .count {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
	font-size: 0.75rem;
	color: var(--ink-2);
}
.list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid var(--line);
	background: var(--surface);
	font-weight: 650;
}
.list-head-tools {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: none;
}
.inbox-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 1rem 0.7rem;
	border-bottom: 1px solid var(--line);
	background: var(--surface);
}
.inbox-toolbar .grow {
	flex: 1 1 10rem;
	min-width: 0;
	color: var(--ink-2);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.copy-id {
	display: inline-block;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
	text-decoration-color: var(--line);
	word-break: break-all;
	max-width: 100%;
}
.copy-id:hover { color: var(--accent-2); text-decoration-color: var(--accent); }
.list-head .copy-id,
.inbox-toolbar .copy-id,
h2 .copy-id {
	text-decoration: none;
	font-weight: 650;
}
.copy-id-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85em;
}
.copy-id[hidden] { display: none !important; }
.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;
}
.mail-html {
	max-width: 72ch;
	font-size: 0.95rem;
	line-height: 1.55;
	overflow-wrap: anywhere;
}
.mail-html p { margin: 0 0 0.65rem; }
.mail-html p:empty, .mail-html div:empty { display: none; }
.mail-html table { border-collapse: collapse; max-width: 100%; }
.mail-html td, .mail-html th { padding: 0.15rem 0.4rem; vertical-align: top; }
.mail-html a { color: var(--accent); }
.mail-plain {
	white-space: pre-wrap;
	max-width: 72ch;
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0;
	overflow-wrap: anywhere;
}
.mail-frame-wrap {
	flex: 1 1 auto;
	min-height: 12rem;
	display: flex;
	flex-direction: column;
}
.mail-frame {
	width: 100%;
	flex: 1 1 auto;
	min-height: 12rem;
	height: 100%;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
}

.btn-back { display: none; }
.nav-scrim {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(31, 31, 31, 0.4);
	z-index: 28;
	border: 0;
}
.nav-scrim[hidden] { display: none !important; }
.shell.guest-shell { grid-template-columns: 1fr; }
.site-foot {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.25rem;
	padding: 0.35rem 1rem max(0.4rem, env(safe-area-inset-bottom));
	border-top: 1px solid var(--line);
	background: var(--surface);
}
.platform-brand {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--ink-2);
}
.platform-brand a {
	color: inherit;
	text-decoration: none;
}
.platform-brand a:hover { color: var(--accent); }
.guest-shell .mail-split { grid-template-columns: 1fr; border-radius: 16px 0 0 0; overflow: hidden; }
body.is-reading .labels,
body.is-reading .nav-scrim { display: none !important; }
body.is-reading .shell { grid-template-columns: 1fr; }
body.is-reading .pane-list { display: none !important; }
body.is-reading .mail-split { grid-template-columns: 1fr; }
body.is-reading .pane-read {
	display: flex !important;
	flex-direction: column;
	min-height: 0;
	height: 100%;
	padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
}
body.is-reading .btn-back,
body.is-reading a.btn.btn-back,
body.is-reading #msg-back { display: inline-flex !important; }
body.is-reading .mail-frame-wrap { flex: 1 1 auto; min-height: 12rem; display: flex; }
body.is-reading .mail-frame {
	flex: 1 1 auto;
	width: 100%;
	min-height: calc(100dvh - 9rem);
	height: 100%;
}

html:has(.guest-read), body:has(.guest-read) {
	height: 100dvh;
	overflow: hidden;
}
body:has(.guest-read) { display: flex; flex-direction: column; }
body:has(.guest-read) .site-foot { display: none; }
.guest-read {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	display: flex;
	flex-direction: column;
	padding: 0.75rem 0.75rem 0;
	background: var(--surface);
}
.guest-read .read-head { flex: none; padding: 0 0.25rem 0.75rem; }
.guest-read .mail-frame-wrap {
	flex: 1 1 auto;
	min-height: 12rem;
	display: flex;
}
.guest-read .mail-frame {
	flex: 1 1 auto;
	width: 100%;
	min-height: calc(100dvh - 9rem);
	height: 100%;
	border: 1px solid var(--line);
	border-radius: 8px 8px 0 0;
	background: #fff;
}






.row-mail .mid {
	grid-column: 2;
	min-width: 0;
	display: flex;
	gap: 0.35rem;
	overflow: hidden;
}
.row-mail .snip {
	flex: 1 1 0;
	min-width: 0;
	font-size: 0.8rem;
	color: var(--ink-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.row-mail .snip::before { content: "— "; }
.ico {
	width: 1.25rem;
	height: 1.25rem;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.btn { gap: 0.4rem; }
.btn-icon {
	padding: 0.45rem;
	min-width: 2.1rem;
}
.mail-html {
	max-width: 72ch;
	font-size: 0.95rem;
	line-height: 1.55;
}
.mail-html p { margin: 0 0 0.65rem; }
.mail-html p:empty, .mail-html div:empty { display: none; }
.mail-html table { border-collapse: collapse; max-width: 100%; }
.mail-html td, .mail-html th { padding: 0.15rem 0.4rem; vertical-align: top; }
.mail-html a { color: var(--accent); }
.mail-plain {
	white-space: pre-wrap;
	max-width: 72ch;
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.55;
	margin: 0;
}
.hop-row {
	display: grid;
	gap: 0.2rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--line);
}
.hop-row .hop-email { font-weight: 650; word-break: break-all; }
.hop-row .hop-meta { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.hop-row .hop-meta .num { font-variant-numeric: tabular-nums; }
.hop-row .row-actions { margin-top: 0.45rem; }
#hop-list .skel-row { margin-left: 0; margin-right: 0; }
#hop-error { margin: 0 0 1rem; }
.chip {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 650;
	padding: 0.12rem 0.55rem;
	border-radius: 999px;
	background: #fff7ed;
	color: #9a3412;
}
.chip.ok { background: var(--ok-bg); color: #0d652d; }
.domain-row {
	display: grid;
	gap: 0.35rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--line);
}
.domain-row .domain-name { font-weight: 650; word-break: break-all; }
.domain-row .row-actions { margin-top: 0.45rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
#create-preview { margin: 0.35rem 0 0; }

.shell {
	flex: 1;
	display: grid;
	grid-template-columns: var(--labels) 1fr;
	min-height: 0;
	overflow: hidden;
}
.labels {
	background: var(--bg);
	padding: 0.75rem;
	border-right: 1px solid var(--line);
	overflow: auto;
	min-height: 0;
}
.mail-split {
	display: grid;
	grid-template-columns: var(--list) minmax(0, 1fr);
	flex: 1;
	min-height: 0;
	height: 100%;
	background: var(--surface);
	overflow: hidden;
}
.pane-list { overflow: auto; border-right: 1px solid var(--line); min-height: 0; min-width: 0; }
.pane-read { overflow: auto; min-height: 0; min-width: 0; padding: 1.25rem 1.5rem 3rem; }
@media (max-width: 800px) {
	.shell { grid-template-columns: 1fr; }
	.mail-split { grid-template-columns: 1fr; }
	.mail-split[data-open="0"] .pane-read { display: none !important; }
	.mail-split[data-open="1"] .pane-list { display: none !important; }
	.mail-split[data-open="1"] .pane-read {
		display: flex;
		flex-direction: column;
		min-height: 0;
		height: 100%;
		padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
	}
	.mail-split[data-open="1"] .mail-frame-wrap {
		flex: 1 1 auto;
		min-height: 0;
	}
	.mail-split[data-open="1"] .mail-frame {
		min-height: 0;
		height: 100%;
	}
	.row-mail { grid-template-columns: 1fr auto; }
	.row-mail .from { grid-column: 1; }
	.row-mail .time { grid-column: 2; }
	.row-mail .mid { grid-column: 1 / -1; display: block; }
	.row-mail .sub, .row-mail .snip { max-width: none; display: block; }
	.row-mail .snip::before { content: none; }
}


.auth-screen {
	flex: 1;
	min-height: 0;
	overflow: auto;
	display: grid;
	place-items: center;
	padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
	background:
		radial-gradient(ellipse 80% 46% at 50% -8%, rgba(0, 105, 255, 0.12), transparent 58%),
		radial-gradient(ellipse 50% 30% at 90% 110%, rgba(16, 185, 129, 0.08), transparent 60%),
		var(--bg);
}
.auth {
	width: min(24rem, 100%);
	margin: 0;
	padding: 2rem 1.5rem 1.5rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
}
.auth h1 { text-align: center; font-size: 1.5rem; margin: 0 0 0.15rem; }
.auth .brand { margin: 0 0 0.75rem; }
.auth .brand img {
	display: block;
	margin: 0 auto;
	width: 80px;
	height: 80px;
	border-radius: 20px;
}
.auth-parent {
	text-align: center;
	margin: 0 0 1rem;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--ink-2);
}
.auth-lead {
	text-align: center;
	color: var(--ink-2);
	margin: 0 0 1.25rem;
}
.auth .error {
	text-align: center;
	margin: 0 0 1rem;
	color: var(--danger);
	font-weight: 600;
	padding: 0.6rem 0.75rem;
	background: #fce8e6;
	border-radius: 8px;
	word-break: break-word;
}
.auth .btn-primary { width: 100%; margin-top: 1.25rem; min-height: 2.75rem; gap: 0.5rem; }
.auth form.is-wait .btn-primary { opacity: 0.8; }
.btn[aria-busy="true"]::before {
	content: "";
	width: 1rem;
	height: 1rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-code {
	text-align: center;
	letter-spacing: 0.4em;
	font-size: 1.25rem;
	font-variant-numeric: tabular-nums;
}
.auth-back { text-align: center; margin: 1rem 0 0; }
.auth-back .btn { min-height: 2.75rem; }
label.field, .field { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin: 1rem 0 0.45rem; }
input, select, textarea {
	width: 100%;
	font: inherit;
	font-size: 1rem;
	color: inherit;
	padding: 0.7rem 0.75rem;
	min-height: 2.75rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.btn, a.btn {
	font: inherit;
	color: inherit;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	padding: 0.5rem 1rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--hover);
	cursor: pointer;
	font-weight: 600;
	transition: background var(--t) var(--ease), color var(--t) var(--ease), opacity var(--t) var(--ease);
}
.btn:hover:not(:disabled) { background: var(--sel); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #fce8e6; }
.btn.nav-toggle, .btn.btn-back, a.btn.btn-back { display: none; }

.skel { padding: 0.5rem 0; }
.skel-row {
	height: 3.2rem;
	margin: 0.35rem 1rem;
	border-radius: 8px;
	background: linear-gradient(90deg, var(--hover) 0%, var(--sel) 50%, var(--hover) 100%);
	background-size: 200% 100%;
	animation: skel 1.1s var(--ease) infinite;
}
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.skel-row { background: var(--hover); }
}

.muted { color: var(--ink-2); }
.error { color: var(--danger); font-weight: 600; }
.note {
	padding: 0.75rem 0.9rem;
	border-radius: 8px;
	background: var(--ok-bg);
	color: #0d652d;
	margin: 0 0 1rem;
}
.warn {
	padding: 0.75rem 0.9rem;
	border-radius: 8px;
	background: #fce8e6;
	color: var(--danger);
	margin: 0 0 1rem;
}

.row-mail {
	display: grid;
	grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 0.15rem 0.75rem;
	width: 100%;
	padding: 0.7rem 1rem;
	border: 0;
	border-radius: 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	background: var(--surface);
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}
.row-mail:hover { background: var(--hover); }
.row-mail.is-on { background: var(--sel); }
.row-mail .from {
	font-weight: 650;
	grid-column: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.row-mail .time { font-size: 0.75rem; color: var(--ink-2); grid-column: 3; font-variant-numeric: tabular-nums; }
.row-mail .sub {
	flex: 0 1 auto;
	max-width: 70%;
	font-size: 0.9rem;
	color: var(--ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}


.nav-box {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	text-align: left;
	padding: 0.55rem 0.75rem;
	border-radius: 0 999px 999px 0;
	text-decoration: none;
	color: var(--ink);
	font-weight: 600;
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
}
.nav-box:hover { background: var(--hover); }
.nav-box.is-on { background: var(--sel); color: var(--accent-2); }

.body {
	white-space: pre-wrap;
	max-width: 72ch;
	font-size: 0.95rem;
	line-height: 1.6;
}
.read-head { margin-bottom: 1.25rem; }
.read-head h2 { font-size: 1.4rem; margin-bottom: 0.35rem; }

.dialog-scrim {
	position: fixed; inset: 0;
	background: rgba(31, 31, 31, 0.4);
	display: grid; place-items: center;
	padding: 1rem;
	z-index: 40;
}

.dialog-scrim[hidden] { display: none; }
.dialog {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 1.25rem 1.35rem 1.4rem;
	width: min(28rem, 100%);
	box-shadow: 0 8px 32px rgba(31, 31, 31, 0.16);
}
.dialog.wide {
	width: min(44rem, calc(100vw - 2rem));
	max-height: min(90dvh, 52rem);
	overflow: auto;
	padding: 1.5rem 1.75rem 1.75rem;
}
.dialog h2 { margin-top: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
code { font-size: 0.85em; word-break: break-all; }

.dash { overflow: auto; min-height: 0; padding: 1.25rem 1.5rem 2.5rem; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table th {
	text-align: left;
	font-size: 0.75rem;
	font-weight: 650;
	color: var(--ink-2);
	padding: 0.45rem 0.75rem;
	border-bottom: 1px solid var(--line);
}
.table td { padding: 0.8rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .num { font-variant-numeric: tabular-nums; }
.pill {
	display: inline-block;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 650;
}
.pill-ok { background: var(--ok-bg); color: #0d652d; }
.pill-warn { background: #fce8e6; color: var(--danger); }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.empty {
	padding: 2.5rem 1.25rem;
	text-align: center;
	color: var(--ink-2);
}
.presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.preset {
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
}
.preset:hover { border-color: var(--accent); color: var(--accent); background: var(--hover); }
.sentence { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0 0 1rem; }
.sentence select, .sentence input { width: auto; min-width: 7rem; }
.sentence input[name="value"] { min-width: 10rem; flex: 1; }
.status-line {
	padding: 0.85rem 1rem;
	margin: 0 0 1rem;
	border-radius: 8px;
	background: var(--hover);
}
.status-line.ok { background: var(--ok-bg); color: #0d652d; }
.status-line.warn { background: #fce8e6; color: var(--danger); }
.rule-item {
	display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--line);
}
#rule-list, #link-list, #issued-list { list-style: none; margin: 0; padding: 0; }
.issued-item {
	display: grid;
	gap: 0.4rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
}
.issued-item code { display: block; word-break: break-all; }
.issued-item .dialog-actions { margin: 0; }
.issued-item.is-copied .muted { color: #0d652d; }

@media (max-width: 800px) {
	.btn.nav-toggle, .btn.btn-back, a.btn.btn-back { display: inline-flex; }

	.nav-toggle { display: inline-flex; }
	.bar {
		display: grid;
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "menu brand out" "search search search";
		height: auto;
		align-items: center;
		gap: 0.4rem 0.5rem;
		padding: max(0.4rem, env(safe-area-inset-top)) 0.65rem 0.55rem;
		position: relative;
		z-index: 35;
	}
	.nav-toggle { grid-area: menu; }
	.bar .brand { grid-area: brand; justify-self: start; }
	.bar nav { grid-area: out; margin: 0; }
	.bar-search {
		grid-area: search;
		max-width: none;
		margin: 0 !important;
	}
	.bar .grow { grid-area: search; }
	.bar.guest-bar {
		grid-template-columns: 1fr;
		grid-template-areas: "brand" "search";
	}
	.bar.guest-bar-read { grid-template-columns: auto 1fr; grid-template-areas: "back brand"; }
	.guest-bar-read #guest-back { grid-area: back; }
	.guest-bar-read .brand { grid-area: brand; }
	.shell { position: relative; }
	.labels {
		position: absolute;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(18.5rem, 86vw);
		max-height: none;
		z-index: 30;
		transform: translateX(-105%);
		transition: transform var(--t) var(--ease);
		border-right: 1px solid var(--line);
		border-bottom: 0;
		padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
		background: var(--bg);
	}
	body.nav-open .labels { transform: none; }
	body.nav-open .nav-scrim {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(31, 31, 31, 0.4);
		z-index: 28;
	}

	.btn-back {
		display: inline-flex;
		position: sticky;
		top: 0;
		z-index: 1;
		margin: 0 0 0.75rem;
		background: var(--surface);
	}
	.dialog-scrim {
		place-items: end stretch;
		padding: 0;
		align-items: end;
	}
	.dialog, .dialog.wide {
		width: 100%;
		max-width: none;
		border-radius: 16px 16px 0 0;
		max-height: min(92dvh, 100%);
		padding: 1.15rem 1.15rem max(1.25rem, env(safe-area-inset-bottom));
	}
	.dash { padding: 1rem 1rem max(2rem, env(safe-area-inset-bottom)); }
	.table thead { display: none; }
	.table, .table tbody, .table tr, .table td { display: block; width: 100%; }
	.table tr {
		padding: 0.95rem 0;
		border-bottom: 1px solid var(--line);
	}
	.table td {
		padding: 0.15rem 0;
		border: 0;
	}
	.table td.inbox-addr { font-weight: 650; word-break: break-all; }
	.table td[data-label]::before {
		content: attr(data-label) " ";
		color: var(--ink-2);
		font-weight: 500;
	}
	.table td.row-actions {
		margin-top: 0.55rem;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.4rem;
	}
	.table td.row-actions .btn { width: 100%; }
	.hop-row .row-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.4rem;
	}
	.hop-row .row-actions .btn { width: 100%; }
	.sentence select, .sentence input { width: 100%; min-width: 0; }
	.inbox-toolbar {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
	.inbox-toolbar .grow { grid-column: 1 / -1; }
	.inbox-toolbar .btn { width: 100%; flex: none; }
}
@media (pointer: coarse) {
	.copy-id { min-height: 44px; padding: 0.35rem 0; }
	.btn, a.btn { min-height: 44px; }
	.btn-icon { min-width: 44px; min-height: 44px; }
	.nav-box { min-height: 44px; }
	.row-mail { padding: 0.85rem 1rem; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c4c7c5; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
#boot {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: grid;
	place-items: center;
	background: #fafafa;
	pointer-events: none;
}
#boot img {
	width: 7rem;
	height: 7rem;
	border-radius: 1.75rem;
	animation: boot-mark 0.85s var(--ease) both;
}
html.is-booted #boot { display: none; }
.pane-wait {
	min-height: 12rem;
	display: grid;
	place-items: center;
}
.pane-wait img {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 0.9rem;
	animation: boot-mark 0.85s var(--ease) both;
}
@keyframes boot-mark {
	0% { opacity: 0; transform: scale(0.84); }
	45% { opacity: 1; transform: scale(1.06); }
	100% { opacity: 1; transform: scale(1); }
}
.stage {
	min-height: 100dvh;
	display: grid;
	place-items: center;
	padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(2.5rem, env(safe-area-inset-bottom));
	background:
		radial-gradient(ellipse 70% 45% at 50% 30%, rgba(0, 105, 255, 0.12), transparent 62%),
		var(--bg);
}
.stage-card { text-align: center; max-width: 22rem; }
.stage-mark {
	display: inline-flex;
	margin: 0 0 1.15rem;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	border-radius: 28%;
	filter: drop-shadow(0 12px 28px rgba(0, 105, 255, 0.22));
	animation: stage-bob 4.8s ease-in-out infinite;
}
.stage-mark svg { width: 7rem; height: 7rem; display: block; }
.stage-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.stage-mark.is-go { animation: stage-pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.stage h1 { font-size: 1.35rem; margin: 0 0 0.45rem; }
.stage p { margin: 0; color: var(--ink-2); }
.stage .platform-brand { margin: 1.35rem 0 0; }
@keyframes stage-bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}
@keyframes stage-pop {
	0% { transform: scale(1) rotate(0deg); }
	35% { transform: scale(1.1) rotate(-12deg); }
	70% { transform: scale(0.96) rotate(8deg); }
	100% { transform: scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
	.stage-mark { animation: none; }
	.stage-mark.is-go { animation: none; }
	#boot img, .auth .brand img { animation: none; }
}

.owner-app {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}
.owner-app .bar {
	height: 48px;
	padding: 0 0.85rem 0 0.75rem;
}
.owner-app .bar-search {
	max-width: 28rem;
	margin: 0 0.75rem 0 0.25rem !important;
}
.owner-app .bar-search input {
	height: 2.15rem;
	border-radius: 8px;
	background: #e8ecf1;
	padding: 0.35rem 0.85rem;
}
.owner-app .bar-search input:focus {
	background: var(--surface);
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
.owner-app .btn,
.owner-app a.btn {
	border-radius: 8px;
	padding: 0.4rem 0.8rem;
}
.owner-app a.btn-primary,
.owner-app .btn-primary {
	background: var(--accent);
	color: #fff;
}
.owner-app a.btn-primary:hover:not(:disabled),
.owner-app .btn-primary:hover:not(:disabled) {
	background: var(--accent-2);
}
.owner-app .row-mail {
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas: "from time" "mid mid";
}
.owner-app .row-mail .from { grid-area: from; grid-column: auto; }
.owner-app .row-mail .time { grid-area: time; grid-column: auto; }
.owner-app .row-mail .mid { grid-area: mid; grid-column: auto; display: block; }
.owner-app .row-mail .sub,
.owner-app .row-mail .snip { max-width: none; display: block; }
.owner-app .row-mail .snip::before { content: none; }


.owner-app .work {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: 13.5rem minmax(0, 1fr) minmax(22rem, 34%);
	background: var(--surface);
}
.owner-app .work[data-page="mail"] {
	grid-template-columns: 13.5rem minmax(16rem, 22rem) minmax(0, 1fr);
}
.owner-app .rail {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.75rem 0.65rem;
	background: #f4f6f8;
	border-right: 1px solid var(--line);
	overflow: auto;
	min-height: 0;
}
.owner-app .rail .btn-primary {
	width: 100%;
	margin: 0 0 0.65rem;
	min-height: 2.25rem;
}
.owner-app .rail-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 2.15rem;
	padding: 0.35rem 0.6rem;
	border-radius: 8px;
	text-decoration: none;
	color: var(--ink);
	font: inherit;
	font-weight: 600;
	font-size: 0.9rem;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.owner-app .rail-item .count {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
	font-size: 0.75rem;
	color: var(--ink-2);
}
.owner-app .rail-item:hover { background: #e8ecf1; }
.owner-app .rail-item.is-on {
	background: #e8f1ff;
	color: var(--accent-2);
}
.owner-app .pane-list {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: auto;
	border-right: 1px solid var(--line);
	background: var(--surface);
}
.owner-app .list-head {
	flex: none;
	padding: 0.7rem 1rem;
}
.owner-app .list-hint {
	margin: 0;
	padding: 0 1rem 0.7rem;
	font-size: 0.85rem;
}
.owner-app .inspector {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: auto;
	background: var(--surface);
	padding: 1rem 1.15rem 2rem;
}
.owner-app .inspector .panel { min-height: 0; }
.owner-app .inspector .panel[hidden],
.owner-app .inspector .empty[hidden],
.owner-app .inspector .pane-read[hidden] { display: none !important; }
.owner-app .panel h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.owner-app .insp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 1rem;
}
.owner-app .row-obj {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.15rem 0.75rem;
	width: 100%;
	margin: 0;
	padding: 0.8rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	background: var(--surface);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 180ms var(--ease);
}
.owner-app .row-obj:hover { background: var(--hover); }
.owner-app .row-obj.is-on { background: #e8f1ff; }
.owner-app .row-obj .obj-title {
	font-weight: 650;
	word-break: break-all;
}
.owner-app .row-obj .obj-meta {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 0.8rem;
	color: var(--ink-2);
}
.owner-app .row-obj .obj-meta .num { font-variant-numeric: tabular-nums; }
.owner-app .add-inline,
.owner-app #add-domain {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: end;
	padding: 0.65rem 1rem 0.85rem;
	border-bottom: 1px solid var(--line);
}
.owner-app .add-inline .field,
.owner-app #add-domain .field {
	flex: 1 1 12rem;
	margin: 0;
}
.owner-app .add-inline .btn,
.owner-app #add-domain .btn { flex: none; }

.owner-app .pane-read {
	padding: 0;
	overflow: auto;
	min-height: 0;
}
@media (min-width: 961px) and (min-height: 561px) {
	body:has(.owner-app).is-reading .pane-list {
		display: flex !important;
		flex-direction: column;
	}
	body:has(.owner-app).is-reading .work {
		grid-template-columns: 13.5rem minmax(16rem, 22rem) minmax(0, 1fr);
	}
	body:has(.owner-app).is-reading .owner-app .btn-back,
	body:has(.owner-app).is-reading .owner-app #msg-back { display: none !important; }
}
@media (max-width: 960px), (max-height: 560px) {
	.owner-app .work,
	.owner-app .work[data-page="mail"] {
		grid-template-columns: 1fr;
		position: relative;
	}
	.owner-app .bar {
		height: auto;
		display: grid;
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "menu brand out" "search search search";
		align-items: center;
		gap: 0.4rem 0.5rem;
		padding: max(0.4rem, env(safe-area-inset-top)) 0.65rem 0.55rem;
	}
	.owner-app .nav-toggle { grid-area: menu; }
	.owner-app .bar .brand { grid-area: brand; justify-self: start; }
	.owner-app .bar nav { grid-area: out; margin: 0; }
	.owner-app .bar-search {
		grid-area: search;
		max-width: none;
		margin: 0 !important;
	}
	body.is-reading .owner-app .bar {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "menu brand out";
	}
	body.is-reading .owner-app .bar-search { display: none !important; }
	.owner-app .btn.nav-toggle,
	.owner-app .btn.btn-back,
	.owner-app a.btn.btn-back,
	.owner-app #insp-back { display: inline-flex; }
	.owner-app #insp-back {
		align-self: start;
		justify-content: flex-start;
		min-height: 44px;
	}
	.owner-app .rail {
		position: absolute;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(18.5rem, 86vw);
		z-index: 30;
		transform: translateX(-105%);
		transition: transform var(--t) var(--ease);
		border-right: 1px solid var(--line);
		padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
	}
	body.nav-open .owner-app .rail { transform: none; }
	.owner-app .work[data-open="0"] .inspector { display: none; }
	.owner-app .work[data-open="1"] .pane-list { display: none !important; }
	.owner-app .inspector {
		padding: 0.85rem 0.85rem max(1.25rem, env(safe-area-inset-bottom));
	}
	.owner-app .row-obj { padding: 0.9rem 1rem; min-height: 44px; }
	.owner-app .rail-item,
	.owner-app .btn,
	.owner-app a.btn,
	.owner-app .copy-id,
	.owner-app .rail .btn-primary { min-height: 44px; }
	.owner-app .insp-actions .btn,
	.owner-app .insp-actions a.btn { flex: 1 1 9rem; }
	.owner-app .pane-read { padding: 0; }
}
.passkey-actions {
	padding: 0 1rem;
	margin-bottom: 12px;
}
.passkey-panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.15rem 1.25rem;
	margin: 0.5rem 1rem 1.25rem;
}
.passkey-panel[hidden] {
	display: none !important;
}
.passkey-panel h2 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: 1.05rem;
	font-weight: 650;
}
.passkey-panel .field {
	margin: 0.75rem 0 0.35rem;
}
.passkey-panel input {
	font-size: 16px;
}
.passkey-panel #passkey-code {
	font-size: 1.25rem;
	letter-spacing: 0.25em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.passkey-panel .status-line {
	margin: 0.75rem 0;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	font-size: 0.88rem;
	background: var(--ok-bg);
	color: #0d652d;
}
.passkey-panel .error {
	margin: 0.75rem 0;
	color: var(--danger);
	font-weight: 600;
	font-size: 0.9rem;
}
.passkey-panel-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}
.passkey-panel .btn {
	min-height: 44px;
}
.passkey-table {
	width: 100%;
	border-collapse: collapse;
}
.passkey-table th {
	text-align: left;
	font-size: 0.75rem;
	font-weight: 650;
	color: var(--ink-2);
	padding: 0.6rem 1rem;
	border-bottom: 1px solid var(--line);
}
.passkey-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}
.passkey-table .btn {
	min-height: 44px;
}
@media (max-width: 720px) {
	.passkey-actions {
		padding: 0 0.75rem;
	}
	.passkey-actions .btn {
		width: 100%;
		min-height: 44px;
	}
	.passkey-panel {
		margin: 0.5rem 0.75rem 1.25rem;
		padding: 1rem 0.85rem max(1.25rem, env(safe-area-inset-bottom));
	}
	.passkey-panel-actions {
		flex-direction: column;
	}
	.passkey-panel-actions .btn {
		width: 100%;
		min-height: 44px;
	}
	.passkey-table th,
	.passkey-table td {
		padding: 0.65rem 0.75rem;
	}
}

