/* Axklo Mail. Same design language as playtheaxklo: dark, calm, soft edges, green accent. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0f0c; --panel: #0f1410; --pop: #121813; --ink: #eef3e8; --dim: #a3ae9c; --mute: #77826f;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .16);
  --hover: rgba(255, 255, 255, .06); --press: rgba(255, 255, 255, .03); --soft: rgba(255, 255, 255, .04);
  --accent: #8eab6b; --on-accent: #0b0f0c; --accent-tint: rgba(142, 171, 107, .16); --accent-line: rgba(142, 171, 107, .45);
  --danger: #e98f8f; --star: #e3c15c;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { color-scheme: dark; background: var(--bg); accent-color: var(--accent); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
body { min-height: 100vh; min-height: 100dvh; color: var(--ink); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { line-height: max(1.2em, 20px); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, svg { display: block; }
::selection { background: rgba(142, 171, 107, .35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; fill: currentColor; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- buttons and fields: flat and rounded, like axklo.com ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 18px; border-radius: 999px; font-weight: 500; white-space: nowrap;
  color: var(--ink); background: transparent; border: 1px solid var(--line-2); transition: background .2s, filter .2s, translate .2s; }
.btn:hover { background: var(--hover); }
.btn:active { background: var(--press); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); translate: 0 -1px; }
.btn-primary:active { translate: 0 0; filter: brightness(.95); }
.btn-lg { min-height: 46px; padding: 0 26px; font-size: 15px; font-weight: 600; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #fff; }
.btn-google:hover { background: #eef1ed; }
.btn-google svg { width: 18px; height: 18px; }
.btn-danger { color: var(--danger); border-color: rgba(233, 143, 143, .4); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.shake { animation: shake .38s ease; }

.input { width: 100%; height: 42px; padding: 0 14px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 10px; outline: none; transition: border-color .2s, background .2s; caret-color: var(--accent); }
.input::placeholder { color: var(--mute); }
.input:hover { background: var(--hover); }
.input:focus { border-color: var(--accent); background: var(--bg); }
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 8px; color: var(--dim); font-size: 13px; }
.hint { min-height: 20px; margin-top: 8px; font-size: 13px; color: var(--dim); }
.hint.bad { color: var(--danger); }
.hint.ok { color: var(--accent); }

.ib { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--dim); transition: background .12s, color .12s; }
.ib:hover { background: var(--hover); color: var(--ink); }
.ib:active { background: var(--press); }
.ib:disabled { opacity: .35; cursor: default; background: none; }
.ib.spin .ic { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- login / simple pages ---- */
.stage { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.dialog { width: min(440px, 100%); overflow: hidden; border-radius: 20px; background: var(--pop); border: 1px solid var(--line); animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dialog-body { padding: 28px; }
.dialog h2, .dialog h1 { margin-bottom: 8px; font: 700 22px/30px var(--font); letter-spacing: -.02em; }
.dlg-ico { width: 44px; height: 44px; margin-bottom: 18px; }
.dlg-ico img { width: 100%; height: 100%; border-radius: 10px; }
.dlg-text { margin-bottom: 20px; color: var(--dim); }
.view { display: none; }
.view.show { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.methods { display: flex; flex-direction: column; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 14px -10px; padding: 4px 10px; border-radius: 999px; color: var(--dim); font-size: 13px; }
.back:hover { background: var(--soft); color: var(--ink); }
.dialog-cmd { display: grid; gap: 8px; padding: 0 28px 28px; }
.dialog-cmd .btn { width: 100%; }
.err { margin-bottom: 16px; padding: 10px 14px; border-radius: 10px; color: var(--danger); border: 1px solid rgba(233, 143, 143, .4); }
.status-ico { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-tint); color: var(--accent); }
.status-ico.bad { background: transparent; border-color: rgba(233, 143, 143, .45); color: var(--danger); }
.status-ico .ic { width: 30px; height: 30px; }
.status-ico .ring { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-tint); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.center { text-align: center; }

/* ---- the app ---- */
body.app { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.top { height: 64px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; }
.brand { display: flex; align-items: center; gap: 10px; width: 232px; padding-left: 4px; font: 700 20px/24px var(--font); letter-spacing: -.03em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span { color: var(--dim); font-weight: 500; }
.search { position: relative; flex: 1; min-width: 0; max-width: 720px; height: 44px; display: flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); transition: background .2s, border-color .2s; }
.search:hover { background: var(--hover); }
.search:focus-within { background: var(--panel); border-color: var(--accent); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 15px; caret-color: var(--accent); }
.search input::placeholder { color: var(--mute); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #243026; color: #fff; font: 600 13px var(--font); background-size: cover; background-position: center; }
.avatar.me { width: 36px; height: 36px; }

.shell { flex: 1; min-height: 0; display: flex; padding: 0 12px 12px 0; }
.nav { width: 256px; flex: none; padding: 4px 8px 8px 12px; overflow: auto; }
.compose-btn { display: flex; align-items: center; gap: 12px; height: 52px; margin: 4px 0 16px; padding: 0 24px 0 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; transition: filter .2s, translate .2s; }
.compose-btn:hover { filter: brightness(1.1); translate: 0 -1px; }
.compose-btn:active { translate: 0 0; }
.nav-i { display: flex; align-items: center; gap: 16px; width: 100%; height: 36px; padding: 0 12px 0 14px; border-radius: 999px; padding-left: 14px; color: var(--dim); text-align: left; transition: background .2s, color .2s; }
.nav-i:hover { background: var(--hover); color: var(--ink); }
.nav-i.on { background: var(--accent-tint); color: var(--ink); font-weight: 600; }
.nav-i .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-i .n { font-size: 12px; font-weight: 600; color: var(--dim); }
.nav-i.on .ic { color: var(--accent); }
.nav-h { margin: 18px 0 4px 14px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.bar { height: 48px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); }
.bar .sp { flex: 1; }
.bar .pager { font-size: 12px; color: var(--mute); padding: 0 8px; }
.bar .title { font: 600 15px var(--font); padding-left: 6px; }
.cb { width: 36px; height: 36px; flex: none; display: grid; place-items: center; }
.cb i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 3px; border: 2px solid var(--mute); transition: background .12s, border-color .12s; }
.cb:hover i { border-color: var(--ink); }
.cb svg { width: 14px; height: 14px; fill: var(--on-accent); opacity: 0; transform: scale(.5); transition: opacity .12s, transform .15s var(--ease); }
.cb[aria-checked="true"] i, .cb[aria-checked="mixed"] i { background: var(--accent); border-color: var(--accent); }
.cb[aria-checked="true"] svg, .cb[aria-checked="mixed"] svg { opacity: 1; transform: none; }

.list { flex: 1; min-height: 0; overflow: auto; }
.row { position: relative; display: flex; align-items: center; height: 44px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--line); cursor: pointer; background: transparent; transition: background .1s; }
.row:hover { background: var(--hover); z-index: 1; }
.row.unread { background: rgba(255, 255, 255, .03); }
.row.unread:hover { background: var(--hover); }
.row.sel { background: var(--accent-tint); }
.row.focus::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.row .star { width: 32px; height: 36px; display: grid; place-items: center; color: rgba(255,255,255,.28); }
.row .star:hover { color: var(--dim); }
.row .star.on { color: var(--star); }
.row .who { width: 190px; flex: none; padding-right: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who .cnt { color: var(--mute); font-size: 12px; margin-left: 4px; font-weight: 400; }
.row .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.row .what b { font-weight: inherit; color: var(--ink); }
.row .chip { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; font-size: 11px; line-height: 16px; color: var(--dim); background: var(--soft); border: 1px solid var(--line); vertical-align: 1px; }
.row .att { color: var(--mute); margin-left: 8px; }
.row .att .ic { width: 16px; height: 16px; }
.row .when { width: 84px; flex: none; text-align: right; font-size: 12px; color: var(--mute); }
.row.unread .who, .row.unread .what b, .row.unread .when { font-weight: 700; color: var(--ink); }
.row .acts { position: absolute; right: 8px; top: 3px; display: none; align-items: center; gap: 2px; padding-left: 8px; background: #161c17; border-radius: 999px; }
.row:hover .acts { display: flex; }
.row:hover .when { visibility: hidden; }
.empty { display: grid; place-items: center; height: 100%; min-height: 260px; padding: 24px; text-align: center; color: var(--mute); }
.empty b { display: block; margin-bottom: 4px; font: 700 20px var(--font); letter-spacing: -.02em; color: var(--ink); }
.more { display: block; margin: 16px auto; }
.sk { height: 44px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .035), transparent) 0 0 / 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---- a conversation ---- */
.view-t { flex: 1; min-height: 0; overflow: auto; padding: 8px 20px 40px; }
.subject { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px 48px; font: 600 24px/30px var(--font); letter-spacing: -.03em; }
.subject .chip { font: 12px/18px var(--font); padding: 0 8px; border-radius: 4px; background: var(--soft); border: 1px solid var(--line-2); color: var(--dim); }
.msg { margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); }
.msg-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.msg-h .who { flex: 1; min-width: 0; }
.msg-h .nm { font-weight: 600; }
.msg-h .nm small { font-weight: 400; color: var(--mute); margin-left: 6px; }
.msg-h .sub { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-h .dt { font-size: 12px; color: var(--mute); white-space: nowrap; }
.msg.open .msg-h { cursor: default; }
.msg-b { display: none; padding: 0 14px 16px 62px; }
.msg.open .msg-b { display: block; }
.msg:not(.open) .msg-h .sub.s { display: block; }
.msg.open .msg-h .sub.s { display: none; }
.msg-h .sub.a { display: none; }
.msg.open .msg-h .sub.a { display: block; }
.text { white-space: pre-wrap; word-break: break-word; line-height: 1.6; color: var(--ink); }
.quote-t { margin: 8px 0 0; padding: 0 10px; height: 18px; border-radius: 999px; background: var(--soft); color: var(--mute); font-size: 11px; line-height: 16px; letter-spacing: 1px; }
.quote-t:hover { background: var(--hover); color: var(--ink); }
.quoted { display: none; margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--line-2); color: var(--mute); white-space: pre-wrap; }
.quoted.show { display: block; }
.frame { width: 100%; border: 0; display: block; background: #141414; border-radius: 10px; min-height: 40px; color-scheme: light; }
.frame.light { background: #fff; }
.frame-f { display: flex; gap: 8px; margin-top: 8px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.file { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--soft); font-size: 13px; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file small { color: var(--mute); }
a.file:hover { background: var(--hover); }
.warn { margin: 10px 0 0; padding: 8px 14px; border-radius: 10px; font-size: 13px; color: var(--danger); border: 1px solid rgba(233, 143, 143, .4); }
.reply-row { display: flex; gap: 10px; margin: 18px 0 0 48px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); font-weight: 500; transition: background .2s, color .2s; }
.pill:hover { background: var(--hover); color: var(--ink); }

/* ---- compose ---- */
.wins { position: fixed; right: 24px; bottom: 0; z-index: 60; display: flex; align-items: flex-end; gap: 16px; pointer-events: none; }
.win { pointer-events: auto; width: 540px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 90px); display: flex; flex-direction: column; border-radius: 16px 16px 0 0; background: var(--pop); border: 1px solid var(--line-2); border-bottom: 0; animation: up .3s var(--ease) both; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.win-h { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; cursor: pointer; font-weight: 600; }
.win-h .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-h .ib { width: 32px; height: 32px; }
.win-b { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.win.min .win-b { display: none; }
.win.big { width: min(900px, calc(100vw - 48px)); height: calc(100dvh - 90px); }
.f { display: flex; align-items: flex-start; gap: 8px; min-height: 40px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.f > label { width: 44px; flex: none; padding-top: 8px; color: var(--mute); font-size: 13px; }
.f select { flex: 1; min-width: 0; height: 32px; padding: 0; background: none; border: 0; outline: 0; color: var(--ink); }
.f select option { background: #121813; }
.f input.plain { flex: 1; min-width: 80px; height: 32px; background: none; border: 0; outline: 0; caret-color: var(--accent); }
.f .tos { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 0; }
.f .toggles { padding-top: 8px; display: flex; gap: 8px; font-size: 13px; color: var(--mute); }
.f .toggles button:hover { color: var(--ink); text-decoration: underline; }
.tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 26px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line-2); font-size: 13px; }
.tag.bad { border-color: rgba(233, 143, 143, .6); color: var(--danger); }
.tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag button { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--mute); }
.tag button:hover { background: var(--hover); color: var(--ink); }
.tag .ic { width: 14px; height: 14px; }
.win textarea { flex: 1; min-height: 220px; resize: none; padding: 14px 16px; background: none; border: 0; outline: 0; line-height: 1.55; caret-color: var(--accent); font-size: 14px; }
.note { padding: 0 16px 8px; font-size: 12px; color: var(--mute); }
.win-f { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--line); }
.win-f .btn-primary { min-width: 96px; }
.win-f .sp { flex: 1; }
.win-f .state { font-size: 13px; color: var(--mute); padding: 0 8px; }
.win-f .state.bad { color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }

/* ---- popups ---- */
.snack { position: fixed; left: 16px; bottom: 16px; z-index: 90; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--pop); border: 1px solid var(--line-2); animation: up .3s var(--ease) both; max-width: calc(100vw - 32px); }
.snack.bad { border-color: rgba(233, 143, 143, .55); }
.snack button { color: var(--accent); font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.snack button:hover { background: var(--hover); }
.smoke { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); animation: fade .2s; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal .dialog { max-height: calc(100dvh - 32px); overflow: auto; width: min(520px, 100%); }
.modal h3 { margin: 24px 0 8px; font: 600 15px var(--font); }
.idl { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.idl div { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 10px; background: var(--soft); min-height: 44px; }
.idl div span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.idl div small { color: var(--mute); }
.two { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.menu { position: absolute; right: 8px; top: 56px; z-index: 40; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--pop); border: 1px solid var(--line-2); animation: fade .15s; }
.menu button, .menu .who { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 10px; text-align: left; }
.menu button:hover { background: var(--hover); }
.menu .who { color: var(--mute); font-size: 13px; cursor: default; }
.top { position: relative; }
.sc-open { display: none; }
.scrim { display: none; position: fixed; inset: 0; z-index: 74; background: rgba(0, 0, 0, .6); animation: fade .2s; }

@media (max-width: 899px) {
  .sc-open { display: grid; }
  .brand { width: auto; }
  .brand span { display: none; }
  .nav { position: fixed; z-index: 75; top: 0; bottom: 0; left: 0; width: 280px; max-width: 86vw; padding-top: 12px; background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .3s var(--ease); }
  body.nav-open .nav { transform: none; }
  body.nav-open .scrim { display: block; }
  .shell { padding: 0 0 0 0; }
  .main { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .top-r #settingsBtn { display: none; }
  .row { display: grid; grid-template-columns: 36px 32px minmax(0, 1fr) auto; grid-template-areas: "cb star who when" "cb star what what"; height: auto; padding: 8px 12px 8px 4px; row-gap: 2px; align-items: center; }
  .row > .cb { grid-area: cb; align-self: start; }
  .row > .star { grid-area: star; align-self: start; }
  .row .who { grid-area: who; width: auto; padding-right: 8px; }
  .row .when { grid-area: when; width: auto; }
  .row .what { grid-area: what; }
  .row .att { display: none; }
  .subject { margin-left: 0; font-size: 19px; }
  .msg-b { padding-left: 14px; }
  .reply-row { margin-left: 0; flex-wrap: wrap; }
  .wins { right: 0; left: 0; }
  .win, .win.big { width: 100vw; max-width: 100vw; height: calc(100dvh - 16px); max-height: none; border-radius: 16px 16px 0 0; }
  .win.min { height: auto; }
  .row .acts { display: none !important; }
  .row:hover .when { visibility: visible; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.frame-f .quote-t { margin: 0; height: 24px; padding: 0 12px; font-size: 12px; letter-spacing: 0; }
