/* ==========================================================================
 l arp.lol, styled like Fern            *
 ========================================================================== */

:root {
  --bg-base: #030814;
  --bg-1: #070f20;
  --bg-2: #0b1a33;
  --bg-3: #112445;
  --bg-4: #18305a;

  --accent: #bcd6ff;
  --accent-2: #6f93c9;
  --accent-glow: #bcd6ffbd;
  --accent-text: #0a1a33;

  --text: #d6dbe6;
  --text-muted: #8d94a8;
  --bright-text: #ffffff;

  --border: #b4c8ff38;
  --border-2: #b4c8ff24;
  --border-3: #b4c8ff17;
  --border-4: #b4c8ff0d;

  --shadow-float: 0 1.8rem 4.4rem rgba(0, 0, 0, 0.32);
  --glow: drop-shadow(0 0 3rem var(--accent-glow));

  --side: 27rem;
  --tb: 5.3rem;

  --bg: var(--bg-base);
  --stage: var(--bg-1);
  --text-dim: var(--text-muted);
  --text-faint: var(--text-muted);
  --glass-panel: var(--bg-1);
  --field: var(--bg-2);
  --line: var(--border-2);
  --hover: color-mix(in srgb, var(--accent) 10%, transparent);
  --active: var(--accent);
  --btn: color-mix(in srgb, var(--accent) 25%, transparent);
  --btn-hover: color-mix(in srgb, var(--accent) 40%, transparent);
  --chip: color-mix(in srgb, var(--accent) 12%, transparent);
  --chip-hover: color-mix(in srgb, var(--accent) 22%, transparent);
  --chip-on: var(--accent);
  --chip-on-text: var(--accent-text);
  color-scheme: dark;
}

html { font-size: clamp(5px, 0.47vw, 12px); height: 100%; }
* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Google Sans Flex", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button { font-family: inherit; }

/* ---------- LiquidGlass Overrides ---------- */
#glass-root {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
}

.glass-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('/wallpapers/buffoil.png') center / cover no-repeat;
  pointer-events: none;
}

.liquid-glass {
  position: relative;
}

.liquid-glass canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: -1 !important;
  pointer-events: none;
  border-radius: inherit;
}

.liquid-glass > *:not(canvas) {
  position: relative;
  z-index: 1;
}

/* Remove background from glass elements so the WebGL shines through */
.topbar.liquid-glass,
.sidebar.liquid-glass,
.search.liquid-glass,
.bmbar.liquid-glass,
.addr.liquid-glass,
.signin.liquid-glass,
.ql-item.liquid-glass {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ---------- Lucide icons ---------- */
svg.lu, .tb-left svg, .tb-right svg, .addr svg, .dock a svg, .search svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
svg.lu { display: block; flex: none; width: 1.9rem; height: 1.9rem; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed;
  inset: var(--top) auto 0 0;
  width: var(--side);
  display: flex;
  flex-direction: column;
  padding: 0.4rem 1rem 1.2rem;
  transition: transform 0.2s;
  z-index: 5;
  border-radius: 0 2rem 2rem 0 !important;
}

.tabs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.plus {
  order: -1;
  flex: none;
  display: flex;
  align-items: center;
  width: 100%;
  height: 3.8rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 1.2rem;
  background: none;
  color: var(--text);
  font-weight: 400;
  font-size: 1.8rem;
  text-align: left;
  cursor: pointer;
  margin-bottom: 0.6rem;
}
.plus::after { content: "New Tab"; margin-left: 1.2rem; font-size: 1.35rem; }
.plus:hover { background: var(--hover); }
.plus svg { width: 1.9rem; height: 1.9rem; }

/* The New Tab button acts as a glass pill */
.plus.liquid-glass {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 1.2rem;
}

.tab {
  flex: none;
  height: 3.8rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0 1rem 0 1.2rem;
  border-radius: 99rem;
  cursor: default;
  overflow: hidden;
  font-weight: 400;
  font-size: 1.35rem;
}
.tab:hover { background: var(--hover); }
.tab.active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.tab.active .x { color: var(--accent-text); }
.tab img { width: 1.9rem; height: 1.9rem; flex: none; object-fit: contain; }
.tab .x svg { width: 1.6rem; height: 1.6rem; }
.tab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab .x {
  display: none; flex: none; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 0.7rem;
  background: none; color: var(--text); cursor: pointer; font-weight: 500; font-size: 1.7rem; line-height: 1;
}
.tab .x:hover { background: var(--hover); }
.tab:hover .x, .tab.active .x { display: grid; place-items: center; }

.dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 1rem;
}
.dock a {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  height: 3.8rem;
  padding: 0 1.2rem;
  border-radius: 1.2rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 1.35rem;
}
.dock a:hover { background: var(--hover); }
.dock a svg { display: block; flex: none; width: 1.9rem; height: 1.9rem; }

/* ---------- home ---------- */
.hero {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(64rem, calc(100% - 6rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
  z-index: 0;
}
.hero[hidden] { display: none; }

.brand { display: flex; align-items: center; gap: 1.6rem; margin: 0; }
.brand span { color: #fff; font-family: "Euphoria Script", cursive; font-weight: 400; font-size: 6.4rem; line-height: 1; padding-bottom: 0.6rem; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.search {
  position: relative;
  width: 100%;
  height: 4.8rem;
  border-radius: 99rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.15s;
  box-shadow: var(--shadow-float);
}
.search .s-icon {
  position: absolute; left: 1.6rem; top: 50%; width: 1.7rem; height: 1.7rem;
  transform: translateY(-50%); stroke: var(--text-dim); pointer-events: none;
}
.search input {
  width: 100%;
  height: 100%;
  padding: 0 6rem 0 4.6rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: "Google Sans Flex", sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  border-radius: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.search input::placeholder { color: var(--text-dim); opacity: 1; }
.search button {
  position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%);
  width: 3.2rem; height: 3.2rem; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-2); color: var(--accent-text); cursor: pointer;
}
.search button:hover { background: var(--accent); }
.search button svg { width: 1.6rem; height: 1.6rem; stroke: currentColor; }

/* ---------- content area ---------- */
#views { position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; overflow: hidden; }
#views > * { pointer-events: auto; }
#views iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 1.4rem; background: #fff; }
#views .panel {
position: absolute; inset: 0; display: grid; place-items: center; border-radius: 1.4rem;
font-family: "Google Sans Flex", sans-serif; font-weight: 600; font-size: 2.6rem;
}
#views [hidden] { display: none; }

/* ---------- games app ---------- */
#views .panel.games,
#views .panel.music,
#views .panel.settings {
display: block;
place-items: initial;
overflow-y: auto;
padding: 3rem 4rem 4rem 4rem;
font-size: 1rem;
font-weight: 500;
background: var(--glass-panel);
}
#views .panel.games[hidden], #views .panel.music[hidden], #views .panel.settings[hidden] { display: none; }

.g-head { display: flex; align-items: center; gap: 2rem; margin: 0 0rem 2.4rem 0; }
.g-head h2 { margin: 0; font-size: 3.2rem; font-weight: 600; }
.g-count { font-size: 1.3rem; color: var(--text-faint); }
.g-search {
  position: relative; margin-left: auto; width: min(36rem, 100%); height: 4.4rem;
  border-radius: 1.6rem; background: var(--field);
}
.g-search::before {
  content: ""; position: absolute; inset: 0; padding: 0.12rem; border-radius: inherit;
  background: linear-gradient(180deg, #ffffff, #4aa8ff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.g-search input {
  width: 100%; height: 100%; padding: 0 1.6rem; border: 0; outline: 0; background: transparent;
  color: var(--text); font: 500 1.3rem "Google Sans Flex", sans-serif; border-radius: inherit;
}
.g-search input::placeholder { color: var(--text-dim); opacity: 1; }

.g-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 2rem; margin-right: 0rem;
}
.g-card {
  display: block; padding: 0; border: 0; background: none; color: inherit; text-align: left;
  font: inherit; cursor: pointer; transition: transform 0.15s;
}
.g-card:hover, .g-card:focus-visible { transform: translateY(-0.4rem) scale(1.03); outline: 0; }
.g-thumb {
  aspect-ratio: 16 / 10; border-radius: 1.4rem; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, #4aa8ff, #0297ff); box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.35);
  font-size: 4rem; font-weight: 600;
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-name {
  margin-top: 0.9rem; font-size: 1.3rem; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.g-empty { margin-right: 0rem; font-size: 1.5rem; color: var(--text-dim); line-height: 1.6; }

#views .panel.games.playing { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
#views .panel.games.playing[hidden] { display: none; }
.g-bar {
  flex: none; height: 4.6rem; display: flex; align-items: center; gap: 1rem;
  padding: 0 1.6rem; background: rgba(0, 0, 0, 0.55); color: #fff;
}
.g-bar .title { flex: 1; min-width: 0; font-size: 1.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-btn {
  border: 0; border-radius: 1rem; padding: 0.8rem 1.5rem; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff; font: 500 1.25rem "Google Sans Flex", sans-serif;
}
.g-btn:hover { background: rgba(255, 255, 255, 0.3); }
.g-btn { display: inline-flex; align-items: center; gap: 0.7rem; }
.g-btn svg { width: 1.6rem; height: 1.6rem; }
#views .panel.games .g-player { flex: 1; width: 100%; border: 0; background: #000; position: static; }

.g-chips { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 0 0rem 2.2rem 0; }
.g-chips[hidden] { display: none; }
.g-chip {
  border: 0; border-radius: 99rem; padding: 0.7rem 1.6rem; cursor: pointer;
  background: var(--chip); color: var(--text); font: 500 1.2rem "Google Sans Flex", sans-serif;
}
.g-chip:hover { background: var(--chip-hover); }
.g-chips + .g-chips { margin-top: -0.8rem; }
.g-sub .g-chip { padding: 0.55rem 1.3rem; font-size: 1.1rem; }
.g-chip.on { background: var(--chip-on); color: var(--chip-on-text); }
.g-thumb { position: relative; }
.g-badge {
  position: absolute; top: 0.6rem; right: 0.6rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #ffd25a; font-size: 1.3rem;
}
.g-bar .title small { margin-left: 1rem; font-size: 1.15rem; opacity: 0.6; }
.g-search[hidden] { display: none; }

/* ---------- settings app ---------- */
.s-wrap { max-width: 78rem; }
.s-wrap h2 { margin: 0 0 2.4rem; font-size: 3.2rem; font-weight: 600; }
.s-card { background: var(--chip); border: 1px solid var(--line); border-radius: 1.6rem; padding: 2rem 2.4rem; margin-bottom: 1.8rem; }
.s-card h3 { margin: 0 0 0.5rem; font-size: 1.6rem; font-weight: 600; }
.s-card p { margin: 0 0 1.4rem; font-size: 1.25rem; font-weight: 500; color: var(--text-faint); line-height: 1.5; }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.s-row p { margin-bottom: 0; }
.s-switch { position: relative; flex: none; width: 4.6rem; height: 2.6rem; }
.s-switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.s-switch span { position: absolute; inset: 0; border-radius: 99rem; background: var(--btn); transition: background 0.15s; }
.s-switch span::after {
  content: ""; position: absolute; top: 0.3rem; left: 0.3rem; width: 2rem; height: 2rem;
  border-radius: 50%; background: #fff; transition: transform 0.15s;
}
.s-switch input:checked + span { background: #2f8cff; }
.s-switch input:checked + span::after { transform: translateX(2rem); }
.s-fields { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.s-fields label { display: grid; gap: 0.6rem; font-size: 1.15rem; font-weight: 500; color: var(--text-faint); }
.s-fields input, .s-fields select {
  height: 3.8rem; padding: 0 1.4rem; border: 1px solid var(--line); border-radius: 1.1rem; outline: 0;
  background: var(--field); color: var(--text); font: 500 1.3rem "Google Sans Flex", sans-serif;
}
.s-fields select option { color: #111; }
.s-btn {
  border: 0; border-radius: 1.1rem; padding: 1rem 2rem; background: var(--chip-on); color: var(--chip-on-text);
  font: 600 1.3rem "Google Sans Flex", sans-serif; cursor: pointer;
}
.s-card p.s-note { margin: 1.2rem 0 0; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--tb);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1.6rem; z-index: 6;
  border-radius: 0 0 1.6rem 1.6rem !important;
  gap: 1rem;
}
.tb-left { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.tb-left button {
  width: 3.4rem; height: 3.4rem; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 1rem; background: none; color: var(--text-dim); cursor: pointer;
}
.tb-left button:hover { background: var(--hover); color: var(--text); }
.tb-left svg { width: 1.9rem; height: 1.9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Fixed Address Bar Sizing */
.addr { position: relative; height: 3.6rem; flex: 1; max-width: 66rem; margin: 0 auto; }
.addr svg { position: absolute; left: 1.4rem; top: 50%; width: 1.6rem; height: 1.6rem; transform: translateY(-50%); fill: none; stroke: var(--text-dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; z-index: 2; }
.addr input {
  width: 100%; height: 100%; padding: 0 1.6rem 0 4rem; border: 0; outline: 0; border-radius: 99rem;
  background: transparent; color: var(--text); font: 400 1.3rem "Google Sans Flex", sans-serif;
  position: relative; z-index: 1;
}
.addr input::placeholder { color: var(--text); opacity: 1; }

.stage {
  position: fixed; inset: var(--top) 0.8rem 0.8rem var(--side);
  border-radius: 1.8rem; overflow: hidden; transition: left 0.2s;
  z-index: 1;
}
body.side-hidden { --side: 0.8rem; }
body.side-hidden .sidebar { transform: translateX(-100%); }

/* ==========================================================================
 F ern-style polish                     *
 ========================================================================== */

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--bright-text); }

* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--border-2); background-clip: padding-box; border: 2px solid transparent; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--bg-4); }
::-webkit-scrollbar-corner { background: transparent; }

:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 2px; }
.search input:focus-visible, .addr input:focus-visible { outline: 0; }

.search input::placeholder { color: var(--text-muted); }
.search, .addr input { border: 1px solid transparent; transition: border-color 0.15s, background-color 0.15s; }
.search:focus-within, .addr input:focus { border-color: var(--border-2); background: var(--bg-3); }
.search { box-shadow: var(--shadow-float); }

select {
  appearance: none; cursor: pointer; padding-right: 1.75rem;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.4rem) 50%, calc(100% - 1rem) 50%;
  background-size: 0.45rem 0.45rem; background-repeat: no-repeat;
}
select option { background: var(--bg-2); color: var(--bright-text); }

.tb-left button, .plus, .tab, .dock a, .search button, .s-btn {
  transition: background-color 0.15s, color 0.15s, scale 0.15s;
}
.tb-left button:active, .plus:active, .search button:active, .s-btn:active { scale: 0.95; }
.tab:active, .dock a:active { scale: 0.98; }
.dock a:hover { color: var(--bright-text); }
.tab:not(.active):hover { color: var(--bright-text); }

@keyframes tabFadeIn { from { opacity: 0; } to { opacity: 1; } }
.tab, #views .panel, #views iframe { animation: tabFadeIn 0.18s ease-out; }

@media (hover: hover) {
  .tip { position: relative; }
  .tip::after {
    content: attr(data-tip);
    position: absolute; top: calc(100% + 0.6rem); left: var(--tip-x, 50%);
    translate: calc(var(--tip-x, 50%) * -1) 0;
    padding: 0.25rem 0.9rem; border-radius: 999px;
    background: var(--accent); color: #000;
    font-size: 1.1rem; font-weight: 500; line-height: 1.6rem; white-space: nowrap;
    opacity: 0; pointer-events: none; scale: 0.9;
    transition: opacity 0.15s, scale 0.15s;
    box-shadow: 0 1px 3px #0000001a, 0 1px 2px -1px #0000001a;
    z-index: 20;
  }
  .tip:is(:hover, :focus-visible)::after { opacity: 1; scale: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .tab, #views .panel, #views iframe { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- top bar, right side ---------- */
.tb-right { justify-self: end; display: flex; align-items: center; gap: 0.4rem; flex: none; }
.ib {
  width: 3.4rem; height: 3.4rem; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 1rem; background: none; color: var(--text-dim); cursor: pointer;
}
.ib:hover, .ib.on { background: var(--hover); color: var(--text); }
.ib svg { width: 1.9rem; height: 1.9rem; }
.ib.on::after { display: none; }
#tb-bookmark.saved { color: var(--accent); }
#tb-bookmark.saved svg { fill: currentColor; }

/* Sign in Glass Button */
.signin {
  display: flex; align-items: center; gap: 0.8rem; height: 3.4rem; max-width: 20rem; margin-left: 0.4rem;
  padding: 0 1.5rem 0 1.1rem; border: 0; border-radius: 99rem; color: var(--text);
  font: 500 1.25rem "Google Sans Flex", sans-serif; cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.signin:hover { color: var(--bright-text); }
.signin svg { width: 1.8rem; height: 1.8rem; flex: none; }
.signin span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pop-anchor { position: relative; }
.pop {
  position: absolute; top: calc(100% + 0.9rem); right: 0; z-index: 30; min-width: 26rem; padding: 1rem;
  border-radius: 2rem; background: var(--bg-1); border: 1px solid var(--border-2); box-shadow: var(--shadow-float);
  animation: tabFadeIn 0.12s ease-out;
}
.pop[hidden] { display: none; }
.menu { min-width: 27rem; }
.pop hr { border: 0; border-top: 1px solid var(--border-3); margin: 0.7rem 0.4rem; }
.pop-empty { margin: 0; padding: 1.1rem 1.4rem; font-size: 1.3rem; color: var(--text-muted); }
.pop-label { margin: 0.4rem 1.4rem 0.2rem; font-size: 1.1rem; color: var(--text-muted); }
.menu-item {
  display: flex; align-items: center; gap: 1.4rem; width: 100%; height: 3.8rem; padding: 0 1.4rem;
  border: 0; border-radius: 1.2rem; background: none; color: var(--text);
  font: 400 1.35rem "Google Sans Flex", sans-serif; text-align: left; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.menu-item:hover { background: var(--hover); color: var(--bright-text); }
.menu-item svg { width: 1.8rem; height: 1.8rem; flex: none; }
.menu-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- dialogs and toast ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 2rem;
  background: rgba(0, 0, 0, 0.5); animation: tabFadeIn 0.12s ease-out;
}
.dialog {
  width: min(46rem, 100%); padding: 2.8rem; border-radius: 2.6rem;
  background: var(--bg-1); border: 1px solid var(--border-2); box-shadow: var(--shadow-float);
}
.dialog h3 { margin: 0 0 2rem; font-size: 1.9rem; font-weight: 600; color: var(--bright-text); }
.dialog label { display: grid; gap: 0.7rem; margin-bottom: 1.6rem; font-size: 1.2rem; color: var(--text-muted); }
.dialog input {
  height: 4.6rem; padding: 0 2rem; border: 1px solid var(--border-3); border-radius: 99rem; outline: 0;
  background: var(--bg-2); color: var(--text); font: 400 1.4rem "Google Sans Flex", sans-serif;
  transition: border-color 0.15s, background-color 0.15s;
}
.dialog input:focus { border-color: var(--accent); background: var(--bg-3); }
.dialog input::selection { background: var(--accent); color: var(--accent-text); }
.dialog .note { margin: -0.4rem 0 1.6rem; font-size: 1.2rem; color: var(--text-muted); line-height: 1.5; }
.dialog .row { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; margin-top: 2.2rem; }
.dlg-btn {
  height: 4.2rem; padding: 0 2.4rem; border: 0; border-radius: 99rem; background: var(--bg-2); color: var(--text);
  font: 500 1.35rem "Google Sans Flex", sans-serif; cursor: pointer; transition: background-color 0.15s, filter 0.15s;
}
.dlg-btn:hover { background: var(--bg-3); }
.dlg-btn.spacer { margin-right: auto; }
.dlg-btn.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.dlg-btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.toast {
  position: fixed; left: 50%; bottom: 3rem; translate: -50% 0; z-index: 70; padding: 0.9rem 1.8rem;
  border-radius: 99rem; background: var(--accent); color: var(--accent-text);
  font: 500 1.3rem "Google Sans Flex", sans-serif; box-shadow: var(--shadow-float); animation: tabFadeIn 0.15s ease-out;
}

/* ---------- split view ---------- */
#views .pane-left { inset: 0 auto auto 0 !important; width: calc(50% - 0.4rem) !important; height: 100% !important; }
#views .pane-right { inset: 0 auto auto calc(50% + 0.4rem) !important; width: calc(50% - 0.4rem) !important; height: 100% !important; }

/* ---------- lists ---------- */
.s-card ul { margin: 0.8rem 0 0; padding-left: 2rem; font-size: 1.25rem; font-weight: 500; color: var(--text-dim); line-height: 1.7; }
.s-card h3 small { margin-left: 1rem; font-size: 1.1rem; font-weight: 500; color: var(--text-muted); }

/* ---------- bookmarks bar ---------- */
@property --bm { syntax: "<length>"; inherits: true; initial-value: 0px; }
body { --bm: 0px; --top: calc(var(--tb) + var(--bm)); transition: --bm 0.2s ease; }
body.has-bm { --bm: 3.8rem; }
.bmbar {
  position: fixed; inset: var(--tb) 0 auto 0; height: var(--bm); z-index: 6;
  display: flex; align-items: center; gap: 0.4rem; padding: 0 1.6rem;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  border-radius: 0 0 1.6rem 1.6rem !important;
}
.bmbar::-webkit-scrollbar { display: none; }
.bm {
  flex: none; display: flex; align-items: center; gap: 0.7rem; height: 2.8rem; max-width: 18rem; padding: 0 1.1rem;
  border: 0; border-radius: 99rem; background: none; color: var(--text);
  font: 500 1.25rem "Google Sans Flex", sans-serif; cursor: pointer; transition: background-color 0.15s, color 0.15s;
}
.bm:hover { background: var(--hover); color: var(--bright-text); }
.bm svg { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- music app ---------- */
.m-status[hidden], .m-now[hidden] { display: none; }
#views .panel.music { display: flex; flex-direction: column; padding-bottom: 0; }
#views .panel.music > * { flex-shrink: 0; }
.m-list { display: flex; flex-direction: column; gap: 0.2rem; padding-bottom: 2.4rem; }
.m-row {
  display: grid; grid-template-columns: 4.8rem minmax(0, 1fr) auto; align-items: center; gap: 1.4rem;
  width: 100%; padding: 0.7rem 1.4rem 0.7rem 0.7rem; border: 0; border-radius: 1.2rem;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background-color 0.15s;
}
.m-row:hover { background: var(--hover); }
.m-row.on { background: var(--chip-hover); }
.m-row img { width: 4.8rem; height: 4.8rem; border-radius: 0.8rem; object-fit: cover; background: var(--bg-3); }
.m-meta { min-width: 0; }
.m-title, .m-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-title { font-size: 1.4rem; font-weight: 500; color: var(--bright-text); }
.m-artist { margin-top: 0.2rem; font-size: 1.2rem; font-weight: 400; color: var(--text-muted); }
.m-time { font-size: 1.2rem; font-weight: 400; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.m-now {
  position: sticky; bottom: 0; z-index: 3;
  margin: auto -4rem 0; padding: 1.3rem 4rem;
  display: grid; grid-template-columns: 5.2rem minmax(10rem, 22rem) auto minmax(0, 1fr); align-items: center; gap: 1.6rem;
  background: var(--bg-2); border-top: 1px solid var(--line); box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.3);
}
.m-art { width: 5.2rem; height: 5.2rem; border-radius: 0.9rem; object-fit: cover; background: var(--bg-3); }
.m-ctrl { display: flex; align-items: center; gap: 0.6rem; }
.m-btn {
  width: 3.8rem; height: 3.8rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 99rem;
  background: none; color: var(--text); cursor: pointer; transition: background-color 0.15s, color 0.15s, scale 0.15s;
}
.m-btn:hover { background: var(--hover); color: var(--bright-text); }
.m-btn:active { scale: 0.95; }
.m-btn svg { width: 1.8rem; height: 1.8rem; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-play { width: 4.6rem; height: 4.6rem; background: var(--accent); color: var(--accent-text); }
.m-play:hover { background: var(--accent); color: var(--accent-text); filter: brightness(1.08); }
.m-seekrow { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.m-seek {
  --p: 0%; flex: 1; min-width: 0; height: 0.4rem; border-radius: 99rem; cursor: pointer;
  -webkit-appearance: none; appearance: none; outline: 0;
  background: linear-gradient(to right, var(--accent) var(--p), var(--bg-4) var(--p));
}
.m-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent); border: 0; }
.m-seek::-moz-range-thumb { width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--accent); border: 0; }

/* ---------- quick links ---------- */
.ql {
  display: flex; align-items: center; gap: 0.7rem;
  height: 7.4rem; padding: 0 0.7rem; border-radius: 99rem;
  background: transparent !important;
}
.ql-item {
  --s: 1;
  position: relative; flex: none; display: grid; place-items: center;
  width: calc(var(--s) * 5rem); height: calc(var(--s) * 5rem); border-radius: 50%;
  color: var(--text); cursor: pointer; text-decoration: none;
  transition: width 0.12s ease-out, height 0.12s ease-out, background-color 0.15s, scale 0.15s;
}
.ql-item.liquid-glass {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.ql-item:active { scale: 0.95; }
.ql-ico { width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 500; color: var(--bright-text); }
.ql-ico img { width: 52%; height: 52%; object-fit: contain; border-radius: 0.5rem; }
.ql-ico svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ql-rule { width: 1px; height: 2.8rem; background: var(--border-2); margin: 0 0.3rem; }
.ql-x {
  display: none; position: absolute; top: -0.3rem; right: -0.3rem; z-index: 2;
  width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font: 600 1.4rem/1.9rem "Google Sans Flex", sans-serif; cursor: pointer;
}
.ql.editing .ql-x { display: block; }
.ql-add .ql-ico { color: var(--accent); }
