/* ==========================================================================
   Wavey chps — style.css
   ========================================================================== */

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
  --blur: 22px;
  --r: 14px;

  /* violet (default) */
  --bg0: #0b0613;
  --bg1: #1a0d33;
  --accent: #a78bfa;
  --accent2: #ec4899;
  --accent-rgb: 167, 139, 250;
  --orb1: #7c3aed;
  --orb2: #db2777;
  --orb3: #2563eb;

  --text: #f4f0ff;
  --muted: #a99fc4;
  --faint: #6f6690;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
}

[data-theme='ocean'] {
  --bg0: #050d1a; --bg1: #0a1f3d; --accent: #38bdf8; --accent2: #6366f1; --accent-rgb: 56, 189, 248;
  --orb1: #0284c7; --orb2: #4f46e5; --orb3: #0891b2; --muted: #9db4cf; --faint: #5f7491;
}
[data-theme='sunset'] {
  --bg0: #140a08; --bg1: #331410; --accent: #fb923c; --accent2: #f43f5e; --accent-rgb: 251, 146, 60;
  --orb1: #ea580c; --orb2: #e11d48; --orb3: #f59e0b; --muted: #c9aa9b; --faint: #8b6c5f;
}
[data-theme='emerald'] {
  --bg0: #04120e; --bg1: #0a2b22; --accent: #34d399; --accent2: #22d3ee; --accent-rgb: 52, 211, 153;
  --orb1: #059669; --orb2: #0891b2; --orb3: #65a30d; --muted: #9bbfb3; --faint: #5c8478;
}
[data-theme='rose'] {
  --bg0: #13060f; --bg1: #331033; --accent: #f472b6; --accent2: #c084fc; --accent-rgb: 244, 114, 182;
  --orb1: #be185d; --orb2: #9333ea; --orb3: #e11d48; --muted: #c7a3bd; --faint: #8a6482;
}
[data-theme='graphite'] {
  --bg0: #0a0a0c; --bg1: #1a1b20; --accent: #e5e7eb; --accent2: #94a3b8; --accent-rgb: 229, 231, 235;
  --orb1: #475569; --orb2: #64748b; --orb3: #334155; --muted: #a3a8b3; --faint: #666b77;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg0);
  color-scheme: dark;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(var(--accent-rgb), 0.35); }
[hidden] { display: none !important; }

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd {
  font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); color: var(--muted);
}

/* ---------- Backdrop ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% -10%, var(--bg1), var(--bg0) 62%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; will-change: transform; }
.o1 { width: 46vmax; height: 46vmax; left: -14vmax; top: -16vmax; background: var(--orb1); animation: drift1 28s ease-in-out infinite alternate; }
.o2 { width: 40vmax; height: 40vmax; right: -12vmax; top: 10vh; background: var(--orb2); opacity: 0.38; animation: drift2 32s ease-in-out infinite alternate; }
.o3 { width: 36vmax; height: 36vmax; left: 25vw; bottom: -20vmax; background: var(--orb3); opacity: 0.35; animation: drift3 36s ease-in-out infinite alternate; }
.bg .grid {
  position: absolute; inset: 0; opacity: 0.22;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 25%, #000, transparent);
  mask-image: radial-gradient(70% 60% at 50% 25%, #000, transparent);
}
.bg .grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.18); } }
@keyframes drift2 { to { transform: translate(-16vmax, 14vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-14vmax, -10vmax) scale(1.2); } }
.no-motion .orb { animation: none; }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- App shell ---------- */
.app { position: relative; z-index: 1; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 10px; gap: 8px; }
.glass, .chrome, .menu, .panel, .toast {
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .chrome, .menu, .panel, .toast { background: rgba(26, 18, 44, 0.94); }
}
.chrome { position: relative; border-radius: 18px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08); z-index: 5; }

/* ---------- Tabs ---------- */
.tabbar { display: flex; align-items: center; gap: 6px; padding: 8px 8px 0; }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 12px 0 6px; font-family: var(--display); font-weight: 700; letter-spacing: 0.2px; height: 36px; border-radius: 10px; }
.brand:hover { background: rgba(255, 255, 255, 0.05); }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.6); position: relative; overflow: hidden; }
.brand-mark::after { content: ''; position: absolute; left: -2px; right: -2px; top: 9px; height: 8px; border-radius: 50%; border-top: 2.5px solid rgba(255, 255, 255, 0.92); }

.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.tab {
  position: relative; display: flex; align-items: center; gap: 8px; min-width: 38px; flex: 0 1 220px; height: 36px; padding: 0 6px 0 11px;
  border-radius: 12px 12px 0 0; color: var(--muted); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.tab:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.tab.active { background: rgba(255, 255, 255, 0.11); color: var(--text); }
.tab.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.9);
}
.tab.dragging { opacity: 0.4; }
.tab.over { box-shadow: inset 2px 0 0 var(--accent); }
.tab .fav { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 5px; overflow: hidden; font-size: 10px; font-weight: 700; color: #fff; }
.tab .fav img { width: 16px; height: 16px; object-fit: contain; border-radius: 4px; }
.tab .ttl { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; font-size: 13px; }
.tab .x { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; opacity: 0; color: var(--muted); transition: opacity 0.15s, background 0.15s; }
.tab:hover .x, .tab.active .x { opacity: 1; }
.tab .x:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.tab .x .i { width: 14px; height: 14px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 8px; background: rgba(255, 255, 255, 0.05); border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; }
.nav, .tools { display: flex; align-items: center; gap: 2px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); transition: background 0.15s, color 0.15s, transform 0.1s; flex: none; }
.icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.icon-btn:active:not(:disabled) { transform: scale(0.93); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.on { color: #fbbf24; }
.icon-btn.on .i { fill: currentColor; }

.omni { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.omni:focus-within { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16); background: rgba(0, 0, 0, 0.4); }
.omni-ico { color: var(--faint); display: grid; place-items: center; }
.omni-ico.secure { color: #4ade80; }
.omni input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 14px; }
.omni input::placeholder { color: var(--faint); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; margin-right: 4px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.1)); border: 1px solid rgba(var(--accent-rgb), 0.4); white-space: nowrap; max-width: 190px; transition: transform 0.1s, filter 0.2s; }
.pill:hover { filter: brightness(1.2); }
.pill:active { transform: scale(0.96); }
.pill .i { width: 14px; height: 14px; color: var(--accent); }
.pill span { overflow: hidden; text-overflow: ellipsis; }

.loadbar { position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; overflow: hidden; border-radius: 2px; opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.loadbar i { display: block; height: 100%; width: 40%; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent); }
.loadbar.on { opacity: 1; }
.loadbar.on i { animation: load 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------- Suggestions ---------- */
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; list-style: none; padding: 6px; border-radius: 16px; background: rgba(20, 13, 36, 0.92); border: 1px solid var(--line); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: var(--shadow); z-index: 20; display: none; }
.suggest.open { display: block; animation: pop 0.14s ease-out; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.suggest li .i { color: var(--faint); }
.suggest li.sel, .suggest li:hover { background: rgba(var(--accent-rgb), 0.16); }
.suggest li b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest li small { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.99); } }

/* ---------- Viewport ---------- */
.viewport { position: relative; flex: 1; min-height: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); box-shadow: var(--shadow); }
.frames, .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.frames { pointer-events: none; }
.frame { display: none; border: 0; background: #fff; color-scheme: light; pointer-events: auto; }
.frame.active { display: block; }

/* ---------- Home ---------- */
.home { position: absolute; inset: 0; display: none; overflow-y: auto; padding: 5vh 20px 40px; }
.home.show { display: block; }
.home-inner { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.eyebrow { margin-top: 3vh; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero { margin-top: 6px; font-family: var(--display); font-weight: 700; font-size: clamp(44px, 9vw, 88px); line-height: 1.02; letter-spacing: -0.03em; }
.hero-wave { background: linear-gradient(110deg, var(--accent), var(--accent2) 55%, var(--accent)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shimmer 7s linear infinite; }
.no-motion .hero-wave { animation: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sub { margin-top: 10px; color: var(--muted); font-size: 15px; min-height: 22px; }

.hsearch { margin-top: 28px; width: min(680px, 100%); display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 8px 0 20px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); -webkit-backdrop-filter: blur(var(--blur)) saturate(150%); backdrop-filter: blur(var(--blur)) saturate(150%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.hsearch:focus-within { border-color: rgba(var(--accent-rgb), 0.75); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.16), 0 20px 60px -20px rgba(var(--accent-rgb), 0.6); transform: translateY(-1px); }
.hsearch > .i { color: var(--muted); width: 20px; height: 20px; }
.hsearch input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px; }
.hsearch input::placeholder { color: var(--faint); }
.chip { height: 34px; padding: 0 13px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); white-space: nowrap; transition: background 0.15s, color 0.15s; }
.chip:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.go { height: 42px; padding: 0 22px; border-radius: 999px; font-weight: 600; color: #120a24; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 24px -8px rgba(var(--accent-rgb), 0.9); transition: transform 0.12s, filter 0.2s; }
.go:hover { filter: brightness(1.1); }
.go:active { transform: scale(0.96); }

.section-head { width: 100%; margin-top: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.section-head h2 { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.link { color: var(--accent); font-weight: 600; font-size: 13px; padding: 2px 4px; border-radius: 6px; }
.link:hover { text-decoration: underline; }

.tiles { width: 100%; margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s, border-color 0.2s, box-shadow 0.2s; min-width: 0; }
.tile:hover { transform: translateY(-4px); background: var(--glass-2); border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 18px 40px -18px rgba(var(--accent-rgb), 0.7); }
.tile:active { transform: translateY(-1px) scale(0.98); }
.tile .av { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -8px rgba(0, 0, 0, 0.6); }
.tile .nm { max-width: 100%; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .mt { max-width: 100%; margin-top: -6px; font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .rm { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: none; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: var(--text); }
.tile .rm .i { width: 12px; height: 12px; }
.tile .rm:hover { background: #e11d48; }
.tiles.edit .rm { display: grid; }
.tiles.edit .tile { animation: wiggle 0.5s ease-in-out infinite alternate; }
.no-motion .tiles.edit .tile { animation: none; }
@keyframes wiggle { from { transform: rotate(-0.8deg); } to { transform: rotate(0.8deg); } }
.empty { grid-column: 1 / -1; padding: 24px; color: var(--faint); }

.tips { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; color: var(--faint); font-size: 12px; }
.tips kbd { margin: 0 2px; }

/* ---------- Error view ---------- */
.errorview { position: absolute; inset: 0; display: none; place-items: center; padding: 20px; background: radial-gradient(60% 60% at 50% 40%, rgba(var(--accent-rgb), 0.1), transparent), rgba(8, 5, 16, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.errorview.show { display: grid; }
.errorview .card { width: min(560px, 100%); padding: 30px; border-radius: 24px; text-align: center; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise 0.4s ease-out both; }
.err-ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3); }
.err-ico .i { width: 26px; height: 26px; }
.errorview h2 { font-family: var(--display); font-size: 22px; }
.err-url { margin-top: 8px; color: var(--accent); font-size: 13px; word-break: break-all; }
.err-msg { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); color: var(--muted); font-size: 12.5px; text-align: left; word-break: break-word; max-height: 130px; overflow: auto; }
.errorview .row { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hint { margin-top: 16px; font-size: 12.5px; color: var(--faint); }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 13px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); transition: background 0.15s, transform 0.1s; }
.btn:hover { background: rgba(255, 255, 255, 0.15); }
.btn:active { transform: scale(0.97); }
.btn.primary { color: #120a24; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #fda4af; border-color: rgba(244, 63, 94, 0.35); background: rgba(244, 63, 94, 0.1); }
.btn.danger:hover { background: rgba(244, 63, 94, 0.2); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.btn .i { width: 15px; height: 15px; }

/* ---------- Menu ---------- */
.menu { position: fixed; top: 108px; right: 18px; z-index: 40; width: 260px; padding: 6px; border-radius: 16px; background: rgba(20, 13, 36, 0.9); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.97); transform-origin: top right; transition: opacity 0.16s, transform 0.16s, visibility 0s 0.16s; }
.menu.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-align: left; font-weight: 500; }
.menu button:hover { background: rgba(var(--accent-rgb), 0.16); }
.menu button .i { color: var(--muted); }
.menu button kbd { margin-left: auto; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }

/* ---------- Side panel ---------- */
.scrim { position: fixed; inset: 0; z-index: 44; background: rgba(5, 2, 12, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0s 0.25s; }
.scrim.show { opacity: 1; visibility: visible; transition-delay: 0s; }
.panel { position: fixed; top: 10px; right: 10px; bottom: 10px; z-index: 50; width: min(420px, calc(100vw - 20px)); display: flex; flex-direction: column; border-radius: 22px; background: rgba(18, 11, 33, 0.88); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); box-shadow: var(--shadow); transform: translateX(110%); visibility: hidden; transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.38s; }
.panel.open { transform: none; visibility: visible; transition-delay: 0s; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--display); font-size: 18px; }
.panel-body { flex: 1; overflow-y: auto; padding: 8px 14px 26px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }

.group { margin-top: 18px; }
.group > h3 { margin: 0 8px 8px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.field { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); margin-bottom: 8px; }
.field .lbl { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.field small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; font-size: 12px; line-height: 1.4; }
.field input[type='text'], .field select, .field textarea { width: 100%; margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); outline: 0; }
.field input[type='text']:focus, .field select:focus, .field textarea:focus { border-color: rgba(var(--accent-rgb), 0.7); }
.field textarea { min-height: 78px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.field select option { background: #1a0f2e; color: #fff; }
.field .two { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.field input[type='range'] { width: 100%; margin-top: 10px; accent-color: var(--accent); }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.swatch { width: 40px; height: 40px; border-radius: 13px; padding: 3px; border: 2px solid transparent; transition: transform 0.15s, border-color 0.15s; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 9px; background: linear-gradient(135deg, var(--a), var(--b)); }
.swatch:hover { transform: scale(1.08); }
.swatch.on { border-color: #fff; }

.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 4px; margin-top: 10px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
.seg button { padding: 8px 4px; border-radius: 9px; font-weight: 600; font-size: 12.5px; color: var(--muted); transition: background 0.15s, color 0.15s; }
.seg button.on { color: #120a24; background: linear-gradient(135deg, var(--accent), var(--accent2)); }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.switch input:checked + i { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.relay { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); margin-top: 8px; }
.relay .nfo { flex: 1; min-width: 0; }
.relay b { font-weight: 600; }
.relay small { display: block; color: var(--faint); margin: 0; }
.rstat { font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--faint); }
.rstat.ok { color: #4ade80; }
.rstat.bad { color: #fb7185; }

.list { display: flex; flex-direction: column; gap: 2px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.item:hover { background: rgba(255, 255, 255, 0.07); }
.item .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.item .tx { flex: 1; min-width: 0; }
.item .tx b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tx small { display: block; color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .del { opacity: 0; color: var(--muted); }
.item:hover .del { opacity: 1; }
.day { margin: 16px 10px 6px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.search-in { width: 100%; margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); outline: 0; }
.search-in:focus { border-color: rgba(var(--accent-rgb), 0.7); }
.panel-empty { padding: 44px 20px; text-align: center; color: var(--faint); }

.prose { padding: 4px 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.prose h4 { margin: 18px 0 6px; color: var(--text); font-size: 14px; }
.prose p { margin-bottom: 8px; }
.prose ul { padding-left: 18px; margin-bottom: 8px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.prose pre { margin: 8px 0; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); overflow: auto; max-height: 260px; font-size: 11.5px; line-height: 1.5; color: #d9d2ee; }
.prose .warn { padding: 10px 12px; border-radius: 12px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25); color: #fcd34d; }
.kbds { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(92vw, 460px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: rgba(22, 14, 40, 0.92); box-shadow: var(--shadow); font-weight: 500; opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.25s, transform 0.25s; max-width: 100%; }
.toast.in { opacity: 1; transform: none; }
.toast .i { color: #4ade80; }
.toast.warn .i { color: #fbbf24; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg0); z-index: 999; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .pill span { display: none; }
  .pill { padding: 0 9px; }
}
@media (max-width: 720px) {
  .app { padding: 6px; gap: 6px; }
  .hide-sm { display: none; }
  .brand-name { display: none; }
  .brand { padding: 0 6px; }
  .tab { flex-basis: 150px; }
  .toolbar { padding: 6px; gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }
  .hsearch { height: 54px; padding-left: 16px; }
  .hsearch .chip { display: none; }
  .menu { top: 96px; right: 10px; }
  .home { padding-top: 3vh; }
}
@media (max-width: 420px) {
  .tab { flex-basis: 110px; }
  .tab .x { opacity: 1; }
  .nav .icon-btn:nth-child(2) { display: none; }
}


/* ==========================================================================
   v1.1 — logo, section row, pages, tools, apps, gear + settings frame
   ========================================================================== */

/* ---------- Logo ---------- */
.brand-logo { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.65)); }
.hero-logo { width: 84px; height: 84px; margin-top: 2vh; object-fit: contain; filter: drop-shadow(0 0 26px rgba(var(--accent-rgb), 0.75)); animation: float 6s ease-in-out infinite; }
.hero-logo:not([src]) { display: none; }
.hero-logo + .eyebrow { margin-top: 12px; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.no-motion .hero-logo { animation: none; }
.tab .fav.logo { background: none; }

/* ---------- Section row under the address bar ---------- */
.toolbar { border-radius: 0; }
.pagenav { display: flex; gap: 4px; padding: 6px 8px 8px; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; overflow-x: auto; scrollbar-width: none; }
.pagenav::-webkit-scrollbar { display: none; }
.pn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 15px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; transition: background 0.15s, color 0.15s, transform 0.1s; }
.pn .i { width: 16px; height: 16px; }
.pn:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.pn:active { transform: scale(0.96); }
.pn[aria-current='page'] { color: #120a24; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), 0.9); }
.loadbar { bottom: 46px; }

/* ---------- Pages ---------- */
.page { position: absolute; inset: 0; display: none; overflow-y: auto; padding: 26px clamp(16px, 4vw, 44px) 44px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.viewport[data-page='games'] #page-games { display: flex; }
.viewport[data-page='tools'] #page-tools,
.viewport[data-page='apps'] #page-apps,
.viewport[data-page='partners'] #page-partners { display: block; }
.viewport:not([data-page='browser']) :is(.home, .frames, .errorview, .hostbar) { display: none !important; }
.wrap, .ph { max-width: 1100px; margin-left: auto; margin-right: auto; }
.ph { margin-bottom: 20px; }
.ph h1 { font-family: var(--display); font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.02em; }
.ph p { margin-top: 6px; color: var(--muted); }
.blank { max-width: 1100px; margin: 0 auto; color: var(--faint); }
.sec { margin: 28px 0 12px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.note { margin: 0 0 6px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.25); color: var(--muted); font-size: 12.5px; }
.grow { flex: 1; }

/* ---------- Games ---------- */
#page-games { padding: 0; overflow: hidden; flex-direction: column; }
.gbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; flex: none; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.gbar b { font-family: var(--display); }
.gwrap { position: relative; flex: 1; min-height: 0; background: #0b0613; }
.gframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0b0613; }
.gload { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; color: var(--muted); background: #0b0613; }

/* ---------- Tool cards + tool UI ---------- */
.tcard { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; text-align: left; background: var(--glass); border: 1px solid var(--line); transition: transform 0.2s, background 0.2s, border-color 0.2s; }
.tcard:hover { transform: translateY(-3px); background: var(--glass-2); border-color: rgba(var(--accent-rgb), 0.5); }
.tcard .em { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; flex: none; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.08)); border: 1px solid var(--line); }
.tcard b { display: block; font-weight: 600; }
.tcard small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tool-head h2 { font-family: var(--display); font-size: 22px; }
.tbody { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.tbody textarea, .tbody input[type='text'], .tbody input[type='number'], .tbody input[type='datetime-local'], .tbody select { width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); outline: 0; }
.tbody textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }
.tbody textarea:focus, .tbody input:focus, .tbody select:focus { border-color: rgba(var(--accent-rgb), 0.7); }
.tbody select option { background: #1a0f2e; color: #fff; }
.tbody label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tbody input[type='range'] { accent-color: var(--accent); width: 100%; }
.tbody input[type='color'] { width: 100%; height: 42px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 13px; }
.drop { display: grid; place-items: center; gap: 4px; padding: 30px 16px; text-align: center; border-radius: 18px; cursor: pointer; border: 2px dashed rgba(var(--accent-rgb), 0.45); background: rgba(var(--accent-rgb), 0.06); color: var(--muted); font-weight: 400; font-size: 13px; transition: background 0.15s, border-color 0.15s; }
.drop strong { color: var(--text); font-size: 15px; }
.drop:hover, .drop.over { background: rgba(var(--accent-rgb), 0.14); border-color: var(--accent); }
.tlist { display: flex; flex-direction: column; gap: 8px; }
.trow2 { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.trow2 img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; background: rgba(0, 0, 0, 0.3); flex: none; }
.trow2 .tx { flex: 1; min-width: 0; }
.trow2 b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow2 small { color: var(--muted); font-size: 12px; }
.tout { padding: 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); font: 600 20px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; min-height: 58px; }
.meter { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #f43f5e, #fbbf24, #4ade80); transition: width 0.2s; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stats > div, .stats > button { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); text-align: left; }
.stats b { display: block; font-size: 20px; font-family: var(--display); word-break: break-all; }
.stats span { color: var(--muted); font-size: 12px; }
.stats > button:hover { border-color: rgba(var(--accent-rgb), 0.6); }
.tmsg { font-size: 13px; color: var(--muted); min-height: 18px; }
.tmsg.ok { color: #4ade80; }
.tmsg.bad { color: #fb7185; }
.bigclock { font: 700 clamp(36px, 8vw, 64px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.swatch-big { height: 74px; border-radius: 16px; border: 1px solid var(--line); }
.tsplit { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tpanel { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.tpanel h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.laps { max-height: 140px; overflow: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

/* ---------- Apps ---------- */
.apps-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.apps-top .search-in { margin: 0; flex: 1; min-width: 200px; }
.addapp { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; margin: 10px 0 4px; }
.addapp input { padding: 9px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); outline: 0; min-width: 0; }
.addapp input:focus { border-color: rgba(var(--accent-rgb), 0.7); }
.acard { display: flex; align-items: center; gap: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); transition: transform 0.2s, background 0.2s, border-color 0.2s; min-width: 0; }
.acard:hover { transform: translateY(-3px); background: var(--glass-2); border-color: rgba(var(--accent-rgb), 0.5); }
.acard .main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; }
.acard .av { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 18px; color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.acard .tx { min-width: 0; }
.acard b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard { position: relative; }
.acard .side { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; opacity: 0; border-radius: 10px; background: rgba(18, 11, 33, 0.92); transition: opacity 0.15s; }
.acard:hover .side, .acard:focus-within .side { opacity: 1; }
@media (hover: none) { .acard .side { opacity: 1; } }

/* ---------- Hosted-proxy hint ---------- */
.hostbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; display: none; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 8px 8px 8px 14px; border-radius: 999px; font-size: 12.5px; background: rgba(20, 13, 36, 0.92); border: 1px solid rgba(var(--accent-rgb), 0.5); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.hostbar.show { display: flex; }
.hostbar b { color: var(--accent); font-weight: 600; word-break: break-all; }

/* ---------- Footer gear + settings frame ---------- */
.foot { display: flex; align-items: center; justify-content: space-between; flex: none; height: 24px; padding: 0 4px; color: var(--faint); font-size: 11px; }
.gear { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--faint); transition: color 0.2s, background 0.2s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gear .i { width: 15px; height: 15px; }
.gear:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.gear.on { color: var(--accent); transform: rotate(90deg); }
.sframe { position: fixed; left: 12px; bottom: 44px; z-index: 60; width: min(440px, calc(100vw - 24px)); max-height: min(660px, calc(100dvh - 120px)); display: flex; flex-direction: column; border-radius: 20px; background: rgba(18, 11, 33, 0.92); border: 1px solid var(--line); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.97); transform-origin: bottom left; transition: opacity 0.2s, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.28s; }
.sframe.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sframe-head { padding: 14px 20px 10px; border-bottom: 1px solid var(--line); }
.sframe-head h2 { font-family: var(--display); font-size: 17px; }

@media (max-width: 720px) {
  .pn { padding: 0 12px; }
  .addapp { grid-template-columns: 1fr; }
  .sframe { left: 6px; bottom: 40px; width: calc(100vw - 12px); }
}


/* ═══════════════ v1.02 ═══════════════ */

/* ---------- Bean cursor (the 1x / 2x images are inlined, no extra files) ---------- */
:root {
  --cur1: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAWCAMAAACScr5LAAAAkFBMVEU1LkFdXVikzx0yMjY9UA9PP291oCGCrx6UlJTi4sYAAACQuyOawyeKtxyjyCyq0ysJCA1QaRMGARMHBRB6qhoLCwtHXBFqiBp2mBwJAxgVGgsdJgssNw42Sg2UxB3///9+sBscFC16nCEKBR4UDSgZFShGRklPcxMlLQ4rJzd/f3JwiCKAnSGFpyISCSkjHjOk3qoXAAAAMHRSTlMhF/o4/xD//wwJAP7+/v77zv6QsP/k//7/dPX+///8A/85/1xEQyP//ysV////NzJO7TjVAAABiklEQVR42nWSiXLcIAyGSXqDkDgM2F7be+8mTdK+/9tVknd7zDSMPWPQx6/Dv7HvrnMKJV+sNe/Evx7DprY+lsv/ke0+lam5BYBiVuQ0HH98+h1+PiYW6BC8A+dgszf2IU91fhpDTsOQUg7jHHsPCwPADNVkbI6PRIt/bbHWGlvPIQDvGZAXWjan6RHRAxIRLEQIoi6Ed44f6INJkdAvKBf5TOT1Mgjq+LgvJjTy/ClRvoNwCzrdMitIj56rFwIBEVTG6x4OV5BE5U2TeJVAEfC7dQsQI1JMprzSehdlMdF13c6txcyfAZ7OJr8wIh0I4zwDjO24FMDuyj2HrUmVhBCZO6DMWjhsztb8HDkxC6z1+J3MQzhtnOYkfzpXcnjrwa3zkiEIQjF8E+ShvJBk1pF1Oh9VcEA1fLfqlw+FBwxakCqti5kpC6FmuAQxx5pD+2ZNeotj2to7YrcDO+QgTfF/5Nd9afOYn28Ourtuzz6aYzsc+nb9OI1h+GNH85cbhxxKCSEPp3/s+gs9Uywl4LVONQAAAABJRU5ErkJggg==");
  --cur2: url("data:image/png;base64,iVBORw0KGgoAA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cbGfpBN0TpUVVgXIHfz5W4FkcIzJZk7ZSAyFqi7gJE30gNnaoIa5NnBUqbk6SR+XsPeZj5Ml0eBu5Rj2EjrrVlYB82apWGdowTEs6CMoGMtXnN9tj5Kl02tqMzHEFxMe0RZm3tZA3YaalA87sdOHezfOfg2oqYNIsjzeu12uYarFREJTx6AWsHfXC6Ygh9/p+CvtuNK/uA+x5dzL3bSH12FOgSpPaluqGR63eOz5UabD8GSjeV11seB8mJ7LO4RIou7hwlJor0wYm0+5a/UDzpwNvFiemViawNHWkZisT2Xa/G864QSA/GDi/A61sjI+4pc4lNyt6fJrcRrshTUNlr79u5G/V/wBNk3d1TSMjBrVNeZ/P9LBfzLJvp+TfgUa6+Lll9Q4LcDJiXtLw+vEc/8GPCBE3nz/NDouuX3V9t/hrds2SIl+Xv/pV4D8+E2pZnqc9GwAAAABJRU5ErkJggg==");
}
html.bean-cursor, html.bean-cursor body, html.bean-cursor * {
  cursor: var(--cur1) 7 5, auto;
  cursor: -webkit-image-set(var(--cur1) 1x, var(--cur2) 2x) 7 5, auto;
  cursor: image-set(var(--cur1) 1x, var(--cur2) 2x) 7 5, auto;
}
html.bean-cursor a, html.bean-cursor button, html.bean-cursor [role='button'], html.bean-cursor label, html.bean-cursor select, html.bean-cursor summary,
html.bean-cursor input[type='checkbox'], html.bean-cursor input[type='range'], html.bean-cursor input[type='color'], html.bean-cursor .switch, html.bean-cursor .tile, html.bean-cursor .acard * {
  cursor: var(--cur-h1) 9 6, pointer;
  cursor: -webkit-image-set(var(--cur-h1) 1x, var(--cur-h2) 2x) 9 6, pointer;
  cursor: image-set(var(--cur-h1) 1x, var(--cur-h2) 2x) 9 6, pointer;
}
html.bean-cursor input[type='text'], html.bean-cursor input[type='email'], html.bean-cursor input[type='password'], html.bean-cursor input[type='number'],
html.bean-cursor input[type='url'], html.bean-cursor input[type='search'], html.bean-cursor input[type='datetime-local'], html.bean-cursor textarea { cursor: text; }
html.bean-cursor .frame, html.bean-cursor iframe { cursor: auto; }

/* ---------- Interactive background ---------- */
.bg .fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bg .glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), rgba(var(--accent-rgb), 0.17), transparent 70%); }
html.glow-on .bg .glow { opacity: 1; }
.tile, .acard, .tcard, .pcard { overflow: hidden; }
.tile::before, .acard::before, .tcard::before, .pcard::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.25s; background: radial-gradient(200px circle at var(--px, 50%) var(--py, 0%), rgba(var(--accent-rgb), 0.22), transparent 70%); }
.tile:hover::before, .acard:hover::before, .tcard:hover::before, .pcard:hover::before { opacity: 1; }
.tcard { position: relative; }
.no-motion .bg .fx, .no-motion .bg .glow { display: none; }

/* ---------- Home: add-site tile ---------- */
.tile.add { border-style: dashed; justify-content: center; color: var(--muted); }
.tile.add .av { background: rgba(var(--accent-rgb), 0.14); box-shadow: none; color: var(--accent); font-size: 26px; font-weight: 500; text-shadow: none; border: 1px dashed rgba(var(--accent-rgb), 0.5); }
.tile.add:hover { color: var(--text); }
.tiles.edit .tile.add { animation: none; opacity: 0.5; }
.tile .pin { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--accent-rgb), 0.25); color: var(--accent); font-size: 9px; line-height: 1; }

/* ---------- Footer: version, credits, account ---------- */
.foot-l { display: flex; align-items: center; gap: 4px; min-width: 0; }
.foot-btn { height: 24px; padding: 0 9px; border-radius: 8px; font-size: 11px; font-weight: 500; color: var(--faint); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.foot-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.foot-btn.on { color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.foot-note { white-space: nowrap; }
.cframe { transform-origin: bottom left; }
.credit-intro { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.credit-list { display: grid; gap: 8px; }
.credit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.credit .av { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.credit .tx { min-width: 0; }
.credit b { display: block; font-weight: 600; }
.credit b a { text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), 0.6); text-underline-offset: 3px; }
.credit b a:hover { color: var(--accent); }
.credit small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Users online pill ---------- */
.pagenav { position: relative; }
.online { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px 0 11px; border-radius: 999px; font-size: 12.5px; color: var(--muted); background: rgba(8, 5, 16, 0.72); border: 1px solid var(--line); white-space: nowrap; flex: none; }
.online b { color: #a3e635; font-weight: 700; font-variant-numeric: tabular-nums; }
.online .dot { width: 9px; height: 9px; border-radius: 50%; background: #a3e635; box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.18), 0 0 12px rgba(163, 230, 53, 0.8); }
.online:not(.live) .dot { background: #8a8f99; box-shadow: none; }
.online:not(.live) b { color: var(--muted); }
.online.live .dot { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(163, 230, 53, 0), 0 0 14px rgba(163, 230, 53, 0.9); } }
.no-motion .online .dot { animation: none; }

/* ---------- Partners ---------- */
.pgrid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.pcard { position: relative; display: flex; align-items: center; gap: 22px; padding: 22px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.pcard:hover { transform: translateY(-3px); background: var(--glass-2); border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 22px 46px -22px rgba(var(--accent-rgb), 0.6); }
.plogo { width: 84px; height: auto; flex: none; border-radius: 18px; background: #0c1208; padding: 6px; box-shadow: inset 0 0 0 1px var(--line); object-fit: contain; }
.ptx { min-width: 0; position: relative; }
.ptx h2 { font-family: var(--display); font-size: 22px; letter-spacing: -0.01em; }
.ptx p { margin: 6px 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 520px) { .pcard { flex-direction: column; align-items: flex-start; } }

/* ---------- Dialogs ---------- */
.dlg { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(5, 3, 10, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity 0.22s, visibility 0s 0.22s; }
.dlg.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.dlg-card { width: min(420px, 100%); margin: auto; padding: 24px; border-radius: 24px; background: rgba(20, 12, 38, 0.94); border: 1px solid var(--line); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), 0.12); transform: translateY(14px) scale(0.97); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dlg.open .dlg-card { transform: none; }
.dlg-card h2 { font-family: var(--display); font-size: 20px; letter-spacing: -0.01em; }
.dlg-card .sub { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fld { display: block; margin-top: 14px; }
.fld > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.fld > span i { font-style: normal; font-weight: 400; color: var(--faint); }
.fld input { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); outline: 0; transition: border-color 0.15s, box-shadow 0.15s; }
.fld input:focus { border-color: rgba(var(--accent-rgb), 0.8); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.dlg .err { min-height: 18px; margin-top: 10px; color: #fda4af; font-size: 12.5px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- Sign-in / sign-up ---------- */
.auth { z-index: 300; }
.auth-card { width: min(410px, 100%); padding: 26px 26px 22px; }
.auth-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.auth-top img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(var(--accent-rgb), 0.5)); }
.auth-top h2 { font-size: 21px; margin-top: 4px; }
.auth-top p { color: var(--muted); font-size: 13px; }
.atabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 18px; border-radius: 13px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.atabs button { height: 34px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--muted); transition: background 0.15s, color 0.15s; }
.atabs button.on { color: var(--text); background: rgba(var(--accent-rgb), 0.22); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4); }
.gbtn { width: 100%; height: 44px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; font-weight: 600; font-size: 14px; color: #1f1f1f; background: #fff; transition: filter 0.15s, transform 0.1s; }
.gbtn:hover { filter: brightness(0.94); }
.gbtn:active { transform: scale(0.98); }
.gbtn svg { width: 18px; height: 18px; }
.gslot { margin-top: 16px; display: flex; justify-content: center; min-height: 44px; }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0 2px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pwrap { position: relative; }
.pwrap input { padding-right: 56px; }
.pwrap button { position: absolute; right: 6px; top: 6px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 12px; color: var(--muted); }
.pwrap button:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.auth-submit { width: 100%; justify-content: center; height: 44px; margin-top: 4px; border-radius: 999px; font-size: 14px; }
.auth-submit[disabled] { opacity: 0.6; pointer-events: none; }
.arow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.chk { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); user-select: none; }
.chk input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.3); display: grid; place-content: center; transition: background 0.15s, border-color 0.15s; flex: none; }
.chk input:checked { background: var(--accent); border-color: var(--accent); }
.chk input:checked::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #120a24; border-bottom: 2px solid #120a24; transform: rotate(-45deg) translate(1px, -1px); }
.chk input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.linkbtn { font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }
.guest { display: block; margin: 16px auto 0; font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(var(--accent-rgb), 0.7); }
.guest:hover { color: var(--text); }
.auth-note { margin-top: 12px; text-align: center; color: var(--faint); font-size: 11.5px; line-height: 1.5; }

/* ---------- Settings: account & colour pickers ---------- */
.acct { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.acct .av { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; font-weight: 700; color: #fff; overflow: hidden; }
.acct .av img { width: 100%; height: 100%; object-fit: cover; }
.acct b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .tx { min-width: 0; }
.cpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.cpick label { display: grid; gap: 6px; font-size: 11.5px; color: var(--muted); }
.cpick input[type='color'] { width: 100%; height: 36px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
.swatch .pal { font-style: normal; display: grid; place-items: center; height: 100%; color: #fff; font-size: 15px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
@media (max-width: 640px) { .online span { display: none; } .online { padding: 0 11px 0 10px; } .foot-btn { padding: 0 6px; } }

/* ---------- v1.03: games dropdown, hosted picker, coming-soon, info pop-up ---------- */
.pn .chev { width: 13px; height: 13px; margin-left: -2px; opacity: 0.8; transition: transform 0.2s; }
.pn[aria-expanded='true'] .chev { transform: rotate(180deg); }
.gmenu { top: 0; right: auto; left: 0; width: 190px; z-index: 60; }
.viewport[data-page='gba'] #page-games { display: flex; }
.viewport[data-page='cloud'] #page-soon, .viewport[data-page='single'] #page-soon { display: flex; }
.soon { margin: auto; text-align: center; padding: 40px 20px; }
.soon h1 { font-family: var(--display); font-size: clamp(30px, 6vw, 54px); letter-spacing: -0.02em; }
.hostbar { flex-wrap: wrap; justify-content: center; border-radius: 20px; padding: 10px 10px 10px 16px; row-gap: 8px; }
.hostpick { display: flex; flex-wrap: wrap; gap: 6px; }
.hostpick button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); transition: background 0.2s, color 0.2s; }
.hostpick button:hover { color: var(--text); background: rgba(255, 255, 255, 0.13); }
.hostpick button.on { color: #120a24; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.foot-r { display: flex; align-items: center; gap: 4px; }
.foot-info { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); transition: color 0.2s, background 0.2s; }
.foot-info .i { width: 14px; height: 14px; }
.foot-info:hover, .foot-info[aria-expanded='true'] { color: var(--accent); background: rgba(var(--accent-rgb), 0.14); }
.infopop { position: fixed; right: 14px; bottom: 38px; z-index: 60; width: min(340px, calc(100vw - 28px)); padding: 14px 16px; border-radius: 16px; font-size: 12.5px; line-height: 1.55; color: var(--text); background: rgba(20, 13, 36, 0.94); border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s; }
.infopop.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.credit-h { margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.auth-restore { display: block; margin: 8px auto 0; font-size: 11.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.auth-restore:hover { color: var(--text); }

/* ---------- v1.04: AI page, fixed shortcuts ---------- */
.viewport[data-page='ai'] #page-games { display: flex; }
.tiles { grid-template-columns: repeat(3, 1fr); }
.tile .nm { white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
