/* havahe_mail — biała wersja interfejsu Wallace'a: Geist, cienkie obrysy, podświetlona górna krawędź,
   delikatne ziarno, narożniki „celownika”, kwadratowe znaczniki i oszczędne akcenty
   (pomarańcz = AI / na żywo, zieleń = online, żółć = notatki). */
@font-face { font-family: Geist; font-weight: 400; src: url(fonts/geist-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+25A0-25FF; }
@font-face { font-family: Geist; font-weight: 400; src: url(fonts/geist-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: Geist; font-weight: 500; src: url(fonts/geist-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+25A0-25FF; }
@font-face { font-family: Geist; font-weight: 500; src: url(fonts/geist-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: Geist; font-weight: 700; src: url(fonts/geist-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+25A0-25FF; }
@font-face { font-family: Geist; font-weight: 700; src: url(fonts/geist-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: 'Geist Mono'; font-weight: 400; src: url(fonts/geist-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+25A0-25FF; }
@font-face { font-family: 'Geist Mono'; font-weight: 400; src: url(fonts/geist-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: 'Geist Mono'; font-weight: 500; src: url(fonts/geist-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+25A0-25FF; }
@font-face { font-family: Doto; font-weight: 700; src: url(fonts/doto-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #f3f3f0;
  --surface: #ffffff;
  --soft: #f8f8f6;
  --fill: rgba(14, 14, 16, .035);
  --fill-strong: rgba(14, 14, 16, .06);
  --stroke: rgba(14, 14, 16, .08);
  --stroke-strong: rgba(14, 14, 16, .16);
  --ink: #0e0e10;
  --text: #0e0e10;
  --dim: rgba(14, 14, 16, .6);
  --faint: rgba(14, 14, 16, .38);
  --orange: #ff5a1f;
  --tint-orange: rgba(255, 90, 31, .08);
  --stroke-orange: rgba(255, 90, 31, .3);
  --green: #3fbf2e;
  --yellow: #e8c63a;
  --lit: inset 0 1px 0 #fff;
  --shadow-card: 0 1px 1px rgba(14, 14, 16, .03), 0 8px 20px -8px rgba(14, 14, 16, .08);
  --shadow-up: 0 2px 4px rgba(14, 14, 16, .04), 0 14px 26px -12px rgba(14, 14, 16, .2);
  --shadow-lg: 0 24px 64px -12px rgba(14, 14, 16, .28);
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --font: Geist, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
body::before { content: ''; position: fixed; inset: 0; background: var(--grain); opacity: .06; pointer-events: none; z-index: 100; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
i[data-i] { display: inline-flex; width: 18px; height: 18px; flex: none; }
i[data-i] svg { width: 100%; height: 100%; transition: transform .25s var(--spring); }
mark { background: rgba(232, 198, 58, .38); color: inherit; border-radius: 2px; padding: 0 1px; }
::selection { background: rgba(255, 90, 31, .18); }

/* kwadratowy znacznik à la Wallace */
.sq { display: inline-block; width: 5px; height: 5px; background: var(--orange); flex: none; }
.sq.y { background: var(--yellow); } .sq.g { background: var(--green); } .sq.k { background: var(--ink); }

/* narożniki celownika */
.crop {
  position: absolute; inset: -9px; pointer-events: none; opacity: .7; z-index: 0;
  --c: rgba(14, 14, 16, .28);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 10px 1px, linear-gradient(var(--c), var(--c)) 0 0 / 1px 10px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 10px 1px, linear-gradient(var(--c), var(--c)) 100% 0 / 1px 10px,
    linear-gradient(var(--c), var(--c)) 0 100% / 10px 1px, linear-gradient(var(--c), var(--c)) 0 100% / 1px 10px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 10px 1px, linear-gradient(var(--c), var(--c)) 100% 100% / 1px 10px;
  background-repeat: no-repeat;
}

/* ---------- układ ---------- */
.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: 236px minmax(330px, 410px) 1fr;
  grid-template-rows: 74px 1fr;
  grid-template-areas: "rail top top" "rail list thread";
}
.rail { grid-area: rail; padding: 22px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 28px 0 16px; }
.list-pane { grid-area: list; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.thread-pane {
  grid-area: thread; position: relative; min-width: 0; min-height: 0;
  background: var(--surface); border: 1px solid var(--stroke); border-bottom: 0;
  border-radius: 16px 16px 0 0; box-shadow: var(--lit), var(--shadow-card);
  margin: 10px 26px 0 12px;
  display: flex; flex-direction: column;
}
.thread-pane > :not(.crop) { position: relative; z-index: 1; }
.only-mobile { display: none !important; }

/* ---------- pasek boczny ---------- */
.brand { display: flex; align-items: center; gap: 3px; height: 32px; padding: 0 10px; margin-bottom: 22px; color: var(--ink); }
.brand .logo { display: block; width: 84px; height: 13px; }
.brand .logo svg { width: 100%; height: 100%; display: block; }
.brand .suffix { font: 500 13px/1 var(--mono); color: var(--faint); transform: translateY(1px); letter-spacing: -.01em; }
.compose-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 18px; border-radius: 10px; margin: 0 2px 18px;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 18px -8px rgba(14,14,16,.5);
  transition: transform .12s var(--ease), box-shadow .2s var(--ease);
}
.compose-btn:hover { box-shadow: 0 0 0 3px rgba(14,14,16,.08), 0 8px 18px -8px rgba(14,14,16,.5); }
.compose-btn:hover i svg { transform: rotate(-12deg); }
.compose-btn:active { transform: scale(.97); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid transparent; color: var(--dim); text-align: left; font-size: 14px;
  transition: background .18s var(--ease), color .18s, border-color .18s;
}
.nav button:hover { background: var(--fill); color: var(--text); }
.nav button.on { background: var(--surface); border-color: var(--stroke); color: var(--text); font-weight: 500; box-shadow: var(--lit), 0 1px 2px rgba(14,14,16,.04); }
.nav .label { flex: 1; white-space: nowrap; }
.nav .count { font: 500 12px var(--mono); color: var(--orange); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.rail-note { padding: 10px 10px 0; font-size: 11.5px; color: var(--faint); display: flex; gap: 8px; align-items: baseline; }
.rail-note .sq { transform: translateY(-1px); }

/* ---------- góra ---------- */
.search {
  flex: 1; max-width: 680px; height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 16px; border-radius: 12px; background: var(--surface); color: var(--faint);
  border: 1px solid var(--stroke); box-shadow: var(--lit);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--stroke-strong); box-shadow: var(--lit), 0 0 0 4px rgba(14,14,16,.04); }
.search input { flex: 1; border: 0; outline: 0; background: none; height: 100%; min-width: 0; color: var(--text); font-size: 14.5px; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 11px var(--mono); color: var(--faint); border: 1px solid var(--stroke); border-radius: 5px; padding: 1px 6px; }
.search:focus-within kbd { display: none; }
.status-online { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim); margin-left: auto; }
.status-online i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(63, 191, 46, .55); }
.av.logo i[data-i] { width: 70%; height: 70%; }
.av.logo svg { width: 100%; height: 100%; }
/* przełącznik kont */
.acct { position: relative; }
.acct-btn {
  position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 6px; border-radius: 12px;
  border: 1px solid transparent; color: var(--dim); transition: background .18s var(--ease), border-color .18s;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--surface); border-color: var(--stroke); box-shadow: var(--lit); }
.acct-btn .av { width: 32px; height: 32px; font-size: 13px; }
.acct-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.acct-txt b { font-weight: 500; font-size: 13px; color: var(--text); }
.acct-txt small { font: 11px var(--mono); color: var(--faint); }
.acct-btn > i[data-i] { width: 15px; height: 15px; }
.acct-btn[aria-expanded="true"] > i svg { transform: rotate(180deg); }
.acct-dot { position: absolute; left: 30px; top: 6px; width: 7px; height: 7px; background: var(--orange); box-shadow: 0 0 0 2px var(--bg); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: 290px; padding: 6px;
  background: var(--surface); border: 1px solid var(--stroke-strong); border-radius: 14px; box-shadow: var(--lit), var(--shadow-lg);
  animation: menu-in .2s var(--ease) both; transform-origin: top right;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.am-h { font-size: 11.5px; color: var(--faint); padding: 8px 10px 6px; }
.am-it { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; text-align: left; transition: background .15s; }
.am-it:hover, .am-it.on { background: var(--fill); }
.am-it .av { width: 34px; height: 34px; }
.am-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.am-t b { font-weight: 500; font-size: 14px; }
.am-t small { font: 11.5px var(--mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-u { font: 500 12px var(--mono); color: var(--orange); }
.am-ok { width: 16px; height: 16px; color: var(--text); }
.am-sep { height: 1px; background: var(--stroke); margin: 6px 4px; }
.am-act { width: 100%; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; color: var(--dim); }
.am-act:hover { background: var(--fill); color: var(--text); }
.am-act i[data-i] { width: 16px; height: 16px; }
.cw-from { font: 11.5px var(--mono); color: var(--faint); font-weight: 400; margin-left: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--dim);
  border: 1px solid transparent; transition: background .18s var(--ease), color .18s, border-color .18s, transform .12s;
}
.icon-btn:hover { background: var(--fill-strong); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm i[data-i] { width: 15px; height: 15px; }
.icon-btn.on { color: var(--orange); }
.icon-btn.on svg { fill: currentColor; }
.icon-btn[aria-pressed="true"] { background: var(--surface); border-color: var(--stroke); color: var(--text); box-shadow: var(--lit), 0 1px 2px rgba(14,14,16,.05); }

/* ---------- lista: karty ---------- */
.list-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 34px 6px; }
.list-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.list-head span { color: var(--faint); font-size: 12px; }
.list { list-style: none; margin: 0; padding: 14px 22px 48px 26px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--stroke-strong) transparent; }
.list li[data-id] { position: relative; margin-bottom: 12px; }
.item {
  position: relative; z-index: 1; padding: 18px 22px 18px 20px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--lit), var(--shadow-card);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .2s;
  touch-action: pan-y;
}
.list.anim .item { animation: card-in .35s var(--ease) both; }
.item:hover { box-shadow: var(--lit), var(--shadow-up); transform: translateY(-1px); }
.item.sel { border-color: var(--stroke-strong); box-shadow: var(--lit), var(--shadow-up); }
.item.kb { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.item .c-top { display: flex; align-items: flex-start; gap: 14px; }
.item .c-id { flex: 1; min-width: 0; }
.item .subj { font-size: 14.5px; font-weight: 500; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.item .who { font-size: 13.5px; color: var(--faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .who .n { font: 11.5px var(--mono); margin-left: 6px; color: var(--faint); }
.item .when { font: 11.5px/1.9 var(--mono); color: var(--faint); white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.item .snip {
  margin: 14px 0 0; color: var(--dim); font-size: 14px; line-height: 1.6; opacity: .85;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.item.unread .subj { color: var(--text); font-weight: 700; }
.item.unread .who { color: var(--dim); }
.item.unread .when { color: var(--text); }
.item .star { width: 13px; height: 13px; color: var(--orange); }
.item .star svg { fill: currentColor; }
.item .att { display: flex; align-items: center; gap: 6px; margin-top: 12px; font: 12px var(--mono); color: var(--faint); min-width: 0; }
.item .att span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .att i[data-i] { width: 13px; height: 13px; }
.swipe-bg {
  position: absolute; inset: 0; border-radius: 12px; background: var(--ink); color: #fff;
  display: flex; align-items: center; padding: 0 26px; opacity: 0; z-index: 0;
}
.item.dragging { animation: none; }
.empty { list-style: none; text-align: center; color: var(--faint); padding: 72px 24px; font-size: 14px; }
.empty b { display: block; color: var(--text); font-weight: 500; font-size: 16px; margin-bottom: 6px; }
.empty code { font: 12px var(--mono); background: var(--fill-strong); padding: 1px 5px; border-radius: 4px; }

/* ---------- awatar ---------- */
.av {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; user-select: none;
  font-weight: 500; font-size: 13px; color: var(--ink); background: #ebeae5; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px var(--stroke);
}
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.me { background: var(--ink); color: #fff; }

/* ---------- wątek ---------- */
.th-bar { display: flex; align-items: center; gap: 2px; padding: 12px 14px 0; }
.th-bar .sp { flex: 1; }
.th-bar .ttl { font-weight: 500; padding-left: 6px; }
.th-scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--stroke-strong) transparent; }
.th-inner { max-width: 740px; margin: 0 auto; padding: 6px 40px 40px; }
.th-head h1 { margin: 8px 0 8px; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.th-meta { color: var(--faint); font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.th-tools { display: flex; align-items: center; gap: 10px; margin: 22px 0 6px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fill); border: 1px solid var(--stroke); }
.seg button { height: 28px; padding: 0 14px; border-radius: 7px; font-size: 13px; color: var(--dim); border: 1px solid transparent; transition: background .2s var(--ease), color .2s, box-shadow .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 500; border-color: var(--stroke); box-shadow: var(--lit), 0 1px 3px rgba(14,14,16,.07); }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 9px;
  color: var(--text); font-size: 13px; font-weight: 500; border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--lit);
  transition: border-color .18s, background .18s;
}
.ghost-btn:hover { border-color: var(--stroke-orange); background: var(--tint-orange); }
.ghost-btn i[data-i] { width: 15px; height: 15px; color: var(--orange); }
.ghost-btn:hover i svg { transform: rotate(20deg) scale(1.1); }
.th-empty { flex: 1; display: grid; place-items: center; color: var(--faint); text-align: center; padding: 24px; font-size: 14px; }
.th-empty .logo-big { width: 120px; margin: 0 auto 18px; color: rgba(14,14,16,.12); }
.th-empty .logo-big svg { width: 100%; display: block; }
.th-empty kbd { font: 11px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--stroke); color: var(--dim); }

/* streszczenie */
.summary {
  position: relative; margin: 16px 0 4px; padding: 16px 18px 16px; border-radius: 12px;
  background: var(--soft); border: 1px solid var(--stroke); box-shadow: var(--lit);
  animation: msg-in .38s var(--ease) both;
}
.summary .hd { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); margin-bottom: 10px; }
.summary .hd button { margin-left: auto; }
.summary ul { margin: 0; padding: 0; list-style: none; }
.summary li { position: relative; padding-left: 16px; margin: 5px 0; font-size: 14.5px; }
.summary li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 4px; height: 4px; background: var(--faint); }
.summary .todo { display: flex; gap: 8px; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stroke); font-size: 13.5px; color: var(--dim); }
.summary .todo .sq { transform: translateY(-1px); }
.summary .todo b { color: var(--text); font-weight: 500; }
/* trzy bloczki zapalające się po kolei (loader Wallace'a) */
.blocks { display: inline-flex; gap: 3px; }
.blocks i { width: 6px; height: 6px; background: var(--orange); opacity: .2; animation: blk 1.05s infinite; }
.blocks i:nth-child(2) { animation-delay: .35s; } .blocks i:nth-child(3) { animation-delay: .7s; }
@keyframes blk { 0%, 60%, 100% { opacity: .2; } 20% { opacity: 1; } }
.summary.loading .ln { height: 10px; border-radius: 3px; margin: 10px 0; background: linear-gradient(90deg, var(--fill-strong), rgba(14,14,16,.1), var(--fill-strong)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

/* widok uproszczony (czat) */
.day { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--faint); margin: 30px 0 12px; }
.day::before, .day::after { content: ''; flex: 1; height: 1px; background: var(--stroke); }
.msg { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0; animation: msg-in .38s var(--ease) both; }
.msg .av { visibility: hidden; margin-top: 22px; }
.msg.first .av { visibility: visible; }
.msg .col { display: flex; flex-direction: column; align-items: flex-start; max-width: min(560px, 82%); min-width: 0; }
.msg .meta { font-size: 11px; line-height: 1.2; color: var(--faint); margin: 10px 4px 6px; }
.msg.cont .meta { display: none; }
.bubble {
  background: var(--soft); border: 1px solid var(--stroke); box-shadow: var(--lit);
  padding: 11px 15px 12px; border-radius: 4px 14px 14px 14px; overflow-wrap: anywhere; font-size: 14.5px;
}
.bubble p { margin: 0; }
.bubble p + p { margin-top: 8px; }
.bubble a { color: var(--text); text-decoration-color: var(--orange); text-underline-offset: 2px; }
.msg.out { flex-direction: row-reverse; }
.msg.out .col { align-items: flex-end; }
.msg.out .bubble { background: var(--fill-strong); border-color: var(--stroke-strong); border-radius: 14px 14px 4px 14px; box-shadow: none; }
.msg.out .av { display: none; }
.msg.cont .bubble { border-radius: 14px; }
.files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.file {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--lit); min-width: 210px; max-width: 270px;
}
.file .ic { width: 36px; height: 36px; border-radius: 7px; display: grid; place-items: center; font: 500 10px var(--mono); color: var(--ink); background: var(--fill-strong); flex: none; position: relative; }
.file .ic::after { content: ''; position: absolute; right: 4px; top: 4px; width: 4px; height: 4px; background: var(--k, var(--faint)); }
.file .ic.pdf { --k: var(--orange); } .file .ic.img { --k: var(--green); } .file .ic.doc { --k: #5b6cf0; }
.file .meta2 { flex: 1; min-width: 0; }
.file .meta2 b { display: block; font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .meta2 span { font: 11px var(--mono); color: var(--faint); }
.file .icon-btn { width: 30px; height: 30px; }
.file .icon-btn:hover svg { transform: translateY(1px); }
.smart {
  margin-top: 6px; padding: 14px 18px 16px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--stroke); box-shadow: var(--lit), var(--shadow-card); min-width: 270px; max-width: 370px;
}
.smart .k { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--dim); margin-bottom: 12px; }
.smart dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; align-items: baseline; }
.smart dt { color: var(--faint); font-size: 12.5px; }
.smart dd { margin: 0; font-size: 14px; }
.smart dd.big { font: 700 26px/1.1 Doto, var(--mono); letter-spacing: .04em; }

/* widok oryginalny */
.om { border-bottom: 1px solid var(--stroke); padding: 18px 0; }
.om:last-child { border-bottom: 0; }
.om-h { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.om-h .who { flex: 1; min-width: 0; }
.om-h .who b { font-weight: 500; }
.om-h .who .em { color: var(--faint); font-size: 12.5px; margin-left: 4px; }
.om-h .who .to { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-h .dt { font: 11.5px var(--mono); color: var(--faint); white-space: nowrap; padding-top: 2px; }
.om-b { margin: 14px 0 0 52px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.om-b .q { color: var(--faint); border-left: 2px solid var(--stroke-strong); padding-left: 12px; margin-top: 8px; }
.om-b .sig { color: var(--faint); }
.om-b .sig-html { white-space: normal; margin-top: 4px; }
.dots { margin: 10px 0 0 52px; height: 18px; padding: 0 8px; border-radius: 5px; border: 1px solid var(--stroke); color: var(--dim); font-size: 13px; letter-spacing: 1px; line-height: 16px; }
.om.collapsed .om-b, .om.collapsed .dots, .om.collapsed .files { display: none; }
.om .snip { color: var(--faint); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om:not(.collapsed) .snip { display: none; }
.om .files { margin-left: 52px; margin-top: 14px; }

/* ---------- edytor ---------- */
.reply { padding: 10px 40px 20px; max-width: 820px; margin: 0 auto; width: 100%; }
.reply-bar { display: flex; gap: 8px; }
.reply-pill {
  flex: 1; height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--lit);
  text-align: left; color: var(--faint); display: flex; align-items: center; gap: 10px; font-size: 14px; transition: border-color .18s;
}
.reply-pill:hover { border-color: var(--stroke-strong); color: var(--dim); }
.ai-pill {
  height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--stroke-orange); background: var(--tint-orange); color: var(--text);
  font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: box-shadow .18s;
}
.ai-pill i[data-i] { width: 16px; height: 16px; color: var(--orange); }
.ai-pill:hover { box-shadow: 0 0 0 3px rgba(255, 90, 31, .1); }
.ai-pill:hover i svg { transform: rotate(20deg) scale(1.1); }
.composer {
  border: 1px solid var(--stroke); border-radius: 14px; background: var(--surface); box-shadow: var(--lit), var(--shadow-up);
  animation: msg-in .3s var(--ease) both; overflow: hidden; transition: border-color .2s;
}
.composer:focus-within { border-color: var(--stroke-strong); }
.composer .fld { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--stroke); padding: 0 18px; height: 44px; }
.composer .fld label { color: var(--faint); font-size: 13px; width: 44px; }
.composer .fld input { flex: 1; border: 0; outline: 0; background: none; height: 100%; font-size: 14px; }
.ai-row {
  display: flex; align-items: center; gap: 10px; margin: 10px 10px 0; padding: 5px 5px 5px 12px; border-radius: 10px;
  background: var(--tint-orange); border: 1px solid var(--stroke-orange);
}
.ai-row > i[data-i] { width: 16px; height: 16px; color: var(--orange); }
.ai-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 34px; color: var(--text); font-size: 14px; caret-color: var(--orange); }
.ai-row input::placeholder { color: var(--faint); }
.btn {
  height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 500; font-size: 13.5px; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background .25s var(--ease), color .25s, border-color .25s, box-shadow .2s, transform .12s;
}
.btn:active { transform: scale(.96); }
.btn i[data-i] { width: 15px; height: 15px; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { box-shadow: 0 0 0 3px rgba(14,14,16,.1); }
.btn.primary:hover i svg { transform: translate(1px, -1px); }
.btn.primary:disabled { opacity: .3; cursor: default; box-shadow: none; }
.btn.busy { background: var(--tint-orange); border-color: var(--orange); color: var(--text); }
.btn.busy::before { content: ''; width: 8px; height: 8px; border-radius: 1.5px; background: var(--orange); }
.btn.quiet { color: var(--dim); }
.btn.quiet:hover { background: var(--fill-strong); color: var(--text); }
.btn.line { border-color: var(--stroke); background: var(--surface); box-shadow: var(--lit); color: var(--text); }
.btn.line:hover { border-color: var(--stroke-strong); }
.composer textarea {
  display: block; width: 100%; border: 0; outline: 0; resize: none; background: none;
  padding: 14px 18px 6px; min-height: 110px; max-height: 42vh; line-height: 1.6; font-size: 14.5px; caret-color: var(--orange);
}
.composer textarea::placeholder { color: var(--faint); }
.composer textarea.writing { caret-color: transparent; }
.sig-slot { position: relative; margin: 0 18px 4px; padding: 10px 0 4px; border-top: 1px dashed var(--stroke-strong); }
.sig-slot .sig-prev { font-size: 13px; opacity: .85; pointer-events: none; max-height: 140px; overflow: hidden; }
.sig-slot .sig-prev img { max-width: 100%; }
.sig-slot .sig-ctl { position: absolute; right: -6px; top: 6px; display: flex; align-items: center; gap: 4px; }
.sig-slot select, .sig-add {
  height: 26px; border-radius: 7px; border: 1px solid var(--stroke); background: var(--surface); font-size: 12px; color: var(--dim); padding: 0 8px; cursor: pointer;
}
.sig-add { margin: 2px 18px 6px; display: inline-flex; align-items: center; gap: 6px; }
.sig-add:hover { color: var(--text); border-color: var(--stroke-strong); }
.sig-add i[data-i] { width: 13px; height: 13px; }
.refine { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 14px 2px; }
.refine button {
  height: 28px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--stroke); font-size: 12.5px; color: var(--dim); background: var(--surface);
  animation: pop .3s var(--spring) both; transition: border-color .18s, color .18s;
}
.refine button:nth-child(2) { animation-delay: .04s; } .refine button:nth-child(3) { animation-delay: .08s; } .refine button:nth-child(4) { animation-delay: .12s; }
.refine button:hover { border-color: var(--stroke-orange); color: var(--text); }
.comp-foot { display: flex; align-items: center; gap: 4px; padding: 8px 10px 10px; }
.comp-foot .sp { flex: 1; }
.comp-foot .status { font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.ai-toggle i[data-i] { color: var(--orange); }
.ai-toggle[aria-pressed="true"] { border-color: var(--stroke-orange); background: var(--tint-orange); }

/* nowa wiadomość */
.compose-win {
  position: fixed; right: 28px; bottom: 0; width: min(580px, calc(100vw - 32px)); z-index: 30;
  border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--stroke-strong); border-bottom: 0;
  animation: up .3s var(--ease) both;
}
.compose-win .cw-h { display: flex; align-items: center; gap: 8px; padding: 12px 10px 6px 18px; font-weight: 500; font-size: 14px; }
.compose-win .cw-h span { flex: 1; }
.compose-win .composer { border: 0; box-shadow: none; border-radius: 0; animation: none; }

/* toast */
.toast {
  position: fixed; left: 24px; bottom: 24px; transform: translateY(16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 0 6px 0 16px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); z-index: 50;
  transition: opacity .2s var(--ease), transform .3s var(--spring); font-size: 13.5px; white-space: nowrap;
}
.toast::before { content: ''; width: 5px; height: 5px; background: var(--green); }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast button { color: #fff; font-weight: 500; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid rgba(255,255,255,.16); }
.toast button:hover { background: rgba(255,255,255,.1); }

/* ---------- stopki ---------- */
.set-inner { max-width: 900px; }
.lead { color: var(--dim); font-size: 14px; margin: 0 0 22px; max-width: 560px; }
.sig-layout { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.sig-list { display: flex; flex-direction: column; gap: 4px; }
.sig-list button.it {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 9px; border: 1px solid transparent; font-size: 14px; color: var(--dim);
}
.sig-list button.it:hover { background: var(--fill); color: var(--text); }
.sig-list button.it.on { background: var(--surface); border-color: var(--stroke-strong); color: var(--text); font-weight: 500; box-shadow: var(--lit), var(--shadow-card); }
.sig-list .it span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-list .it em { font: normal 10.5px var(--mono); color: var(--faint); }
.sig-list .add { margin-top: 6px; justify-content: center; }
.sig-edit { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sig-name { height: 40px; border-radius: 9px; border: 1px solid var(--stroke); padding: 0 12px; font-weight: 500; outline: 0; background: var(--surface); box-shadow: var(--lit); }
.sig-name:focus { border-color: var(--stroke-strong); }
.sig-box { border: 1px solid var(--stroke); border-radius: 12px; background: var(--surface); box-shadow: var(--lit), var(--shadow-card); overflow: hidden; }
.sig-box:focus-within { border-color: var(--stroke-strong); }
.tb { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--stroke); background: var(--soft); }
.tb .icon-btn { width: 30px; height: 30px; }
.tb .icon-btn i[data-i] { width: 16px; height: 16px; }
.tb .div { width: 1px; height: 18px; background: var(--stroke-strong); margin: 0 4px; }
.tb select { height: 30px; border-radius: 7px; border: 1px solid var(--stroke); background: var(--surface); font-size: 12.5px; padding: 0 6px; color: var(--dim); }
.tb .sp { flex: 1; }
.tb .seg { padding: 2px; }
.tb .seg button { height: 24px; padding: 0 10px; font-size: 12px; }
.swatches { display: flex; gap: 4px; padding: 0 4px; }
.swatches button { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--stroke-strong); transition: transform .15s var(--spring); }
.swatches button:hover { transform: scale(1.15); }
.linkbar { display: flex; gap: 6px; align-items: center; padding: 8px; border-bottom: 1px solid var(--stroke); background: var(--soft); }
.linkbar input { flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--stroke); padding: 0 10px; outline: 0; font-size: 13px; background: var(--surface); }
.sig-canvas { min-height: 180px; padding: 22px 24px; outline: 0; font-size: 14px; overflow-wrap: anywhere; }
.sig-canvas:empty::before { content: 'Zacznij pisać albo wybierz szablon poniżej…'; color: var(--faint); }
.sig-canvas img { max-width: 100%; cursor: pointer; }
.sig-canvas img.picked { outline: 2px solid var(--orange); outline-offset: 2px; }
.sig-code { display: block; width: 100%; min-height: 240px; border: 0; outline: 0; resize: vertical; padding: 18px 20px; font: 12.5px/1.6 var(--mono); color: var(--text); background: var(--surface); }
.sig-foot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--stroke); font-size: 11.5px; color: var(--faint); background: var(--soft); }
.sig-foot .sp { flex: 1; }
.imgbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--stroke); font-size: 12.5px; color: var(--dim); background: var(--soft); }
.imgbar input[type=range] { width: 140px; accent-color: var(--ink); }
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tpl { min-width: 0; }
.tpl {
  text-align: left; border: 1px solid var(--stroke); border-radius: 10px; background: var(--surface); padding: 12px; box-shadow: var(--lit);
  transition: border-color .18s, box-shadow .2s var(--ease), transform .2s var(--ease);
}
.tpl:hover { border-color: var(--stroke-strong); box-shadow: var(--lit), var(--shadow-card); transform: translateY(-1px); }
.tpl .pv { height: 74px; overflow: hidden; border-radius: 6px; background: var(--soft); border: 1px solid var(--stroke); padding: 10px; margin-bottom: 8px; pointer-events: none; }
.tpl .pv > * { transform: scale(.62); transform-origin: 0 0; width: 160%; }
.tpl b { font-weight: 500; font-size: 13px; }
.sec-h { font-size: 12px; color: var(--faint); margin: 6px 0 -4px; display: flex; align-items: center; gap: 8px; }
.defaults { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.defaults label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }
.defaults select { height: 38px; border-radius: 9px; border: 1px solid var(--stroke); background: var(--surface); padding: 0 10px; font-size: 14px; color: var(--text); box-shadow: var(--lit); }
.danger { color: var(--orange) !important; }

@keyframes msg-in { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- tablet ---------- */
/* ---------- zwinięty pasek: przycisk pod „Stopki” albo wąskie okno ---------- */
.app { transition: grid-template-columns .3s var(--ease); }
.rail-toggle i svg { transition: transform .3s var(--spring); }
body.rail-mini .rail-toggle i svg { transform: scaleX(-1); }
@media (min-width: 761px) {
body.rail-mini .app { grid-template-columns: 72px minmax(330px, 410px) 1fr; }
body.rail-mini .rail { align-items: center; padding: 22px 10px 18px; }
body.rail-mini .brand .suffix, body.rail-mini .compose-btn span, body.rail-mini .nav .label, body.rail-mini .nav .count, body.rail-mini .rail-note { display: none; }
body.rail-mini .brand { padding: 0; justify-content: center; }
body.rail-mini .brand .logo { width: 32px; height: 20px; overflow: hidden; }
body.rail-mini .brand .logo svg { width: 132px; height: 20px; }
body.rail-mini .compose-btn { padding: 0; width: 44px; margin: 0 0 18px; }
body.rail-mini .nav button { width: 40px; justify-content: center; padding: 0; position: relative; }
body.rail-mini .nav button[data-badge]::after { content: ''; position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; background: var(--orange); }
}

@media (max-width: 1080px) {
  .rail-toggle { display: none !important; }
  .app { grid-template-columns: 72px minmax(300px, 360px) 1fr; }
  .rail { align-items: center; padding: 22px 10px 18px; }
  .brand .suffix, .compose-btn span, .nav .label, .nav .count, .rail-note { display: none; }
  .brand { padding: 0; justify-content: center; }
  .brand .logo { width: 32px; height: 20px; overflow: hidden; }
  .brand .logo svg { width: 132px; height: 20px; }
  .compose-btn { padding: 0; width: 44px; margin: 0 0 18px; }
  .nav button { width: 40px; justify-content: center; padding: 0; position: relative; }
  .nav button[data-badge]::after { content: ''; position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; background: var(--orange); }
  .th-inner { padding: 6px 28px 32px; }
  .reply { padding: 10px 28px 18px; }
  .sig-layout { grid-template-columns: 1fr; }
  .sig-list { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- telefon ---------- */
@media (max-width: 760px) {
  .only-mobile { display: inline-flex !important; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "top" "list"; }
  .top { padding: calc(10px + env(safe-area-inset-top)) 16px 6px; position: relative; }
  .top .search { height: 48px; padding: 0 48px 0 52px; }
  .top .search > i[data-i], .search kbd, .status-online { display: none; }
  .top > #menuBtn { position: absolute; left: 24px; top: calc(17px + env(safe-area-inset-top)); z-index: 2; }
  .top .acct { position: absolute; right: 20px; top: calc(12px + env(safe-area-inset-top)); z-index: 2; }
  .acct-txt, .acct-btn > i[data-i] { display: none; }
  .acct-btn { padding: 0 4px; height: 46px; }
  .acct-btn .av { width: 30px; height: 30px; }
  .acct-dot { left: 26px; top: 8px; }
  .acct-menu { width: min(300px, calc(100vw - 32px)); }
  .list-head { padding: 14px 22px 10px; }
  .list { padding: 10px 18px 110px; }
  .item.sel { border-color: var(--stroke); box-shadow: var(--lit), var(--shadow-card); }

  .rail {
    position: fixed; inset: 0 auto 0 0; width: 288px; z-index: 40; background: var(--surface);
    transform: translateX(-100%); transition: transform .3s var(--ease); align-items: stretch;
    padding: calc(22px + env(safe-area-inset-top)) 14px 18px; border-right: 1px solid var(--stroke);
  }
  .rail .brand .suffix, .rail .nav .label, .rail .nav .count, .rail .rail-note { display: initial; }
  .rail .brand { justify-content: flex-start; padding: 0 10px; }
  .rail .brand .logo { width: 84px; height: 13px; }
  .rail .brand .logo svg { width: 100%; height: 100%; }
  .rail .nav button { width: auto; justify-content: flex-start; padding: 0 10px; display: flex; }
  .rail .nav button::after { display: none; }
  .rail .compose-btn { display: none; }
  body.rail-mini .app { grid-template-columns: 1fr; }
  body.drawer .rail { transform: none; box-shadow: var(--shadow-lg); }
  .scrim { position: fixed; inset: 0; background: rgba(14,14,16,.22); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.drawer .scrim { opacity: 1; pointer-events: auto; }

  .thread-pane {
    position: fixed; inset: 0; z-index: 20; margin: 0; border-radius: 0; border: 0; box-shadow: none;
    transform: translateX(100%); transition: transform .32s var(--ease);
  }
  .thread-pane .crop { display: none; }
  body.reading .thread-pane { transform: none; }
  .th-bar { padding: calc(8px + env(safe-area-inset-top)) 8px 0; }
  .th-inner { padding: 4px 20px 24px; }
  .th-head h1 { font-size: 23px; }
  .msg .col { max-width: 88%; }
  .msg .av { display: none; }
  .smart, .file { min-width: 0; }
  .om-b, .dots, .om .files { margin-left: 0; }
  .reply { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
  .ai-pill span { display: none; }
  .ai-pill { width: 46px; padding: 0; justify-content: center; }
  .tpls, .defaults { grid-template-columns: 1fr; }

  .fab {
    position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 15;
    height: 52px; padding: 0 20px 0 18px; border-radius: 14px; gap: 10px; align-items: center;
    background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow-lg);
  }
  body.reading .fab { display: none !important; }
  .compose-win { inset: 0; width: auto; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); display: flex; flex-direction: column; }
  .compose-win .composer { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
  .compose-win textarea { flex: 1; max-height: none; }
  .toast { left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* własna strzałka w listach wyboru (natywna siedziała krzywo i ucinała tekst) */
.sig-slot select, .tb select, .defaults select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e0e10' stroke-opacity='.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 14px 14px; background-position: right 8px center;
  padding-right: 28px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.sig-slot select { height: 28px; padding-left: 10px; line-height: 26px; max-width: 180px; }
.sig-slot select:hover, .tb select:hover, .defaults select:hover { border-color: var(--stroke-strong); color: var(--text); }
.defaults select { background-position: right 12px center; padding-right: 34px; }
.sig-slot .sig-ctl { align-items: center; }

/* ---------- wersja live ---------- */
.status-online.syncing i, .status-online.connecting i { background: var(--orange); box-shadow: 0 0 8px rgba(255, 90, 31, .5); animation: blk 1.2s infinite; }
.status-online.error { color: var(--orange); cursor: help; }
.status-online.error i, .status-online.offline i { background: var(--orange); box-shadow: none; }
.empty .blocks { justify-content: center; }
.th-empty .blocks { transform: scale(1.4); }
.list li.more { list-style: none; display: flex; justify-content: center; padding: 6px 0 20px; }
.file a.ic { text-decoration: none; }
.file a.icon-btn { text-decoration: none; }
.om-html { margin: 14px 0 0 52px; }
.mframe { display: block; width: 100%; height: 120px; border: 0; border-radius: 8px; background: #fff; }
.img-btn { margin-top: 8px; font-size: 12.5px; height: 30px; }
.set-tabs { margin-left: 4px; }
.set-tabs button { height: 28px; }

/* konta */
.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: var(--surface); box-shadow: var(--lit); flex-wrap: wrap; }
.acc-t { flex: 1; min-width: 160px; display: flex; flex-direction: column; line-height: 1.3; }
.acc-t b { font-weight: 500; }
.acc-t small { font: 11.5px var(--mono); color: var(--faint); }
.acc-st { font: 11.5px var(--mono); color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.acc-st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.acc-st.syncing::before, .acc-st.connecting::before, .acc-st.error::before, .acc-st.offline::before { background: var(--orange); }
.acc-err { margin: -4px 0 2px 14px; font-size: 12.5px; color: var(--orange); }
.acc-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; padding: 18px; border: 1px solid var(--stroke); border-radius: 14px; background: var(--surface); box-shadow: var(--lit), var(--shadow-card); max-width: 560px; }
.acc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--dim); }
.acc-form input { height: 40px; border-radius: 9px; border: 1px solid var(--stroke); padding: 0 12px; font-size: 14px; outline: 0; background: var(--surface); color: var(--text); box-shadow: var(--lit); }
.acc-form input:focus { border-color: var(--stroke-strong); }
.acc-form .hint { margin: -4px 0 0; font-size: 12.5px; color: var(--faint); min-height: 1em; }
.acc-form details summary { cursor: pointer; font-size: 13px; color: var(--dim); }
.acc-form .grid2 { display: grid; grid-template-columns: 1fr 90px; gap: 10px; margin-top: 12px; }
.acc-form .grid2 .wide { grid-column: 1 / -1; }
.acc-foot { display: flex; align-items: center; gap: 10px; }
.acc-foot .sp { flex: 1; }
.acc-foot .msg { font-size: 13px; color: var(--dim); display: inline-flex; align-items: center; gap: 8px; }
.acc-foot .msg.bad { color: var(--orange); }

/* logowanie */
.gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.gate-card { position: relative; width: min(380px, 100%); padding: 34px 30px 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--lit), var(--shadow-up); text-align: center; }
.gate-logo { display: flex; align-items: center; justify-content: center; gap: 3px; color: var(--ink); margin-bottom: 18px; }
.gate-logo svg { width: 110px; height: auto; }
.gate-logo span { font: 500 15px var(--mono); color: var(--faint); }
.gate-card p { color: var(--dim); font-size: 14px; margin: 0 0 18px; }
.gate-card .btn.big { height: 46px; padding: 0 22px; font-size: 14.5px; width: 100%; justify-content: center; border-radius: 11px; }
.gate-code { width: 100%; height: 46px; border-radius: 11px; border: 1px solid var(--stroke-strong); text-align: center; font: 500 17px var(--mono); letter-spacing: .08em; margin-bottom: 12px; outline: 0; }
.gate-msg { margin: 14px 0 0 !important; min-height: 1.2em; font-size: 13px !important; }
.gate-msg.bad { color: var(--orange) !important; }
@media (max-width: 760px) { .om-html { margin-left: 0; } }
