* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, Roboto, sans-serif;
  background: #101014;
  color: #e8e8ec;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px;
  background: #17171d;
  border-bottom: 1px solid #26262e;
  position: sticky;
  top: 0;
  z-index: 10;
}

h1 { margin: 0; font-size: 20px; }

.back { color: inherit; text-decoration: none; margin-right: 12px; opacity: .7; }
.back:hover { opacity: 1; }

button {
  background: #2a6cf0;
  color: #fff;
  border: 0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #1d5be0; }
button:disabled { opacity: .5; cursor: default; }

.status {
  display: none;
  padding: 8px 24px;
  background: #24242c;
  border-bottom: 1px solid #2e2e38;
  font-size: 14px;
}
.status.show { display: block; }

#list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 16px;
  padding: 24px;
}

.cardWrap { position: relative; }

.menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  border: 0;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 3;
}
.menu-btn:hover { background: rgba(0,0,0,.8); }
.menu-btn.open { background: rgba(0,0,0,.85); }

.dots { font-size: 20px; line-height: 1; }

.menu {
  position: absolute;
  top: 50px;
  right: 8px;
  min-width: 180px;
  background: #22222a;
  border: 1px solid #34343e;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.6);
  z-index: 20;
}
.menu.hidden { display: none; }

.menu-item {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  color: #e8e8ec;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.menu-item:hover { background: #2a2a34; }

#watchActions { display: flex; gap: 10px; align-items: center; }
#watchActions .menu-btn { position: static; background: #24242c; width: 38px; height: 38px; }
#watchActions .menu-btn:hover { background: #2f2f3a; }
#watchActions .menu { top: 46px; right: 0; }

#videoTitle {
  max-width: 1200px;
  margin: 4px auto 8px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}

.watch-date {
  max-width: 1200px;
  margin: -4px auto 8px;
  padding: 0 24px;
  font-size: 13px;
  color: #9a9aa5;
}

#clipPanel {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 16px 24px;
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 12px;
  margin-left: 24px;
  margin-right: 24px;
}
#clipPanel h2 { margin: 0 0 12px; font-size: 17px; }
.clip-note { font-size: 12px; color: #b89b4a; margin: -6px 0 10px; }
.clips-hint { max-width: 1200px; margin: 8px auto 24px; padding: 0 24px; font-size: 13px; color: #9a9aa5; }
.clips-hint a { color: #a970ff; }


#home {
  display: grid;
  gap: 16px;
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 760px) { #home { grid-template-columns: repeat(3, 1fr); padding-top: 40px; } }
.home-card {
  display: block;
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 12px;
  padding: 24px 20px;
  color: #e8e8ec;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.home-card:hover { border-color: #a970ff; transform: translateY(-2px); }
.home-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.home-desc { font-size: 13px; color: #9a9aa5; }
.clip-empty { color: #9a9aa5; font-size: 14px; padding: 8px 0; }


.streamer { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-height: 20px; }
.streamer .avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #26262e; display: block; }
.streamer .avatar-empty { width: 20px; height: 20px; border-radius: 50%; background: #26262e; display: block; flex: none; }
.streamer .nick { font-size: 12px; color: #a970ff; font-weight: 600; }
.streamer .sname { font-size: 12px; color: #9a9aa5; }


.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.clip-card {
  display: block;
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #e8e8ec;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.clip-card:hover { border-color: #3a3a46; transform: translateY(-2px); }
.clip-card .thumb { aspect-ratio: 16/9; background: #000; position: relative; }
.clip-card .thumb-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-card .info { padding: 10px 12px; }
.clip-card .title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.clip-card .meta { font-size: 12px; color: #9a9aa5; }


.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.modal.hidden { display: none; }
.modal-box {
  position: relative;
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 12px;
  padding: 16px 20px 20px;
  max-width: 720px; width: 100%;
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.modal-box video { width: 100%; border-radius: 8px; background: #000; margin-bottom: 10px; }
.modal-close {
  position: absolute; top: 8px; right: 8px;
  background: #24242c; color: #fff; border: 0; border-radius: 6px;
  padding: 4px 10px; cursor: pointer; z-index: 2;
}
.modal-close:hover { background: #2f2f3a; }
.beta-notice {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0;
  background: rgba(5, 5, 8, .82);
  backdrop-filter: blur(6px);
}
.beta-notice[hidden] { display: none; }
.beta-notice-card {
  width: min(100%, 620px);
  max-height: min(90vh, 760px);
  overflow: auto;
  box-sizing: border-box;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(169, 112, 255, .48);
  border-radius: 18px;
  background: linear-gradient(145deg, #1c1a24, #121217 72%);
  color: #e8e8ec;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .65);
}
.beta-notice-card h2 {
  margin: 0 0 22px;
  color: #c7a3ff;
  font-size: clamp(23px, 5vw, 34px);
  line-height: 1.12;
  letter-spacing: .035em;
}
.beta-notice-copy { color: #c4c2cd; font-size: 16px; line-height: 1.65; }
.beta-notice-copy p { margin: 0 0 13px; }
.beta-notice-copy p:last-child { margin-bottom: 0; }
.beta-notice-copy strong { color: #fff; }
.beta-notice-dismiss { width: 100%; margin-top: 25px; padding: 12px 18px; font-size: 15px; }
@media (max-width: 520px) {
  .beta-notice { padding: 14px; }
  .beta-notice-card { border-radius: 14px; }
  .beta-notice-copy { font-size: 14px; }
}
.clip-actions { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.clip-speakers { background: #121217; border: 1px solid #26262e; border-radius: 10px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.clip-speakers-title { font-size: 13px; color: #b8b8c2; margin-bottom: 8px; }
.clip-speaker-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9a9aa5; margin-bottom: 6px; }
.clip-speaker-row input { flex: 1; padding: 6px 8px; border-radius: 6px; border: 1px solid #31313c; background: #101016; color: #e8e8ec; }
.clip-rebuild { background: #2a6cf0; }


.clip-standalone { max-width: 900px; margin: 0 auto; }
.clip-standalone video { width: 100%; border-radius: 12px; background: #000; display: block; }
.clip-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.clip-share { background: #24242c; color: #e8e8ec; border: 0; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.clip-share:hover { background: #2f2f3a; }


.draft-actions { display: flex; gap: 8px; margin-top: 8px; }
.draft-save { background: #2a6cf0; }
.clip-danger { background: #5a2b2b; }
.clip-danger:hover { background: #6d3333; }

.clip-times { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.clip-times label { font-size: 14px; color: #b8b8c2; display: flex; align-items: center; gap: 6px; }
.clip-times input[type="text"] {
  width: 74px;
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #101016;
  color: #e8e8ec;
  font-size: 14px;
}
.clip-times button {
  padding: 7px 9px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #24242c;
  color: #e8e8ec;
  cursor: pointer;
}
.clip-times button:hover { background: #2f2f3a; }

.clip-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.clip-check { font-size: 14px; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.clip-radio { font-size: 13px; color: #b8b8c2; display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; cursor: pointer; }
.clip-sub { margin-left: 24px; }

.clip-cta-row { display: flex; gap: 8px; }
#clipCreateBtn {
  padding: 9px 20px;
  border-radius: 8px;
  border: 0;
  background: #2a6cf0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}
#clipCreateBtn:hover { background: #3a7bff; }
#clipCreateBtn:disabled { background: #3a3a46; cursor: default; }
#clipCensorCheck {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #31313c;
  background: #24242c;
  color: #e8e8ec;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
#clipCensorCheck:hover { background: #2f2f3a; }
#clipCensorCheck:disabled { opacity: .6; cursor: default; }

.censor-preview {
  margin-top: 10px;
  border: 1px solid #26262e;
  border-radius: 10px;
  padding: 10px 12px;
  background: #121217;
  font-size: 13px;
}
.censor-preview-title { font-weight: 700; margin-bottom: 6px; color: #cfcfd8; }
.censor-preview-ok { color: #9fd08b; }
.censor-preview-none { color: #9a9aa5; }
.censor-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.censor-word {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #3a1f1f;
  border: 1px solid #5a2b2b;
  color: #ffb3b3;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 12px;
}
.censor-word:hover { background: #4a2626; }
.censor-word .cw-time { color: #d99; }

#clipStatus { margin-top: 10px; font-size: 14px; color: #9fd08b; min-height: 18px; }
#clipStatus.clip-error { color: #e05252; }
.clip-download { color: #6ea8ff; text-decoration: none; font-weight: 600; }
.clip-download:hover { text-decoration: underline; }
.clip-result { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.clip-preview { max-width: 480px; width: 100%; border-radius: 10px; background: #000; border: 1px solid #2a2a34; }


.header-actions { display: flex; gap: 10px; align-items: center; }
.nav-link {
  color: #8db3ff;
  text-decoration: none;
  font-size: 14px;
  padding: 7px 12px;
  border: 1px solid #31313c;
  border-radius: 7px;
  background: #24242c;
}
.nav-link:hover { background: #2f2f3a; }

#clipsMain { max-width: 1200px; margin: 0 auto; padding: 16px 24px 40px; }
#clipsMain h2 { font-size: 17px; margin: 0 0 12px; }
#clipCreate, #clipList {
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.clips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .clips-grid { grid-template-columns: 1fr; } }
.clips-label { display: block; font-size: 13px; color: #b8b8c2; margin-bottom: 8px; }
.clips-label select {
  width: 100%;
  margin-top: 5px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #101016;
  color: #e8e8ec;
  font-size: 14px;
}
#srcPlayerWrap video { width: 100%; border-radius: 10px; background: #000; }

.clip-job { border-top: 1px solid #26262e; padding: 12px 0; }
.clip-job:first-child { border-top: 0; }
.clip-job-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.clip-job-state { font-size: 14px; color: #9fd08b; }
.clip-meta { font-size: 12px; color: #b8b8c2; }
.clip-speakers {
  border: 1px solid #2a2a34;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #14141b;
}
.clip-speakers-title { font-size: 13px; color: #b8b8c2; }
.clip-speaker-row { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.clip-speaker-row input {
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #101016;
  color: #e8e8ec;
  font-size: 13px;
  width: 180px;
}
.clip-rebuild {
  margin-top: 4px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 0;
  background: #2a6cf0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.clip-rebuild:hover { background: #3a7bff; }
.clip-rebuild:disabled { background: #3a3a46; cursor: default; }

.card {
  display: block;
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .12s, border-color .12s;
}
.card:hover { transform: translateY(-2px); border-color: #2a6cf0; }
.card-live { border-color: #e05252; }
.card-live:hover { border-color: #ff6b6b; }

.live-badge {
  display: inline-block;
  background: #e05252;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  letter-spacing: .5px;
}

.thumb {
  position: relative;
  height: 150px;
  background:
    linear-gradient(135deg, #23232c 25%, transparent 25%) -20px 0,
    linear-gradient(225deg, #23232c 25%, transparent 25%) -20px 0,
    linear-gradient(315deg, #23232c 25%, transparent 25%),
    linear-gradient(45deg, #23232c 25%, transparent 25%),
    #1a1a22;
  background-size: 40px 40px;
  overflow: hidden;
}

.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-logo {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #1a1a22;
}

.thumb-logo img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e05252;
  box-shadow: 0 4px 18px rgba(0,0,0,.6);
}

.info { padding: 14px 16px; }

.title { font-size: 15px; font-weight: 600; word-break: break-all; }
.meta { font-size: 13px; color: #9a9aa5; margin-top: 6px; }

.progress { margin-top: 10px; height: 6px; background: #26262e; border-radius: 3px; overflow: hidden; }
.bar { height: 100%; width: 0%; background: #2a6cf0; transition: width .4s; }
.bar.done { background: #2ebd3b; }
.bar.err { background: #e05252; }

#playerWrap { position: relative; max-width: 1200px; margin: 20px auto; padding: 0 24px; }

#player {
  width: 100%;
  background: #000;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
}

#bufferBar {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 4px;
  background: #3a3a44;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  z-index: 2;
}

#bufferFill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 0 2px 2px 0;
  transition: width .4s;
}

#loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  border-radius: 12px;
  color: #c8c8d0;
  font-size: 15px;
  text-align: center;
  padding: 20px;
}
#loading.hide { display: none; }

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #333;
  border-top-color: #2a6cf0;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  header { padding: 12px 14px; }
  #list { padding: 14px; grid-template-columns: 1fr; }
  #playerWrap { padding: 0 12px; }


  .site-header { padding: 12px 14px; }
  .brand-sub { display: none; }
  .site-nav { flex-wrap: wrap; }
  .site-nav a { padding: 6px 10px; font-size: 13px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }

  #toolbar { padding: 0 14px; }
  #toolbar input[type="search"], #toolbar select { flex: 1 1 100%; min-width: 0; }

  .hero-inner { padding: 26px 16px 20px; gap: 18px; }
  .hero-actions { flex-wrap: wrap; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .section { padding: 22px 14px 4px; }
  .resume-btn { left: 24px; }
  .doc { padding: 22px 16px 40px; }
  #clipsMain { padding: 14px 14px 32px; }
  .clip-times { align-items: stretch; }
}




:root {
  --accent: #a970ff;
  --blue: #2a6cf0;
  --bg: #101014;
  --panel: #17171d;
  --border: #26262e;
  --muted: #9a9aa5;
  --text: #e8e8ec;
}

.hidden { display: none !important; }
[hidden] { display: none !important; }


.site-header { padding: 14px 24px; }
.brand { font-size: 18px; font-weight: 800; color: var(--accent); text-decoration: none; letter-spacing: .4px; }
.brand:hover { opacity: .9; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 10px; letter-spacing: 0; }
.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a { color: #8db3ff; text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 7px; }
.site-nav a:hover { background: #24242c; }
.site-nav .nav-cta { background: var(--blue); color: #fff; font-weight: 600; }
.site-nav .nav-cta:hover { background: #1d5be0; }


.page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px 4px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.page-title { font-size: 18px; font-weight: 700; margin: 0; display: flex; align-items: center; }


.home-page { padding-bottom: 48px; }
.hero {
  background:
    radial-gradient(800px 300px at 15% -20%, rgba(169,112,255,.16), transparent 60%),
    radial-gradient(700px 280px at 90% 0%, rgba(42,108,240,.12), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px 40px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1d2436; border: 1px solid #2c3a5a; color: #a7d3ff;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #e05252; animation: pulse 1.2s infinite; flex: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.hero-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.5px; }
.hero-sub { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: #1b1b22; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #24242c; }


.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: #1b1b22; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat-num { font-size: 22px; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 2px; }


.section { max-width: 1200px; margin: 0 auto; padding: 32px 24px 4px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.home-page > .section:first-child .section-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.section-head h2 { font-size: 20px; font-weight: 700; margin: 0; }
.section-more { color: #8db3ff; text-decoration: none; font-size: 14px; white-space: nowrap; }
.section-more:hover { text-decoration: underline; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.media-card .thumb { height: auto; aspect-ratio: 16/9; }
.badge-live { position: absolute; top: 8px; left: 8px; background: #e05252; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; letter-spacing: .5px; }


.thumb-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 2;
}
.thumb-duration.live-elapsed { color: #ff8f8f; background: rgba(30,6,6,.82); }
.muted { color: var(--muted); }



.crown-corner {
  position: absolute;
  top: -9px;
  left: -9px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2a2a33, #17171d);
  border: 1px solid #3a3a45;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  z-index: 3;
  pointer-events: none;
}
.crown-corner.gold { box-shadow: 0 0 10px rgba(242,193,78,.55), 0 2px 8px rgba(0,0,0,.5); border-color: #c9971f; }
.crown-corner.silver { box-shadow: 0 0 10px rgba(216,221,227,.5), 0 2px 8px rgba(0,0,0,.5); border-color: #a7afb8; }
.crown-corner.bronze { box-shadow: 0 0 10px rgba(205,127,50,.5), 0 2px 8px rgba(0,0,0,.5); border-color: #a55a1e; }
.crown-corner svg { transform: rotate(-45deg); filter: drop-shadow(0 1px 1px rgba(0,0,0,.45)); }

.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.avatar-crown {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.channel-card { position: relative; }


.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.channel-card {
  display: flex; gap: 10px; align-items: center;
  background: #1b1b22; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.channel-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.channel-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #26262e; border: 2px solid #2c2c34; flex: none; }
.channel-avatar.is-live { border-color: #e05252; }
.channel-avatar.avatar-empty { background: #26262e; }
.channel-name { font-weight: 700; font-size: 14px; }
.channel-login { color: var(--muted); font-size: 12px; }
.playback-wait { display: inline-flex; align-items: center; gap: 10px; }
.playback-wait .spinner { width: 18px; height: 18px; border-width: 3px; }

.channel-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.badge-live-inline { color: #ff6b6b; font-size: 11px; font-weight: 700; letter-spacing: .4px; margin-top: 2px; }


.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.feature { background: #1b1b22; border: 1px solid var(--border); border-radius: 12px; padding: 20px 20px 16px; position: relative; }
.feature h3 { font-size: 16px; margin: 0 0 8px; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.feature-num {
  position: absolute; top: -12px; right: -12px; width: 36px; height: 36px;
  border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}


.site-footer { border-top: 1px solid var(--border); background: #0d0d12; margin-top: 24px; padding-bottom: 20px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 36px 24px 24px; display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.2fr; gap: 28px; }
.footer-logo { color: var(--accent); font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.footer-text { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 340px; margin-bottom: 12px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; color: #9a9aa5; letter-spacing: .5px; margin: 0 0 12px; font-weight: 600; }
.footer-col a { display: block; color: #b8b8c2; text-decoration: none; font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1a1a20; max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; color: #777; font-size: 12px; background: #111118; border-radius: 10px; }
.footer-age { color: #e05252; font-weight: 700; }


.doc { max-width: 780px; margin: 0 auto; padding: 32px 24px 48px; }
.doc-back { color: #8db3ff; text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 18px; }
.doc-back:hover { text-decoration: underline; }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc-updated { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.doc h2 { font-size: 19px; margin: 30px 0 10px; }
.doc p { color: #d6d6dd; font-size: 15px; line-height: 1.7; margin: 0 0 12px; }
.doc ul { color: #d6d6dd; font-size: 15px; line-height: 1.7; margin: 0 0 12px; padding-left: 22px; }
.doc ul li { margin: 4px 0; }


#toolbar {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
#toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #31313c);
  background: #101016;
  color: #e8e8ec;
  font-size: 14px;
}
#toolbar select {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #31313c);
  background: #101016;
  color: #e8e8ec;
  font-size: 14px;
}
#resultCount { font-size: 13px; }


.resume-btn {
  position: absolute;
  left: 40px;
  bottom: 18px;
  background: rgba(169,112,255,.92);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.resume-btn:hover { background: #b988ff; }
.watched-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,.16);
  z-index: 2;
}
.watched-line i { display: block; height: 100%; background: #a970ff; }


.channel-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.channel-head-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  background: #26262e; border: 3px solid #2c2c34; flex: none;
}
.channel-head-avatar.is-live { border-color: #e05252; }
.channel-head-info { display: flex; flex-direction: column; gap: 4px; }
.channel-head-name { font-size: 26px; font-weight: 800; margin: 0; }
.channel-head-login { color: #a970ff; font-size: 14px; font-weight: 600; }
.channel-head-meta { color: var(--muted); font-size: 13px; }
.channel-twitch { margin-top: 8px; align-self: flex-start; }


.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.chart {
  background: #14141a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px 6px;
  width: 100%;
  overflow: hidden;
}
.chart svg { display: block; }
.doc-title { font-size: 24px; font-weight: 800; margin: 0; }


.misc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.misc-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: #1b1b22; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; color: var(--text); cursor: pointer; text-align: left;
  transition: border-color .15s, transform .15s;
}
.misc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.misc-card-avatar { width: 44px; height: 44px; border-radius: 12px; background: #2a2340; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.misc-card-name { font-size: 15px; font-weight: 700; }
.misc-card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.misc-app-card { background: #1b1b22; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; max-width: 520px; margin: 0 auto; }
.misc-app-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.misc-app-avatar { width: 42px; height: 42px; border-radius: 12px; background: #2a2340; color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.misc-app-titles { flex: 1; min-width: 0; }
.misc-app-name { font-size: 16px; font-weight: 700; }
.misc-app-desc { font-size: 12px; color: var(--muted); }
.misc-close { background: #24242c; color: #fff; border: 0; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.misc-close:hover { background: #2f2f3a; }
.misc-app-body { padding: 18px 16px; }


.calc { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto; }
.calc-display { background: #101016; border: 1px solid #2a2a34; border-radius: 10px; padding: 14px 16px; font-size: 28px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; overflow: hidden; min-height: 34px; }
.calc-keys { display: flex; flex-direction: column; gap: 8px; }
.calc-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-key { background: #26262e; color: #e8e8ec; border: 0; border-radius: 10px; padding: 0; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 19px; line-height: 1; font-weight: 600; cursor: pointer; }
.calc-key.calc-op { font-size: 24px; }
.calc-key:hover { background: #31313a; }
.calc-key.calc-op { background: #2a2340; color: #c9a8ff; }
.calc-key.calc-op:hover { background: #332b52; }
.calc-key.calc-eq { background: var(--accent); color: #fff; font-size: 20px; }
.calc-key.calc-eq:hover { filter: brightness(1.12); }


.tool-page { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; }
.tool-card { background: #17171d; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px 22px; }
.tool-card-wide { max-width: 640px; margin: 0 auto; }
.tool-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.misc-close-link { color: #8db3ff; text-decoration: none; font-size: 13px; white-space: nowrap; }
.misc-close-link:hover { text-decoration: underline; }


.calc-screen {
  background: linear-gradient(180deg, #101016, #14141c);
  border: 1px solid #2a2a34;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.calc-op { text-align: right; font-size: 13px; color: #a970ff; min-height: 18px; font-weight: 600; }
.calc-display { background: transparent; border: 0; padding: 0; font-size: 34px; margin: 0; }


.speed-myip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #b8b8c2;
  margin: 2px 0 10px;
  min-height: 20px;
}
.speed-myip-flag { display: inline-flex; align-items: center; }
.speed-myip-flag-img { width: 24px; height: 18px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px #31313c; }


.speed-stage { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 6px; min-height: 20px; }
.speed-stage.active { color: #a7d3ff; }
.speed-stage.done { color: #9fd08b; }
.speed-stage.warn { color: #e05252; }


.speed-progress {
  position: relative;
  height: 4px;
  background: #26262e;
  border-radius: 2px;
  margin: 8px auto 14px;
  max-width: 320px;
}
.speed-progress::before,
.speed-progress::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55555f;
  transform: translateY(-50%);
}
.speed-progress::before { left: -1px; background: var(--accent); }
.speed-progress::after { right: -1px; }
.speed-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3a7dff, var(--accent));
  border-radius: 2px;
  transition: width .3s;
}

.speed-gauge-wrap { position: relative; margin: 2px auto 8px; width: 220px; }
.speed-gauge-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge-bg { stroke: #26262e; }
#gaugeArc { transition: stroke-dashoffset .15s linear; }
#gaugeNeedle { transition: transform .15s linear; }
.speed-value { text-align: center; font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; position: relative; }
.speed-unit { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.speed-results { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 16px; }
.speed-row { display: flex; justify-content: space-between; align-items: center; background: #14141a; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.speed-row span { color: var(--muted); }
.speed-row strong { font-variant-numeric: tabular-nums; }
.misc-card { text-decoration: none; }


.misc-divider {
  max-width: 1200px;
  margin: 8px auto 0;
  padding: 0 24px;
}
.misc-divider::after { content: ''; display: block; border-top: 1px solid var(--border); }


.misc-card-bot { align-items: flex-start; }
.misc-card-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.bot-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #55555f;
  vertical-align: middle;
  margin-left: 4px;
}
.bot-dot.on { background: #2ebd3b; box-shadow: 0 0 6px rgba(46,189,59,.7); }
.bot-dot.off { background: #e05252; }
.misc-card-clickable { cursor: pointer; }
.misc-card-bot .misc-card-avatar img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.bot-info-box { max-width: 560px; }
.bot-info-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.bot-info-head h2 { font-size: 18px; margin: 0 0 2px; }
.bot-info-list { color: #d6d6dd; font-size: 14px; line-height: 1.6; padding-left: 20px; margin: 0 0 12px; }
.bot-info-list li { margin: 3px 0; }


.bot-login-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.bot-login-form input { flex: 1 1 180px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: #101016; color: #e8e8ec; font-size: 14px; }
.bot-err { color: #e05252; }
.bot-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.bot-status-row { display: flex; justify-content: space-between; background: #14141a; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.bot-status-row span { color: var(--muted); }
.bot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bot-section-head { border-top: 1px solid var(--border); padding-top: 14px; margin-bottom: 10px; font-size: 15px; font-weight: 700; }
.bot-guild { border: 1px solid var(--border); border-radius: 12px; background: #14141a; padding: 12px 14px; margin-bottom: 12px; }
.bot-guild-head { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.bot-guild-block { margin-bottom: 10px; }
.bot-guild-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bot-guild-block input { padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); background: #101016; color: #e8e8ec; font-size: 13px; margin-right: 6px; min-width: 140px; }
.bot-small { padding: 6px 12px; font-size: 13px; }
.bot-danger { background: #5a2b2b; color: #fff; }
.bot-danger:hover { background: #6d3333; }
.bot-streamers { display: flex; flex-direction: column; gap: 6px; }
.bot-streamer { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; background: #1b1b22; border-radius: 8px; padding: 6px 10px; }
.bot-add-row { display: flex; gap: 6px; flex-wrap: wrap; }
.bot-thanks-notes { display: grid; gap: 6px; margin: 4px 0 8px; }
.bot-thanks-notes .bot-add-row input { flex: 1 1 140px; min-width: 0; }


.bot-status-note { font-size: 13px; color: var(--muted); background: #14141a; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }

.bot-guild-card { margin-bottom: 12px; }
.bot-guild-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: #14141a; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; color: var(--text); cursor: pointer; text-align: left;
}
.bot-guild-card.open .bot-guild-toggle { border-radius: 12px 12px 0 0; }
.bot-guild-titlebar { display: flex; align-items: center; gap: 10px; background: #14141a; border: 1px solid var(--border); border-radius: 12px 12px 0 0; padding: 12px 14px; }
.bot-guild-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.bot-guild-title { flex: 1; min-width: 0; }
.bot-guild-name { font-weight: 700; font-size: 15px; }
.bot-guild-sub { font-size: 12px; color: var(--muted); }
.bot-guild-chevron { transition: transform .2s; color: var(--muted); }
.bot-guild-card.open .bot-guild-chevron { transform: rotate(180deg); }
.bot-guild-body { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; padding: 14px; background: #101016; }
.bot-block { margin-bottom: 16px; }
.bot-block-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #cfcfd8; }


.bot-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.bot-tab {
  padding: 9px 18px; border-radius: 8px; border: 1px solid #31313c; background: #24242c;
  color: #b8b8c2; font-size: 14px; font-weight: 600; cursor: pointer;
}
.bot-tab:hover { background: #2f2f3a; }
.bot-tab.active { background: #a970ff; border-color: #a970ff; color: #fff; }
.bot-pane { animation: botPaneIn .15s ease; }
@keyframes botPaneIn { from { opacity: 0; } to { opacity: 1; } }

.bot-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.bot-color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bot-color-row input[type="color"] { width: 46px; height: 32px; border: 1px solid var(--border); border-radius: 6px; background: #101016; cursor: pointer; padding: 2px; }
.bot-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.bot-swatch { width: 20px; height: 20px; border-radius: 5px; border: 2px solid transparent; cursor: pointer; }
.bot-swatch.active { border-color: #fff; }

.bot-preview-toggle { display: flex; gap: 8px; margin-bottom: 8px; }
.bot-prev-btn { background: #24242c; color: #cfcfd8; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.bot-prev-btn.active { background: var(--accent); color: #fff; }
.bot-preview-wrap { margin-bottom: 10px; }


.dc-preview { background: #313338; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.dc-content { color: #dbdee1; margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; }
.dc-embed { background: #2b2d31; border-left: 4px solid #9146ff; border-radius: 4px; padding: 10px 12px; max-width: 520px; }
.dc-author { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dc-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-author-name { color: #fff; font-weight: 600; font-size: 14px; }
.dc-title { color: #fff; font-weight: 700; margin-bottom: 8px; }
.dc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dc-fname { color: #949ba4; font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.dc-fval { color: #dbdee1; font-size: 13px; }
.dc-footer { color: #949ba4; font-size: 11px; margin-top: 8px; }

.bot-text-input { width: 100%; margin-bottom: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #101016; color: #e8e8ec; font-size: 13px; }
.bot-hints { margin-bottom: 10px; font-size: 12px; }
.bot-hints summary { cursor: pointer; color: #8db3ff; }
.bot-hints-body { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.bot-hint-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.bot-hint-row code { background: #101016; padding: 1px 6px; border-radius: 5px; color: #c9a8ff; }
.bot-hint-desc { color: var(--muted); }
.bot-hint-ex { color: #7f8691; font-style: italic; }

.bot-savebar { display: flex; align-items: center; gap: 10px; background: #3a2f10; border: 1px solid #5c4a12; border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
.bot-savebar-text { font-size: 13px; color: #e6c76a; flex: 1; }

.bot-streamer-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.bot-streamer-info { flex: 1; min-width: 0; }
.bot-streamer-target { font-size: 12px; color: var(--muted); }
.bot-add-msg { color: #e05252; min-height: 16px; margin: 6px 0 0; }


.bot-floatbar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; z-index: 200;
  background: #3a2f10; border: 1px solid #5c4a12; border-radius: 10px;
  padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.bot-floatbar[hidden] { display: none; }
.bot-floatbar-text { color: #e6c76a; font-size: 13px; }

textarea.bot-text-input { min-height: 46px; resize: vertical; font-family: inherit; }
.bot-color-label { font-size: 12px; color: var(--muted); margin: 6px 0; }
.bot-color-input { width: 46px; height: 32px; border: 1px solid var(--border); border-radius: 6px; background: #101016; cursor: pointer; padding: 2px; }
.bot-hints .bot-tag { background: #2a2340; color: #c9a8ff; border: 0; border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; font-family: ui-monospace, SFMono-Regular, monospace; }
.bot-hints .bot-tag:hover { background: #332b52; }
.bot-hint-ex { color: #7f8691; font-style: italic; text-decoration: none; }
a.bot-hint-ex:hover { text-decoration: underline; }


.dc-content strong { font-weight: 700; color: #fff; }
.dc-content em { font-style: italic; }
.dc-content u { text-decoration: underline; }
.dc-content s { text-decoration: line-through; }
.dc-content code { background: #1e1f22; padding: 1px 4px; border-radius: 4px; font-family: ui-monospace, monospace; }
.dc-content a { color: #00a8fc; text-decoration: none; }
.dc-content a:hover { text-decoration: underline; }
.dc-banner { width: 100%; border-radius: 4px; margin: 6px 0 8px; display: block; max-height: 220px; object-fit: cover; }

.bot-banner-preview { width: 100%; max-width: 420px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 8px; display: block; background: #101016; min-height: 40px; }
.bot-banner-modes { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.bot-file { margin-bottom: 6px; color: #b8b8c2; font-size: 13px; }


.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 8px; }
@media (max-width: 700px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-card { background: #1b1b22; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.contact-card h2 { font-size: 16px; margin: 0 0 8px; }
.contact-value { font-size: 15px; font-weight: 600; color: var(--accent); margin: 0 0 8px; }


@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 34px 20px 26px; gap: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}




.studio-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
@media (max-width: 720px) { .studio-top { grid-template-columns: 1fr; } }
.studio-pick { margin: 0; }
.studio-pick input[type="text"] {
  width: 100%;
  margin: 5px 0 8px;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #101016;
  color: #e8e8ec;
  font-size: 14px;
}
.studio-titlebar { display: flex; align-items: center; gap: 10px; padding: 4px 0; min-height: 40px; }
.studio-titlebar .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #26262e; flex: none; }
.studio-titlebar .st-title { font-size: 15px; font-weight: 600; }
.studio-titlebar .st-sub { font-size: 12px; color: #9a9aa5; }
.studio-titlebar .st-text { min-width: 0; }


#srcPlayerWrap { background: #050507; border-radius: 12px; padding: 8px; }


#timeline { margin-top: 10px; }
#timelineWrap { position: relative; }
#timelineFrames {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  pointer-events: none;
  background: #0b0b0f;
  z-index: 0;
}
#timelineFrames img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; opacity: .8; }
#timelineFrames img:not(:last-child) { border-right: 1px solid rgba(0,0,0,.4); }
#timelineTrack {
  position: relative;
  height: 54px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #31313c;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3);
}
#rangeSel {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(169,112,255,.28);
  border-left: 1px solid rgba(169,112,255,.7);
  border-right: 1px solid rgba(169,112,255,.7);
  display: none;
  pointer-events: none;
}
.tl-marker {
  position: absolute;
  top: 0; bottom: 0;
  width: 12px;
  margin-left: -6px;
  cursor: ew-resize;
  z-index: 3;
}
.tl-marker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 5px;
  width: 2px;
  background: #a970ff;
}
.tl-marker[data-marker="start"]::after { background: #4bd06a; }
.tl-marker[data-marker="end"]::after { background: #ff6b6b; }
.tl-marker:hover::after { width: 3px; }
#playhead {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  z-index: 2;
  pointer-events: none;
}
.tl-time { font-size: 12px; color: #9a9aa5; text-align: center; margin-top: 4px; }
.wave-strip {
  position: relative;
  height: 34px;
  margin-top: 3px;
  border: 1px solid #31313c;
  border-radius: 8px;
  background: #0b0b0f;
  overflow: hidden;
  cursor: pointer;
}
.wave-strip img { position: absolute; top: 0; left: 0; height: 100%; object-fit: fill; display: block; opacity: .85; }
.wave-strip .wave-cursor { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }


.tl-transport { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tl-transport button {
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #24242c;
  color: #e8e8ec;
  cursor: pointer;
  font-size: 13px;
}
.tl-transport button:hover { background: #2f2f3a; }
.tl-transport button#tlPlay { min-width: 44px; font-weight: 700; }
.tl-transport button#tlPlayRange { margin-left: auto; background: #2a6cf0; border-color: #2a6cf0; }
.tl-transport button#tlPlayRange:hover { background: #3a7bff; }
.tl-hint { font-size: 12px; color: #7c7c88; margin-top: 6px; }


.clip-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.clip-presets button {
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #24242c;
  color: #e8e8ec;
  cursor: pointer;
  font-size: 13px;
}
.clip-presets button:hover { background: #2f2f3a; }
.clip-presets button.active { background: #a970ff; border-color: #a970ff; color: #fff; }


.clip-length { font-size: 13px; color: #9a9aa5; margin-bottom: 10px; }
.clip-length.over { color: #e05252; font-weight: 700; }
.clip-length.ok { color: #9fd08b; }


.clip-recent-wrap { margin-top: 16px; border-top: 1px solid #26262e; padding-top: 12px; }
.clip-recent-title { font-size: 13px; font-weight: 700; color: #cfcfd8; margin-bottom: 8px; }
.clip-recent { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.clip-recent-item { flex: none; width: 150px; text-decoration: none; color: #e8e8ec; }
.clip-recent-item video { width: 100%; aspect-ratio: 16/9; border-radius: 8px; background: #000; object-fit: cover; border: 1px solid #2a2a34; }
.clip-recent-item .cr-meta { font-size: 11px; color: #9a9aa5; margin-top: 3px; }

@media (max-width: 900px) {
  .tl-transport button { flex: 1 1 auto; }
  .tl-transport button#tlPlayRange { margin-left: 0; }
}


.clip-progress { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.clip-progress-label { font-size: 13px; color: #b8b8c2; }
.clip-progress-bar {
  position: relative;
  height: 8px;
  border-radius: 5px;
  background: #24242c;
  overflow: hidden;
}
.clip-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2a6cf0, #a970ff);
  border-radius: 5px;
  transition: width .4s ease;
}
.clip-progress-bar.indeterminate .clip-progress-fill {
  background: linear-gradient(90deg, #2a6cf0, #a970ff, #2a6cf0);
  background-size: 200% 100%;
  animation: clipIndet 1.2s linear infinite;
}
@keyframes clipIndet { from { background-position: 0 0; } to { background-position: -200% 0; } }
.clip-cancel {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid #5a2b2b;
  background: #3a1f1f;
  color: #ffb3b3;
  cursor: pointer;
  font-size: 12px;
}
.clip-cancel:hover { background: #4a2626; }
.clip-cancel:disabled { opacity: .6; cursor: default; }
.clip-muted { color: #9a9aa5; font-size: 13px; }


.watch-channel { max-width: 1200px; margin: 4px auto 8px; padding: 0 24px; }
.watch-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid #26262e;
  background: #17171d;
  transition: border-color .15s, background .15s;
}
.watch-channel-link:hover { border-color: #3a3a46; background: #1d1d25; }
.watch-channel-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #26262e; display: block; }
.watch-channel-text { display: flex; flex-direction: column; line-height: 1.2; }
.watch-channel-name { font-weight: 700; font-size: 15px; }
.watch-channel-login { font-size: 12px; color: #9a9aa5; }


.auth-area { display: inline-flex; align-items: center; margin-left: 6px; }
.auth-login { padding: 7px 14px; border-radius: 7px; text-decoration: none; }
.auth-user { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: inherit; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid #31313c; background: #24242c; }
.auth-user:hover { background: #2f2f3a; }
.auth-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #26262e; display: block; }
.auth-user-name { font-size: 13px; color: #e8e8ec; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.auth-card { max-width: 520px; margin: 0 auto; }
.auth-steps { font-size: 14px; color: #b8b8c2; line-height: 1.7; }
.auth-steps a { color: #a970ff; }
.auth-code { font-size: 40px; font-weight: 800; letter-spacing: 8px; text-align: center; margin: 18px 0 6px; color: #a970ff; font-variant-numeric: tabular-nums; }
.auth-cmd { text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 15px; color: #9fd08b; background: #121217; border: 1px solid #26262e; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.auth-status { text-align: center; font-size: 13px; color: #9a9aa5; min-height: 18px; margin-bottom: 14px; }
.auth-status.auth-warn { color: #e05252; }
.auth-ok { text-align: center; font-size: 16px; color: #9fd08b; margin: 18px 0; }


.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #26262e; flex: none; }
.profile-info { display: flex; flex-direction: column; gap: 4px; }
.profile-name { font-size: 22px; font-weight: 800; }
.profile-login { font-size: 14px; color: #9a9aa5; }
.profile-badges { margin: 4px 0 8px; }
.profile-badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.profile-badge-owner { background: #3a2a10; color: #ffd75e; border: 1px solid #5a4020; }

.sessions { display: flex; flex-direction: column; gap: 10px; }
.session-card { background: #17171d; border: 1px solid #26262e; border-radius: 12px; padding: 14px 16px; position: relative; }
.session-card.session-current { border-color: #a970ff; }
.session-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.session-device { font-size: 15px; font-weight: 700; }
.session-badge { font-size: 11px; background: #2a1f3f; color: #c9a6ff; border: 1px solid #4a3a6a; border-radius: 999px; padding: 2px 10px; }
.session-meta { font-size: 13px; color: #9a9aa5; line-height: 1.5; }
.session-revoke { position: absolute; top: 12px; right: 14px; background: #3a1f1f; color: #ffb3b3; border: 1px solid #5a2b2b; border-radius: 7px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.session-revoke:hover { background: #4a2626; }
.session-revoke:disabled { opacity: .6; cursor: default; }


.auth-lead { font-size: 14px; color: #b8b8c2; line-height: 1.6; margin: 8px 0 16px; }
.auth-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.auth-provider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 18px; border-radius: 10px; text-decoration: none;
  font-size: 15px; font-weight: 700; color: #fff;
}
.auth-provider-twitch { background: #9146ff; }
.auth-provider-twitch:hover { background: #7d2fe0; }
.auth-provider-discord { background: #5865f2; }
.auth-provider-discord:hover { background: #4752c4; }
.auth-provider.disabled { opacity: .45; pointer-events: none; }
.btn.disabled { opacity: .5; pointer-events: none; }
.auth-provider-ic { display: inline-flex; align-items: center; }
.auth-provider-ic svg { display: block; }


.providers { display: flex; flex-direction: column; gap: 10px; }
.prov-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #17171d; border: 1px solid #26262e; border-radius: 12px; padding: 12px 16px; }
.prov-left { min-width: 0; }
.prov-name { font-size: 15px; font-weight: 700; }
.prov-sub { font-size: 13px; color: #9a9aa5; }


.recording-setting-wrap { display: grid; gap: 8px; max-width: 760px; }
.recording-setting {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px;
  background: #17171d; border: 1px solid #26262e; border-radius: 12px; padding: 16px 18px;
}
.recording-setting-info { grid-column: 1; grid-row: 1; min-width: 0; }
.recording-setting-title { font-size: 15px; font-weight: 700; }
.recording-setting-desc { margin-top: 4px; color: #9a9aa5; font-size: 13px; line-height: 1.5; }
.recording-setting-note { grid-column: 1 / -1; grid-row: 2; min-height: 17px; font-size: 12.5px; color: #9a9aa5; }
.recording-setting-note[data-state="success"] { color: #6fd88d; }
.recording-setting-note[data-state="error"] { color: #ff8f8f; }
.rec-toggle {
  grid-column: 2; grid-row: 1; align-self: center;
  position: relative; width: 46px; height: 26px; padding: 0; border-radius: 999px;
  border: 1px solid #3a3a45; background: #24242c; cursor: pointer; transition: background .15s, border-color .15s;
}
.rec-toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #8b8b96; transition: transform .15s, background .15s;
}
.rec-toggle.on { background: #5b3a8a; border-color: #8b5cc4; }
.rec-toggle.on .rec-toggle-knob { transform: translateX(20px); background: #fff; }
.rec-toggle:disabled { opacity: .6; cursor: default; }
.rec-toggle:focus-visible { outline: 2px solid #a970ff; outline-offset: 2px; }
@media (max-width: 520px) {
  .recording-setting { grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
}


.auth-divider { text-align: center; color: #7c7c88; font-size: 13px; margin: 18px 0 12px; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 36%; height: 1px; background: #26262e; }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }
.auth-code-box { background: #121217; border: 1px solid #26262e; border-radius: 12px; padding: 14px 16px; }
.auth-cmd { text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 15px; color: #9fd08b; background: #0e0e13; border: 1px solid #26262e; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }


.nf {
  max-width: 640px;
  margin: 8vh auto 0;
  padding: 24px;
  text-align: center;
}
.nf-code {
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
  color: #a970ff;
  letter-spacing: 4px;
  text-shadow: 0 0 40px rgba(169,112,255,.35);
}
.nf-title { font-size: 24px; font-weight: 800; margin: 12px 0 8px; }
.nf-text { color: #9a9aa5; font-size: 15px; margin-bottom: 24px; }
.nf-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }


.twitch-status { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 16px; color: #b8b8c2; }
.twitch-status.off { color: #e05252; }
.twitch-reauth { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: -6px 0 16px; }
.twitch-connect { background: #17171d; border: 1px solid #26262e; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.twitch-block { background: #17171d; border: 1px solid #26262e; border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.twitch-block-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.twitch-form { display: grid; grid-template-columns: 1fr 160px; gap: 8px; margin-bottom: 10px; }
.twitch-form input, .twitch-form select {
  padding: 9px 11px; border-radius: 8px; border: 1px solid #31313c; background: #101016; color: #e8e8ec; font-size: 14px;
}
.twitch-form input#rwPrompt { grid-column: 1 / 2; }
.twitch-form select { grid-column: 1 / 2; }
.twitch-form #rwCreate { grid-column: 1 / 3; justify-self: start; }
@media (max-width: 640px) { .twitch-form { grid-template-columns: 1fr; } .twitch-form input#rwPrompt, .twitch-form select, .twitch-form #rwCreate { grid-column: 1; } }

.tw-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tw-tab {
  padding: 9px 18px; border-radius: 8px; border: 1px solid #31313c; background: #24242c;
  color: #b8b8c2; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tw-tab:hover { background: #2f2f3a; }
.tw-tab.active { background: #a970ff; border-color: #a970ff; color: #fff; }
.tw-radio { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.tw-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #b8b8c2; grid-column: 1 / 3; }
.tw-label input[type="number"] { width: 80px; padding: 7px 9px; border-radius: 7px; border: 1px solid #31313c; background: #101016; color: #e8e8ec; }
.tw-label select { padding: 7px 9px; border-radius: 7px; border: 1px solid #31313c; background: #101016; color: #e8e8ec; }
.tw-label input[type="range"] { flex: 1; }
.twitch-overlay { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.twitch-overlay input { flex: 1; min-width: 240px; padding: 9px 11px; border-radius: 8px; border: 1px solid #31313c; background: #101016; color: #b8b8c2; font-size: 13px; }
.rw-media { max-width: 200px; border-radius: 8px; margin-top: 6px; display: block; }
.twitch-form .clip-check { grid-column: 1 / 3; }
.twitch-form #rwMediaFile { grid-column: 1 / 3; font-size: 13px; color: #b8b8c2; }
.twitch-channels { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.twitch-channels select { padding: 9px 11px; border-radius: 8px; border: 1px solid #31313c; background: #101016; color: #e8e8ec; font-size: 14px; min-width: 220px; }
.rw-list { display: flex; flex-direction: column; gap: 8px; }
.rw-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #121217; border: 1px solid #26262e; border-radius: 10px; padding: 10px 12px; position: relative; }
.rw-info { min-width: 0; }
.rw-title { font-size: 14px; font-weight: 700; }
.rw-sub { font-size: 12px; color: #9a9aa5; }
.twitch-events { display: flex; flex-direction: column; gap: 4px; }
.twitch-event { display: flex; gap: 10px; font-size: 13px; color: #b8b8c2; }
.te-time { color: #7c7c88; flex: none; }


.tw-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 18px; align-items: start; }
.tw-tabs { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 8px; background: #17171d; border: 1px solid #26262e; border-radius: 8px; }
.tw-tab { display: flex; align-items: center; gap: 12px; min-height: 42px; width: 100%; padding: 8px 10px; text-align: left; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #b8b8c2; }
.tw-tab.active { background: #282132; border-color: #493264; color: #fff; }
.tw-icon { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; color: #c69aff; font-size: 14px; font-weight: 800; border: 1px solid #54436a; border-radius: 5px; }
.tw-nav-toggle { align-self: flex-end; width: 32px; height: 32px; border: 1px solid #353540; border-radius: 6px; color: #e8e8ec; background: #202027; font-size: 20px; cursor: pointer; }
.tw-tabs.collapsed { width: 64px; box-sizing: border-box; }
.tw-tabs.collapsed .tw-tab { justify-content: center; padding: 8px 4px; }
.tw-tabs.collapsed .tw-nav-label { display: none; }
.tw-tabs.collapsed .tw-nav-toggle { align-self: center; }
.tw-content { min-width: 0; }
.tw-welcome { display: flex; align-items: center; gap: 14px; padding: 20px; background: #17171d; border-bottom: 1px solid #34313a; margin-bottom: 16px; }
.tw-welcome img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.tw-welcome p { margin: 0 0 3px; color: #b8b8c2; }
.tw-welcome h2 { margin: 0; font-size: 22px; }
.tw-master { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tw-periods { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid #303038; }
.tw-periods button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #b8b8c2; padding: 10px 12px; cursor: pointer; }
.tw-periods button.active { color: #fff; border-color: #a970ff; }
.tw-leader-head { font-weight: 700; margin-bottom: 8px; }
.tw-leader-row, .tw-data-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid #292930; }
.tw-leader-rank { color: #a970ff; width: 28px; font-variant-numeric: tabular-nums; }
.tw-leader-count { margin-left: auto; color: #aaaab4; }
.tw-clip-thumb { display: block; width: min(100%, 360px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.tw-inline-form { display: flex; gap: 8px; margin: 12px 0; }
.tw-inline-form input { min-width: 0; flex: 1; padding: 9px 11px; border: 1px solid #31313c; border-radius: 6px; background: #101016; color: #eee; }
.tw-data-row button { margin-left: auto; }
.tw-coming { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #17171d; border: 1px solid #303038; border-radius: 8px; position: relative; overflow: hidden; }
.tw-coming::before { content: ''; position: absolute; inset: 0; background: rgba(90, 90, 96, .38); backdrop-filter: blur(3px); }
.tw-coming > * { position: relative; color: #eee; }
.tw-coming-mark { font-size: 34px; color: #c4c4ca; }
.tw-coming h2 { margin: 12px 0 4px; }
.tw-coming p { margin: 0; font-weight: 700; }
@media (max-width: 760px) {
  .tw-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tw-tabs { position: static; flex-direction: row; flex-wrap: wrap; }
  .tw-tabs .tw-nav-toggle { order: -1; }
  .tw-tabs.collapsed { width: 100%; }
  .tw-tabs.collapsed .tw-tab { width: 42px; }
  .tw-welcome { flex-wrap: wrap; }
  .tw-master { width: 100%; margin: 8px 0 0; }
  .tw-inline-form { flex-wrap: wrap; }
  .tw-inline-form input { flex-basis: 100%; }
}


.channel-stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.channel-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #17171d;
  border: 1px solid #26262e;
  border-radius: 10px;
  padding: 8px 14px;
}
.channel-stat-label { font-size: 11px; color: #9a9aa5; }
.channel-stat-value { font-size: 18px; font-weight: 700; color: #e8e8ec; }


.draft-dup {
  background: #2f2f3a;
  color: #e8e8ec;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.draft-dup:hover { background: #3a3a46; }
.cr-dup {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #31313c;
  background: #24242c;
  color: #cfcfd8;
  font-size: 11px;
  cursor: pointer;
}
.cr-dup:hover { background: #2f2f3a; }


.clip-segments { margin-top: 14px; border-top: 1px solid #26262e; padding-top: 12px; }
.clip-segments-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #cfcfd8; }
.clip-segments-head button {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid #31313c;
  background: #24242c;
  color: #e8e8ec;
  font-size: 12px;
  cursor: pointer;
}
.clip-segments-head button:hover { background: #2f2f3a; }
.seg-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.seg-empty { font-size: 12px; color: #7c7c88; }
.seg-item { display: flex; align-items: center; gap: 8px; background: #121217; border: 1px solid #26262e; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.seg-item .seg-range { flex: 1; color: #e8e8ec; }
.seg-item .seg-len { color: #9a9aa5; font-size: 12px; }
.seg-item button { background: transparent; border: 0; color: #e05252; cursor: pointer; font-size: 14px; padding: 2px 6px; }
.seg-item button:hover { color: #ff6b6b; }
.seg-create-all {
  width: 100%;
  padding: 8px 14px;
  border-radius: 8px;
  border: 0;
  background: #2f7a3f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.seg-create-all:hover { background: #379049; }
.seg-create-all:disabled { background: #2a2a34; color: #6b6b76; cursor: default; }


.chat-settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .chat-settings-layout { grid-template-columns: minmax(0, 1fr); } }

.chat-field { margin-bottom: 15px; }
.chat-field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: #b8b8c2; margin-bottom: 8px; }
.chat-value {
  font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: #e8e8ec;
  background: #101016; border: 1px solid #31313c; border-radius: 7px; padding: 2px 9px; min-width: 52px; text-align: center;
}

.tw-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px;
  outline: none; cursor: pointer; margin: 0;
  background: linear-gradient(to right, #a970ff 0%, #a970ff var(--fill, 50%), #31313c var(--fill, 50%), #31313c 100%);
}
.tw-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid #a970ff; box-shadow: 0 1px 4px rgba(0, 0, 0, .55); cursor: pointer;
}
.tw-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 3px solid #a970ff; box-shadow: 0 1px 4px rgba(0, 0, 0, .55); cursor: pointer;
}
.tw-range::-moz-range-track { height: 8px; border-radius: 999px; background: transparent; }
.tw-range:focus { outline: none; }
.tw-range:focus-visible { box-shadow: 0 0 0 3px rgba(169, 112, 255, .35); }

.chat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 4px; }
.chat-grid .tw-label { grid-column: auto; justify-content: space-between; }
.chat-grid input[type="color"] {
  width: 42px; height: 30px; padding: 2px; border: 1px solid #31313c; border-radius: 7px;
  background: #101016; cursor: pointer;
}
.chat-grid select {
  flex: 1; min-width: 0; padding: 7px 9px; border-radius: 7px; border: 1px solid #31313c;
  background: #101016; color: #e8e8ec; font-size: 14px;
}

.chat-toggles { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; }
.chat-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.chat-actions #chMsg { font-size: 13px; }
.command-form { grid-template-columns: minmax(120px, .7fr) minmax(220px, 1.6fr) minmax(150px, .7fr) auto; }
.commands-list { display: grid; gap: 10px; }
.command-row { padding: 13px 14px; border: 1px solid var(--border); border-radius: 8px; background: #14141a; }
.command-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.command-row-head strong { color: #cdb7ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.command-enabled { margin: 0; font-size: 12px; }
.command-response { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #31313c; border-radius: 7px; background: #101016; color: #e8e8ec; }
.command-row-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.command-row-controls input { width: 130px; padding: 7px 9px; border: 1px solid #31313c; border-radius: 7px; background: #101016; color: #e8e8ec; }
@media (max-width: 760px) { .command-form { grid-template-columns: 1fr; } }

.chat-preview-block { position: sticky; top: 14px; }
.chat-preview-scene {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 1px solid #26262e; margin-bottom: 10px;
  background:
    radial-gradient(120% 90% at 18% 8%, rgba(169, 112, 255, .20), transparent 55%),
    radial-gradient(120% 90% at 85% 92%, rgba(64, 180, 255, .16), transparent 55%),
    linear-gradient(135deg, #12131b, #1c1526 55%, #0f1016);
}
.chat-preview-scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 34px 34px;
}
.chat-preview-canvas { position: absolute; inset: 0; }
#chatPreviewBox { position: absolute; inset: 0; z-index: 1; }
.chat-preview-tag {
  position: absolute; top: 8px; right: 10px; z-index: 2; font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: #d9d3e6; background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .12); padding: 3px 9px; border-radius: 999px;
}


.collab-page .collab-intro { padding-bottom: 18px; }
.collab-create-link { margin-top: 12px; }
.collab-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.collab-filters input, .collab-filters select, .collab-form input, .collab-form select, .collab-contact input, .collab-contact select { min-width: 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; background: #101016; color: var(--text); font: inherit; }
.collab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.collab-card { position: relative; display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 17px; color: var(--text); background: #17171d; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; transition: transform .15s, border-color .15s; }
.collab-card:hover { transform: translateY(-2px); border-color: #a970ff; }
.collab-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #2a2340; border: 2px solid #3a3448; }
.collab-card-name { font-size: 17px; font-weight: 750; }
.collab-card-login { color: #aaa7b2; font-size: 12px; }
.collab-card-meta { color: #c3c0ca; font-size: 12px; }
.collab-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.collab-card-tags span { padding: 4px 7px; color: #d8c9f7; background: #29223b; border-radius: 5px; font-size: 11px; }
.collab-card-schedule { color: #a9d9c9; font-size: 12px; line-height: 1.4; }
.collab-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.collab-form .tw-label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.collab-wide { grid-column: 1 / -1; }
.collab-form textarea { min-height: 92px; resize: vertical; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; background: #101016; color: var(--text); font: inherit; }
.collab-fieldset { min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: 8px; }
.collab-fieldset legend { padding: 0 6px; color: #c9a8ff; font-size: 13px; font-weight: 700; }
.collab-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; }
.collab-checks label { display: inline-flex; align-items: center; gap: 5px; }
.collab-schedule { display: grid; grid-template-columns: repeat(7, minmax(65px, 1fr)); gap: 8px; margin-top: 10px; }
.collab-timezone-hint { display: block; margin-top: 5px; font-size: 12px; }
.collab-day { display: grid; gap: 5px; color: #d8d5de; font-size: 12px; }
.collab-day input[type="time"] { min-width: 0; padding: 6px; }
.collab-contact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.collab-contact select { flex: 0 0 auto; }
.collab-contact input { min-width: 0; flex: 1 1 120px; }
.collab-contact-label { max-width: 100px !important; }
.collab-contact-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.collab-contact-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; color: #fff; background: #2a2340; border: 1px solid #3a3448; cursor: pointer; transition: background .15s; }
.collab-contact-btn:hover { background: #382b55; }
.collab-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.collab-profile { max-width: 760px; padding: 22px; background: #17171d; border: 1px solid var(--border); border-radius: 10px; }
.collab-profile-head { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.collab-profile-avatar { width: 86px; height: 86px; }
.collab-profile-info h2 { margin: 0 0 5px; font-size: 24px; }
.collab-profile-block { padding-top: 17px; }
.collab-profile-block h3 { margin: 0 0 6px; font-size: 13px; color: #c9a8ff; }
.collab-profile-block p { margin: 0 0 5px; color: #d2cfd8; line-height: 1.55; white-space: pre-wrap; }
.collab-schedule-public { display: inline-block; min-width: 120px; margin-right: 14px !important; color: #a9d9c9 !important; }
@media (max-width: 840px) {
  .collab-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collab-filters input { grid-column: 1 / -1; }
  .collab-schedule { grid-template-columns: repeat(4, minmax(65px, 1fr)); }
}
@media (max-width: 560px) {
  .collab-form { grid-template-columns: 1fr; }
  .collab-wide { grid-column: auto; }
  .collab-filters { grid-template-columns: 1fr; }
  .collab-filters input { grid-column: auto; }
  .collab-schedule { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
  .collab-contact { grid-template-columns: 1fr; }
  .collab-profile-head { align-items: flex-start; }
}
.chat-preview-actions { display: flex; gap: 8px; flex-wrap: wrap; }


.twitch-dashboard-body { background: #0d0d0f; }
.twitch-dashboard-body .site-header,
.twitch-dashboard-body .site-footer { display: none; }
.twitch-dashboard-page { min-height: 100vh; padding: 0 0 48px; }
.twitch-dashboard { width: 100%; max-width: 1480px; padding: 28px 32px 48px; }
.twitch-page-head { align-items: flex-end; margin: 0 0 18px; padding: 0 0 18px; border-color: #25252b; }
.twitch-page-head .doc-title { margin: 2px 0 0; font-size: 26px; letter-spacing: -.2px; }
.tw-eyebrow { color: #9d69e8; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; }
.tw-page-note { color: #777780; font-size: 12px; }
.tw-page-actions { display: flex; align-items: center; gap: 12px; }
.tw-back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid #35353d; border-radius: 7px; background: #1b1b20; color: #c9c9d0; font-size: 12px; font-weight: 600; text-decoration: none; }
.tw-back:hover { border-color: #8555bb; background: #2a2034; color: #fff; }
.twitch-status { min-height: 32px; margin: 0 0 14px; padding: 7px 10px; color: #a9a9b2; font-size: 12px; }
.twitch-connect { max-width: 680px; background: #18181c; border: 1px solid #2d2d34; border-radius: 10px; }
.twitch-reauth { margin: 0 0 16px; padding: 10px 12px; background: #15151a; border: 1px solid #292930; border-radius: 8px; }
.tw-app-header { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; margin-bottom: 14px; padding: 10px 14px; background: rgba(20,20,22,.94); border: 1px solid #2a2a30; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.22); backdrop-filter: blur(16px); }
.tw-app-header::after { content: ''; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 1px; background: #9d69e8; opacity: .45; }
.tw-app-brand, .tw-app-tools, .tw-live-state { display: flex; align-items: center; }
.tw-app-brand { gap: 10px; min-width: 180px; }
.tw-app-brand strong { display: block; color: #f5f5f7; font-size: 13px; }
.tw-app-brand div span { display: block; margin-top: 2px; color: #777780; font-size: 10px; }
.tw-app-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #7b4bb2; border-radius: 9px; background: #2b1b3b; color: #d5afff; font-size: 11px; font-weight: 900; letter-spacing: -.5px; }
.tw-app-channel { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tw-app-tools { justify-content: flex-end; gap: 10px; min-width: 0; }
.tw-live-state { gap: 7px; padding: 7px 10px; border: 1px solid #2d3430; border-radius: 7px; background: #152018; color: #a9d7b1; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tw-live-state span { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #36c56b; box-shadow: 0 0 0 3px rgba(54,197,107,.12); }
.tw-live-state.offline { border-color: #303036; background: #19191d; color: #92929b; }
.tw-live-state.offline span { background: #686872; box-shadow: none; }
.tw-live-state.error { border-color: #4a3030; background: #241818; color: #d99a9a; }
.tw-live-state.error span { background: #d06b6b; box-shadow: none; }
.tw-current-channel { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tw-current-channel span { color: #777780; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.tw-current-channel strong { overflow: hidden; color: #eeeef1; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tw-icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 1px solid #35353d; border-radius: 7px; background: #1b1b20; color: #c9c9d0; cursor: pointer; line-height: 0; }
.tw-icon-button:hover { border-color: #8555bb; background: #2a2034; color: #fff; }
.tw-icon-button svg, .tw-nav-toggle svg, .tw-icon svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tw-app-header .tw-mobile-menu { display: none; }
.tw-icon-button:disabled { opacity: .6; cursor: default; }
.tw-icon-button.is-loading svg { animation: tw-spin .7s linear infinite; }
@keyframes tw-spin { to { transform: rotate(360deg); } }
.tw-shell { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 22px; align-items: start; }
.tw-shell.is-collapsed { grid-template-columns: 64px minmax(0,1fr); }
.tw-tabs { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 3px; min-height: calc(100vh - 112px); margin: 0; padding: 12px 8px; background: #141416; border: 1px solid #26262c; border-radius: 10px; }
.tw-tabs::before { content: 'BOT MODULES'; padding: 3px 12px 10px; color: #65656e; font-size: 9px; font-weight: 800; letter-spacing: 1.3px; }
.tw-tab { position: relative; justify-content: flex-start; min-height: 40px; padding: 8px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #a5a5ad; font-size: 13px; font-weight: 600; }
.tw-tab:hover { background: #232029; color: #f6f6f8; }
.tw-tab.active { background: rgba(169,112,255,.22); border-color: rgba(169,112,255,.32); color: #cfadff; }
.tw-tab.active::before { content: ''; position: absolute; top: 8px; bottom: 8px; left: -9px; width: 2px; border-radius: 2px; background: #ad73f7; }
.tw-icon { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border: 0; color: currentColor; font-size: 0; }
.tw-icon svg { width: 18px; height: 18px; }
.tw-nav-toggle { display: grid; place-items: center; align-self: flex-end; width: 30px; height: 28px; margin-bottom: 7px; padding: 0; border: 1px solid #34343c; border-radius: 6px; background: #1b1b20; color: #aaaab4; cursor: pointer; line-height: 0; }
.tw-nav-toggle svg { width: 15px; height: 15px; transition: transform .15s ease; }
.tw-shell.is-collapsed .tw-nav-toggle svg { transform: rotate(180deg); }
.tw-nav-toggle:hover { background: #28202f; color: #fff; }
.tw-shell.is-collapsed .tw-tabs::before { content: '·'; text-align: center; padding: 3px 0 10px; }
.tw-shell.is-collapsed .tw-tab { justify-content: center; padding: 8px 4px; }
.tw-shell.is-collapsed .tw-nav-label { display: none; }
.tw-shell.is-collapsed .tw-nav-toggle { align-self: center; }
.tw-content { min-width: 0; }
.tw-pane { min-width: 0; animation: tw-pane-in .16s ease-out; }
@keyframes tw-pane-in { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.twitch-block { margin-bottom: 14px; padding: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.105); border-radius: 10px; box-shadow: 0 5px 18px rgba(0,0,0,.1); }
.twitch-block:hover { border-color: rgba(255,255,255,.16); }
.twitch-block-title { margin-bottom: 14px; color: #f1f1f4; font-size: 14px; font-weight: 700; }
.tw-welcome { position: relative; min-height: 104px; margin-bottom: 14px; padding: 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #19191d; box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.tw-welcome::after { content: ''; position: absolute; right: 20px; bottom: 0; left: 20px; height: 1px; background: #7044a0; opacity: .5; }
.tw-welcome img { width: 58px; height: 58px; border: 2px solid #7549a3; }
.tw-welcome p { color: #a9a9b2; font-size: 12px; }
.tw-welcome h2 { color: #fafafd; font-size: 24px; letter-spacing: -.3px; }
.tw-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.tw-metric { display: flex; flex-direction: column; gap: 5px; min-height: 70px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: #151518; }
.tw-metric span { color: #777780; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.tw-metric strong { color: #f3f3f5; font-size: 17px; font-variant-numeric: tabular-nums; }
.tw-master { padding: 8px 11px; border: 1px solid #3e2d52; border-radius: 7px; background: #241a30; color: #d5b8f2; font-size: 12px; font-weight: 700; }
.tw-periods { gap: 2px; margin: 0 0 14px; padding: 4px; border: 1px solid #292930; border-radius: 8px; background: #141416; }
.tw-periods button { border: 0; border-radius: 5px; padding: 8px 12px; color: #888891; font-size: 12px; font-weight: 700; }
.tw-periods button.active { border: 0; background: #2d2240; color: #d2adff; }
.tw-home-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 14px; align-items: start; }
.tw-home-split > * { margin-bottom: 0; }
.tw-top-clip { min-height: 100%; }
.tw-interval-label { display: flex; align-items: center; gap: 6px; color: #aaaab3; font-size: 12px; white-space: nowrap; }
.tw-interval-label input { flex: 0 0 70px; width: 70px; }
.tw-media-preview { margin-top: 10px; }
.tw-media-preview iframe { display: block; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
.tw-leaderboard { margin-bottom: 14px; padding: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.035); }
.tw-home-split .tw-leaderboard { margin-bottom: 0; }
.tw-leader-head { margin-bottom: 12px; color: #f4f4f6; font-size: 14px; }
.tw-leader-row, .tw-data-row { min-height: 42px; padding: 10px 4px; border-color: #29292f; }
.tw-leader-row:last-child, .tw-data-row:last-child { border-bottom: 0; }
.tw-leader-rank { color: #a970ff; font-size: 11px; font-weight: 800; }
.tw-leader-count { color: #85858f; font-size: 12px; }
.tw-inline-form { align-items: center; gap: 8px; }
.tw-inline-form input, .tw-inline-form select, .tw-inline-form textarea { border-color: #34343c; border-radius: 7px; background: #111113; }
.tw-coming { min-height: 420px; border-color: #3b3b42; background: #242427; }
.tw-coming::before { background: rgba(126,126,132,.42); }
.tw-clip-thumb { width: min(100%, 420px); border-radius: 8px; }
.tw-label small { color: #777780; font-size: 10px; }
.rw-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; padding: 14px; border-color: #2f2f36; border-radius: 8px; background: #151518; }
.rw-info { display: grid; gap: 7px; }
.rw-title { color: #f3f3f5; font-size: 14px; }
.rw-sub { color: #85858e; }
.rw-card select, .rw-card input[type="number"] { width: auto; max-width: 150px; padding: 7px 9px; border: 1px solid #34343c; border-radius: 6px; background: #101012; color: #eee; }
.rw-cost { max-width: 120px !important; }
.rw-cost::placeholder { color: #6f6f78; }
.rw-prompt { width: 100% !important; max-width: none !important; }
.rw-yt { max-width: 110px !important; }
.rw-yt-row { display: flex; align-items: center; gap: 4px; color: #9b9ba4; font-size: 12px; flex-wrap: wrap; }
.rw-yt-row[hidden] { display: none; }
.rw-card .clip-check { color: #9b9ba4; font-size: 12px; }
.tw-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.tw-form-grid .tw-label { min-width: 0; }
.tw-span-2 { grid-column: 1 / -1; }
.tw-form-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid #2b2b31; }
.tw-form-section-title { margin-bottom: 10px; color: #b8b8c1; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.tw-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; align-items: center; }
.tw-setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 14px; }
.tw-setting-grid .tw-label { min-width: 0; }
.tw-price-preview { margin-top: 12px; padding: 10px 12px; border-left: 2px solid #9d69e8; background: #18151d; color: #b9a1ce; font-size: 12px; line-height: 1.7; }
.tw-label small { color: #777780; font-size: 10px; }
.btn { border-radius: 7px; }
.btn-primary { background: #9146ff; }
.btn-primary:hover { background: #a35dff; }
.btn-ghost { background: #1b1b20; border-color: #34343c; }
.btn-ghost:hover { background: #28202f; border-color: #7044a0; }
.twitch-form input, .twitch-form select, .twitch-form textarea { border-color: #34343c; border-radius: 7px; background: #111113; }
@media (max-width: 899px) {
  .twitch-dashboard { padding: 22px 18px 36px; }
  .tw-app-header { top: 0; }
  .tw-app-header .tw-mobile-menu { display: inline-grid; }
  .tw-home-split { grid-template-columns: 1fr; }
  .tw-shell { display: block; }
  .tw-tabs { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: 280px; min-height: 100vh; padding-top: 18px; border-radius: 0 10px 10px 0; transform: translateX(-105%); transition: transform .18s ease; box-shadow: 18px 0 40px rgba(0,0,0,.38); }
  .tw-shell.nav-open .tw-tabs { transform: translateX(0); }
  .tw-shell.nav-open::before { content: ''; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.58); }
  .tw-shell.is-collapsed { display: block; }
  .tw-shell.is-collapsed .tw-tabs { width: 280px; }
  .tw-shell.is-collapsed .tw-nav-label { display: inline; }
  .tw-shell.is-collapsed .tw-tab { justify-content: flex-start; padding: 8px 12px; }
  .tw-shell.is-collapsed .tw-tabs::before { content: 'BOT MODULES'; padding: 3px 12px 10px; text-align: left; }
  .tw-content { position: relative; z-index: 1; }
}
@media (max-width: 620px) {
  .twitch-dashboard { padding: 16px 12px 28px; }
  .twitch-page-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .tw-app-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tw-app-tools { width: 100%; justify-content: space-between; }
  .tw-welcome { padding: 16px; }
  .tw-welcome h2 { font-size: 20px; }
  .tw-master { width: 100%; margin: 10px 0 0; }
  .tw-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tw-inline-form { flex-wrap: wrap; }
  .tw-inline-form input, .tw-inline-form button { flex: 1 1 100%; }
  .tw-form-grid, .tw-check-grid, .tw-setting-grid { grid-template-columns: 1fr; }
  .tw-span-2 { grid-column: auto; }
  .rw-card { grid-template-columns: 1fr; gap: 12px; }
}
