:root{color-scheme:dark;--bg:#0b0b10;--panel:#1a1a22;--panel2:#23232d;--text:#d8d8e2;--muted:#91919f;--faint:#686877;--line:#292932;--accent:#a48bff;--accent2:#8261e6;--link:#8bbcff;--toolbar:#111116;--font-size:17px;--line-height:1.7;--reading-font:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:auto}body{background:var(--bg);color:var(--text);margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.25}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:var(--link)}[hidden]{display:none!important}svg{display:block;width:24px;height:24px;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;fill:none}
#app{min-height:100dvh}.topbar{z-index:10;position:sticky;top:0;height:calc(57px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) max(18px,env(safe-area-inset-right,0px)) 0 max(18px,env(safe-area-inset-left,0px));background:rgba(11,11,16,.94);border-bottom:1px solid #24242d;display:flex;align-items:center;justify-content:space-between;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}.brand{border:0;background:transparent;display:flex;align-items:center;gap:10px;color:#eeeeF5;font-size:17px;font-weight:700;letter-spacing:-.4px;padding:7px 0}.brand img{width:26px;height:26px}.top-actions{display:flex;gap:8px}.icon-button{height:40px;width:40px;display:grid;place-items:center;background:transparent;border:0;color:#e7e7f0}.icon-button svg{width:21px;height:21px}.icon-button:active,.nav-button:active{color:var(--accent)}main{max-width:760px;margin:0 auto;padding:0 18px 110px;outline:0}.bottombar{position:fixed;z-index:13;bottom:0;left:0;right:0;background:rgba(16,16,22,.96);border-top:1px solid #34343e;display:flex;justify-content:space-around;align-items:center;min-height:calc(64px + env(safe-area-inset-bottom,0px));padding:0 max(8px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left,0px));backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.nav-button{position:relative;display:grid;place-items:center;width:16.3%;max-width:100px;height:60px;border:0;background:none;color:#d2d1dc}.nav-button svg{height:24px;width:24px}.queue-nav{color:var(--accent)}.count-badge{position:absolute;left:calc(50% + 7px);top:10px;min-width:17px;height:17px;padding:0 4px;border-radius:12px;background:var(--accent2);color:white;font-size:10px;font-weight:750;line-height:17px}
.welcome{text-align:center;padding:9vh 0 22px}.welcome-emblem{height:72px;display:grid;place-items:center;margin:0 auto 30px}.welcome-emblem img{width:72px;height:72px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.6px;color:var(--accent);text-transform:uppercase}.welcome h1{font-family:Georgia,serif;font-weight:700;font-size:clamp(40px,11vw,70px);letter-spacing:-2.2px;line-height:1.13;margin:20px 0}.welcome h1 em{color:#b9a5ff;font-weight:400}.welcome-description{color:var(--muted);line-height:1.7;font-size:15px;max-width:360px;margin:0 auto 30px}.welcome-search{width:100%;height:56px;border:1px solid #474256;border-radius:14px;background:#1b1925;color:#aca8bc;text-align:left;display:flex;align-items:center;gap:12px;padding:0 16px}.welcome-search svg{width:21px;height:21px;color:var(--accent)}.welcome-search span{margin-left:auto;color:var(--faint)}.quick-topics{text-align:left;margin:30px 0 0}.quick-topics>span{font-size:12px;color:var(--muted)}.topic-buttons{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0 0}.topic-buttons button{border:1px solid #3c3a48;border-radius:22px;background:#1b1a23;color:#c4bfd2;padding:9px 14px;font-size:12px}.welcome-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;border-top:1px solid var(--line);margin-top:44px;padding-top:22px}.welcome-stats>div{display:grid;gap:3px}.welcome-stats strong{font-size:24px;color:#eeeaf7}.welcome-stats span{font-size:12px;color:var(--muted)}
.article-pane{padding-top:25px}.article-header{padding:0 0 10px}.article-header h1{font-family:Georgia,"Times New Roman",serif;color:var(--reader-heading,#e6e4ed);font-size:clamp(30px,8vw,44px);font-weight:600;letter-spacing:-.7px;line-height:1.18;margin:10px 0 23px}.article-tools{height:45px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #3a3a42;border-top:1px solid var(--line)}.article-label{font-size:12px;padding:0 12px;height:100%;border-bottom:2px solid var(--accent);display:flex;align-items:center;color:#cfc4ff;font-weight:600}.article-tool{background:transparent;border:0;color:#b7b6c2;width:39px;height:39px;display:grid;place-items:center}.article-tool:first-of-type{margin-left:auto}.article-tool svg{width:20px;height:20px}.article-tool.active{color:var(--accent)}.article-status{color:var(--muted);padding:25px 4px;font-size:14px}.article-content{font-family:var(--reading-font);font-size:var(--font-size);line-height:var(--line-height);overflow-wrap:break-word;word-break:normal;hyphens:none;color:var(--reader-text,var(--text));padding:0 1px}.article-content p{margin:1.1em 0}.article-content a{text-decoration:none;color:var(--reader-link,var(--link));-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.article-content a *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.article-content a:active{color:var(--reader-link-active,#b7d8ff)}.article-content a[href^="#"]{color:var(--reader-link-anchor,#aaa0dc)}.article-content h2,.article-content h3,.article-content h4{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--reader-heading,#e4e2ec);line-height:1.35;scroll-margin-top:90px;margin:1.55em 0 .55em}.article-content h2{font-size:1.35em;border-bottom:1px solid var(--line);padding-bottom:8px}.article-content h3{font-size:1.12em}.article-content h4{font-size:1.02em}.article-content ul,.article-content ol{padding-left:24px}.article-content li{margin:.3em 0}.article-content blockquote{border-left:3px solid var(--accent);padding:.3em 14px;margin:20px 0;color:#b5b2c4}.article-content figure{margin:20px auto;max-width:100%}.article-content img{max-width:100%!important;height:auto!important;border-radius:5px}.article-content figcaption,.article-content .thumbcaption{font-size:.78em;color:#aaa8b8;line-height:1.5;margin-top:8px}.article-content table{font-size:.78em;border-collapse:collapse;margin:18px 0;max-width:100%;display:block;overflow-x:auto;border:1px solid #34343f;white-space:normal}.article-content th,.article-content td{border:1px solid #373742;padding:7px 9px;min-width:55px;vertical-align:top}.article-content th{background:#242430;color:#dfdce8}.article-content .infobox{background:#15151b;border:1px solid #41414a;display:table;width:100%!important;max-width:460px!important;float:none!important;white-space:normal}.article-content .infobox th,.article-content .infobox td{border-color:#373740}.article-content sup{font-size:.67em;line-height:0}.article-content sup a{color:var(--reader-citation,#b0a4ec)}.article-content .reflist,.article-content .references{font-size:.8em;line-height:1.5}.article-content .mw-editsection,.article-content .navbox,.article-content .metadata,.article-content .noprint,.article-content .shortdescription,.article-content .hatnote .mw-editsection{display:none}.article-content .hatnote{font-size:.83em;font-style:italic;color:#bbb4c8}.article-content .mw-empty-elt{display:none}.article-content pre,.article-content code{white-space:pre-wrap;overflow-wrap:anywhere;background:#1b1b24;border-radius:4px}.article-content .wikitable{width:100%}.article-content .toc{border:1px solid var(--line);padding:12px;border-radius:10px;background:#16161c}.article-footer{border-top:1px solid var(--line);margin-top:46px;font-size:11px;color:var(--muted);line-height:1.6}.article-footer a{color:#a9a4c9}
.overlay{position:fixed;inset:0;z-index:20;display:flex;align-items:end;justify-content:center}.scrim{background:rgba(0,0,0,.72);position:absolute;inset:0}.sheet{position:relative;z-index:1;background:#1c1c24;width:100%;max-width:760px;height:auto;max-height:calc(91dvh - env(safe-area-inset-top,0px));border-radius:22px 22px 0 0;box-shadow:0 -8px 40px #0009;display:flex;flex-direction:column;padding:0 16px calc(22px + env(safe-area-inset-bottom,0px));overflow:hidden}.sheet-handle{height:4px;width:38px;background:#6d6d77;border-radius:6px;margin:9px auto 10px;flex-shrink:0}.sheet-body{overflow-y:auto;overscroll-behavior:contain;padding:0 2px 2px;min-height:0}.sheet-head{display:flex;align-items:center;gap:11px;margin:6px 0 15px}.sheet-head h2{font-size:21px;letter-spacing:-.5px;font-weight:700;margin:0;flex:1}.sheet-head .head-icon{color:var(--accent)}.sheet-head svg{width:23px;height:23px}.sheet-head .subtext{font-size:12px;color:var(--muted);font-weight:400}.sheet-close,.sheet-text-button{border:0;background:#30303a;color:#c9c8d3;border-radius:20px;padding:8px 12px;font-size:12px}.sheet-text-button{color:#c7baff;background:#302a44}.sheet-note{font-size:12px;color:var(--muted);margin:5px 0 15px;line-height:1.5}.sheet-row{display:flex;align-items:center;gap:11px;border-bottom:1px solid #34343d;padding:12px 0;min-height:66px}.sheet-row .sheet-row-main{display:block;text-align:left;background:none;border:none;min-width:0;flex:1;color:var(--text);padding:0}.sheet-row-main strong{font-size:14px;font-weight:600;display:block;line-height:1.35}.sheet-row-main small{color:var(--muted);font-size:11px;display:block;margin-top:4px}.row-icon{width:26px;min-width:26px;height:30px;color:var(--accent);display:grid;place-items:center}.row-icon svg{width:20px;height:20px}.row-action{border:1px solid #41414d;border-radius:9px;background:#292934;color:#ccc7dd;width:32px;height:32px;display:grid;place-items:center;padding:0}.row-action svg{width:17px;height:17px}.row-action:disabled{opacity:.15}.row-actions{display:flex;gap:6px}.primary-button{width:100%;border:0;border-radius:12px;background:linear-gradient(90deg,#6d55c4,#936af1);color:#fff;font-weight:600;font-size:15px;padding:15px;margin:18px 0 0}.primary-button:disabled{opacity:.35}.secondary-button{width:100%;border:1px solid #444353;border-radius:11px;background:#282633;color:#d8d4e2;font-weight:500;padding:13px;margin:7px 0 0}.empty{display:grid;text-align:center;justify-items:center;gap:12px;padding:47px 12px 38px;color:var(--muted);font-size:14px}.empty svg{width:39px;height:39px;color:#8c7cc1}.empty strong{font-size:19px;color:#d6d2e0}.empty p{max-width:260px;line-height:1.6;margin:0}.search-input-wrap{height:47px;display:flex;align-items:center;gap:10px;border:1px solid #494653;border-radius:12px;background:#282731;padding:0 12px}.search-input-wrap svg{color:#a8a4b3;width:20px;height:20px}.search-input{background:transparent;color:#eeeaf6;border:0;outline:none;font-size:16px;flex:1;width:100%;min-width:0}.search-input::placeholder{color:#82808d}.search-results{padding:9px 0 0}.result-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid #35343d;padding:11px 0}.result-open{background:none;border:0;color:inherit;text-align:left;display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:0}.result-thumb{height:55px;width:55px;min-width:55px;object-fit:cover;border-radius:8px;background:#303039}.result-thumb.placeholder{display:grid;place-items:center;color:#6f6593}.result-thumb.placeholder svg{width:25px;height:25px}.result-info{min-width:0}.result-info strong{font-size:14px;display:block;color:#e9e6f1;line-height:1.33}.result-info small{font-size:11px;color:var(--muted);line-height:1.45;display:block;margin-top:5px}.result-queue{border:1px solid #4d416f;border-radius:10px;color:#bca8ff;background:#302944;min-width:34px;height:34px;font-size:18px}.result-queue.added{color:#8e81b9;background:#272530}.loading{color:var(--muted);padding:22px 0;font-size:13px}.error{color:#f6aaa6}.action-title{color:#e4e1ef;margin:8px 0 14px;font-weight:700;font-size:19px;line-height:1.4}.action-btn{display:flex;align-items:center;gap:13px;width:100%;text-align:left;border:0;border-bottom:1px solid #363642;background:transparent;color:#dedbe9;padding:16px 8px;font-size:15px}.action-btn svg{width:22px;height:22px;color:var(--accent)}.action-btn:last-child{border-bottom:0}.preview-text{line-height:1.6;color:#c4c0cf;font-size:14px;margin:14px 0}.settings-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid #373742}.settings-row span{color:#dfdce6;font-size:14px}.settings-row small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.settings-row select{border:1px solid #44404e;background:#2a2934;color:#e4e1f0;border-radius:9px;padding:8px;font-size:16px}.settings-buttons{display:flex;align-items:center;gap:8px}.settings-buttons button{background:#302e3e;color:#eeeaf6;border:1px solid #454051;border-radius:8px;padding:8px 13px}.toast{position:fixed;z-index:30;bottom:calc(80px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);background:#3c364c;border:1px solid #665688;color:#f6f1ff;box-shadow:0 5px 26px #0009;border-radius:12px;padding:12px 16px;font-size:12px;max-width:90vw;min-width:150px;text-align:center;white-space:nowrap}.toast button{border:0;background:transparent;color:#d2b9ff;margin-left:14px;text-decoration:underline;font-weight:600}
body.sheet-open{overflow:hidden}@media(min-width:800px){.topbar{padding-left:max(28px,calc((100vw - 800px)/2));padding-right:max(28px,calc((100vw - 800px)/2))}.bottombar{max-width:760px;left:50%;transform:translateX(-50%);border:1px solid #393943;border-radius:17px 17px 0 0}.sheet{border-radius:22px;margin-bottom:14px;max-height:85dvh;padding-bottom:23px}.overlay{align-items:center}.welcome{padding-top:11vh}.article-pane{padding-top:38px}}
@media(max-width:380px){main{padding-left:15px;padding-right:15px}.article-content{font-size:calc(var(--font-size) - 1px)}.sheet{padding-left:12px;padding-right:12px}}

/* Queue layout preference: only the queue uses full screen. Search, bookmarks,
   settings and link previews always remain bottom sheets. */
.overlay.queue-fullscreen{align-items:stretch}
.overlay.queue-fullscreen .scrim{display:none}
.overlay.queue-fullscreen .sheet{
  width:100%; max-width:none; max-height:none; height:100dvh;
  margin:0; border-radius:0; padding:calc(12px + env(safe-area-inset-top,0px))
    max(16px,env(safe-area-inset-right,0px))
    calc(20px + env(safe-area-inset-bottom,0px))
    max(16px,env(safe-area-inset-left,0px));
  background:var(--bg); box-shadow:none;
}
.overlay.queue-fullscreen .sheet-handle{display:none}
.overlay.queue-fullscreen .sheet-body{width:100%; max-width:760px; margin:0 auto; flex:1}
.overlay.queue-fullscreen .sheet-head{
  position:sticky; top:0; z-index:2; padding:8px 0 12px;
  margin:0 0 8px; background:var(--bg);
}

/* Import multiple Wikipedia tabs copied from iPhone Safari. */
.import-input{display:block;width:100%;min-height:145px;resize:vertical;margin:12px 0 8px;border:1px solid #494653;border-radius:12px;background:#14141b;color:var(--text);font:16px/1.55 ui-monospace,SFMono-Regular,monospace;padding:13px;outline:0;-webkit-user-select:text;user-select:text}
.import-input:focus{border-color:var(--accent)}.import-input::placeholder{color:var(--muted)}
.import-summary{color:var(--muted);font-size:12px;line-height:1.5;margin:12px 0}
.import-preview{max-height:145px;overflow-y:auto;border:1px solid var(--line);border-radius:9px;margin-top:10px}
.import-preview:empty{display:none}.import-item{font-size:12px;color:var(--text);padding:7px 10px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.import-item:last-child{border-bottom:0}
.import-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.import-actions button{margin:0;padding:12px 5px;font-size:13px}

/* Immersive article reading: only app bars disappear, never the page content.
   No scroll-snap, scroll offset changes, or synthetic momentum. */
.topbar{transition:transform .18s ease-out,opacity .18s ease-out}
.bottombar{transition:transform .18s ease-out,opacity .18s ease-out}
body.reader-chrome-hidden .topbar{
  transform:translateY(-105%);opacity:0;pointer-events:none;visibility:hidden;
}
body.reader-chrome-hidden .bottombar{
  transform:translateY(105%);opacity:0;pointer-events:none;visibility:hidden;
}
body.reader-chrome-hidden .toast{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
@media (min-width:800px){
  body.reader-chrome-hidden .bottombar{transform:translate(-50%,105%)}
}
@media (prefers-reduced-motion:reduce){
  .topbar,.bottombar{transition:none}
}

/* v0.3.2: native-feeling floating link menu. Article text remains selectable
   except briefly during a deliberate hold on an internal Wikipedia link. */
.article-content a,.article-content a *{
  -webkit-user-select:none!important;user-select:none!important;
  -webkit-touch-callout:none!important;
}
.article-content.link-hold-armed,.article-content.link-hold-armed *{
  -webkit-user-select:none!important;user-select:none!important;
  -webkit-touch-callout:none!important;
}
.link-popover-layer{position:fixed;inset:0;z-index:40;pointer-events:none}
.link-popover-dismiss{position:absolute;inset:0;pointer-events:auto;background:transparent}
.link-popover-panel{
  position:fixed;pointer-events:auto;width:min(268px,calc(100vw - 24px));
  background:rgba(38,38,45,.97);border:1px solid rgba(255,255,255,.13);
  box-shadow:0 12px 35px rgba(0,0,0,.55);border-radius:14px;
  overflow:hidden;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);
  -webkit-touch-callout:none;-webkit-user-select:none;user-select:none;
}
.link-popover-heading{font-size:12px;color:#c6c5d3;font-weight:650;padding:12px 14px;
  white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border-bottom:1px solid #4c4a56}
.link-popover-action{display:flex;align-items:center;gap:11px;width:100%;min-height:47px;
  background:transparent;color:#efedf7;border:0;text-align:left;padding:10px 14px;
  border-bottom:1px solid #45444d;font-size:14px}
.link-popover-action:active{background:#4a465a}
.link-popover-action:last-child{border-bottom:0}
.link-popover-icon{color:var(--accent);display:grid;place-items:center}
.link-popover-icon svg{width:19px;height:19px}
.sheet-row-main{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;touch-action:pan-y}

/* v0.3.3: text in interactive queue items must never invoke iOS selection.
   An invisible hit-testing layer makes the title behave as one touch target
   without preventing touch scrolling, unlike touchstart.preventDefault(). */
.sheet-row-main, .sheet-row-main *, .sheet-row-main::after {
  -webkit-user-select:none!important; user-select:none!important;
  -webkit-touch-callout:none!important;
  -webkit-tap-highlight-color:transparent;
}
.sheet-row-main { position:relative; touch-action:pan-y; }
.sheet-row-main::after { content:""; position:absolute; inset:0; pointer-events:auto; }
.sheet-row-main.queue-hold-active, .sheet-row-main.queue-hold-active * {
  -webkit-user-select:none!important; user-select:none!important;
  -webkit-touch-callout:none!important;
}
/* Keep blocking native selection for as long as our floating link menu exists.
   Ordinary paragraph selection is restored when the menu closes. */
body.link-popover-open #articleContent,
body.link-popover-open #articleContent * {
  -webkit-user-select:none!important; user-select:none!important;
  -webkit-touch-callout:none!important;
}

/* v0.3.5: Show the queue preview while the finger is still down, but
   maintain selection and interaction lock across the replaced DOM until
   touchend. The preview must not respond to the originating touch. */
body.queue-touch-holding #app, body.queue-touch-holding #app * {
  -webkit-user-select:none!important;user-select:none!important;
  -webkit-touch-callout:none!important;
}
.sheet-row-main.queue-hold-ready {background:rgba(164,139,255,.12);border-radius:8px}
/* iOS Safari automatically zooms focused form controls with text under 16px. */
@media(max-width:799px){input,textarea,select{font-size:16px!important}}

/* The preview remains visible during a held touch; it and the article behind
   it cannot be selected or activated until the originating finger lifts. */
body.queue-preview-touch-lock #overlay .sheet {pointer-events:none;touch-action:none}
body.queue-preview-touch-lock #overlay {touch-action:none}
body.queue-preview-touch-lock #overlay * {
  -webkit-user-select:none!important; user-select:none!important;
  -webkit-touch-callout:none!important;
}

/* v0.3.7: Center Wikipedia article images and their captions.
   Only elements inside #articleContent are affected; icons in WikiQueue's UI
   and search thumbnails keep their original positioning. */
.article-content figure,
.article-content .thumb,
.article-content .thumbinner {
  float: none !important;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}
.article-content img {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}
.article-content figcaption,
.article-content .thumbcaption { text-align: center; }

/* v0.3.8: Safari-style visited links are muted purple, while normal links
   and citation links use the screenshot-matched softer blue. */
.article-content a:not([href^="#"]):visited { color: var(--reader-link-visited,var(--reader-link,var(--link))); }


/* v0.3.9: anchored, non-scrollable Wikipedia preview. The existing queue
   remains mounted underneath, including its scroll position. */
.floating-preview-layer{position:fixed;inset:0;z-index:45;touch-action:none;overflow:hidden}
.floating-preview-scrim{position:absolute;inset:0;background:rgba(0,0,0,.58)}
.floating-preview-card{
  position:absolute;left:50%;transform:translateX(-50%);
  width:calc(100% - 28px);max-width:400px;
  max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  background:#25252c;border:1px solid #4b4753;border-radius:20px;
  box-shadow:0 18px 54px #000c;overflow:hidden;padding:16px;
  touch-action:manipulation;
}
.floating-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.floating-preview-heading strong{font-size:12px;letter-spacing:.2px;color:#aba4b9}
.floating-preview-close{background:#34343c;border:0;border-radius:18px;color:#d6d3df;padding:7px 12px;font-size:12px}
.floating-preview-title{font-size:19px;line-height:1.3;font-weight:700;margin:0 0 12px;color:#e8e5ed;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.floating-preview-media{display:flex;align-items:center;justify-content:center;margin:0 auto 10px;max-height:min(22dvh,164px);overflow:hidden}
.floating-preview-media img{display:block;max-width:100%;max-height:min(22dvh,164px);height:auto;width:auto;object-fit:contain;border-radius:7px}
.floating-preview-text{font-size:13px;line-height:1.45;color:#cecad4;margin:6px 0 12px;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.floating-preview-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.floating-preview-actions button{font-size:13px;line-height:1.3;margin:0;padding:11px 8px;min-width:0}
/* No preview scrolling. Interactions with the originating finger stay locked
   through the actual touchend, not only until the preview is first displayed. */
body.queue-preview-touch-lock #previewLayer{pointer-events:none;touch-action:none}
body.queue-preview-touch-lock #previewLayer *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}
@media(max-height:680px){.floating-preview-media,.floating-preview-media img{max-height:110px}.floating-preview-text{-webkit-line-clamp:3}}


/* v0.3.10 replacement: React Aria-style page-wide selection guard.
   Applies from an internal link's touchstart through the physical release
   plus 200ms, and continuously while its custom menu is visible.
   Does NOT cancel touch events or change touch-action/native scrolling. */
html.wq-selection-locked, html.wq-selection-locked * {
  -webkit-user-select: none !important; user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* v0.4 two-tab strip: hidden unless two tabs are open, above bottom toolbar.
   It follows the same immersive visibility state as the existing bars. */
.tab-strip {
  position:fixed;z-index:14;bottom:calc(64px + env(safe-area-inset-bottom,0px));
  left:0;right:0;margin:0 auto;max-width:760px;height:44px;
  display:flex;gap:4px;padding:4px 9px;background:rgba(17,17,23,.97);
  border-top:1px solid #383842;border-bottom:1px solid #34343e;
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  transition:transform .18s ease-out,opacity .18s ease-out;
}
.tab-strip-item {display:flex;min-width:0;flex:1;align-items:center;gap:0;
  border-radius:8px;border:1px solid transparent;color:#a3a1ad;background:#23232b;}
.tab-strip-item.selected {color:#eeeaf4;background:#383541;border-color:#6a5c83;}
.tab-strip-select {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  background:none;border:0;color:inherit;font-size:12px;font-weight:500;
  text-align:left;padding:8px 4px 8px 9px;line-height:17px;}
.tab-strip-close {width:31px;min-width:31px;height:31px;padding:0 6px;background:none;
  border:0;color:#a6a1af;font-size:21px;line-height:1;}
.tab-strip-item.selected .tab-strip-close {color:#d5cfdf;}
body:has(.tab-strip:not([hidden])) main{padding-bottom:155px}
body.reader-chrome-hidden .tab-strip{transform:translateY(calc(110% + 64px));opacity:0;pointer-events:none;visibility:hidden}
body.sheet-open .tab-strip{pointer-events:none}
.more-menu-action{text-align:left;font-weight:600;margin-top:8px}
.history-section-heading{font-size:13px;font-weight:700;letter-spacing:.03em;color:#aaa2b9;
  margin:22px 0 5px;text-transform:uppercase}
.history-current{background:rgba(164,139,255,.08);border-radius:9px}
@media(prefers-reduced-motion:reduce){.tab-strip{transition:none}}
