.v4-dock {
  --dock-gap: max(12px, env(safe-area-inset-bottom));
  position: fixed;
  z-index: 48;
  inset: auto 0 var(--dock-gap);
  display: grid;
  justify-items: center;
  padding-inline: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity .18s, transform .22s var(--ease), visibility .18s;
}
.v4-dock.is-visible { opacity: 1; visibility: visible; transform: none; }
.v4-dock [hidden] { display: none; }
.v4-dock.is-visible > :is(.v4-dock__bar, .v4-dock__launcher, .v4-dock__panel) { pointer-events: auto; }
.v4-dock[inert] > * { pointer-events: none; }
.v4-dock__bar, .v4-dock__panel, .v4-dock__launcher {
  border: 1px solid var(--line2);
  background: var(--float);
  box-shadow: var(--specular), 0 10px 34px #03090580;
}
.v4-dock__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(100%, 860px);
  height: 56px;
  padding-inline: 14px 5px;
  border-radius: 999px;
}
@supports (backdrop-filter: blur(12px)) {
  .v4-dock__bar { background: color-mix(in srgb, var(--float) 91%, transparent); backdrop-filter: blur(12px); }
}
.v4-dock__signal { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px #00e59969; }
.v4-dock.is-visible .v4-dock__signal { animation: v4-dock-signal 2.4s ease-in-out 3; }
@keyframes v4-dock-signal { 50% { opacity: .48; } }
.v4-dock__prompt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 4px;
  color: var(--ink2);
  font-size: 13px;
  line-height: 1.4;
  line-break: strict;
}
.v4-dock__mobile { display: none; }
.v4-dock__action {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}
.v4-dock__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--ink2);
  cursor: pointer;
  transition: color .16s, background-color .16s;
}
.v4-dock__icon:hover, .v4-dock__icon:focus-visible { color: var(--green2); background-color: var(--card2); }
.v4-dock__launcher { justify-self: end; margin-right: 6px; color: var(--green2); }
.v4-dock__panel[open] {
  position: static;
  width: min(100%, 640px);
  margin: 0;
  padding: 16px 20px;
  max-height: min(75dvh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 22px;
  color: var(--ink);
  animation: v4-dock-expand .25s var(--ease) both;
}
@keyframes v4-dock-expand { from { opacity: 0; translate: 0 9px; } }
.v4-dock__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v4-dock__head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.v4-dock__detail { margin: 0 0 12px; color: var(--ink2); font-size: 14px; line-height: 1.65; line-break: strict; text-wrap: balance; }
.v4-dock__intents { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.v4-dock__intents button {
  min-height: 34px;
  padding: 2px 10px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background-color: var(--card);
  color: var(--ink2);
  font-size: 13px;
  cursor: pointer;
}
.v4-dock__intents button:hover, .v4-dock__intents button[aria-pressed="true"] { border-color: var(--green); color: var(--green2); }
.v4-dock__intents button[aria-pressed="true"] { background-color: #214437; }
.v4-dock__field { height: 52px; padding-left: 14px; gap: 8px; }
.v4-dock__field button { height: 40px; padding-inline: 14px; font-size: 14px; }
.v4-dock__field input { font-size: 16px; }
.v4-dock__consent { display: flex; align-items: center; gap: 8px; min-height: 34px; color: var(--ink2); font-size: 13px; }
.v4-dock__consent input { color-scheme: dark; accent-color: var(--green); width: 16px; height: 16px; margin-left: 2px; }
.v4-dock__status { margin: 0; font-size: 13px; }
.v4-dock__status a { color: var(--ink3); text-decoration: underline; text-underline-offset: 3px; }
html:has(.v4-dock.is-visible) { scroll-padding-bottom: 78px; }
.v4-dock.is-visible ~ #back-to-top { bottom: calc(68px + var(--v4-safe-bottom, 0px)); }
.v4-dock.is-visible[data-state="open"] ~ #back-to-top { visibility: hidden; transition: none; }

@media (max-width: 768px) {
  .v4-dock__bar {
    display: flex;
    width: 100%;
    max-width: 525px;
    gap: 5px;
    padding-inline: 10px 4px;
    border-color: rgba(16, 185, 129, .52);
    background: linear-gradient(180deg, #204739f5, #122d24fa);
    box-shadow: inset 0 1px 0 #d8ffe733, 0 10px 26px #030905c4;
  }
  .v4-dock__desktop { display: none; }
  .v4-dock__mobile { display: inline; }
  .v4-dock__signal, .v4-dock__bar .v4-dock__icon { flex: none; }
  .v4-dock__prompt {
    display: block;
    flex: 1;
    min-width: 0;
    margin: 0 2px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .v4-dock__action {
    flex-shrink: 0;
    min-height: 44px;
    gap: 4px;
    padding-inline: 10px;
    background: linear-gradient(180deg, #62f6c2, #16dfa1 95%);
  }
  html:has(.v4-dock.is-visible) { scroll-padding-bottom: calc(66px + max(12px, env(safe-area-inset-bottom))); }
  .v4-dock.is-visible ~ #back-to-top { bottom: calc(64px + max(12px, env(safe-area-inset-bottom))); }
  .v4-dock__panel[open] {
    position: fixed;
    inset: auto 0 var(--dock-viewport-bottom, 0px);
    width: 100%;
    max-width: none;
    max-height: calc(var(--dock-viewport-height, 100dvh) - 16px);
    padding: 10px 16px max(14px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }
  .v4-dock__panel::backdrop { background: #06100dbb; }
  .v4-dock__field { height: auto; min-height: 52px; flex-wrap: nowrap; padding: 5px 5px 5px 10px; border-radius: 18px; }
  .v4-dock__field input { flex: 1; height: 40px; }
  .v4-dock__field .v4-sb__icon { margin-left: 0; width: 16px; height: 16px; }
  .v4-dock__field button { width: auto; height: 40px; border-radius: 13px; padding-inline: 8px; }
}
@media (max-width: 375px) {
  .v4-dock__bar { gap: 4px; padding-inline: 8px 3px; }
  .v4-dock__signal { display: none; }
  .v4-dock__prompt { margin-inline: 1px; font-size: 13px; }
  .v4-dock__action { gap: 3px; padding-inline: 8px; font-size: 12px; }
  .v4-dock__action .v4-icon { width: 14px; }
  .v4-dock__bar .v4-dock__icon { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .v4-dock, .v4-dock__panel[open], .v4-dock.is-visible .v4-dock__signal { animation: none; transition: none; }
}
