/* Noolagam: warm paper in light, low-glare brown-black in dark. */

:root {
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --ink: #1f1b16;
  --muted: #6e655a;
  --line: #e5ded3;
  --accent: #9a3412;
  --accent-ink: #ffffff;
  --accent-soft: #f6e3d8;
  --warn: #9f1239;
  --page: #ffffff;
  --shadow: 0 1px 2px rgb(60 40 20 / 0.08), 0 4px 14px rgb(60 40 20 / 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Tamil", "Tamil Sangam MN", "Nirmala UI", "Latha", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif Tamil", "Tamil Sangam MN", "Nirmala UI", serif;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151311;
    --surface: #1e1b18;
    --ink: #ece6dd;
    --muted: #a3998c;
    --line: #322c26;
    --accent: #f08a5d;
    --accent-ink: #1a0f08;
    --accent-soft: #3a261b;
    --warn: #fb7185;
    --page: #2a2622;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151311;
  --surface: #1e1b18;
  --ink: #ece6dd;
  --muted: #a3998c;
  --line: #322c26;
  --accent: #f08a5d;
  --accent-ink: #1a0f08;
  --accent-soft: #3a261b;
  --warn: #fb7185;
  --page: #2a2622;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.reading { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
code { font-size: 0.9em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
h1 { font: 600 26px/1.2 var(--serif); margin: 0 0 8px; }
h2 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; letter-spacing: 0.01em; }
h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: var(--warn); }
.hidden { display: none !important; }

button.primary {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px;
  padding: 11px 18px; font-weight: 600;
}
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
button.icon {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink);
}
button.icon:hover { background: var(--accent-soft); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.logo {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font: 600 17px/1 var(--serif);
}
.logo.big { width: 64px; height: 64px; border-radius: 16px; font-size: 30px; margin-bottom: 14px; }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
.spinner.sm { width: 12px; height: 12px; border-width: 2px; display: inline-block; vertical-align: -1px; margin: 0 4px 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- simple screens */
.screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--gutter); }
.screen-card { width: 100%; max-width: 440px; text-align: center; }
.screen-card p { margin: 0 0 14px; }
.screen-card .primary { margin: 6px 0 16px; }
.folder-list { display: grid; gap: 8px; margin: 14px 0; text-align: left; }
.folder {
  display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.folder:hover { border-color: var(--accent); }
.or { color: var(--muted); font-size: 13px; margin: 14px 0 8px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }

/* ---------- library */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; margin-right: 6px; }
.brand .name { font: 600 19px/1 var(--serif); }
.searchbox {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 42px; color: var(--muted);
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--ink); }
.status {
  min-height: 20px; padding: 8px var(--gutter) 0; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.status svg { width: 15px; height: 15px; vertical-align: -3px; }
.chips { display: flex; gap: 8px; padding: 10px var(--gutter) 0; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px;
}
.chip span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.on span { color: inherit; opacity: 0.7; }

.shelf { padding: 0 var(--gutter) calc(40px + env(safe-area-inset-bottom)); }
.shelf h2 .muted { font-weight: 400; margin-left: 4px; }
.hint { margin-top: -4px; }
.grid {
  display: grid; gap: 22px 16px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; } }
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 16px;
  overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.row-scroll .card { scroll-snap-align: start; }

.card { display: block; text-align: left; padding: 0; border: 0; background: none; min-width: 0; }
.cover {
  position: relative; aspect-ratio: 2 / 3; border-radius: 6px 10px 10px 6px; overflow: hidden;
  background: linear-gradient(160deg, hsl(var(--h) 34% 36%), hsl(calc(var(--h) + 25) 38% 24%));
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7px;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.25), rgb(255 255 255 / 0.06)); z-index: 1;
}
.card:hover .cover { transform: translateY(-2px); }
.card:focus-visible { outline: none; }
.card:focus-visible .cover { outline: 3px solid var(--accent); outline-offset: 2px; }
.cover-text {
  position: absolute; inset: 0; padding: 14px 10px 30px 16px;
  display: flex; flex-direction: column; justify-content: space-between; color: #fbf6ee;
}
.ct {
  font: 600 15px/1.3 var(--serif); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.ca { font-size: 11.5px; opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--page); }
.fmt {
  position: absolute; left: 12px; bottom: 8px; z-index: 2; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em;
  color: #fff; background: rgb(0 0 0 / 0.35); padding: 2px 5px; border-radius: 4px;
}
.cover img ~ .fmt { display: none; }
.badge {
  position: absolute; right: 6px; top: 6px; z-index: 2; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
}
.badge svg { width: 15px; height: 15px; }
.meta { padding: 8px 2px 0; }
.meta .t { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.meta .r { font-size: 12px; color: var(--accent); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .a { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 7px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }

.empty { text-align: center; padding: 60px 0; }
.empty .spinner { margin-bottom: 14px; }

/* ---------- settings sheet */
dialog.sheet {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.3);
}
dialog.sheet::backdrop { background: rgb(20 14 8 / 0.45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; }
.sheet-head h2 { margin: 0; font: 600 20px/1.2 var(--serif); }
dialog.sheet section { padding: 14px 20px; border-top: 1px solid var(--line); }
dialog.sheet section:first-of-type { border-top: 0; }
dialog.sheet > p { padding: 4px 20px 16px; margin: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.kv span { color: var(--muted); }
.kv strong { font-weight: 500; text-align: right; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btns button, .seg button {
  border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 8px 12px; font-size: 14px;
}
.btns button.danger { color: var(--warn); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 8px 16px; }
.seg button.on { background: var(--ink); color: var(--bg); }

/* ---------- reader */
.reader {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column;
  background: var(--rbg); color: var(--rink);
  --rbg: #ece8e1; --rink: #1f1b16; --rbar: rgb(255 253 249 / 0.92); --page: #ffffff;
}
.reader.rt-sepia { --rbg: #e7dcc4; --rink: #3b2f20; --rbar: rgb(244 236 216 / 0.94); --page: #f4ecd8; }
.reader.rt-dark { --rbg: #0e0d0c; --rink: #e6dfd4; --rbar: rgb(28 25 22 / 0.94); --page: #171513; }
.rbar {
  display: flex; align-items: center; gap: 2px; z-index: 3;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px;
  background: var(--rbar); border-bottom: 1px solid rgb(127 110 90 / 0.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.rbar button.icon { color: var(--rink); }
.rbar button.icon:hover { background: rgb(127 110 90 / 0.15); }
.rtitle { flex: 1; min-width: 0; padding: 0 6px; line-height: 1.2; }
.rtitle span { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtitle small { display: block; font-size: 12px; opacity: 0.65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagebtn {
  border: 1px solid rgb(127 110 90 / 0.3); background: transparent; color: var(--rink);
  border-radius: 8px; padding: 5px 9px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; margin-right: 4px;
}
.offbtn.on { color: var(--accent) !important; }
.offbtn .pct { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rbody { position: relative; flex: 1; min-height: 0; }
.rprogress { height: 3px; background: rgb(127 110 90 / 0.18); }
.rprogress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.rmsg {
  position: absolute; inset: 60px 0 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  text-align: center; padding: var(--gutter); z-index: 4; background: var(--rbg);
}
.rmsg p { margin: 0; max-width: 420px; }
.rmsg button:not(.primary) { border: 1px solid rgb(127 110 90 / 0.35); background: transparent; border-radius: 9px; padding: 8px 14px; color: var(--rink); }
.rmsg svg { width: 15px; height: 15px; vertical-align: -3px; }
.rnav {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 64px; margin-top: -32px; display: none; place-items: center;
  border: 0; border-radius: 10px; background: var(--rbar); color: var(--rink); opacity: 0.0; transition: opacity 0.2s;
}
.rnav.prev { left: 6px; }
.rnav.next { right: 6px; }
.reader.is-epub .rnav { display: grid; opacity: 0.55; }
.reader.is-epub .rnav:hover { opacity: 1; }
@media (hover: none) { .reader.is-epub .rnav { display: none; } }
.reader.bare .rbar { transform: translateY(-100%); opacity: 0; position: absolute; left: 0; right: 0; top: 0; }

.pdf-scroll { position: absolute; inset: 0; overflow: auto; outline: none; padding: 12px 0 60px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pdf-pages { position: relative; margin: 0 auto; background-repeat: repeat-y; }
.pdf-page { position: absolute; left: 0; display: grid; place-items: center; }
.pdf-page canvas { display: block; box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); background: #fff; }
.reader.rt-sepia .pdf-page canvas { filter: sepia(0.35) brightness(0.97); }
.reader.rt-dark .pdf-page canvas { filter: invert(0.9) hue-rotate(180deg) brightness(0.95); background: #fff; }
.pdf-page.failed::after { content: "This page couldn't be drawn"; color: var(--rink); opacity: 0.6; font-size: 13px; }
.epub-area { position: absolute; inset: 0 max(24px, 4vw); }

/* ---------- reader: display menu, show-toolbar button, toast */
.rbar button.icon.on { color: var(--accent); background: rgb(127 110 90 / 0.15); }
.rmenu {
  position: absolute; z-index: 6; right: 8px; top: calc(54px + env(safe-area-inset-top));
  background: var(--rbar); color: var(--rink); border: 1px solid rgb(127 110 90 / 0.25); border-radius: 14px;
  padding: 8px 12px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.18); min-width: 250px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.rm-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.rm-row > span { flex: 1; font-size: 13px; opacity: 0.75; }
.rm-row button.icon { color: var(--rink); border: 1px solid rgb(127 110 90 / 0.3); width: 36px; height: 36px; }
.swatch-t { border: 1px solid rgb(127 110 90 / 0.35); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; }
.swatch-t.t-light { background: #fff; color: #1f1b16; }
.swatch-t.t-sepia { background: #f4ecd8; color: #3b2f20; }
.swatch-t.t-dark { background: #171513; color: #e6dfd4; }
.swatch-t.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.offbtn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgb(127 110 90 / 0.3); background: transparent;
  color: var(--rink); border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.offbtn svg { width: 17px; height: 17px; }
.rshow {
  display: none; position: absolute; z-index: 5; top: calc(8px + env(safe-area-inset-top)); right: 10px;
  width: 40px; height: 40px; place-items: center; border-radius: 50%; border: 1px solid rgb(127 110 90 / 0.25);
  background: var(--rbar); color: var(--rink); box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}
.reader.bare .rshow { display: grid; }
.toast {
  position: absolute; z-index: 9; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 32px)); background: #1f1b16; color: #fbf6ee; font-size: 14px;
  padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); text-align: center;
}

/* ---------- annotations on the page */
.pdf-page .pg { position: relative; }
.pdf-page .pg canvas { position: absolute; inset: 0; }
svg.ann { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
svg.ann .a-hl rect, svg.ann .a-hl-live { opacity: 0.38; mix-blend-mode: multiply; }
.reader.rt-dark svg.ann .a-hl rect, .reader.rt-dark svg.ann .a-hl-live { opacity: 0.3; mix-blend-mode: screen; }
svg.ann .a-dot { opacity: 1; stroke: #fff; stroke-width: 2; }
svg.ann .a-note { filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.35)); }
.pdf-scroll.tooling { touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; }

/* ---------- annotation toolbar and EPUB selection bar */
.atools, .selbar {
  position: absolute; z-index: 7; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 16px;
  background: var(--rbar); color: var(--rink); border: 1px solid rgb(127 110 90 / 0.25);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none;
}
.atools button, .selbar button {
  flex: none; display: inline-grid; place-items: center; grid-auto-flow: column; gap: 5px;
  min-width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--rink); padding: 0 6px;
}
.atools button.on { background: var(--accent); color: var(--accent-ink); }
.atools .sep { width: 1px; height: 24px; background: rgb(127 110 90 / 0.3); margin: 0 4px; flex: none; }
.sw { position: relative; }
.sw::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15); }
.atools .sw.on { background: transparent; }
.sw.on::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 2px solid var(--rink); }
.atools.no-color .sw { opacity: 0.3; pointer-events: none; }
.atools .done { font-weight: 600; padding: 0 12px; }
.selbar span { font-size: 13px; }

/* ---------- note editor and notes list */
.colors { display: flex; gap: 6px; margin: 2px 0 10px; }
.colors .sw { width: 38px; height: 38px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; }
.colors .sw::before { width: 26px; height: 26px; }
.colors .sw.on::after { inset: 2px; border: 2px solid var(--ink); }
dialog.notedlg textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg);
  color: var(--ink); font: 15px/1.45 var(--font); resize: vertical;
}
dialog.notedlg blockquote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 14px; }
.dlg-btns { display: flex; gap: 8px; padding: 12px 20px 18px; align-items: center; }
.dlg-btns span { flex: 1; }
.dlg-btns button:not(.primary) { border: 1px solid var(--line); background: var(--bg); border-radius: 9px; padding: 9px 14px; }
.dlg-btns .danger { color: var(--warn); }
dialog.notespanel { width: min(520px, calc(100vw - 24px)); }
.notes-status { padding: 0 20px; margin: 0; min-height: 18px; }
.nlist { max-height: 52vh; overflow: auto; padding: 6px 12px; }
.nitem {
  display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 8px; border-radius: 10px;
  border-bottom: 1px solid var(--line);
}
.nitem:hover { background: var(--bg); }
.nitem .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin-top: 4px; }
.nbody { display: grid; gap: 3px; min-width: 0; }
.nhead { font-size: 12px; color: var(--muted); }
.nquote { font-size: 14px; }
.ntext { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-notes { padding: 14px 8px; }
.empty-notes svg { width: 16px; height: 16px; vertical-align: -3px; }
.exports .btns button { display: inline-flex; align-items: center; gap: 6px; }
.exports .btns svg { width: 16px; height: 16px; }
.export-msg { margin: 8px 0 0; min-height: 18px; }

/* ---------- remove from Reading */
.rm {
  position: absolute; z-index: 3; left: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(0 0 0 / 0.55); color: #fff;
}
.rm svg { width: 15px; height: 15px; }
.rm:hover { background: rgb(0 0 0 / 0.75); }

@media (max-width: 560px) {
  .brand .name { display: none; }
  .rbar button.icon { width: 36px; }
  .pagebtn { padding: 5px 6px; }
  .atools button, .selbar button { min-width: 34px; padding: 0 4px; }
  /* phones: tools + undo + Done on the first row, colours on the second */
  .atools { flex-wrap: wrap; justify-content: center; width: max-content; row-gap: 2px; }
  .atools .sep { display: block; order: 1; flex-basis: 100%; height: 0; margin: 0; background: none; }
  .atools .sep:last-of-type { display: none; }
  .atools .sw { order: 2; }
  .rmenu { left: 8px; right: 8px; min-width: 0; }
}
