/* QINCHE_LIFE_TOOLS_TOPIC_V1_20260708 */
* {
  box-sizing: border-box;
}

:root {
  --phone-w: 393px;
  --phone-h: 852px;
  --purple: #9b7cff;
  --purple-deep: #6f4cff;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.62);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050506;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  padding: 0;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at top, rgba(74, 56, 101, 0.28), transparent 42%),
    #050506;
}

.phone {
  position: relative;
  width: min(var(--phone-w), 100vw - 28px);
  height: min(var(--phone-h), 100dvh - 28px);
  border-radius: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.66),
    inset 0 0 0 2px rgba(255, 255, 255, 0.04);
  background: #050506;
  display: flex;
  flex-direction: column;
}

.bg {
  position: absolute;
  inset: 0;
  background-image: url("./bg-qinche.jpg");
  background-size: cover;
  background-position: center top;
  transform: scale(1.02);
  filter: saturate(0.94) contrast(1.04);
  z-index: 0;
}

.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(3, 4, 8, 0.72),
      rgba(3, 4, 8, 0.22) 28%,
      rgba(3, 4, 8, 0.58) 68%,
      rgba(3, 4, 8, 0.92)
    ),
    radial-gradient(circle at 55% 28%, rgba(255, 255, 255, 0.04), transparent 34%),
    rgba(0, 0, 0, 0.18);
  z-index: 1;
  pointer-events: none;
}

.topbar,
.messages,
.voice-area,
.composer {
  position: relative;
  z-index: 2;
}

.topbar {
  z-index: 4;
  min-height: 104px;
  padding:
    calc(18px + env(safe-area-inset-top))
    18px
    10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.profile {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-link {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: block;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.profile-link:active .qinche-avatar {
  transform: scale(0.96);
}

.qinche-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 50%;
  background-image: url("./qinche-avatar.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.14s ease;
}

.profile-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 154px;
  padding-top: 1px;
}

.title-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.name {
  max-width: 96px;
  flex: 0 0 auto;
  display: block;
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: 1px;
  font-weight: 650;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.name-note {
  min-width: 0;
  max-width: 88px;
  flex: 1 1 auto;
  display: block;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.46);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  transform: translateY(-1px);
}

.status {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 10px rgba(155, 124, 255, 0.9);
}

.top-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-control {
  position: relative;
  flex: 0 0 auto;
}

.voice-output-selector {
  position: absolute;
  top: calc(100% + 10px);
  right: -1px;
  width: 132px;
  height: 36px;
  padding: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid rgba(155, 124, 255, 0.30);
  background: rgba(16, 14, 23, 0.82);
  backdrop-filter: blur(16px);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  opacity: 0;
  transform: translateY(-5px) scale(0.96);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.voice-output-selector::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 20px;
  width: 2px;
  height: 9px;
  border-radius: 999px;
  background: rgba(155, 124, 255, 0.72);
  box-shadow: 0 0 8px rgba(155, 124, 255, 0.42);
}

.voice-output-selector.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.voice-output-option {
  flex: 1 1 0;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.voice-output-option.is-active {
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, rgba(138, 102, 244, 0.82), rgba(101, 71, 188, 0.72));
  box-shadow:
    0 4px 12px rgba(55, 31, 105, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.icon-button {
  border: none;
  outline: none;
  color: white;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.round-button {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.round-button.active {
  box-shadow:
    0 0 0 1px rgba(155, 124, 255, 0.28),
    0 0 18px rgba(155, 124, 255, 0.25);
}

.round-button.off {
  opacity: 0.42;
}

.ui-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.round-button .ui-icon {
  width: 21px;
  height: 21px;
}

.camera-icon {
  width: 25px;
  height: 25px;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.messages::-webkit-scrollbar {
  width: 4px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.messages::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 124, 255, 0.46);
}

.message-block {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.message-block.bot-block {
  align-self: flex-start;
  align-items: flex-start;
}

.message-block.user-block {
  align-self: flex-end;
  align-items: flex-end;
}

.bubble {
  max-width: 100%;
  padding: 12px 15px;
  border-radius: 20px;
  line-height: 1.58;
  font-size: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.42);
}

.bubble.bot {
  background:
    linear-gradient(145deg, rgba(80, 64, 52, 0.72), rgba(20, 18, 20, 0.68));
  border-bottom-left-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.bubble.user {
  background:
    linear-gradient(145deg, rgba(42, 24, 60, 0.86), rgba(22, 18, 30, 0.86));
  border-bottom-right-radius: 7px;
  border: 1px solid rgba(155, 124, 255, 0.34);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(155, 124, 255, 0.14);
}

.bubble.loading {
  color: rgba(255, 255, 255, 0.62);
}

.bubble-image-wrap {
  margin-bottom: 8px;
  max-width: min(230px, 100%);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bubble-image {
  width: 100%;
  max-height: 280px;
  display: block;
  object-fit: cover;
}

.bubble-text:empty {
  display: none;
}

.bubble-image-wrap:last-child {
  margin-bottom: 0;
}

.bubble-quote {
  margin-bottom: 8px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 2px solid rgba(190, 171, 255, 0.65);
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  line-height: 1.45;
  text-shadow: none;
}

.bubble-quote-label {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.message-tail {
  width: 100%;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  line-height: 1;
}

.bot-block .message-tail {
  justify-content: flex-start;
}

.user-block .message-tail {
  justify-content: flex-end;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.read-check {
  display: inline-flex;
  align-items: center;
  transform: translateY(-1px);
}

.read-icon {
  width: 15px;
  height: 11px;
  display: block;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.64;
  transition: opacity 0.16s ease;
}

.message-block:hover .message-actions {
  opacity: 1;
}

.message-action {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(10, 10, 14, 0.18);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    color 0.14s ease,
    opacity 0.14s ease;
}

.message-action:hover {
  transform: translateY(-1px);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(155, 124, 255, 0.2);
}

.message-action:active {
  transform: translateY(0);
  opacity: 0.78;
}

.message-action svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message-action-play svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.message-action-delete:hover {
  background: rgba(255, 92, 92, 0.18);
  color: rgba(255, 190, 190, 0.96);
}

.message-action-favorite.is-favorite {
  color: rgba(255, 172, 210, 0.98);
  background: rgba(255, 114, 178, 0.15);
}

.message-action-favorite.is-favorite svg path {
  fill: currentColor;
  stroke: currentColor;
}

.voice-area {
  min-height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 18px 5px;
}

audio {
  display: none;
}

.voice-status {
  min-height: 24px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  letter-spacing: 1px;
  backdrop-filter: blur(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.voice-status.hidden {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.voice-status.is-clickable {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(155, 124, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(155, 124, 255, 0.16),
    0 0 18px rgba(155, 124, 255, 0.18);
}

.composer {
  margin: 0 18px;
  padding-bottom: env(safe-area-inset-bottom);
}

.quote-preview {
  min-height: 39px;
  margin-bottom: 7px;
  padding: 8px 9px 8px 12px;
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 8px;
  border-radius: 18px;
  background: rgba(248, 248, 252, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  color: rgba(30, 30, 36, 0.56);
  backdrop-filter: blur(18px);
}

.quote-preview.hidden {
  display: none;
}

.quote-preview-text {
  min-width: 0;
}

.quote-preview-label {
  margin-right: 6px;
  color: rgba(30, 30, 36, 0.38);
  font-size: 12px;
}

.quote-preview-content {
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clear-quote-button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(30, 30, 36, 0.08);
  color: rgba(30, 30, 36, 0.42);
  font-size: 22px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.image-preview {
  min-height: 72px;
  margin-bottom: 7px;
  padding: 8px 9px 8px 8px;
  display: grid;
  grid-template-columns: 1fr 30px;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  background: rgba(248, 248, 252, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  color: rgba(30, 30, 36, 0.7);
  backdrop-filter: blur(18px);
}

.image-preview.hidden {
  display: none;
}

.image-preview-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.image-preview-img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  border-radius: 15px;
  background: rgba(30, 30, 36, 0.1);
}

.image-preview-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.image-preview-name {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.image-preview-size {
  font-size: 12px;
  color: rgba(30, 30, 36, 0.42);
}

.clear-image-button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(30, 30, 36, 0.08);
  color: rgba(30, 30, 36, 0.42);
  font-size: 23px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.input-row {
  min-height: 64px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 42px 1fr 66px;
  align-items: end;
  gap: 8px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(35, 35, 38, 0.78), rgba(14, 14, 16, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.camera-button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--purple);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#messageInput {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  max-height: 132px;
  padding: 10px 0;
  border: none;
  outline: none;
  resize: none;
  overflow-y: hidden;
  background: transparent;
  color: white;
  font-size: 16px;
  line-height: 22px;
}

#messageInput::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.send-button {
  height: 42px;
  border: none;
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(150, 116, 255, 0.98), rgba(94, 63, 205, 0.98));
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  -webkit-tap-highlight-color: transparent;
}

.send-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.loading-block {
  max-width: 82%;
  align-self: flex-start;
}

.topic-divider {
  width: 100%;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  letter-spacing: 2px;
  user-select: none;
}

.topic-divider::before,
.topic-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 96px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.topic-divider span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}



.call-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.94);
  background: #050506;
}

.call-overlay.hidden {
  display: none;
}

.call-bg,
.call-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.call-bg {
  z-index: 0;
  background-image: url("./bg-qinche.jpg");
  background-size: cover;
  background-position: center top;
  filter: blur(7px) saturate(0.85) brightness(0.58);
  transform: scale(1.07);
}

.call-shade {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 30%, rgba(155, 124, 255, 0.18), transparent 34%),
    linear-gradient(to bottom, rgba(2, 3, 7, 0.68), rgba(2, 3, 7, 0.48) 38%, rgba(2, 3, 7, 0.9));
}

.call-cc-button {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  right: 18px;
  z-index: 3;
  min-width: 42px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.44);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(14px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.call-cc-button.is-on {
  color: rgba(255, 255, 255, 0.96);
  border-color: rgba(181, 154, 255, 0.64);
  background: linear-gradient(135deg, rgba(150, 111, 244, 0.90), rgba(91, 63, 177, 0.86));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(155, 124, 255, 0.28);
}

.call-center {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  padding: calc(78px + env(safe-area-inset-top)) 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: padding 0.2s ease;
}

.call-portrait-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.call-name {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 720;
  letter-spacing: 1px;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.7);
}

.call-timer {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  letter-spacing: 0.6px;
}

.call-avatar-ring {
  margin-top: 52px;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(155, 124, 255, 0.26), rgba(155, 124, 255, 0.02) 68%, transparent 72%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 48px rgba(155, 124, 255, 0.18);
  animation: callPulse 2.4s ease-in-out infinite;
}

.call-avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background-image: url("./qinche-avatar.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.call-overlay.is-recording .call-avatar-ring {
  animation-duration: 1.1s;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 64px rgba(155, 124, 255, 0.38);
}

.call-mode-tabs {
  margin-top: 28px;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
}

.call-mode-button {
  min-width: 76px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.call-mode-button.is-active {
  color: rgba(255, 255, 255, 0.94);
  background: linear-gradient(135deg, rgba(155, 124, 255, 0.82), rgba(85, 60, 166, 0.72));
  box-shadow: 0 0 18px rgba(155, 124, 255, 0.18);
}

.call-overlay.is-fast-mode .call-avatar-ring {
  animation-duration: 1.45s;
}

.call-status {
  margin-top: 18px;
  min-height: 22px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  letter-spacing: 0.7px;
}

.call-transcript-view {
  width: 100%;
  flex: 1;
  min-height: 0;
  margin-top: 30px;
  padding: 6px 2px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  text-align: left;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 24px), transparent 100%);
}

.call-transcript-view::-webkit-scrollbar {
  display: none;
}

.call-transcript-view.hidden {
  display: none;
}

.call-transcript-entry {
  margin: 0 0 22px;
  padding: 0;
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: break-word;
  text-wrap: pretty;
}

.call-transcript-entry.is-user {
  color: rgba(255, 255, 255, 0.46);
  font-weight: 520;
}

.call-transcript-entry.is-assistant {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 650;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.46);
}

.call-overlay.is-subtitle-view .call-shade {
  background:
    linear-gradient(to bottom, rgba(7, 6, 12, 0.80), rgba(7, 6, 12, 0.72) 36%, rgba(3, 4, 8, 0.92)),
    radial-gradient(circle at 50% 20%, rgba(155, 124, 255, 0.12), transparent 38%);
}

.call-overlay.is-subtitle-view .call-center {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding:
    calc(70px + env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    calc(116px + env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

.call-overlay.is-subtitle-view .call-name,
.call-overlay.is-subtitle-view .call-timer {
  align-self: center;
  text-align: center;
}

.call-overlay.is-subtitle-view .call-name {
  font-size: 26px;
  letter-spacing: 0.8px;
}

.call-overlay.is-subtitle-view .call-timer {
  margin-top: 6px;
}


.call-overlay.is-subtitle-view .call-transcript-view {
  position: absolute;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  top: calc(204px + env(safe-area-inset-top));
  bottom: calc(116px + env(safe-area-inset-bottom));
  width: auto;
  flex: none;
  margin: 0;
  padding: 6px 0 28px;
}

.call-overlay.is-subtitle-view .call-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
}
.call-overlay.is-subtitle-view .call-portrait-view {
  display: none;
}

.call-controls {
  position: relative;
  z-index: 2;
  padding: 20px 28px calc(26px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 18px;
}

.call-mic-button {
  height: 68px;
  border: none;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(145deg, rgba(48, 39, 64, 0.84), rgba(18, 18, 23, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.call-mic-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.call-mic-button.is-recording {
  background:
    linear-gradient(145deg, rgba(155, 124, 255, 0.92), rgba(87, 61, 190, 0.92));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(155, 124, 255, 0.22);
}

.call-overlay.is-fast-mode .call-mic-button.is-recording {
  background:
    linear-gradient(145deg, rgba(118, 89, 255, 0.96), rgba(52, 43, 92, 0.94));
}

.call-overlay.is-fast-mode .call-mic-icon {
  color: rgba(255, 255, 255, 0.96);
  background: rgba(155, 124, 255, 0.24);
}

.call-mic-icon {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.call-mic-button strong {
  align-self: end;
  font-size: 16px;
  line-height: 1.1;
}

.call-mic-button em {
  align-self: start;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.46);
  font-style: normal;
  font-size: 12px;
}

.call-hangup-button {
  width: 82px;
  height: 68px;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.94);
  background: linear-gradient(145deg, rgba(255, 78, 78, 0.96), rgba(178, 35, 45, 0.96));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.call-hangup-button span {
  font-size: 15px;
  font-weight: 700;
}

@keyframes callPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.045);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .topbar {
    min-height: 104px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile-text {
    max-width: calc(100vw - 286px);
  }


  .name {
    max-width: 96px;
  }

  .name-note {
    max-width: 88px;
  }

  .messages {
    padding-left: 16px;
    padding-right: 16px;
  }

  .composer {
    margin-left: 14px;
    margin-right: 14px;
  }

  .message-action {
    width: 24px;
    height: 24px;
  }
}

/* QINCHE_SECOND_BATCH_V1: press-to-talk and typewriter polish */
.send-button,
.send-button *,
.call-mic-button,
.call-mic-button * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.send-button {
  min-width: 66px;
  display: inline-grid;
  place-items: center;
  touch-action: manipulation;
}

.send-button.mic-mode {
  width: 42px;
  min-width: 42px;
  justify-self: end;
  border-radius: 50%;
  padding: 0;
  font-size: 0;
  touch-action: none;
}

.send-button.mic-mode svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send-button.is-recording {
  width: 66px;
  min-width: 66px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0;
  background: linear-gradient(145deg, rgba(189, 153, 255, 0.98), rgba(111, 76, 255, 0.98));
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(155, 124, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.send-button.is-recognizing {
  width: 66px;
  min-width: 66px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0;
  opacity: 0.78;
}

.composer.is-compose-recording #messageInput::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

/* QINCHE_MESSAGE_MANAGE_V1: delete menu, selection mode, jump highlight */
.message-block {
  position: relative;
}

.messages.is-selecting .message-block {
  margin-left: 30px;
  transition: margin-left 0.16s ease;
}

.select-circle {
  position: absolute;
  left: -30px;
  top: 12px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(10, 10, 14, 0.42);
  color: white;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}

.select-circle.is-selected {
  border-color: rgba(169, 135, 255, 0.9);
  background: linear-gradient(145deg, rgba(169, 135, 255, 0.92), rgba(111, 76, 255, 0.88));
  box-shadow: 0 0 18px rgba(155, 124, 255, 0.26);
}

.message-block.is-jump-highlight .bubble {
  animation: qincheJumpGlow 1.4s ease-in-out 1;
}

@keyframes qincheJumpGlow {
  0%, 100% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  }
  35% {
    box-shadow:
      0 0 0 1px rgba(169, 135, 255, 0.52),
      0 0 28px rgba(169, 135, 255, 0.34),
      0 14px 32px rgba(0, 0, 0, 0.28);
  }
}

.delete-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 28;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px);
}

.delete-sheet-backdrop.hidden,
.delete-sheet.hidden,
.delete-selection-bar.hidden {
  display: none;
}

.delete-sheet {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 29;
  padding: 10px;
  border-radius: 24px;
  background: rgba(14, 14, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(22px);
}

.delete-sheet-title {
  padding: 7px 9px 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-align: center;
}

.delete-sheet-button {
  width: 100%;
  min-height: 43px;
  margin-top: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.delete-sheet-button.is-danger {
  color: rgba(255, 204, 204, 0.96);
  background: rgba(255, 92, 92, 0.10);
  border-color: rgba(255, 120, 120, 0.16);
}

.delete-sheet-button.is-cancel {
  margin-top: 10px;
  color: rgba(222, 209, 255, 0.94);
  background: rgba(169, 135, 255, 0.13);
}

.delete-selection-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 24;
  min-height: 48px;
  padding: 7px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 74px 1fr 94px;
  align-items: center;
  gap: 8px;
  background: rgba(12, 12, 18, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.delete-selection-bar button {
  height: 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.selection-cancel-button {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.selection-count {
  min-width: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selection-delete-button {
  color: white;
  background: linear-gradient(145deg, rgba(255, 118, 118, 0.94), rgba(180, 64, 92, 0.92));
}

.selection-delete-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 高级端到端电话：独立通话质感，只影响电话页高级模式 */
.call-overlay.is-fast-mode {
  color: rgba(255, 255, 255, 0.94);
  background:
    radial-gradient(circle at 22% 12%, rgba(255, 210, 233, 0.26), transparent 38%),
    radial-gradient(circle at 82% 8%, rgba(190, 225, 255, 0.26), transparent 42%),
    #07070a;
}

.call-overlay.is-fast-mode .call-bg {
  filter: blur(16px) saturate(0.82) brightness(0.86);
  transform: scale(1.13);
  opacity: 0.82;
}

.call-overlay.is-fast-mode .call-shade {
  background:
    linear-gradient(to bottom, rgba(255, 236, 248, 0.14), rgba(188, 223, 255, 0.08) 34%, rgba(2, 3, 8, 0.82) 78%, rgba(2, 3, 8, 0.96)),
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.14), transparent 28%);
}

.call-overlay.is-fast-mode .call-name {
  margin-top: 4px;
  font-size: 34px;
  letter-spacing: 1.8px;
}

.call-overlay.is-fast-mode .call-avatar-ring {
  width: 172px;
  height: 172px;
  margin-top: 46px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(155, 124, 255, 0.12) 58%, rgba(155, 124, 255, 0.02) 72%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 64px rgba(155, 124, 255, 0.18),
    inset 0 0 36px rgba(255, 255, 255, 0.04);
}

.call-overlay.is-fast-mode .call-avatar {
  width: 126px;
  height: 126px;
  border: 5px solid rgba(255, 255, 255, 0.84);
}

.call-overlay.is-fast-mode .call-status {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
}

.call-overlay.is-fast-mode.is-subtitle-view .call-shade {
  background:
    linear-gradient(to bottom, rgba(18, 16, 28, 0.76), rgba(11, 12, 20, 0.72) 38%, rgba(3, 4, 8, 0.94)),
    radial-gradient(circle at 50% 18%, rgba(181, 154, 255, 0.16), transparent 42%);
}

.call-overlay.is-fast-mode .call-controls {
  grid-template-columns: 82px 1fr;
  gap: 20px;
}

.call-overlay.is-fast-mode .call-mic-button {
  min-height: 68px;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.14);
}

.call-overlay.is-fast-mode .call-mic-button.is-recording {
  background:
    linear-gradient(145deg, rgba(112, 76, 255, 0.88), rgba(57, 44, 88, 0.88));
}

/* 高级模式进入全屏字幕时，沿用字幕页的紧凑标题尺寸。 */
.call-overlay.is-fast-mode.is-subtitle-view .call-name {
  margin-top: 0;
  font-size: 26px;
  letter-spacing: 0.8px;
}
