:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #e8eaf0; background: #121419; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; padding: 12px; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid #a9baff; outline-offset: 3px; }
.inbox { width: 100%; max-width: 420px; margin: 0 auto; background: #1a1d24; border: 1px solid #353a46; border-radius: 12px; overflow: hidden; }
header { padding: 16px 16px 0; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h1 { margin: 0; font-size: 1.125rem; font-weight: 650; letter-spacing: -.015em; }
h1 span { margin-left: 5px; font-size: .75rem; font-weight: 400; color: #a8afbc; letter-spacing: 0; }
.trash-connection { font-size: .75rem; color: #a8afbc; max-width: 140px; text-align: right; }
.accounts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 13px 0; }
.account { font-size: .75rem; padding: 3px 7px; line-height: 1.35; border-radius: 5px; border: 1px solid; white-space: nowrap; }
.geek { background: #202e44; border-color: #3f5e83; color: #b6d4ff; }
.nick { background: #2e2843; border-color: #5f4c80; color: #d4c5fa; }
.scope { color: #afb5c1; font-size: .75rem; margin-left: auto; }
.tabs { display: flex; gap: 12px; border-bottom: 1px solid #353a46; }
.tabs button { padding: 10px 0 11px; color: #aeb5c4; background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: .875rem; }
.tabs button[aria-pressed="true"] { color: #e9edff; border-bottom-color: #95aaff; }
.tabs span { font-size: .75rem; display: inline-block; min-width: 17px; margin-left: 3px; text-align: center; padding: 1px 4px; background: #2c313d; border-radius: 4px; }
#messages { padding: 0 16px; max-height: min(480px, 57vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.message { display: flex; gap: 8px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #303540; color: inherit; }
.message-link { display: block; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.trash-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 34px; padding: 0; margin-top: -3px; border: 0; border-radius: 5px; background: transparent; color: #b5bdcc; }
.trash-button svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trash-button:hover { color: #ffc4c7; background: #4c2d36; }
.trash-button:disabled { opacity: .4; cursor: not-allowed; }
.trash-button[aria-busy="true"] { cursor: wait; }
.trash-button[aria-busy="true"] svg { animation: shimmer 1.4s infinite; }
.action-status { font-size: .8125rem; line-height: 1.5; color: #e8c389; padding: 10px 16px; background: #302a20; border-top: 1px solid #4b4232; }
.action-status.success { color: #bbdec7; background: #20372a; border-color: #365741; }
.action-status[hidden] { display: none; }
.message:last-child { border-bottom: 0; }
.message:hover { background: #252a35; }
.message-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sender { font-size: .875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.message .account { padding: 1px 5px; font-size: .75rem; }
.message time { margin-left: auto; flex-shrink: 0; font-size: .75rem; color: #afb5c1; }
.subject { font-size: .9375rem; line-height: 1.45; margin-top: 5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.reason { font-size: .75rem; line-height: 1.4; color: #aeb5c4; margin-top: 4px; }
.filtered .sender { font-weight: 500; }
.filtered { color: #c7cbd5; }
.filter-note { font-size: .75rem; line-height: 1.5; color: #b1b8c7; padding: 10px 16px; border-top: 1px solid #353a46; }
.filter-note:empty { display: none; }
footer { padding: 12px 16px; background: #171a20; border-top: 1px solid #353a46; }
.status-line { font-size: .75rem; display: flex; flex-wrap: wrap; gap: 4px 8px; color: #b9c0ce; }
#captured { color: #afb5c1; }
#snapshot-status.stale { color: #e9c589; }
#reload { border: 1px solid #424b5d; background: #252c39; color: #e1e7f4; font-size: .8125rem; border-radius: 6px; padding: 7px 10px; margin-top: 10px; }
#reload:hover { background: #30394a; }
#reload:disabled { opacity: .6; cursor: wait; }
.snapshot-help { font-size: .75rem; color: #b1b8c7; margin-top: 10px; }
.sync-note { font-size: .75rem; line-height: 1.5; color: #b1b8c7; margin: 8px 0 0; }
.inbox a:not(.message-link) { color: #a9baff; }
.setup { padding: 18px; font-size: .875rem; line-height: 1.55; overflow-wrap: anywhere; }
.setup h2 { font-size: .9375rem; margin-top: 24px; }
.setup label { display: block; margin-top: 12px; }
.setup textarea { width: 100%; margin-top: 6px; padding: 8px; border: 1px solid #596477; border-radius: 5px; font: inherit; color: inherit; background: transparent; }
.setup button { padding: 8px 10px; border: 1px solid #596477; border-radius: 5px; color: inherit; background: transparent; margin-top: 8px; }
.setup button:disabled { opacity: .45; cursor: not-allowed; }
.consent { font-size: .8125rem; }
.connect-row { display: flex; align-items: center; gap: 10px; font-size: .75rem; }
.connect-row button { flex-shrink: 0; }
.setup section[hidden] { display: none; }
.snapshot-help summary { cursor: pointer; width: fit-content; }
.snapshot-help p { line-height: 1.6; margin: 8px 0 0; }
.state { padding: 26px 8px; text-align: center; }
.state strong { display: block; font-size: .9375rem; font-weight: 500; }
.state p { color: #adb5c4; font-size: .8125rem; line-height: 1.5; margin: 7px 0 0; }
.skeleton { height: 68px; margin: 10px 0; border-radius: 6px; background: linear-gradient(90deg,#242934,#303744,#242934); background-size: 200%; animation: shimmer 1.4s infinite; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@keyframes shimmer { to { background-position: -200%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
@media (max-width: 360px) { body { padding: 8px; } header, footer { padding-left: 12px; padding-right: 12px; } #messages { padding: 0 12px; } .scope { margin-left: 0; } }
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; color: #252b38; background: #f2f4f8; }
  .inbox { background: #fff; border-color: #d0d7e3; }
  .tabs, .message, .filter-note, footer { border-color: #d8deea; }
  .trash-connection, h1 span, .scope, .tabs button, .reason, .message time, #captured, .filter-note, .snapshot-help, .sync-note, .status-line, .state p { color: #596477; }
  .tabs button[aria-pressed="true"] { color: #273e94; border-bottom-color: #4965d1; }
  .tabs span { background: #e9edf6; }
  .geek { background: #eaf2ff; color: #2c5184; border-color: #b3c9e7; }
  .nick { background: #f1ecff; color: #644587; border-color: #cdbce4; }
  footer { background: #f8f9fc; }
  #reload { color: #344365; background: #edf1f8; border-color: #c6cfdf; }
  .message:hover, #reload:hover { background: #f2f5fb; }
  .filtered { color: #4e586b; }
  #snapshot-status.stale { color: #866011; }
  .skeleton { background: #e8edf5; }
  .trash-button { color: #67748c; }
  .trash-button:hover { color: #a82c36; background: #fae8eb; }
  .action-status { color: #775410; background: #fff4d9; border-color: #e6d6ae; }
  .action-status.success { color: #275c3c; background: #ebf6ef; border-color: #b7d6c3; }
  .inbox a:not(.message-link) { color: #344f9e; }
}

.bit { color: #d6b2ff; border-color: #7652a6; background: #38234e; }
#hostinger-captured.stale { color: #e5b85a; }
@media (prefers-color-scheme: light) { .bit { color: #5c3589; border-color: #a88ac9; background: #f0e8fa; } }

.setup pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; }
.setup input { width: 100%; margin-top: 6px; padding: 8px; color: inherit; background: transparent; border: 1px solid #596477; border-radius: 5px; font: inherit; }

.message-body{white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto}textarea{display:block;width:100%;box-sizing:border-box}button,select{margin:.25rem}
