
:root {
  color-scheme: dark;
  --page: #101113;
  --surface: #181a1e;
  --rule: #373b44;
  --text: #f0f1f3;
  --muted: #aeb5c0;
  --accent: #c4f095;
  --error: #ffa9a2;
  font: 16px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--text); }
a { color: var(--muted); text-underline-offset: .3em; }
a:hover { color: var(--text); }
.frame { width: min(100% - 2rem, 66rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .frame { display: flex; justify-content: space-between; align-items: center; min-height: 4.5rem; gap: 1rem; }
.brand { color: var(--text); text-decoration: none; font-size: 1.4rem; font-weight: 720; letter-spacing: -.05em; }
.brand span { color: var(--accent); }
main { padding-block: clamp(2rem, 7vw, 4.5rem); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.045em; line-height: 1.2; }
h2 { font-size: 1.15rem; line-height: 1.3; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 1rem; padding: clamp(1rem, 4vw, 1.75rem); margin-bottom: 1.15rem; min-width: 0; }
.auth { width: min(100%, 29rem); margin-inline: auto; }
.auth p { margin-top: .55rem; }
form { display: grid; gap: .55rem; margin-top: 1rem; }
form > button:last-child { justify-self: start; margin-top: .55rem; }
label { font-weight: 600; font-size: .9rem; }
input, textarea, button { font: inherit; }
input, textarea { min-width: 0; width: 100%; padding: .65rem .8rem; color: var(--text); background: var(--page); border: 1px solid #525866; border-radius: .55rem; }
textarea { resize: vertical; font-family: ui-monospace, monospace; }
button { cursor: pointer; border: 1px solid #525866; border-radius: .55rem; color: var(--text); background: #22252b; padding: .57rem .8rem; font-size: .88rem; font-weight: 650; }
button:hover { background: #30343c; }
button.primary { background: var(--accent); color: #17240a; border-color: var(--accent); }
button.primary:hover { background: #d7ffaf; }
button:disabled, button.primary:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid #d5febb; outline-offset: 3px; }
.topbar, .actions, .field-action, .code-panel { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.topbar, .code-panel { justify-content: space-between; }
.topbar { margin-bottom: 1rem; }
.topbar input { max-width: 18rem; }
.field-action input { flex: 1 1 10rem; }
.field-action button { flex-shrink: 0; }
form.field-action { margin-bottom: .85rem; }
.muted, .sync, .message-meta { color: var(--muted); font-size: .9rem; }
.sync { margin: 0 0 .85rem; }
.sync::before { content: ""; display: inline-block; vertical-align: .1em; width: .45rem; height: .45rem; margin-right: .55rem; border-radius: 50%; background: var(--accent); }
.address { color: var(--accent); overflow-wrap: anywhere; }
.code-panel { background: #1d2718; border-color: #506441; }
.code { font: 700 clamp(1.8rem, 6vw, 3.3rem)/1.2 ui-monospace, monospace; letter-spacing: .075em; color: var(--accent); margin-top: .35rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.notice { border-left: 3px solid var(--accent); padding: .55rem .8rem; margin-bottom: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice.error { border-color: var(--error); color: var(--error); }
.message-list { margin-top: .6rem; }
.message-list details, .mailbox-row { border-top: 1px solid var(--rule); padding: .8rem 0; }
summary { cursor: pointer; overflow-wrap: anywhere; }
.message-meta { display: block; margin-top: .2rem; }
.message-body { margin-top: .75rem; white-space: pre-wrap; overflow-wrap: anywhere; padding: .75rem; border-radius: .55rem; background: var(--page); }
.mailbox-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; }
.result { margin-top: 1rem; }
dialog { color: var(--text); width: min(100% - 2rem, 31rem); margin: auto !important; }
dialog::backdrop { background: rgb(0 0 0 / 70%); }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { width: auto; accent-color: var(--accent); }
#more, #more-mails, #more-boxes { margin-top: .65rem; }
@media (max-width: 47rem) { .grid { grid-template-columns: 1fr; gap: 0; } }
