/* Compatibility repairs for the original Roxy theme, not a replacement theme. */
html{background:#181818}body[data-theme=default]{--bg:#181818;--side:#232228;--panel:#2f2f2f;--raised:#343434;--border:#3b3b3f;--text:#ececec;--muted:#a1a1aa;--accent:#8fb7f7;--solid:#5f8fd8;--glow:transparent;--warm:#a8b2c2}
[hidden]{display:none!important}html,body{height:100%;overflow:hidden}.app{min-height:0}main{min-width:0;min-height:0}#scroll{min-height:0;overscroll-behavior:contain;overflow-anchor:none}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}#prompt{font-size:16px}
.message{display:block!important}.message-label{display:flex;align-items:center;gap:8px}.message-label img{display:inline-block;width:24px;height:24px;object-fit:contain;margin:0}.message.user .message-label{display:none}.message.user{margin-left:auto}.message-content{min-width:0}.message-text ul{list-style:disc!important;padding-inline-start:24px!important}.message-text ol{list-style:decimal!important;padding-inline-start:24px!important}.message-text li::marker{color:var(--text)}
.action-icon,.history-menu svg,.message-actions svg{width:16px!important;height:16px!important;flex:0 0 16px;fill:none!important;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.message-actions{color:var(--muted)}.history-menu button{display:flex;align-items:center;gap:10px}.history-menu{max-height:calc(100dvh - 24px);overflow:auto;z-index:12000}
.roxy-sheet-backdrop{align-items:center!important;justify-content:center!important;padding:16px!important}.roxy-sheet{margin:0!important;border-radius:20px!important;max-height:calc(100dvh - 32px)!important;overflow:auto}.roxy-sheet-body{min-height:0;overflow:auto}dialog{position:fixed;inset:0;margin:auto;max-height:calc(100dvh - 32px);overflow:auto}dialog:not([open]){display:none}
.chat-tools{flex-wrap:wrap;gap:6px}.roxy-request-tool{border:1px solid transparent;border-radius:9px;padding:7px 10px;font-size:12px;color:var(--muted)}.roxy-request-tool[aria-pressed=true]{background:var(--raised);border-color:var(--accent);color:var(--text)}
#attachment{display:flex;flex-wrap:wrap;gap:10px;padding:10px 0}.attachment-tile{position:relative;width:88px;height:88px;flex:0 0 88px}.attachment-tile img{width:100%;height:100%;object-fit:cover;border-radius:12px;cursor:zoom-in;border:1px solid var(--border)}.attachment-remove{position:absolute;right:-5px;top:-5px;border-radius:50%;width:24px;height:24px;padding:0;line-height:22px;background:var(--panel);border:1px solid var(--border);color:var(--text)}.message-gallery{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.message-gallery .message-image{width:min(220px,100%);height:180px;object-fit:contain;background:var(--panel);margin:0;border-radius:12px;cursor:zoom-in}
.website-preview-dialog{width:min(1100px,calc(100vw - 24px));height:85dvh}.website-preview-frame{display:block;width:100%;height:60dvh;background:#fff;border:1px solid var(--border);border-radius:9px;margin-top:10px}.website-preview-note{color:var(--muted);font-size:12px}.diagnostic-output{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.5;background:var(--bg);padding:14px;border-radius:8px}.diagnostic-query{width:100%;margin-bottom:10px}#diagnostics-button{font-size:12px}
.roxy-mic{width:32px;height:32px;padding:6px;flex-shrink:0}.roxy-mic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}.roxy-mic.listening{color:#ff9c9c;background:#ff777719;border-radius:50%}#finish-mobile-signin{position:fixed;bottom:20px;right:20px;z-index:1000;background:var(--panel)}
@media(max-width:760px){.app{height:var(--roxy-visible-height,100dvh);position:fixed;inset:var(--roxy-viewport-top,0px) 0 auto;width:100%}main{height:100%;width:100%}#sidebar{visibility:hidden;transform:translateX(-100%);transition:transform .18s ease,visibility .18s;max-height:100%;overflow-y:auto}#sidebar.open{visibility:visible;transform:translateX(0)}.chat-tools{gap:2px}#modes{gap:1px}#modes button,.roxy-request-tool{font-size:11px;padding:7px 8px}.roxy-sheet-backdrop{padding:12px!important}.roxy-sheet{max-height:calc(var(--roxy-visible-height,100dvh) - 24px)!important}.composer-area{padding-bottom:max(8px,env(safe-area-inset-bottom))}#compose-hint{display:none}.message-gallery .message-image{width:130px;height:120px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.message.user .message-label.custom-label{display:flex}
body[data-widgets=standard] .message.assistant .message-label::before{content:none;display:none}#diagnostics-nav{font-size:12px;padding:8px}


/* ===== Roxy power tools: Think + Web ===== */
.roxy-power-tools{
  display:inline-flex;
  align-items:center;
  gap:3px;
  flex:0 0 auto;
  margin-left:3px;
  padding:3px;
  border:1px solid color-mix(in srgb,var(--border) 82%,transparent);
  border-radius:999px;
  background:color-mix(in srgb,var(--panel) 78%,var(--bg));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 5px 18px rgba(0,0,0,.08);
}

.roxy-power-tools[hidden]{
  display:none!important;
}

.roxy-power-tool{
  position:relative;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:0!important;
  padding:4px 9px 4px 5px!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:560;
  letter-spacing:.005em;
  cursor:pointer;
  isolation:isolate;
  overflow:hidden;
  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    transform .16s ease,
    box-shadow .18s ease;
}

.roxy-power-tool:hover{
  color:var(--text)!important;
  background:color-mix(in srgb,var(--raised) 72%,transparent)!important;
  transform:translateY(-1px);
}

.roxy-power-tool:active{
  transform:scale(.975);
}

.roxy-power-icon{
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  flex:0 0 21px;
  border:1px solid color-mix(in srgb,var(--border) 86%,transparent);
  border-radius:50%;
  background:color-mix(in srgb,var(--raised) 72%,var(--panel));
  font-size:11px;
  line-height:1;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.roxy-power-tool.think .roxy-power-icon{
  color:#c7b1ff;
  background:rgba(151,112,255,.08);
}

.roxy-power-tool.web .roxy-power-icon{
  color:#9ccfff;
  background:rgba(72,151,235,.08);
}

.roxy-power-state{
  display:none;
  align-items:center;
  gap:4px;
  color:currentColor;
  font-size:8px;
  font-weight:680;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.roxy-power-state:not(:empty){
  display:inline-flex;
}

.roxy-power-state:not(:empty)::before{
  content:"";
  width:4px;
  height:4px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 8px currentColor;
}

.roxy-power-tool[aria-pressed="true"]{
  color:var(--text)!important;
}

.roxy-power-tool.think[aria-pressed="true"]{
  border-color:rgba(177,145,255,.28)!important;
  background:linear-gradient(180deg,rgba(156,117,255,.13),rgba(133,92,235,.07))!important;
  box-shadow:inset 0 0 0 1px rgba(207,187,255,.035);
}

.roxy-power-tool.think[aria-pressed="true"] .roxy-power-icon{
  color:#eee6ff;
  border-color:rgba(197,171,255,.42);
  background:rgba(151,112,255,.2);
  box-shadow:0 0 14px rgba(151,112,255,.16);
}

.roxy-power-tool.web[aria-pressed="true"]{
  border-color:rgba(118,190,255,.28)!important;
  background:linear-gradient(180deg,rgba(71,156,235,.13),rgba(47,125,206,.07))!important;
  box-shadow:inset 0 0 0 1px rgba(170,218,255,.035);
}

.roxy-power-tool.web[aria-pressed="true"] .roxy-power-icon{
  color:#e8f6ff;
  border-color:rgba(130,199,255,.42);
  background:rgba(62,148,227,.2);
  box-shadow:0 0 14px rgba(62,148,227,.15);
}

.roxy-power-tool.think[aria-pressed="true"] .roxy-power-icon{
  animation:roxy-think-breathe 2.6s ease-in-out infinite;
}

.roxy-power-tool.web[aria-pressed="true"] .roxy-power-icon{
  animation:roxy-web-live 2.2s ease-in-out infinite;
}

@keyframes roxy-think-breathe{
  0%,100%{transform:scale(1);box-shadow:0 0 10px rgba(151,112,255,.10)}
  50%{transform:scale(1.06);box-shadow:0 0 18px rgba(151,112,255,.22)}
}

@keyframes roxy-web-live{
  0%,100%{box-shadow:0 0 8px rgba(62,148,227,.08)}
  50%{box-shadow:0 0 18px rgba(62,148,227,.22)}
}

/* Keep conversation actions visually separate from the per-message power tools. */
#summary.subtle{
  min-height:30px;
  padding:5px 9px;
  border:1px solid transparent;
  border-radius:8px;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
#summary.subtle:hover{
  color:var(--text);
  border-color:var(--border);
  background:var(--raised);
}

@media(max-width:760px){
  .roxy-power-tools{
    margin-left:2px;
    padding:2px;
  }
  .roxy-power-tool{
    min-height:29px;
    padding:3px 7px 3px 4px!important;
    gap:5px;
    font-size:10px!important;
  }
  .roxy-power-icon{
    width:20px;
    height:20px;
    flex-basis:20px;
    font-size:10px;
  }
  .roxy-power-state{
    font-size:7px;
  }
}

@media(max-width:390px){
  .roxy-power-state{
    display:none!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .roxy-power-tool,
  .roxy-power-icon{
    transition:none!important;
    animation:none!important;
  }
}


/* ===== Roxy editorial composer refresh ===== */
.chat-tools{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}

.chat-tools #modes{
  order:1;
  display:flex;
  align-items:center;
  gap:4px;
  flex:0 1 auto;
  min-width:0;
}

.chat-tools #quiet-shortcut,
.chat-tools #summary,
.chat-tools #exit-quiet{
  order:2;
  flex:0 0 auto;
  margin-left:0!important;
}

.chat-tools .roxy-power-tools{
  order:3;
  margin-left:auto!important;
}

/* Primary modes: quiet editorial pills instead of tiny utility text. */
#roxy-power-tools + *{
  position:relative;
}

#modes button{
  position:relative;
  min-height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 10px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  color:color-mix(in srgb,var(--muted) 92%,var(--text))!important;
  font-size:11px!important;
  font-weight:560;
  letter-spacing:.005em;
  white-space:nowrap;
  transition:
    color .16s ease,
    background .16s ease,
    border-color .16s ease,
    transform .14s ease,
    box-shadow .16s ease;
}

#modes button:hover{
  color:var(--text)!important;
  background:color-mix(in srgb,var(--raised) 72%,transparent)!important;
  border-color:color-mix(in srgb,var(--border) 72%,transparent)!important;
  transform:translateY(-1px);
}

#modes button:active{
  transform:scale(.975);
}

#modes button[aria-pressed="true"]{
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--border) 92%,transparent)!important;
  background:
    linear-gradient(180deg,
      color-mix(in srgb,var(--raised) 90%,white 2%),
      color-mix(in srgb,var(--panel) 92%,var(--raised)))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 5px 16px rgba(0,0,0,.08);
}

#modes button[data-mode="ask"][aria-pressed="true"]{
  color:#efe8ff!important;
  border-color:rgba(183,151,255,.22)!important;
}
#modes button[data-mode="study"][aria-pressed="true"]{
  color:#e7f1ff!important;
  border-color:rgba(125,179,255,.20)!important;
}
#modes button[data-mode="code"][aria-pressed="true"]{
  color:#fff0df!important;
  border-color:rgba(239,173,104,.18)!important;
}
#modes button[data-mode="image"][aria-pressed="true"]{
  color:#ffe5f2!important;
  border-color:rgba(238,139,188,.18)!important;
}

/* Give the power capsule the exact right-edge placement from the requested layout. */
.roxy-power-tools{
  margin-left:auto!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.028),
    0 7px 24px rgba(0,0,0,.10)!important;
}

/* Composer shell */
#chat-form{
  position:relative;
  overflow:hidden;
  padding:14px 15px 10px!important;
  border:1px solid color-mix(in srgb,var(--border) 88%,transparent)!important;
  border-radius:18px!important;
  background:
    linear-gradient(180deg,
      color-mix(in srgb,var(--panel) 96%,white 1%),
      color-mix(in srgb,var(--panel) 92%,var(--bg)))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.026),
    0 10px 34px rgba(0,0,0,.12)!important;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    background .18s ease!important;
}

#chat-form::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:
    radial-gradient(520px 120px at 18% -30%,rgba(168,126,255,.055),transparent 62%),
    radial-gradient(420px 100px at 88% 120%,rgba(90,164,238,.035),transparent 62%);
  opacity:.9;
}

#chat-form:focus-within{
  border-color:color-mix(in srgb,var(--accent) 40%,var(--border))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 0 3px color-mix(in srgb,var(--accent) 7%,transparent),
    0 14px 40px rgba(0,0,0,.16)!important;
  transform:translateY(-1px);
}

#prompt{
  position:relative;
  z-index:1;
  min-height:34px!important;
  max-height:160px!important;
  padding:0 1px 2px!important;
  color:var(--text)!important;
  font-size:15px!important;
  line-height:1.55!important;
  font-weight:430;
  letter-spacing:-.006em;
}

#prompt::placeholder{
  color:color-mix(in srgb,var(--muted) 82%,transparent)!important;
}

.compose-actions{
  position:relative;
  z-index:1;
  min-height:34px;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  margin-top:8px!important;
}

/* Attachment and voice become matching circular fashion controls. */
#attach,
#roxy-mic{
  width:31px!important;
  height:31px!important;
  min-width:31px!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 31px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  color:var(--muted)!important;
  font-size:18px!important;
  line-height:1!important;
  transition:
    color .16s ease,
    background .16s ease,
    border-color .16s ease,
    transform .14s ease,
    box-shadow .16s ease!important;
}

#attach span{
  display:none!important;
}

#attach:hover,
#roxy-mic:hover{
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--border) 80%,transparent)!important;
  background:color-mix(in srgb,var(--raised) 72%,transparent)!important;
  transform:translateY(-1px);
}

#attach:active,
#roxy-mic:active{
  transform:scale(.94);
}

#roxy-mic svg{
  width:17px!important;
  height:17px!important;
  stroke-width:1.65!important;
}

#roxy-mic.listening{
  color:#ffd6dc!important;
  border-color:rgba(255,116,137,.24)!important;
  background:rgba(255,91,116,.10)!important;
  box-shadow:
    0 0 0 3px rgba(255,91,116,.045),
    0 0 18px rgba(255,91,116,.10)!important;
  animation:roxy-voice-record 1.6s ease-in-out infinite;
}

@keyframes roxy-voice-record{
  0%,100%{box-shadow:0 0 0 3px rgba(255,91,116,.035),0 0 12px rgba(255,91,116,.08)}
  50%{box-shadow:0 0 0 5px rgba(255,91,116,.055),0 0 21px rgba(255,91,116,.16)}
}

/* Tiny context line remains present but gets out of the way. */
#compose-hint{
  margin-left:auto!important;
  max-width:280px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:color-mix(in srgb,var(--muted) 74%,transparent)!important;
  font-size:9px!important;
  letter-spacing:.01em;
}

/* Stop and retry match the new system. */
#stop{
  min-height:30px;
  padding:5px 9px!important;
  margin-left:auto;
  border:1px solid color-mix(in srgb,var(--border) 84%,transparent)!important;
  border-radius:9px!important;
  background:color-mix(in srgb,var(--raised) 62%,transparent)!important;
  color:var(--text)!important;
  font-size:10px!important;
}

#retry{
  min-height:29px;
  margin-top:6px;
  padding:5px 9px!important;
  border:1px solid color-mix(in srgb,var(--border) 76%,transparent)!important;
  border-radius:9px!important;
  color:var(--muted)!important;
  font-size:9px!important;
  background:transparent!important;
}

/* Send: small jewel-like action, not a generic square. */
#send{
  position:relative;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  flex:0 0 34px!important;
  display:grid!important;
  place-items:center!important;
  margin-left:6px!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:11px!important;
  background:
    linear-gradient(145deg,
      color-mix(in srgb,var(--solid) 92%,white 6%),
      color-mix(in srgb,var(--solid) 72%,#7045b5))!important;
  color:white!important;
  font-size:19px!important;
  line-height:1!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 7px 18px color-mix(in srgb,var(--solid) 17%,transparent)!important;
  transition:
    transform .14s ease,
    box-shadow .16s ease,
    filter .16s ease!important;
}

#send:hover{
  transform:translateY(-1px) scale(1.02);
  filter:brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 10px 23px color-mix(in srgb,var(--solid) 23%,transparent)!important;
}

#send:active{
  transform:scale(.94)!important;
}

#send:disabled{
  opacity:.44;
  filter:saturate(.7);
  box-shadow:none!important;
}

/* Attachments visually belong to the composer now. */
#attachment{
  position:relative;
  z-index:1;
  gap:8px!important;
  padding:0 0 10px!important;
}

.attachment-tile{
  width:72px!important;
  height:72px!important;
  flex-basis:72px!important;
}

.attachment-tile img{
  border-radius:11px!important;
  border-color:color-mix(in srgb,var(--border) 88%,transparent)!important;
  box-shadow:0 5px 16px rgba(0,0,0,.13);
}

/* Notice/disclaimer get visually quieter. */
#notice{
  min-height:0;
  margin-top:5px;
  color:var(--muted);
  font-size:9px;
  line-height:1.45;
}

.disclaimer{
  opacity:.76;
  margin-top:8px!important;
}

/* Mode-row entry motion is deliberately tiny and only on first paint. */
#modes button,
.roxy-power-tools{
  animation:roxy-toolbar-arrive .32s cubic-bezier(.2,.8,.2,1) both;
}
#modes button:nth-child(2){animation-delay:.025s}
#modes button:nth-child(3){animation-delay:.05s}
#modes button:nth-child(4){animation-delay:.075s}
.roxy-power-tools{animation-delay:.10s}

@keyframes roxy-toolbar-arrive{
  from{opacity:0;transform:translateY(3px)}
  to{opacity:1;transform:none}
}

/* Responsive: preserve the hierarchy instead of simply shrinking everything. */
@media(max-width:760px){
  .chat-tools{
    gap:4px!important;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    padding-bottom:1px;
  }
  .chat-tools::-webkit-scrollbar{display:none}
  .chat-tools #modes{
    flex:0 0 auto;
  }
  #modes button{
    min-height:30px;
    padding:5px 8px!important;
    font-size:10px!important;
  }
  .chat-tools .roxy-power-tools{
    margin-left:auto!important;
    position:sticky;
    right:0;
    z-index:2;
    background:color-mix(in srgb,var(--bg) 88%,var(--panel))!important;
    backdrop-filter:blur(10px);
  }
  #chat-form{
    border-radius:16px!important;
    padding:12px 12px 9px!important;
  }
  #prompt{
    font-size:16px!important;
    min-height:31px!important;
  }
  #compose-hint{
    display:none!important;
  }
  #attach,
  #roxy-mic{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
  }
  #send{
    width:35px!important;
    height:35px!important;
    min-width:35px!important;
  }
}

@media(max-width:420px){
  .roxy-power-label{
    display:none;
  }
  .roxy-power-tool{
    padding:4px!important;
  }
  .roxy-power-icon{
    width:22px;
    height:22px;
    flex-basis:22px;
  }
}

@media(prefers-reduced-motion:reduce){
  #modes button,
  .roxy-power-tools,
  #roxy-mic.listening{
    animation:none!important;
  }
}


/* ===== Primary mode capsule alignment ===== */
#modes.roxy-mode-tools{
  display:inline-flex!important;
  align-items:center!important;
  gap:3px!important;
  flex:0 0 auto!important;
  min-width:0;
  padding:3px!important;
  border:1px solid color-mix(in srgb,var(--border) 82%,transparent)!important;
  border-radius:999px!important;
  background:color-mix(in srgb,var(--panel) 78%,var(--bg))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 5px 18px rgba(0,0,0,.08)!important;
}

#modes.roxy-mode-tools button{
  min-height:30px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  margin:0!important;
  padding:4px 9px 4px 5px!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--muted)!important;
  font-size:11px!important;
  font-weight:560!important;
  letter-spacing:.005em!important;
  white-space:nowrap;
  box-shadow:none!important;
  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    transform .16s ease,
    box-shadow .18s ease!important;
}

#modes.roxy-mode-tools button[hidden]{
  display:none!important;
}

#modes.roxy-mode-tools button:hover{
  color:var(--text)!important;
  background:color-mix(in srgb,var(--raised) 72%,transparent)!important;
  transform:translateY(-1px);
}

#modes.roxy-mode-tools button:active{
  transform:scale(.975);
}

.roxy-mode-icon{
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  flex:0 0 21px;
  border:1px solid color-mix(in srgb,var(--border) 86%,transparent);
  border-radius:50%;
  background:color-mix(in srgb,var(--raised) 72%,var(--panel));
  font-size:10px;
  line-height:1;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.roxy-mode-icon.ask{
  color:#cdb8ff;
  background:rgba(151,112,255,.07);
}
.roxy-mode-icon.study{
  color:#a9d0ff;
  background:rgba(72,151,235,.07);
}
.roxy-mode-icon.build{
  color:#f6c18d;
  background:rgba(229,148,69,.07);
}
.roxy-mode-icon.image{
  color:#f5b4d4;
  background:rgba(226,104,165,.07);
}

#modes.roxy-mode-tools button[aria-pressed="true"]{
  color:var(--text)!important;
  border-color:color-mix(in srgb,var(--border) 92%,transparent)!important;
  background:linear-gradient(
    180deg,
    color-mix(in srgb,var(--raised) 86%,white 2%),
    color-mix(in srgb,var(--panel) 90%,var(--raised))
  )!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}

#modes.roxy-mode-tools button[data-mode="ask"][aria-pressed="true"]{
  border-color:rgba(183,151,255,.24)!important;
  background:linear-gradient(180deg,rgba(157,119,255,.11),rgba(129,91,222,.05))!important;
}
#modes.roxy-mode-tools button[data-mode="study"][aria-pressed="true"]{
  border-color:rgba(125,179,255,.22)!important;
  background:linear-gradient(180deg,rgba(84,154,237,.10),rgba(57,124,204,.05))!important;
}
#modes.roxy-mode-tools button[data-mode="code"][aria-pressed="true"]{
  border-color:rgba(239,173,104,.22)!important;
  background:linear-gradient(180deg,rgba(229,148,69,.10),rgba(191,113,40,.05))!important;
}
#modes.roxy-mode-tools button[data-mode="image"][aria-pressed="true"]{
  border-color:rgba(238,139,188,.22)!important;
  background:linear-gradient(180deg,rgba(226,104,165,.10),rgba(183,70,129,.05))!important;
}

#modes.roxy-mode-tools button[data-mode="ask"][aria-pressed="true"] .roxy-mode-icon{
  color:#f1eaff;
  border-color:rgba(197,171,255,.40);
  background:rgba(151,112,255,.18);
  box-shadow:0 0 13px rgba(151,112,255,.14);
}
#modes.roxy-mode-tools button[data-mode="study"][aria-pressed="true"] .roxy-mode-icon{
  color:#edf7ff;
  border-color:rgba(144,203,255,.38);
  background:rgba(72,151,235,.17);
  box-shadow:0 0 13px rgba(72,151,235,.12);
}
#modes.roxy-mode-tools button[data-mode="code"][aria-pressed="true"] .roxy-mode-icon{
  color:#fff2e4;
  border-color:rgba(242,182,120,.36);
  background:rgba(229,148,69,.16);
  box-shadow:0 0 13px rgba(229,148,69,.11);
}
#modes.roxy-mode-tools button[data-mode="image"][aria-pressed="true"] .roxy-mode-icon{
  color:#fff0f7;
  border-color:rgba(243,157,199,.36);
  background:rgba(226,104,165,.16);
  box-shadow:0 0 13px rgba(226,104,165,.11);
}

/* The two capsules share material, but power tools remain the special pair. */
.chat-tools .roxy-power-tools{
  min-height:36px;
}
.chat-tools #modes.roxy-mode-tools{
  min-height:36px;
}

@media(max-width:760px){
  #modes.roxy-mode-tools{
    padding:2px!important;
    gap:2px!important;
  }
  #modes.roxy-mode-tools button{
    min-height:29px!important;
    padding:3px 7px 3px 4px!important;
    gap:5px!important;
    font-size:10px!important;
  }
  .roxy-mode-icon{
    width:20px;
    height:20px;
    flex-basis:20px;
    font-size:9px;
  }
}

@media(max-width:360px){
  #modes.roxy-mode-tools button{
    padding-right:5px!important;
  }
  .roxy-mode-label{
    display:none;
  }
  #modes.roxy-mode-tools button{
    padding:4px!important;
  }
  .roxy-mode-icon{
    width:22px;
    height:22px;
    flex-basis:22px;
  }
}


/* ===== Seamless mode interaction + balanced footer links ===== */
#modes.roxy-mode-tools button{
  outline:none!important;
}

/* Don't draw another pill inside the shared capsule. */
#modes.roxy-mode-tools button:hover,
#modes.roxy-mode-tools button[aria-pressed="true"],
#modes.roxy-mode-tools button[data-mode="ask"][aria-pressed="true"],
#modes.roxy-mode-tools button[data-mode="study"][aria-pressed="true"],
#modes.roxy-mode-tools button[data-mode="code"][aria-pressed="true"],
#modes.roxy-mode-tools button[data-mode="image"][aria-pressed="true"]{
  border-color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}

#modes.roxy-mode-tools button:hover .roxy-mode-icon{
  transform:translateY(-1px) scale(1.035);
}

#modes.roxy-mode-tools button:active{
  transform:none!important;
}

#modes.roxy-mode-tools button:active .roxy-mode-icon{
  transform:scale(.88);
  transition-duration:.08s;
}

/* Keyboard focus stays visible, but around the round icon rather than the whole button. */
#modes.roxy-mode-tools button:focus-visible .roxy-mode-icon{
  box-shadow:
    0 0 0 2px color-mix(in srgb,var(--accent) 32%,transparent),
    0 0 16px color-mix(in srgb,var(--accent) 15%,transparent)!important;
}

#modes.roxy-mode-tools button[aria-pressed="true"] .roxy-mode-label{
  color:var(--text)!important;
}

#modes.roxy-mode-tools button[data-mode="ask"][aria-pressed="true"] .roxy-mode-label{
  color:#eee7ff!important;
}
#modes.roxy-mode-tools button[data-mode="study"][aria-pressed="true"] .roxy-mode-label{
  color:#e8f3ff!important;
}
#modes.roxy-mode-tools button[data-mode="code"][aria-pressed="true"] .roxy-mode-label{
  color:#fff0df!important;
}
#modes.roxy-mode-tools button[data-mode="image"][aria-pressed="true"] .roxy-mode-label{
  color:#ffe7f3!important;
}

/* Selection lives in the circular orb and softly spills into the capsule. */
#modes.roxy-mode-tools button[aria-pressed="true"] .roxy-mode-icon{
  transform:scale(1.055);
}

#modes.roxy-mode-tools button[data-mode="ask"][aria-pressed="true"] .roxy-mode-icon{
  box-shadow:
    0 0 0 3px rgba(151,112,255,.045),
    0 0 18px rgba(151,112,255,.18)!important;
}
#modes.roxy-mode-tools button[data-mode="study"][aria-pressed="true"] .roxy-mode-icon{
  box-shadow:
    0 0 0 3px rgba(72,151,235,.04),
    0 0 18px rgba(72,151,235,.16)!important;
}
#modes.roxy-mode-tools button[data-mode="code"][aria-pressed="true"] .roxy-mode-icon{
  box-shadow:
    0 0 0 3px rgba(229,148,69,.038),
    0 0 18px rgba(229,148,69,.14)!important;
}
#modes.roxy-mode-tools button[data-mode="image"][aria-pressed="true"] .roxy-mode-icon{
  box-shadow:
    0 0 0 3px rgba(226,104,165,.038),
    0 0 18px rgba(226,104,165,.14)!important;
}

/* Footer/legal links should read as one balanced pair. */
body[data-widgets=standard] .disclaimer{
  font-size:9px!important;
  line-height:1.65!important;
  opacity:.84!important;
}

body[data-widgets=standard] .disclaimer a,
body[data-widgets=standard] .disclaimer button{
  display:inline!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:color-mix(in srgb,var(--text) 76%,var(--muted))!important;
  font:inherit!important;
  font-size:9px!important;
  font-weight:500!important;
  line-height:inherit!important;
  text-decoration:underline!important;
  text-underline-offset:2px;
  cursor:pointer;
}

body[data-widgets=standard] .disclaimer a:hover,
body[data-widgets=standard] .disclaimer button:hover{
  color:var(--text)!important;
}

@media(max-width:760px){
  body[data-widgets=standard] .disclaimer,
  body[data-widgets=standard] .disclaimer a,
  body[data-widgets=standard] .disclaimer button{
    font-size:8.5px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  #modes.roxy-mode-tools button .roxy-mode-icon{
    transition:none!important;
  }
}


/* ===== Request-state clarity + summary placement ===== */
.roxy-power-tool[data-requesting="true"]{
  color:var(--text)!important;
}

.roxy-power-tool.think[data-requesting="true"]{
  border-color:rgba(177,145,255,.28)!important;
  background:linear-gradient(180deg,rgba(156,117,255,.13),rgba(133,92,235,.07))!important;
}

.roxy-power-tool.web[data-requesting="true"]{
  border-color:rgba(118,190,255,.28)!important;
  background:linear-gradient(180deg,rgba(71,156,235,.13),rgba(47,125,206,.07))!important;
}

.roxy-power-tool[data-requesting="true"] .roxy-power-state{
  display:inline-flex!important;
}

.roxy-power-tool[data-requesting="true"] .roxy-power-icon{
  transform:scale(1.045);
}

.roxy-power-tool.think[data-requesting="true"] .roxy-power-icon{
  color:#eee6ff;
  border-color:rgba(197,171,255,.42);
  background:rgba(151,112,255,.2);
  animation:roxy-think-breathe 1.7s ease-in-out infinite;
}

.roxy-power-tool.web[data-requesting="true"] .roxy-power-icon{
  color:#e8f6ff;
  border-color:rgba(130,199,255,.42);
  background:rgba(62,148,227,.2);
  animation:roxy-web-live 1.5s ease-in-out infinite;
}

/* Conversation action no longer interrupts the two capsule groups. */
.chat-tools #summary{
  order:4!important;
  margin-left:4px!important;
  flex:0 0 auto;
  min-height:30px;
  padding:5px 9px!important;
  border:1px solid color-mix(in srgb,var(--border) 72%,transparent)!important;
  border-radius:999px!important;
  background:transparent!important;
  color:var(--muted)!important;
  font-size:10px!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease,transform .14s ease!important;
}

.chat-tools #summary:hover{
  color:var(--text)!important;
  background:color-mix(in srgb,var(--raised) 70%,transparent)!important;
  border-color:var(--border)!important;
  transform:translateY(-1px);
}

@media(max-width:760px){
  .chat-tools #summary{
    order:4!important;
    min-height:29px;
    padding:4px 8px!important;
    font-size:9px!important;
  }
}
