:root{
  --ts-guide-bg:#071220;
  --ts-guide-panel:#0f2034;
  --ts-guide-panel2:#142a44;
  --ts-guide-text:#f1f7ff;
  --ts-guide-muted:#b8c8d8;
  --ts-guide-gold:#d8b86f;
  --ts-guide-line:rgba(216,184,111,.38);
  --ts-guide-shadow:0 20px 60px rgba(0,0,0,.45);
}

#ts-guide-root,
#ts-guide-root *{
  box-sizing:border-box;
}

.ts-guide-launcher{
  position:fixed;
  right:22px;
  bottom:22px;
  width:74px;
  height:74px;
  border-radius:50%;
  border:1px solid var(--ts-guide-line);
  background:radial-gradient(circle at 35% 25%, rgba(216,184,111,.22), rgba(7,18,32,.96) 62%);
  box-shadow:var(--ts-guide-shadow);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9998;
  cursor:pointer;
  transition:transform .18s ease, filter .18s ease, border-color .18s ease;
}

.ts-guide-launcher:hover,
.ts-guide-launcher:focus{
  transform:translateY(-2px) scale(1.03);
  filter:brightness(1.08);
  border-color:var(--ts-guide-gold);
  outline:none;
}

.ts-guide-launcher img{
  width:58px;
  height:58px;
  object-fit:contain;
  border-radius:50%;
}

.ts-guide-panel{
  position:fixed;
  right:22px;
  bottom:108px;
  width:min(420px, calc(100vw - 28px));
  max-height:min(680px, calc(100vh - 130px));
  background:linear-gradient(160deg, rgba(15,32,52,.98), rgba(7,18,32,.98));
  border:1px solid var(--ts-guide-line);
  border-radius:22px;
  color:var(--ts-guide-text);
  box-shadow:var(--ts-guide-shadow);
  z-index:9999;
  display:none;
  overflow:hidden;
  font-family:Arial, Helvetica, sans-serif;
}

.ts-guide-panel.ts-guide-open{
  display:flex;
  flex-direction:column;
}

.ts-guide-header{
  padding:16px 16px 12px;
  display:flex;
  gap:12px;
  align-items:center;
  border-bottom:1px solid rgba(216,184,111,.25);
}

.ts-guide-header img{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:50%;
  flex:0 0 auto;
}

.ts-guide-title{
  flex:1 1 auto;
  min-width:0;
}

.ts-guide-title strong{
  display:block;
  color:var(--ts-guide-gold);
  font-size:1.02rem;
  line-height:1.15;
}

.ts-guide-title span{
  color:var(--ts-guide-muted);
  font-size:.88rem;
  line-height:1.2;
}

.ts-guide-close{
  background:transparent;
  color:var(--ts-guide-text);
  border:1px solid rgba(216,184,111,.35);
  border-radius:10px;
  width:34px;
  height:34px;
  cursor:pointer;
  font-size:20px;
  line-height:1;
}

.ts-guide-body{
  padding:16px;
  overflow:auto;
}

.ts-guide-message{
  white-space:pre-wrap;
  background:rgba(7,18,32,.55);
  border:1px solid rgba(216,184,111,.24);
  border-radius:16px;
  padding:13px;
  line-height:1.45;
  font-size:.96rem;
}

.ts-guide-buttons{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:12px;
}

.ts-guide-btn{
  width:100%;
  text-align:left;
  border:1px solid rgba(216,184,111,.32);
  background:rgba(20,42,68,.82);
  color:var(--ts-guide-text);
  border-radius:12px;
  padding:10px 11px;
  cursor:pointer;
  font-size:.94rem;
  line-height:1.25;
}

.ts-guide-btn:hover,
.ts-guide-btn:focus{
  border-color:var(--ts-guide-gold);
  filter:brightness(1.08);
  outline:none;
}

.ts-guide-input-wrap{
  margin-top:13px;
  border-top:1px solid rgba(216,184,111,.18);
  padding-top:12px;
}

.ts-guide-input-wrap label{
  display:block;
  color:var(--ts-guide-gold);
  font-size:.9rem;
  margin-bottom:6px;
}

.ts-guide-input{
  width:100%;
  min-height:82px;
  resize:vertical;
  border-radius:14px;
  border:1px solid rgba(216,184,111,.28);
  background:rgba(7,18,32,.78);
  color:var(--ts-guide-text);
  padding:11px;
  font-family:Arial, Helvetica, sans-serif;
  line-height:1.4;
}

.ts-guide-input:focus{
  outline:none;
  border-color:var(--ts-guide-gold);
}

.ts-guide-send-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:8px;
}

.ts-guide-send{
  border:1px solid var(--ts-guide-gold);
  background:linear-gradient(180deg, rgba(216,184,111,.23), rgba(20,42,68,.95));
  color:var(--ts-guide-text);
  border-radius:12px;
  padding:9px 12px;
  cursor:pointer;
  flex:0 0 auto;
}

.ts-guide-hint{
  color:var(--ts-guide-muted);
  font-size:.8rem;
  line-height:1.25;
}

.ts-guide-footer{
  padding:10px 16px 14px;
  color:var(--ts-guide-muted);
  font-size:.78rem;
  border-top:1px solid rgba(216,184,111,.16);
}

@media (max-width:640px){
  .ts-guide-launcher{
    right:14px;
    bottom:14px;
    width:64px;
    height:64px;
  }
  .ts-guide-launcher img{
    width:50px;
    height:50px;
  }
  .ts-guide-panel{
    right:10px;
    bottom:86px;
    width:calc(100vw - 20px);
    max-height:calc(100vh - 100px);
  }
}
