/* Menus, dialogs and panels: the liquid glass of the address bar, in grey (its light border, the sheen across
   it, the bright top edge), dense enough to stay readable above any site; their buttons are orange glass. The blur
   shows on what the interface itself paints (the bar, the wallpaper); above a site the glass stays clear. */
:root {
  --glass: linear-gradient(115deg, #ffffff21, #ffffff05 42%, #ffffff0f), linear-gradient(180deg, #484b56b8, #31333bc2);
  --glass-border: #f3f2ff47;
  --glass-shadow: inset 0 1px #ffffff40, inset 0 -1px #00000030, 0 2px 8px #0000002e, 0 26px 54px -26px #000000d9;
  --glass-blur: blur(24px) saturate(1.6);
  /* Fields and wells: the same glass, matte and opaque, a step darker than the panel. */
  --glass-well: #ffffff0a;
  --glass-well-border: #ffffff1f;
  --glass-well-shadow: none;
  --glass-button: color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 7.8%, transparent);
  --glass-button-hover: color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 16.1%, transparent);
  --glass-button-border: color-mix(in srgb, var(--o-ffb480, #ffb480) 23.9%, transparent);
  --glass-orange: color-mix(in srgb, var(--o-ee7a3c, #ee7a3c) 90.2%, transparent);
  --glass-orange-hover: color-mix(in srgb, var(--o-f5884b, #f5884b) 94.1%, transparent);
  --glass-orange-border: color-mix(in srgb, var(--o-ffb480, #ffb480) 36.1%, transparent);
  --glass-orange-shadow: inset 0 1px #ffffff33;
}
/* On Windows the site and chrome are separate WebViews, so CSS blur cannot
   sample the page behind a translucent panel. Keep the sheen over a solid base. */
:root.windows {
  --glass: linear-gradient(115deg, #ffffff14, #ffffff03 42%, #ffffff0a), linear-gradient(180deg, #3a3e49, #282b34);
  --glass-well: #20232b;
}
:root {
  color-scheme: dark;
  --tabs: 40px;
  --toolbar: 48px;
  --bookmarks: 0px;
  --foreground: #f6f5fa;
  --ease: cubic-bezier(.2,.72,.25,1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--foreground);
  background: #111a29;
}
/* While a site is on screen the interface view is layered above it and only
   the header and the menus may paint, so everything below them stays clear. */
:root.site-visible { background: transparent; }
* { box-sizing: border-box; }
@media (forced-colors: none) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { border: 1px solid transparent; border-radius: 99px; background: #8794a680; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background-color: #8794a6d9; }
  ::-webkit-scrollbar-button { display: none; }
}
[hidden], .symbols { display: none !important; }
body { height: 100vh; margin: 0; display: flex; flex-direction: column; overflow: hidden; }
/* The wallpaper (Impostazioni → Sfondo), with a shade at the top for the bright ones. */
:root { --wallpaper: url("assets/sunset.png"); --wallpaper-thumb: url("assets/backgrounds/sunset-thumb.jpg"); --wallpaper-position: 18% top; --wallpaper-shade: 0; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgb(10 14 30 / var(--wallpaper-shade)), rgb(10 14 30 / calc(var(--wallpaper-shade) * .35)) 34%, transparent 60%), #243453 var(--wallpaper) var(--wallpaper-position) / cover no-repeat; }
.wallpaper-fade { position: fixed; inset: 0; z-index: -1; pointer-events: none; background-size: cover; background-repeat: no-repeat; }
/* With a site on screen the wallpaper shows only behind the bar: the fading old one too, or it would cover the
   page for a moment at every change. */
.site-visible body::before, .site-visible .wallpaper-fade { clip-path: inset(0 0 calc(100% - var(--tabs) - var(--toolbar) - var(--bookmarks)) 0); }
button, input { font: inherit; }
img, button, .tab { -webkit-user-drag: none; }
button { cursor: pointer; }
button:disabled { opacity: .42; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--o-ffc790, #ffc790); outline-offset: -3px; }
button:not(:disabled):active { scale: .92; }
button { transition: background-color .16s var(--ease), scale .15s var(--ease), color .16s var(--ease), transform .16s var(--ease); }
.icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
header { z-index: 2; flex: none; position: relative; background: transparent; }
/* The site's colours rise from the toolbar into the tab strip: the bands of the
   page's first row, left to right, blended into one another higher up and
   faded along an eased curve; at the bottom they match the page exactly. */
.site-tint { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--site-tint, 0); transition: opacity .22s var(--ease); }
.site-tint > div { position: absolute; inset: 0; }
#tint-soft { -webkit-mask: linear-gradient(to bottom, #0000 0%, #0000000a 16%, #00000024 30%, #00000057 43%, #0000009e 56%, #000000d6 69%, #000000f5 82%, #000 94%);
  mask: linear-gradient(to bottom, #0000 0%, #0000000a 16%, #00000024 30%, #00000057 43%, #0000009e 56%, #000000d6 69%, #000000f5 82%, #000 94%); }
/* Keep the exact seam in the last 2px, then fade it into the softer blend. */
#tint-exact { -webkit-mask: linear-gradient(to top, #000 0 2px, #0005 4px, transparent 8px);
  mask: linear-gradient(to top, #000 0 2px, #0005 4px, transparent 8px); }
body[data-site-light="true"] .toolbar { color: #171e2b; }
body[data-site-light="true"] .address { background: #f6f7fcdb; }
body[data-site-light="true"] .address input, body[data-site-light="true"] .address-icon, body[data-site-light="true"] .address input::placeholder { color: #262c3c; }
body[data-site-light-nav="true"] .toolbar .navigation .tool { color: #182133; }
body[data-site-light-tools="true"] .tools-tray { background: #f6f7fcdb; color: #1d2433; }
body[data-site-light-tools="true"] .tools-tray .tool { color: #1d2433; }
body[data-site-light-tools="true"] .tools-tray .tool:not(:disabled):hover, body[data-site-light-tools="true"] .tools-tray .tool[aria-expanded="true"] { background: #1d243314; }
body[data-site-light-tools="true"] #tunnel-button { color: var(--o-c2571a, #c2571a); }
body[data-site-light-tools="true"] #ad-block[aria-pressed="true"] { color: #0f8a62; }
body[data-site-light-tools="true"] #assistant-button { color: var(--o-c2571a, #c2571a); }
.tabbar { height: var(--tabs); display: flex; align-items: stretch; padding: 0 9px 0 2px; gap: 2px; }
.macos .tabbar { padding-left: 76px; }
.macos.fullscreen .tabbar { padding-left: 2px; }
.windows .tabbar { padding-right: 150px; }
/* Like Safari: the tabs share the width and shrink down to just their icon,
   while the selected one keeps its title and close button; past that the strip
   scrolls, its ends fading out. Groups and side-by-side views keep their size. */
.tabs { flex: 0 1 auto; min-width: 0; display: flex; align-items: flex-end; gap: 4px; padding: 0 10px; overflow: auto hidden; scrollbar-width: none; overscroll-behavior-x: contain;
  /* Room above and below for the selected tab's shadow, which the strip (it scrolls sideways) would cut: the room
     lets the pointer through to what is under it, the tabs themselves take it. */
  padding-block: 4px 14px; margin-block: -4px -14px; pointer-events: none; }
.tabs > * { pointer-events: auto; }
.tabs.scroll-start { -webkit-mask: linear-gradient(to right, transparent, #000 34px); mask: linear-gradient(to right, transparent, #000 34px); }
.tabs.scroll-end { -webkit-mask: linear-gradient(to left, transparent, #000 34px); mask: linear-gradient(to left, transparent, #000 34px); }
.tabs.scroll-start.scroll-end { -webkit-mask: linear-gradient(to right, transparent, #000 34px calc(100% - 34px), transparent); mask: linear-gradient(to right, transparent, #000 34px calc(100% - 34px), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs:empty { display: none; }
.tab { position: relative; isolation: isolate; display: flex; align-items: center; flex: 0 1 auto; width: clamp(142px, 17vw, 215px); min-width: 34px; height: 33px; padding: 0 5px 1px 11px; border: 0; color: #d9dbe6; container-type: inline-size; clip-path: inset(-3px -10px 0 -10px); }
/* A tab under the pointer lights up only around the pointer (tabs.js keeps --spot-x and --spot-y on it). */
.tab::before { content: ""; position: absolute; inset: 3px 2px 4px; z-index: -1; border-radius: 9px; opacity: 0;
  background: radial-gradient(70px circle at var(--spot-x, 50%) var(--spot-y, 50%), #ffffff2e, #ffffff0d 55%, transparent 80%);
  transition: opacity .18s var(--ease); }
.tab:hover:not([data-selected="true"])::before { opacity: 1; }
.tab[data-selected="true"] { z-index: 2; color: #fff; min-width: clamp(150px, 15vw, 210px); scale: 1.045; clip-path: none; }
.tab { transition: transform .2s var(--ease), scale .24s var(--ease); }
/* Selected tab: a rounded rectangle of translucent white, a little larger than the others, lifted off the bar by
   its shadow. */
.tab-edge { position: absolute; z-index: -1; inset: 2px 0 3px; border-radius: 10px; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, #ffffff36, #ffffff1f);
  box-shadow: 0 8px 18px -6px #000000a8, 0 2px 6px -1px #0000005c, inset 0 1px 0 #ffffff33, inset 0 0 0 1px #ffffff14;
  transition: opacity .22s var(--ease); }
.tab[data-selected="true"] .tab-edge { opacity: 1; }
/* In its own layer: WebKit otherwise left traces of the shape (its shadow) where a tab had been selected. */
.tab-edge { will-change: opacity; }
/* The orange edge of earlier versions (ui/browser.js still makes its elements). */
.tab-glow, .tab-line { display: none; }
.tab.dragging { z-index: 3; transition: none; cursor: grabbing; }
/* Out of the window: dropped there it opens in another window (tabs.js). */
.tab-detaching .tab.dragging { opacity: .2; }
.tab.pinned { flex: none; width: 46px; padding: 0 0 1px; justify-content: center; }
.tab.pinned .tab-select { flex: none; justify-content: center; }
.tab.pinned .tab-select span, .tab.pinned > .tool { display: none; }
.tab[data-closing="true"] { pointer-events: none; scale: 1; }
.tab[data-closing="true"]::before { visibility: hidden; }
.tab[data-closing="true"] .tab-edge, .tab[data-folding="true"] .tab-edge { display: none; }
@keyframes tab-in { from { width: 0; min-width: 0; padding-inline: 0; opacity: 0; } 40% { opacity: 1; } }
/* Narrow tabs lose the close button (the selected one, always wide, keeps it;
   a middle click closes any tab), then the title: just the icon, centred. The title stays as long as a few
   letters fit after the icon (0.5.26: it went at 64px, when half the tab still had room for it). */
@container (max-width: 96px) {
  .tab-select span { font-size: 11px; }
  .tab:not([data-selected="true"]) > .tool { display: none; }
}
@container (max-width: 40px) {
  .tab:not([data-selected="true"]) .tab-select { justify-content: center; }
  .tab:not([data-selected="true"]) .tab-select span { display: none; }
}
.tab-select:active, .tab .tool:active { scale: 1 !important; }
.tab-select { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; align-self: stretch; padding: 0; border: 0; background: none; color: inherit; text-align: left; overflow: hidden; }
.tab-select img { width: 17px; height: 17px; flex: none; object-fit: contain; }
.tab-select img.favicon { width: 16px; height: 16px; border-radius: 3px; }
.tab-select img.favicon[data-ink="negative"] { filter: invert(1) hue-rotate(180deg); }
.tab-select img.favicon[data-ink="light-tile"] { background: #f4f5fa; padding: 1px; }
.tab-select img.favicon[data-ink="dark-tile"] { background: #1b2130; padding: 1px; }
.tab-select .icon { width: 14px; height: 14px; flex: none; }
.tab-select span { font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tool { width: 30px; height: 28px; display: inline-grid; place-items: center; flex: none; border: 0; border-radius: 8px; padding: 0; background: transparent; color: #f3f0fa; }
.tool:not(:disabled):hover, .tool[aria-expanded="true"] { background: #ffffff25; }
.tab .tool { width: 22px; height: 22px; margin-left: 3px; }
.tab .tool .icon { width: 13px; height: 13px; }
.new-tab { width: 28px; height: 28px; align-self: center; margin-top: 6px; border-radius: 50%; }
.drag-region { flex: 1; height: 100%; min-width: 12px; }
.toolbar { height: var(--toolbar); display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.navigation { display: flex; gap: 2px; }
.address, .tools-tray { display: flex; align-items: center; height: 36px; border-radius: 12px; border: 1px solid #e6e5ff49; background: linear-gradient(110deg, #e7edff2b, #afbed917); box-shadow: 0 2px 7px #0b0c2233, inset 0 1px #ffffff21; }
.address { flex: 1; min-width: 0; border-radius: 100px; }
.address:focus-within { border-color: var(--o-f0b684, #f0b684); }
.address-icon { margin-left: 10px; color: #e0e5f0; }
/* On a site the icon opens its permissions (site-tools.js). */
.address-icon[data-site="true"] { display: grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; margin-right: -4px; border-radius: 50%; cursor: pointer;
  transition: background .15s var(--ease); }
.address-icon[data-site="true"]:hover, .address-icon[aria-expanded="true"] { background: #ffffff1c; }
body[data-site-light="true"] .address-icon[data-site="true"]:hover, body[data-site-light="true"] .address-icon[aria-expanded="true"] { background: #1d243314; }
.address-icon:focus-visible { outline: 2px solid var(--o-ff9a5c, #ff9a5c); outline-offset: 1px; }
#tool-menu[data-side="left"] { transform-origin: top left; width: min(340px, calc(100vw - 20px)); overflow-x: hidden; }
#tool-menu:has(.site-permissions) { overflow-x: hidden; }
.site-permissions { display: grid; gap: 4px; margin: 2px 0 6px; }
.site-permission { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 5px 4px 5px 8px; border-radius: 10px; background: #ffffff0a; }
.site-permission > span { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; }
.site-permission > span .icon { width: 15px; height: 15px; flex: none; opacity: .85; }
.site-permission-choices { display: flex; flex: none; gap: 2px; padding: 2px; border-radius: 9px; background: #00000024; }
#tool-menu .site-permission-choices button { width: auto; height: 24px; padding: 0 7px; justify-content: center; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: #c6cde0;
  transition: background .18s var(--ease), color .18s var(--ease); }
#tool-menu .site-permission-choices button[aria-checked="true"][data-value="allow"] { color: #062d17; background: #8aefcb; }
#tool-menu .site-permission-choices button[aria-checked="true"][data-value="block"] { color: #fff; background: #f15c6dcc; }
#tool-menu .site-permission-choices button[aria-checked="true"][data-value="ask"] { color: #fff; background: #ffffff2e; }
#tool-menu .site-permissions-reload { color: var(--o-ffc584, #ffc584); }
#tool-menu .site-permissions-reload[hidden] { display: none; }
.address-icon .icon { width: 15px; height: 15px; }
/* Jase Misto (browser.js, renderEngineSwap): the engine's logo in place of the globe; at the end of the bar, the next
   engine's logo, faded, a button that runs the same search there. */
.address-icon img { display: block; width: 15px; height: 15px; border-radius: 3px; object-fit: contain; }
.engine-swap { width: auto; min-width: 28px; height: 26px; margin-right: 5px; padding: 0 6px; border-radius: 100px; opacity: .42; transition: opacity .15s ease, background-color .15s ease; }
.engine-swap:hover, .engine-swap:focus-visible { opacity: 1; }
.engine-swap img { display: block; width: 16px; height: 16px; border-radius: 3px; object-fit: contain; }
.engine-swap span { font-size: 11.5px; font-weight: 600; letter-spacing: .01em; color: var(--foreground); }
body[data-site-light="true"] .engine-swap span { color: #262c3c; }
.address input, .home-search input { min-width: 0; width: 100%; height: 100%; border: 0; background: transparent; outline: none; }
.address input { color: var(--foreground); padding: 0 8px; font-size: 13px; text-overflow: ellipsis; }
.address input::placeholder { color: #e4e5f0; opacity: 1; }
.favorite { color: var(--o-ffc584, #ffc584); }
.address > .favorite { width: 28px; border-radius: 50%; }
.address-tools { display: flex; flex: none; align-items: center; padding-right: 3px; }
.address-tools .tool { width: 27px; border-radius: 50%; }
.address-tools .icon { width: 16px; height: 16px; }
body[data-site-light="true"] .address-tools .tool { color: #262c3c; }
body[data-site-light="true"] .address-tools .tool:not(:disabled):hover { background: #1d243314; }
.address-tools .tool[aria-pressed="true"] { background: color-mix(in srgb, var(--o-ff975f, #ff975f) 22%, transparent); }
.navigation .favorite:not([aria-pressed="true"]) { color: var(--o-ffc584, #ffc584); }
body[data-site-light-nav="true"] .navigation .favorite:not([aria-pressed="true"]) { color: var(--o-9f4510, #9f4510); }
.site-key { margin-right: 0; color: var(--o-ffd2b0, #ffd2b0); }
.site-key .icon { width: 16px; height: 16px; }
body[data-site-light="true"] .site-key { color: var(--o-c2571a, #c2571a); }
/* Saved: the star filled with its colour, its outline the same colour (no dark ring on light sites); the fill fades
   in while the star jumps (browser.js). */
.favorite .icon { transition: fill .28s var(--ease), color .28s var(--ease); }
.favorite[aria-pressed="true"], .navigation .favorite[aria-pressed="true"], body[data-site-light-nav="true"] .navigation .favorite[aria-pressed="true"] { color: var(--o-ffb35c, #ffb35c); }
.favorite[aria-pressed="true"] .icon { fill: var(--o-ffb35c, #ffb35c); }
.tools-tray { --tray-tool: 33px; flex: none; gap: 1px; padding: 0 2.5px; }
.tools-tray .tool { width: var(--tray-tool); height: 29px; border-radius: 8.5px; }
.tools-tray .icon { width: 16px; height: 16px; }
#tunnel-button { color: var(--o-ffc498, #ffc498); }
#ad-block[aria-pressed="true"] { color: #8aefcb; }
/* Context menus reuse the header's glass: same border, top highlight and
   tones, made dense enough to stay readable above any site. */
#tool-menu, .popover, .suggestions, .bubble, .find-bar { border: 1px solid var(--glass-border); color: #f3f0fa; background: var(--glass); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
#tool-menu { position: absolute; right: 10px; top: calc(100% - 2px); width: min(300px, calc(100vw - 20px)); max-height: calc(100vh - var(--tabs) - var(--toolbar) - var(--bookmarks) - 10px); overflow: auto; z-index: 3; padding: 8px; border-radius: 18px; transform-origin: top right; animation: menu-in .17s var(--ease) both; }
#tool-menu[data-closing="true"] { animation: menu-out .13s var(--ease) both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px) scale(.975); } }
@keyframes menu-out { to { opacity: 0; transform: translateY(-3px) scale(.985); } }
#tool-menu h2 { margin: 6px 12px 8px; font-size: 12.5px; font-weight: 650; letter-spacing: .02em; color: #f3f0fa; }
#tool-menu p { color: #b9c1d4; font-size: 12.5px; line-height: 1.45; margin: 4px 10px 8px; }
#tool-menu-content, .popover { display: grid; gap: 1px; }
#tool-menu-content button, .popover button { display: flex; align-items: center; gap: 13px; min-width: 0; height: 38px; padding: 0 12px; border: 0; border-radius: 12px; text-align: left; font-size: 13.5px; background: transparent; color: #dfe3ee; }
#tool-menu-content button .icon, .popover button .icon { width: 17px; height: 17px; color: #c8cfdf; transition: color .16s var(--ease); }
#tool-menu-content button:hover, #tool-menu-content button:focus-visible, .popover button:not(:disabled):hover, .popover button:focus-visible {
  background: linear-gradient(90deg, color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 25.9%, transparent), color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 7.8%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 18%, transparent), inset 0 1px #ffffff12; color: #fff; outline: none; }
#tool-menu-content button:hover .icon, #tool-menu-content button:focus-visible .icon, .popover button:not(:disabled):hover .icon, .popover button:focus-visible .icon { color: var(--o-ff9a5c, #ff9a5c); }
#tool-menu-content button:active, .popover button:active { scale: .985; }
#tool-menu-content button span, .popover button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tool-menu-content .menu-separator, .popover .menu-separator { height: 1px; margin: 6px 10px; background: #ffffff14; }
#tool-menu-content .open-full .icon { color: var(--o-ffc89e, #ffc89e); }
main { flex: 1; min-height: 0; position: relative; }
#home { height: 100%; overflow: auto; }
.welcome { display: flex; flex-direction: column; align-items: center; margin: 0 auto; padding: clamp(62px, 13vh, 130px) 24px 36px; }
.brand { width: clamp(208px, 27vw, 352px); height: auto; filter: drop-shadow(0 3px 12px #20162e70); }
.home-search { display: flex; align-items: center; width: min(60vw, 675px); min-width: min(100%, 370px); height: clamp(42px, 6.2vh, 54px); margin-top: clamp(20px, 4.4vh, 48px); border: 1px solid color-mix(in srgb, var(--o-fff9f3, #fff9f3) 82.4%, transparent); border-radius: 100px; background: linear-gradient(108deg, color-mix(in srgb, var(--o-fff6f1, #fff6f1) 76.1%, transparent), color-mix(in srgb, var(--o-ffe5d6, #ffe5d6) 65.1%, transparent)); backdrop-filter: blur(7px); color: #353442; box-shadow: 0 11px 27px #59272c50, inset 0 1px 7px color-mix(in srgb, var(--o-fff8f1, #fff8f1) 62.7%, transparent); }
.home-search:focus-within { border-color: white; box-shadow: 0 16px 35px #59272c70, 0 0 0 3px color-mix(in srgb, var(--o-ffe6c9, #ffe6c9) 61.2%, transparent); }
.home-search input { font-size: clamp(15px, 1.75vw, 21px); padding: 0 9px; color: inherit; }
.home-search input::placeholder { color: #514e59; opacity: 1; }
.search-submit, .ask-jase { flex: none; display: grid; place-items: center; width: clamp(42px, 5.5vw, 62px); height: 62%; border: 0; background: transparent; }
.search-submit { color: var(--o-cc4c11, #cc4c11); }
.ask-jase { color: #195d9e; border-left: 1px solid #d6a99a70; }
.search-submit .icon, .ask-jase .icon { width: clamp(22px, 2.65vw, 30px); height: clamp(22px, 2.65vw, 30px); stroke-width: 2; }
.search-submit:hover, .ask-jase:hover { color: var(--o-8d370f, #8d370f); }
.shortcuts { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(13px, 2.8vw, 32px); width: min(100%, 680px); margin-top: clamp(22px, 5.3vh, 47px); }
.shortcut { display: grid; place-items: center; width: clamp(42px, 4.8vw, 56px); aspect-ratio: 1; padding: 0; border: 1px solid color-mix(in srgb, var(--o-fff8f2, #fff8f2) 69%, transparent); border-radius: 15px; background: linear-gradient(150deg, color-mix(in srgb, var(--o-fff0e5, #fff0e5) 94.1%, transparent), color-mix(in srgb, var(--o-ffd6c4, #ffd6c4) 85.9%, transparent)); color: #5d473e; box-shadow: 0 10px 26px #743d323b, inset 0 1px 5px color-mix(in srgb, var(--o-fff5e8, #fff5e8) 73.3%, transparent); }
.shortcut:hover { background: var(--o-fff1e7, #fff1e7); transform: translateY(-2px); }
.shortcut .icon { width: 64%; height: 64%; }
.shortcut.add { background: linear-gradient(150deg, color-mix(in srgb, var(--o-ffddc7, #ffddc7) 85.1%, transparent), color-mix(in srgb, var(--o-ffd0aa, #ffd0aa) 65.9%, transparent)); }
.shortcut.add .icon { width: 56%; height: 56%; }
.shortcut .letter { font-size: 25px; font-weight: 700; }
h1 { margin: 0 0 12px; font-size: 27px; font-weight: 660; }
.action, .dialog-actions button { padding: 7px 14px; border: 1px solid var(--glass-button-border); border-radius: 10px; color: var(--o-ffe6d4, #ffe6d4); font-size: 13px; background: var(--glass-button);
  box-shadow: none; white-space: nowrap; transition: background-color .18s var(--ease), box-shadow .18s var(--ease); }
.action:hover, .dialog-actions button:hover { background: var(--glass-button-hover); }
.action.primary, .dialog-actions .primary { border-color: var(--glass-orange-border); background: var(--glass-orange); color: #fff; box-shadow: var(--glass-orange-shadow); }
.action.primary:hover, .dialog-actions .primary:hover { background: var(--glass-orange-hover); }
dialog { max-width: calc(100vw - 38px); width: 410px; padding: 24px; border: 1px solid var(--glass-border); border-radius: 18px; color: var(--foreground); background: var(--glass); box-shadow: var(--glass-shadow), 0 28px 80px -20px #000c;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
dialog h1 { font-size: 23px; }
.dialog-actions .primary:disabled { opacity: .5; }
#shortcut-error { color: #c0c5d1; }
dialog::backdrop { background: linear-gradient(180deg, #3a3c4426, #26282e3d); -webkit-backdrop-filter: blur(4px) saturate(1.1); backdrop-filter: blur(4px) saturate(1.1); }
dialog label { display: grid; gap: 6px; margin: 13px 0; }
dialog input { width: 100%; padding: 8px 10px; border: 1px solid #ffffff3f; border-radius: 8px; color: inherit; background: var(--glass-well); }
/* The first question about search (contribute.js): two choices, each a switch beside its explanation. */
.consent-dialog { width: 460px; }
.consent-dialog .consent-choice { grid-template-columns: 1fr auto; align-items: start; gap: 14px; margin: 16px 0; cursor: pointer; }
.consent-dialog .consent-choice > input.switch { grid-column: 2; grid-row: 1; width: 40px; padding: 0; border: 0; margin-top: 2px; }
.consent-dialog .consent-choice > span { display: grid; gap: 4px; }
.consent-dialog .consent-choice strong { font-size: 14px; font-weight: 600; }
.consent-dialog .consent-choice small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.consent-dialog p { color: var(--muted); font-size: 12.5px; }
.dialog-actions { display: flex; gap: 10px; justify-content: end; }
.shortcut:not(.add) .icon { stroke: none; }
dialog[open] { animation: panel-in .19s var(--ease) both; }
dialog[open][data-closing="true"] { animation: panel-out .17s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(7px) scale(.98); } }
@keyframes panel-out { to { opacity: 0; transform: translateY(7px) scale(.98); } }
@media (max-width: 730px) {
  .toolbar { gap: 4px; padding: 0 6px; }
  .navigation { gap: 0; }
  .toolbar .tool { width: 25px; }
  .address-tools .tool { width: 23px; }
  .tools-tray { --tray-tool: 25px; }
  .home-search { width: min(87vw, 530px); }
}
@media (max-height: 610px) {
  .welcome { padding-top: 45px; }
  .brand { max-width: 225px; }
}
@media (min-height: 670px) {
  body::before { background-size: auto, max(100%, calc(100vh * 1.78)) auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

body[data-reduce-motion="true"] *, body[data-reduce-motion="true"] *::before, body[data-reduce-motion="true"] *::after { animation-duration: 0s !important; transition-duration: 0s !important; }

.import-list { display: grid; gap: 6px; margin: 16px 0 6px; }
dialog label.import-choice { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid #ffffff1f; border-radius: 11px; background: #ffffff0a; cursor: pointer; }
dialog label.import-choice:hover { background: #ffffff14; }
.import-choice span { display: grid; gap: 2px; min-width: 0; }
.import-choice strong { font-weight: 600; font-size: 14px; }
.import-choice small { color: #b9c2d4; font-size: 12px; }
dialog input[type=checkbox] { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--o-f08a4b, #f08a4b); }
/* Profiles of one browser, and what to import (browser.js showImportChoices). */
.import-browser { display: grid; gap: 4px; }
.import-profiles { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 2px 12px 6px 42px; }
dialog .import-profiles label, dialog .import-kinds label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; color: #d6dbe7; }
.import-profiles input:disabled + * , dialog .import-profiles label:has(input:disabled) { opacity: .5; }
.import-kinds { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid #ffffff1f; border-radius: 11px; }
.import-kinds legend { padding: 0 6px; font-size: 12px; color: #b9c2d4; }
dialog label.import-option { display: flex; align-items: center; gap: 10px; margin: 12px 2px 4px; font-size: 13px; color: #d6dbe7; }
#import-status { min-height: 1.4em; font-size: 13px; color: #c0c5d1; }
#import-dialog p { color: #c0c5d1; font-size: 13.5px; line-height: 1.45; }
#import-dialog { width: 440px; }

/* Internal pages: settings, lists, help, Jase Tunnel. */
.sheet { --muted: #9ea8bd; --line: #ffffff12; height: 100%; overflow: auto; padding: 40px 28px 64px; background: radial-gradient(1200px 500px at 50% -200px, #3d3f49, transparent), linear-gradient(180deg, #202127, #16171b); }
.sheet-inner { max-width: 820px; margin: 0 auto; }
.sheet-inner.narrow { max-width: 680px; }
.sheet h1 { margin: 0; font-size: 26px; font-weight: 680; letter-spacing: -.01em; }
.sheet h2 { margin: 0 0 10px 4px; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: #c6cde0; }
.sheet-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.sheet-heading { flex: 1; min-width: 0; }
.sheet-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.sheet-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--o-ffd2b0, #ffd2b0); background: linear-gradient(150deg, color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 25.1%, transparent), color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 7.8%, transparent)); border: 1px solid color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 25.1%, transparent); box-shadow: inset 0 1px #ffffff1f; }
.sheet-icon .icon { width: 22px; height: 22px; }
.sheet-icon.warning { color: var(--o-ffb8a0, #ffb8a0); }
.sheet-search { display: flex; align-items: center; gap: 8px; width: min(260px, 40%); height: 36px; padding: 0 12px; border: 1px solid #ffffff1f; border-radius: 100px; background: #ffffff0c; color: var(--muted); }
.sheet-search:focus-within { border-color: var(--o-f0b684, #f0b684); background: #ffffff12; }
.sheet-search .icon { width: 15px; height: 15px; flex: none; }
.sheet-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--foreground); font-size: 13px; }
.sheet-search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.card { border: 1px solid #ffffff14; border-radius: 15px; background: linear-gradient(180deg, #ffffff0b, #ffffff06); box-shadow: inset 0 1px #ffffff0d, 0 10px 30px -18px #0009; overflow: hidden; }
.card.padded { padding: 18px 20px; }
.card + .card { margin-top: 14px; }
.card.padded h2 { margin: 0 0 6px; font-size: 15px; color: var(--foreground); }
.card.padded p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.row { display: flex; align-items: center; gap: 18px; min-height: 58px; padding: 11px 18px; margin: 0; }
.row + .row { border-top: 1px solid var(--line); }
label.row { cursor: pointer; }
label.row:hover { background: #ffffff05; }
.row-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-text strong { font-size: 13.5px; font-weight: 560; }
.row-text small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.row input[type=url] { width: min(300px, 45%); height: 32px; padding: 0 11px; border: 1px solid #ffffff24; border-radius: 9px; background: var(--glass-well); color: inherit; font: inherit; font-size: 13px; outline: none; }
.row input[type=url]:focus { border-color: var(--o-f0b684, #f0b684); }
.sheet select, dialog select { appearance: none; -webkit-appearance: none; height: 32px; max-width: 300px; padding: 0 32px 0 11px; border: 1px solid #ffffff24; border-radius: 9px; color: inherit; font: inherit; font-size: 13px; background: var(--glass-well) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c6cde0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; cursor: pointer; }
.sheet select:focus-visible { outline: 2px solid var(--o-ffc790, #ffc790); outline-offset: 1px; }
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 12px; cursor: pointer; background: radial-gradient(circle, #fff 0 8.5px, transparent 9px) no-repeat 2px 50% / 20px 20px, #ffffff24; box-shadow: inset 0 0 0 1px #ffffff14; transition: background-color .18s var(--ease), background-position .18s var(--ease); }
input.switch:checked { background-color: var(--o-e9692b, #e9692b); background-position: 18px 50%; }
input.switch:disabled { opacity: .4; cursor: default; }
input.switch:focus-visible { outline: 2px solid var(--o-ffc790, #ffc790); outline-offset: 2px; }
.status-line { min-height: 1.4em; margin: 14px 4px 0; color: var(--muted); font-size: 13px; }
.note { margin: 16px 4px 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
kbd { flex: none; padding: 4px 9px; border: 1px solid #ffffff24; border-bottom-width: 2px; border-radius: 7px; background: #ffffff0d; color: #e4e8f3; font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: nowrap; }
.macos .windows-only { display: none; }

/* Settings: section list beside the cards. */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; max-width: 1020px; margin: 0 auto; }
.settings-nav { position: sticky; top: 0; align-self: start; display: grid; gap: 2px; }
.settings-nav h1 { margin: 0 0 16px 10px; }
.settings-nav button { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; color: #cfd5e4; font-size: 13.5px; text-align: left; }
.settings-nav button .icon { width: 16px; height: 16px; color: #aab3c8; }
.settings-nav button:hover { background: #ffffff0d; }
.settings-nav button[aria-current="true"] { background: #ffffff17; color: #fff; }
.settings-nav button[aria-current="true"] .icon { color: var(--o-ffb27c, #ffb27c); }
.settings-content { display: grid; gap: 28px; padding-top: 50px; }
.settings-group { scroll-margin-top: 20px; }

/* Lists: favorites, history, downloads, shortcuts. */
.list { display: grid; gap: 22px; }
.list-group h2 { position: sticky; top: -40px; z-index: 1; margin: 0 0 8px 4px; padding: 6px 0; }
.item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px 8px 14px; }
.item + .item { border-top: 1px solid var(--line); }
.item:hover { background: #ffffff07; }
.avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-size: 14px; font-weight: 700; color: #fff; background: hsl(var(--hue, 210) 45% 38%); box-shadow: inset 0 1px #ffffff24; }
.avatar .icon { width: 16px; height: 16px; }
.item-main { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 4px 0; border: 0; background: none; color: inherit; text-align: left; }
button.item-main:hover strong { color: var(--o-ffc89e, #ffc89e); }
.item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 560; }
.item-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.item-meta { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
/* History: a site visited many times in a row, as one folder that opens (browser.js renderCollection). */
.history-folder + .item, .item + .history-folder, .history-folder + .history-folder { border-top: 1px solid var(--line); }
.history-folder-head { cursor: pointer; }
.history-folder-mark { position: relative; }
.history-folder-mark b { position: absolute; right: -6px; bottom: -5px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px;
  font-size: 9.5px; line-height: 16px; text-align: center; color: #1b2232; background: #e9ecf4; box-shadow: 0 0 0 2px #2a3040; }
.history-folder-chevron { flex: none; display: grid; place-items: center; width: 22px; color: var(--muted); transition: transform .26s var(--ease); }
.history-folder-chevron .icon { width: 15px; height: 15px; }
.history-folder[data-open="true"] .history-folder-chevron { transform: rotate(180deg); }
.history-folder-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.history-folder[data-open="true"] .history-folder-items { grid-template-rows: 1fr; }
.history-folder-items > div { min-height: 0; overflow: hidden; }
.history-folder-items .item { padding-left: 38px; border-top: 1px solid var(--line); background: #00000012; }
.history-folder-items .item .avatar { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; }
@media (prefers-reduced-motion: reduce) { .history-folder-items, .history-folder-chevron { transition: none; } }
.item .tool { opacity: 0; color: #c7cede; transition: opacity .12s var(--ease), background-color .16s var(--ease); }
.item:hover .tool, .item .tool:focus-visible { opacity: 1; }
.empty { margin: 60px auto; max-width: 340px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Error page. */
.problem { display: grid; place-items: center; }
.problem-card { max-width: 440px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.problem-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.tunnel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.field { display: grid; gap: 6px; margin: 14px 0; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; gap: 10px; }
  .settings-nav { display: flex; flex-wrap: wrap; }
  .settings-nav h1 { width: 100%; }
  .settings-content { padding-top: 10px; }
  .sheet-head { flex-wrap: wrap; }
  .sheet-search { width: 100%; }
}

/* Find in page. */
.find-bar { position: absolute; z-index: 3; top: calc(100% - 2px); right: 10px; display: flex; align-items: center; gap: 2px; width: min(380px, calc(100vw - 20px)); height: 40px; padding: 0 4px 0 12px; border-radius: 12px; animation: menu-in .16s var(--ease) both; }
.find-icon .icon { width: 15px; height: 15px; color: #c6cde0; }
.find-bar input { flex: 1; min-width: 0; height: 30px; margin-left: 6px; border: 0; outline: none; background: none; color: inherit; font-size: 13px; }
.find-bar input::placeholder { color: #aab3c8; opacity: 1; }
.find-count { flex: none; padding: 0 8px; color: #b9c2d6; font-size: 12px; font-variant-numeric: tabular-nums; }
.find-bar.empty .find-count { color: var(--o-ffb4a0, #ffb4a0); }
.find-bar .tool { width: 28px; height: 28px; border-radius: 8px; }
.find-bar .tool .icon { width: 15px; height: 15px; }

/* Address suggestions. */
.suggestions { position: fixed; z-index: 4; padding: 6px; border-radius: 16px; display: grid; gap: 1px; max-height: calc(100vh - 110px); overflow: auto; }
.suggestion { display: grid; grid-template-columns: 20px minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: 10px; cursor: default; }
.suggestion .icon { width: 16px; height: 16px; color: #e3e5f2; }
.suggestion-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; color: #e7eaf4; }
.suggestion-text b { color: #fff; font-weight: 650; }
.suggestion small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #c3c7da; font-size: 12px; }
.suggestion small::before { content: "— "; color: #9a9fb8; }
.suggestion[aria-selected="true"] { background: #ffffff1f; }
.suggestion[aria-selected="true"] .icon { color: var(--o-ffb27c, #ffb27c); }

/* Prompts under the address bar. */
.bubble { position: fixed; z-index: 4; top: 92px; left: 54px; width: min(380px, calc(100vw - 24px)); padding: 16px; border-radius: 16px; display: grid; gap: 12px; animation: menu-in .18s var(--ease) both; transform-origin: top left; }
.bubble-head { display: flex; gap: 12px; align-items: flex-start; }
.bubble-head > div { display: grid; gap: 3px; }
.bubble-head strong { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.bubble-head small { color: #d4d7e8; font-size: 12.5px; }
.bubble-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--o-ffd2b0, #ffd2b0); background: color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 14.9%, transparent); border: 1px solid color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 23.9%, transparent); }
.bubble-icon .icon { width: 17px; height: 17px; }
.bubble-remember { display: flex; align-items: center; gap: 8px; color: #e0e2ef; font-size: 12.5px; }
.bubble-remember input { accent-color: var(--o-f08a4b, #f08a4b); }
.bubble-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Tab menu. */
.popover { position: fixed; z-index: 5; min-width: min(240px, calc(100vw - 12px)); max-width: calc(100vw - 12px); max-height: calc(100vh - 12px); overflow: auto; padding: 8px; border-radius: 18px; animation: menu-in .14s var(--ease) both; transform-origin: top left; }
.popover button:disabled { opacity: .4; }

/* Update indicator on the browser menu. */
#browser-menu.has-update { position: relative; }
#browser-menu.has-update::after { content: ""; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--o-ff8a3d, #ff8a3d); box-shadow: 0 0 0 2px #273149; }
#assistant-button { color: var(--o-ffd2b0, #ffd2b0); }
.windows .macos-only { display: none; }

/* Passwords and personal data. */
.sheet-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; }
.sheet-toolbar .status-line { margin: 0 0 0 6px; }
.item .tool.visible { opacity: .85; }
.item .tool.visible:hover { opacity: 1; }
.secret { flex: none; min-width: 90px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 9px; border-radius: 7px; background: var(--glass-well); color: #d9deea; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.vault-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 20px; }
.vault-form label { display: grid; gap: 6px; color: #b9c2d6; font-size: 12.5px; }
.vault-form .wide { grid-column: 1 / -1; }
.vault-form input { height: 34px; padding: 0 11px; border: 1px solid #ffffff24; border-radius: 9px; background: var(--glass-well); color: var(--foreground); font: inherit; font-size: 13.5px; outline: none; color-scheme: dark; }
.vault-form input:focus { border-color: var(--o-f0b684, #f0b684); }
.vault-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.vault-actions .status-line { margin: 0; }

/* Side panel. */
:root { --panel: 0px; }
:root.panel-open { --panel: 380px; }
main { margin-right: var(--panel); }
.side-panel { position: fixed; z-index: 3; top: calc(var(--tabs) + var(--toolbar) + var(--bookmarks)); right: 0; bottom: 0; width: 380px; display: flex; flex-direction: column; border-left: 1px solid var(--glass-border); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: -18px 0 40px -24px #000c; animation: panel-slide .22s var(--ease) both; }
@keyframes panel-slide { from { transform: translateX(24px); opacity: 0; } }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 16px; border-bottom: 1px solid #ffffff12; }
.panel-head img { width: 22px; height: 22px; }
.panel-head div { flex: 1; min-width: 0; display: grid; }
.panel-head strong { font-size: 14px; }
.panel-head small { color: #97a2ba; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-log { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel-intro p { margin: 4px 2px 14px; color: #b9c2d6; font-size: 13.5px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 7px 12px; border: 1px solid #ffffff26; border-radius: 100px; background: #ffffff0c; color: #e7eaf4; font-size: 12.5px; }
.chips button:hover:not(:disabled) { background: #ffffff1c; }
.panel-message { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.panel-message p { margin: 0 0 8px; }
.panel-message > :last-child, .panel-message li > :last-child, .panel-message blockquote > :last-child { margin-bottom: 0; }
.panel-message ul, .panel-message ol { margin: 4px 0 8px; padding-inline-start: 20px; }
.panel-message li + li { margin-top: 3px; }
.panel-message .panel-task { list-style: none; }
.panel-task input { margin-inline: -16px 5px; accent-color: var(--o-f08a4b, #f08a4b); vertical-align: middle; }
.panel-message :is(h1, h2, h3, h4, h5, h6) { margin: 12px 0 5px; font-size: 1em; line-height: 1.35; font-weight: 650; }
.panel-message :is(h1, h2) { font-size: 1.18em; }
.panel-message > :first-child { margin-top: 0; }
.panel-message blockquote { margin: 8px 0; padding-inline-start: 10px; border-inline-start: 2px solid color-mix(in srgb, var(--o-ffab76, #ffab76) 36.1%, transparent); color: #d4d9e9; }
.panel-message hr { margin: 10px 0; border: 0; border-top: 1px solid #ffffff24; }
.panel-message a { color: var(--o-ffd2b0, #ffd2b0); text-underline-offset: 2px; }
.panel-message code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .93em; }
.panel-message :not(pre) > code { padding: 1px 4px; border-radius: 4px; background: #0004; }
.panel-message pre { margin: 8px 0; max-width: 100%; overflow-x: auto; padding: 9px 11px; border: 1px solid #ffffff1c; border-radius: 8px; background: #0004; }
.panel-markdown-table { max-width: 100%; overflow-x: auto; margin: 8px 0; border: 1px solid #ffffff24; border-radius: 8px; }
.panel-markdown-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.panel-markdown-table :is(th, td) { min-width: 68px; padding: 7px 8px; text-align: start; vertical-align: top; }
.panel-markdown-table th { background: #ffffff12; font-weight: 650; }
.panel-markdown-table tr > :not(:last-child) { border-inline-end: 1px solid #ffffff1a; }
.panel-markdown-table td { border-top: 1px solid #ffffff1a; }
.panel-markdown-table [data-align="left"] { text-align: left; }
.panel-markdown-table [data-align="center"] { text-align: center; }
.panel-markdown-table [data-align="right"] { text-align: right; }
.panel-markdown-fallback { white-space: pre-wrap; }
.panel-message.user { align-self: flex-end; background: var(--o-e9692b, #e9692b); color: #fff; border-bottom-right-radius: 5px; }
.panel-message.jase { align-self: flex-start; max-width: 100%; background: #ffffff0f; border: 1px solid #ffffff14; border-bottom-left-radius: 5px; }
.panel-message.error { color: var(--o-ffc2b0, #ffc2b0); }
.panel-message .action { margin-top: 10px; }
.dots { display: inline-block; width: 28px; height: 8px; background: radial-gradient(circle, #c6cde0 0 3px, transparent 3.5px) 0 50% / 10px 8px repeat-x; animation: dots 1s steps(3) infinite; }
@keyframes dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -10% 0 0); } }
.fill-plan { display: grid; gap: 6px; margin: 10px 0; }
.fill-plan label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--glass-well)4d; }
.fill-plan span { display: grid; }
.fill-plan small { color: #97a2ba; font-size: 12px; }
.fill-plan input { accent-color: var(--o-f08a4b, #f08a4b); }
.panel-form { padding: 10px 12px 14px; border-top: 1px solid #ffffff12; display: grid; gap: 8px; }
.panel-context { display: flex; align-items: center; gap: 8px; color: #a7b1c6; font-size: 12px; }
.panel-context input { accent-color: var(--o-f08a4b, #f08a4b); }
.panel-compose { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid #ffffff24; border-radius: 14px; background: var(--glass-well); }
.panel-compose:focus-within { border-color: var(--o-f0b684, #f0b684); }
.panel-compose textarea { flex: 1; min-height: 38px; max-height: 140px; resize: none; border: 0; outline: none; background: none; color: inherit; font: inherit; font-size: 13.5px; line-height: 1.45; padding: 4px 0; }
#panel-send { width: 32px; height: 32px; border-radius: 10px; background: var(--o-e9692b, #e9692b); color: #fff; }
#panel-send:disabled { background: #ffffff1a; color: #c6cde0; }

/* Model choice and saved conversations in the side panel. */
.panel-model-row { position: relative; padding: 8px 12px 0; }
.panel-model { width: 100%; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid #ffffff1c; border-radius: 10px; background: #ffffff0a; color: inherit; font: inherit; font-size: 12.5px; text-align: left; }
.panel-model:hover, .panel-model[aria-expanded="true"] { background: #ffffff14; }
.panel-model-label { color: #97a2ba; }
.panel-model strong { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-model .icon { width: 13px; height: 13px; color: #b9c2d6; }
.panel-models { position: absolute; z-index: 2; left: 12px; right: 12px; top: calc(100% + 4px); max-height: 360px; overflow: auto; padding: 6px; border: 1px solid var(--glass-border); border-radius: 13px; background: var(--glass); box-shadow: var(--glass-shadow); animation: menu-in .15s var(--ease) both; }
.panel-models .model { width: 100%; display: grid; grid-template-columns: 18px 1fr; gap: 2px 8px; align-items: center; padding: 8px 9px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; text-align: left; }
.panel-models .model:hover { background: #ffffff14; }
.panel-models .model .icon { width: 14px; height: 14px; color: var(--o-ffb27a, #ffb27a); visibility: hidden; }
.panel-models .model[aria-selected="true"] .icon { visibility: visible; }
.panel-models .model strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.panel-models .model small { grid-column: 2; color: #97a2ba; font-size: 11.5px; }
.panel-models .group { margin: 8px 9px 3px; color: #97a2ba; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.panel-models .note { margin: 6px 9px 8px; color: #b9c2d6; font-size: 12px; line-height: 1.45; }
.panel-models .footer { display: flex; justify-content: flex-end; padding: 6px 4px 2px; border-top: 1px solid #ffffff12; margin-top: 4px; }
.panel-history { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 12px 0; }
.panel-history[hidden] { display: none; }
.panel-history-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; }
.panel-history-head strong { font-size: 13px; }
.panel-history-list { flex: 1; overflow: auto; display: grid; align-content: start; gap: 2px; }
.panel-history-item { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.panel-history-item:hover, .panel-history-item[aria-current="true"] { background: #ffffff10; }
.panel-history-item > button:first-child { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 9px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.panel-history-item strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-history-item small { color: #97a2ba; font-size: 11.5px; }
.panel-history-item .tool { opacity: 0; }
.panel-history-item:hover .tool, .panel-history-item .tool:focus-visible { opacity: 1; }
.panel-history-empty { margin: 20px 6px; color: #97a2ba; font-size: 12.5px; line-height: 1.5; }
.panel-message .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.panel-message .actions .action { margin-top: 0; }
.panel-message .hint { margin-top: 8px; color: #97a2ba; font-size: 12px; }

/* The interface itself is not selectable text, apart from fields and replies. */
body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable], .panel-message, .secret, .sheet code, .problem p { -webkit-user-select: text; user-select: text; }

/* Bookmarks bar under the address bar. */
:root.bookmarks-on { --bookmarks: 32px; }
.bookmarks-bar { height: var(--bookmarks); display: flex; align-items: center; gap: 2px; padding: 0 12px 4px; overflow: hidden; }
.bookmark { flex: none; max-width: 190px; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 9px 0 7px; border: 0; border-radius: 8px; background: none; color: #e4e7f1; font-size: 12px; }
.bookmark:hover, .bookmark[aria-expanded="true"] { background: #ffffff1f; }
.bookmark span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bookmark img { width: 14px; height: 14px; flex: none; border-radius: 3px; object-fit: contain; }
.bookmark .avatar { width: 15px; height: 15px; flex: none; font-size: 9px; border-radius: 4px; }
.bookmark.more { margin-left: auto; padding: 0 6px; }
.bookmark.more .icon { width: 15px; height: 15px; }
.bookmarks-empty { color: #a9b2c8; font-size: 12px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-site-light="true"] .bookmark { color: #1d2433; }
body[data-site-light="true"] .bookmarks-empty { color: #4b5468; }
#bookmarks-more { position: fixed; z-index: 4; max-height: min(420px, calc(100vh - 140px)); width: 260px; overflow: auto; padding: 6px; border-radius: 13px; animation: menu-in .15s var(--ease) both; }
#bookmarks-more .bookmark { width: 100%; max-width: none; height: 30px; }

/* Vertical tabs: the same tabs as the strip, in a column on the left. */
:root { --vertical-tabs: 220px; }
#vertical-tabs { position: fixed; left: 0; top: calc(var(--tabs) + var(--toolbar) + var(--bookmarks)); bottom: 0; width: var(--vertical-tabs);
  z-index: 2; padding: 8px 8px 12px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--glass-border); background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.vertical-tabs-on .tabs { display: none; }
.vertical-tabs-on main { margin-left: var(--vertical-tabs); }
.vtab { position: relative; flex: none; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 4px 0 9px; border-radius: 9px; color: #d9dbe6; cursor: default; }
.vtab:hover { background: #ffffff12; }
.vtab[aria-selected="true"] { background: #ffffff21; color: #fff; box-shadow: inset 0 1px #ffffff1a; }
.vtab .vtab-icon { width: 16px; height: 16px; flex: none; display: grid; place-items: center; }
.vtab .vtab-icon img { width: 16px; height: 16px; border-radius: 3px; object-fit: contain; }
.vtab .vtab-icon .icon { width: 14px; height: 14px; }
.vtab .vtab-title { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtab .tool { width: 24px; height: 24px; opacity: 0; }
.vtab .tool .icon { width: 12px; height: 12px; }
.vtab:hover .tool, .vtab[aria-selected="true"] .tool, .vtab .tool:focus-visible { opacity: 1; }
.vtab.pinned .vtab-title::after { content: " · fissata"; color: #97a2ba; }
.vtab-new { flex: none; display: flex; align-items: center; gap: 9px; height: 34px; margin-bottom: 6px; padding: 0 9px; border: 1px dashed #ffffff2a; border-radius: 9px; background: none; color: #c6cde0; font-size: 12.5px; }
.vtab-new:hover { background: #ffffff10; color: #fff; }
.vtab-new .icon { width: 14px; height: 14px; }
/* Nothing wider than the column: no sideways scrolling (0.5.28). */
#vertical-tabs > * { min-width: 0; max-width: 100%; }
.vgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 6px 0 2px; padding-left: 8px; border-left: 2px solid var(--group-color); }
.vgroup-title { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 4px; color: var(--group-color); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.vgroup-title small { color: #97a2ba; font-weight: 500; }
[data-group="orange"] { --group-color: var(--o-ffad75, #ffad75); }
[data-group="blue"] { --group-color: #8ec4ff; }
[data-group="green"] { --group-color: #7adcb4; }
[data-group="purple"] { --group-color: #c9a7ff; }
/* A tab in a group carries a short bar of the group's colour under its title. */
.tab[data-group]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--group-color); opacity: .85; pointer-events: none; }
.tab.pinned[data-group]::after { left: 15px; right: 15px; }
.private-window .tabbar { background: linear-gradient(90deg, #7656ae30, #7656ae12 60%, transparent); }
.private-badge { flex: none; align-self: center; display: grid; place-items: center; width: 28px; height: 28px; margin: 4px 2px 0 6px; border-radius: 9px; background: #8667bc52; color: #f8f2ff; animation: chip-in .3s var(--ease) both; }
.private-badge .icon { width: 16px; height: 16px; }
.private-badge[hidden] { display: none; }
@keyframes chip-in { from { opacity: 0; transform: scale(.85); } }

/* Dialogs for groups, profiles, extensions and synchronisation. */
#workspace-dialog { width: 440px; }
#workspace-dialog h1 { margin: 0 0 6px; }
.workspace-subtitle { margin: 0 0 14px; color: #c0c5d1; font-size: 13.5px; line-height: 1.45; }
.workspace-subtitle:empty { display: none; }
.workspace-colors { display: flex; gap: 10px; margin: 4px 0 14px; }
.workspace-colors[hidden] { display: none; }
dialog .workspace-colors label { display: block; margin: 0; cursor: pointer; }
.workspace-colors input { position: absolute; opacity: 0; pointer-events: none; }
.workspace-colors span { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--group-color); box-shadow: inset 0 0 0 2px #0003; transition: box-shadow .15s var(--ease), scale .15s var(--ease); }
.workspace-colors input:checked + span { box-shadow: 0 0 0 2px #3a3c45, 0 0 0 4px var(--group-color); }
.workspace-colors input:focus-visible + span { outline: 2px solid var(--o-ffc790, #ffc790); outline-offset: 4px; }
.workspace-items { display: grid; gap: 6px; margin: 2px 0 6px; }
.workspace-items:empty { display: none; }
.workspace-heading { margin: 8px 2px 0; color: #97a2ba; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.workspace-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 8px 7px 12px; border: 1px solid #ffffff1a; border-radius: 11px; background: #ffffff09; }
.workspace-row > .row-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.workspace-row strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-row small { color: #a7b1c6; font-size: 12px; }
.workspace-row .dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--group-color); }
.workspace-row .icon { width: 16px; height: 16px; flex: none; color: #c6cde0; }
.workspace-row .action { padding: 5px 11px; font-size: 12.5px; }
button.workspace-row { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.workspace-row:hover { background: #ffffff14; }
.workspace-new { display: flex; gap: 8px; margin-top: 4px; }
.workspace-new input { flex: 1; }
.workspace-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.workspace-status { margin: 8px 2px 14px; min-height: 0; color: #c6cde0; font-size: 12.5px; line-height: 1.4; }
.workspace-status:empty { display: none; }
#workspace-dialog .dialog-actions .extra { margin-right: auto; }
#workspace-dialog .dialog-actions { margin-top: 12px; }
.download-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.download-controls button { font-size: 12px; padding: 5px 10px; }
.download-progress { display: block; height: 4px; margin-top: 6px; border-radius: 3px; background: #ffffff18; overflow: hidden; }
.download-progress span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--o-ee7a3c, #ee7a3c), var(--o-ffb27a, #ffb27a)); transition: width .3s var(--ease); }

/* Tab groups: a tab of the group's colour with its name and the icons of its
   tabs. Hovered, it unfolds its tabs in the strip; the lock keeps them out. The
   selected tab of a group stays inside it. */
[data-group="split"] { --group-color: var(--o-ffc790, #ffc790); }
.tab-group { position: relative; flex: none; display: flex; align-items: flex-end; gap: 4px; height: 33px; animation: tab-in .28s var(--ease) both; }
/* The group's line: a piece under its name and one under each of its tabs, joined across the gaps between them. The
   open tab has none (its bubble is in the group's colours), so the line stops before it and goes on after it; each
   piece moves, grows and shrinks with its tab, and fades when its tab is opened or left. */
.tab-group :is(.group-head, .group-tabs .tab)::after { content: ""; position: absolute; left: -4px; right: 0; bottom: 1px; height: 2px; border-radius: 0; z-index: 1;
  background: var(--group-color); opacity: .85; pointer-events: none; transition: height .18s var(--ease), opacity .26s var(--ease), box-shadow .18s var(--ease); }
.tab-group .group-head::after { left: 6px; border-radius: 2px 0 0 2px; }
.tab-group .group-tabs .tab:last-child::after { right: 0; border-radius: 0 2px 2px 0; }
.tab-group:not([data-expanded="true"]):not([data-current="true"]) .group-head::after { right: 6px; border-radius: 2px; }
.tab-group .group-tabs .tab[data-selected="true"]::after { opacity: 0; }
/* The open tab of a group: its bubble in the group's colours, fading in over the white one as it is chosen. */
.tab-edge::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--group-color) 52%, transparent), color-mix(in srgb, var(--group-color) 20%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-color) 45%, transparent);
  transition: opacity .32s var(--ease); }
.tab-group .tab[data-selected="true"] .tab-edge::after { opacity: 1; }
.tab-group:is([data-current="true"], [data-expanded="true"]) :is(.group-head, .group-tabs .tab:not([data-selected="true"]))::after { opacity: 1; }
.tab-group.drop-target :is(.group-head, .group-tabs .tab:not([data-selected="true"]))::after { height: 3px; opacity: 1; box-shadow: 0 0 10px var(--group-color); }
.tab-group.drop-leave :is(.group-head, .group-tabs .tab)::after { opacity: .35; }
.group-head { position: relative; isolation: isolate; flex: none; align-self: stretch; display: flex; overflow: hidden; align-items: center; gap: 7px; max-width: 220px; padding: 0 10px 1px 11px; border: 0; background: none;
  color: color-mix(in srgb, var(--group-color) 70%, #fff); font-size: 12px; font-weight: 650; letter-spacing: .01em; }
.group-head::before { content: ""; position: absolute; inset: 3px 2px 4px; z-index: -1; border-radius: 9px; opacity: 0; background: #ffffff14; transition: opacity .15s var(--ease); }
.group-head:hover::before { opacity: 1; }
.group-head > .icon { width: 13px; height: 13px; flex: none; }
/* The name never shrinks while the head changes size: the icons after it are
   what the head clips. */
.group-name { flex: none; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-icons:empty { display: none; }
/* The head changes size at once and renderTabs animates it with the rest of the
   strip; only the opacity fades here. */
.group-icons { display: flex; align-items: center; gap: 5px; max-width: 110px; overflow: hidden; opacity: 1; transition: opacity .2s var(--ease); }
.group-icon { flex: none; display: grid; place-items: center; width: 16px; height: 16px; }
.group-icon img { width: 14px; height: 14px; border-radius: 3px; object-fit: contain; }
.group-icon .icon { width: 12px; height: 12px; color: #dfe4f0; }
.group-more { margin-left: 5px; font-size: 11px; color: #d6dceb; font-variant-numeric: tabular-nums; }
.tab-group[data-expanded="true"] .group-icons { max-width: 0; opacity: 0; margin-left: -7px; }
.group-lock { display: grid; place-items: center; width: 0; overflow: hidden; opacity: 0; transition: opacity .2s var(--ease); }
.group-lock .icon { width: 12px; height: 12px; }
.tab-group[data-locked="true"] .group-lock { width: 14px; opacity: 1; }
/* A group kept open shares the strip as the tabs outside it do: its name and its tabs become places of the strip
   itself (the box only groups them), so its tabs shrink exactly as theirs, never kept at full width (0.5.28). */
.tab-group[data-locked="true"], .tab-group[data-locked="true"] .group-tabs { display: contents; }
.tab-group[data-locked="true"] .group-tabs .tab { flex-shrink: 1; }
/* Its name keeps the height it has in its box (the strip is taller): it does not jump up when the group is locked. */
.tab-group[data-locked="true"] .group-head { align-self: flex-end; height: 33px; }
.group-tabs { flex: none; display: flex; align-items: flex-end; gap: 4px; }
.group-tabs:empty { display: none; }
.group-tabs .tab { flex-shrink: 0; }
.group-tabs .tab:last-child { margin-right: 2px; }
body[data-site-light="true"] .group-head { color: color-mix(in srgb, var(--group-color) 50%, #1b2232); }
.tab[hidden] { display: none !important; }
.tab.dragging { transition: none; }
.tab-dragging .tab-group { transition: box-shadow .15s var(--ease); }
.vgroup-title .icon { width: 13px; height: 13px; }

/* Drop on the pages: where the dragged tab will appear. */
.split-drop { position: fixed; z-index: 6; top: calc(var(--tabs) + var(--toolbar) + var(--bookmarks)); left: 0; right: var(--panel); bottom: 0; pointer-events: none; }
.vertical-tabs-on .split-drop { left: var(--vertical-tabs); }
.drop-zone { position: absolute; display: grid; place-items: center; border: 2px solid var(--o-ff9a5c, #ff9a5c); border-radius: 12px; background: color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 14.9%, transparent); color: #fff; font-size: 14px; font-weight: 650;
  text-shadow: 0 1px 6px #000a; box-shadow: inset 0 0 40px color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 20%, transparent); animation: drop-in .2s var(--ease) both; transition: left .2s var(--ease), top .2s var(--ease), width .2s var(--ease), height .2s var(--ease); }
@keyframes drop-in { from { opacity: 0; transform: scale(.97); } }

/* Side by side: the panes are the sites; above each one, in the interface, a
   bar to move it; in the gaps the dividers, and a ring around the pane that
   has the address bar. */
.split-layer { position: fixed; z-index: 0; top: calc(var(--tabs) + var(--toolbar) + var(--bookmarks)); left: 0; right: var(--panel); bottom: 0; overflow: hidden; }
.vertical-tabs-on .split-layer { left: var(--vertical-tabs); }
.split-pane { position: absolute; transition: left .22s var(--ease), top .22s var(--ease), width .22s var(--ease), height .22s var(--ease); }
.split-resizing .split-pane, .split-resizing .split-divider { transition: none; }
.split-pane::before { content: ""; position: absolute; inset: -4px; border: 2px solid transparent; border-radius: 12px 12px 4px 4px; pointer-events: none; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.split-pane[data-active="true"]::before { border-color: var(--o-ff9a5c, #ff9a5c); box-shadow: 0 0 10px -2px color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 56.5%, transparent); }
.split-pane.drop-target::before { border-color: var(--o-ffd0ad, #ffd0ad); border-style: dashed; }
.pane-head { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; border-radius: 9px 9px 0 0; background: linear-gradient(to bottom, #ffffff14, #ffffff0a);
  color: #c9cfde; font-size: 12px; cursor: grab; transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.pane-head:hover { background: #ffffff1c; }
.split-pane[data-active="true"] .pane-head { color: #fff; background: linear-gradient(to bottom, color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 22.7%, transparent), color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 11%, transparent)); }
.split-pane.drop-target .pane-head { background: color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 33.3%, transparent); color: #fff; }
.split-pane.lifted .pane-head { cursor: grabbing; transform: translateY(-1px); box-shadow: 0 6px 16px -6px #000c; }
.pane-dragging, .pane-dragging * { cursor: grabbing !important; }
.pane-grip { flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
.pane-grip img { width: 15px; height: 15px; border-radius: 3px; object-fit: contain; }
.pane-grip .icon { width: 13px; height: 13px; }
.pane-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-unlink { flex: none; height: 22px; padding: 0 8px; border: 1px solid #ffffff22; border-radius: 7px; background: none; color: var(--o-ffc790, #ffc790); font-size: 11px; opacity: 0; transition: opacity .15s var(--ease), background-color .15s var(--ease); }
.pane-unlink:hover { background: #ffffff14; }
.pane-close { width: 24px; height: 22px; opacity: 0; }
.pane-close .icon { width: 12px; height: 12px; }
.pane-head:hover .pane-unlink, .pane-head:hover .pane-close, .pane-head :focus-visible { opacity: 1; }
.split-divider { position: absolute; display: grid; place-items: center; z-index: 1; transition: left .22s var(--ease), top .22s var(--ease), height .22s var(--ease); }
.split-divider.split-column { width: 8px; margin-left: -4px; cursor: col-resize; }
.split-divider.split-row { left: 0; right: 0; height: 8px; margin-top: -4px; cursor: row-resize; }
.split-divider span { border-radius: 3px; background: #ffffff38; transition: background-color .15s var(--ease), scale .15s var(--ease); }
.split-divider.split-column span { width: 3px; height: 42px; }
.split-divider.split-row span { width: 42px; height: 3px; }
.split-divider:hover span, .split-divider.dragging span { background: var(--o-ffb27a, #ffb27a); scale: 1.15; }
.split-resizing.split-column, .split-resizing.split-column * { cursor: col-resize !important; }
.split-resizing.split-row, .split-resizing.split-row * { cursor: row-resize !important; }

/* Loading strip, at the bottom of the address bar. */
.address { position: relative; }
.address-progress { position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px; border-radius: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease) .12s; }
.address-progress span { display: block; height: 100%; width: 100%; border-radius: 2px; transform-origin: left; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--o-ee7a3c, #ee7a3c), var(--o-ff9a5c, #ff9a5c) 60%, var(--o-ffd2a8, #ffd2a8)); box-shadow: 0 0 6px color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 66.7%, transparent); transition: transform .35s var(--ease); }
.address-progress[data-state="loading"] { opacity: 1; transition-delay: 0s; }
.address-progress[data-state="done"] { opacity: 0; transition-delay: .18s; }
.address-progress[data-state=""] span { transition: none; }
body[data-site-light="true"] .address-progress span { background: linear-gradient(90deg, var(--o-d8641f, #d8641f), var(--o-f0823f, #f0823f) 60%, var(--o-ffb27a, #ffb27a)); }

/* Keyboard shortcuts in the settings. */
.settings-note { margin: -4px 4px 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.settings-note kbd { padding: 1px 6px; font-size: 11px; }
.key-list .key-heading { margin: 0; padding: 14px 18px 6px; color: #97a2ba; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.key-list .key-heading:not(:first-child) { border-top: 1px solid var(--line); }
.key-row { min-height: 46px; padding: 6px 12px 6px 18px; }
.key-row + .key-row { border-top: 1px solid var(--line); }
.key-heading + .key-row { border-top: 0; }
.key-row strong { font-size: 13.5px; font-weight: 520; }
.key-capture { flex: none; min-width: 96px; height: 30px; padding: 0 12px; border: 1px solid #ffffff24; border-bottom-width: 2px; border-radius: 8px; background: #ffffff0d; color: #eef0f7; font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.key-capture:hover { background: #ffffff17; }
.key-capture[data-empty="true"] { color: #8e98ad; letter-spacing: 0; border-style: dashed; border-bottom-width: 1px; }
.key-capture[data-recording="true"] { border-color: var(--o-ff9a5c, #ff9a5c); color: var(--o-ffd0ad, #ffd0ad); letter-spacing: 0; background: color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 12.2%, transparent); animation: key-pulse 1.2s ease-in-out infinite; }
@keyframes key-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 14.9%, transparent); } }
.key-undo { width: 28px; height: 28px; color: #aab3c8; }
.key-undo .icon { width: 14px; height: 14px; }
.key-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; }
.key-status { color: #c6cde0; font-size: 12.5px; line-height: 1.4; }

/* Panels that appear slide in. */
#vertical-tabs:not([hidden]) { animation: vtabs-in .24s var(--ease) both; }
@keyframes vtabs-in { from { opacity: 0; transform: translateX(-14px); } }
.bookmarks-bar:not([hidden]) { animation: bar-in .2s var(--ease) both; }
@keyframes bar-in { from { opacity: 0; transform: translateY(-4px); } }
.vgroup { animation: bar-in .2s var(--ease) both; }

/* Downloads: a ring of progress on the toolbar button, a token that jumps into
   it when a download starts, and the running downloads in its menu. */
#download-button { position: relative; }
.download-ring { position: absolute; inset: 2px 3.5px; width: calc(100% - 7px); height: calc(100% - 4px); pointer-events: none; opacity: 0; transform: rotate(-90deg); transition: opacity .25s var(--ease); }
.download-ring circle { fill: none; stroke-width: 2.4; }
.download-ring .track { stroke: #ffffff22; }
.download-ring .value { stroke: var(--o-ff9a5c, #ff9a5c); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .45s var(--ease); }
#download-button[data-active="true"] .download-ring { opacity: 1; }
#download-button[data-active="true"] { color: var(--o-ffc498, #ffc498); }
#download-button[data-active="true"] > .icon { scale: .78; }
#download-button[data-indeterminate="true"] .download-ring { animation: ring-spin 1.1s linear infinite; }
@keyframes ring-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
#download-button.download-flash { background: color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 20%, transparent); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 60%, transparent); }
.download-token { position: fixed; z-index: 20; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; pointer-events: none;
  background: linear-gradient(135deg, var(--o-ffb27a, #ffb27a), var(--o-ee7a3c, #ee7a3c)); color: #fff; box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--o-ee7a3c, #ee7a3c) 66.7%, transparent); }
.download-token .icon { width: 15px; height: 15px; stroke-width: 2.2; }
.dl-item { display: grid; gap: 6px; padding: 9px 8px 10px 10px; border-radius: 9px; }
.dl-item + .dl-item, .dl-done + .dl-item, .dl-item + .dl-done { margin-top: 2px; }
.dl-item:hover { background: #ffffff10; }
.dl-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dl-top > .icon { width: 16px; height: 16px; flex: none; color: var(--o-ffc498, #ffc498); }
.dl-item[data-state="paused"] .dl-top > .icon, .dl-item[data-state="stopped"] .dl-top > .icon { color: #d9dcec; }
.dl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dl-controls { flex: none; display: flex; gap: 2px; }
#tool-menu-content .dl-control { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 7px; }
#tool-menu-content .dl-control .icon { width: 13px; height: 13px; }
#tool-menu-content .dl-control[data-action="resume"] .icon { fill: currentColor; }
.dl-bar { position: relative; display: block; height: 4px; margin-left: 26px; border-radius: 3px; background: #ffffff22; overflow: hidden; }
.dl-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: linear-gradient(90deg, var(--o-ee7a3c, #ee7a3c), var(--o-ffb27a, #ffb27a)); transition: width .45s var(--ease); }
.dl-item[data-state="paused"] .dl-bar span { background: #c7cbe0; }
.dl-bar[data-indeterminate="true"] span { width: 30% !important; animation: bar-slide 1.2s ease-in-out infinite; }
@keyframes bar-slide { from { left: -30%; } to { left: 100%; } }
.dl-meta { margin-left: 26px; color: #b9c1d4; font-size: 11.5px; font-variant-numeric: tabular-nums; }
#tool-menu-content .dl-done small { margin-left: auto; padding-left: 10px; color: #c9cde0; font-size: 11.5px; flex: none; }

/* Settings: the wallpaper blurred behind glass panels; a side panel with the
   sections, each section headed by its icon, title and description. */
#preferences.sheet { position: relative; isolation: isolate; background: #16171b; overflow: hidden; padding: 26px 26px 0; }
#preferences.sheet::before { content: ""; position: fixed; z-index: -1; inset: calc(var(--tabs) + var(--toolbar) + var(--bookmarks)) var(--panel) 0 0; pointer-events: none;
  background: linear-gradient(180deg, #14151a80, #14151aa8 55%, #14151acc), var(--wallpaper-thumb) center / cover no-repeat; filter: blur(24px) saturate(1.2); transform: scale(1.12); }
.vertical-tabs-on #preferences.sheet::before { left: var(--vertical-tabs); }
#preferences .settings { height: 100%; grid-template-columns: 280px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 34px; max-width: 1180px; }
#preferences .settings-nav, #preferences .settings-content { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
#preferences .settings-nav { position: static; max-height: calc(100% - 26px); align-content: start; gap: 4px; padding: 22px 16px 18px; border: 1px solid #ffffff1c; border-radius: 24px;
  border-color: var(--glass-border); background: var(--glass); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.settings-brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 18px; font-size: 15px; font-weight: 650; color: #f3f0fa; }
.settings-brand img { width: 26px; height: 26px; }
#preferences .settings-nav h1 { margin: 0 8px 18px; font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
#preferences .settings-nav button { height: 44px; gap: 14px; padding: 0 14px; border-radius: 14px; font-size: 14.5px; color: #dfe3ee; transition: background-color .18s var(--ease), color .18s var(--ease); }
#preferences .settings-nav button .icon { width: 19px; height: 19px; color: #c8cfdf; transition: color .18s var(--ease); }
#preferences .settings-nav button:hover { background: #ffffff0f; }
#preferences .settings-nav button[aria-current="true"] { color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 30.2%, transparent), color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 12.2%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--o-ff9a5c, #ff9a5c) 20%, transparent), inset 0 1px #ffffff14; }
#preferences .settings-nav button[aria-current="true"] .icon { color: var(--o-ff9a5c, #ff9a5c); }
#preferences .settings-content { min-width: 0; align-content: start; gap: 34px; padding: 6px 8px 64px 0; }
.settings-head { display: flex; align-items: center; gap: 16px; margin: 0 0 14px 4px; }
.settings-head > .icon { width: 30px; height: 30px; flex: none; color: var(--o-ff9a5c, #ff9a5c); stroke-width: 1.6; }
.settings-head h2 { margin: 0 !important; font-size: 22px !important; font-weight: 650 !important; letter-spacing: -.01em !important; color: #f6f5fa !important; }
.settings-head p { margin: 2px 0 0; color: #b9c1d4; font-size: 13.5px; }
#preferences .card { border: 1px solid #ffffff1f; border-radius: 20px; background: linear-gradient(180deg, #ffffff12, #ffffff08); box-shadow: inset 0 1px #ffffff14, 0 22px 44px -30px #000d;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
#preferences .row { min-height: 66px; padding: 12px 22px; }
#preferences .row + .row, #preferences .key-row + .key-row { border-top-color: #ffffff12; }
#preferences .row-text strong { font-size: 14.5px; font-weight: 600; }
#preferences .row-text small { color: #b4bccf; font-size: 13px; }
#preferences .range-control { display: flex; align-items: center; gap: 12px; width: min(240px, 45%); }
#preferences .range-control input[type=range] { flex: 1; min-width: 0; width: 100%; height: 28px; margin: 0; accent-color: var(--o-ff9a5c, #ff9a5c); cursor: pointer; }
#preferences .range-control output { min-width: 4ch; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
#preferences .range-control:has(input:disabled) { opacity: .45; }
#preferences .range-control input:disabled { cursor: default; }
#preferences .action { padding: 9px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500; }
#preferences select, #preferences .row input[type=url] { height: 40px; border-radius: 11px; border-color: var(--glass-well-border); background-color: var(--glass-well); font-size: 13.5px; }
#preferences select { min-width: 140px; padding: 0 40px 0 16px; background-position: right 15px center; }
#preferences .row input[type=url] { width: min(440px, 48%); padding: 0 16px; }
#preferences input.switch { width: 52px; height: 30px; border-radius: 15px; background: radial-gradient(circle, #fff 0 11px, transparent 11.5px) no-repeat 3px 50% / 24px 24px, #ffffff26; }
#preferences input.switch:checked { background-color: var(--o-f07a35, #f07a35); background-image: radial-gradient(circle, #fff 0 11px, transparent 11.5px), linear-gradient(180deg, var(--o-ff9550, #ff9550), var(--o-e9692b, #e9692b)); background-size: 24px 24px, auto; background-position: 25px 50%, 0 0; }
#preferences .key-list .key-heading { padding: 16px 22px 6px; }
#preferences .key-row { padding: 8px 14px 8px 22px; min-height: 52px; }
.settings-group, .settings-head { scroll-margin-top: 24px; }
#preferences [data-search-hidden] { display: none !important; }
.settings-search { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 12px; min-height: 42px; border: 1px solid var(--glass-well-border); border-radius: 12px; background: var(--glass-well); }
.settings-search .icon { width: 18px; height: 18px; flex: none; }
.settings-search input { min-width: 0; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; outline: none; }
.settings-search:focus-within { border-color: var(--o-f0b684, #f0b684); }
.settings-search-status { margin: 0 8px 10px; color: #b9c1d4; font-size: 12px; }
#preferences .settings-nav button[hidden] { display: none; }
.settings-submenu > summary, .permission-site > summary { cursor: pointer; list-style: none; }
.settings-submenu summary::-webkit-details-marker { display: none; }
.submenu-arrow { flex: none; font-size: 24px; transition: transform .15s; }
details[open] > summary > .submenu-arrow { transform: rotate(90deg); }
.permission-manager { display: flex; flex-direction: column; max-height: min(480px, 60vh); overflow: hidden; border-top: 1px solid #ffffff12; }
.permission-search { display: block; flex: none; padding: 12px 22px; border-bottom: 1px solid #ffffff12; }
.permission-search input { width: 100%; }
#permission-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.permission-site + .permission-site, .permission-site > div > .row { border-top: 1px solid #ffffff12; }
.permission-site > div { padding-left: 18px; }
.permission-site .row-text { min-width: 0; overflow-wrap: anywhere; }
.permission-empty { margin: 0; padding: 18px 22px; color: #b9c1d4; }

/* Wallpapers. */
.wallpapers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 18px 20px 20px; }
.wallpaper { position: relative; display: grid; gap: 8px; margin: 0; cursor: pointer; color: #dfe3ee; font-size: 12.5px; }
.wallpaper input { position: absolute; opacity: 0; pointer-events: none; }
.wallpaper .preview { position: relative; aspect-ratio: 16 / 9; border-radius: 13px; background-size: cover; background-position: center; box-shadow: 0 0 0 1px #ffffff1f, 0 10px 22px -14px #000c;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.wallpaper:hover .preview { transform: translateY(-2px); }
.wallpaper input:checked + .preview { box-shadow: 0 0 0 2px #16171b, 0 0 0 4px var(--o-ff9a5c, #ff9a5c), 0 12px 26px -14px color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 60%, transparent); }
.wallpaper input:checked + .preview::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--o-ff9a5c, #ff9a5c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat; box-shadow: 0 2px 6px #0008; animation: chip-in .2s var(--ease) both; }
.wallpaper input:focus-visible + .preview { outline: 2px solid var(--o-ffc790, #ffc790); outline-offset: 4px; }
.wallpaper span:last-child { padding-left: 2px; }
.wallpaper input:checked ~ span:last-child { color: #fff; font-weight: 600; }
@media (max-width: 860px) {
  #preferences .settings { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
  #preferences .settings-nav { max-height: min(160px, 32vh); padding: 12px; }
}

/* ---- Players in the toolbar (player.js) ---------------------------------------- */
.player-dock { display: flex; align-items: center; gap: 2px; flex: none; height: 36px; border-radius: 12px; transition: width .2s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease); }
.player-dock[data-empty="true"] { width: 0; margin-left: -8px; }
/* While a tab that plays is dragged: the slot where it can be dropped. */
.player-dragging .player-dock[data-empty="true"] { width: 40px; margin-left: 0; }
.player-dragging .player-dock { box-shadow: inset 0 0 0 1.5px #ffffff38; background: #ffffff10; }
.player-dock.drop-target { box-shadow: inset 0 0 0 2px var(--o-f0b684, #f0b684); background: color-mix(in srgb, var(--o-f0b684, #f0b684) 14.9%, transparent); }
.player-icon { position: relative; width: 34px; height: 30px; touch-action: none; }
.player-icon.dragging { z-index: 4; transition: none; opacity: .85; cursor: grabbing; }
.player-favicon { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }
svg.player-favicon { width: 16px; height: 16px; }
/* Three small bars while it plays. */
.player-bars { position: absolute; right: 3px; bottom: 3px; width: 9px; height: 8px; display: none;
  background: linear-gradient(var(--o-f0b684, #f0b684), var(--o-f0b684, #f0b684)) 0 100% / 2px 60% no-repeat, linear-gradient(var(--o-f0b684, #f0b684), var(--o-f0b684, #f0b684)) 3.5px 100% / 2px 100% no-repeat, linear-gradient(var(--o-f0b684, #f0b684), var(--o-f0b684, #f0b684)) 7px 100% / 2px 40% no-repeat;
  animation: player-bars .9s ease-in-out infinite alternate; }
.player-icon[data-playing="true"] .player-bars { display: block; }
@keyframes player-bars { to { background-size: 2px 100%, 2px 35%, 2px 90%; } }
body[data-reduce-motion="true"] .player-bars { animation: none; }
/* Unread messages (WhatsApp): a small count on the icon. */
.player-badge { position: absolute; top: -3px; right: -2px; min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box; border-radius: 8px;
  font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center; color: #062d17; background: #25d366; pointer-events: none; }
/* WhatsApp's panel (player.js renderChatMenu): chats in a row, the open chat, the answer. */
.chat-panel { gap: 8px; }
.chat-strip { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chat-strip::-webkit-scrollbar { display: none; }
#tool-menu .chat-chip { flex: none; display: grid; justify-items: center; gap: 4px; width: 58px; height: auto; padding: 6px 2px; border-radius: 12px; scroll-snap-align: start; }
#tool-menu .chat-chip[data-open="true"] { background: #25d3661f; box-shadow: inset 0 0 0 1px #25d36659; }
.chat-avatar { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 14px; font-weight: 700; color: #0d1420; }
#tool-menu .chat-chip .chat-avatar { overflow: visible; }
.chat-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-avatar b { position: absolute; top: -3px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; font-size: 9.5px;
  line-height: 16px; color: #062d17; background: #25d366; box-shadow: 0 0 0 2px #222b45; }
.chat-name { width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; text-align: center; color: #d8dcea; }
.chat-head { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 13.5px; font-weight: 650; color: #f3f0fa; padding: 0 2px 0 4px; }
.chat-head-text { display: grid; flex: 1; min-width: 0; }
.chat-head-name, .chat-presence { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-head-name { font-weight: 650; }
.chat-presence { font-size: 10.5px; font-weight: 450; opacity: .7; }
.chat-presence[data-typing="true"] { color: #25d366; opacity: 1; }
.chat-head-actions { display: flex; flex: none; gap: 2px; }
.chat-head-actions[hidden] { display: none; }
#tool-menu[data-light="true"] .chat-name { color: #3b4a54; }
#tool-menu[data-light="true"] .chat-head { color: #111b21; }
.chat-thread { display: flex; flex-direction: column; gap: 4px; height: 300px; overflow-y: auto; padding: 8px; border-radius: 12px; background: var(--chat-thread, #0b141a);
  overscroll-behavior: contain; box-shadow: inset 0 0 0 1px #ffffff0d; }
.chat-bubble { position: relative; display: grid; gap: 2px; max-width: 82%; padding: 5px 8px 4px; border-radius: 9px; background: var(--chat-in, #202c33); color: var(--chat-ink, #e9edef);
  font-size: 12.5px; line-height: 1.38; align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: 0 1px .5px #0b141a21; }
.chat-bubble[data-out="true"] { align-self: flex-end; background: var(--chat-out, #005c4b); }
.chat-quote { padding: 3px 7px; border-left: 3px solid #25d366; border-radius: 5px; background: #0000001f; font-size: 11px; opacity: .85;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.chat-author { font-size: 11px; font-weight: 650; color: #53bdeb; }
.chat-kind { font-size: 11px; color: #aebac1; }
.chat-time { justify-self: end; font-size: 10px; color: #aebac1cc; }
.chat-system { align-self: center; margin: 4px 0; padding: 2px 8px; border-radius: 7px; font-size: 10.5px; color: var(--chat-ink, #aebac1); background: var(--chat-in, #182229); opacity: .85; }
#tool-menu[data-light="true"] .chat-compose textarea { color: #111b21; background: #0000000a; border-color: #0000001f; }
#tool-menu[data-light="true"] .chat-time, #tool-menu[data-light="true"] .chat-kind { color: #667781; }
.chat-compose { display: flex; align-items: flex-end; gap: 6px; }
.chat-compose[hidden] { display: none; }
.chat-compose textarea { flex: 1; min-width: 0; min-height: 34px; max-height: 110px; padding: 8px 10px; box-sizing: border-box; resize: none; border-radius: 10px;
  border: 1px solid #ffffff1f; background: #ffffff12; color: #f3f0fa; font: inherit; font-size: 13px; line-height: 1.35; outline: none; }
.chat-compose textarea:focus { border-color: #25d366; }
#tool-menu .chat-compose .chat-send { flex: none; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; background: #25d366; }
#tool-menu .chat-compose .chat-send .icon { color: #062d17; }
.chat-compose[data-busy="true"] .chat-send { opacity: .5; }
#tool-menu .chat-compose .chat-attach { flex: none; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.chat-compose .chat-attach .icon { width: 18px; height: 18px; }
#tool-menu .chat-compose .chat-smile { flex: none; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.chat-compose .chat-smile .icon { width: 19px; height: 19px; }
#tool-menu .chat-compose .chat-smile[aria-expanded="true"] { background: #25d3661f; }
#tool-menu .chat-compose .chat-smile[aria-expanded="true"] .icon { color: #25d366; }
/* Emoji and stickers above the box (player.js renderChatPicker). */
.chat-picker { display: grid; gap: 6px; padding: 6px; border-radius: 12px; background: var(--chat-thread, #0b141a); box-shadow: inset 0 0 0 1px #ffffff0d; }
.chat-picker[hidden] { display: none; }
.chat-picker-tabs { display: flex; gap: 4px; }
#tool-menu .chat-picker-tabs button { flex: 1; height: 28px; padding: 0; justify-content: center; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--chat-ink, #e9edef); opacity: .7; }
#tool-menu .chat-picker-tabs button[aria-selected="true"] { opacity: 1; background: #25d3661f; color: #25d366; }
.chat-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 2px; max-height: 196px; overflow-y: auto; overscroll-behavior: contain; }
.chat-picker-grid[data-mode="sticker"] { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 4px; }
.chat-picker-group { grid-column: 1 / -1; padding: 6px 4px 2px; font-size: 10.5px; font-weight: 650; color: var(--chat-ink, #aebac1); opacity: .6; }
#tool-menu .chat-picker .chat-emoji { width: auto; height: 34px; padding: 0; justify-content: center; border-radius: 8px; font-size: 21px; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
#tool-menu .chat-picker .chat-sticker { width: auto; height: 72px; padding: 4px; justify-content: center; border-radius: 10px; }
.chat-sticker img { width: 100%; height: 100%; object-fit: contain; }
.chat-sticker[data-busy="true"] { opacity: .45; }
.chat-picker-note { grid-column: 1 / -1; margin: 18px 8px; text-align: center; font-size: 12px; color: var(--chat-ink, #aebac1); opacity: .75; }
#tool-menu[data-light="true"] .chat-picker { box-shadow: inset 0 0 0 1px #0000001a; }
/* With the picker open the messages give it room; with no chat open there is nothing to write in. */
.chat-panel:has(.chat-picker:not([hidden])) .chat-thread { height: 180px; }
.chat-panel:has(.chat-compose[hidden]) .chat-picker { display: none; }
/* The file chosen for the next message (player.js renderChatFile). */
.chat-file { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 10px; background: #25d3661f; font-size: 12px; }
.chat-file[hidden] { display: none; }
.chat-file span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#tool-menu .chat-file button { flex: none; width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; }
/* Photos and stickers of the messages, drawn by the page as small pictures. */
.chat-image { display: block; max-width: 100%; max-height: 220px; border-radius: 6px; object-fit: cover; }
.chat-bubble:has(.chat-image) { padding: 3px 3px 4px; }
.chat-bubble:has(.chat-image) .chat-text, .chat-bubble:has(.chat-image) .chat-time { padding: 0 5px; }
.chat-bubble[data-sticker="true"] { background: none; box-shadow: none; padding: 0; }
.chat-bubble[data-sticker="true"] .chat-image { width: 110px; height: 110px; object-fit: contain; border-radius: 0; }
/* An icon of the dock dragged over the tabs: the gap where it becomes a tab again (player.js showReturnMark). */
.player-return-mark { position: fixed; z-index: 30; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--o-f0b684, #f0b684);
  box-shadow: 0 0 10px color-mix(in srgb, var(--o-f0b684, #f0b684) 70.2%, transparent); pointer-events: none; animation: return-mark-in .14s var(--ease) both; transition: left .12s var(--ease); }
.player-return-mark[hidden] { display: none; }
@keyframes return-mark-in { from { opacity: 0; transform: scaleY(.4); } }

/* Opening, like an island: under its icon the player appears as a small pill the size of the
   icon (--player-origin, browser.js syncMenuRect), stretches into a bar as wide as the player and
   then unrolls downwards with a slight spring; its shadow arrives last, a light sweeps across the
   glass and the contents rise into focus one after the other. Closing goes back the same way:
   bar, pill, into the icon. */
#tool-menu[data-kind="player"] {
  --player-origin: 50%;
  --player-pill: inset(0 calc(100% - var(--player-origin) - 17px) calc(100% - 30px) calc(var(--player-origin) - 17px) round 15px);
  --player-bar: inset(0 0 calc(100% - 46px) 0 round 18px);
  --player-full: inset(0 0 0 0 round 18px);
  --player-open: inset(-44px -44px -44px -44px round 62px);
  width: min(340px, calc(100vw - 20px)); transform-origin: var(--player-origin) 0;
  animation: player-in .72s linear both; }
#tool-menu[data-kind="player"][data-closing="true"] { animation: player-out .27s linear both; }
@keyframes player-in {
  0% { opacity: 0; clip-path: var(--player-pill); transform: translateY(-8px); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  14% { opacity: 1; clip-path: var(--player-pill); transform: none; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
  38% { clip-path: var(--player-bar); transform: scaleX(1.015); animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  74% { clip-path: var(--player-full); transform: scaleY(1.018); animation-timing-function: cubic-bezier(.4, 0, .4, 1); }
  86% { clip-path: var(--player-full); transform: scaleY(.996); }
  100% { opacity: 1; clip-path: var(--player-open); transform: none; }
}
@keyframes player-out {
  0% { opacity: 1; clip-path: var(--player-full); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  48% { clip-path: var(--player-bar); animation-timing-function: cubic-bezier(.5, 0, .3, 1); }
  82% { opacity: 1; clip-path: var(--player-pill); }
  100% { opacity: 0; clip-path: var(--player-pill); transform: translateY(-6px) scale(.9); }
}
/* The light on the glass, once, while it opens. */
#tool-menu[data-kind="player"]::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .16) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0; animation: player-shine .9s cubic-bezier(.3, 0, .2, 1) .42s both; }
#tool-menu[data-kind="player"][data-closing="true"]::before { animation: none; opacity: 0; }
@keyframes player-shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }
/* The contents rise into focus after the bar has unrolled; on closing they go first. */
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > * { animation: player-part .5s cubic-bezier(.2, .8, .2, 1) both; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :nth-child(1) { animation-delay: .2s; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :nth-child(2) { animation-delay: .26s; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :nth-child(3) { animation-delay: .31s; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :nth-child(4) { animation-delay: .35s; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :nth-child(5) { animation-delay: .39s; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :nth-child(n+6) { animation-delay: .43s; }
@keyframes player-part { from { opacity: 0; transform: translateY(8px) scale(.97); filter: blur(5px); } }
#tool-menu[data-kind="player"][data-closing="true"] .player-panel, #tool-menu[data-kind="player"][data-closing="true"] h2 { opacity: 0; transition: opacity .09s; }
/* The cover comes out of a blur and settles, with a breath of the site's colour behind it. */
#tool-menu[data-kind="player"]:not([data-closing]) .player-now .player-art { animation: player-cover .7s cubic-bezier(.2, .8, .2, 1) .22s both; }
@keyframes player-cover {
  0% { opacity: 0; transform: scale(.7); filter: blur(8px); box-shadow: 0 0 0 0 color-mix(in srgb, var(--player-accent, var(--o-ff7a1a, #ff7a1a)) 0%, transparent); }
  45% { opacity: 1; transform: scale(1.05); filter: blur(0); box-shadow: 0 0 26px 2px color-mix(in srgb, var(--player-accent, var(--o-ff7a1a, #ff7a1a)) 55%, transparent); }
  100% { transform: none; }
}
/* Collections and results come one after the other (--i, player.js). */
.player-collection, .player-result { animation: player-item .38s cubic-bezier(.22, 1, .36, 1) calc(var(--i, 0) * 28ms) both; }
@keyframes player-item { from { opacity: 0; transform: translateY(6px) scale(.92); } }
/* The icon answers the click with a ripple. */
.player-icon[aria-expanded="true"]::after { content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  animation: player-ripple .5s ease-out both; box-shadow: 0 0 0 0 color-mix(in srgb, var(--player-accent, var(--o-ff7a1a, #ff7a1a)) 65%, transparent); }
@keyframes player-ripple { to { box-shadow: 0 0 0 12px transparent; } }
body[data-reduce-motion="true"] #tool-menu[data-kind="player"], body[data-reduce-motion="true"] #tool-menu[data-kind="player"] *,
body[data-reduce-motion="true"] #tool-menu[data-kind="player"]::before,
body[data-reduce-motion="true"] .player-icon::after { animation-duration: .01s !important; animation-delay: 0s !important; }
/* The site's colours (player.js applyPlayerTheme): its player's background, its accent, a glow of the cover. */
#tool-menu[data-kind="player"][data-themed="true"] { --player-tint-mix: color-mix(in srgb, var(--player-tint, var(--player-bg)) 55%, var(--player-bg));
  background: linear-gradient(180deg, var(--player-tint-mix) 0%, var(--player-bg) 70%); border-color: color-mix(in srgb, var(--player-bg) 70%, #fff 18%); }
#tool-menu[data-kind="player"][data-light="true"], #tool-menu[data-kind="player"][data-light="true"] h2 { color: #141414; }
#tool-menu[data-kind="player"][data-light="true"] .player-words strong { color: #111; }
#tool-menu[data-kind="player"][data-light="true"] .player-words span, #tool-menu[data-kind="player"][data-light="true"] .player-progress { color: #555; }
#tool-menu[data-kind="player"][data-light="true"] #tool-menu-content button { color: #222; }
#tool-menu[data-kind="player"][data-light="true"] #tool-menu-content button .icon { color: #333; }
#tool-menu[data-kind="player"][data-light="true"] .player-search { background: #0000000d; border-color: #0000001f; }
#tool-menu[data-kind="player"][data-light="true"] .player-search input { color: #111; }
#tool-menu[data-kind="player"][data-light="true"] .player-footer { border-top-color: #0000001a; }
#tool-menu[data-kind="player"][data-light="true"] .player-shelf button, #tool-menu[data-kind="player"][data-light="true"] .player-result-blank { background: #0000000f; }
#tool-menu[data-kind="player"] .player-progress input { accent-color: var(--player-accent, var(--o-f0b684, #f0b684)); }
#tool-menu[data-kind="player"] .player-controls .player-main { background: var(--player-accent, #f3f0fa); }
#tool-menu[data-kind="player"] .player-controls .player-main .icon, #tool-menu[data-kind="player"] .player-controls .player-main:hover .icon { color: var(--player-accent-ink, #1b233f); }
#tool-menu[data-kind="player"] .player-controls .player-main:hover { background: var(--player-accent, #fff); filter: brightness(1.08); }
#tool-menu[data-kind="player"] .player-search:focus-within { border-color: var(--player-accent, var(--o-f0b684, #f0b684)); }
.player-panel { display: grid; gap: 10px; padding: 4px 6px 2px; }
.player-now { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.player-art { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #ffffff12; box-shadow: 0 4px 14px #0007; }
svg.player-art { padding: 18px; box-sizing: border-box; }
.player-words { display: grid; gap: 3px; min-width: 0; }
.player-words strong { font-size: 14px; font-weight: 650; color: #f3f0fa; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.player-words span { font-size: 12.5px; color: #b9c1d4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-progress { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 11.5px; color: #b9c1d4; font-variant-numeric: tabular-nums; }
/* Position and buttons, with the volume upright beside them: from the bar down to the foot of the play button. */
.player-transport { display: grid; grid-template-columns: minmax(0, 1fr) 24px; column-gap: 10px; row-gap: 10px; align-items: center; }
.player-transport .player-progress, .player-transport .player-controls { grid-column: 1; }
.player-volume { --level: 1; grid-column: 2; grid-row: 1 / 3; align-self: stretch; position: relative; display: flex; justify-content: center;
  padding: 5px 0; cursor: ns-resize; touch-action: none; outline: none; color: inherit; }
.player-volume-track { position: relative; width: 5px; height: 100%; border-radius: 3px; background: color-mix(in srgb, currentColor 20%, transparent);
  transition: width .16s var(--ease); }
.player-volume-fill { position: absolute; inset: auto 0 0; height: calc(var(--level) * 100%); border-radius: inherit; background: var(--player-accent, var(--o-f0b684, #f0b684)); }
.player-volume-knob { position: absolute; left: 50%; bottom: calc(var(--level) * 100%); width: 13px; height: 13px; margin: 0 0 -6.5px -6.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 5px #0007; transform: scale(0); transition: transform .16s var(--ease); }
.player-volume:hover .player-volume-track, .player-volume.adjusting .player-volume-track, .player-volume:focus-visible .player-volume-track { width: 7px; }
.player-volume:hover .player-volume-knob, .player-volume.adjusting .player-volume-knob, .player-volume:focus-visible .player-volume-knob { transform: scale(1); }
.player-volume[data-unknown="true"] .player-volume-fill { opacity: .45; }
.player-volume-level { position: absolute; right: calc(50% + 13px); bottom: calc(5px + var(--level) * (100% - 10px)); padding: 3px 7px; border-radius: 8px;
  font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff; background: #151518; border: 1px solid #ffffff1f; z-index: 1;
  box-shadow: 0 2px 10px #0006; pointer-events: none; opacity: 0; transform: translate(4px, 50%) scale(.85); transition: opacity .16s var(--ease), transform .16s var(--ease); }
.player-volume.adjusting .player-volume-level { opacity: 1; transform: translate(0, 50%) scale(1); }
.player-progress input { width: 100%; accent-color: var(--o-f0b684, #f0b684); margin: 0; }
.player-controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
#tool-menu .player-controls button { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
#tool-menu .player-controls .player-main { width: 46px; height: 46px; background: #f3f0fa; color: #1b233f; }
#tool-menu .player-controls button:disabled { opacity: .35; }
.player-controls .icon { width: 18px; height: 18px; }
#tool-menu .player-controls .player-main .icon { width: 20px; height: 20px; color: #1b233f; fill: currentColor; stroke-width: 2.4; }
/* Shuffle and repeat at the sides (player.js paintModes): the site's accent and a dot when on, as on Spotify. */
.player-controls:has(.player-shuffle) { gap: 8px; }
#tool-menu .player-controls .player-shuffle, #tool-menu .player-controls .player-repeat { position: relative; width: 34px; height: 34px; }
#tool-menu .player-controls [data-absent="true"] { visibility: hidden; }
.player-controls .player-shuffle .icon, .player-controls .player-repeat .icon { width: 17px; height: 17px; }
#tool-menu[data-kind="player"] #tool-menu-content .player-controls .player-button[data-on="true"] .icon { color: var(--player-accent, var(--o-f0b684, #f0b684)); }
.player-controls .player-button[data-on="true"]::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--player-accent, var(--o-f0b684, #f0b684)); }
/* The next song: one quiet line under the buttons. */
#tool-menu .player-following { display: flex; align-items: baseline; gap: 8px; width: 100%; height: auto; min-height: 28px; padding: 4px 8px; border-radius: 9px;
  justify-content: flex-start; text-align: left; font-size: 12.5px; background: #ffffff0a; }
#tool-menu .player-following[hidden] { display: none; }
.player-following small { flex: none; font-size: 10.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--player-accent, var(--o-f0b684, #f0b684)); }
.player-following-words { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#tool-menu[data-kind="player"][data-light="true"] .player-following { background: #0000000a; }
.player-shelf { display: flex; flex-wrap: wrap; gap: 6px; }
.player-shelf:empty { display: none; }
#tool-menu .player-shelf button { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 9px; overflow: hidden; background: #ffffff14; font-size: 15px; font-weight: 650; }
.player-shelf img { width: 100%; height: 100%; object-fit: cover; }
.player-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; background: #ffffff12; border: 1px solid #ffffff1f; }
.player-search:focus-within { border-color: var(--o-f0b684, #f0b684); }
.player-search .icon { width: 14px; height: 14px; color: #b9c1d4; flex: none; }
.player-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #f3f0fa; font: inherit; font-size: 13px; }
.player-results { display: grid; gap: 1px; max-height: 260px; overflow: auto; }
.player-results:empty { display: none; }
#tool-menu .player-results button { height: auto; min-height: 44px; padding: 4px 8px; gap: 10px; }
.player-result img, .player-result-blank { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: #ffffff12; }
.player-result > span { display: grid; min-width: 0; }
.player-result strong { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-result small { font-size: 11.5px; color: #b9c1d4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-footer { display: flex; gap: 4px; border-top: 1px solid #ffffff1a; padding-top: 6px; }
#tool-menu .player-footer button { flex: 1 1 auto; height: 34px; gap: 8px; padding: 0 10px; font-size: 12.5px; justify-content: center; }
#tool-menu .player-footer button span { overflow: visible; }
#tool-menu[data-kind="player"] #tool-menu-content button.player-main .icon { color: var(--player-accent-ink, #1b233f); }

/* Under a setting: why it cannot work here (Windows audio border, browser.js). */
.setting-note { margin: -4px 14px 10px; font-size: 12px; line-height: 1.45; color: var(--o-ffb27a, #ffb27a); }

/* A tab the window keeps (the trial on the site): no close button. */
.tab[data-locked="true"] > .tool { display: none; }

/* Fields and wells as matte grey glass (--glass-well): a bright top edge, a darker bottom one. */
dialog input:not([type=checkbox]):not([type=radio]), dialog textarea, dialog select, .sheet select, .row input[type=url], .vault-form input, .secret, .fill-plan label, .panel-compose,
.settings-content input:not([type="checkbox"]), .settings-content textarea, .shot-stage, .shot-modes, .twin-controls textarea, .together-pane-preview {
  border-color: var(--glass-well-border); box-shadow: var(--glass-well-shadow); }
dialog input:focus, dialog textarea:focus, .row input[type=url]:focus, .vault-form input:focus, .settings-content input:focus, .settings-content textarea:focus { border-color: var(--o-f0b684, #f0b684); }
/* Buttons and fields stay minimal: a thin ring when focused from the keyboard, no frame inside the field. */
.action:focus-visible, .dialog-actions button:focus-visible { outline: 1.5px solid color-mix(in srgb, var(--o-ffc790, #ffc790) 70.2%, transparent); outline-offset: 2px; }
dialog input:not([type=checkbox]):not([type=radio]):focus-visible, .settings-content input:focus-visible { outline: none; }
/* Headings with an icon (the tools' dialogs, the sheets, the sections of the settings): the icon and the title on
   one line, the description below across the whole width. */
#workspace-dialog header.workspace-header, #workspace-dialog[data-tool] header.workspace-header, .sheet-head, .settings-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center; }
:is(.workspace-header, .sheet-head, .settings-head) > div { display: contents; }
:is(.workspace-header, .sheet-head, .settings-head) :is(h1, h2) { grid-column: 2; grid-row: 1; margin: 0; }
:is(.workspace-header, .sheet-head, .settings-head) > div > p { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.workspace-header > .workspace-mark[hidden] + div h1 { grid-column: 1 / -1; }
.sheet-head > .sheet-search { grid-column: 3; grid-row: 1; width: min(260px, 40vw); }
.sheet-head > .sheet-icon { width: 40px; height: 40px; border-radius: 12px; }
.settings-head > .icon { width: 26px; height: 26px; }
/* The title centred on its icon (one line, no extra leading), 2px larger than before. */
:is(.workspace-header, .sheet-head, .settings-head) :is(h1, h2) { align-self: center; line-height: 1.15; }
:is(.workspace-header, .sheet-head, .settings-head) > :is(.workspace-mark, .sheet-icon, .icon) { align-self: center; }
#workspace-dialog header.workspace-header h1, #workspace-dialog[data-tool] header.workspace-header h1 { margin: 0; font-size: 22px; }
.sheet .sheet-head h1 { font-size: 28px; }
.settings-head h2 { font-size: 24px !important; line-height: 1.15 !important; }

/* WhatsApp reply preview and the video requested from the open conversation. */
.chat-reply, .chat-video-pane { min-width: 0; border-radius: 8px; padding: 5px 8px; background: var(--chat-thread, #0b141a); color: var(--chat-ink, #e9edef); }
.chat-reply[hidden], .chat-video-pane[hidden] { display: none; }
.chat-reply, .chat-video-pane > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-reply { border-left: 3px solid #25d366; font-size: 12px; }
.chat-reply > div { min-width: 0; }
.chat-reply small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
#tool-menu :is(.chat-reply, .chat-video-pane) button { flex: none; width: 28px; height: 28px; padding: 0; justify-content: center; }
.chat-video-pane { display: grid; gap: 4px; font-size: 12px; }
.chat-video-pane p { margin: 3px 0; }
.chat-video-pane video { width: 100%; max-height: 210px; background: #000; border-radius: 6px; }
.chat-panel:has(.chat-video-pane:not([hidden])) .chat-thread { height: 160px; }
#tool-menu .chat-video-open { display: flex; flex-wrap: wrap; min-height: 26px; height: auto; gap: 5px; padding: 4px; color: inherit; }
.chat-video-open img { width: 100%; max-height: 120px; object-fit: contain; }

/* WhatsApp: filters and search, a chat's and a message's menu, ticks, reactions, voice messages, recording. */
#tool-menu[data-kind="player"]:has(.chat-panel) { width: min(340px, calc(100vw - 20px)); }
.chat-panel { position: relative; }
.chat-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
.chat-filters { display: flex; flex: 1; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.chat-filters::-webkit-scrollbar { display: none; }
.chat-filters[hidden] { display: none; }
#tool-menu .chat-filters button { flex: none; width: auto; height: 26px; padding: 0 10px; justify-content: center; border-radius: 13px; font-size: 11.5px; font-weight: 600;
  color: var(--chat-ink, #e9edef); background: #ffffff0f; transition: background .18s var(--ease), color .18s var(--ease); }
#tool-menu .chat-filters button[aria-selected="true"] { color: #25d366; background: #25d36624; }
#tool-menu[data-light="true"] .chat-filters button { background: #0000000a; }
#tool-menu .chat-tool { flex: none; width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 50%; }
#tool-menu .chat-tool .icon { width: 16px; height: 16px; }
#tool-menu .chat-tool[aria-expanded="true"] .icon { color: #25d366; }
.chat-search { display: flex; align-items: center; gap: 4px; }
.chat-search[hidden] { display: none; }
.chat-search input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border: 1px solid #ffffff1f; border-radius: 15px; outline: none; font: inherit; font-size: 12.5px;
  color: var(--chat-ink, #e9edef); background: #ffffff0d; }
.chat-search input:focus { border-color: #25d366; }
#tool-menu[data-light="true"] .chat-search input { border-color: #0000001f; background: #0000000a; }
#tool-menu .chat-search button { flex: none; width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 50%; }
#tool-menu .chat-chip[data-muted="true"] .chat-avatar b { background: #aebac1; }
.chat-thread[data-finding="true"] > [data-dim="true"] { opacity: .28; }
.chat-thread > * { transition: opacity .18s var(--ease); }
#tool-menu .chat-more { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; justify-content: center; border-radius: 50%;
  color: var(--chat-ink, #e9edef); background: color-mix(in srgb, var(--chat-in, #202c33) 85%, transparent); opacity: 0; transition: opacity .15s var(--ease); }
.chat-bubble[data-out="true"] .chat-more { background: color-mix(in srgb, var(--chat-out, #005c4b) 85%, transparent); }
#tool-menu .chat-more .icon { width: 14px; height: 14px; }
.chat-bubble:is(:hover, :focus-within) .chat-more { opacity: 1; }
.chat-time { display: inline-flex; align-items: center; gap: 3px; }
.chat-tick { width: 13px; height: 13px; stroke-width: 2.2; }
.chat-tick[data-status="read"] { color: #53bdeb; }
.chat-star { width: 10px; height: 10px; fill: currentColor; }
.chat-reactions { justify-self: start; margin: 2px 0 -2px; padding: 1px 6px; border-radius: 10px; font-size: 12px; line-height: 1.4;
  background: var(--chat-thread, #0b141a); box-shadow: 0 0 0 1px #ffffff14; }
.chat-voice { display: flex; align-items: center; gap: 7px; min-width: 170px; }
#tool-menu .chat-voice-play { flex: none; width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 50%; color: var(--chat-ink, #e9edef); background: #ffffff14; }
#tool-menu .chat-voice-play .icon { width: 15px; height: 15px; fill: currentColor; }
.chat-voice-bar { flex: 1; height: 3px; border-radius: 2px; }
.chat-voice-bar[data-playing="true"] { animation: chat-voice 1.1s ease-in-out infinite alternate; }
@keyframes chat-voice { to { opacity: .6; } }
.chat-voice small { font-size: 10.5px; opacity: .75; }
#tool-menu .chat-voice-speed { flex: none; width: auto; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 10.5px; font-weight: 700; color: var(--chat-ink, #e9edef); background: #ffffff1a; }
.chat-compose .chat-mic[hidden], .chat-compose .chat-send[hidden] { display: none; }
.chat-record { display: flex; align-items: center; gap: 8px; padding: 2px 0 2px 10px; }
.chat-record[hidden] { display: none; }
.chat-record-dot { width: 9px; height: 9px; border-radius: 50%; background: #f15c6d; animation: chat-record 1s ease-in-out infinite alternate; }
@keyframes chat-record { to { opacity: .25; } }
.chat-record-time { flex: 1; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--chat-ink, #e9edef); }
#tool-menu .chat-record button { flex: none; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; }
#tool-menu .chat-record .chat-send { background: #25d366; }
#tool-menu .chat-record .chat-send .icon { color: #062d17; }
.chat-pop { position: absolute; z-index: 5; display: grid; gap: 1px; width: 196px; max-height: 300px; overflow-y: auto; padding: 5px; border-radius: 12px;
  background: var(--player-bg, #1f2430); box-shadow: 0 10px 30px #0000005c, 0 0 0 1px #ffffff17; animation: menu-in .14s var(--ease) both; transform-origin: top center; }
.chat-pop[hidden] { display: none; }
/* Shown later, on request: at once, without the panel's opening cascade (player-part and its delays). */
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > .chat-pop { animation: menu-in .14s var(--ease) both; animation-delay: 0s; }
#tool-menu[data-kind="player"]:not([data-closing]) .player-panel > :is(.chat-search, .chat-record) { animation: player-part .28s cubic-bezier(.2, .8, .2, 1) both; animation-delay: 0s; }
#tool-menu .chat-pop button[role="menuitem"] { display: flex; width: 100%; height: 30px; gap: 8px; padding: 0 9px; justify-content: flex-start; border-radius: 8px; font-size: 12.5px;
  color: var(--chat-ink, #e9edef); white-space: nowrap; }
#tool-menu .chat-pop button[role="menuitem"] span { overflow: hidden; text-overflow: ellipsis; }
#tool-menu .chat-pop button[role="menuitem"] .icon { flex: none; width: 15px; height: 15px; }
#tool-menu .chat-pop button[data-danger="true"] { color: #f15c6d; }
.chat-pop-title { margin: 3px 9px 4px; overflow: hidden; font-size: 11px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; opacity: .65; color: var(--chat-ink, #e9edef); }
.chat-pop-reactions { display: flex; justify-content: space-between; padding: 2px 2px 5px; margin-bottom: 3px; border-bottom: 1px solid #ffffff14; }
#tool-menu .chat-pop-reactions button { width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 50%; font-size: 17px; line-height: 1;
  transition: transform .15s var(--ease), background .15s var(--ease); }
#tool-menu .chat-pop-reactions button:hover { transform: scale(1.22); background: #ffffff14; }
#tool-menu[data-light="true"] .chat-pop { box-shadow: 0 10px 30px #00000029, 0 0 0 1px #0000001a; }
@media (prefers-reduced-motion: reduce) { .chat-voice-bar[data-playing="true"], .chat-record-dot { animation: none; } }

/* WhatsApp: a photo of the chat, large over the window; the GIF tab and the searches of the picker. */
#tool-menu .chat-photo-open { display: block; width: auto; height: auto; padding: 0; border-radius: 6px; background: none; cursor: zoom-in; }
#tool-menu .chat-photo-open:hover .chat-image { filter: brightness(1.06); }
#chat-photo { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 56px 40px 64px; background: #05080dd9;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: zoom-out; animation: chat-photo-in .2s var(--ease) both; }
#chat-photo[hidden] { display: none; }
#chat-photo img { width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 20px 50px #000a); cursor: default;
  transition: filter .3s var(--ease); animation: chat-photo-grow .26s cubic-bezier(.2, .72, .25, 1) both; }
#chat-photo img[data-sharp="false"] { filter: blur(3px) drop-shadow(0 20px 50px #000a); }
#chat-photo .chat-photo-caption { position: absolute; left: 50%; bottom: 18px; max-width: min(720px, 80vw); margin: 0; transform: translateX(-50%); overflow: hidden;
  font-size: 13px; color: #e9edef; white-space: nowrap; text-overflow: ellipsis; opacity: .85; }
#chat-photo .chat-photo-close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; padding: 0; justify-content: center; border: 0; border-radius: 50%;
  color: #fff; background: #ffffff1f; cursor: pointer; }
#chat-photo .chat-photo-close:hover { background: #ffffff33; }
@keyframes chat-photo-in { from { opacity: 0; } }
@keyframes chat-photo-grow { from { opacity: 0; transform: scale(.94); } }
.chat-picker-search { height: 30px; padding: 0 12px; border: 1px solid #ffffff1f; border-radius: 15px; outline: none; font: inherit; font-size: 12px;
  color: var(--chat-ink, #e9edef); background: #ffffff0d; }
.chat-picker-search:focus { border-color: #25d366; }
#tool-menu[data-light="true"] .chat-picker-search { border-color: #0000001f; background: #0000000a; }
.chat-picker-sections { display: flex; gap: 4px; }
#tool-menu .chat-picker-sections button { flex: none; width: auto; height: 24px; padding: 0 10px; justify-content: center; border-radius: 12px; font-size: 11.5px; font-weight: 600;
  color: var(--chat-ink, #e9edef); background: #ffffff0f; opacity: .8; }
#tool-menu .chat-picker-sections button[aria-selected="true"] { color: #25d366; background: #25d36624; opacity: 1; }
#tool-menu[data-light="true"] .chat-picker-sections button { background: #0000000a; }
.chat-picker-grid[data-mode="gif"] { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }
#tool-menu .chat-picker .chat-gif { height: 82px; padding: 0; overflow: hidden; border-radius: 8px; }
.chat-gif img { object-fit: cover; }
.chat-voice-bar { background: linear-gradient(90deg, #25d366 var(--played, 0%), #ffffff40 0); }
@media (prefers-reduced-motion: reduce) { #chat-photo, #chat-photo img { animation: none; } }

/* Keep Awake: a moon (standby allowed) that turns into a sun (no standby). */
.awake-icon { width: 17px; height: 17px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.awake-sun, .awake-moon { transform-box: view-box; transform-origin: 12px 12px; transition: transform .55s cubic-bezier(.2,.72,.25,1), opacity .35s ease; }
.awake-sun { opacity: 0; transform: rotate(-120deg) scale(.3); }
.awake-moon { opacity: 1; transform: none; }
#awake-button[aria-pressed="true"] { color: var(--o-ffc584, #ffc584); }
#awake-button[aria-pressed="true"] .awake-sun { opacity: 1; transform: none; }
#awake-button[aria-pressed="true"] .awake-moon { opacity: 0; transform: rotate(120deg) scale(.3); }
#awake-button[aria-pressed="true"] .awake-icon { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--o-ffb26a, #ffb26a) 60%, transparent)); }
body[data-site-light-tools="true"] #awake-button[aria-pressed="true"] { color: var(--o-c2571a, #c2571a); }
@media (prefers-reduced-motion: reduce) { .awake-sun, .awake-moon { transition: none; } }

/* Titles over the wallpaper painted with the map of what is under them (contrast.js): light on dark, dark on
   bright, even halfway through a word. */
body[data-contrast="true"] .tabbar .tab:not([data-selected="true"]) .tab-select span, body[data-contrast="true"] .bookmarks-bar .bookmark span {
  background: var(--contrast-map) 0 0 / var(--contrast-size) no-repeat fixed; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; }
body[data-contrast="true"] .tabbar :is(.tool, .private-badge, .tab-select > .icon)[data-on-light="true"],
body[data-contrast="true"] .bookmarks-bar .bookmark[data-on-light="true"] { color: #1b2130; }
body[data-contrast="true"] .tabbar .tool[data-on-light="true"]:not(:disabled):hover { background: #1b213014; }
/* On a bright background the light under the pointer and the selected tab's glass are dark, or they would not show. */
body[data-contrast="true"] .tab[data-on-light="true"]::before {
  background: radial-gradient(70px circle at var(--spot-x, 50%) var(--spot-y, 50%), #1b213024, #1b21300d 55%, transparent 80%); }
body[data-contrast="true"] .tab[data-on-light="true"] .tab-edge {
  background: linear-gradient(to bottom, #ffffffd9, #ffffffb3); box-shadow: 0 8px 18px -6px #0000004d, 0 2px 6px -1px #00000033, inset 0 0 0 1px #1b21301a; }
/* The selected tab is enlarged (scale), and a fixed background in it would not stay put: its title takes one colour. */
body[data-contrast="true"] .tab[data-selected="true"] .tab-select > [data-on-light="true"] { color: #1b2130; }
body[data-contrast="true"] .group-head[data-on-light="true"] { color: color-mix(in srgb, var(--group-color) 50%, #1b2232); }

/* ---- Discord's panel (player.js renderDiscordMenu): the servers in a row; the friends or the channels beside the
   open conversation; the person's own bar. Discord's own colours. */
#tool-menu[data-kind="player"]:has(.discord-panel) { width: min(640px, calc(100vw - 20px)); }
.discord-panel { gap: 8px; --discord-side: #2b2d31; --discord-chat: #313338; --discord-ink: #dbdee1; --discord-muted: #949ba4; --discord-blurple: #5865f2; }
/* Discord's own buttons, not the menu's (the footer keeps those): no orange light, no frame. */
#tool-menu :where(.discord-panel > :not(.player-footer)) button, #tool-menu :where(.discord-panel > :not(.player-footer)) button:hover,
#tool-menu :where(.discord-panel > :not(.player-footer)) button:focus-visible, #tool-menu :where(.discord-panel > :not(.player-footer)) button:active {
  height: auto; gap: 0; padding: 0; border-radius: 0; font-size: inherit; color: inherit; background: none; box-shadow: none; scale: none; }
#tool-menu :where(.discord-panel > :not(.player-footer)) button:focus-visible { outline: 2px solid #5865f2; outline-offset: -2px; }
#tool-menu :where(.discord-panel > :not(.player-footer)) button:hover .icon, #tool-menu :where(.discord-panel > :not(.player-footer)) button:focus-visible .icon { color: inherit; }
.discord-servers { display: flex; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.discord-servers::-webkit-scrollbar { display: none; }
#tool-menu .discord-server { position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #313338;
  color: var(--discord-ink); scroll-snap-align: start; transition: border-radius .18s var(--ease), background-color .18s var(--ease); }
#tool-menu .discord-server:hover, #tool-menu .discord-server[data-open="true"] { border-radius: 14px; background: #3a3c42; }
#tool-menu .discord-server[data-open="true"] { box-shadow: 0 0 0 2px #f2f3f5; }
#tool-menu .discord-server.discord-home { background: #313338; }
#tool-menu .discord-server.discord-home[data-open="true"] { background: var(--discord-blurple); box-shadow: none; }
#tool-menu .discord-server .icon { width: 20px; height: 20px; color: #dbdee1; }
#tool-menu .discord-server[data-nested="true"] { width: 36px; height: 36px; }
#tool-menu .discord-folder { background: #5865f233; }
#tool-menu .discord-folder[data-expanded="true"] { background: #5865f266; }
/* Unread: a small white mark under it, as Discord's pill on the left. */
#tool-menu .discord-server[data-unread="true"]::after { content: ""; position: absolute; bottom: -6px; left: 50%; width: 8px; height: 3px; margin-left: -4px; border-radius: 2px; background: #f2f3f5; }
.discord-server-pic { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; font-size: 12px; font-weight: 650; color: #fff; }
.discord-server-pic img, .discord-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.discord-server b, .discord-mentions { min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; font-size: 10px; font-weight: 700;
  line-height: 16px; text-align: center; color: #fff; background: #f23f43; }
.discord-server b { position: absolute; right: -4px; bottom: -3px; box-shadow: 0 0 0 3px rgb(30 31 34); }
.discord-divider { flex: none; width: 2px; height: 26px; border-radius: 1px; background: #ffffff1f; }

.discord-body { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; height: min(400px, calc(100vh - var(--tabs) - var(--toolbar) - var(--bookmarks) - 230px)); min-height: 240px;
  border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px #ffffff0d; }
.discord-side { display: flex; flex-direction: column; min-height: 0; background: var(--discord-side); }
.discord-side-head { display: flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px; border-bottom: 1px solid #1f2023; color: #f2f3f5; font-size: 12.5px; }
.discord-side-head strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 650; }
#tool-menu .discord-back { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-left: -6px; border-radius: 7px; color: var(--discord-muted); }
#tool-menu .discord-back:hover { background: #ffffff10; color: #f2f3f5; }
#tool-menu .discord-back .icon { width: 15px; height: 15px; }
.discord-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1px; padding: 6px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#tool-menu .discord-row { flex: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 6px; border-radius: 6px; text-align: left; color: var(--discord-muted); }
#tool-menu .discord-row:hover { background: #35373c; color: var(--discord-ink); }
#tool-menu .discord-row[data-open="true"] { background: #404249; color: #fff; }
#tool-menu .discord-row[data-unread="true"] { color: #f2f3f5; font-weight: 600; }
#tool-menu .discord-friend { min-height: 42px; }
#tool-menu .discord-row .discord-glyph { flex: none; width: 17px; height: 17px; color: #80848e; }
.discord-row-words { display: grid; min-width: 0; flex: 1; }
.discord-row-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; }
.discord-row-words small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10.5px; font-weight: 400; color: var(--discord-muted); }
.discord-mentions { flex: none; margin-left: auto; }
#tool-menu .discord-category { flex: none; display: flex; align-items: center; gap: 2px; width: 100%; padding: 12px 2px 4px; text-align: left; color: var(--discord-muted);
  font-size: 10.5px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; }
#tool-menu .discord-category:hover { color: var(--discord-ink); }
#tool-menu .discord-category .discord-glyph { width: 12px; height: 12px; transition: transform .16s var(--ease); }
#tool-menu .discord-category[data-collapsed="true"] .discord-glyph { transform: rotate(-90deg); }
.discord-category span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.discord-avatar { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; }
.discord-status-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px var(--discord-side); }

.discord-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--discord-chat); }
.discord-chat-head { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-bottom: 1px solid #26272b; color: #f2f3f5; font-size: 13px; font-weight: 650; }
.discord-chat-head span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.discord-chat-head .discord-glyph { flex: none; width: 17px; height: 17px; color: #80848e; }
.discord-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.discord-message { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; padding: 1px 12px 1px; color: var(--discord-ink); font-size: 12.5px; line-height: 1.4; }
.discord-message[data-head="true"] { margin-top: 10px; }
.discord-message:hover { background: #2e3035; }
.discord-message .discord-avatar { grid-row: span 2; }
.discord-message-top { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.discord-message-top strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; color: #f2f3f5; }
.discord-message-top small { flex: none; font-size: 10px; color: var(--discord-muted); }
.discord-message-body { grid-column: 2; display: grid; gap: 3px; min-width: 0; }
.discord-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.discord-reply { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10.5px; color: var(--discord-muted); }
.discord-kind { font-size: 11px; color: var(--discord-muted); }
.discord-image { display: block; max-width: min(100%, 260px); max-height: 200px; border-radius: 8px; object-fit: cover; }
.discord-day { margin: 14px 12px 2px; padding-top: 4px; border-top: 1px solid #3f4147; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--discord-muted); }
.discord-empty { margin: auto 16px; text-align: center; font-size: 12px; color: var(--discord-muted); }
.discord-compose { display: flex; align-items: flex-end; gap: 6px; margin: 0 10px 10px; padding: 4px 4px 4px 12px; border-radius: 9px; background: #383a40; }
.discord-compose[hidden] { display: none; }
.discord-compose textarea { flex: 1; min-width: 0; min-height: 32px; max-height: 96px; padding: 7px 0; box-sizing: border-box; resize: none; border: 0; background: none;
  color: var(--discord-ink); font: inherit; font-size: 12.5px; line-height: 1.35; outline: none; }
.discord-compose textarea::placeholder { color: #6d6f78; }
#tool-menu .discord-compose .discord-send { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; color: #b5bac1; }
#tool-menu .discord-compose .discord-send:hover { color: #fff; background: #ffffff10; }
.discord-compose[data-busy="true"] .discord-send { opacity: .45; }

.discord-status { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 12px; background: #232428; }
.discord-status[hidden] { display: none; }
.discord-me { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: #f2f3f5; }
.discord-me .discord-row-name { font-size: 13px; font-weight: 600; }
.discord-me .discord-avatar { width: 32px; height: 32px; }
#tool-menu .discord-tool { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 32px; border-radius: 8px; color: #b5bac1; }
#tool-menu .discord-tool:hover { background: #ffffff10; color: #f2f3f5; }
#tool-menu .discord-tool .icon, #tool-menu .discord-send .icon { width: 19px; height: 19px; color: inherit; }
#tool-menu .discord-tool[data-on="true"] { color: #f23f43; background: #f23f4326; }
.discord-glyph .discord-cross { stroke: #f23f43; stroke-width: 2.2; }
#tool-menu .discord-hangup { color: #f23f43; }

/* Who is in a voice channel, under it (player.js). */
.discord-members { display: grid; gap: 1px; }
.discord-member { display: flex; align-items: center; gap: 7px; min-height: 26px; padding: 2px 6px 2px 30px; border-radius: 6px; color: var(--discord-muted); font-size: 12px; }
.discord-member .discord-avatar { width: 20px; height: 20px; font-size: 8px; }
.discord-member > span:not(.discord-avatar) { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.discord-member .discord-glyph { flex: none; width: 14px; height: 14px; color: #80848e; }
.discord-live { flex: none; padding: 0 4px; border-radius: 4px; font-size: 9px; font-style: normal; font-weight: 700; color: #fff; background: #f23f43; }
/* A question of Discord, over the panel. */
.discord-body { position: relative; }
.discord-dialog { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 16px; background: #000000a6; animation: player-item .2s var(--ease) both; }
.discord-dialog-card { position: relative; display: grid; gap: 8px; width: min(100%, 380px); padding: 16px; border-radius: 10px; background: #313338; color: var(--discord-ink); box-shadow: 0 12px 30px #0009; }
.discord-dialog-card strong { padding-right: 26px; font-size: 15px; color: #f2f3f5; }
.discord-dialog-card p { margin: 0 !important; color: var(--discord-ink) !important; font-size: 12.5px !important; line-height: 1.45; }
#tool-menu .discord-dialog-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--discord-muted); }
#tool-menu .discord-dialog-close:hover { color: #f2f3f5; background: #ffffff10; }
#tool-menu .discord-dialog-close .icon { width: 15px; height: 15px; color: inherit; }
.discord-dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
#tool-menu .discord-dialog-buttons button { height: 34px; padding: 0 14px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: #f2f3f5; background: #4e5058; }
#tool-menu .discord-dialog-buttons button:hover { background: #6d6f78; }
#tool-menu .discord-dialog-buttons button[data-main="true"] { background: var(--discord-blurple); }
#tool-menu .discord-dialog-buttons button[data-main="true"]:hover { background: #4752c4; }

/* Internal pages (Aiuto, Preferiti, Cronologia, Download, Jase Tunnel, Password, Dati personali) as the tools'
   windows (page-tools.css, data-side): one glass panel over the wallpaper, blurred as in the settings; on the left a
   column with the symbol in the corner, the title (the first word large, the rest below: browser.js sheetTitle), the
   explanation and the search; on the right the content, which scrolls by itself; at the bottom "Chiudi", which
   closes the page's tab. The settings keep their own layout (#preferences), the error page its card (.problem). */
.sheet:not(#preferences):not(.problem) { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; padding: 26px; background: #16171b; }
.sheet:not(#preferences):not(.problem)::before { content: ""; position: fixed; z-index: -1; inset: calc(var(--tabs) + var(--toolbar) + var(--bookmarks)) var(--panel) 0 0; pointer-events: none;
  background: linear-gradient(180deg, #14151a80, #14151aa8 55%, #14151acc), var(--wallpaper-thumb) center / cover no-repeat; filter: blur(24px) saturate(1.2); transform: scale(1.12); }
.vertical-tabs-on .sheet:not(#preferences):not(.problem)::before { left: var(--vertical-tabs); }
.sheet .sheet-inner { display: grid; grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; width: min(980px, 100%); max-width: none; max-height: 100%; margin: 0;
  overflow: hidden; border: 1px solid var(--glass-border); border-radius: 22px; background: var(--glass); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.sheet .sheet-inner.narrow { width: min(820px, 100%); max-width: none; }
.sheet .sheet-inner > .sheet-head { grid-column: 1; grid-row: 1 / -1; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0; margin: 0;
  padding: 44px 20px 28px; text-align: center; border-right: 1px solid #ffffff1a; background: linear-gradient(180deg, #ffffff14, #ffffff06 60%, #ffffff0a); box-shadow: inset -1px 0 #0000001f; }
.sheet .sheet-inner > .sheet-head > .sheet-heading { display: block; }
/* The symbol, small, in the panel's top left corner. */
.sheet .sheet-inner > .sheet-head > .sheet-icon { position: absolute; top: 16px; left: 18px; width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--o-ffb27e, #ffb27e); }
.sheet .sheet-inner > .sheet-head > .sheet-icon .icon { width: 18px; height: 18px; }
.sheet .sheet-inner > .sheet-head h1 { margin: 0; max-width: 100%; font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.sheet :is(.sheet-title-main, .sheet-title-rest) { display: table; margin: 0 auto; white-space: nowrap; }
.sheet .sheet-title-main { font-weight: 650; font-size: clamp(22px, calc(300px / var(--title-length, 6)), 38px); }
.sheet .sheet-title-rest { margin-top: 4px; font-size: 26px; font-weight: 550; letter-spacing: -.01em; }
.sheet .sheet-inner > .sheet-head p { margin: 14px 0 0; font-size: 13px; line-height: 1.45; }
.sheet .sheet-inner > .sheet-head > .sheet-search { width: 100%; margin-top: 18px; }
.sheet .sheet-inner > .sheet-head > .sheet-search[hidden] { display: none; }
.sheet-body { grid-column: 2; grid-row: 1; min-height: 0; padding: 22px 24px 18px; overflow: auto; overscroll-behavior: contain;
  max-height: calc(100vh - var(--tabs) - var(--toolbar) - var(--bookmarks) - 52px - 62px); }
.sheet-body > .sheet-toolbar { margin: 0 0 16px; }
.sheet-body .list-group h2 { top: -22px; }
.sheet-body .empty { margin: 40px auto; }
.sheet-actions { grid-column: 2; grid-row: 2; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 16px; border-top: 1px solid #ffffff15; }
.sheet-actions button { padding: 7px 14px; border: 1px solid var(--glass-button-border); border-radius: 10px; color: var(--o-ffe6d4, #ffe6d4); font: inherit; font-size: 13px; background: var(--glass-button); cursor: pointer; }
.sheet-actions button:hover { background: var(--glass-button-hover); }
.sheet-actions button:focus-visible { outline: 1.5px solid color-mix(in srgb, var(--o-ffc790, #ffc790) 70.2%, transparent); outline-offset: 2px; }
/* A narrow window: the side column above the content, as the tools' windows do. */
@media (max-width: 700px) {
  .sheet:not(#preferences):not(.problem) { padding: 14px; }
  .sheet .sheet-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .sheet .sheet-inner > .sheet-head { grid-row: 1; border-right: 0; border-bottom: 1px solid #ffffff1a; padding: 36px 20px 20px; }
  .sheet-body { grid-column: 1; grid-row: 2; max-height: none; }
  .sheet-actions { grid-column: 1; grid-row: 3; }
}
/* Themes (Impostazioni → Temi, themes.js): the mod's wallpaper as a video over the picture (its first frame), a
   vignette, the splash at startup, the pointer, the shortcuts in two tones. */
.theme-wallpaper { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.theme-vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 48%, rgb(0 0 0 / calc(var(--vignette, 0) * .85)) 100%); }
.site-visible .theme-wallpaper, .site-visible .theme-vignette { clip-path: inset(0 0 calc(100% - var(--tabs) - var(--toolbar) - var(--bookmarks)) 0); }
.theme-splash { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; background: #000; cursor: pointer; }
/* The splash whole and centred, whatever its shape (GX's are often square), on black. */
.theme-splash video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.theme-splash-skip { position: absolute; right: 22px; bottom: 18px; padding: 6px 12px; border-radius: 99px; background: #0009; color: #fffc; font-size: 12px; }
.theme-filters { position: absolute; width: 0; height: 0; overflow: hidden; }
:root.windows[data-theme-cursor] body { cursor: var(--theme-cursor); }
:root[data-theme-duotone] .shortcut:not(.add) { filter: url(#theme-duotone); transition: filter .25s; }
:root[data-theme-duotone] .shortcut:not(.add):hover { filter: none; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 18px 20px 20px; }
.theme-card { position: relative; display: grid; gap: 8px; margin: 0; cursor: pointer; color: #dfe3ee; font-size: 12.5px; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #3a4566, #171b26) center / cover no-repeat;
  box-shadow: 0 0 0 1px #ffffff1f, 0 10px 22px -14px #000c; transition: transform .18s var(--ease), box-shadow .18s; }
.theme-icon { width: 38%; max-height: 70%; object-fit: contain; filter: drop-shadow(0 4px 10px #0009); }
.theme-card:hover .theme-preview { transform: translateY(-2px); }
.theme-card input:checked + .theme-preview { box-shadow: 0 0 0 2px #16171b, 0 0 0 4px var(--o-ff9a5c, #ff9a5c), 0 12px 26px -14px color-mix(in srgb, var(--o-ff8a3d, #ff8a3d) 60%, transparent); }
.theme-card input:focus-visible + .theme-preview { outline: 2px solid var(--o-ffc790, #ffc790); outline-offset: 4px; }
.theme-text { display: grid; gap: 2px; padding-left: 2px; min-width: 0; }
.theme-text strong { overflow: hidden; color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.theme-text small { overflow: hidden; color: #aab1c2; text-overflow: ellipsis; white-space: nowrap; }
.theme-parts-head { min-height: 0; }
