/* ─── Agent Wheel Panel ─── */

/* Hide legacy elements */
#dorphin-launcher { display: none !important; }

/* ─── Context chip tray (hidden, kept for JS compat) ─── */
#dorphin-chip-tray { display: none; }

#agent-wheel-panel {
  position: fixed;
  right: 24px;
  bottom: 52px;
  z-index: 2200;
  width: 59px;
  background: rgba(8, 17, 28, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(44, 78, 138, 0.4);
  border-radius: 8px;
  padding: 6px 5px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  user-select: none;
}

#awp-title-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.awp-title {
  font-size: .37rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
  opacity: .5;
}

#awp-drum {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 5px 0 3px;
}

.awp-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.awp-divider {
  width: 26px;
  height: 1px;
  background: rgba(122, 154, 205, 0.32);
}

.awp-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(62, 97, 156, 0.5);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
  cursor: pointer;
  padding: 1px;
}

.awp-slot img {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  width: 33px;
  height: 33px;
  mix-blend-mode: multiply; /* removes white bg on dark surface */
}

.awp-slot:hover {
  border-color: rgba(255, 95, 5, 0.45);
  background: rgba(255, 95, 5, 0.08);
  transform: translateY(-1px);
}

.awp-slot.active {
  border-color: rgba(255, 95, 5, 0.82);
  background: rgba(255, 95, 5, 0.14);
  box-shadow: 0 0 0 2px rgba(255, 95, 5, 0.14);
}

.awp-active .awp-slot.active {
  box-shadow: 0 0 0 2px rgba(255, 95, 5, 0.22), 0 0 12px rgba(255, 95, 5, 0.35);
}

#awp-label {
  font-size: .4rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  letter-spacing: .02em;
  white-space: nowrap;
  opacity: .9;
}

#awp-status-dot {
  position: absolute;
  top: 0;
  right: -10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff6b3d;
  box-shadow: 0 0 0 2px rgba(8, 20, 42, .92), 0 0 10px rgba(255, 107, 61, .55);
}

.dorphin-ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(14, 28, 58, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 95, 5, 0.38);
  color: var(--text);
  font: 600 .73rem/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
  opacity: 0;
  transform: translateX(18px);
  animation: chipSlideIn .3s ease forwards;
  transition: background .15s, border-color .15s, transform .15s;
}

.dorphin-ctx-chip:hover {
  background: rgba(255, 95, 5, .14);
  border-color: var(--accent);
  transform: translateX(-2px);
}

.dorphin-ctx-chip .chip-mark {
  color: var(--accent);
  font-size: .7rem;
  line-height: 1;
}

@keyframes chipSlideIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Panel header with inline avatar ─── */
.dorphin-panel-hdr-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dorphin-panel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  border: 2px solid rgba(255, 95, 5, .5);
  flex-shrink: 0;
}

/* ─── Panel overlay — right sidebar ─── */
#dorphin-welcome-overlay,
#dorphin-panel-overlay {
  position: fixed;
  top: 52px;
  bottom: 52px;
  right: 96px; /* leaves room for agent wheel panel */
  width: 320px;
  z-index: 2100;
  display: none;
  pointer-events: none;
}

#dorphin-welcome-overlay.open,
#dorphin-panel-overlay.open {
  display: block;
  pointer-events: auto;
}

#dorphin-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: rgba(8, 17, 28, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-shadow: -6px 0 32px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(calc(100% + 62px));
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

#dorphin-panel-overlay.open #dorphin-panel {
  transform: translateX(0);
}

#dorphin-panel h2 {
  margin: 4px 0 0;
  font-size: .95rem;
  font-weight: 700;
}

/* Agent bar */
#dorphin-panel-agent-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid rgba(44, 78, 138, .3);
  flex-shrink: 0;
}

#dorphin-panel-agent-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: multiply;
  flex-shrink: 0;
}

#dorphin-panel-agent-name {
  flex: 1;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}

#dorphin-panel-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .08);
  color: var(--text-dim);
  font-size: .65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}

#dorphin-panel-close:hover {
  background: rgba(255, 95, 5, .15);
  color: var(--accent);
}

/* Skill tabs */
#dorphin-skill-tabs {
  display: flex;
  border-bottom: 1px solid rgba(44, 78, 138, .3);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#dorphin-skill-tabs::-webkit-scrollbar { display: none; }

.dsk-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 72px;
  padding: 10px 6px 9px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: var(--font);
  transition: color .15s, border-color .15s, background .15s;
  white-space: nowrap;
}

.dsk-icon { font-size: 1.1rem; line-height: 1; }
.dsk-label { font-size: .6rem; font-weight: 600; letter-spacing: .02em; }

.dsk-tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

.dsk-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(255, 95, 5, .06);
}

/* Chat thread */
#dorphin-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 78, 138, .5) transparent;
  mask-image: linear-gradient(to bottom, transparent 0%, black 40px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40px);
}

.dchat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.dchat-row.from-user {
  flex-direction: row-reverse;
}

.dchat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  border: 1.5px solid rgba(255, 95, 5, .4);
  flex-shrink: 0;
  align-self: flex-end;
}

.dchat-msg-wrap {
  max-width: 82%;
  min-width: 0;
}

.dchat-bubble {
  padding: 9px 12px;
  border-radius: 14px;
  font-size: .76rem;
  line-height: 1.55;
  color: var(--text);
  overflow-wrap: break-word;
}

.from-dorphin .dchat-bubble {
  background: rgba(29, 59, 107, 0.65);
  border: 1px solid rgba(44, 78, 138, .4);
  border-bottom-left-radius: 4px;
}

.from-user .dchat-bubble {
  background: rgba(255, 95, 5, .16);
  border: 1px solid rgba(255, 95, 5, .3);
  border-bottom-right-radius: 4px;
}

.dchat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-left: 34px;
}

.dchat-btn {
  padding: 5px 12px;
  border-radius: 999px;
  font: 600 .68rem/1 var(--font);
  cursor: pointer;
  border: 1px solid rgba(44, 78, 138, .5);
  background: rgba(29, 59, 107, .45);
  color: var(--text);
  transition: background .15s, border-color .15s;
}

.dchat-btn:hover {
  background: rgba(44, 78, 138, .6);
  border-color: rgba(100, 160, 255, .5);
}

.dchat-btn.primary {
  background: rgba(255, 95, 5, .18);
  border-color: rgba(255, 95, 5, .5);
  color: var(--accent);
}

.dchat-btn.primary:hover { background: rgba(255, 95, 5, .28); }

.dchat-paper-card {
  background: rgba(29, 59, 107, .45);
  border: 1px solid rgba(44, 78, 138, .4);
  border-radius: 9px;
  padding: 8px 36px 8px 11px; /* right padding for add btn */
  margin-top: 6px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}

.dchat-paper-card:hover { background: rgba(44, 78, 138, .55); }

.dchat-collab-paper-choice {
  width: 100%;
  text-align: left;
  display: block;
  font: inherit;
}

.dchat-collab-paper-choice.selected {
  border-color: rgba(255, 95, 5, .55);
  background: rgba(255, 95, 5, .1);
}

.dchat-collab-select-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(44, 78, 138, .45);
  color: var(--text-dim);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.dchat-collab-paper-choice.selected .dchat-collab-select-indicator {
  background: rgba(255, 95, 5, .18);
  color: var(--accent);
}

.dchat-pin-link {
  width: 100%;
  border: 1px solid rgba(72, 108, 173, 0.45);
  border-radius: 12px;
  background: rgba(21, 47, 92, 0.46);
  color: var(--text);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  min-width: 0;
}

.dchat-pin-link:hover {
  border-color: rgba(255, 95, 5, 0.55);
  background: rgba(28, 56, 104, 0.62);
  transform: translateY(-1px);
}

.dchat-pin-link-room {
  font: 700 .73rem/1.25 var(--font);
  color: #f4f8ff;
}

.dchat-pin-link-meta {
  font: 400 .62rem/1.25 var(--font);
  color: rgba(194, 210, 236, 0.88);
}

.dchat-pin-link-room.is-private {
  color: #ffe7a8;
}

.dchat-pin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.dchat-pin-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dchat-pin-mini-btn {
  border: 1px solid rgba(72, 108, 173, 0.45);
  border-radius: 10px;
  background: rgba(20, 46, 92, 0.48);
  color: #eef4ff;
  font: 600 .88rem/1 var(--font);
  width: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}

.dchat-pin-mini-btn:hover {
  border-color: rgba(255, 95, 5, 0.55);
  background: rgba(28, 56, 104, 0.62);
  transform: translateY(-1px);
}

.dchat-pin-mini-btn.danger {
  color: #ffd8d2;
}

/* Always-visible add btn inside chat paper cards */
.dchat-paper-card .paper-card-add-btn {
  opacity: 1;
  pointer-events: all;
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.dchat-paper-card h4 {
  margin: 0 0 3px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.dchat-paper-meta {
  font-size: .63rem;
  color: var(--text-dim);
}

.dchat-paper-reason {
  font-size: .6rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 3px;
  opacity: .8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.dchat-paper-reason.expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.dchat-person-card {
  background: rgba(29, 59, 107, .45);
  border: 1px solid rgba(44, 78, 138, .4);
  border-radius: 9px;
  padding: 8px 11px;
  margin-top: 4px;
}

.dchat-person-card-static {
  cursor: default;
}

.dchat-person-card strong {
  font-size: .76rem;
  color: var(--text);
  display: block;
}

.dchat-person-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: 700 .76rem/1.35 var(--font);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.dchat-person-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

.dchat-person-meta {
  font-size: .63rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.dchat-book-flag {
  color: var(--accent);
}

.dchat-serendipity-badge {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(255, 200, 80, .35);
  background: rgba(255, 200, 80, .08);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
  letter-spacing: .05em;
}

.dchat-serendipity-why {
  display: inline-block;
  margin-top: 4px;
  font-size: .72rem;
  color: var(--text-dim);
}

.dchat-typing .dchat-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
}

.dchat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: dotBounce 1.1s ease-in-out infinite;
}

.dchat-dot:nth-child(2) { animation-delay: .2s; }
.dchat-dot:nth-child(3) { animation-delay: .4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40%           { transform: translateY(-5px); opacity: 1; }
}

#dorphin-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(44, 78, 138, .3);
  flex-shrink: 0;
}

#dorphin-chat-input-row .clearable-input-wrap {
  flex: 1;
  min-width: 0;
}

#dorphin-chat-input {
  width: 100%;
  background: rgba(29, 59, 107, .5);
  border: 1px solid rgba(44, 78, 138, .4);
  border-radius: 999px;
  padding: 8px 34px 8px 14px;
  font: .76rem/1.4 var(--font);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}

#dorphin-chat-input:focus { border-color: rgba(255, 95, 5, .5); }
#dorphin-chat-input::placeholder { color: var(--text-dim); }

#dorphin-chat-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: .95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}

#dorphin-chat-send:hover { background: #e05800; transform: scale(1.05); }

/* Venue map pins */
#dorphin-pin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 55;
}

.dorphin-venue-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: auto;
  --pin-offset-x: 0px;
  --pin-offset-y: 0px;
  transform: translate(calc(-4px + var(--pin-offset-x)), calc(-100% + var(--pin-offset-y)));
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .55));
  animation: pinDrop .45s cubic-bezier(.34, 1.56, .64, 1);
}

.dorphin-venue-pin[hidden] {
  display: none !important;
}

.pin-callout {
  background: rgba(8, 18, 42, 0.92);
  border: 1.5px solid rgba(255, 95, 5, 0.7);
  border-radius: 8px;
  padding: 5px 9px 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 90px;
  position: relative;
}

/* speech-bubble tail pointing down-left */
.pin-callout::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 8px;
  border-left: 6px solid transparent;
  border-right: 0px solid transparent;
  border-top: 7px solid rgba(255, 95, 5, 0.7);
}

.dorphin-venue-pin.pin-other .pin-callout {
  background: rgba(9, 18, 38, 0.92);
  border-color: rgba(106, 135, 188, 0.58);
}

.dorphin-venue-pin.pin-tutorial .pin-callout {
  background: rgba(255, 121, 40, 0.96);
  border-color: rgba(255, 215, 182, 0.92);
}

.dorphin-venue-pin.pin-tutorial .pin-callout::after {
  border-top-color: rgba(255, 215, 182, 0.92);
}

.dorphin-venue-pin.pin-other .pin-callout::after {
  border-top-color: rgba(106, 135, 188, 0.58);
}

.pin-anchor {
  font-size: .75rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  align-self: flex-end;
}
.pin-anchor:hover { opacity: 1; }

.pin-name {
  font: 700 .65rem/1.2 var(--font);
  color: var(--accent);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline dotted;
}
.pin-name:hover { color: #fff; }

.dorphin-venue-pin.pin-other .pin-name {
  color: rgba(231, 238, 250, 0.9);
}

.dorphin-venue-pin.pin-tutorial .pin-name {
  color: #123b7a;
  text-decoration-color: rgba(18, 59, 122, 0.55);
}

.pin-meta {
  font: 400 .56rem/1.25 var(--font);
  color: rgba(200, 210, 230, 0.7);
  white-space: nowrap;
}

.dorphin-venue-pin.pin-tutorial .pin-meta,
.dorphin-venue-pin.pin-tutorial .pin-anchor {
  color: rgba(19, 44, 84, 0.96);
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 247, 236, 0.32);
}

.dorphin-venue-pin.pin-other .pin-meta,
.dorphin-venue-pin.pin-other .pin-anchor,
.dorphin-venue-pin.pin-other .pin-remove-btn {
  color: rgba(184, 200, 228, 0.72);
}

.pin-remove-btn {
  background: none;
  border: none;
  color: rgba(200, 210, 230, 0.4);
  font-size: .6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 4px;
  align-self: flex-start;
  transition: color .15s;
  flex-shrink: 0;
}
.pin-remove-btn:hover { color: var(--accent); }

.pin-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.pin-visibility-btn {
  border: 1px solid rgba(72, 108, 173, 0.5);
  border-radius: 999px;
  background: rgba(20, 46, 92, 0.5);
  color: #eef4ff;
  font: 600 .54rem/1 var(--font);
  padding: 4px 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}

.pin-visibility-btn:hover {
  border-color: rgba(255, 95, 5, 0.55);
  background: rgba(28, 56, 104, 0.62);
  transform: translateY(-1px);
}

.pin-stem {
  width: 2px;
  height: 8px;
  background: rgba(255, 95, 5, 0.6);
  margin-left: 9px;
  cursor: pointer;
}

.dorphin-venue-pin.pin-focused .pin-callout {
  box-shadow: 0 0 0 2px rgba(255, 194, 123, 0.85), 0 0 18px rgba(255, 95, 5, 0.32);
}

.dorphin-venue-pin.pin-focused .pin-stem {
  box-shadow: 0 0 10px rgba(255, 95, 5, 0.7);
}

.dorphin-venue-pin.pin-focused {
  z-index: 18;
  animation: pinPulseFocus .7s ease-in-out 3;
}

.dorphin-venue-pin.pin-other .pin-stem {
  background: rgba(106, 135, 188, 0.58);
}

.dorphin-venue-pin.pin-tutorial .pin-stem {
  background: rgba(255, 215, 182, 0.92);
}

@keyframes pinDrop {
  from { opacity: 0; transform: translate(-4px, -115%); }
  to   { opacity: 1; transform: translate(-4px, -100%); }
}

@keyframes pinPulseFocus {
  0%, 100% { transform: translate(-4px, -100%) scale(1); }
  50% { transform: translate(-4px, -100%) scale(1.06); }
}

/* Speed-dating anchor button in Calendar Book */
.book-speed-btn {
  padding: 2px 7px;
  font-size: .82rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 95, 5, .3);
  background: rgba(255, 95, 5, .06);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  margin-left: 4px;
  line-height: 1.4;
  opacity: .65;
}
.book-speed-btn:hover {
  background: rgba(255, 95, 5, .18);
  border-color: var(--accent);
  opacity: 1;
  transform: scale(1.1);
}
.book-speed-btn.active {
  background: rgba(255, 95, 5, .22);
  border-color: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 95, 5, .25);
}

.book-qa-panel {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(14, 30, 60, .5);
  border: 1px solid rgba(44, 78, 138, .4);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.book-qa-input {
  background: rgba(29, 59, 107, .5);
  border: 1px solid rgba(44, 78, 138, .4);
  border-radius: 6px;
  padding: 6px 10px;
  font: .73rem/1.4 var(--font);
  color: var(--text);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.book-qa-input:focus { border-color: rgba(0, 159, 212, .5); }
.book-qa-input::placeholder { color: var(--text-dim); }

.book-qa-answer {
  font-size: .73rem;
  line-height: 1.55;
  color: var(--text);
  padding-top: 6px;
  border-top: 1px solid rgba(44, 78, 138, .3);
}

@media (max-width: 600px) {
  #dorphin-panel-overlay { width: 100%; }
}

/* ─── Agent unlock gate ─── */
#agent-unlock-gate {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px 82px 116px 16px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

#agent-unlock-gate.visible {
  opacity: 1;
  pointer-events: auto;
}

.aug-card {
  position: relative;
  width: min(220px, calc(100vw - 28px));
  background: rgba(10, 22, 48, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 95, 5, .4);
  border-radius: 12px;
  padding: 11px 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 8px 22px rgba(0,0,0,.42);
}

.aug-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--text-dim);
  cursor: pointer;
}

.aug-close:hover {
  color: var(--text);
  background: rgba(255,255,255,.14);
}

.aug-eyebrow {
  font-size: .61rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 164, 122, .92);
}

.aug-title {
  margin: 0;
  padding-right: 20px;
  font-size: .9rem;
  line-height: 1.2;
  color: var(--text);
}

.aug-desc {
  margin: 0;
  font-size: .68rem;
  line-height: 1.3;
  color: var(--text-dim);
}

.aug-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aug-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aug-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aug-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  color: var(--text);
}

.aug-check input {
  accent-color: var(--accent);
}

.aug-input {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 8px 10px;
  font-size: .76rem;
}

.aug-input::placeholder {
  color: rgba(214, 225, 241, .46);
}

.aug-note {
  margin: 0;
  font-size: .66rem;
  line-height: 1.35;
  color: rgba(214, 225, 241, .72);
}

.aug-actions {
  display: flex;
}

.aug-primary,
.aug-secondary {
  border-radius: 9px;
  padding: 8px 10px;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.aug-primary {
  border: none;
  background: var(--accent);
  color: #fff;
}

.aug-secondary {
  border: 1px solid rgba(255, 95, 5, .35);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.aug-primary:hover,
.aug-secondary:hover {
  filter: brightness(1.08);
}

@media (max-width: 600px) {
  #agent-unlock-gate {
    padding: 16px 16px 96px;
    justify-content: center;
    background: rgba(4, 10, 24, 0.18);
  }

  .aug-card {
    width: min(232px, 100%);
  }

  .aug-actions {
    width: 100%;
  }
}
