﻿


	/* chat */
    #chat-content { position:relative; z-index:1; display:flex; flex-direction:column; height:100%;}
    #chat-loading-state {
      position: absolute;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.78);
      color: #0f172a;
      font-size: 16px;
      font-weight: 700;
      letter-spacing: 0.02em;
      z-index: 8;
      pointer-events: none;
    }
    #chat-content.chat-panel-loading #chat-loading-state {
      display: flex;
    }
#chat-content.chat-panel-loading #chat-story-header-host,
#chat-content.chat-panel-loading #chat-session-header-host,
#chat-content.chat-panel-loading #chat-credit-header-host,
#chat-content.chat-panel-loading #chat-chat,
#chat-content.chat-panel-loading #chat-action-balloon-layer,
#chat-content.chat-panel-loading #chat-attachment-tray,
#chat-content.chat-panel-loading #inputBar {
      visibility: hidden;
    }
    #chat-panel {
      position: relative;
      overflow: hidden;
    }
    #chat-panel.chat-unsafe-tail-active::after {
      content: "";
      position: absolute;
      inset: 0;
      border: 4px solid rgba(255, 30, 30, 0.95);
      box-sizing: border-box;
      pointer-events: none;
      z-index: 9;
      box-shadow:
        inset 0 0 0 2px rgba(255, 80, 80, 0.95),
        inset 0 0 24px rgba(255, 50, 50, 0.75),
        inset 0 0 44px rgba(255, 0, 0, 0.45);
      animation: chat-unsafe-tail-inner-pulse 1.05s ease-in-out infinite;
    }
    @keyframes chat-unsafe-tail-inner-pulse {
      0% {
        border-color: rgba(255, 30, 30, 0.90);
        box-shadow:
          inset 0 0 0 2px rgba(255, 80, 80, 0.85),
          inset 0 0 16px rgba(255, 50, 50, 0.55),
          inset 0 0 30px rgba(255, 0, 0, 0.35);
      }
      50% {
        border-color: rgba(255, 0, 0, 1);
        box-shadow:
          inset 0 0 0 3px rgba(255, 95, 95, 1),
          inset 0 0 30px rgba(255, 40, 40, 0.9),
          inset 0 0 56px rgba(255, 0, 0, 0.6);
      }
      100% {
        border-color: rgba(255, 30, 30, 0.90);
        box-shadow:
          inset 0 0 0 2px rgba(255, 80, 80, 0.85),
          inset 0 0 16px rgba(255, 50, 50, 0.55),
          inset 0 0 30px rgba(255, 0, 0, 0.35);
      }
    }
    #chat-header {
      gap: 10px;
    }
    .panel-header-chat {
      padding: 10px 12px;
    }
    #chat-header-identity {
      flex: 1 1 auto;
      min-width: 0;
      display:flex;
      align-items:center;
      justify-content:flex-start;
      gap: 8px;
    }
    #chat-header-media {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      position: relative;
      overflow: hidden;
      border: 2px solid rgba(255,255,255,0.6);
      background: rgba(0,0,0,0.24);
      box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    }
    .chat-header-media-placeholder {
      position: absolute;
      inset: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, #d1d5db 0%, #e5e7eb 50%, #d1d5db 100%);
      background-size: 220% 100%;
      animation: chatHeaderAvatarPulse 1.15s ease-in-out infinite;
      display: none;
    }
    #chat-header-media.is-loading .chat-header-media-placeholder {
      display: block;
    }
    #chat-header-media-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    #chat-header-media.is-loading #chat-header-media-image {
      display: none;
    }
    @keyframes chatHeaderAvatarPulse {
      0% { background-position: 100% 0; }
      100% { background-position: -100% 0; }
    }
    #chat-header-badge {
      min-width: 0;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
      padding: 4px 8px;
      border-radius: 10px;
      background: rgba(255,255,255,0.22);
      border: 1px solid rgba(255,255,255,0.28);
      max-width: 220px;
      overflow: hidden;
      isolation: isolate;
    }
    #chat-header-badge::after {
      content: "";
      position: absolute;
      inset: -2px;
      padding: 2px;
      border-radius: inherit;
      background:
        conic-gradient(
          from 0deg,
          transparent 0deg 285deg,
          rgba(255,255,255,0.0) 286deg,
          rgba(255,255,255,0.98) 320deg,
          rgba(255,240,170,0.98) 338deg,
          transparent 360deg
        );
      pointer-events: none;
      opacity: 0;
      transform: rotate(0deg);
      z-index: 2;
      -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
    }
    #chat-header-badge.chat-header-badge-flash::after {
      animation: chatHeaderBadgeFlash 1600ms ease-out forwards;
    }
    #chat-header-badge.chat-header-badge-flash {
      box-shadow:
        0 0 0 2px rgba(255, 245, 190, 0.95),
        0 0 18px rgba(255, 230, 120, 0.68),
        0 0 34px rgba(255, 180, 70, 0.45);
      background: rgba(255, 240, 170, 0.24);
    }
    @keyframes chatHeaderBadgeFlash {
      0% {
        opacity: 0;
        transform: rotate(-16deg) scale(0.97);
      }
      12% {
        opacity: 1;
      }
      48% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: rotate(362deg) scale(1.03);
      }
    }
    #titleText {
      display: block;
      font-size: 12px;
      line-height: 1.1;
      text-align: left;
      color: #fff;
      background: transparent;
      border: none;
      border-radius: 0;
      padding: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-weight: 700;
      width: 100%;
    }
    .chat-header-badge-row {
      display: flex;
      align-items: center;
      gap: 5px;
      max-width: 100%;
      min-width: 0;
    }
    .chat-model-tier-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 16px;
      max-width: 84px;
      padding: 1px 6px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.30);
      background: rgba(15, 23, 42, 0.22);
      color: rgba(255,255,255,0.92);
      font-size: 10px;
      font-weight: 800;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #chat-header-actions {
      flex: 0 0 auto;
      min-width: 0;
      display:flex;
      align-items:center;
      justify-content:flex-end;
      flex-wrap: nowrap;
      gap: 6px;
    }
    #chat-header .btn-panel-header {
      float: none;
      margin-left: 0;
    }
    .chat-more-options-wrap {
      position: relative;
      display: inline-flex;
      align-items: center;
    }
    .chat-more-options-menu {
      position: absolute;
      top: calc(100% + 4px);
      right: 0;
      min-width: 170px;
      background: #ffffff;
      border: 1px solid #d1d5db;
      border-radius: 8px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
      padding: 4px;
      z-index: 20;
    }
    .chat-more-options-item {
      width: 100%;
      border: none;
      background: transparent;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 8px;
      text-align: left;
      padding: 8px 10px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
    }
    .chat-more-options-item:hover {
      background: #eef2f7;
    }
    .chat-more-options-icon {
      width: 16px;
      text-align: center;
      flex: 0 0 16px;
    }
    .chat-hearts-meter {
      display: block;
      margin-left: 0;
      margin-right: 0;
      padding: 0;
      border-radius: 0;
      background: transparent;
      border: none;
      font-size: 11px;
      font-weight: 700;
      vertical-align: middle;
      line-height: 1.1;
      text-align: left;
    }
    #chat-story-header-host {
      --story-header-bg: rgba(255,255,255,0.9);
      --story-header-border: #d8e5e1;
      --story-header-title-color: #0f172a;
      --story-header-progress-color: #334155;
      --story-header-track-bg: #dbeafe;
      --story-header-track-border: #bfdbfe;
      --story-header-bar-bg: linear-gradient(90deg, #22c55e, #06b6d4);
    }
    #chat-session-header-host {
      --session-header-bg: rgba(255,255,255,0.9);
      --session-header-border: #d8e5e1;
      --session-header-title-color: #0f172a;
      --session-header-progress-color: #334155;
      --session-header-track-bg: #fef3c7;
      --session-header-track-border: #fde68a;
      --session-header-bar-bg: linear-gradient(90deg, #f59e0b, #22c55e);
    }
    #chat-credit-header-host {
      display: none;
      border-bottom: 1px solid #fecaca;
      background: rgba(254, 242, 242, 0.96);
      color: #7f1d1d;
    }
    #chat-credit-header-host.is-active {
      display: block;
    }
    .chat-credit-header {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      padding: 8px 11px;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.25;
    }
    .chat-credit-header-icon {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      background: #fee2e2;
      color: #991b1b;
      border: 1px solid #fecaca;
      font-size: 14px;
    }
    .chat-credit-header-text {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    @media (hover: none), (pointer: coarse), (max-width: 699px) {
      .chat-credit-header {
        min-height: 44px;
        padding: 9px 12px;
        font-size: 13px;
      }
      .chat-credit-header-icon {
        width: 28px;
        height: 28px;
      }
    }
    .session-header {
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 8px 10px;
      border-bottom: 1px solid var(--session-header-border);
      background: var(--session-header-bg);
      color: var(--session-header-title-color);
    }
    .session-header-row {
      display: flex;
      align-items: center;
      min-width: 0;
    }
    .session-header-row-title {
      gap: 8px;
    }
    .session-header-row-meta {
      gap: 8px;
    }
    .session-header-title {
      flex: 1 1 auto;
      min-width: 0;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: pointer;
    }
    .session-header-progress {
      flex: 1 1 auto;
      min-width: 0;
      font-size: 11px;
      font-weight: 600;
      color: var(--session-header-progress-color);
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .session-header-row-bar {
      width: 100%;
    }
    .session-header-progress-track {
      width: 100%;
      height: 4px;
      border-radius: 999px;
      border: 1px solid var(--session-header-track-border);
      background: var(--session-header-track-bg);
      overflow: hidden;
    }
    .session-header-progress-bar {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: var(--session-header-bar-bg);
      transition: width 180ms ease;
    }
    .session-header-actions {
      display: flex;
      gap: 4px;
      margin-left: auto;
      flex: 0 0 auto;
    }
    .session-header-detail-btn,
    .session-header-exit-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 7px;
      border: 1px solid rgba(148,163,184,0.55);
      background: #ffffff;
      color: #334155;
      font-size: 13px;
      line-height: 1;
      cursor: pointer;
    }
    .session-header-detail-btn:hover {
      background: #e2e8f0;
      color: #0f172a;
      border-color: #cbd5e1;
    }
    .session-header-exit-btn:hover {
      background: #fee2e2;
      color: #991b1b;
      border-color: #fecaca;
    }
    @media (hover: none), (pointer: coarse), (max-width: 699px) {
      .session-header {
        padding: 9px 11px;
      }

      .session-header-detail-btn,
      .session-header-exit-btn {
        width: 29px;
        height: 29px;
        border-radius: 8px;
        font-size: 15px;
      }
    }
    #chat-chat {
      flex:1;
      overflow:auto;
      padding:16px;
      display:flex;
      flex-direction:column;
      gap:10px;
    }
    #chat-action-balloon-layer {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 74px;
      height: 160px;
      z-index: 7;
      pointer-events: none;
      overflow: visible;
    }
    .chat-action-balloon {
      position: absolute;
      left: 50%;
      bottom: 0;
      transform: translate3d(calc(-50% + var(--balloon-x-start, 0px)), 14px, 0) scale(0.82);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      max-width: min(220px, calc(100vw - 48px));
      min-height: 34px;
      padding: 7px 10px;
      border-radius: 999px;
      background: rgba(17, 24, 39, 0.78);
      border: 1px solid rgba(255, 255, 255, 0.24);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
      opacity: 0;
      animation: chatActionBalloonRise 2400ms cubic-bezier(0.18, 0.78, 0.2, 1) forwards;
      animation-delay: var(--balloon-delay, 0ms);
      will-change: transform, opacity;
    }
    .chat-action-balloon-icon {
      font-size: 16px;
      line-height: 1;
    }
    .chat-action-balloon-label {
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .chat-action-balloon-success {
      background: rgba(21, 128, 61, 0.86);
      border-color: rgba(187, 247, 208, 0.52);
    }
    .chat-action-balloon-memory {
      background: rgba(67, 56, 202, 0.84);
      border-color: rgba(199, 210, 254, 0.46);
    }
    .chat-action-balloon-reminder {
      background: rgba(14, 116, 144, 0.86);
      border-color: rgba(165, 243, 252, 0.48);
    }
    .chat-action-balloon-web {
      background: rgba(3, 105, 161, 0.86);
      border-color: rgba(186, 230, 253, 0.48);
    }
    .chat-action-balloon-media {
      background: rgba(147, 51, 234, 0.84);
      border-color: rgba(233, 213, 255, 0.48);
    }
    .chat-action-balloon-warning {
      background: rgba(180, 83, 9, 0.9);
      border-color: rgba(254, 215, 170, 0.54);
    }
    @keyframes chatActionBalloonEnter {
      from {
        opacity: 0;
        transform: translate3d(calc(-50% + var(--balloon-x-start, 0px)), 14px, 0) scale(0.82);
      }
      to {
        opacity: 1;
        transform: translate3d(calc(-50% + var(--balloon-x-end, 0px)), -54px, 0) scale(1);
      }
    }
    @keyframes chatActionBalloonRise {
      0% {
        opacity: 0;
        transform: translate3d(calc(-50% + var(--balloon-x-start, 0px)), 18px, 0) scale(0.78);
      }
      12% {
        opacity: 1;
      }
      70% {
        opacity: 1;
        transform: translate3d(calc(-50% + var(--balloon-x-end, 0px)), -92px, 0) scale(1);
      }
      100% {
        opacity: 0;
        transform: translate3d(calc(-50% + var(--balloon-x-end, 0px)), -138px, 0) scale(0.96);
      }
    }
    @media (max-width: 699px) {
      #chat-action-balloon-layer {
        bottom: 68px;
        height: 148px;
      }
      .chat-action-balloon {
        min-height: 32px;
        padding: 7px 9px;
        font-size: 11px;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .chat-action-balloon {
        animation: chatActionBalloonFade 1800ms ease-out forwards;
      }
      @keyframes chatActionBalloonFade {
        0% {
          opacity: 0;
          transform: translate3d(-50%, 0, 0) scale(0.96);
        }
        12%,
        80% {
          opacity: 1;
        }
        100% {
          opacity: 0;
          transform: translate3d(-50%, 0, 0) scale(0.96);
        }
      }
    }
    .msg-container { max-width:70%; display: flex; flex-direction: column; align-self: flex-end; }
    .msg-container.chat-date-divider-container {
      align-self: center;
      max-width: 82%;
      width: auto;
      pointer-events: none;
    }
    .msg-container.bot { align-self: flex-start; }
    .msg-container.story {
      align-self: center;
      max-width: 88%;
      width: auto;
      align-items: center;
    }
    .msg-actions {
      display: flex;
      gap: 5px;
      margin-top: 4px;
      align-self: flex-end;
      justify-content: flex-end;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.2s;
    }
    .msg-container.msg-container-actions-active .msg-actions {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    .msg-actions[aria-hidden="true"] .panel-action-button,
    .msg-actions .panel-action-button:disabled {
      pointer-events: none;
    }
	
	
	
	
    .msg {
      padding:8px 12px;
      border-radius:15px 15px 2px 15px;
      background:#dcf8c6;
      position: relative;
      user-select: text;
      -webkit-user-select: text;
      overflow-wrap: anywhere;
    }
    .msg-stream-content:empty,
    .msg-stream-web:empty {
      display: none;
    }
    .msg.chat-date-divider {
      align-self: center;
      max-width: 82%;
      padding: 4px 10px;
      margin: 3px auto;
      border-radius: 999px;
      background: rgba(255,255,255,0.78);
      border: 1px solid rgba(148,163,184,0.24);
      color: rgba(51,65,85,0.86);
      box-shadow: 0 2px 8px rgba(15,23,42,0.08);
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
      text-align: center;
      user-select: none;
      -webkit-user-select: none;
      pointer-events: none;
    }
    .bot .msg { background:#fff; border:1px solid #eee; border-radius:15px 15px 15px 2px;}
    .msg-time {
      margin-top: 4px;
      text-align: right;
      color: rgba(15, 23, 42, 0.52);
      font-size: 10px;
      font-weight: 600;
      line-height: 1;
      user-select: none;
      -webkit-user-select: none;
      white-space: nowrap;
    }
    .bot .msg-time {
      color: rgba(71, 85, 105, 0.58);
    }
    .story .msg-time {
      color: rgba(255,255,255,0.54);
    }
    .chat-safety-tag-row,
    .chat-sensitive-tag-row {
      display: flex;
      justify-content: flex-end;
      margin-top: 6px;
      max-width: 100%;
    }
    .chat-safety-tag,
    .chat-sensitive-tag {
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      min-height: 18px;
      padding: 2px 7px;
      border: 1px solid rgba(185, 28, 28, 0.18);
      border-radius: 999px;
      background: rgba(254, 226, 226, 0.72);
      color: #991b1b;
      font-size: 10px;
      font-weight: 800;
      line-height: 1.2;
      overflow-wrap: anywhere;
    }
    .chat-safety-tag.is-blocked {
      background: rgba(255, 255, 255, 0.74);
    }
    .optimistic-user-msg .msg { opacity: 0.92; }
    .optimistic-user-msg.optimistic-failed .msg {
      background: #fee2e2;
      color: #7f1d1d;
    }
    .chat-msg-send-status {
      align-self: flex-end;
      margin-top: 3px;
      padding-right: 4px;
      color: rgba(15, 23, 42, 0.58);
      font-size: 11px;
      line-height: 1.2;
      max-width: 100%;
      white-space: normal;
      text-align: right;
      overflow-wrap: anywhere;
    }
    .optimistic-user-msg.optimistic-failed .chat-msg-send-status {
      color: #b91c1c;
      font-weight: 600;
    }
    .chat-failed-draft-detail {
      align-self: flex-end;
      max-width: 100%;
      margin-top: 3px;
      padding-right: 4px;
      color: rgba(127, 29, 29, 0.72);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.25;
      text-align: right;
      overflow-wrap: anywhere;
    }
    .chat-failed-draft-actions {
      align-self: flex-end;
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 5px;
      margin-top: 6px;
      max-width: 100%;
    }
    .chat-failed-draft-action {
      min-height: 24px;
      padding: 3px 9px;
      border: 1px solid rgba(185, 28, 28, 0.20);
      border-radius: 999px;
      background: rgba(255,255,255,0.88);
      color: #991b1b;
      font-size: 11px;
      font-weight: 800;
      line-height: 1.2;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(127, 29, 29, 0.08);
    }
    .chat-failed-draft-action.primary {
      background: #b91c1c;
      border-color: #b91c1c;
      color: #fff;
    }
    .chat-failed-draft-action:hover {
      filter: brightness(0.98);
      transform: translateY(-1px);
    }
    .story .msg.story-msg {
      background: rgba(15,23,42,0.82);
      color: #fff;
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 12px;
      font-size: 12px;
      line-height: 1.3;
      text-align: center;
      box-shadow: 0 6px 18px rgba(0,0,0,0.18);
      max-width: 100%;
    }

    .story-chat-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 6px 4px;
    }
    .story-chat-card-header {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 4px;
    }
    .story-chat-card-icon {
      width: 22px;
      height: 22px;
      border-radius: 5px;
      flex-shrink: 0;
    }
    .story-chat-card-icon-sm {
      width: 20px;
      height: 20px;
      border-radius: 5px;
    }
    .story-chat-card-event {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.50);
    }
    .story-chat-card-label {
      font-size: 9px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(165,180,252,0.8);
    }
    .story-chat-card-chapter-title {
      font-size: 15px;
      font-weight: 700;
      color: #e0e7ff;
      line-height: 1.2;
    }
    .story-chat-card-quest-title {
      font-size: 13px;
      font-weight: 600;
      color: #c4b5fd;
      line-height: 1.2;
    }
    .story-chat-card-desc {
      font-size: 11px;
      color: rgba(255,255,255,0.60);
      line-height: 1.35;
      max-width: 280px;
      margin-top: 2px;
    }
    .story-chat-card-sep {
      width: 40px;
      height: 1px;
      background: rgba(255,255,255,0.12);
      margin: 6px 0;
    }

    .msg-actions .panel-action-button {
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 4px 10px rgba(15, 23, 42, 0.18);
    }
    .msg-actions .panel-action-button.is-active {
      outline: 2px solid rgba(255,255,255,0.82);
      outline-offset: 1px;
      filter: saturate(1.15) brightness(1.08);
    }
	
    .edit-input { outline: 2px solid #7fd6a7; background: #eafaf1; border: none;}
    .edit-actions { display: flex; gap: 5px; margin-top: 5px; }
	
    .save-btn, .cancel-btn { padding: 4px 8px; border: none; border-radius: 5px; font-size: 12px; cursor: pointer; }
    .em-act { color: #888; font-style: italic; opacity: 0.85; }
    .save-btn { background: #25d366; color: white; }
    .cancel-btn { background: #ccc; color: #333; }
.popup-msg { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; padding: 12px 28px; border-radius: 20px; box-shadow: 0 2px 16px #0003; z-index: 9999; font-weight: bold; font-size: 16px; transition: opacity 0.5s; opacity: 1; min-width: 200px; text-align: center;}
.popup-msg.info { background: #25d366; }
/* Deprecated: red popup errors have no action buttons. Use confirmDialog with type:'negative'. */
.popup-msg.error { background: #ff5555; }
    .chat-attachment-tray {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 8px 10px;
      border-top: 1px solid #eee;
      background: rgba(255,255,255,0.85);
    }
    .chat-attachment-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      max-width: 100%;
      background: #eef4ff;
      border: 1px solid #d6e2ff;
      color: #1e3a5f;
      border-radius: 12px;
      padding: 4px 8px;
      font-size: 12px;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
    }
    .chat-attachment-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 6px;
      max-width: 100%;
    }
    .chat-attachment-chip-sent {
      background: rgba(248, 250, 252, 0.92);
      border-color: rgba(148, 163, 184, 0.42);
      color: #1f2937;
    }
    .chat-attachment-chip:hover {
      filter: brightness(0.98);
      border-color: rgba(59, 130, 246, 0.45);
    }
    .chat-attachment-chip-name {
      max-width: 220px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .chat-attachment-chip-remove {
      border: none;
      background: transparent;
      color: #335;
      cursor: pointer;
      font-size: 12px;
      line-height: 1;
      padding: 0;
    }
    .chat-attachment-preview-overlay {
      position: absolute;
      inset: 0;
      z-index: 80;
      display: flex;
      align-items: stretch;
      justify-content: stretch;
      background: rgba(2, 6, 23, 0.78);
    }
    .chat-attachment-preview-panel {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      background: #0f172a;
      color: #fff;
    }
    .chat-attachment-preview-header {
      flex: 0 0 auto;
      min-height: 52px;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-bottom: 1px solid rgba(255,255,255,0.16);
      background: rgba(15, 23, 42, 0.96);
    }
    .chat-attachment-preview-title {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 700;
    }
    .chat-attachment-preview-close {
      flex: 0 0 auto;
      width: 36px;
      height: 36px;
      border: 1px solid rgba(254, 205, 211, 0.42);
      border-radius: 10px;
      background: rgba(190, 24, 93, 0.90);
      color: #fff;
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
    }
    .chat-attachment-preview-stage {
      flex: 1 1 auto;
      min-height: 0;
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      touch-action: none;
      background: #020617;
    }
    .chat-attachment-preview-stage.audio-preview-stage {
      padding: 22px;
      touch-action: auto;
    }
    .chat-attachment-preview-loading,
    .chat-attachment-preview-fallback {
      color: rgba(255,255,255,0.84);
      font-size: 13px;
      font-weight: 600;
      text-align: center;
      padding: 18px;
    }
    .chat-attachment-preview-content {
      max-width: 100%;
      max-height: 100%;
      transform-origin: center center;
      will-change: transform;
      user-select: none;
      -webkit-user-select: none;
    }
    .chat-attachment-preview-image,
    .chat-attachment-preview-video {
      object-fit: contain;
      display: block;
    }
    .chat-attachment-preview-frame {
      width: min(100%, 920px);
      height: 100%;
      border: 0;
      background: #fff;
      border-radius: 0;
    }
    .chat-attachment-preview-audio {
      width: min(100%, 360px);
    }
    #inputBar {
      display:flex;
      align-items:flex-end;
      gap: 8px;
      padding: 10px 12px;
      border-top:1px solid #eee;
      background: rgba(255,255,255,0.92);
      box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.04);
    }
    #msgInput {
      flex:1;
      min-width: 0;
      width: 100%;
      min-height: 46px;
      max-height: min(180px, 35vh);
      height: 46px;
      padding: 12px 14px;
      border: 1px solid #d7deeb;
      border-radius: 15px;
      font-family: inherit;
      font-size: 15px;
      line-height: 20px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      color: #0f172a;
      box-sizing: border-box;
      overflow-y: hidden;
      resize: none;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 12px rgba(15, 23, 42, 0.05);
      transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
    }
    #msgInput:focus {
      outline:none;
      border-color: #ff7bb5;
      box-shadow: 0 0 0 3px rgba(255, 123, 181, 0.16), inset 0 1px 0 rgba(255,255,255,0.9);
    }
    #msgInput:disabled {
      color: #64748b;
      background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
      border-color: #cbd5e1;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
      cursor: not-allowed;
      opacity: 1;
    }
    #msgInput:disabled::placeholder {
      color: #94a3b8;
    }
    .chat-compose-btn {
      width: 46px;
      min-width: 46px;
      height: 46px;
      border: 1px solid rgba(255,255,255,0.72);
      border-radius: 15px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        0 8px 18px rgba(15, 23, 42, 0.12),
        0 2px 4px rgba(15, 23, 42, 0.08);
      transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
    }
    .chat-compose-btn:hover {
      transform: translateY(-1px);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 10px 22px rgba(15, 23, 42, 0.14),
        0 2px 4px rgba(15, 23, 42, 0.08);
      filter: brightness(1.08) saturate(1.06);
    }
    .chat-compose-btn:active {
      transform: translateY(1px);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 4px 10px rgba(15, 23, 42, 0.14);
    }
    .chat-compose-btn img {
      width: 26px;
      height: 26px;
      display: block;
      pointer-events: none;
    }
    .chat-compose-btn-attach {
      background: linear-gradient(180deg, #ffb2d2 0%, #ff6cae 100%);
    }
    .chat-compose-btn-voice {
      background: linear-gradient(180deg, #73e5ec 0%, #10aebb 100%);
    }
    .chat-compose-btn-voice.active {
      background: linear-gradient(180deg, #61f0a5 0%, #16a34a 100%);
    }
    .chat-compose-btn-send {
      background: linear-gradient(180deg, #75ef92 0%, #25c55d 100%);
    }
    .chat-compose-btn-stop {
      background: linear-gradient(180deg, #f87171 0%, #b91c1c 100%);
    }
    .chat-stop-icon {
      display: block;
      width: 14px;
      height: 14px;
      border-radius: 3px;
      background: #fff;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
    }
    .chat-compose-btn:disabled {
      background: linear-gradient(180deg, #e5e7eb 0%, #cbd5e1 100%);
      border-color: rgba(255,255,255,0.55);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
      cursor: not-allowed;
      filter: grayscale(0.2);
      transform: none;
    }
    #inputBar.chat-input-focused .chat-compose-btn-hide-on-focus {
      display: none;
    }

    #chat-voice-mode-panel {
      position: absolute;
      inset: 0;
      z-index: 30;
      display: none;
      flex-direction: column;
      background: rgba(0, 0, 0, 0.82);
      border: 3px solid rgba(34, 197, 94, 0.70);
      box-sizing: border-box;
      --voice-level: 0;
      animation: voiceModePulse 1.1s ease-in-out infinite;
      box-shadow:
        inset 0 0 16px rgba(34, 197, 94, 0.35),
        inset 0 0 34px rgba(34, 197, 94, 0.18);
    }
    #chat-voice-mode-panel.voice-hot {
      box-shadow:
        inset 0 0 calc(20px + (28px * var(--voice-level))) rgba(34, 197, 94, 0.58),
        inset 0 0 calc(36px + (38px * var(--voice-level))) rgba(34, 197, 94, 0.32);
    }
    @keyframes voiceModePulse {
      0% {
        border-color: rgba(34, 197, 94, 0.45);
      }
      50% {
        border-color: rgba(34, 197, 94, 0.95);
      }
      100% {
        border-color: rgba(34, 197, 94, 0.45);
      }
    }
    .voice-topbar {
      display: grid;
      grid-template-columns: 56px 1fr 56px;
      align-items: center;
      gap: 8px;
      min-height: 52px;
      padding: 8px 10px;
      background: rgba(0, 0, 0, 0.40);
      border-bottom: 1px solid rgba(255,255,255,0.18);
    }
    .voice-top-btn {
      width: 40px;
      height: 36px;
      border: none;
      border-radius: 10px;
      background: rgba(255,255,255,0.16);
      color: #fff;
      cursor: pointer;
      font-size: 18px;
      font-weight: 700;
      justify-self: center;
    }
    .voice-top-btn.danger {
      background: rgba(239, 68, 68, 0.30);
    }
    .voice-media-wrap {
      position: relative;
      flex: 1 1 auto;
      width: 100%;
      min-height: 0;
      overflow: hidden;
      background: #000;
    }
    #chat-voice-media-image,
    #chat-voice-media-video {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }
    .voice-status-text {
      margin-top: 0;
      font-size: 13px;
      color: #eafff5;
      text-align: center;
      font-weight: 600;
      line-height: 1.2;
    }

    .msg-image-wrap {
      margin-top: 6px;
      width: 100%;
      aspect-ratio: 4 / 5;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.12);
      background: #e5e7eb;
      position: relative;
    }
    .msg-image-wrap[role="button"] {
      cursor: pointer;
    }
    .msg-image-wrap[role="button"]:focus-visible {
      outline: 2px solid rgba(219, 39, 119, 0.72);
      outline-offset: 3px;
    }
    .msg.has-image-slot,
    .msg.has-video-slot {
      width: 260px;
      max-width: 100%;
      box-sizing: border-box;
    }
    .msg-attachments-grid {
      margin-top: 6px;
      width: 260px;
      max-width: 100%;
      display: grid;
      gap: 4px;
    }
    .msg-attachments-grid.grid-1 {
      grid-template-columns: 1fr;
      aspect-ratio: 4 / 5;
    }
    .msg-attachments-grid.grid-2 {
      grid-template-columns: 1fr 1fr;
      grid-auto-rows: 110px;
    }
    .msg-attachments-grid.grid-3,
    .msg-attachments-grid.grid-4 {
      grid-template-columns: 1fr 1fr;
      grid-auto-rows: 90px;
    }
    .msg-attachment-image-cell {
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.12);
      background: #e5e7eb;
      position: relative;
      min-height: 80px;
      cursor: pointer;
    }
    .msg-attachments-files {
      margin-top: 6px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 260px;
      max-width: 100%;
    }
    .msg-attachment-file {
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 10px;
      background: #f8fafc;
      padding: 6px 8px;
      font-size: 12px;
      color: #334155;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
.msg-bubble-notices {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.msg-web-search-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.msg-web-search-results-label {
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  color: rgba(15,23,42,0.62);
}
.web-search-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px;
  background: rgba(248,250,252,0.98);
  color: #172033;
}
.web-search-card-title {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 750;
}
.web-search-answer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.web-search-answer-text {
  min-width: 0;
  flex: 1 1 auto;
}
.web-search-answer-image {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  object-fit: contain;
}
.web-search-answer-primary {
  font-size: 24px;
  line-height: 1.05;
  font-weight: 750;
}
.web-search-answer-secondary {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 650;
}
.web-search-card-context {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(30,41,59,0.72);
}
.web-search-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 9px 0 0;
}
.web-search-facts > div {
  min-width: 0;
}
.web-search-facts dt,
.web-search-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.web-search-facts dt {
  font-size: 9.5px;
  color: rgba(30,41,59,0.62);
}
.web-search-facts dd {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
}
.web-search-card-source {
  display: inline-block;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #075985;
  text-decoration: none;
}
.web-search-sports-games {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.web-search-sports-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.web-search-sports-header .web-search-card-title {
  margin-bottom: 6px;
}
.web-search-sports-image {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}
.web-search-sports-game + .web-search-sports-game {
  padding-top: 8px;
  border-top: 1px solid rgba(100,116,139,0.18);
}
.web-search-sports-stage {
  margin-bottom: 4px;
  font-size: 10.5px;
  color: rgba(30,41,59,0.68);
}
.web-search-sports-teams {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.web-search-sports-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
}
.web-search-sports-team-identity {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}
.web-search-sports-team-image {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  object-fit: contain;
}
.places-list-location {
  margin-top: -3px;
  margin-bottom: 7px;
}
.web-search-map-preview-link {
  display: block;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(148,163,184,0.16);
  text-decoration: none;
}
.web-search-map-preview {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 3;
  object-fit: cover;
}
.web-search-places {
  margin: 0;
  padding: 0;
  list-style: none;
}
.web-search-place {
  padding: 7px 0;
}
.web-search-place + .web-search-place {
  border-top: 1px solid rgba(100,116,139,0.18);
}
.web-search-place-name {
  display: inline-block;
  color: inherit;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 750;
  text-decoration: none;
}
a.web-search-place-name:hover {
  text-decoration: underline;
}
.web-search-place-summary {
  margin-top: 2px;
  color: #075985;
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 650;
}
.web-search-place-address {
  margin-top: 2px;
  color: rgba(30,41,59,0.72);
  font-size: 10.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.web-search-videos {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.web-search-video {
  min-width: 0;
}

.web-search-video + .web-search-video {
  padding-top: 14px;
  border-top: 1px solid rgba(25, 36, 50, 0.1);
}

.web-search-video-preview,
.web-search-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.web-search-video-preview {
  position: relative;
  padding: 0;
  cursor: pointer;
}

.web-search-video-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.web-search-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  background: #f00;
  font-size: 18px;
  line-height: 1;
  padding-left: 2px;
}

.web-search-video-duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  font-size: 11px;
  font-weight: 700;
}

.web-search-video-title {
  display: block;
  margin-top: 7px;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
}

a.web-search-video-title:hover {
  text-decoration: underline;
}

.web-search-video-meta {
  margin-top: 3px;
  color: #687184;
  font-size: 12px;
  line-height: 1.35;
}

.web-search-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.web-search-image {
  min-width: 0;
  margin: 0;
}

.web-search-image:first-child {
  grid-column: 1 / -1;
}

.web-search-image-link {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(25, 36, 50, 0.08);
}

.web-search-image:first-child .web-search-image-link {
  aspect-ratio: 16 / 9;
}

.web-search-image-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.web-search-image figcaption {
  margin-top: 5px;
}

.web-search-image-title {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

a.web-search-image-title:hover,
.web-search-image-original:hover {
  text-decoration: underline;
}

.web-search-image-meta,
.web-search-image-original {
  display: block;
  margin-top: 3px;
  color: #687184;
  font-size: 11px;
  line-height: 1.3;
}

.web-search-news {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.web-search-news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
}

.web-search-news-item + .web-search-news-item {
  border-top: 1px solid rgba(25, 36, 50, 0.1);
}

.web-search-news-content {
  min-width: 0;
  flex: 1;
}

.web-search-news-source {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #687184;
  font-size: 11px;
  font-weight: 650;
}

.web-search-reference-index {
  flex: 0 0 auto;
  font-size: 0.72em;
  font-weight: 650;
  line-height: 1;
  color: rgba(25, 36, 50, 0.58);
}

.web-search-news-source img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: contain;
}

.web-search-news-title {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
}

a.web-search-news-title:hover {
  text-decoration: underline;
}

.web-search-news-date {
  display: block;
  margin-top: 4px;
  color: #687184;
  font-size: 11px;
}

.web-search-news-snippet {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: #535d70;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.web-search-news-thumbnail {
  flex: 0 0 84px;
  width: 84px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(25, 36, 50, 0.08);
}

.web-search-news-thumbnail-link {
  flex: 0 0 84px;
  width: 84px;
  border-radius: 8px;
  overflow: hidden;
}

.web-search-news-thumbnail-link .web-search-news-thumbnail {
  display: block;
  width: 100%;
}

.reference-list-card .web-search-news-item.has-stacked-thumbnail {
  display: block;
}

.reference-list-card .has-stacked-thumbnail .web-search-news-thumbnail-link,
.reference-list-card .has-stacked-thumbnail > .web-search-news-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 12px;
  border-radius: 10px;
  background: transparent;
  overflow: visible;
}

.reference-list-card .has-stacked-thumbnail .web-search-news-thumbnail {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  margin: 0 auto;
  object-fit: contain;
}

.web-search-references-more {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(25, 36, 50, 0.1);
}

.web-search-reference-section-title {
  margin-top: 8px;
  color: var(--text-secondary, #5f6368);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.web-search-references-more > summary {
  cursor: pointer;
  color: #075985;
  font-size: 10.5px;
  font-weight: 700;
}

.web-search-news-collapsed {
  margin-top: 6px;
}

.web-search-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.web-search-product {
  min-width: 0;
}

.web-search-product-image-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.web-search-product-image-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.web-search-product-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  max-width: calc(100% - 14px);
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 5px;
  color: #fff;
  background: #b42318;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-search-product-title {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  color: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

a.web-search-product-title:hover {
  text-decoration: underline;
}

.web-search-product-source,
.web-search-product-rating,
.web-search-product-delivery {
  margin-top: 3px;
  color: #687184;
  font-size: 11px;
  line-height: 1.3;
}

.web-search-product-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.web-search-product-prices strong {
  color: #147a46;
  font-size: 15px;
}

.web-search-product-prices del {
  color: #8790a0;
  font-size: 11px;
}

.web-search-product-rating {
  color: #8a5b00;
}

.web-search-image-original {
  width: fit-content;
  text-decoration: none;
}
html[data-app-color-mode="dark"] .msg-web-search-results-label,
html[data-app-color-mode="dark"] .web-search-card-context,
html[data-app-color-mode="dark"] .web-search-sports-stage,
html[data-app-color-mode="dark"] .web-search-facts dt,
html[data-app-color-mode="dark"] .web-search-place-address {
  color: rgba(226,232,240,0.68);
}
html[data-app-color-mode="dark"] .web-search-card {
  border-color: rgba(96,165,250,0.26);
  background: rgba(30,41,59,0.96);
  color: #f1f5f9;
}
html[data-app-color-mode="dark"] .web-search-sports-game + .web-search-sports-game {
  border-top-color: rgba(148,163,184,0.22);
}
html[data-app-color-mode="dark"] .web-search-place + .web-search-place {
  border-top-color: rgba(148,163,184,0.22);
}

html[data-app-color-mode="dark"] .web-search-video + .web-search-video {
  border-top-color: rgba(255, 255, 255, 0.12);
}

html[data-app-color-mode="dark"] .web-search-video-meta {
  color: #aab3c3;
}

html[data-app-color-mode="dark"] .web-search-image-meta,
html[data-app-color-mode="dark"] .web-search-image-original {
  color: #aab3c3;
}

html[data-app-color-mode="dark"] .web-search-news-item + .web-search-news-item {
  border-top-color: rgba(255, 255, 255, 0.12);
}

html[data-app-color-mode="dark"] .web-search-news-source,
html[data-app-color-mode="dark"] .web-search-news-date,
html[data-app-color-mode="dark"] .web-search-news-snippet {
  color: #aab3c3;
}

html[data-app-color-mode="dark"] .web-search-reference-index {
  color: rgba(224, 230, 240, 0.66);
}

html[data-app-color-mode="dark"] .web-search-product-source,
html[data-app-color-mode="dark"] .web-search-product-delivery {
  color: #aab3c3;
}

html[data-app-color-mode="dark"] .web-search-product-rating {
  color: #f3c568;
}
html[data-app-color-mode="dark"] .web-search-card-source {
  color: #7dd3fc;
}
html[data-app-color-mode="dark"] .web-search-place-summary {
  color: #7dd3fc;
}
    .msg-bubble-notice {
      border: 1px solid rgba(217,119,6,0.24);
      border-radius: 8px;
      background: rgba(255,251,235,0.96);
      color: #78350f;
      padding: 6px 8px;
      font-size: 11.5px;
      font-weight: 600;
      line-height: 1.35;
    }
    .msg-bubble-notice.info {
      border-color: rgba(14,165,233,0.24);
      background: rgba(240,249,255,0.96);
      color: #075985;
    }
    .msg-bubble-notice .em-act {
      color: inherit;
      font-weight: 800;
    }
.msg-source-links {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
    .msg-source-links-label {
      font-size: 11px;
      line-height: 1;
      font-weight: 700;
      color: rgba(15,23,42,0.62);
    }
.msg-source-link-chip {
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 8px;
  box-sizing: border-box;
      border: 1px solid rgba(14,165,233,0.25);
      border-radius: 999px;
      background: rgba(240,249,255,0.95);
      color: #075985;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.2;
      text-decoration: none;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .msg-source-link-chip:hover {
      background: #e0f2fe;
      border-color: rgba(14,165,233,0.45);
      text-decoration: none;
    }
.msg-source-links-more {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.msg-source-links-more > summary {
  cursor: pointer;
  color: #0369a1;
  font-size: 11px;
  font-weight: 750;
  list-style-position: inside;
}
.msg-source-links-more[open] > summary {
  margin-bottom: 5px;
}
.msg-source-links-more > .msg-source-link-chip + .msg-source-link-chip {
  margin-top: 5px;
}
    .msg-image-wrap.pending {
      background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
      background-size: 220% 100%;
      animation: msgSkeletonPulse 1.1s ease-in-out infinite;
    }
    .msg-image-wrap:first-child {
      margin-top: 0;
    }
    .chat-msg-image {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0;
      transition: opacity 220ms ease;
      position: relative;
      z-index: 1;
    }
    .chat-msg-image.is-ready { opacity: 1; }
    .chat-msg-image-placeholder {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #64748b;
      text-align: center;
      padding: 8px;
      z-index: 2;
    }
    .msg-video-wrap {
      margin-top: 6px;
      width: 100%;
      aspect-ratio: 4 / 5;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.12);
      background: #000;
      position: relative;
    }
    .msg-video-wrap.pending {
      background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
      background-size: 220% 100%;
      animation: msgSkeletonPulse 1.1s ease-in-out infinite;
    }
    .msg-image-wrap.missing,
    .msg-video-wrap.missing {
      background: #f8fafc;
      animation: none;
    }
    .chat-msg-video {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      background: #000;
    }
    .chat-msg-video-placeholder {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #64748b;
      text-align: center;
      padding: 8px;
    }
    .msg-youtube-wrap {
      margin-top: 6px;
      width: min(100%, 320px);
      aspect-ratio: 16 / 9;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.12);
      background: #000;
      position: relative;
    }
    .msg-youtube-wrap.is-short {
      width: min(100%, 280px);
      aspect-ratio: 9 / 16;
    }
    .chat-msg-youtube {
      display: block;
      width: 100%;
      height: 100%;
      border: 0;
      background: #000;
    }
    .msg-image-caption {
      margin-top: 6px;
      word-break: break-word;
    }
    .msg-audio-wrap {
      margin-top: 8px;
      width: 240px;
      max-width: 100%;
      min-height: 44px;
      box-sizing: border-box;
      border-radius: 10px;
      border: 1px solid rgba(0,0,0,0.12);
      background: #f8fafc;
      display: flex;
      align-items: center;
      padding: 6px 8px;
    }
    .msg-audio-wrap.pending {
      background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
      background-size: 220% 100%;
      animation: msgSkeletonPulse 1.1s ease-in-out infinite;
    }
    .chat-audio-placeholder {
      font-size: 12px;
      color: #64748b;
    }
    .chat-msg-audio {
      width: 100%;
      display: block;
    }
    @keyframes msgSkeletonPulse {
      0% { background-position: 100% 0; }
      100% { background-position: -100% 0; }
    }
		
#bg-video {
  position: absolute;   /* inside the panel */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;    /* scale like background-image: cover */
  z-index: 0;           /* behind content */
  opacity: 0.3;
  pointer-events: none; /* clicks go to chat */
}

#chat-bg {
  position: absolute;
  inset: 0;                 /* shorthand: top/right/bottom/left = 0 */
  background-size: cover;   /* fill area to avoid letterbox seam */
  background-position: center center;
  background-repeat: no-repeat;
  background-color: transparent;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;             /* 30% opacity (your comment said 50%) */
}

#chat-panel.chat-out-of-credits-active #chat-bg {
  filter: grayscale(0.25) brightness(0.82);
  opacity: 0.38;
}

.chat-header-icon-btn {
  position: relative;
}

.chat-notification-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  font-weight: 700;
}

#chat-more-options-rewards-btn {
  position: relative;
}

#chat-more-options-rewards-btn .chat-notification-badge {
  position: static;
  margin-left: auto;
  transform: none;
}

.story-event-pop {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(86vw, 360px);
  background: rgba(15,23,42,0.92);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  z-index: 9999;
  padding: 10px 12px;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.story-event-pop.show {
  opacity: 1;
}

.story-event-pop-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.story-event-pop-msg {
  font-size: 12px;
  line-height: 1.3;
}

.story-event-pop-bar-wrap {
  margin-top: 7px;
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  overflow: hidden;
}

.story-event-pop-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #06b6d4);
  transition: width 240ms ease;
}

#chat-header-media {
  cursor: pointer;
}

#chat-header-media:hover {
  filter: brightness(1.04);
}

#chat-header-media:focus-visible {
  outline: 2px solid rgba(255,255,255,0.8);
  outline-offset: 3px;
}

/* Application appearance tokens. Only Chat consumes these in phase 1. */
#chat-panel {
  --chat-canvas-bg: #ffffff;
  --chat-loading-bg: rgba(255, 255, 255, 0.78);
  --chat-loading-fg: #0f172a;
  --chat-header-bg: var(--header-color, #075e54);
  --chat-header-fg: #ffffff;
  --chat-header-border: transparent;
  --chat-header-control-hover: rgba(255, 255, 255, 0.14);
  --chat-header-icon-filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
  --chat-menu-bg: #ffffff;
  --chat-menu-fg: #0f172a;
  --chat-menu-border: #d1d5db;
  --chat-menu-hover: #eef2f7;
  --chat-menu-icon-filter: none;
  --chat-surface: rgba(255, 255, 255, 0.92);
  --chat-surface-solid: #ffffff;
  --chat-input-bg: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  --chat-text-primary: #0f172a;
  --chat-text-muted: #64748b;
  --chat-border: #d7deeb;
  --chat-accent: #ff7bb5;
  --chat-focus-ring: rgba(255, 123, 181, 0.16);
  --chat-user-bubble-bg: #dcf8c6;
  --chat-user-bubble-fg: #0f172a;
  --chat-assistant-bubble-bg: #ffffff;
  --chat-assistant-bubble-fg: #0f172a;
  --chat-assistant-bubble-border: #eeeeee;
  --chat-date-bg: rgba(255, 255, 255, 0.78);
  --chat-date-fg: rgba(51, 65, 85, 0.86);
  --chat-date-border: rgba(148, 163, 184, 0.24);
  --chat-compose-attach-bg: linear-gradient(180deg, #ffb2d2 0%, #ff6cae 100%);
  --chat-compose-voice-bg: linear-gradient(180deg, #73e5ec 0%, #10aebb 100%);
  --chat-compose-send-bg: linear-gradient(180deg, #75ef92 0%, #25c55d 100%);
  --chat-compose-stop-bg: linear-gradient(180deg, #f87171 0%, #b91c1c 100%);
  background: var(--chat-canvas-bg);
  color: var(--chat-text-primary);
}

html[data-app-appearance="neutral"][data-app-color-mode="light"] #chat-panel {
  --chat-canvas-bg: #f1f3f5;
  --chat-loading-bg: rgba(248, 249, 250, 0.92);
  --chat-loading-fg: #20252b;
  --chat-header-bg: #f8f9fa;
  --chat-header-fg: #20252b;
  --chat-header-border: #d7dce1;
  --chat-header-control-hover: #e7eaee;
  --chat-header-icon-filter: brightness(0) saturate(100%);
  --chat-menu-bg: #ffffff;
  --chat-menu-fg: #20252b;
  --chat-menu-border: #cfd4da;
  --chat-menu-hover: #eef1f4;
  --chat-menu-icon-filter: none;
  --chat-surface: rgba(255, 255, 255, 0.94);
  --chat-surface-solid: #ffffff;
  --chat-input-bg: #ffffff;
  --chat-text-primary: #20252b;
  --chat-text-muted: #616b75;
  --chat-border: #cfd5dc;
  --chat-accent: #2563eb;
  --chat-focus-ring: rgba(37, 99, 235, 0.17);
  --chat-user-bubble-bg: #dcecf3;
  --chat-user-bubble-fg: #17252d;
  --chat-assistant-bubble-bg: #ffffff;
  --chat-assistant-bubble-fg: #20252b;
  --chat-assistant-bubble-border: #d8dde2;
  --chat-date-bg: rgba(255, 255, 255, 0.88);
  --chat-date-fg: #59636d;
  --chat-date-border: #d4d9de;
  --chat-compose-attach-bg: #59636f;
  --chat-compose-voice-bg: #0f766e;
  --chat-compose-send-bg: #2563eb;
  --chat-compose-stop-bg: #b42318;
  color-scheme: light;
}

html[data-app-appearance="neutral"][data-app-color-mode="dark"] #chat-panel {
  --chat-canvas-bg: #18191b;
  --chat-loading-bg: rgba(24, 25, 27, 0.94);
  --chat-loading-fg: #f4f4f2;
  --chat-header-bg: #202225;
  --chat-header-fg: #f5f5f4;
  --chat-header-border: #3a3d42;
  --chat-header-control-hover: #34373c;
  --chat-header-icon-filter: brightness(0) invert(1);
  --chat-menu-bg: #26282c;
  --chat-menu-fg: #f2f2ef;
  --chat-menu-border: #41444a;
  --chat-menu-hover: #35383d;
  --chat-menu-icon-filter: brightness(0) invert(1);
  --chat-surface: rgba(36, 38, 41, 0.96);
  --chat-surface-solid: #242629;
  --chat-input-bg: #242629;
  --chat-text-primary: #f2f2ef;
  --chat-text-muted: #a9afb6;
  --chat-border: #484c52;
  --chat-accent: #63a8d6;
  --chat-focus-ring: rgba(99, 168, 214, 0.24);
  --chat-user-bubble-bg: #1d5059;
  --chat-user-bubble-fg: #f5fbfb;
  --chat-assistant-bubble-bg: #2a2c30;
  --chat-assistant-bubble-fg: #f3f3f0;
  --chat-assistant-bubble-border: #41444a;
  --chat-date-bg: rgba(42, 44, 48, 0.92);
  --chat-date-fg: #c3c7cc;
  --chat-date-border: #464a50;
  --chat-compose-attach-bg: #555c65;
  --chat-compose-voice-bg: #147b73;
  --chat-compose-send-bg: #2e78b7;
  --chat-compose-stop-bg: #b33a32;
  color-scheme: dark;
}

#chat-panel #chat-loading-state {
  background: var(--chat-loading-bg);
  color: var(--chat-loading-fg);
}

#chat-panel .panel-header-chat {
  background: var(--chat-header-bg);
  color: var(--chat-header-fg);
  border-bottom: 1px solid var(--chat-header-border);
}

#chat-panel #titleText,
#chat-panel #chat-header .btn-panel-header {
  color: var(--chat-header-fg);
}

#chat-panel #chat-header .btn-panel-header:hover {
  background: var(--chat-header-control-hover);
  color: var(--chat-header-fg);
}

#chat-panel #chat-header .btn-panel-header-icon {
  filter: var(--chat-header-icon-filter);
}

#chat-panel .chat-more-options-menu {
  min-width: 205px;
  background: var(--chat-menu-bg);
  border-color: var(--chat-menu-border);
  color: var(--chat-menu-fg);
}

#chat-panel .chat-more-options-item {
  color: var(--chat-menu-fg);
}

#chat-panel .chat-more-options-item:hover,
#chat-panel .chat-more-options-item:focus-visible {
  background: var(--chat-menu-hover);
}

#chat-panel .chat-more-options-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#chat-panel .chat-more-options-icon img {
  display: block;
  width: 17px;
  height: 17px;
  filter: var(--chat-menu-icon-filter);
}

.chat-menu-status {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 6px 2px;
  padding: 9px 4px 3px;
  border-top: 1px solid var(--chat-menu-border);
  color: var(--chat-text-muted);
  font-size: 11px;
  font-weight: 700;
}

html[data-app-appearance="neutral"] #chat-panel .chat-menu-status {
  display: flex;
}

#chat-panel #chat-chat {
  color: var(--chat-text-primary);
}

#chat-panel .msg-container:not(.bot):not(.story) .msg {
  background: var(--chat-user-bubble-bg);
  color: var(--chat-user-bubble-fg);
}

#chat-panel .bot .msg {
  background: var(--chat-assistant-bubble-bg);
  color: var(--chat-assistant-bubble-fg);
  border-color: var(--chat-assistant-bubble-border);
}

#chat-panel .msg.chat-date-divider {
  background: var(--chat-date-bg);
  color: var(--chat-date-fg);
  border-color: var(--chat-date-border);
}

#chat-panel .msg-time,
#chat-panel .bot .msg-time,
#chat-panel .chat-msg-send-status {
  color: var(--chat-text-muted);
}

#chat-panel #inputBar {
  background: var(--chat-surface);
  border-top-color: var(--chat-border);
}

#chat-panel #msgInput {
  background: var(--chat-input-bg);
  color: var(--chat-text-primary);
  border-color: var(--chat-border);
}

#chat-panel #msgInput::placeholder {
  color: var(--chat-text-muted);
}

#chat-panel #msgInput:focus {
  border-color: var(--chat-accent);
  box-shadow: 0 0 0 3px var(--chat-focus-ring);
}

#chat-panel .chat-compose-btn-attach {
  background: var(--chat-compose-attach-bg);
}

#chat-panel .chat-compose-btn-voice {
  background: var(--chat-compose-voice-bg);
}

#chat-panel .chat-compose-btn-send {
  background: var(--chat-compose-send-bg);
}

#chat-panel .chat-compose-btn-stop {
  background: var(--chat-compose-stop-bg);
}

html[data-app-appearance="neutral"] #chat-panel .chat-compose-btn-voice.active {
  background: #16837a;
}

html[data-app-appearance="neutral"] #chat-panel .chat-compose-btn {
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

html[data-app-appearance="neutral"] #chat-panel .chat-compose-btn img {
  width: 22px;
  height: 22px;
}

html[data-app-appearance="neutral"] #chat-panel .chat-compose-btn-attach img {
  content: url("../media/chat_controls/neutral_attach.svg");
}

html[data-app-appearance="neutral"] #chat-panel .chat-compose-btn-voice img {
  content: url("../media/chat_controls/neutral_voice.svg");
}

html[data-app-appearance="neutral"] #chat-panel .chat-compose-btn-send img {
  content: url("../media/chat_controls/neutral_send.svg");
}

html[data-app-appearance="neutral"] #chat-panel #chat-header-badge {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: auto;
  overflow: visible;
}

html[data-app-appearance="neutral"] #chat-panel #chat-header-badge::after,
html[data-app-appearance="neutral"] #chat-panel #chat-header-badge.chat-header-badge-flash::after {
  display: none;
}

html[data-app-appearance="neutral"] #chat-panel #chat-header-badge.chat-header-badge-flash {
  background: transparent;
  box-shadow: none;
}

html[data-app-appearance="neutral"] #chat-panel #titleText {
  width: auto;
  color: var(--chat-header-fg);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

html[data-app-appearance="neutral"] #chat-panel #chat-header-title-mood,
html[data-app-appearance="neutral"] #chat-panel .chat-header-badge-row {
  display: none;
}

html[data-app-appearance="neutral"] #chat-panel #chat-header-media {
  width: 36px;
  height: 36px;
  border: 1px solid var(--chat-header-border);
  background: var(--chat-surface-solid);
  box-shadow: none;
}

html[data-app-appearance="neutral"] #chat-panel[data-chat-background="neutral"] #chat-bg {
  background-image: url("../media/themes/chat-neutral.svg") !important;
  background-color: transparent !important;
  background-size: 360px 360px !important;
  background-position: center !important;
  background-repeat: repeat !important;
  filter: none;
}

html[data-app-appearance="neutral"] #chat-panel[data-chat-background="neutral"] #bg-video {
  display: none;
}

html[data-app-appearance="neutral"] #chat-panel #chat-story-header-host {
  --story-header-bg: var(--chat-surface);
  --story-header-border: var(--chat-border);
  --story-header-title-color: var(--chat-text-primary);
  --story-header-progress-color: var(--chat-text-muted);
  --story-header-track-bg: var(--chat-menu-hover);
  --story-header-track-border: var(--chat-border);
  --story-header-bar-bg: var(--chat-accent);
}

html[data-app-appearance="neutral"] #chat-panel #chat-session-header-host {
  --session-header-bg: var(--chat-surface);
  --session-header-border: var(--chat-border);
  --session-header-title-color: var(--chat-text-primary);
  --session-header-progress-color: var(--chat-text-muted);
  --session-header-track-bg: var(--chat-menu-hover);
  --session-header-track-border: var(--chat-border);
  --session-header-bar-bg: var(--chat-accent);
}

html[data-app-appearance="neutral"] #chat-panel .session-header-detail-btn,
html[data-app-appearance="neutral"] #chat-panel .session-header-exit-btn {
  background: var(--chat-surface-solid);
  color: var(--chat-text-primary);
  border-color: var(--chat-border);
}

html[data-app-appearance="neutral"][data-app-color-mode="dark"] #chat-panel .panel-action-button img {
  filter: brightness(1.08);
}

/* Centralized typography scale. The preference changes the root rem size;
   chat and web-search content only consume semantic tokens here. */
#chat-panel .msg {
  font-size: var(--app-font-body, 0.8125rem);
  line-height: var(--app-line-body, 1.45);
}

#chat-panel .msg.chat-date-divider,
#chat-panel .msg-bubble-notice,
#chat-panel .msg-source-links-label,
#chat-panel .msg-source-link-chip,
#chat-panel .msg-source-links-more > summary {
  font-size: var(--app-font-small, 0.6875rem);
}

#chat-panel .msg-time {
  font-size: var(--app-font-caption, 0.625rem);
}

/* Search-result typography belongs to the shared renderer, so chat and voice
   consume exactly the same semantic font tokens. */
.msg-web-search-results .msg-web-search-results-label,
.msg-web-search-results .web-search-card-title,
.msg-web-search-results .web-search-card-context,
.msg-web-search-results .web-search-facts dd,
.msg-web-search-results .web-search-sports-team,
.msg-web-search-results .web-search-place-name,
.msg-web-search-results .web-search-video-duration,
.msg-web-search-results .web-search-video-meta,
.msg-web-search-results .web-search-image-title,
.msg-web-search-results .web-search-image-original,
.msg-web-search-results .web-search-news-source,
.msg-web-search-results .web-search-news-date,
.msg-web-search-results .web-search-news-snippet,
.msg-web-search-results .web-search-product-title,
.msg-web-search-results .web-search-product-delivery,
.msg-web-search-results .web-search-product-prices del {
  font-size: var(--app-font-small, 0.6875rem);
}

.msg-web-search-results .web-search-facts dt,
.msg-web-search-results .web-search-card-source,
.msg-web-search-results .web-search-sports-stage,
.msg-web-search-results .web-search-place-summary,
.msg-web-search-results .web-search-place-address,
.msg-web-search-results .web-search-product-tag {
  font-size: var(--app-font-caption, 0.625rem);
}

.msg-web-search-results .web-search-answer-secondary {
  font-size: var(--app-font-body, 0.8125rem);
}

.msg-web-search-results .web-search-video-title,
.msg-web-search-results .web-search-news-title {
  font-size: var(--app-font-control, 0.875rem);
}

.msg-web-search-results .web-search-product-prices strong {
  font-size: var(--app-font-title, 0.9375rem);
}

.msg-web-search-results .web-search-answer-primary {
  font-size: var(--app-font-hero, 1.5rem);
}

.msg-web-search-results .web-search-card.answer-box.display-summary .web-search-answer-primary {
  font-size: var(--app-font-body, 0.8125rem);
  line-height: 1.4;
  font-weight: 650;
}
