/* Panda Cloner — 9-dot apps launcher (see apps-menu.js). Works on the G Drive page and every cloner page. */
.apps-menu, .apps-pop {
  --ap-bg: #ffffff; --ap-text: #1f1f1f; --ap-muted: #6b6b6b; --ap-line: rgba(0,0,0,.08); --ap-hover: rgba(0,0,0,.06);
  --ap-shadow: 0 24px 60px -18px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.08);
}
.apps-menu { position: relative; display: inline-flex; flex: none; }
/* dark themes: G Drive page (body.dark-mode) and cloner pages (dark unless html.light) */
body.dark-mode .apps-menu, body.dark-mode .apps-pop,
html:not(.light) body.cloner-body .apps-menu, html:not(.light) body.cloner-body .apps-pop {
  --ap-bg: #232325; --ap-text: #f1f1f1; --ap-muted: #a3a3a7; --ap-line: rgba(255,255,255,.08); --ap-hover: rgba(255,255,255,.08);
  --ap-shadow: 0 28px 70px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.06);
}
.apps-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--ap-text); fill: currentColor; transition: background .18s ease, transform .18s ease;
}
.apps-btn svg { fill: currentColor; transition: transform .35s cubic-bezier(.2,.85,.25,1); }
.apps-btn:hover { background: var(--ap-hover); }
.apps-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.apps-menu.open .apps-btn { background: var(--ap-hover); }
.apps-menu.open .apps-btn svg { transform: rotate(45deg) scale(.92); }

.apps-pop {
  position: fixed; top: 64px; right: 12px; z-index: 2900; width: 400px; padding: 16px;
  background: var(--ap-bg); color: var(--ap-text); border-radius: 24px; box-shadow: var(--ap-shadow);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: top right;
  transition: opacity .18s ease, transform .25s cubic-bezier(.2,.85,.25,1), visibility 0s .25s;
}
.apps-pop.open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .3s cubic-bezier(.2,.85,.25,1); }
.apps-pop::before { content: ""; position: absolute; top: -6px; right: calc(var(--arrow-r, 29px) - 7px); width: 14px; height: 14px; background: var(--ap-bg); transform: rotate(45deg); border-radius: 3px; }

.apps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 4px 12px; }
.apps-head span { font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.apps-head small { font-size: 12px; color: var(--ap-muted); }

.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.apps-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 112px; padding: 14px 14px 12px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: radial-gradient(120% 80% at 10% 0%, rgba(255,255,255,.28), transparent 60%), linear-gradient(155deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 6px 16px -10px var(--c2);
  transition: transform .2s cubic-bezier(.2,.85,.25,1), box-shadow .2s ease;
}
.apps-tile[data-id="drive"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.apps-tile[data-id="drive"]::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #4285f4 0 25%, #ea4335 25% 50%, #fbbc04 50% 75%, #34a853 75%); }
.apps-pop.open .apps-tile { animation: appsIn .42s cubic-bezier(.2,.85,.25,1) backwards; animation-delay: calc(var(--i) * 32ms + 40ms); }
@keyframes appsIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.apps-tile:hover, .apps-tile:focus-visible { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 14px 26px -12px var(--c2); outline: none; }
.apps-tile:focus-visible { box-shadow: 0 0 0 2px var(--ap-bg), 0 0 0 4px var(--c2); }
.apps-logo { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); margin-bottom: 10px; }
.apps-logo img { width: 30px; height: 30px; display: block; }
.apps-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.apps-sub { font-size: 11.5px; font-weight: 500; opacity: .82; }
.apps-sub i { font-size: 10px; margin-right: 3px; }
.apps-mark { position: absolute; right: -16px; bottom: -18px; width: 78px; height: 78px; opacity: .14; transform: rotate(-14deg); pointer-events: none; }
.apps-tile.is-here { cursor: default; }
.apps-tile.is-here::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2.5px var(--ink); opacity: .55; pointer-events: none; }

.apps-all {
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 999px;
  color: var(--ap-text); text-decoration: none; font-size: 13.5px; font-weight: 500; border: 1px solid var(--ap-line); transition: background .18s ease;
}
.apps-all:hover { background: var(--ap-hover); }
.apps-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.apps-foot .apps-all { margin-top: 0; }
.apps-all .fa-arrow-right { font-size: 11px; opacity: .7; }

.apps-scrim { display: none; }

/* Phones: a bottom sheet */
@media (max-width: 640px) {
  .apps-btn { width: 38px; height: 38px; }
  .apps-pop {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82dvh; overflow-y: auto;
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
    transform: translateY(100%); transform-origin: bottom center;
  }
  .apps-pop::before { top: 8px; left: 50%; right: auto; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; transform: none; background: var(--ap-line); }
  .apps-head { padding-top: 16px; }
  .apps-pop.open { transform: none; }
  .apps-tile { min-height: 104px; }
  html.apps-open .apps-scrim { display: block; position: fixed; inset: 0; z-index: 2899; background: rgba(0,0,0,.45); animation: appsFade .2s ease; }
  html.apps-open, html.apps-open body { overflow: hidden; }
}
@media (max-width: 340px) { .apps-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .apps-tile { padding: 12px 10px; } }
@keyframes appsFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .apps-pop.open .apps-tile { animation: none; } .apps-pop { transition: none !important; } }

/* Page themes colour every link (e.g. Yandex: gold). The launcher keeps its own colours. */
html .apps-pop a.apps-tile, html .apps-pop a.apps-tile:hover { color: var(--ink); text-decoration: none; }
html .apps-pop a.apps-all, html .apps-pop a.apps-all:hover { color: var(--ap-text); text-decoration: none; }

/* ---------- New-domain notice bar (added 2026-12-01, see apps-menu.js) ---------- */
:root { --url-notice-h: 0px; }
html.has-url-notice { --url-notice-h: calc(34px + env(safe-area-inset-top, 0px)); }
.url-notice {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2600;
  height: var(--url-notice-h); padding: env(safe-area-inset-top, 0px) 44px 0;
  display: flex; align-items: center; justify-content: center;
  background: #0b57d0; color: #fff;
  font: 500 13px/1.3 "Google Sans Text", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center; box-sizing: border-box;
}
.url-notice-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.url-notice b { font-weight: 700; }
.url-notice-x {
  position: absolute; right: 8px; bottom: 3px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: transparent; color: #fff;
  font-size: 20px; line-height: 28px; cursor: pointer; padding: 0;
}
.url-notice-x:hover, .url-notice-x:focus-visible { background: rgba(255, 255, 255, 0.18); outline: none; }
/* Push the page and its sticky headers down so the bar never covers them */
html.has-url-notice body { padding-top: var(--url-notice-h); }
html.has-url-notice .navbar,
html.has-url-notice .topbar,
html.has-url-notice .ac-top { top: var(--url-notice-h); }
html.has-url-notice .cloner-chooser { top: var(--url-notice-h); }
.url-notice-track { display: inline; }
/* Phones: the full message scrolls right-to-left instead of being cut off */
@media (max-width: 600px) {
  .url-notice { font-size: 12.5px; padding-left: 0; padding-right: 40px; justify-content: flex-start; }
  .url-notice-text { flex: 1; text-overflow: clip;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%); }
  .url-notice-track { display: inline-block; padding-left: 100%; animation: url-notice-scroll 16s linear infinite; }
  .url-notice:hover .url-notice-track, .url-notice:active .url-notice-track { animation-play-state: paused; }
}
@keyframes url-notice-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .url-notice { padding-left: 12px; justify-content: center; }
  .url-notice-text { text-overflow: ellipsis; -webkit-mask-image: none; mask-image: none; }
  .url-notice-track { animation: none; padding-left: 0; display: inline; }
  .url-notice-more { display: none; }
}
