* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Tokens ───────────────────────────────────────────────────────────────── */

:root {
  --orange:        #f97316;
  --orange-mid:    #fb923c;
  --orange-dim:    #ea580c;
  --orange-soft:   #fff7ed;
  --orange-border: #fed7aa;
  --bg:            #ffffff;
  --surface:       #fafaf9;
  --border:        #e8e8e8;
  --text:          #0f0f13;
  --muted:         #888888;
  --sub:           #555555;
  --serif:         'Playfair Display', Georgia, 'Times New Roman', serif;
  --grad:          linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --grad-glow:     0 4px 20px rgba(249,115,22,0.2);
}

html, body {
  height: 100%; width: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #111111;
  color: #e8e8e8;
  overflow: hidden;
}

/* ── Landing screen ───────────────────────────────────────────────────────── */

#landing-screen {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

@keyframes bgLabelWobble {
  0%   { transform: translateY(0px)    scale(1)      rotate(0deg); }
  20%  { transform: translateY(-8px)   scale(1.012)  rotate(0.4deg); }
  45%  { transform: translateY(5px)    scale(0.994)  rotate(-0.3deg); }
  65%  { transform: translateY(-4px)   scale(1.007)  rotate(0.2deg); }
  80%  { transform: translateY(3px)    scale(0.998)  rotate(-0.15deg); }
  100% { transform: translateY(0px)    scale(1)      rotate(0deg); }
}

#tab-bg-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(120px, 18vw, 260px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  opacity: 0.028;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
  animation: bgLabelWobble 7s ease-in-out infinite;
  transition: opacity 0.35s ease;
}
#tab-bg-label.fade-out {
  opacity: 0;
}

/* ── Home screen ──────────────────────────────────────────────────────────── */

#home-screen {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg);
  overflow: hidden;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.ls-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10 !important;
}

.ls-nav-left { display: flex; align-items: center; gap: 4px; }

.nav-dots {
  background: none; border: none;
  color: var(--muted); font-size: 20px; font-weight: 700;
  cursor: pointer; padding: 2px 8px; border-radius: 8px;
  letter-spacing: 1px; line-height: 1;
  transition: color 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
}
.nav-dots:hover { color: var(--orange); }

/* ── Side panel ───────────────────────────────────────────────────────────── */

@keyframes spItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

#sp-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.32s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#sp-overlay.open { opacity: 1; pointer-events: all; }

#side-panel {
  position: fixed; top: 14px; left: 14px; bottom: 14px; z-index: 401;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  transform: translateX(calc(-100% - 28px));
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
  padding: 26px 22px 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.18);
  overflow: hidden;
}
#side-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), #fbbf24, var(--orange));
  border-radius: 24px 24px 0 0;
  opacity: 0.7;
}
#side-panel.open { transform: translateX(0); }
#side-panel.open .sp-item,
#side-panel.open .sp-rule,
#side-panel.open .sp-account-bar { animation: spItemIn 0.4s cubic-bezier(0.22,1,0.36,1) both; }
#side-panel.open .sp-nav > *:nth-child(1)  { animation-delay: 0.05s; }
#side-panel.open .sp-nav > *:nth-child(2)  { animation-delay: 0.09s; }
#side-panel.open .sp-nav > *:nth-child(3)  { animation-delay: 0.13s; }
#side-panel.open .sp-nav > *:nth-child(4)  { animation-delay: 0.17s; }
#side-panel.open .sp-nav > *:nth-child(5)  { animation-delay: 0.21s; }
#side-panel.open .sp-nav > *:nth-child(6)  { animation-delay: 0.25s; }
#side-panel.open .sp-nav > *:nth-child(7)  { animation-delay: 0.29s; }
#side-panel.open .sp-nav > *:nth-child(8)  { animation-delay: 0.33s; }
#side-panel.open .sp-nav > *:nth-child(9)  { animation-delay: 0.37s; }

.sp-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px; padding: 0 4px;
}
.sp-brand {
  font-size: 22px; font-weight: 700; color: var(--text);
  font-family: var(--serif); letter-spacing: -0.5px;
}
.sp-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  line-height: 1; flex-shrink: 0;
}
.sp-close:hover { color: var(--text); background: var(--surface); border-color: var(--text); }

.sp-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.sp-item {
  background: none; border: none; text-align: left;
  cursor: pointer; text-decoration: none; display: block;
  font-family: var(--serif);
  font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  transition: color 0.18s, background 0.18s; line-height: 1.2;
}
.sp-item:hover { color: var(--orange); background: rgba(249,115,22,0.07); }

.sp-rule { height: 1px; background: var(--border); margin: 8px 4px; opacity: 0.5; }


.sp-disconnect { color: #f87171 !important; font-size: 20px !important; }
.sp-disconnect:hover { color: #f87171 !important; background: rgba(239,68,68,0.08) !important; }

/* ── Sidebar account bar ─────────────────────────────────────────────────── */
.sp-account-bar {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px; position: relative;
  cursor: pointer; transition: background 0.18s;
}
.sp-account-bar:hover { background: rgba(249,115,22,0.07); }
.sp-account-bar:hover .sp-acct-name { color: var(--orange); }
.sp-acct-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--orange); color: #fff;
  font-size: 14px; font-weight: 700; font-family: var(--serif);
  display: flex; align-items: center; justify-content: center;
}
.sp-acct-name {
  flex: 1; font-family: var(--serif);
  font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.2; transition: color 0.18s;
}
.sp-acct-dots {
  background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; line-height: 1;
  padding: 2px 5px; border-radius: 8px;
  transition: color .15s, background .15s; flex-shrink: 0;
}
.sp-acct-dots:hover { color: var(--text); background: rgba(249,115,22,0.1); }
.sp-account-menu {
  display: none; flex-direction: column; gap: 2px;
  position: absolute; bottom: calc(100% + 4px); left: 0; right: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 6px; z-index: 10;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.sp-account-menu.open { display: flex; }
.sp-acct-mi {
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--text); padding: 10px 12px; border-radius: 10px;
  transition: color .18s, background .18s; line-height: 1.2;
}
.sp-acct-mi:hover { color: var(--orange); background: rgba(249,115,22,0.07); }
.sp-acct-mi-red { color: #f87171 !important; }
.sp-acct-mi-red:hover { color: #f87171 !important; background: rgba(239,68,68,0.08) !important; }

/* ── Auth tab ─────────────────────────────────────────────────────────────── */

.auth-mode-tabs {
  display: flex; gap: 0; margin-bottom: 22px;
  border-bottom: 1px solid #2a2a3a;
}

.auth-mode-btn {
  background: none; border: none;
  color: var(--muted);
  font-size: 14px; font-weight: 600;
  padding: 0 0 10px;
  margin-right: 22px; margin-bottom: -1px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.auth-mode-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

.auth-err { min-height: 20px; font-size: 13px; color: #ef4444; margin-top: 10px; }

/* ── Logo ─────────────────────────────────────────────────────────────────── */

.ls-nav-logo-img { height: 36px; width: auto; display: block; }

.ls-nav-logo {
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--text);
  font-family: var(--serif);
}

.ls-nav-dl {
  font-size: 13px; font-weight: 600;
  color: var(--orange); text-decoration: none;
  transition: opacity 0.15s;
}
.ls-nav-dl:hover { opacity: 0.72; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */

.ls-tabs { display: flex; gap: 0; align-items: center; }
.ls-tabs-version { font-size: 10px; color: var(--muted); opacity: 0.5; margin-left: 10px; user-select: none; }

.ls-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  padding: 0 18px; height: 64px;
  font-size: 14px; font-family: 'Inter', system-ui, sans-serif;
  color: var(--muted); cursor: pointer; font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}
.ls-tab:hover  { color: var(--orange); }
.ls-tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 700; }

/* ── Body grid ────────────────────────────────────────────────────────────── */

.ls-body {
  display: flex;
  justify-content: center;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.ls-left {
  display: flex; flex-direction: column; gap: 0;
  padding: 44px 52px 32px 52px;
  overflow-y: auto;
  width: 100%; max-width: 560px;
}

/* ── Typography ───────────────────────────────────────────────────────────── */

.ls-eyebrow {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ls-headline {
  font-size: clamp(38px, 4.4vw, 64px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--text); margin-bottom: 18px;
  font-family: var(--serif);
}

.ls-sub {
  font-size: 13px; line-height: 1.75;
  color: var(--sub); margin-bottom: 26px;
  max-width: 380px;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */

.ls-form { display: flex; gap: 10px; margin-bottom: 14px; }

.ls-form input {
  flex: 1; min-width: 0;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 50px; padding: 14px 20px;
  font-size: 15px; color: var(--text); outline: none;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ls-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,0.1); }
.ls-form input::placeholder { color: #bbb; }

#login-btn {
  padding: 14px 26px; border-radius: 50px; border: none;
  background: var(--orange); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: 'Inter', system-ui, sans-serif;
  transition: opacity 0.15s, transform 0.15s;
}
#login-btn:hover    { opacity: 0.88; transform: translateY(-1px); }
#login-btn:disabled { background: #ccc; cursor: default; transform: none; }

#login-err { font-size: 13px; color: #dc2626; min-height: 20px; }

.ls-download {
  display: inline-block; margin-top: 18px;
  font-size: 13px; color: var(--orange);
  text-decoration: underline; text-underline-offset: 3px;
  transition: opacity 0.15s;
}
.ls-download:hover { opacity: 0.7; }

.ls-credit { margin-top: 28px; font-size: 12px; color: #ccc; }

.ls-back-btn {
  background: none; border: none;
  color: var(--muted); font-size: 13px;
  cursor: pointer; padding: 0; margin-bottom: 18px;
  font-family: 'Inter', system-ui, sans-serif;
  transition: color 0.15s;
}
.ls-back-btn:hover { color: var(--orange); }

/* ── Right preview ────────────────────────────────────────────────────────── */

.ls-right {
  display: flex; flex-direction: column;
  background: linear-gradient(170deg, #1c0c02 0%, #100806 55%, #0c0b0a 100%);
  border-left: 1px solid rgba(249,115,22,0.22);
  padding: 24px;
  overflow: hidden;
  color: #f0f0f0;
}

.ls-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(249,115,22,0.15);
  flex-shrink: 0;
}
.ls-panel-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.ls-badge-live {
  font-size: 10px; font-weight: 700;
  color: var(--orange); letter-spacing: 0.06em;
}

.ls-preview {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: rgba(0,0,0,0.45);
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(249,115,22,0.18);
}
.ls-preview-screen { flex: 1; min-height: 0; background: #111111; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ls-preview-icons  { display: flex; gap: 8px; }
.ls-icon { width: 36px; height: 36px; background: rgba(255,255,255,0.05); border-radius: 10px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.06); }
.ls-icon.wide { width: 72px; }
.ls-preview-window { flex: 1; min-height: 0; background: #181818; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; }
.ls-preview-taskbar { height: 32px; background: #181818; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.ls-win-top  { height: 24px; background: #222222; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.ls-win-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ls-win-line { height: 8px; background: rgba(255,255,255,0.07); border-radius: 4px; flex-shrink: 0; }
.ls-win-line.short { width: 55%; }
.ls-win-line.xs { width: 30%; background: rgba(255,255,255,0.04); }
.ls-preview-stats {
  display: flex; justify-content: space-around;
  padding: 14px; border-top: 1px solid rgba(249,115,22,0.12);
  flex-shrink: 0;
}
.ls-stat { text-align: center; }
.ls-stat-val { display: block; font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.ls-stat-lbl { display: block; font-size: 10px; color: rgba(249,115,22,0.5); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Computer grid ────────────────────────────────────────────────────────── */

.pc-search {
  width: 100%; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 50px;
  padding: 12px 20px; font-size: 14px; color: var(--text);
  outline: none; box-sizing: border-box; margin-bottom: 16px;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pc-search:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,0.1); }

.pc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px;
}

.pc-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 22px 14px 18px;
  cursor: pointer; text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.pc-card:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249,115,22,0.08), 0 12px 32px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}
.pc-card-icon   { font-size: 28px; margin-bottom: 10px; }
.pc-card-name   { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; word-break: break-all; }
.pc-card-status {
  font-size: 11px; color: #16a34a;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-bottom: 10px;
}
.pc-card-owner { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.pc-card-btn   { font-size: 11px; color: var(--muted); font-weight: 500; }
.pc-card:hover .pc-card-btn { color: var(--orange); font-weight: 700; }

.pc-dot     { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; display: inline-block; flex-shrink: 0; }
.pc-loading { font-size: 14px; color: var(--muted); }

/* ── Setup & download ─────────────────────────────────────────────────────── */

.setup-steps { display: flex; flex-direction: column; gap: 18px; margin-bottom: 28px; }
.setup-step  { display: flex; align-items: flex-start; gap: 14px; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-body { font-size: 14px; line-height: 1.6; color: var(--sub); padding-top: 4px; }
.step-body strong { color: var(--text); }

/* ── Setup split layout ───────────────────────────────────────────────────── */

.ls-setup-split {
  position: absolute; inset: 0;
  align-items: center;
  justify-content: center;
  padding: 40px 64px;
  gap: 56px;
  background: transparent;
  overflow-y: auto;
}

.setup-text-col { flex: 0 0 300px; }

.setup-wins-col {
  flex: 0 0 340px;
  display: flex; flex-direction: column;
  gap: 18px;
}

/* ── macOS windows ────────────────────────────────────────────────────────── */

.mac-win {
  width: 100%; max-width: 360px;
  background: #1a1a1a;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 4px 14px rgba(0,0,0,0.35);
  position: relative;
  user-select: none;
  display: flex; flex-direction: column;
}
.mac-win.dragging {
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.5);
  z-index: 10;
}

.mac-resize-grip {
  position: absolute; bottom: 0; right: 0;
  width: 18px; height: 18px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.15) 50%, transparent 50%),
    linear-gradient(135deg, transparent 55%, rgba(255,255,255,0.1) 55%, rgba(255,255,255,0.1) 65%, transparent 65%),
    linear-gradient(135deg, transparent 70%, rgba(255,255,255,0.07) 70%, rgba(255,255,255,0.07) 80%, transparent 80%);
}

.mac-win-bar {
  background: #2a2a2a;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: grab;
}
.mac-win-bar:active { cursor: grabbing; }
.mac-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.mac-win-title {
  flex: 1; text-align: center;
  font-size: 11px; color: rgba(255,255,255,0.38);
  font-family: 'Inter', system-ui, sans-serif;
}

.mac-terminal {
  background: #0c0c0c;
  padding: 12px 14px 8px;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 12px; line-height: 1.8;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mac-term-history {
  flex: 1; overflow-y: auto; min-height: 0;
}
.mac-term-input-row {
  display: flex; align-items: center; gap: 6px;
  padding-top: 4px; flex-shrink: 0;
}
.mac-term-input {
  flex: 1; background: transparent; border: none;
  color: #e8e8e8; font-family: inherit; font-size: inherit;
  outline: none; caret-color: var(--orange); line-height: 1.8;
}
.mac-term-input::placeholder { color: rgba(255,255,255,0.18); }
.mac-term-line { display: flex; gap: 6px; }
.mac-term-prompt { color: var(--orange); flex-shrink: 0; }
.mac-term-dim  { color: rgba(255,255,255,0.4); }
.mac-term-ok   { color: #34d399; }

.mac-win-urlbar {
  background: #222222;
  padding: 6px 14px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mac-url-icon { font-size: 10px; opacity: 0.45; }
.mac-url-text {
  font-size: 12px; color: rgba(255,255,255,0.4);
  font-family: 'Inter', system-ui, sans-serif;
}

.mac-browser {
  background: #141414;
  padding: 14px 16px;
}
.mac-browser-eyebrow {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--orange); margin-bottom: 10px;
  font-family: 'Inter', system-ui, sans-serif;
}
.mac-pc-card-win {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.mac-pc-name {
  font-size: 13px; font-weight: 600; color: #f5f5f5;
  font-family: 'Inter', system-ui, sans-serif;
}
.mac-pc-status { font-size: 11px; color: #34d399; font-family: 'Inter', system-ui, sans-serif; }
.mac-pc-btn {
  margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--orange); font-family: 'Inter', system-ui, sans-serif;
  white-space: nowrap;
}

/* ── Window open animation ────────────────────────────────────────────────── */

@keyframes winOpen {
  from { opacity: 0; transform: translateY(28px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.mac-win.win-enter { animation: winOpen 0.48s cubic-bezier(0.22, 1, 0.36, 1) both; }
.setup-wins-col .mac-win:nth-child(2).win-enter { animation-delay: 0.1s; }

.dl-link { display: block; text-decoration: none; margin-bottom: 16px; }
.dl-btn {
  width: 100%; padding: 15px 28px;
  border-radius: 50px; border: none; cursor: pointer;
  background: var(--orange); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: opacity 0.15s, transform 0.15s;
}
.dl-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.av-notice {
  background: var(--orange-soft); border: 1px solid var(--orange-border);
  border-radius: 14px; padding: 14px 16px;
  font-size: 12px; line-height: 1.65; color: #9a3412; margin-top: 4px;
}

/* ── Server settings ──────────────────────────────────────────────────────── */

.settings-stats  { margin-bottom: 22px; }
.stat-pills      { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill       {
  background: var(--orange-soft); border: 1px solid var(--orange-border);
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; color: var(--orange); font-weight: 600;
}

.settings-group  { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.settings-field  { display: flex; flex-direction: column; gap: 6px; }
.settings-label  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.settings-input  {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 16px; font-size: 14px;
  color: var(--text); outline: none;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,0.1); }
#settings-msg { font-size: 13px; min-height: 20px; margin-top: 4px; }

/* ── Settings extras ──────────────────────────────────────────────────────── */

.pcs-section-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(249,115,22,0.85); margin: 22px 0 10px;
}

.settings-val { font-size: 12px; color: #888; font-weight: 500; }

.settings-range {
  display: block; width: 100%; margin-top: 8px;
  accent-color: var(--orange); cursor: pointer; height: 4px;
}

/* ── Switch list ──────────────────────────────────────────────────────────── */

.switch-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--border); gap: 24px;
}
.switch-info { flex: 1; }
.switch-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.switch-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.settings-toggle {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; user-select: none;
}
.settings-toggle input { display: none; }
.toggle-track {
  width: 44px; height: 24px; border-radius: 12px;
  background: var(--border); position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.settings-toggle input:checked + .toggle-track { background: var(--orange); }
.settings-toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle-lbl { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── Info features ────────────────────────────────────────────────────────── */

.info-feats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.info-feat  {
  font-size: 14px; color: var(--sub);
  padding: 12px 18px;
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.15s;
}
.info-feat:hover { border-color: var(--orange-border); transform: translateX(3px); }

/* ── Plans / Pricing ──────────────────────────────────────────────────────── */

.plans-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.plan-card {
  flex: 1; min-width: 160px; max-width: 220px;
  border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 18px; display: flex; flex-direction: column; gap: 0;
  position: relative; background: var(--surface);
  transition: box-shadow 0.2s, transform 0.2s;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.plan-card-pro   { border-color: var(--orange); }
.plan-card-ultra { border-color: #a855f7; }
.plan-badge {
  position: absolute; top: -10px; left: 16px;
  background: var(--grad); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; letter-spacing: .05em; text-transform: uppercase;
}
.plan-name  { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.plan-price { font-size: 32px; font-weight: 900; color: var(--text); line-height: 1; margin-bottom: 14px; letter-spacing: -1px; }
.plan-period { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan-feats { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex: 1; }
.plan-feats li { font-size: 13px; padding-left: 18px; position: relative; }
.plan-feats li::before { position: absolute; left: 0; }
.feat-yes::before  { content: '✓'; color: #22c55e; }
.feat-no::before   { content: '✗'; color: #ef4444; }
.feat-warn::before { content: '~'; color: var(--orange); }
.plan-cta {
  display: block; width: 100%; padding: 9px 0;
  border-radius: 10px; font-size: 13px; font-weight: 700;
  text-align: center; cursor: pointer; border: none;
}
.plan-cta-current { background: var(--border); color: var(--muted); cursor: default; }
.plan-cta-buy { background: var(--orange); color: #fff; }
.plan-cta-buy:hover { opacity: .88; }
.plan-cta-active { background: #22c55e; color: #fff; cursor: default; }

/* ── Tier badge ───────────────────────────────────────────────────────────── */

.tier-badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  background: var(--border); color: var(--muted);
}
.tier-badge.tier-pro   { background: #fff7ed; color: var(--orange); border: 1px solid var(--orange-border); }
.tier-badge.tier-ultra { background: #faf5ff; color: #a855f7; border: 1px solid #e9d5ff; }

/* ── View timer ───────────────────────────────────────────────────────────── */

.tb-timer { color: #facc15; font-weight: 700; font-size: 12px; cursor: default; }

/* ── Web Proxy tab ────────────────────────────────────────────────────────── */

#tab-proxy {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 9;
}

.px-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 16px; background: var(--bg);
}
.px-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.px-input-wrap:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,0.1); }
.px-globe { font-size: 14px; opacity: 0.45; flex-shrink: 0; line-height: 1; }
.px-input {
  flex: 1; padding: 9px 0; border: none;
  background: transparent; color: var(--text);
  font-size: 14px; font-family: inherit; outline: none;
}
.px-go {
  padding: 8px 18px; border-radius: 20px;
  background: var(--grad); color: #fff; border: none;
  cursor: pointer; font-size: 13px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.px-go:hover { opacity: .88; }
.px-fs {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.px-fs:hover { border-color: var(--orange); color: var(--orange); }
.px-frame-wrap { flex: 1; overflow: hidden; position: relative; }
.px-frame { width: 100%; height: 100%; border: none; background: #fff; display: block; }

/* ── Proxy tabs bar ───────────────────────────────────────────────────────── */

@keyframes pxTabPop {
  0%   { opacity: 0; transform: scale(0.7) translateY(6px); }
  60%  { transform: scale(1.08) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.px-tabs-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: transparent;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.px-tabs-bar::-webkit-scrollbar { display: none; }

#px-tabs-list { display: flex; gap: 6px; align-items: center; }

.px-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: nowrap; max-width: 150px;
  transition: color 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  user-select: none;
  animation: pxTabPop 0.38s cubic-bezier(0.22,1,0.36,1) both;
}
.px-tab:hover {
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.px-tab.active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(249,115,22,0.15), 0 3px 10px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}
.px-tab-title {
  overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0;
}
.px-tab-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 13px; line-height: 1;
  padding: 1px 2px; border-radius: 4px;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}
.px-tab:hover .px-tab-close,
.px-tab.active .px-tab-close { opacity: 1; }
.px-tab-close:hover { color: var(--text); }

.px-tab-add {
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; color: var(--muted);
  font-size: 16px; line-height: 1;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s, transform 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
}
.px-tab-add:hover {
  color: var(--text); border-color: var(--orange);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.px-anon-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 2px 0 6px;
  opacity: 0.6;
  letter-spacing: 0.02em;
}

/* ── Proxy empty state ────────────────────────────────────────────────────── */

#px-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
  pointer-events: none; z-index: 1;
}
#px-empty.hidden { display: none; }
.px-empty-text {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -1px;
  text-align: center;
}
.px-empty-input {
  width: min(420px, 70vw);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 15px; font-family: inherit;
  padding: 8px 2px;
  outline: none;
  text-align: center;
  pointer-events: all;
  transition: border-color 0.2s;
  caret-color: var(--orange);
}
.px-empty-input:focus { border-bottom-color: rgba(255,255,255,0.7); }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .ls-nav { padding: 0 20px; }
  .ls-left { padding: 32px 20px; max-width: 100%; }
  .ls-tab { padding: 0 10px; font-size: 13px; }
}

/* ── Desktop screen ───────────────────────────────────────────────────────── */

#desktop-screen {
  height: 100vh; display: flex; flex-direction: column; background: #000;
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */

#toolbar {
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  z-index: 100; display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#toolbar.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.tb-left   { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.tb-center { display: flex; align-items: center; flex: 1; justify-content: center; }
.tb-right  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.tb-logo {
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  color: #f1f1f1;
  font-family: var(--serif);
}
.tb-divider { width: 1px; height: 16px; background: rgba(255,255,255,0.08); margin: 0 12px; }
.tb-label { font-size: 12px; color: #475569; font-weight: 500; letter-spacing: 0.04em; }

.tb-stat-group {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50px; padding: 0 4px; gap: 0;
}
.tb-stat-item {
  font-size: 12px; color: #94a3b8;
  padding: 5px 13px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tb-conn-item { display: flex; align-items: center; gap: 5px; }
.tb-stat-dot { width: 1px; height: 14px; background: rgba(255,255,255,0.07); flex-shrink: 0; }
.dot-good { color: #10b981; font-size: 10px; }
.dot-bad  { color: #ef4444; font-size: 10px; }

.tb-pill {
  padding: 6px 14px; border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  color: #94a3b8; font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: 'Inter', system-ui, sans-serif;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.tb-pill:hover {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.35);
  color: #fb923c;
}
.tb-pill-danger { border-color: rgba(239,68,68,0.2); color: #f87171; }
.tb-pill-danger:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.45);
  color: #ef4444;
}
select.tb-pill {
  appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  background-color: rgba(255,255,255,0.04); cursor: pointer;
}
select.tb-pill option { background: #0a0a14; color: #e2e8f0; }

/* ── Stream ───────────────────────────────────────────────────────────────── */

#stream-wrap {
  position: relative; flex: 1;
  display: flex; align-items: center; justify-content: center;
  background: #000; cursor: default; overflow: hidden; margin-top: 52px;
}
#stream-canvas { display: block; pointer-events: none; }

#stream-loading {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.stream-loading-text {
  color: rgba(255,255,255,0.6); font-size: 15px;
  letter-spacing: .04em; margin: 0; user-select: none;
}

#click-prompt {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}
.prompt-box {
  text-align: center;
  background: rgba(14,14,14,0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; padding: 40px 52px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}
.prompt-eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 12px;
  font-family: 'Inter', system-ui, sans-serif;
}
.prompt-title {
  font-size: 24px; font-weight: 700; color: #f0f0f0;
  font-family: var(--serif); letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.prompt-sub { font-size: 13px; color: #475569; }

#active-badge {
  position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(16,185,129,0.35);
  color: #10b981; padding: 6px 18px; border-radius: 50px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap; pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(16,185,129,0.1);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; animation: blink 1.2s infinite;
}
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.3;transform:scale(0.85)} }

#remote-cursor {
  position: absolute; width: 0; height: 0;
  pointer-events: none; z-index: 60; display: none;
  transform: translate(-1px, -1px);
}
#remote-cursor::before {
  content: ''; position: absolute;
  left: -7px; top: 0; width: 16px; height: 2px;
  background: white; box-shadow: 0 0 4px rgba(0,0,0,0.9);
}
#remote-cursor::after {
  content: ''; position: absolute;
  left: 0; top: -7px; width: 2px; height: 16px;
  background: white; box-shadow: 0 0 4px rgba(0,0,0,0.9);
}

@media (max-width: 600px) {
  .tb-label, .tb-divider, .tb-stat-group { display: none; }
  .tb-pill { padding: 5px 10px; font-size: 11px; }
  #toolbar { padding: 0 12px; }
}

/* ── Dark mode ────────────────────────────────────────────────────────────── */

html.dark {
  --bg:            #111111;
  --surface:       #1a1a1a;
  --border:        rgba(249,115,22,0.12);
  --text:          #f5f5f5;
  --muted:         #666666;
  --sub:           #9a9a9a;
  --orange-soft:   rgba(249,115,22,0.12);
  --orange-border: rgba(249,115,22,0.3);
}

html.dark #landing-screen,
html.dark #home-screen {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 65% at 90% 0%, rgba(249,115,22,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 5% 100%, rgba(249,115,22,0.07) 0%, transparent 70%);
}

html.dark .ls-nav {
  background: rgba(12,10,9,0.95);
  border-color: rgba(249,115,22,0.12);
}

html.dark .ls-form input,
html.dark .settings-input,
html.dark .pc-search {
  background: rgba(249,115,22,0.05);
  border-color: rgba(249,115,22,0.12);
  color: var(--text);
}
html.dark .ls-form input:focus,
html.dark .settings-input:focus,
html.dark .pc-search:focus {
  border-color: var(--orange);
  background: rgba(249,115,22,0.08);
}

html.dark .pc-card {
  background: rgba(249,115,22,0.04);
  border-color: rgba(249,115,22,0.1);
}
html.dark .pc-card:hover {
  background: rgba(249,115,22,0.08);
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1), 0 12px 32px rgba(0,0,0,0.3);
}

/* ── Account panel ───────────────────────────────────────────────────────── */
#account-panel {
  position: fixed; inset: 0; z-index: 600;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22,1,0.36,1);
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
}
#account-panel.open { transform: translateX(0); }

.ap-inner {
  width: 100%; max-width: 520px;
  padding: 0 28px 60px;
  display: flex; flex-direction: column; gap: 0;
}

.ap-header {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 0 36px;
  position: sticky; top: 0; background: var(--bg); z-index: 2;
}
.ap-back {
  background: none; border: none; color: var(--muted);
  font-size: 22px; cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.ap-back:hover { color: var(--text); background: var(--surface); }
.ap-title {
  font-family: var(--serif); font-size: 26px; font-weight: 700;
  color: var(--text); letter-spacing: -0.5px;
}

.ap-avatar-wrap { display: flex; justify-content: center; padding: 8px 0 28px; }
.ap-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  position: relative; cursor: pointer; overflow: hidden;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ap-avatar-letter {
  font-family: var(--serif); font-size: 38px; font-weight: 700;
  color: #fff; line-height: 1; pointer-events: none;
}
.ap-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-avatar-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff;
  opacity: 0; transition: opacity .18s;
}
.ap-avatar:hover .ap-avatar-overlay { opacity: 1; }

.ap-section {
  border-top: 1px solid var(--border);
  padding: 28px 0 4px;
  display: flex; flex-direction: column; gap: 10px;
}
.ap-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.ap-changes-left {
  font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  text-transform: none; color: var(--muted); opacity: 0.7;
}
.ap-verified-badge {
  font-size: 11px; font-weight: 600; color: #4ade80;
  letter-spacing: 0.02em; text-transform: none;
}

.ap-row { display: flex; gap: 8px; }
.ap-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-size: 15px; padding: 11px 14px; outline: none;
  font-family: inherit; transition: border-color .15s;
}
.ap-input:focus { border-color: rgba(249,115,22,0.5); }
.ap-input-full { width: 100%; box-sizing: border-box; }
.ap-btn {
  background: var(--orange); border: none; color: #fff;
  font-size: 14px; font-weight: 700; padding: 11px 18px;
  border-radius: 10px; cursor: pointer; white-space: nowrap;
  transition: opacity .15s; flex-shrink: 0; font-family: inherit;
}
.ap-btn:hover { opacity: 0.85; }
.ap-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ap-btn-full { width: 100%; margin-top: 4px; padding: 13px; font-size: 15px; }

.ap-msg {
  font-size: 13px; min-height: 18px; color: var(--muted);
}
.ap-msg.ok  { color: #4ade80; }
.ap-msg.err { color: #f87171; }

/* ── dark overrides ──────────────────────────────────────────────────────── */
html.dark #side-panel {
  background: rgba(13, 9, 5, 0.96);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-color: rgba(249,115,22,0.15);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(249,115,22,0.08);
}
html.dark .sp-close { border-color: rgba(255,255,255,0.1); }
html.dark .sp-close:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
html.dark .sp-item:hover { background: rgba(249,115,22,0.09); }

html.dark .info-feat {
  background: rgba(249,115,22,0.04);
  border-color: rgba(249,115,22,0.1);
}
html.dark .info-feat:hover { border-color: rgba(249,115,22,0.35); background: rgba(249,115,22,0.07); }

html.dark .plan-card { background: rgba(249,115,22,0.04); border-color: rgba(249,115,22,0.12); }
html.dark .av-notice { color: #fdba74; background: rgba(249,115,22,0.1); border-color: rgba(249,115,22,0.2); }
html.dark .switch-row { border-color: rgba(249,115,22,0.1); }

/* ── Side-panel dark row ──────────────────────────────────────────────────── */

.sp-dark-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.sp-dark-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px; font-weight: 500; letter-spacing: 0;
  color: var(--text); line-height: 1.1;
}

/* ── Offline badge ────────────────────────────────────────────────────────── */

.offline-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  color: #ef4444; border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600; margin-bottom: 16px;
}

/* ── Rate tab ────────────────────────────────────────────────────────────── */

.rate-root { flex-direction: column; overflow-y: auto; }
.rate-inner { max-width: 860px; width: 100%; margin: 0 auto; padding: 0 28px 60px; }
.rate-inner .ls-eyebrow { margin-top: 28px; }

.rate-search-row { margin: 24px 0 28px; }
.rate-search {
  width: 100%; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-size: 15px; padding: 12px 16px; outline: none; font-family: inherit;
  transition: border-color .15s;
}
.rate-search:focus { border-color: rgba(249,115,22,0.5); }

.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.rate-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 16px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color .18s;
}
.rate-card:hover { border-color: rgba(249,115,22,0.3); }

.rate-card-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--orange); color: #fff;
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; position: relative;
}
.rate-card-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rate-card-avatar.st-banned   { background: #ef4444; }
.rate-card-avatar.st-timeout  { background: #f97316; }
.rate-card-avatar.st-warned   { background: #eab308; }
.rate-card-avatar.st-muted    { background: #6b7280; }
.rate-card-avatar.st-verified { background: #22c55e; }

.rate-card-name {
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--text); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.rate-card-status {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
  display: none;
}
.rate-card-status.visible { display: block; }
.rate-card-status.st-verified { background: rgba(34,197,94,0.15);  color: #4ade80; }
.rate-card-status.st-banned   { background: rgba(239,68,68,0.15);  color: #f87171; }
.rate-card-status.st-timeout  { background: rgba(249,115,22,0.15); color: #fb923c; }
.rate-card-status.st-warned   { background: rgba(234,179,8,0.15);  color: #fbbf24; }
.rate-card-status.st-muted    { background: rgba(107,114,128,0.15);color: #9ca3af; }

.rate-card-actions {
  display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; width: 100%;
}
.rate-action-btn {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 10px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: opacity .15s, background .15s; font-family: inherit;
}
.rate-action-btn:hover { opacity: 0.8; }
.rate-btn-verify  { background: rgba(34,197,94,0.15);  color: #4ade80; border-color: rgba(34,197,94,0.25); }
.rate-btn-ban     { background: rgba(239,68,68,0.15);  color: #f87171; border-color: rgba(239,68,68,0.25); }
.rate-btn-timeout { background: rgba(249,115,22,0.15); color: #fb923c; border-color: rgba(249,115,22,0.25); }
.rate-btn-warn    { background: rgba(234,179,8,0.15);  color: #fbbf24; border-color: rgba(234,179,8,0.25); }
.rate-btn-mute    { background: rgba(107,114,128,0.15);color: #9ca3af; border-color: rgba(107,114,128,0.25); }
.rate-btn-clear   { background: rgba(255,255,255,0.05);color: var(--muted); border-color: var(--border); }

/* ── ohbabhaba OS ─────────────────────────────────────────────────────────── */

@keyframes osWinOpen {
  from { transform:scale(0.88) translateY(16px); }
  to   { transform:scale(1)    translateY(0); }
}

.os-root {
  position: absolute !important; inset: 0;
  z-index: 2;
  display: flex; flex-direction: column;
  background: #0d0d0d;
  background-image: radial-gradient(ellipse 80% 55% at 75% 15%, rgba(249,115,22,0.13) 0%, transparent 60%),
                    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(249,115,22,0.06) 0%, transparent 60%);
  overflow: hidden; padding: 0 !important; gap: 0 !important;
}

#os-desktop {
  flex: 1; position: relative; overflow: hidden; padding: 74px 18px 18px;
}

#os-icon-grid {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}

.os-icon {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 6px; border-radius: 12px; cursor: pointer; width: 72px;
  transition: background 0.15s, transform 0.15s; user-select: none;
  background: none; border: none; color: inherit; font: inherit;
}
.os-icon:hover  { background: rgba(255,255,255,0.08); transform: translateY(-2px); }
.os-icon:active { background: rgba(249,115,22,0.14); transform: translateY(0); }
.os-icon-glyph  { font-size: 26px; line-height: 1; }
.os-icon span   { font-size: 11px; color: rgba(255,255,255,0.82); text-align: center; line-height: 1.2; text-shadow: 0 1px 4px rgba(0,0,0,0.9); word-break: break-word; }

/* Taskbar */
#os-taskbar {
  height: 46px; background: rgba(14,10,6,0.9); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(249,115,22,0.12);
  display: flex; align-items: center; padding: 0 10px; gap: 6px; flex-shrink: 0;
}
.os-tb-left { display: flex; align-items: center; flex-shrink: 0; }
.os-start {
  background: var(--grad); border: none; color: #fff; font-size: 16px;
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s; font-weight: 700;
}
.os-start:hover { opacity: 0.85; transform: scale(1.07); }
#os-tb-wins {
  flex: 1; display: flex; gap: 4px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
#os-tb-wins::-webkit-scrollbar { display: none; }
.os-tb-item {
  display: flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 7px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.65); font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
.os-tb-item:hover  { background: rgba(255,255,255,0.1); color: #fff; }
.os-tb-item.active { background: rgba(249,115,22,0.18); border-color: rgba(249,115,22,0.28); color: #fff; }
.os-tb-item.minimized { opacity: 0.45; }
.os-tb-right { display: flex; align-items: center; flex-shrink: 0; }
#os-clock { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.65); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

/* Windows */
.os-window {
  display: flex; flex-direction: column;
  background: rgba(15,11,7,0.95); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(249,115,22,0.16); border-radius: 14px;
  box-shadow: 0 22px 64px rgba(0,0,0,0.75), 0 0 0 1px rgba(249,115,22,0.04);
  overflow: hidden; min-width: 220px; min-height: 130px;
  animation: osWinOpen 0.22s cubic-bezier(0.22,1,0.36,1) forwards;
}
.os-window.focused { border-color: rgba(249,115,22,0.28); box-shadow: 0 22px 64px rgba(0,0,0,0.75), 0 0 0 2px rgba(249,115,22,0.1); }
.os-window.maximized { border-radius: 0 !important; left:0!important; top:0!important; }

.os-win-bar {
  height: 36px; display: flex; align-items: center; gap: 7px;
  padding: 0 10px 0 11px;
  background: rgba(249,115,22,0.05); border-bottom: 1px solid rgba(249,115,22,0.09);
  cursor: grab; flex-shrink: 0; user-select: none;
}
.os-win-bar:active { cursor: grabbing; }
.os-win-icon  { font-size: 13px; flex-shrink: 0; }
.os-win-title { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.75); flex: 1; }
.os-win-btns  { display: flex; gap: 5px; flex-shrink: 0; }
.os-win-btn   { width: 12px; height: 12px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0; }
.os-win-close { background: #ff5f57; }
.os-win-min   { background: #febc2e; }
.os-win-max   { background: #28c840; }
.os-win-close:hover { filter: brightness(1.2); }
.os-win-min:hover   { filter: brightness(1.2); }
.os-win-max:hover   { filter: brightness(1.2); }

.os-win-body   { flex: 1; overflow: auto; color: rgba(255,255,255,0.85); font-size: 13px; }
.os-resize-grip { position: absolute; bottom:0; right:0; width:14px; height:14px; cursor:nwse-resize; }

/* Terminal */
.os-terminal { background:#080808; height:100%; display:flex; flex-direction:column; padding:10px; font-family:'Courier New',monospace; font-size:13px; }
.os-term-hist { flex:1; overflow-y:auto; }
.os-term-line { padding:1px 0; color:#bbb; word-break:break-all; }
.os-term-row  { display:flex; align-items:center; gap:5px; margin-top:6px; }
.os-term-prompt { color:var(--orange); font-weight:700; white-space:nowrap; }
.os-term-in { flex:1; background:transparent; border:none; color:#e8e8e8; font-family:inherit; font-size:13px; outline:none; caret-color:var(--orange); }

/* Notepad */
.os-notepad { display:flex; flex-direction:column; height:100%; }
.os-notepad-menu { display:flex; gap:2px; padding:4px 6px; border-bottom:1px solid rgba(255,255,255,0.06); flex-shrink:0; }
.os-notepad-menu button { background:none; border:none; color:rgba(255,255,255,0.55); font-size:12px; padding:3px 8px; border-radius:5px; cursor:pointer; transition:background .15s,color .15s; font-family:inherit; }
.os-notepad-menu button:hover { background:rgba(255,255,255,0.08); color:#fff; }
.os-notepad-area { flex:1; background:transparent; border:none; resize:none; color:rgba(255,255,255,0.85); font-family:'Inter',sans-serif; font-size:13px; line-height:1.7; padding:12px; outline:none; }

/* Snake */
.os-snake-wrap { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; gap:10px; background:#080808; padding:12px; }
.os-snake-score { color:var(--orange); font-weight:700; font-size:13px; }
#os-snake-canvas { border:1px solid rgba(249,115,22,0.18); border-radius:4px; display:block; }
.os-snake-btn { background:rgba(249,115,22,0.14); border:1px solid rgba(249,115,22,0.3); color:#fff; padding:5px 16px; border-radius:8px; cursor:pointer; font-size:12px; font-family:inherit; transition:background .15s; }
.os-snake-btn:hover { background:rgba(249,115,22,0.24); }

/* Minesweeper */
.os-mines-wrap { display:flex; flex-direction:column; align-items:center; height:100%; background:#080808; padding:12px; gap:10px; overflow:auto; }
.os-mines-bar  { display:flex; align-items:center; gap:10px; font-size:12px; color:rgba(255,255,255,0.6); flex-shrink:0; }
.os-mines-reset { background:rgba(249,115,22,0.14); border:1px solid rgba(249,115,22,0.28); color:#fff; border-radius:6px; padding:3px 10px; cursor:pointer; font-size:12px; font-family:inherit; transition:background .15s; }
.os-mines-reset:hover { background:rgba(249,115,22,0.24); }
.os-mines-grid { display:grid; grid-template-columns:repeat(9,28px); gap:2px; flex-shrink:0; }
.os-mines-cell { width:28px; height:28px; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; cursor:pointer; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.09); transition:background .1s; user-select:none; }
.os-mines-cell:hover:not(.revealed) { background:rgba(255,255,255,0.12); }
.os-mines-cell.revealed  { background:transparent; border-color:rgba(255,255,255,0.03); cursor:default; }
.os-mines-cell.flagged   { background:rgba(249,115,22,0.1); }
.os-mines-cell.exploded  { background:rgba(239,68,68,0.3); }

/* Settings */
.os-settings { padding:16px; display:flex; flex-direction:column; gap:12px; height:100%; overflow-y:auto; }
.os-settings-section { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.13em; color:var(--orange); margin-bottom:2px; }
.os-settings-row { display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); font-size:13px; color:rgba(255,255,255,0.8); }
.os-wall-swatch { width:22px; height:22px; border-radius:5px; border:2px solid transparent; cursor:pointer; transition:transform .15s,border-color .15s; flex-shrink:0; }
.os-wall-swatch:hover { transform:scale(1.15); }
.os-wall-swatch.active { border-color:rgba(255,255,255,0.6); }

/* Browser */
.os-browser { display:flex; flex-direction:column; height:100%; }
.os-browser-bar { display:flex; gap:5px; padding:6px 7px; border-bottom:1px solid rgba(255,255,255,0.06); flex-shrink:0; }
.os-browser-input { flex:1; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1); border-radius:7px; color:#fff; font-size:12px; padding:5px 10px; outline:none; font-family:inherit; transition:border-color .15s; }
.os-browser-input:focus { border-color:rgba(249,115,22,0.4); }
.os-browser-go { background:var(--grad); border:none; color:#fff; border-radius:7px; padding:5px 12px; font-size:12px; cursor:pointer; font-weight:600; flex-shrink:0; }
.os-browser-viewport { flex:1; position:relative; overflow:hidden; }
.os-browser-frame { position:absolute; inset:0; width:100%; height:100%; border:none; background:#fff; display:block; }
.os-browser-overlay {
  position:absolute; inset:0; display:none;
  flex-direction:column; align-items:center; justify-content:center; gap:12px;
  background:rgba(15,15,15,0.88); z-index:10;
}
.os-browser-overlay.error .os-browser-spinner { display:none; }
.os-browser-spinner {
  width:28px; height:28px; border-radius:50%;
  border:3px solid rgba(249,115,22,0.2); border-top-color:var(--orange);
  animation: obSpin 0.7s linear infinite;
}
@keyframes obSpin { to { transform:rotate(360deg); } }
.os-browser-status { font-size:12px; color:rgba(255,255,255,0.55); }
.os-browser-overlay.error .os-browser-status { color:#f87171; font-size:13px; }

/* Launcher */
.os-launcher { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; gap:14px; padding:20px; background:#080808; }
.os-launcher-drop { width:100%; max-width:280px; border:2px dashed rgba(249,115,22,0.28); border-radius:14px; padding:30px 20px; text-align:center; cursor:pointer; transition:border-color .2s,background .2s; color:rgba(255,255,255,0.35); }
.os-launcher-drop.drag-over { border-color:rgba(249,115,22,0.7); background:rgba(249,115,22,0.06); color:rgba(255,255,255,0.7); }
.os-launcher-drop-icon { font-size:34px; margin-bottom:10px; }
.os-launcher-drop p { font-size:12px; line-height:1.5; }
.os-launcher-log { width:100%; max-width:280px; font-family:'Courier New',monospace; font-size:11px; color:rgba(249,115,22,0.75); min-height:36px; text-align:center; line-height:1.7; white-space:pre-line; }

/* ── OS Lobby ─────────────────────────────────────────────────────────────── */
.os-lobby {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  z-index: 10;
}
.os-lobby-inner {
  max-width: 480px; width: 100%; padding: 0 32px;
}
.os-lobby-sub {
  font-size: 0.42em; font-weight: 500; opacity: 0.35; display: inline-block; margin-top: 4px;
}
.os-join-row {
  display: flex; gap: 10px; align-items: center; margin-top: 4px;
}
.os-join-input {
  flex: 1; background: transparent; border: none; border-bottom: 1.5px solid rgba(249,115,22,0.35);
  color: var(--fg); font-family: 'Courier New', monospace; font-size: 15px; font-weight: 600;
  letter-spacing: 0.15em; padding: 8px 4px; outline: none; text-transform: uppercase;
  transition: border-color .2s;
}
.os-join-input:focus { border-color: var(--orange); }
.os-join-btn {
  background: transparent; border: 1.5px solid rgba(249,115,22,0.4);
  color: var(--orange); font-size: 13px; font-weight: 600; padding: 7px 18px;
  border-radius: 8px; cursor: pointer; transition: background .15s, border-color .15s;
}
.os-join-btn:hover { background: rgba(249,115,22,0.1); border-color: var(--orange); }
.os-lobby-msg { font-size: 12px; margin-top: 14px; color: rgba(255,255,255,0.45); min-height: 18px; }

/* ── OS Session Badge ─────────────────────────────────────────────────────── */
.os-session-badge {
  position: absolute; top: 74px; right: 14px; z-index: 500;
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(249,115,22,0.25); border-radius: 20px;
  padding: 5px 12px; font-size: 11px; color: rgba(255,255,255,0.6);
  user-select: none;
}
.os-badge-code {
  font-family: 'Courier New', monospace; font-size: 13px; font-weight: 700;
  color: var(--orange); letter-spacing: 0.12em;
}
.os-badge-copy {
  background: transparent; border: none; color: rgba(249,115,22,0.6); cursor: pointer;
  font-size: 12px; padding: 0 2px; line-height: 1; transition: color .15s;
}
.os-badge-copy:hover { color: var(--orange); }
.os-badge-members {
  font-size: 13px; font-weight: 700; color: #6ef;
}
.os-badge-label { opacity: 0.5; }

/* ── OS Cursors ───────────────────────────────────────────────────────────── */
.os-cursor {
  position: fixed; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.os-cursor-dot {
  width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
  transition: transform 0.08s ease;
}
.os-cursor-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  white-space: nowrap;
}
@keyframes osCursorClick {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.55); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
@keyframes osCursorType {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  100% { transform: scale(1); }
}
.os-cursor-dot.osc-click { animation: osCursorClick 0.28s cubic-bezier(0.22,1,0.36,1) forwards; }
.os-cursor-dot.osc-type  { animation: osCursorType  0.35s cubic-bezier(0.22,1,0.36,1) forwards; }
