/* GoyMail Basic: server-rendered OldGui (gruvbox) theme, a faithful
   copy of frontend/src/themes/oldgui/oldgui.scss so the NoJS pages
   match the SPA: scrolling domain strip on top, a centered tan card
   with a floating "GoyMail" title and a hard offset shadow, in-card
   text-link navigation (never header buttons), Unifont, red accents. */

@font-face {
	font-family: 'Unifont';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/static/fonts/unifont.woff2') format('woff2');
}

* { box-sizing: border-box; }

html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: #458588;
}

body {
	min-height: 100vh;
	font-family: 'Unifont', monospace;
	font-size: 16px;
	line-height: normal;
	color: rgb(40, 40, 40);
	-webkit-font-smoothing: none;
	text-rendering: optimizeSpeed;
}

::selection { background-color: #cc241d; color: #fbf1c7; }

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

a { color: rgb(40, 40, 40); }

.gm-root {
	min-height: 100vh;
	display: grid;
	grid-template-rows: min-content 1fr min-content;
	width: 100%;
	background-color: #458588;
}

/* ---- Top row: scrolling domain marquee (navigation is NOT here) ---- */
.gm-oldgui-toprow {
	width: 100%;
	height: 28px;
	max-height: 28px;
	background-color: #282828;
	color: #e1e1e1;
	font-size: 16px;
	line-height: 28px;
	overflow: hidden;
	position: relative;
}

@keyframes gm-marquee-rtl { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes gm-marquee-ltr { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

.gm-oldgui-toprow-track {
	display: inline-flex;
	white-space: nowrap;
	animation: gm-marquee-rtl 40s linear infinite;
}

.gm-oldgui-toprow-track--rtl { animation-name: gm-marquee-ltr; }
.gm-oldgui-toprow:hover .gm-oldgui-toprow-track { animation-play-state: paused; }

.gm-oldgui-toprow-set { display: inline-flex; }

.gm-oldgui-toprow-domain {
	padding: 0 12px;
	line-height: 28px;
	color: #d5c4a1;
	text-decoration: none;
	white-space: nowrap;
}

.gm-oldgui-toprow-domain:hover { background-color: #3c3836; color: #fbf1c7; text-decoration: none; }
.gm-oldgui-toprow-domain--current { background-color: #cc241d; color: #a89984; }
.gm-oldgui-toprow-domain--current:hover { background-color: #cc241d; color: #fbf1c7; }

/* ---- Main + card ---- */
.gm-main {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 0;
	padding: 0.5rem;
}

.gm-oldgui-frame {
	position: relative;
	place-self: center;
	width: min(430px, calc(100% - 1rem));
	margin: 50px 0;
	background-color: #a89984;
	box-shadow: 11px 14px 0 #282828;
}

.gm-oldgui-frame--wide { width: min(960px, calc(100% - 2rem)); }
/* Webmail needs more horizontal room than dashboard/settings. */
.gm-oldgui-frame--mail { width: min(1440px, calc(100% - 2rem)); }
.gm-main--mail { align-items: flex-start; }

.gm-oldgui-title {
	position: absolute;
	top: 5px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #a89984;
	color: #cc241d;
	border-left: 1px solid #282828;
	border-right: 1px solid #282828;
	padding: 2px 10px;
	z-index: 1;
	font-size: 16px;
	font-weight: 400;
	text-align: center;
	white-space: nowrap;
}

.gm-oldgui-body {
	border: 1px solid #282828;
	margin: 15px 7px;
	padding: 15px 10px;
	overflow-wrap: break-word;
	color: rgb(40, 40, 40);
}

/* ---- In-card menu (authed): horizontal text links, red hover ---- */
.gm-oldgui-menubar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	margin: 0 0 8px;
}

.gm-oldgui-menubar a {
	color: #282828;
	background: transparent;
	text-decoration: none;
	padding: 1px 8px;
	white-space: nowrap;
}

.gm-oldgui-menubar a:hover,
.gm-oldgui-menubar a[aria-current='page'],
.gm-oldgui-menubar a.gm-oldgui-menu-sel { background-color: #cc241d; color: #a89984; }

.gm-oldgui-menubar form { margin: 0; }

.gm-oldgui-menubar button {
	font: inherit;
	font-family: 'Unifont', monospace;
	color: #282828;
	background: transparent;
	border: none;
	text-decoration: none;
	padding: 1px 8px;
	cursor: pointer;
	white-space: nowrap;
}

.gm-oldgui-menubar button:hover { background-color: #cc241d; color: #a89984; }

/* ---- Landing (guest): blurb + vertical menu ---- */
.gm-oldgui-land {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 0;
}

.gm-oldgui-land p { margin: 0 0 6px; text-align: center; }
.gm-oldgui-inlinea { color: #cc241d; }

.gm-oldgui-land-divider {
	width: min(220px, 100%);
	margin: 10px 0;
	border-top: 1px solid #282828;
	opacity: 0.45;
}

.gm-oldgui-land-menu {
	display: inline-flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-self: center;
	margin: 0 auto;
	gap: 0;
	width: auto;
	max-width: none;
	justify-content: flex-start;
}

/* Landing menu stays a vertical list even when paired with menubar (SPA parity). */
.gm-oldgui-land .gm-oldgui-land-menu.gm-oldgui-menubar {
	display: inline-flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: stretch;
	width: auto;
}

.gm-oldgui-land .gm-oldgui-land-menu.gm-oldgui-menubar a {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0 16px 0 3px;
}

.gm-oldgui-land-menu a {
	display: block;
	width: 100%;
	text-align: left;
	color: #282828;
	text-decoration: none;
	padding: 1px 16px 1px 3px;
	white-space: nowrap;
}

.gm-oldgui-land-menu a:hover,
.gm-oldgui-land-menu a.gm-oldgui-menu-sel { background-color: #cc241d; color: #a89984; }

/* ---- Footer ---- */
.gm-oldgui-foot {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 1px 8px;
	background-color: #282828;
	color: #e1e1e1;
	min-height: 24px;
	font-size: 16px;
	line-height: 1.2;
}

.gm-oldgui-foot a { color: #cc241d; text-decoration: none; }
.gm-oldgui-foot a:hover { text-decoration: underline; }
.gm-oldgui-foot-left { flex: 1 1 auto; min-width: 0; }
.gm-oldgui-foot-right { flex: 0 0 auto; display: inline-flex; align-items: center; }
.gm-oldgui-foot-creator { font-weight: 400; }
.gm-oldgui-foot-icon,
.gm-oldgui-foot-icon-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	line-height: 0;
	margin: 0 1px;
	padding: 0 1px;
	text-decoration: none;
}
.gm-oldgui-foot-icon-status { color: #98971a; }
.gm-oldgui-foot-icon:hover { text-decoration: none; opacity: 0.88; }
.gm-oldgui-foot-tg-svg,
.gm-oldgui-foot-icon-svg { display: block; width: 13px; height: 13px; fill: currentColor; }
.gm-oldgui-foot-icon:hover .gm-oldgui-foot-tg-svg,
.gm-oldgui-foot-icon:hover .gm-oldgui-foot-icon-svg { fill: #fabd2f; }
.gm-oldgui-foot-net,
.gm-oldgui-foot-net-status {
	display: inline;
	vertical-align: baseline;
	margin: 0 2px;
	padding: 0;
	line-height: inherit;
	font-weight: 700;
	text-decoration: none;
}
.gm-oldgui-foot-net-status { color: #98971a; }
.gm-oldgui-foot a.gm-oldgui-foot-net { color: #cc241d; }
.gm-oldgui-foot a.gm-oldgui-foot-net:hover { color: #fabd2f; text-decoration: underline; }

h1, h2, h3 {
	margin: 0 0 0.5rem;
	font-size: 16px;
	font-weight: 700;
	color: rgb(40, 40, 40);
}

p { margin: 0 0 8px; }

hr { border: none; border-top: 1px solid #282828; opacity: 0.45; margin: 8px 0; }

/* Bulletin strip (donations / SMTP notice), matching gm-oldgui-in */
.gm-oldgui-in {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0 0 12px;
	padding: 8px 10px;
	border: 2px solid #282828;
	background: #ebdbb2;
	box-shadow: inset 0 1px 0 #fbf1c7, 2px 2px 0 #1d2021;
}

.gm-oldgui-in-mark {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.12em;
	padding: 4px 8px;
	margin-top: 1px;
	background: #282828;
	color: #fbf1c7;
	border: 1px solid #1d2021;
}

.gm-oldgui-in-body { flex: 1; min-width: 0; font-size: 15px; line-height: 1.45; }
.gm-oldgui-in-body p { margin: 0 0 6px; }
.gm-oldgui-in-body p:last-child { margin-bottom: 0; }

/* MOTD banner — SPA-style strip, higher contrast for readability. */
.gm-motd {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 10px;
	row-gap: 4px;
	margin: 0 0 16px;
	padding: 10px 16px;
	border: 1px solid #665c54;
	background: #ebdbb2;
	font-size: 16px;
	overflow-wrap: anywhere;
	box-sizing: border-box;
	box-shadow: inset 0 1px 0 #fbf1c7;
}

.gm-motd-tag {
	font-size: 14px;
	font-weight: 700;
	color: #9d0006;
	flex: 0 0 auto;
}

.gm-motd-text {
	margin: 0;
	min-width: 0;
	font-style: italic;
	color: #282828;
	overflow-wrap: anywhere;
}

.gm-motd-meta {
	font-size: 14px;
	color: #3c3836;
}

.gm-motd-meta:nth-of-type(n+2) { font-size: 13px; color: #504945; }

.gm-motd-dot { opacity: 0.6; }

/* MOTD archive (SPA-like list) */
.gm-motd-archive { display: grid; gap: 14px; }
.gm-motd-hero-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	align-items: flex-start;
}
.gm-motd-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 8px;
}
.gm-motd-stat {
	padding: 8px 10px;
	border: 1px solid #282828;
	background: #d5c4a1;
}
.gm-motd-stat-label { display: block; font-size: 12px; color: #504945; margin-bottom: 2px; }
.gm-motd-stat-value { font-size: 18px; }
.gm-motd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gm-motd-entry {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid #282828;
	background: #f2e5bc;
	box-shadow: 2px 2px 0 #1d2021;
}
.gm-motd-entry-num {
	display: inline-block;
	min-width: 2.4rem;
	padding: 2px 6px;
	background: #282828;
	color: #fbf1c7;
	font-size: 13px;
	font-weight: 700;
}
.gm-motd-entry-quote {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}
.gm-motd-entry-marks { color: #928374; }
.gm-motd-entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	align-items: baseline;
	font-size: 13px;
	color: #3c3836;
}
.gm-motd-entry-pay {
	padding: 1px 6px;
	border: 1px solid #282828;
	background: #d5c4a1;
	font-weight: 700;
}
.gm-motd-entry-pay--plan { background: #98971a; color: #fbf1c7; border-color: #79740e; }
.gm-motd-entry-pay--xmr { background: #ff6b35; color: #1d2021; }
.gm-motd-entry-pay--btc,
.gm-motd-entry-pay--bch,
.gm-motd-entry-pay--ln,
.gm-motd-entry-pay--ltc { background: #458588; color: #fbf1c7; }
.gm-motd-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.gm-motd-pager a,
.gm-motd-pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 2px 8px;
	text-decoration: none;
	color: #282828;
	border: 1px solid #282828;
	background: #ebdbb2;
}
.gm-motd-pager a:hover,
.gm-motd-pager a.gm-motd-pager-cur {
	background: #cc241d;
	color: #fbf1c7;
}
.gm-motd-footnote { margin: 0; }
.gm-stack { display: grid; gap: 12px; }

/* Flash messages */
.flash {
	margin: 0 0 12px;
	padding: 8px 10px;
	border: 2px solid #282828;
	background: #ebdbb2;
	box-shadow: inset 0 1px 0 #fbf1c7, 2px 2px 0 #1d2021;
}

.flash.err { color: #9d0006; border-color: #cc241d; font-weight: 700; }
.flash.ok { color: #3c3836; border-left: 6px solid #98971a; }

/* Cards / grid */
.card { border: 1px solid #282828; padding: 12px; background: rgba(40, 40, 40, 0.05); }
.card h2 { margin-top: 0; }

.grid2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 14px;
	margin: 14px 0;
}
.grid2 > * { min-width: 0; }

fieldset { border: 1px solid #282828; margin: 8px 0 12px; padding: 10px; min-width: 0; }
legend { padding: 0 4px; font-weight: 700; }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
label.field { display: flex; flex-direction: column; gap: 0.25rem; }
.hint { font-size: 13px; color: #3c3836; opacity: 0.85; }
.hint p { margin: 0 0 0.35rem; }
.hint ol {
	margin: 0;
	padding-left: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.muted { color: rgb(40, 40, 40); opacity: 0.8; }
.small { font-size: 13px; }

/* select.sel is scoped to real <select> elements so the caret and input
   chrome never bleed onto other elements that reuse the "sel" class
   (the active mailbox folder link uses class="sel" for its red state). */
.inp, .ta, select.sel {
	font: inherit;
	font-family: 'Unifont', monospace;
	font-size: 16px;
	width: 100%;
	background-color: #282828;
	outline: none;
	color: #c4c4c4;
	border: none;
	box-shadow: inset 5px 5px 0 #000;
	padding: 4px 12px;
	margin: 4px 0;
}

.inp { height: 31px; }
.ta { min-height: 10rem; resize: vertical; }

select.sel {
	height: 31px;
	appearance: none;
	-webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #928374 50%), linear-gradient(135deg, #928374 50%, transparent 50%);
	background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 28px;
}

.inp:focus, .ta:focus, select.sel:focus { color: #fbf1c7; }

.checkline { display: flex; align-items: flex-start; gap: 6px; cursor: pointer; }
.checkline input { margin-top: 3px; }

/* MFA: keep the brute-force hint clear of the action row. */
.gm-mfa-hint { margin: 0; line-height: 1.4; }
.gm-mfa-actions { margin-top: 4px; }

/* Buttons: the SPA reserves solid buttons for primary actions
   (gm-plan-action) and uses text links elsewhere. */
.btn {
	font: inherit;
	font-family: 'Unifont', monospace;
	font-size: 16px;
	line-height: 1.15;
	display: inline-block;
	min-height: 34px;
	padding: 5px 12px;
	color: #fbf1c7;
	background: #cc241d;
	border: 2px solid #282828;
	box-shadow: 3px 3px 0 #1d2021;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}

.btn:hover { background: #9d0006; color: #fbf1c7; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1d2021; }

/* Secondary chip buttons for toolbars (dark) and neutral actions (beige). */
.btn-dark {
	font: inherit;
	font-family: 'Unifont', monospace;
	font-size: 14px;
	display: inline-block;
	padding: 4px 9px;
	color: #fbf1c7;
	background: #282828;
	border: 1px solid #1d2021;
	box-shadow: 2px 2px 0 #665c54;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}

.btn-dark:hover { background: #cc241d; color: #fbf1c7; }
.btn-dark:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #665c54; }

.btn-plain {
	font: inherit;
	font-family: 'Unifont', monospace;
	font-size: 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px;
	background: #d5c4a1;
	color: #282828;
	border: 1px solid #7c6f64;
	box-shadow: 1px 1px 0 #504945;
	cursor: pointer;
	text-decoration: none;
}

.btn-plain:hover { color: #fbf1c7; background: #458588; }

.linklike { background: none; border: 0; color: inherit; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

/* Text-link action row, like gm-row */
.gm-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
	margin: 8px 0 0;
}

.gm-row a, .gm-row button {
	font: inherit;
	font-family: 'Unifont', monospace;
	font-size: 16px;
	display: inline-block;
	text-decoration: none;
	padding: 1px 10px 1px 3px;
	background: transparent;
	color: rgb(40, 40, 40);
	border: 1px solid transparent;
	cursor: pointer;
}

.gm-row a:hover, .gm-row button:hover { background-color: #cc241d; color: #a89984; }

.btn-danger {
	font: inherit;
	font-family: 'Unifont', monospace;
	font-size: 14px;
	padding: 3px 10px;
	cursor: pointer;
	color: #fbf1c7;
	background: #9d0006;
	border: 1px solid #cc241d;
	box-shadow: 1px 1px 0 #1d2021;
}

.btn-danger:hover { background: #cc241d; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.toolbar .spacer { flex: 1; }

/* Key/value list */
.kv { display: grid; grid-template-columns: max-content 1fr; row-gap: 4px; column-gap: 12px; margin: 6px 0; }
.kv dt { opacity: 0.7; font-weight: 400; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* Tables */
.tbl-wrap { width: 100%; overflow-x: auto; border-top: 1px solid #282828; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.25; }
.tbl th, .tbl td { padding: 4px 7px; border-bottom: 1px solid #bdae93; text-align: left; vertical-align: middle; }
.tbl th { color: #1d2021; background: #d5c4a1; border-bottom-color: #282828; font-weight: 700; white-space: nowrap; }
.tbl tbody tr:hover td { background: rgba(204, 36, 29, 0.08); }
.tbl .num { text-align: right; white-space: nowrap; }

/* Token display */
.token-box {
	display: block;
	margin: 8px 0;
	padding: 8px 10px;
	text-align: center;
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	background-color: #282828;
	color: #fbf1c7;
	box-shadow: inset 5px 5px 0 #000;
	word-break: break-all;
	user-select: all;
}

/* Register (SPA Account Setup parity, NoJS) */
.gm-register h1 { margin: 0 0 10px; font-size: 1.35rem; }
.gm-register-fieldset { background: rgba(40, 40, 40, 0.04); }
.gm-email-row {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	min-width: 0;
}
.gm-email-row .gm-email-handle {
	flex: 1 1 10rem;
	min-width: 0;
	margin: 0;
}
.gm-email-at {
	flex: 0 0 auto;
	font-weight: 700;
	opacity: 0.85;
}
.gm-email-domain-wrap {
	flex: 1 1 12rem;
	min-width: 0;
	margin: 0;
}
.gm-email-row .gm-email-domain {
	width: 100%;
	margin: 0;
}
.gm-captcha { display: flex; flex-direction: column; gap: 8px; }
.gm-captcha .captcha {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
	border: 1px solid #282828;
	background: #282828;
}
.gm-captcha-help {
	border: 1px solid #bdae93;
	background: #ebdbb2;
	padding: 4px 8px;
}
.gm-captcha-help summary {
	cursor: pointer;
	font-weight: 700;
	padding: 4px 0;
}
.gm-captcha-help .hint { margin: 6px 0 4px; }
.gm-captcha-reload { margin: 0; text-align: center; }
.gm-reg-legal { margin: 10px 0 0; }
.gm-reg-legal-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
	line-height: 1.4;
}
.gm-reg-legal-label input { margin-top: 3px; flex-shrink: 0; }
.gm-reg-consent-preview { margin: 6px 0 0; line-height: 1.4; }
.gm-reg-consent-code {
	display: inline;
	padding: 0 4px;
	word-break: break-all;
}
.gm-register-actions { margin-top: 4px; flex-wrap: wrap; gap: 10px 14px; }
.gm-token-fit-wrap {
	display: flex;
	justify-content: center;
	margin: 8px 0;
}
.gm-token-fit {
	display: inline-block;
	width: max-content;
	max-width: 100%;
	margin: 0;
	padding: 8px 14px;
	box-sizing: border-box;
	white-space: nowrap;
	overflow-x: auto;
	cursor: text;
}
.gm-token-fit:focus {
	outline: 2px solid #cc241d;
	outline-offset: 2px;
}
/* Unlock Continue only after the “I saved my token” checkbox. */
.gm-register-confirm:not(:has(input[name="saved"]:checked)) .gm-continue-on { display: none; }
.gm-register-confirm:has(input[name="saved"]:checked) .gm-continue-off { display: none; }
.gm-continue-off {
	opacity: 0.45;
	cursor: not-allowed;
	user-select: none;
}
.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;
}

@media (max-width: 560px) {
	.gm-email-row .gm-email-handle,
	.gm-email-domain-wrap { flex-basis: 100%; }
}

.mono { font-family: 'Unifont', monospace; word-break: break-all; }

.api-pre {
	margin: 8px 0 0;
	padding: 10px 12px;
	border: 1px solid #282828;
	background: rgba(40, 40, 40, 0.08);
	overflow-x: auto;
	font-family: 'Unifont', monospace;
	font-size: 14px;
	line-height: 1.5;
	white-space: pre;
}

.card h3 {
	margin: 14px 0 6px;
	font-size: 15px;
}

.page-hero {
	position: relative;
	padding: 14px 16px;
	border: 2px solid #282828;
	background:
		linear-gradient(160deg, rgba(251, 241, 199, 0.5) 0%, transparent 40%),
		repeating-linear-gradient(-18deg, transparent, transparent 10px, rgba(40, 40, 40, 0.03) 10px, rgba(40, 40, 40, 0.03) 11px),
		linear-gradient(135deg, #ebdbb2 0%, #d5c4a1 100%);
	box-shadow: 3px 3px 0 #1d2021;
}
.page-hero h1, .page-hero h2 { margin: 0 0 6px; }
.page-brand {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #9d0006;
}

.kpis {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin: 12px 0;
}
.kpi {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px;
	border: 2px solid #282828;
	background: #f2e5bc;
	box-shadow: 2px 2px 0 #1d2021;
	min-width: 0;
}
.kpi-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #504945;
}
.kpi-value { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }

.wallet {
	background: #fbf1c7;
	border-width: 2px;
	box-shadow: 2px 2px 0 #1d2021;
	padding: 0;
	overflow: hidden;
}
.wallet-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 48px;
	padding: 8px 12px;
	margin-bottom: 0;
	background: #282828;
	color: #fbf1c7;
}
.wallet-head h2 { margin: 0; color: inherit; }
.wallet-tag {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #282828;
	padding: 1px 7px;
	border: 1px solid #1d2021;
	background: #d5c4a1;
	white-space: nowrap;
}
.wallet-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.wallet-note { margin: 0; line-height: 1.45; }

.alias-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alias-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px 12px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid #bdae93;
	background: rgba(251, 241, 199, 0.7);
}
.alias-row:nth-child(even) { background: #f0e2bc; }
.alias-addr {
	display: block;
	font-size: 14px;
	line-height: 1.45;
	word-break: break-all;
	padding: 8px 10px;
	border: 1px solid #282828;
	background: #ebdbb2;
}
.alias-form { margin-top: 8px; padding-top: 10px; border-top: 1px solid #bdae93; }
.alias-row .gm-row { margin: 0; }
.empty-box, .locked-box {
	padding: 12px;
	border: 1px dashed #665c54;
	background: rgba(40, 40, 40, 0.04);
}

.api-details {
	margin-top: 14px;
	border: 1px solid #282828;
	background: rgba(40, 40, 40, 0.05);
}
.api-details > summary {
	cursor: pointer;
	font-weight: 700;
	padding: 8px 10px;
	list-style: none;
}
.api-details > summary::-webkit-details-marker { display: none; }
.api-details > summary::before { content: '+ '; }
.api-details[open] > summary::before { content: '- '; }
.api-details[open] > summary { border-bottom: 1px solid #bdae93; }
.api-details .api-pre { margin: 0; border: none; border-top: 1px solid #282828; }
.api-details > p { margin: 8px 10px 0; }

/* Quota meter */
.meter { width: 100%; height: 14px; border: 1px solid #282828; background: #ebdbb2; box-shadow: inset 0 1px 0 #fbf1c7; }
.meter > span { display: block; height: 100%; background: #458588; box-shadow: inset 0 -2px 0 #076678; }

/* ------------- Webmail ------------- */
.mail-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.mail-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mail-side .btn { width: 100%; }
/* right pane must be allowed to shrink inside the grid or wide content
   (long subjects, addresses) pushes past the card and clips. */
.mail-wrap > section { min-width: 0; }

.mail-folders {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 2px solid #282828;
	background: #ebdbb2;
	box-shadow: 3px 3px 0 #1d2021;
}

.mail-folders a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 34px;
	padding: 7px 12px;
	text-decoration: none;
	color: #282828;
	border-bottom: 1px solid #bdae93;
}

.mail-folders li:last-child a { border-bottom: none; }
.mail-folders a:hover, .mail-folders a.sel { background-color: #cc241d; color: #a89984; }
.mail-folders a.sel { font-weight: 700; }

.mail-count {
	font-size: 12px;
	min-width: 20px;
	text-align: center;
	padding: 0 6px;
	background: #282828;
	color: #fbf1c7;
	align-self: center;
}

.mail-folders a.sel .mail-count, .mail-folders a:hover .mail-count { background: #282828; color: #fbf1c7; }
.mail-quota { font-size: 13px; }

.mail-list { border: 1px solid #282828; background: #fbf1c7; box-shadow: 3px 3px 0 #1d2021; overflow-x: auto; }
.mail-list .tbl { font-size: 14px; table-layout: fixed; }
.mail-list .tbl th, .mail-list .tbl td { padding: 6px 8px; }
.mail-list .tbl td { border-bottom-color: #d5c4a1; }
.mail-list .tbl .mail-check { width: 2rem; }
.mail-list .tbl .mail-flag { width: 1.25rem; }
.mail-list .tbl .mail-from {
	width: 22%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mail-list .tbl .mail-subject {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mail-list .tbl .mail-subject a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mail-list .tbl .mail-date {
	width: 12.5rem;
	white-space: nowrap;
	overflow: hidden;
	overflow-wrap: normal;
}

.mail-list .tbl tbody tr:nth-child(odd) td { background: #ebdbb2; }
.mail-list .tbl tbody tr:nth-child(even) td { background: #fbf1c7; }
.mail-list .tbl tbody tr:hover td { background: #d5c4a1; }
.mail-list .tbl tbody tr.unread td { font-weight: 700; }
.mail-list .tbl tbody tr.unread td:first-child { box-shadow: inset 3px 0 0 #cc241d; }
.unread-dot { display: inline-block; width: 8px; height: 8px; background: #cc241d; border: 1px solid #9d0006; vertical-align: middle; }
.mail-empty { padding: 2rem 1rem; text-align: center; color: #504945; }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 6px; }
.pager a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.icon-arrow {
	display: inline-flex;
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	color: inherit;
}
.icon-arrow svg { display: block; width: 12px; height: 12px; }

.msg-head { border: 1px solid #282828; background: #ebdbb2; box-shadow: inset 0 1px 0 #fbf1c7; padding: 10px 12px; margin-bottom: 10px; }
.msg-head h1 { margin: 0 0 8px; font-size: 18px; }

.mailbody {
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	background: #fbf1c7;
	border: 1px solid #282828;
	box-shadow: 3px 3px 0 #1d2021;
	padding: 12px;
	font-size: 15px;
	line-height: 1.45;
	margin: 0;
	max-width: 100%;
	overflow-x: auto;
}

.att-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }

.att-chips a {
	display: inline-block;
	padding: 3px 9px;
	border: 1px solid #282828;
	background: #d5c4a1;
	color: #282828;
	text-decoration: none;
	font-size: 13px;
	white-space: nowrap;
}

.att-chips a:hover { background-color: #cc241d; color: #a89984; }

.mail-move {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.mail-move .sel { width: auto; min-width: 8rem; max-width: 14rem; }
.mail-side-manage { margin-top: 4px; }
.mail-side-manage .btn-plain { width: 100%; text-align: center; }

.mail-unlock {
	max-width: 28rem;
	margin: 12px auto 8px;
}
.mail-unlock .wallet-head h1 {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	color: inherit;
}
.mail-unlock-facts {
	margin: 0;
	padding: 0;
	border: 1px solid #282828;
	background: #ebdbb2;
	box-shadow: inset 0 1px 0 #fbf1c7, 2px 2px 0 #1d2021;
}
.mail-unlock-facts > div {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: 8px 12px;
	align-items: baseline;
	padding: 8px 12px;
}
.mail-unlock-facts > div + div { border-top: 1px solid #bdae93; }
.mail-unlock-facts dt {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #504945;
}
.mail-unlock-facts dd { margin: 0; line-height: 1.35; }
.mail-unlock .inp { height: 36px; }
.mail-unlock .btn { width: 100%; }
.compose-attach {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	border: 1px dashed #282828;
	background: #ebdbb2;
	box-shadow: inset 0 1px 0 #fbf1c7;
}
.compose-attach-copy {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	min-width: 0;
}
.compose-attach-copy .hint { margin: 0; }
.compose-attach input[type="file"] {
	display: block;
	width: 100%;
	max-width: 100%;
	font: inherit;
	font-size: 14px;
}
.compose {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}
.compose-head {
	border: 1px solid #282828;
	background: #ebdbb2;
	box-shadow: inset 0 1px 0 #fbf1c7, 2px 2px 0 #1d2021;
}
.compose-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	background: #282828;
	color: #fbf1c7;
}
.compose-title h1 {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	color: inherit;
}
.compose-row {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr);
	gap: 8px 12px;
	align-items: center;
	margin: 0;
	padding: 6px 12px;
	border-top: 1px solid #bdae93;
}
.compose-row > span:first-child {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #504945;
}
.compose-from {
	min-width: 0;
	overflow-wrap: anywhere;
	line-height: 1.35;
}
.compose-row .inp {
	margin: 0;
	height: 32px;
}
.compose .ta {
	min-height: 22rem;
	margin: 0;
	flex: 1 1 auto;
}
.compose-foot { margin: 0; }

/* ------------- Payments ------------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }

.plan-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 10px;
	border: 2px solid #282828;
	background: #fbf1c7;
	box-shadow: 4px 4px 0 #1d2021;
	overflow: hidden;
	padding-bottom: 12px;
}

.plan-card--current { background: #ebdbb2; box-shadow: 4px 4px 0 #9d0006; }

.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 8px 10px; background: #282828; color: #fbf1c7; }
.plan-head h2 { margin: 0; font-size: 18px; color: inherit; }

.badge { display: inline-block; padding: 1px 7px; font-size: 13px; border: 1px solid #282828; background: #d5c4a1; color: #282828; white-space: nowrap; }
.badge--on { background: #98971a; border-color: #79740e; color: #fbf1c7; }

/* Dashboard Support card (SPA SupportStatus parity) */
.gm-support-card p { margin: 0; line-height: 1.3; }
.gm-support-lede { margin: 0; line-height: 1.3; }
.gm-support-card .wallet-head { min-height: 34px; padding: 4px 10px; }
.gm-support-card .wallet-body { padding: 8px 10px 10px; gap: 6px; }
.gm-support-card .gm-row { margin: 0; }
.gm-support-badges { flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.gm-row a.gm-support-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	min-height: 24px;
	padding: 3px 9px;
	font-size: 16px;
	line-height: 1.15;
	text-decoration: none;
	color: #282828;
	border: 1px solid #282828;
	background: #d5c4a1;
	box-sizing: border-box;
	white-space: nowrap;
}
.gm-row a.gm-support-badge:hover {
	background-color: #cc241d;
	color: #a89984;
}
a.gm-support-badge {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	min-height: 24px;
	padding: 3px 9px;
	font-size: 16px;
	line-height: 1.15;
	text-decoration: none;
	color: #282828;
	border: 1px solid #282828;
	background: #d5c4a1;
	box-sizing: border-box;
	white-space: nowrap;
}
a.gm-support-badge:hover {
	background-color: #cc241d;
	color: #a89984;
}
/* Funding meter — SPA SupportStatus FundingMeter parity */
.gm-funding { margin: 0; }
.gm-funding-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0 1em;
	font-weight: 700;
	line-height: 1.25;
}
.gm-funding-pct { margin-left: auto; white-space: nowrap; }
.gm-funding-bar {
	height: 12px;
	margin: 6px 0;
	overflow: hidden;
	border-radius: 2px;
	background: rgba(128, 128, 128, 0.25);
	border: 1px solid #282828;
}
.gm-funding-bar--yearly { height: 14px; display: flex; }
.gm-funding-fill {
	height: 100%;
	background: #2a9d5c;
	transition: width 240ms ease;
}
.gm-funding-bar-track {
	display: flex;
	height: 100%;
	min-width: 3px;
}
.gm-funding-seg {
	display: block;
	height: 100%;
	min-width: 3px;
}
.gm-funding-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0 1em;
	font-size: 13px;
	line-height: 1.25;
}
.gm-funding-cost { margin-left: auto; white-space: nowrap; }
.gm-funding-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2em 0.7em;
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.25;
}
.gm-funding-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.gm-funding-swatch {
	width: 8px;
	height: 8px;
	border-radius: 1px;
	flex-shrink: 0;
}
.gm-funding-extra {
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.25;
}

/* Dashboard Identity card */
.gm-id-hero { margin-bottom: 14px; }
.gm-id-hero .muted { display: block; margin-bottom: 4px; }
.gm-id-email { margin: 0; font-size: 16px; word-break: break-all; }
.gm-id-meta {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}
.gm-id-meta > div > p { margin: 3px 0 0; font-size: 16px; }
.gm-id-meta .muted { display: block; }
.gm-status-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}
.gm-status-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.plan-price { display: flex; flex-direction: column; gap: 3px; margin: 0 12px; padding: 8px 10px; border: 1px solid #282828; background: #d5c4a1; }
.plan-price strong { font-size: 22px; line-height: 1.1; }
.plan-price .small { color: #3c3836; }

.plan-metrics { margin: 0 12px; border-top: 1px solid #282828; }
.plan-metrics div { display: grid; grid-template-columns: minmax(88px, auto) minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid #bdae93; align-items: baseline; }
.plan-metrics dt { opacity: 0.72; }
.plan-metrics dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.plan-card form { margin: auto 12px 10px; }
.plan-card .gm-row { margin-top: 4px; }

.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; align-items: start; }
.pay-field { padding: 10px 12px; border: 1px solid #282828; background: #fbf1c7; box-shadow: inset 0 1px 0 #fff; margin-bottom: 10px; }
.pay-field--amount { background: #d5c4a1; }
.pay-label { display: block; margin-bottom: 5px; font-size: 13px; color: #3c3836; }
.pay-amount { font-size: 22px; line-height: 1.15; word-break: break-all; }
.pay-addr { font-size: 13px; line-height: 1.35; word-break: break-all; padding: 8px 10px; background: #f2e5bc; border: 1px dashed #665c54; user-select: all; }
.pay-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 8px 10px; border: 1px solid #282828; background: #ebdbb2; margin-bottom: 10px; }
.pay-status strong { text-transform: capitalize; }
.pay-note { margin: 0 0 10px; padding: 8px 10px; border-left: 4px solid #98971a; background: #f2e5bc; color: #3c3836; line-height: 1.35; }
.pay-note--warn { border-left-color: #cc241d; }
.qr-panel { display: flex; flex-direction: column; gap: 8px; }
.qr-box { display: flex; align-items: center; justify-content: center; padding: 10px; background: #fbf1c7; border: 2px solid #282828; box-shadow: 3px 3px 0 #1d2021; }
.qr-box img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.rail-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }

/* Responsive */
@media (min-width: 721px) and (max-width: 1024px) {
	.gm-oldgui-foot { padding: 5px 8px; line-height: 1.35; align-items: flex-start; }
	.gm-oldgui-foot-left,
	.gm-oldgui-foot-right { flex: 1 1 100%; text-align: center; justify-content: center; }
	.gm-oldgui-foot-right { display: flex; }
}

@media (max-width: 860px) {
	.plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pay-grid { grid-template-columns: 1fr; }
	.mail-wrap { grid-template-columns: 1fr; }
	.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mail-side {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
	}
	.mail-side .btn,
	.mail-side > .btn-plain {
		flex: 1 1 100%;
		width: 100%;
		justify-content: center;
	}
	.mail-side-manage {
		margin-top: 0;
		flex: 0 0 auto;
	}
	.mail-side-manage .btn-plain {
		width: auto;
		background: transparent;
		border: none;
		box-shadow: none;
		padding: 6px 4px;
		text-decoration: underline;
	}
	.mail-side-manage .btn-plain:hover {
		background: #cc241d;
		color: #a89984;
		text-decoration: none;
	}
	.mail-folders {
		flex: 1 1 100%;
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		padding: 6px;
		border-width: 1px;
		box-shadow: 2px 2px 0 #1d2021;
		background: #d5c4a1;
	}
	.mail-folders li { flex: 0 0 auto; }
	.mail-folders a {
		border: 1px solid #282828;
		border-bottom: 1px solid #282828;
		min-height: 40px;
		padding: 6px 10px;
		background: #ebdbb2;
		box-shadow: 1px 1px 0 #1d2021;
	}
	.mail-folders li:last-child a { border-bottom: 1px solid #282828; }
	.mail-quota { flex: 1 1 100%; }
}

@media (max-width: 720px) {
	.gm-main {
		padding: 0.35rem max(0.35rem, env(safe-area-inset-left, 0px)) 0.35rem
			max(0.35rem, env(safe-area-inset-right, 0px));
	}
	.gm-main--mail { padding-top: 0.25rem; }
	.gm-oldgui-frame { width: min(100% - 1rem, 94vw); margin: 28px 0; box-shadow: 6px 7px 0 #282828; }
	.gm-oldgui-frame--wide { width: min(960px, calc(100% - 1.25rem)); margin: 28px 0; box-shadow: 6px 7px 0 #282828; }
	.gm-oldgui-frame--mail {
		width: calc(100% - 0.5rem);
		margin: 10px 0 16px;
		box-shadow: 3px 4px 0 #282828;
	}
	.gm-oldgui-menubar a, .gm-oldgui-menubar button { padding: 6px 10px; min-height: 40px; display: inline-flex; align-items: center; }
	.gm-oldgui-land-menu a { padding: 6px 12px; min-height: 40px; }
	.gm-oldgui-foot {
		height: auto;
		padding: 6px max(8px, env(safe-area-inset-left, 0px))
			max(8px, env(safe-area-inset-bottom, 0px))
			max(8px, env(safe-area-inset-right, 0px));
		line-height: 1.35;
		align-items: flex-start;
	}
	.gm-oldgui-foot-left,
	.gm-oldgui-foot-right { flex: 1 1 100%; text-align: center; justify-content: center; }
	.gm-oldgui-foot-right { display: flex; }
	.kv { grid-template-columns: 1fr; }
	.kv dt { margin-top: 8px; }
	.kv dt:first-of-type { margin-top: 0; }
	.toolbar .btn, .toolbar .btn-plain, .toolbar .btn-danger, .toolbar .btn-dark,
	.toolbar button, .toolbar a.btn-plain, .toolbar select.sel {
		min-height: 44px;
	}
	.toolbar .spacer { display: none; }
	.toolbar-count { flex: 1 1 100%; }
	.mail-move {
		display: flex;
		flex: 1 1 100%;
		width: 100%;
	}
	.mail-move .sel {
		flex: 1 1 auto;
		min-width: 0;
		max-width: none;
		width: auto;
	}
	.compose .btn, .compose-foot .btn { flex: 1 1 auto; justify-content: center; }
	.compose-hint { display: none; }
	.mail-unlock { max-width: 100%; margin: 4px 0; }
	.mail-wrap .toolbar > form {
		display: flex;
		flex: 1 1 auto;
	}
	.mail-wrap .toolbar .btn-danger { width: 100%; }
	.mail-list { overflow-x: visible; border: none; background: transparent; box-shadow: none; }
	.mail-list .tbl { table-layout: auto; }
	.mail-list .tbl thead { display: none; }
	.mail-list .tbl, .mail-list .tbl tbody {
		display: block;
		width: 100%;
	}
	.mail-list .tbl tr {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		column-gap: 8px;
		align-items: center;
		width: 100%;
		margin: 0 0 8px;
		padding: 8px 10px 8px 0;
		border: 1px solid #282828;
		box-shadow: 2px 2px 0 #1d2021;
	}
	.mail-list .tbl tbody tr:nth-child(odd) { background: #ebdbb2; }
	.mail-list .tbl tbody tr:nth-child(even) { background: #fbf1c7; }
	.mail-list .tbl tbody tr:nth-child(odd) td,
	.mail-list .tbl tbody tr:nth-child(even) td { background: transparent; }
	.mail-list .tbl tbody tr:hover { background: #d5c4a1; }
	.mail-list .tbl tbody tr.unread { box-shadow: inset 3px 0 0 #cc241d, 2px 2px 0 #1d2021; }
	.mail-list .tbl td {
		display: block;
		border: none;
		padding: 1px 0;
		width: auto !important;
		overflow: visible;
		text-overflow: unset;
		white-space: normal;
	}
	.mail-list .tbl .mail-check {
		grid-column: 1;
		grid-row: 1 / 4;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		padding: 0;
		width: 44px !important;
	}
	.mail-list .tbl .mail-check input {
		width: 18px;
		height: 18px;
		margin: 0;
	}
	.mail-list .tbl .mail-flag { display: none; }
	.mail-list .tbl .mail-from {
		grid-column: 2;
		font-size: 13px;
		color: #3c3836;
	}
	.mail-list .tbl .mail-subject {
		grid-column: 2;
		font-size: 15px;
		padding-top: 2px;
	}
	.mail-list .tbl .mail-subject a {
		display: block;
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
	}
	.mail-list .tbl .mail-date {
		grid-column: 2;
		font-size: 12px;
		color: #665c54;
		padding-top: 2px;
		width: auto !important;
	}
	.folders-tbl thead { display: none; }
	.tbl-wrap:has(.folders-tbl) { overflow: visible; border-top: none; }
	.folders-tbl, .folders-tbl tbody, .folders-tbl tr, .folders-tbl td {
		display: block;
		width: 100%;
	}
	.folders-tbl tr {
		margin: 0 0 8px;
		padding: 10px 12px;
		border: 1px solid #282828;
		background: #ebdbb2;
		box-shadow: 2px 2px 0 #1d2021;
	}
	.folders-tbl td {
		border: none;
		padding: 4px 0;
	}
	.folders-tbl .gm-row { margin: 0; }
	.folders-tbl .inp { width: 100%; min-width: 0 !important; }
	.compose .ta { min-height: 16rem; }
	.compose .inp, .compose .ta, .compose input[type="file"] { width: 100%; }
	.compose-row {
		grid-template-columns: 1fr;
		gap: 4px;
		padding: 8px 12px;
	}
}

@media (pointer: coarse) {
	.gm-oldgui-foot a.gm-oldgui-foot-icon {
		min-height: 40px;
		min-width: 40px;
		padding: 4px 8px 5px;
		box-sizing: border-box;
	}
	.toolbar .btn, .toolbar .btn-plain, .toolbar .btn-danger,
	.toolbar button, .toolbar a.btn-plain, .mail-folders a {
		min-height: 44px;
	}
}

@media (max-width: 620px) {
	.plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
	.gm-oldgui-body { margin: 10px 3px; padding: 10px 6px; }
	.gm-oldgui-frame--mail .gm-oldgui-body { margin: 10px 3px; padding: 8px 6px; }
	.card { padding: 10px; }
	.kpis { grid-template-columns: 1fr; }
}
