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

:root{
  --bg:    #0e2321;
  --bg2:   #111e1d;
  --bg3:   #0b1918;
  --card:  #131f1e;
  --line:  rgba(255,255,255,0.06);
  --green: #3fa67e;
  --accent:#4ade9e;
  --text:  #dde8e5;
  --dim:   #4a6b63;
  --nav-h: 58px;
}

html,body{height:100%}
html{
  background-color:var(--bg);
}
html::before{
  content:'';
  position:fixed;
  inset:0;
  background-image:radial-gradient(circle, rgba(74,222,158,0.1) 5px, transparent 3px);
  background-size:50px 50px;
  pointer-events:none;
  z-index:0;
}
body{
  background:transparent;
  color:var(--text);
  font-family:'Quicksand',sans-serif;
  font-weight:700;
  position:relative;
  z-index:1;
}

.top-nav{
  position:fixed;
  top:0;left:0;right:0;
  height:var(--nav-h);
  z-index:200;
  display:flex;align-items:center;
  gap:0;
  background:#0f1c1a;
  border-bottom:1px solid rgba(255,255,255,0.07);
  padding:0 1rem 0 1.4rem;
  box-shadow:0 2px 20px rgba(0,0,0,0.35);
}

.nav-logo{
  display:flex;align-items:center;
  text-decoration:none;flex-shrink:0;
  padding-right:1rem;
  border-right:1px solid rgba(255,255,255,0.07);
  margin-right:1rem;
}
.nav-logo img{height:28px;width:auto;display:block}

.nav-search-form{
  flex:1;
  min-width:0;
}
.nav-search-row{
  display:flex;align-items:center;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.07);
  border-radius:7px;
  height:36px;
  overflow:hidden;
  transition:border-color 0.2s,background 0.2s;
}
.nav-search-row:focus-within{
  border-color:rgba(63,166,126,0.45);
  background:rgba(255,255,255,0.06);
}
.nav-search-icon{
  flex-shrink:0;padding:0 0.6rem 0 0.85rem;
  color:var(--dim);display:flex;align-items:center;
}
.nav-search-icon svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.nav-search-input{
  flex:1;background:transparent;border:none;outline:none;
  color:var(--text);font-family:'Quicksand',sans-serif;
  font-size:0.85rem;font-weight:300;
  padding:0 0.6rem 0 0;
  caret-color:var(--accent);
  min-width:0;
}
.nav-search-input::placeholder{color:var(--dim)}

.nav-icons{
  display:flex;align-items:center;
  gap:0.1rem;
  flex-shrink:0;
  padding-left:1rem;
  border-left:1px solid rgba(255,255,255,0.07);
  margin-left:1rem;
}
.nav-icon{
  display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;
  border-radius:7px;
  color:rgba(255,255,255,0.4);
  text-decoration:none;
  background:transparent;border:none;cursor:pointer;
  transition:color 0.18s,background 0.18s;
}
.nav-icon:hover{color:#fff;background:rgba(255,255,255,0.06)}
.nav-icon svg{
  width:20px;height:20px;
  stroke:currentColor;fill:none;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}

#nav-tooltip{
  position:fixed;
  pointer-events:none;
  z-index:9999;
  background:#0c2420;
  border:1px solid rgba(74,222,158,0.28);
  color:var(--accent);
  font-family:'Quicksand',sans-serif;
  font-size:0.64rem;
  letter-spacing:0.08em;
  padding:0.28rem 0.65rem;
  border-radius:5px;
  white-space:nowrap;
  opacity:0;
  transition:opacity 0.15s ease;
  box-shadow:0 4px 18px rgba(0,0,0,0.45);
  transform:translate(14px,-50%);
  top:0;left:0;
}

.home-wrap{
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  min-height:100vh;
  gap:2.8rem;
  padding:2rem;
  background:transparent;
}
.home-logo{height:150px;width:auto;opacity:0.92}

.home-search-form{width:min(520px,90vw)}
.home-search-row{
  display:flex;align-items:center;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  transition:border-color 0.2s,box-shadow 0.2s;
}
.home-search-row:focus-within{
  border-color:rgba(63,166,126,0.45);
  box-shadow:0 0 0 3px rgba(63,166,126,0.09);
}
.home-search-icon{
  flex-shrink:0;padding:0 0.8rem 0 1rem;
  color:var(--dim);display:flex;align-items:center;
}
.home-search-icon svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.home-search-input{
  flex:1;background:transparent;border:none;outline:none;
  color:var(--text);font-family:'Quicksand',sans-serif;
  font-size:0.92rem;font-weight:300;
  padding:0.88rem 1rem 0.88rem 0;
  caret-color:var(--accent);
}
.home-search-input::placeholder{color:var(--dim)}

.quickapps{
  width:min(520px,90vw);
  display:flex;flex-direction:column;gap:0.75rem;
}
.quickapps-label{
  font-family:'Quicksand',sans-serif;font-size:0.62rem;
  letter-spacing:0.1em;color:var(--dim);text-transform:uppercase;
}
.quickapps-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:0.5rem;
}
.qa-item{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:0.45rem;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:9px;
  padding:0.9rem 0.5rem;
  text-decoration:none;
  color:var(--dim);
  font-family:'Quicksand',sans-serif;font-size:0.6rem;letter-spacing:0.05em;
  transition:color 0.18s,border-color 0.18s,background 0.18s;
  cursor:pointer;
}
.qa-item:hover{color:var(--text);border-color:rgba(63,166,126,0.3);background:rgba(255,255,255,0.03)}
.qa-icon img{width:100%;height:100%;object-fit:contain;border-radius:4px;}
.qa-icon{
  width:28px;height:28px;
  display:flex;align-items:center;justify-content:center;
  border-radius:6px;
  background:rgba(255,255,255,0.04);
  font-size:1.1rem;
}

.shell-body{
  display:flex;flex-direction:column;
  height:100vh;overflow:hidden;
}
.content-frame{
  flex:1;
  border:none;
  margin-top:var(--nav-h);
  width:100%;height:calc(100vh - var(--nav-h));
  background:var(--bg);
}

.page-body{display:flex;flex-direction:column;height:100vh;overflow:hidden}
.frame-area{
  flex:1;position:relative;
  background:#fff;overflow:hidden;
  margin-top:var(--nav-h);
}
#sj-frame{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:none!important}

.loading{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.9rem;
  background:var(--bg);z-index:10;transition:opacity 0.3s;
}
.loading.hidden{opacity:0;pointer-events:none}
.spinner{width:28px;height:28px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin 0.7s linear infinite}
.loading p{font-family:'Quicksand',sans-serif;font-size:0.68rem;color:var(--dim);letter-spacing:0.06em}

#err-bar{
  display:none;position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);
  background:#130a0a;border:1px solid #4a1515;border-radius:5px;
  padding:0.5rem 1rem;font-family:'Quicksand',sans-serif;font-size:0.68rem;color:#f87171;
  z-index:200;white-space:nowrap;
}

.embed-nav-trigger{position:fixed;top:0;left:0;right:0;height:4px;z-index:200;cursor:pointer}
.embed-nav-trigger:hover .embed-navbar,
.embed-navbar:hover{transform:translateY(0);opacity:1;pointer-events:all}
.embed-navbar{
  position:fixed;top:0;left:0;right:0;height:52px;
  background:rgba(11,25,24,0.97);backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
  display:flex;align-items:center;padding:0 1.2rem;gap:1rem;
  transform:translateY(-100%);opacity:0;pointer-events:none;
  transition:transform 0.22s ease,opacity 0.22s ease;z-index:201;
}
.embed-navbar-logo{display:flex;align-items:center;text-decoration:none;flex-shrink:0}
.embed-navbar-logo img{height:22px;width:auto}
.embed-nav-div{width:1px;height:18px;background:var(--line);flex-shrink:0}
.embed-url-display{flex:1;font-family:'Quicksand',sans-serif;font-size:0.65rem;color:var(--dim);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;letter-spacing:0.02em}
.embed-nav-actions{display:flex;gap:0.3rem;flex-shrink:0}
.embed-nav-btn{
  font-family:'Quicksand',sans-serif;font-size:0.62rem;letter-spacing:0.05em;
  color:var(--dim);background:transparent;border:1px solid var(--line);
  border-radius:4px;padding:0.28rem 0.7rem;cursor:pointer;text-decoration:none;
  display:flex;align-items:center;gap:0.35rem;transition:color 0.2s,border-color 0.2s;
}
.embed-nav-btn:hover{color:var(--accent);border-color:rgba(63,166,126,0.4)}
.embed-nav-btn svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}

#embed-loading{
  position:fixed;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:1.2rem;
  background:var(--bg);z-index:50;transition:opacity 0.4s ease;
}
#embed-loading.hidden{opacity:0;pointer-events:none}
.embed-spinner-wrap{position:relative;width:52px;height:52px;display:flex;align-items:center;justify-content:center}
.spinner-ring{position:absolute;width:44px;height:44px;border:2px solid rgba(255,255,255,0.05);border-top-color:var(--accent);border-radius:50%;animation:spin 0.8s linear infinite}
.embed-load-icon{width:32px;height:32px;border:1px solid rgba(63,166,126,0.4);border-radius:50%;display:flex;align-items:center;justify-content:center}
.embed-load-icon svg{width:14px;height:14px;stroke:var(--accent);fill:none;stroke-width:2;stroke-linecap:round}
.embed-load-logo{height:28px;width:auto}
.embed-load-msg{font-family:'Quicksand',sans-serif;font-size:0.68rem;color:var(--dim);letter-spacing:0.06em}

#embed-error{
  position:fixed;inset:0;display:none;flex-direction:column;
  align-items:center;justify-content:center;gap:0.9rem;
  background:var(--bg);z-index:60;font-family:'Quicksand',sans-serif;
  color:var(--dim);text-align:center;padding:2rem;
}
#embed-error.visible{display:flex}
.embed-err-code{font-size:0.65rem;color:#f87171;margin-top:0.2rem}
.embed-retry-btn{
  margin-top:0.4rem;padding:0.45rem 1.2rem;background:var(--green);color:#fff;
  border:none;border-radius:5px;font-family:'Quicksand',sans-serif;font-size:0.68rem;
  cursor:pointer;transition:background 0.2s;
}
.embed-retry-btn:hover{background:var(--accent);color:#0e2321}
#embed-error a{color:var(--accent);text-decoration:none;font-size:0.68rem}

@keyframes spin{to{transform:rotate(360deg)}}
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
.anim-1{animation:fadeUp 0.45s ease both}
.anim-2{animation:fadeUp 0.45s 0.07s ease both}
.anim-3{animation:fadeUp 0.45s 0.14s ease both}