*{box-sizing:border-box}body{margin:0;background:#08090d;color:#fff;font-family:"Segoe UI",Arial,sans-serif}.page{min-height:100vh;padding:36px;background:radial-gradient(circle at top left,#232044,#0b0d12 45%,#08090d)}.shell{max-width:1280px;margin:0 auto}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:26px}.topbar h1{margin:0 0 10px;font-size:44px;letter-spacing:-1.4px}.topbar h1 span,.tools-title-row strong,.panel-head strong,.font-section h4{color:#8b5cf6}.topbar p{margin:0;color:#d4d4d8;font-size:17px}.top-actions{display:flex;gap:10px;align-items:center}.top-link{border:1px solid #343847;background:#0f1117;color:#fff;border-radius:999px;padding:12px 16px;font-weight:900;cursor:pointer}.icon-wrap,.templates-wrap{position:relative}.icon-btn{width:48px;height:48px;border-radius:50%;border:1px solid #343847;background:#0f1117;display:grid;place-items:center;cursor:pointer;padding:10px}.icon-btn img{width:27px;height:27px;object-fit:contain}.top-menu{position:absolute;top:60px;right:0;width:300px;background:#111318;border:1px solid #343847;border-radius:16px;padding:15px;box-shadow:0 20px 60px #0008;z-index:1000}.templates-menu{left:0;right:auto}.top-menu p{color:#a1a1aa;font-size:13px;line-height:1.5}.top-menu button:not(.menu-x),.gold-btn,.discord-btn{width:100%;border:1px solid #343847;background:#0f1117;color:#fff;border-radius:12px;padding:10px;font-weight:800;cursor:pointer;margin-top:8px}.gold-btn{background:#facc15!important;color:#000!important;border:0!important}.discord-btn{background:#5865f2!important;border:0!important}.menu-x,.panel-x{width:28px!important;height:28px!important;padding:0!important;border-radius:50%!important;border:1px solid #343847!important;background:#0f1117!important;color:#fff!important;cursor:pointer;display:grid;place-items:center}.menu-x{position:absolute;right:10px;top:10px}.layout{display:grid;grid-template-columns:.95fr 1.1fr;gap:22px;align-items:start}.card{background:#181b24e6;border:1px solid #ffffff14;border-radius:24px;padding:22px;box-shadow:0 24px 80px #0006;overflow:hidden}.card h2{margin:0 0 18px}.tools-panel{border:1px solid #2f3443;background:#0f1117b8;border-radius:18px;padding:14px;margin-bottom:18px}.tools-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px}.tools-title-row span{display:block;color:#a1a1aa;font-size:12px;margin-top:3px}.sidebar-btn{display:none;width:34px;height:34px;border-radius:10px;border:1px solid #343847;background:#0f1117;cursor:pointer;padding:7px}.sidebar-btn img{width:100%;height:100%;object-fit:contain}.tool-buttons,.panel-grid,.theme-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}.tool-buttons button,.panel-grid button,.font-section button,.theme-grid button,.side-buttons button,.side-content button{border:0;background:#252936;color:#fff;border-radius:10px;padding:10px;cursor:pointer;font-weight:900;font-size:12px}.inline-panel{position:relative;margin-top:12px;border:1px solid #343847;background:#0f1117;border-radius:16px;padding:14px;animation:slideDown .18s ease both;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;min-height:30px;margin-bottom:10px}.font-section{border-top:1px solid #252936;padding-top:10px;margin-top:10px;display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.font-section:first-of-type{border-top:0;margin-top:0}.font-section h4{grid-column:1/-1;margin:0 0 4px}.emoji-panel{max-width:330px}.emoji-search{margin-bottom:8px}.emoji-tabs{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;padding-bottom:8px;margin-bottom:8px}.emoji-tabs button{min-width:34px;height:32px;padding:0;border-radius:10px;font-size:17px;border:0;background:#252936;color:white}.emoji-scroll{max-height:245px;overflow-y:auto;overflow-x:hidden;padding-right:4px}.emoji-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.emoji-grid button{width:34px;height:34px;padding:0;font-size:20px;border-radius:8px;background:transparent;border:0;cursor:pointer}.emoji-grid button:hover{background:#252936}.emoji-copied-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#0008;backdrop-filter:blur(5px);color:#fff;font-weight:900;font-size:22px;z-index:10;border-radius:16px}#editor{width:100%;min-height:500px;border:1px solid #343847;background:#0f1117;color:#fff;border-radius:18px;padding:16px;outline:none;resize:vertical;font-size:15px;line-height:1.55;font-family:Consolas,monospace;overflow-x:hidden}.colour-row{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:12px;align-items:end}label{display:flex;flex-direction:column;margin:14px 0 7px;color:#d4d4d8;font-size:13px;font-weight:700}input[type=color]{width:100%;height:42px;border:1px solid #343847;border-radius:14px;background:transparent;padding:0;cursor:pointer}.input{width:100%;border:1px solid #343847;background:#0f1117;color:#fff;border-radius:14px;padding:12px;outline:none}.upload-label input{width:100%;margin-top:8px;border:1px dashed #4b5563;background:#0f1117;color:#fff;border-radius:14px;padding:12px;cursor:pointer}.mini{color:#a1a1aa;font-size:13px;margin:8px 0;line-height:1.4}.secondary{width:100%;border:1px solid #343847;border-radius:14px;padding:11px;background:#0f1117;color:#fff;font-weight:800;cursor:pointer;margin-top:8px}.theme-box,.save-box{margin-top:24px}.theme-box h3,.save-box h3{display:flex;align-items:center;gap:8px}.diamond-pill{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:transparent;border:2px solid #facc15;box-shadow:0 0 6px #facc1580}.diamond-pill img{width:14px;height:14px;object-fit:contain;filter:brightness(0) invert(1)}.preview-tabs{display:flex;gap:10px;margin-bottom:14px}.preview-tabs button{flex:1;border:1px solid #343847;background:#0f1117;color:#fff;border-radius:14px;padding:10px;cursor:pointer;font-weight:800}.preview-tabs button.active{border-color:#8b5cf6}.discord-preview{display:flex;gap:14px;align-items:flex-start;background:#313338;border-radius:24px;padding:18px;height:460px;overflow-y:auto;overflow-x:hidden}.discord-preview.mobile{width:360px;max-width:100%;height:600px;margin:0 auto;aspect-ratio:9/16}.avatar{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#8b5cf6,#ec4899);display:grid;place-items:center;font-weight:900;flex-shrink:0}.message-area{min-width:0}.bot-line{display:flex;gap:8px;align-items:center;margin-bottom:8px;flex-wrap:wrap}.bot-line strong{color:#8b5cf6}.bot-line span{background:#5865f2;border-radius:4px;padding:2px 5px;font-size:11px;font-weight:900}.bot-line small{color:#a1a1aa;font-size:12px}.embed-box{max-width:560px;background:#2b2d31;color:#f2f3f5;border-left:5px solid #8b5cf6;border-radius:8px;padding:16px 18px;overflow-wrap:break-word;word-break:break-word;line-height:1.38}.discord-preview.mobile .embed-box{max-width:260px}.preview-line{margin:7px 0}.banner{margin-top:14px;width:100%;aspect-ratio:5/1;object-fit:cover;border-radius:8px;display:block;background:#111318}.footer-tabs{margin-top:34px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.footer-tabs button{border:1px solid #ffffff14;background:#181b24b8;border-radius:18px;padding:16px;cursor:pointer;color:#fff;text-align:left}.footer-tabs span{display:block;color:#a1a1aa;font-size:13px;margin-top:4px}.modal-overlay{position:fixed;inset:0;background:#0008;display:grid;place-items:center;z-index:2000;padding:14px}.modal{width:min(760px,92vw);max-height:82vh;overflow-y:auto;background:#111318;border:1px solid #343847;border-radius:20px;padding:22px;box-shadow:0 22px 70px #000a;white-space:pre-wrap;position:relative}.modal-close{position:absolute;right:14px;top:14px;width:34px;height:34px;border-radius:50%;border:1px solid #343847;background:#0f1117;color:#fff;cursor:pointer}.desktop-side-panel{position:fixed;left:36px;top:190px;width:230px;background:#0f1117f2;border:1px solid #343847;border-radius:18px;box-shadow:0 22px 70px #0008;padding:14px;z-index:900;display:flex;flex-direction:column;gap:8px;animation:slideRight .18s ease both}.side-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.side-content{border-top:1px solid #343847;margin-top:8px;padding-top:10px;animation:slideDown .18s ease both}.side-content .panel-grid,.side-content .font-section{grid-template-columns:1fr}.template-row{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid #252936;background:#0f1117;border-radius:12px;padding:10px;margin-top:8px}.template-row button{width:auto}.hidden{display:none!important}.h1{color:#8b5cf6;font-size:32px;font-weight:900;margin-bottom:6px}.h2{color:#8b5cf6;font-size:27px;font-weight:900;margin-bottom:4px}.h3{font-size:16px;font-weight:900;margin:8px 0}.quote{border-left:3px solid #8b5cf6;padding-left:11px;margin:8px 0;line-height:1.35}code{background:#0004;padding:2px 5px;border-radius:5px}.spoiler{background:#111;color:#111;border-radius:4px;padding:1px 4px}@keyframes slideDown{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideRight{from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:translateX(0)}}@media (min-width:1025px){.sidebar-btn{display:grid;place-items:center}}@media (max-width:1024px){.layout{grid-template-columns:1fr}.page{padding:24px}.desktop-side-panel{display:none!important}}@media (max-width:640px){.page{padding:14px}.topbar{flex-direction:column}.topbar h1{font-size:34px}.tool-buttons,.panel-grid{grid-template-columns:repeat(2,1fr)}.font-section{grid-template-columns:1fr}.emoji-grid{grid-template-columns:repeat(5,1fr)}.colour-row{grid-template-columns:1fr}.theme-grid{grid-template-columns:repeat(2,1fr)}.footer-tabs{grid-template-columns:1fr}.discord-preview{height:520px}}


/* === Embed Builder+ requested fixes === */
.tools-panel{position:relative}.tool-buttons{position:relative}.font-dropdown-wrap{position:static;min-width:0}.font-dropdown-btn{width:100%;border:0;background:#252936;color:#fff;border-radius:10px;padding:10px;cursor:pointer;font-weight:900;font-size:12px}.font-dropdown-menu{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);width:min(500px,calc(100vw - 48px));max-height:300px;overflow-y:auto;background:#0f1117;border:1px solid #343847;border-radius:16px;padding:12px;box-shadow:0 20px 60px #0009;z-index:1500;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.font-dropdown-menu button{min-height:36px;padding:7px 8px;border:0;background:#252936;color:#fff;border-radius:10px;cursor:pointer;font-weight:900;font-size:12px;line-height:1.15;text-align:center;display:flex;align-items:center;justify-content:center}.font-dropdown-menu .reset-font-btn{grid-column:1/-1;width:48%;justify-self:center;min-height:32px;background:#1b1f2b}.emoji-panel{width:min(430px,100%);max-width:430px;margin-left:auto;margin-right:auto}.emoji-grid{grid-template-columns:repeat(auto-fill,34px);justify-content:center;gap:6px}.emoji-grid button{width:34px;height:34px}.icon-btn{width:48px;height:48px;border-radius:14px;padding:9px}.icon-btn img{width:30px;height:30px;object-fit:contain}#discordBtn img{width:31px;height:31px}.diamond-pill{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:transparent;border:1px solid #facc15;box-shadow:0 0 5px #facc1566;vertical-align:middle;line-height:1;flex:0 0 auto}.diamond-pill img{display:block;width:14px;height:14px;object-fit:contain;filter:none}.theme-box h3,.save-box h3{align-items:center}.preview-diamond{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;border:1px solid #facc15;margin-left:5px;vertical-align:middle}.preview-diamond img{width:12px;height:12px;object-fit:contain;display:block}.colour-row+.mini{text-align:center;width:calc(50% - 6px);margin-left:calc(50% + 6px);margin-top:2px}.save-note{text-align:center}.top-menu button:not(.menu-x),.gold-btn,.discord-btn{display:flex;align-items:center;justify-content:center}
@media (max-width:640px){.font-dropdown-menu{width:calc(100vw - 28px);grid-template-columns:repeat(2,minmax(0,1fr));max-height:310px}.font-dropdown-menu .reset-font-btn{width:70%}.colour-row+.mini{width:100%;margin-left:0}}


/* v12 Quick Tools cleanup */
#desktopSidePanel .side-content{
  border-top:0;
  margin-top:0;
  padding-top:0;
}

#desktopSidePanel .side-content .panel-head,
#desktopSidePanel .side-content .panel-x,
#desktopSidePanel .side-content .menu-x{
  display:none!important;
}

#desktopSidePanel .side-content .panel-grid,
#desktopSidePanel .side-content .font-section{
  grid-template-columns:repeat(2,1fr)!important;
  gap:8px;
}

#desktopSidePanel .side-content .font-section{
  margin-top:8px;
  padding-top:8px;
}

#desktopSidePanel .side-content .font-section:first-of-type{
  margin-top:0;
  padding-top:0;
  border-top:0;
}

#desktopSidePanel .side-content button{
  min-height:38px;
  white-space:normal;
  line-height:1.15;
}

#desktopSidePanel .side-content .emoji-panel,
#desktopSidePanel .side-content .emoji-scroll{
  width:100%;
  max-width:100%;
}

#desktopSidePanel .side-content .emoji-grid{
  display:grid;
  grid-template-columns:repeat(5,34px);
  justify-content:center;
  gap:4px;
}


/* v14: top icon alignment, animated menus, softer buttons, hover glow */
.icon-btn{
  border:0!important;
  background:#1b1f2b!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  line-height:0;
  overflow:hidden;
}

.icon-btn img{
  display:block;
  width:30px!important;
  height:30px!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 auto;
}

#discordBtn img{
  width:31px!important;
  height:31px!important;
}

#premiumBtn img{
  width:29px!important;
  height:29px!important;
}

#premiumBtn{
  border-color:#5865f2!important;
  background:#1b1d31!important;
  box-shadow:0 0 0 1px #5865f233,0 0 18px #5865f233;
}

#premiumBtn img,
.diamond-pill img,
.preview-diamond img{
  filter:brightness(0) saturate(100%) invert(43%) sepia(89%) saturate(1596%) hue-rotate(219deg) brightness(101%) contrast(91%)!important;
}

.diamond-pill,
.preview-diamond{
  border-color:#5865f2!important;
  background:#5865f21a!important;
  box-shadow:0 0 0 1px #5865f244,0 0 14px #5865f244!important;
}

.top-menu:not(.hidden){
  animation:menuExpand .18s ease both;
  transform-origin:top right;
}

.top-menu .menu-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.top-menu .menu-head h3{
  margin:0;
  line-height:1.1;
}

.top-menu .menu-head .menu-x{
  position:static;
  margin:0;
  flex:0 0 auto;
}

.top-menu p{
  margin:0 0 8px;
}

.top-menu.is-fading{
  animation:menuFadeOut .42s ease forwards;
}

@keyframes menuExpand{
  from{opacity:0;transform:translateY(-8px) scale(.96)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

@keyframes menuFadeOut{
  from{opacity:1;transform:translateY(0) scale(1)}
  to{opacity:0;transform:translateY(-6px) scale(.97)}
}

button{
  transition:background .16s ease, box-shadow .16s ease, transform .16s ease, border-color .16s ease, color .16s ease;
}

button:hover:not(:disabled){
  box-shadow:0 0 0 1px #8b5cf655,0 0 18px #8b5cf655;
  transform:translateY(-1px);
}

button:active:not(:disabled){
  transform:translateY(0);
}

.icon-btn:hover:not(:disabled),
.top-link:hover:not(:disabled),
.tool-buttons button:hover:not(:disabled),
.font-dropdown-btn:hover:not(:disabled),
.font-dropdown-menu button:hover:not(:disabled),
.panel-grid button:hover:not(:disabled),
.font-section button:hover:not(:disabled),
.theme-grid button:hover:not(:disabled),
.side-buttons button:hover:not(:disabled),
.side-content button:hover:not(:disabled),
.preview-tabs button:hover:not(:disabled),
.secondary:hover:not(:disabled),
.footer-tabs button:hover:not(:disabled),
.top-menu button:not(.menu-x):hover:not(:disabled){
  background:#303545!important;
}

.gold-btn:hover:not(:disabled){
  background:#5865f2!important;
  color:#fff!important;
  box-shadow:0 0 0 1px #5865f255,0 0 18px #5865f270!important;
}

.discord-btn:hover:not(:disabled){
  background:#6875ff!important;
  box-shadow:0 0 0 1px #5865f255,0 0 18px #5865f270!important;
}

.menu-x:hover:not(:disabled),
.panel-x:hover:not(:disabled),
.modal-close:hover:not(:disabled){
  background:#303545!important;
  box-shadow:0 0 0 1px #8b5cf655,0 0 14px #8b5cf655;
}

button:disabled:hover{
  transform:none!important;
  box-shadow:none!important;
}

/* v16: safe panel sizing only - keeps v14 working JS/HTML */
#stylesPanel{
  max-height:255px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}

/* Keep the Editing Tools font dropdown inside the tools module, not floating */
.tools-panel .tool-buttons{
  position:relative;
}

.tools-panel .font-dropdown-wrap{
  display:contents;
}

.tools-panel .font-dropdown-menu{
  position:relative!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  grid-column:1 / -1;
  width:100%!important;
  max-width:100%!important;
  max-height:235px;
  overflow-y:auto;
  overflow-x:hidden;
  margin:4px 0 0;
  box-shadow:none;
  z-index:10;
  animation:slideDown .16s ease both;
}

.tools-panel .font-dropdown-menu button{
  min-height:34px;
  padding:6px 8px;
}

.tools-panel .font-dropdown-menu .reset-font-btn{
  min-height:30px;
  width:44%;
}

#desktopSidePanel{
  max-height:calc(100vh - 220px);
  overflow:hidden;
}

#desktopSidePanel .side-content{
  max-height:300px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}

@media (max-width:640px){
  #stylesPanel,
  .tools-panel .font-dropdown-menu{
    max-height:240px;
  }

  .tools-panel .font-dropdown-menu{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tools-panel .font-dropdown-menu .reset-font-btn{
    width:70%;
  }
}

/* Discord-style preview context menu */
.preview-context-menu{
  position:fixed;
  left:0;
  top:0;
  width:min(230px,calc(100vw - 24px));
  max-height:calc(100vh - 24px);
  overflow-y:auto;
  z-index:2600;
  padding:10px;
  border:1px solid #4b4d59;
  border-radius:10px;
  background:#3d3f4a;
  box-shadow:0 18px 50px #0009, inset 0 1px 0 #ffffff10;
  color:#f6f6f8;
  font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
  scrollbar-width:thin;
}

.context-reactions{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin-bottom:10px;
}

.context-reactions button,
.preview-context-menu>button{
  border:0;
  color:#f6f6f8;
  cursor:pointer;
}

.context-reactions button{
  min-height:40px;
  border-radius:9px;
  background:#454753;
  font-size:21px;
}

.preview-context-menu>button{
  width:100%;
  min-height:32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 8px;
  background:transparent;
  border-radius:5px;
  text-align:left;
  font-size:13px;
  font-weight:400!important;
  line-height:1.2;
}

.preview-context-menu>button span{
  font-weight:400!important;
}

.preview-context-menu>button span:last-child{
  color:#cacbd2;
  font-size:18px;
  line-height:1;
}

.preview-context-menu>button:hover,
.context-reactions button:hover{
  background:#454753!important;
  box-shadow:none!important;
  transform:none!important;
}

.preview-context-menu hr{
  height:1px;
  margin:7px 0;
  border:0;
  background:#4b4d59;
}

.preview-context-menu .danger,
.preview-context-menu .danger span:last-child{
  color:#ffaaa5;
}

.preview-context-menu .id-badge{
  display:inline-grid;
  place-items:center;
  min-width:26px;
  height:22px;
  border-radius:5px;
  background:#c9cbd1;
  color:#3d3f4a!important;
  font-size:12px!important;
  font-weight:950;
}

@media (max-width:640px){
  .preview-context-menu{
    width:min(220px,calc(100vw - 18px));
    padding:9px;
  }

  .context-reactions button{
    min-height:38px;
    font-size:20px;
  }

  .preview-context-menu>button{
    min-height:31px;
    font-size:12px;
  }
}

.editor-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  margin:0 0 10px;
  padding:6px;
  border:1px solid #343847;
  border-radius:10px;
  background:#0f1117;
}

.editor-toolbar button{
  min-width:32px;
  height:30px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#f2f3f5;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
  display:inline-grid;
  place-items:center;
  padding:0 8px;
}

.editor-toolbar button:hover{
  background:#252936!important;
  box-shadow:none!important;
  transform:none!important;
}

.toolbar-sep{
  width:1px;
  height:22px;
  margin:0 2px;
  background:#343847;
}

.editor-context-menu{
  position:fixed;
  left:0;
  top:0;
  width:min(380px,calc(100vw - 24px));
  max-height:min(360px,calc(100vh - 24px));
  z-index:2700;
  padding:8px;
  border:1px solid #343847;
  border-radius:10px;
  background:#181b24;
  box-shadow:0 18px 50px #0009;
}

.editor-format-row{
  grid-template-columns:repeat(6,minmax(0,1fr));
  border-top:0;
  padding-top:0;
}

.editor-menu-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  height:126px;
}

.editor-menu-column{
  max-height:126px;
  overflow-y:auto;
  overscroll-behavior:contain;
  touch-action:pan-y;
  -webkit-overflow-scrolling:touch;
  border:1px solid #343847;
  border-radius:8px;
  padding:6px;
  background:#141824;
}

.editor-menu-main{
  padding-right:6px;
}

.editor-menu-emoji{
  padding-left:6px;
}

.editor-menu-section{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  padding:6px 0;
  border-top:1px solid #343847;
}

.editor-menu-section:first-child{
  border-top:0;
  padding-top:0;
}

.editor-menu-section button,
.editor-menu-chip-grid button{
  min-height:30px;
  border:0;
  border-radius:6px;
  background:#252936;
  color:#f2f3f5;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  padding:5px 7px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.editor-menu-section button:hover,
.editor-menu-chip-grid button:hover{
  background:#303545!important;
  box-shadow:none!important;
  transform:none!important;
}

.editor-menu-chip-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}

.editor-menu-emoji-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.editor-menu-emoji button{
  font-size:18px;
  padding:0;
}

@media (max-width:640px){
  .editor-context-menu{
    width:min(360px,calc(100vw - 16px));
    max-height:min(340px,calc(100vh - 16px));
  }

  .editor-menu-columns{
    height:120px;
  }

  .editor-menu-column{
    max-height:120px;
  }

  .editor-menu-section{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .editor-format-row{
    grid-template-columns:repeat(6,minmax(0,1fr));
  }

  .editor-menu-chip-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .editor-menu-emoji-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .editor-toolbar{
    gap:3px;
  }
}

/* Button polish layer */
:root{
  --btn-bg:#171c28;
  --btn-bg-hover:#1d2433;
  --btn-bg-active:#141926;
  --btn-border:#2a3244;
  --btn-text:#e7edf9;
  --btn-ring:#91a4ff66;
  --btn-shadow:0 1px 0 #ffffff10 inset,0 10px 22px #00000024;
}

button{
  transition:background .18s cubic-bezier(.2,.8,.2,1),border-color .18s cubic-bezier(.2,.8,.2,1),transform .12s ease,box-shadow .18s cubic-bezier(.2,.8,.2,1),color .18s cubic-bezier(.2,.8,.2,1),filter .18s ease;
  letter-spacing:.01em;
}

button:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px var(--btn-ring);
}

.tool-buttons button,
.panel-grid button,
.font-section button,
.theme-grid button,
.editor-menu-chip-grid button,
.drafts-box .drafts-row button,
.draft-item-actions button{
  border:1px solid var(--btn-border);
  background:linear-gradient(180deg,#1d2433 0%,#161c29 100%);
  color:var(--btn-text);
  border-radius:11px;
  box-shadow:var(--btn-shadow);
  font-weight:700;
}

.tool-buttons button:hover,
.panel-grid button:hover,
.font-section button:hover,
.theme-grid button:hover,
.editor-menu-chip-grid button:hover,
.drafts-box .drafts-row button:hover,
.draft-item-actions button:hover{
  background:linear-gradient(180deg,#222b3d 0%,#1a2232 100%)!important;
  border-color:#4b5772;
  transform:translateY(-1px);
  box-shadow:0 1px 0 #ffffff14 inset,0 14px 30px #00000030;
  filter:saturate(1.05);
}

.tool-buttons button:active,
.panel-grid button:active,
.font-section button:active,
.theme-grid button:active,
.editor-menu-chip-grid button:active,
.drafts-box .drafts-row button:active,
.draft-item-actions button:active{
  background:var(--btn-bg-active)!important;
  transform:translateY(0);
  box-shadow:0 1px 0 #ffffff08 inset;
}

.secondary{
  border:1px solid #4b5a7c;
  background:linear-gradient(180deg,#314160 0%,#27344e 100%);
  color:#f6f8ff;
  font-weight:800;
  border-radius:12px;
  box-shadow:0 1px 0 #ffffff16 inset,0 14px 28px #00000033;
}

.secondary:hover{
  background:linear-gradient(180deg,#3a4d72 0%,#2f3f60 100%)!important;
  border-color:#6f82b5;
  box-shadow:0 1px 0 #ffffff18 inset,0 18px 34px #0000003d;
}

.preview-tabs button{
  border:1px solid #2f3950;
  background:linear-gradient(180deg,#171d2a 0%,#131925 100%);
  box-shadow:0 1px 0 #ffffff0d inset;
}

.preview-tabs button.active{
  border-color:#8d9df7;
  background:linear-gradient(180deg,#2a3550 0%,#232c42 100%);
  box-shadow:inset 0 0 0 1px #9dafef40,0 10px 24px #00000035;
}

.icon-btn{
  border:1px solid #2e3850!important;
  background:linear-gradient(180deg,#1a2233 0%,#141b29 100%)!important;
  border-radius:14px!important;
  box-shadow:0 1px 0 #ffffff14 inset,0 12px 24px #0000002e;
}

.icon-btn:hover{
  border-color:#5a6c95!important;
  box-shadow:0 1px 0 #ffffff16 inset,0 18px 34px #0000003d;
}

/* Editable preview rework */
.editable-layout{
  display:block;
}

.editable-preview-card{
  max-width:1040px;
  margin:0 auto;
}

.editable-preview-card h2{
  margin-bottom:14px;
}

.editable-preview-card .inline-panel{
  margin-bottom:12px;
}

.editable-preview-card .preview-tabs{
  margin-top:12px;
}

.editable-preview-card .discord-preview{
  width:100%;
  height:auto;
  min-height:360px;
  max-height:none;
  padding:22px;
}

.editable-preview-card .discord-preview.mobile{
  width:390px;
  height:auto;
  min-height:640px;
}

.editable-preview-card .message-area{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

.editable-preview-card .embed-box{
  max-width:none;
  width:100%;
  padding:16px 18px;
  transition:none!important;
}

.editable-preview-card .discord-preview.mobile .embed-box{
  max-width:270px;
}

.editable-preview-card #editor{
  display:block;
  width:100%;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#f2f3f5;
  outline:none;
  overflow:hidden;
  font-family:"gg sans","Segoe UI",Helvetica,Arial,sans-serif;
  font-size:16px;
  font-weight:400;
  line-height:1.375;
  word-break:break-word;
  overflow-wrap:break-word;
  caret-color:#fff;
}

.editable-preview-card #editor:empty::before{
  content:"Type your Discord embed message...";
  color:#949ba4;
}

.editable-preview-card #editor>div{
  min-height:22px;
}

.editable-preview-card #editor:focus{
  outline:0;
}

.editable-preview-card #editor::selection{
  background:#5865f266;
}

.editable-preview-card #editor:focus{
  box-shadow:none;
}

.builder-controls{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:16px;
  align-items:start;
}

.builder-controls .colour-row{
  grid-column:1/-1;
  margin-top:0;
}

.builder-controls .upload-label{
  margin:0;
}

.upload-label input[type=file]{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.upload-preview{
  position:relative;
  display:block;
  width:100%;
  height:112px;
  min-height:112px;
  margin-top:8px;
  overflow:hidden;
  border:1px dashed #4b5563;
  border-radius:14px;
  background:#0f1117;
  cursor:pointer;
  touch-action:none;
  user-select:none;
}

.upload-preview.has-banner{
  cursor:grab;
}

.upload-preview.is-dragging{
  cursor:grabbing;
}

.upload-preview.empty{
  height:112px;
  min-height:112px;
}

.upload-preview img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 50%;
  pointer-events:none;
}

.editable-preview-card .banner{
  height:auto;
  aspect-ratio:5/1;
  object-fit:cover;
  object-position:50% 50%;
}

.editable-preview-card .header-banner{
  margin:0 0 14px;
}

.editable-preview-card .banner.movable{
  cursor:grab;
  user-select:none;
  touch-action:none;
}

.editable-preview-card .banner.is-dragging{
  cursor:grabbing;
}

.upload-placeholder{
  display:none;
  position:absolute;
  inset:auto 10px 10px;
  padding:6px 9px;
  border-radius:999px;
  background:#0009;
  color:#fff;
  font-size:12px;
  font-weight:800;
  backdrop-filter:blur(8px);
  text-align:center;
}

.upload-preview.empty .upload-placeholder{
  inset:0;
  display:grid;
  place-items:center;
  border-radius:0;
  background:transparent;
  color:#d4d4d8;
  font-size:14px;
}

.upload-remove,
.upload-download{
  position:absolute;
  top:10px;
  z-index:3;
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:50%;
  background:#000d;
  color:#fff;
  cursor:pointer;
  font-size:20px;
  font-weight:700;
  line-height:0;
  padding:0;
  appearance:none;
  text-align:center;
  backdrop-filter:blur(8px);
  box-shadow:0 2px 12px #0009;
}

.upload-remove{
  right:10px;
}

.upload-download{
  right:50px;
}

.upload-download img{
  width:17px;
  height:17px;
  object-fit:contain;
  filter:invert(1);
}

.upload-remove:hover{
  background:#ef4444!important;
  box-shadow:none!important;
  transform:none!important;
}

.upload-download:hover{
  background:#5865f2!important;
  box-shadow:none!important;
  transform:none!important;
}

.builder-controls .theme-box{
  grid-column:1/-1;
  margin-top:0;
}

.builder-controls .theme-box h3{
  margin:0 0 10px;
}
.drafts-box .drafts-row{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
}
.drafts-box .drafts-row button{
  border:0;
  background:#252936;
  color:#fff;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:800;
}
.drafts-list{
  margin-top:10px;
  border:1px solid #343847;
  border-radius:12px;
  padding:8px;
  background:#0f1117;
  max-height:200px;
  overflow:auto;
}
.draft-item{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:8px;
  border-radius:10px;
}
.draft-item small{
  display:block;
  color:#9ca3af;
  font-size:11px;
  margin-top:2px;
}
.draft-item-actions{
  display:flex;
  gap:6px;
}
.draft-item-actions button{
  border:0;
  background:#252936;
  color:#fff;
  border-radius:8px;
  padding:6px 9px;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
}
.draft-empty{
  color:#9ca3af;
  font-size:13px;
  padding:8px;
}
.onboarding-coach{
  position:fixed;
  right:20px;
  bottom:20px;
  width:min(340px,calc(100vw - 24px));
  z-index:2800;
  border:1px solid #343847;
  border-radius:14px;
  background:#111318;
  box-shadow:0 20px 60px #0009;
  padding:12px;
}
.onboarding-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.onboarding-head button,
.onboarding-actions button{
  border:0;
  background:#252936;
  color:#fff;
  border-radius:8px;
  padding:7px 10px;
  cursor:pointer;
  font-weight:700;
}
.onboarding-coach p{
  margin:10px 0;
  color:#d4d4d8;
  font-size:13px;
  line-height:1.45;
}
.onboarding-actions{
  display:flex;
  justify-content:flex-end;
}

.editor-toolbar{
  margin-bottom:12px;
}

.editor-toolbar button{
  font-weight:600;
}
.editor-toolbar .toolbar-font-button{
  min-width:48px;
  padding:0 10px;
  font-weight:500!important;
}
.editor-toolbar .toolbar-quote-button{
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  font-weight:400!important;
  line-height:1;
}
.editor-toolbar .toolbar-image-button{
  width:32px;
  min-width:32px;
  padding:4px!important;
}
.editor-toolbar .toolbar-image-button img{
  display:block;
  width:20px;
  height:20px;
  object-fit:contain;
  pointer-events:none;
}
.editor-toolbar button[title="More styles"] img{
  width:24px;
  height:24px;
}
.editor-toolbar .toolbar-long-button{
  min-width:94px;
  padding:0 12px;
  font-weight:500!important;
}

@media (max-width:640px){
  .editable-preview-card{
    padding:16px;
  }

  .editable-preview-card .discord-preview{
    padding:16px;
    gap:10px;
  }

  .editable-preview-card .discord-preview.mobile{
    width:100%;
    min-height:560px;
  }

  .editable-preview-card .avatar{
    width:38px;
    height:38px;
    font-size:13px;
  }

  .editable-preview-card #editor{
    min-height:0;
    font-size:15px;
  }

  .builder-controls{
    grid-template-columns:1fr;
  }
  .drafts-box .drafts-row{
    grid-template-columns:1fr 1fr;
  }
  .drafts-box .drafts-row #draftName{
    grid-column:1/-1;
  }

  .upload-preview,
  .upload-preview.empty{
    height:96px;
    min-height:96px;
  }
}

/* Calm UI overrides */
.collapsible-box h3{
  justify-content:space-between;
}

.collapse-toggle{
  border:1px solid #323d56;
  background:linear-gradient(180deg,#1d2534 0%,#171f2d);
  color:#d6e0f8;
  border-radius:10px;
  padding:5px 10px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 1px 0 #ffffff12 inset;
}

.collapsible-body{
  margin-top:8px;
}

.theme-grid button,
.drafts-box .drafts-row button,
.draft-item-actions button{
  background:linear-gradient(180deg,#222a3a 0%,#1d2433 100%)!important;
  border-color:#36425b!important;
  color:#dde6ff!important;
}

.theme-grid button:hover,
.drafts-box .drafts-row button:hover,
.draft-item-actions button:hover{
  background:linear-gradient(180deg,#2b3650 0%,#242e43 100%)!important;
  border-color:#4c5d80!important;
}

.drafts-box .drafts-row button#saveDraft{
  background:linear-gradient(180deg,#32466b 0%,#27395b 100%)!important;
  border-color:#6884bd!important;
  color:#f4f7ff!important;
}

/* Discord-accurate: no colored preview header text inside embed content */
.embed-box .h1,
.embed-box .h2,
.embed-box .h3,
.embed-box .quote{
  color:#f2f3f5!important;
}

.bot-line .bot-logo{
  width:16px;
  height:16px;
  border-radius:4px;
  object-fit:cover;
  display:inline-block;
  vertical-align:middle;
}

.avatar-logo{
  object-fit:cover;
  padding:0;
}

/* 2026 button refresh (final override) */
:root{
  --ui-btn-bg:#151a24;
  --ui-btn-bg-2:#10151f;
  --ui-btn-border:#2c3446;
  --ui-btn-text:#eaf0ff;
  --ui-btn-muted:#c4cde3;
  --ui-btn-hover:#1c2331;
  --ui-btn-press:#0f141d;
  --ui-btn-focus:#90a6ff66;
  --theme-accent:#8b5cf6;
}

button{
  font-weight:650;
  letter-spacing:.01em;
}

button:focus-visible{
  outline:none;
  box-shadow:0 0 0 2px var(--ui-btn-focus)!important;
}

.editor-toolbar button,
.tool-buttons button,
.panel-grid button,
.font-section button,
.theme-grid button,
.preview-tabs button,
.secondary,
.drafts-box .drafts-row button,
.draft-item-actions button,
.collapse-toggle,
.top-menu button:not(.menu-x),
.footer-tabs button{
  border:1px solid var(--ui-btn-border)!important;
  background:linear-gradient(180deg,var(--ui-btn-bg) 0%,var(--ui-btn-bg-2) 100%)!important;
  color:var(--ui-btn-text)!important;
  box-shadow:0 1px 0 #ffffff10 inset,0 8px 20px #00000022!important;
  transform:translateY(0);
}

.editor-toolbar button:hover,
.tool-buttons button:hover,
.panel-grid button:hover,
.font-section button:hover,
.theme-grid button:hover,
.preview-tabs button:hover,
.secondary:hover,
.drafts-box .drafts-row button:hover,
.draft-item-actions button:hover,
.collapse-toggle:hover,
.top-menu button:not(.menu-x):hover,
.footer-tabs button:hover{
  background:linear-gradient(180deg,var(--ui-btn-hover) 0%,#151c2a 100%)!important;
  border-color:#44506a!important;
  box-shadow:0 1px 0 #ffffff14 inset,0 12px 28px #0000002f!important;
  transform:translateY(-1px);
}

.editor-toolbar button:active,
.tool-buttons button:active,
.panel-grid button:active,
.font-section button:active,
.theme-grid button:active,
.preview-tabs button:active,
.secondary:active,
.drafts-box .drafts-row button:active,
.draft-item-actions button:active,
.collapse-toggle:active,
.top-menu button:not(.menu-x):active,
.footer-tabs button:active{
  background:var(--ui-btn-press)!important;
  transform:translateY(0)!important;
  box-shadow:0 1px 0 #ffffff0a inset!important;
}

.secondary{
  border-color:#4e628f!important;
  background:linear-gradient(180deg,#263450 0%,#1f2b42 100%)!important;
}

.secondary:hover{
  border-color:#657fb5!important;
  background:linear-gradient(180deg,#2e3f62 0%,#243452 100%)!important;
}

.preview-tabs button.active{
  border-color:#8ea2f1!important;
  background:linear-gradient(180deg,#25324a 0%,#1f2a3f 100%)!important;
}

.icon-btn{
  border:1px solid #33405b!important;
  background:linear-gradient(180deg,#1a2233 0%,#121a29 100%)!important;
  border-radius:12px!important;
  box-shadow:0 1px 0 #ffffff14 inset,0 12px 26px #0000002e!important;
}

.contact-panels{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  white-space:normal;
}

.legal-panels{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  white-space:normal;
}

.legal-panel{
  border:1px solid #343847;
  border-radius:12px;
  background:#0f1117;
  padding:12px;
}

.legal-panel-head h3{
  margin:0 0 8px;
  color:#e7ecff;
  font-size:16px;
}

.legal-panel-head p{
  margin:0;
  color:#c8d0e6;
  font-size:13px;
  line-height:1.45;
}

.legal-panel-body{
  white-space:pre-wrap;
  overflow:auto;
  max-height:min(52vh,460px);
  color:#c8d0e6;
  font-size:13px;
  line-height:1.5;
}

.contact-panel{
  border:1px solid #343847;
  border-radius:12px;
  background:#0f1117;
  padding:12px;
}

.contact-panel h3{
  margin:0 0 8px;
  color:#e7ecff;
  font-size:15px;
}

.contact-panel p{
  margin:0 0 8px;
  color:#c8d0e6;
  font-size:13px;
  line-height:1.45;
}

.contact-panel p:last-child{
  margin-bottom:0;
}

.contact-details-panel{
  display:grid;
  gap:8px;
}

.contact-details-panel .contact-row{
  margin:0;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  line-height:1.35;
}

.contact-details-panel .contact-row strong{
  min-width:98px;
  color:#e7ecff;
}

.contact-details-panel .contact-row a{
  white-space:nowrap;
}

.contact-panel a{
  color:#9cb2ff;
  text-decoration:none;
}

.contact-panel a:hover{
  text-decoration:underline;
}

@media (max-width:760px){
  .contact-details-panel .contact-row{
    font-size:12px;
    gap:6px;
  }
}

.combined-tools-trigger{
  grid-column:1/-1;
}

.combined-tools-panel{
  position:fixed;
  z-index:2100;
  left:10px;
  top:10px;
  width:min(320px,calc(100vw - 24px));
  max-height:min(360px,calc(100vh - 24px));
  border:0;
  border-radius:14px;
  background:#0d1119;
  box-shadow:0 24px 70px #000a;
  padding:12px;
  display:block;
  overflow:hidden;
}

.combined-panel-card{
  border:0;
  border-radius:12px;
  background:#121826;
  padding:10px;
  height:246px;
  display:flex;
  flex-direction:column;
  min-height:0;
}

.combined-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 0 8px;
  gap:10px;
}

.combined-panel-card h3{
  margin:0;
  font-size:14px;
}

.templates-list{
  display:grid;
  gap:0;
  flex:1;
  min-height:0;
  max-height:100%;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
}

.template-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:0;
  border-radius:0;
  background:linear-gradient(180deg,#1f2636 0%,#191f2e 100%);
  color:#dfe6ff;
  padding:8px 10px;
  box-shadow:none!important;
}

.template-item:first-child{
  border-top-left-radius:10px;
  border-top-right-radius:10px;
}

.template-item:last-child{
  border-bottom-left-radius:10px;
  border-bottom-right-radius:10px;
}

.template-delete{
  opacity:0;
  width:20px;
  height:20px;
  display:inline-grid;
  place-items:center;
  border-radius:6px;
  background:#3a1620;
  color:#ffccd6;
  font-weight:900;
  line-height:1;
  transition:opacity .16s ease;
}

.template-item:hover .template-delete{
  opacity:1;
}

.template-label-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
}

.template-name{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  transition:opacity .14s ease;
}

.template-rename-trigger{
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  padding:2px 8px;
  border-radius:8px;
  background:#273247;
  color:#dce7ff;
  border:1px solid #3b4b6b;
  font-size:11px;
  font-weight:700;
  opacity:0;
  pointer-events:none;
  white-space:nowrap;
}

.template-item:hover .template-rename-trigger{
  opacity:1;
  pointer-events:auto;
  cursor:pointer;
}

.template-item:hover .template-name{
  opacity:.15;
}

.template-item.renaming .template-name,
.template-item.renaming .template-rename-trigger{
  display:none;
}

.template-rename-input{
  width:155px;
  max-width:100%;
  border:1px solid #4a5d86;
  border-radius:8px;
  background:#0f1625;
  color:#e6edff;
  padding:4px 8px;
  font-size:12px;
  font-weight:700;
  outline:none;
}

@media (max-width:760px){
  .combined-tools-panel{
    width:min(320px,calc(100vw - 16px));
    max-height:min(340px,calc(100vh - 16px));
    padding:10px;
  }
}

@media (max-width:1024px){
  .page{
    padding:22px;
  }

  .topbar{
    align-items:center;
    gap:16px;
  }

  .topbar h1{
    font-size:38px;
  }

  .editable-preview-card{
    max-width:100%;
  }

  .builder-controls{
    grid-template-columns:1fr;
    gap:14px;
  }

  .editable-preview-card .discord-preview{
    padding:18px;
    min-height:320px;
  }

  .editable-preview-card .discord-preview.mobile{
    width:min(390px,100%);
    min-height:560px;
  }
}

@media (max-width:820px){
  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .top-actions{
    align-self:flex-end;
  }
}

/* Cleaner Discord-module controls: no visible outlines */
.editable-preview-card .editor-toolbar button,
.editable-preview-card .preview-tabs button,
.editable-preview-card .secondary{
  border:none!important;
  box-shadow:none!important;
}

.editable-preview-card .editor-toolbar,
.editable-preview-card .preview-tabs button,
.editable-preview-card .secondary{
  outline:none!important;
}

.editable-preview-card #editor .spoiler{
  background:#1f2125;
  color:transparent;
  border-radius:3px;
  cursor:pointer;
  user-select:none;
  transition:background .14s ease,color .14s ease;
}

.editable-preview-card #editor .spoiler.is-revealed{
  background:transparent;
  color:#f2f3f5;
  user-select:text;
}


/* Requested feature updates */
@media (min-width:1025px){
  .footer-tabs{max-width:1040px;margin-left:auto;margin-right:auto;}
}
.footer-tabs button{
  min-height:0;
  padding:10px 16px!important;
  border-radius:14px;
}
.footer-tabs span{
  margin-top:2px;
}
.footer-tabs strong{
  font-weight:500!important;
}
.footer-tabs{
  width:100%;
  max-width:none!important;
  grid-template-columns:repeat(3,max-content)!important;
  justify-content:center;
  gap:12px;
}
.footer-tabs button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:max-content;
  min-width:168px;
  min-height:0!important;
  padding:8px 18px!important;
  border:1px solid #36425b!important;
  border-radius:12px!important;
  background:#08090d!important;
  color:#dde6ff!important;
  text-align:center;
  box-shadow:none!important;
}
.footer-tabs button:hover{
  background:#08090d!important;
  border-color:color-mix(in srgb,var(--theme-accent) 62%,#4c5d80)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent) 60%,transparent),0 0 22px color-mix(in srgb,var(--theme-accent) 34%,transparent)!important;
  transform:translateY(0)!important;
}
.footer-tabs span{
  display:none!important;
}
.footer-tabs strong{
  font-weight:500!important;
}
.style-grid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:8px;
}
.style-grid button{
  min-height:34px;
  padding:8px 10px!important;
  font-size:11px!important;
  order:1;
}
.style-grid button:nth-child(3),
.style-grid button:nth-child(10),
.style-grid button:nth-child(11),
.style-grid button:nth-child(12),
.style-grid button:nth-child(13),
.style-grid button:nth-child(14){
  order:2;
}
.style-label{display:inline-flex;align-items:center;justify-content:center;max-width:100%;line-height:1.1;}
.style-bold{font-weight:900;}
.style-italic{font-style:italic;}
.style-bold-italic{font-weight:900;font-style:italic;}
.style-underline{text-decoration:underline;text-underline-offset:3px;}
.style-strike{text-decoration:line-through;}
.style-code{font-family:Consolas,monospace;background:#0005;border-radius:5px;padding:2px 6px;}
.style-spoiler{background:#fff;color:#fff;border-radius:4px;padding:2px 6px;text-shadow:0 0 0 #fff;}
.style-quote{border-left:3px solid #8b5cf6;padding-left:8px;}
.style-bullet::before{content:"?";margin-right:6px;}
.style-huge{font-size:16px;font-weight:900;}
.style-big{font-size:14px;font-weight:900;}
.style-header{font-weight:900;}
.style-double-underline{text-decoration-line:underline;text-decoration-style:double;text-underline-offset:3px;}
.style-slash{text-decoration:line-through;text-decoration-style:solid;transform:skew(-10deg);}
.style-wave{text-decoration:underline;text-decoration-style:wavy;text-underline-offset:3px;}
.style-hearts::before,.style-hearts::after{content:"<3";font-size:10px;margin:0 3px;color:#f472b6;}
.style-clear{font-weight:400;}
.inline-panel.is-closing,
.combined-tools-panel.is-closing{
  pointer-events:none;
  animation:panelClose .18s ease forwards!important;
}
.top-menu.is-closing{
  pointer-events:none;
  animation:menuClose .18s ease forwards!important;
}
.modal-overlay.is-closing{
  pointer-events:none;
  animation:overlayClose .18s ease forwards!important;
}
.modal-overlay.is-closing .modal{
  animation:modalClose .18s ease forwards!important;
}
:root{
  --bg-drift-x:0px;
  --bg-drift-y:0px;
  --bg-depth-y:0px;
}
.page{
  background:
    radial-gradient(circle at calc(14% + var(--bg-drift-x)) calc(0% + var(--bg-drift-y)),rgba(139,92,246,.34),transparent 34%),
    radial-gradient(circle at calc(86% - var(--bg-drift-x)) calc(26% + var(--bg-depth-y)),rgba(88,101,242,.18),transparent 32%),
    linear-gradient(135deg,#151229 0%,#0b0d12 48%,#08090d 100%)!important;
  background-attachment:fixed;
}
.custom-colour-input{
  width:100%;
  height:42px;
  border:1px solid #36425b!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#171d2a 0%,#111722 100%)!important;
  color:#f3f5fb!important;
  cursor:pointer;
  font-family:Consolas,"Segoe UI",monospace;
  font-size:16px;
  font-weight:800;
  padding:0 14px!important;
  text-transform:uppercase;
  box-shadow:0 1px 0 #ffffff10 inset;
}
.custom-colour-input:hover,
.custom-colour-input:focus{
  border-color:color-mix(in srgb,var(--theme-accent) 62%,#4c5d80)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent) 52%,transparent),0 0 18px color-mix(in srgb,var(--theme-accent) 28%,transparent)!important;
}
.colour-picker-panel{
  position:absolute;
  z-index:2600;
  width:min(360px,calc(100vw - 24px));
  padding:12px;
  border:1px solid #36425b;
  border-radius:18px;
  background:#111318;
  box-shadow:0 24px 70px #000b,0 0 0 1px #ffffff08 inset;
  animation:colourPickerIn .16s ease both;
}
.colour-picker-panel.hidden{
  display:none!important;
}
.colour-picker-top{
  display:grid;
  grid-template-columns:1fr 70px 82px;
  gap:10px;
  align-items:center;
}
.colour-picker-hex{
  height:48px;
  border:1px solid #30394f;
  border-radius:10px;
  background:#1a1d27;
  color:#f3f5fb;
  padding:0 12px;
  font-family:Consolas,monospace;
  font-size:18px;
  font-weight:900;
  text-transform:uppercase;
  outline:none;
}
.colour-picker-mode{
  height:48px;
  border:1px solid #30394f;
  border-radius:10px;
  background:#111722;
  color:#f3f5fb;
  font-weight:700;
}
.colour-picker-preview{
  display:grid;
  place-items:center;
  height:64px;
  border:1px solid #bfe9ee;
  border-radius:14px;
  color:#111318;
  font-size:20px;
  font-weight:900;
  box-shadow:0 1px 0 #ffffff70 inset;
}
.colour-picker-preview small{
  display:block;
  margin-top:2px;
  font-size:12px;
  font-weight:900;
}
.colour-picker-field{
  position:relative;
  height:190px;
  margin-top:12px;
  border-radius:14px;
  border:1px solid #2b3346;
  cursor:crosshair;
  overflow:hidden;
  background:
    linear-gradient(90deg,#8b1cf6 0%,#2563eb 35%,#06b6d4 65%,#67e8f9 100%),
    linear-gradient(180deg,transparent 0%,#fff8 52%,#111318cc 100%);
}
.colour-picker-field::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 0%,#ffffff80 58%,#00000036 100%);
}
.colour-picker-handle{
  position:absolute;
  width:14px;
  height:14px;
  border:2px solid #05070b;
  border-radius:50%;
  box-shadow:0 0 0 2px #ffffffcc;
  transform:translate(-50%,-50%);
  z-index:2;
  pointer-events:none;
}
.colour-picker-popular{
  margin-top:12px;
  padding:10px;
  border:1px solid #30394f;
  border-radius:12px;
  background:#151821;
}
.colour-picker-popular strong{
  display:block;
  margin-bottom:8px;
  color:#f4d56b;
  font-size:13px;
}
.colour-picker-swatches{
  display:grid;
  grid-template-columns:repeat(10,1fr);
  gap:5px;
}
.colour-picker-swatch{
  width:100%;
  aspect-ratio:1;
  border:1px solid #ffffff24;
  border-radius:5px;
  cursor:pointer;
  box-shadow:0 1px 0 #ffffff30 inset;
}
@keyframes colourPickerIn{
  from{opacity:0;transform:translateY(-6px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
body:not(.animations-ready) .editable-preview-card,
body:not(.animations-ready) .footer-tabs button{
  opacity:0;
}
body.animations-ready .editable-preview-card{
  animation:pageMainSlideIn .46s cubic-bezier(.2,.75,.2,1) both;
}
body.animations-ready .editable-preview-card .preview-tabs,
body.animations-ready .editable-preview-card .editor-toolbar,
body.animations-ready .editable-preview-card .discord-preview,
body.animations-ready .editable-preview-card .secondary,
body.animations-ready .editable-preview-card .builder-controls > *,
body.animations-ready .footer-tabs button{
  animation:pagePanelSlideIn .42s cubic-bezier(.2,.75,.2,1) both;
  animation-delay:.22s;
}
body.animations-ready .editable-preview-card .preview-tabs{animation-delay:.16s}
body.animations-ready .editable-preview-card .editor-toolbar{animation-delay:.18s}
body.animations-ready .editable-preview-card .discord-preview{animation-delay:.2s}
body.animations-ready .editable-preview-card .secondary{animation-delay:.22s}
body.animations-ready .editable-preview-card .builder-controls > *,
body.animations-ready .footer-tabs button{animation-delay:.26s}
@keyframes panelClose{
  from{opacity:1;transform:translateY(0) scale(1)}
  to{opacity:0;transform:translateY(-8px) scale(.98)}
}
@keyframes pageMainSlideIn{
  from{opacity:0;transform:translateY(16px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes pagePanelSlideIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes menuClose{
  from{opacity:1;transform:translateY(0) scale(1)}
  to{opacity:0;transform:translateY(-8px) scale(.96)}
}
@keyframes overlayClose{
  from{opacity:1}
  to{opacity:0}
}
@keyframes modalClose{
  from{opacity:1;transform:translateY(0) scale(1)}
  to{opacity:0;transform:translateY(10px) scale(.98)}
}
@media (prefers-reduced-motion:reduce){
  body:not(.animations-ready) .editable-preview-card,
  body:not(.animations-ready) .footer-tabs button{
    opacity:1;
  }
  body.animations-ready .editable-preview-card,
  body.animations-ready .editable-preview-card .preview-tabs,
  body.animations-ready .editable-preview-card .editor-toolbar,
  body.animations-ready .editable-preview-card .discord-preview,
  body.animations-ready .editable-preview-card .secondary,
  body.animations-ready .editable-preview-card .builder-controls > *,
  body.animations-ready .footer-tabs button{
    animation:none!important;
  }
}
.editable-preview-card .banner{max-width:100%;}
.editable-preview-card #copyMessage,
.editable-preview-card #copyJson{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:210px;
  min-height:0;
  padding:8px 18px!important;
  border:1px solid #36425b!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,#222a3a 0%,#1d2433 100%)!important;
  color:#dde6ff!important;
  font-weight:500!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent) 42%,transparent),0 0 16px color-mix(in srgb,var(--theme-accent) 24%,transparent)!important;
}
.editable-preview-card #copyMessage{
  margin-left:calc(50% - 215px);
  margin-right:10px;
}
.editable-preview-card #copyMessage:hover,
.editable-preview-card #copyJson:hover{
  background:linear-gradient(180deg,#2b3650 0%,#242e43 100%)!important;
  border-color:color-mix(in srgb,var(--theme-accent) 62%,#4c5d80)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent) 60%,transparent),0 0 22px color-mix(in srgb,var(--theme-accent) 34%,transparent)!important;
}
.editable-preview-card #copyMessage:active,
.editable-preview-card #copyJson:active{
  background:linear-gradient(180deg,#3a4664 0%,#2f3a55 100%)!important;
  border-color:color-mix(in srgb,var(--theme-accent) 78%,#7584ad)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--theme-accent) 70%,transparent),0 0 28px color-mix(in srgb,var(--theme-accent) 46%,transparent)!important;
  transform:translateY(0)!important;
}
.editable-preview-card .preview-tabs{
  width:max-content;
  display:grid;
  grid-template-columns:112px 112px;
  margin:12px auto 14px;
  gap:0;
  padding:3px;
  border:1px solid #30394f;
  border-radius:999px;
  background:#0f1117;
}
.editable-preview-card .preview-tabs button{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:112px;
  min-width:112px;
  padding:7px 18px!important;
  border:0!important;
  border-radius:999px!important;
  background:transparent!important;
  color:#9ca7bd!important;
  font-weight:500!important;
  box-shadow:none!important;
}
.editable-preview-card .preview-diamond{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  margin-left:0;
}
#mobilePreview{
  font-size:0!important;
}
#mobilePreview::before{
  content:"Mobile";
  position:absolute;
  left:0;
  right:0;
  text-align:center;
  font-size:14px;
  color:#9ca7bd;
}
#mobilePreview.active::before{
  color:#f6f8ff;
}
.editable-preview-card .preview-tabs button.active{
  background:linear-gradient(180deg,#222a3a 0%,#1d2433 100%)!important;
  color:#f6f8ff!important;
}
.editable-preview-card #mobilePreview{
  font-size:14px!important;
  gap:7px;
  padding:7px 14px!important;
}
.editable-preview-card #mobilePreview::before{
  content:none!important;
}
.editable-preview-card #mobilePreview .preview-diamond{
  position:static;
  transform:none;
  margin-left:0;
  flex:0 0 18px;
}
#fontsPanel .panel-head{
  position:absolute;
  top:10px;
  right:10px;
  min-height:0;
  margin-bottom:0;
  justify-content:flex-end;
  z-index:2;
}
#fontsPanel .panel-head strong{
  display:none;
}
#fontsPanel .panel-head + .font-section{
  border-top:0;
  margin-top:0;
  padding-top:0;
}
#fontsPanel{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  column-gap:14px;
  align-items:start;
}
#fontsPanel .font-section{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  align-items:center;
  border-top:0;
  margin-top:0;
  padding-top:0;
}
#fontsPanel .font-section + .font-section{
  border-left:1px solid #343847;
  padding-left:14px;
}
#fontsPanel .font-section h4{
  text-align:center;
  margin-bottom:2px;
  color:#fff!important;
}
#fontsPanel .font-section button{
  min-height:31px;
  padding:6px 8px!important;
  border-radius:9px!important;
  font-size:11px!important;
  font-weight:400!important;
  line-height:1!important;
}
#fontsPanel button[data-font="bold"],
#fontsPanel button[data-font="sansBold"],
#fontsPanel button[data-font="boldItalic"],
#fontsPanel button[data-font="gothicBold"]{
  font-weight:800!important;
}
#emojisPanel{
  overflow:visible;
}
#emojisPanel .emoji-search{
  margin-bottom:12px;
}
#emojisPanel .emoji-tabs{
  overflow-x:auto;
  overflow-y:visible;
  padding-top:4px;
  padding-bottom:10px;
  margin-top:-2px;
  margin-bottom:4px;
}
#emojisPanel .emoji-tabs button:hover,
#emojisPanel .emoji-tabs button:focus-visible{
  transform:translateY(-2px);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent) 48%,transparent),0 8px 16px #0005!important;
}
@media (max-width:760px){
  .style-grid button{flex-basis:calc((100% - 16px)/3);}
  #fontsPanel .font-section{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #fontsPanel{
    grid-template-columns:1fr;
    row-gap:10px;
  }
  #fontsPanel .font-section + .font-section{
    border-left:0;
    border-top:1px solid #343847;
    padding-left:0;
    padding-top:10px;
  }
  .editable-preview-card #copyMessage,
  .editable-preview-card #copyJson{
    width:calc(50% - 5px);
  }
  .editable-preview-card #copyMessage{
    margin-left:0;
  }
}
