.ozzy-dock {
  --dock-gap: 16px;
  --keyboard: 0px;
  position: fixed;
  right: max(var(--dock-gap), env(safe-area-inset-right));
  bottom: calc(max(var(--dock-gap), env(safe-area-inset-bottom)) + var(--keyboard));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 900;
  pointer-events: none;
}
.ozzy-dock button, .ozzy-panel { pointer-events: auto; }
.ozzy-dock [hidden] { display: none; }
#ozzy-launcher {
  align-items: center;
  display: inline-flex;
  gap: 11px;
  border: 1px solid #161e17;
  background: var(--ink);
  color: #f8faf2;
  border-radius: 999px;
  box-shadow: 0 5px 16px #17251423;
  font-size: 15px;
  font-weight: 600;
  min-height: 48px;
  padding: 0 18px;
}
#ozzy-launcher:hover { background: #273528; }
.ozzy-bubble { position: relative; width: 18px; height: 14px; border: 1.8px solid var(--lime); border-radius: 6px; }
.ozzy-bubble::after { content: ""; position: absolute; left: 3px; bottom: -3px; width: 4px; height: 4px; background: var(--ink); border-left: 1.8px solid var(--lime); border-bottom: 1.8px solid var(--lime); transform: skewY(-28deg); }
.ozzy-panel {
  display: flex;
  flex-direction: column;
  width: min(365px,calc(100vw - 2 * var(--dock-gap)));
  height: min(450px,calc(var(--visible-height,100dvh) - 2 * var(--dock-gap) - 58px));
  max-height: 480px;
  background: #fffefa;
  border: 1px solid #b9bfb1;
  border-radius: 17px;
  color: var(--ink);
  box-shadow: 0 12px 55px #111f172b,0 2px 8px #111f171a;
  overflow: hidden;
  overscroll-behavior: contain;
}
.ozzy-head { display: flex; align-items: center; gap: 12px; flex-shrink: 0; background: #18231c; padding: 13px 12px 13px 17px; color: #f8fbf3; }
.ozzy-mark { position: relative; display: block; width: 31px; height: 31px; color: var(--lime); border: 2px dashed currentColor; border-radius: 50%; }
.ozzy-mark::after { content: ""; position: absolute; inset: 9px; background: currentColor; border-radius: 50%; }
.ozzy-head h2, .ozzy-head p { margin: 0; }
.ozzy-head h2 { font-size: 18px; font-weight: 650; letter-spacing: -.035em; }
.ozzy-head p { font-size: 12px; color: #c8d3c4; margin-top: 1px; }
.ozzy-close { background: transparent; color: #f8fbf3; border: 0; margin-left: auto; min-width: 44px; height: 44px; border-radius: 50%; font-size: 25px; line-height: 1; }
.ozzy-close:hover { background: #334236; }
.ozzy-thread { flex: 1; min-height: 0; overflow: auto; padding: 15px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; overscroll-behavior: contain; }
.ozzy-turn { max-width: 94%; border-radius: 12px 12px 12px 3px; background: #edf0e6; padding: 9px 12px; flex: 0 0 auto; overflow-wrap: anywhere; }
.ozzy-turn[data-role="user"] { align-self: flex-end; background: #def2b5; border-radius: 12px 12px 3px 12px; }
.ozzy-turn p { white-space: pre-wrap; margin: 0; font-size: 14px; line-height: 1.48; }
.ozzy-feedback { display:flex; align-items:center; gap:9px; padding: 4px 16px; font-size: 12px; line-height: 1.4; color: #40523b; }
.ozzy-feedback button { border:0; background: transparent; text-decoration: underline; color: inherit; min-height: 36px; font-weight: 650; }
.ozzy-compose { display:flex; align-items:flex-end; gap:8px; padding: 10px 12px; border-top: 1px solid #dce0d4; flex-shrink: 0; background: #fffefa; }
.ozzy-compose textarea { resize:none; flex:1; min-width:0; min-height:44px; max-height:85px; padding:11px 7px; border:0; background: transparent; color: var(--ink); font:16px/1.35 var(--sans); }
.ozzy-compose button { width:44px; height:44px; border-radius:50%; border:0; background:var(--lime); color:var(--ink); font:24px/1 var(--sans); }
.ozzy-compose button:disabled { background:#e8ebdf; color:#8a9184; }
@media (max-width: 600px) {
  .ozzy-dock { --dock-gap: 12px; }
  .keyboard-open #ozzy-launcher { display:none; }
  .keyboard-open .ozzy-panel { height: min(450px,calc(var(--visible-height,100dvh) - 2 * var(--dock-gap))); }
}
