/* PatentRenewal chat widgets — shared foundations. MCP-specific composition is scoped below. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

#chat.prc-mcp {
  --purple: #6849c7;
  --purple-2: #876be0;
  --purple-tint: #f3f0fc;
  --purple-line: #d9cff5;
  --text: #29253b;
  --text-2: #555064;
  --muted: #716d80;
  --faint: #898597;
  --placeholder: #898597;
  --line: #e8e4f0;
  --line-2: #f0edf5;
  --fill: #faf9fc;
  --green: #267d62;
  --error: #a93850;
  --white: #fff;
  --widget-w: 880px;
  --widget-h: 600px;
  --radius: 18px;
}

/* Keep the pre-existing shared-tool presentation intact outside the MCP demo scope. */
body:has(#chat:not(.prc-mcp)) { margin: 0; height: 100%; background: #fff; font-family: Lato, system-ui, sans-serif; color: #1a1a2e; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body:has(#chat.prc-mcp) { margin: 0; background: #fff; }
body:has(#chat:not(.prc-mcp)) *, #chat:not(.prc-mcp), #chat:not(.prc-mcp) * { box-sizing: border-box; }
#chat:not(.prc-mcp) {
  --purple: #7c3aed; --purple-2: #9b6ef3; --purple-tint: #f0ecff; --purple-line: #ddd3fb;
  --text: #1a1a2e; --text-2: #4a4a5e; --muted: #6b6b80; --faint: #9b9ba8;
  --placeholder: #b0b0be; --line: #e8e8ed; --line-2: #f0f0f4; --fill: #f7f7fa;
  --green: #10b981; --error: #dc2626; --white: #fff; --widget-w: 880px; --widget-h: 600px; --radius: 16px;
  position: relative; width: min(var(--widget-w), 100%); height: var(--widget-h);
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 1px 2px rgba(26,26,46,.04), 0 12px 32px rgba(26,26,46,.07); overflow: hidden;
}
body:has(#chat:not(.prc-mcp)) .prc-stage { min-height: 100%; display: grid; place-items: center; padding: 20px 16px; }
#chat:not(.prc-mcp) .prc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line-2); }
#chat:not(.prc-mcp) .prc-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--placeholder); }
#chat:not(.prc-mcp) .prc-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--purple); background: var(--purple-tint); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
#chat:not(.prc-mcp) .prc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
#chat:not(.prc-mcp) .prc-log { flex: 1; overflow-y: auto; padding: 16px 20px; position: relative; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#chat:not(.prc-mcp) .prc-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); max-width: 420px; margin: 0 auto; }
#chat:not(.prc-mcp) .prc-empty p { margin: 0; font-size: 14px; line-height: 1.6; }
#chat:not(.prc-mcp) .prc-empty-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--purple-tint); color: var(--purple); }
#chat:not(.prc-mcp) .prc-msg { display: flex; margin: 0 0 12px; }
#chat:not(.prc-mcp) .prc-msg.user { justify-content: flex-end; }
#chat:not(.prc-mcp) .prc-bubble { max-width: min(640px, 88%); padding: 10px 14px; border-radius: 12px; overflow-x: auto; font-size: 14px; }
#chat:not(.prc-mcp) .prc-msg.user .prc-bubble { background: var(--purple); color: var(--white); border-bottom-right-radius: 4px; }
#chat:not(.prc-mcp) .prc-msg.bot .prc-bubble { background: var(--fill); border: 1px solid var(--line-2); color: var(--text); border-bottom-left-radius: 4px; }
#chat:not(.prc-mcp) .prc-msg.error .prc-bubble { background: #fef2f2; border: 1px solid #fecaca; color: var(--error); }
#chat:not(.prc-mcp) .prc-bubble p { margin: 0 0 8px; }
#chat:not(.prc-mcp) .prc-bubble p:last-child { margin-bottom: 0; }
#chat:not(.prc-mcp) .prc-bubble ul, #chat:not(.prc-mcp) .prc-bubble ol { margin: 4px 0 8px; padding-left: 18px; }
#chat:not(.prc-mcp) .prc-bubble li { margin: 2px 0; }
#chat:not(.prc-mcp) .prc-bubble strong { font-weight: 700; }
#chat:not(.prc-mcp) .prc-bubble code { background: var(--purple-tint); color: var(--purple); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
#chat:not(.prc-mcp) .prc-bubble a { color: var(--purple); font-weight: 700; }
#chat:not(.prc-mcp) .prc-bubble table { border-collapse: collapse; margin: 8px 0; font-size: 13px; min-width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#chat:not(.prc-mcp) .prc-bubble th, #chat:not(.prc-mcp) .prc-bubble td { padding: 6px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
#chat:not(.prc-mcp) .prc-bubble th { background: var(--fill); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#chat:not(.prc-mcp) .prc-bubble tr:last-child td { border-bottom: 0; }
#chat:not(.prc-mcp) .prc-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
#chat:not(.prc-mcp) .prc-tool { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--purple); background: var(--purple-tint); border-radius: 999px; padding: 2px 9px; }
#chat:not(.prc-mcp) .prc-typing { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
#chat:not(.prc-mcp) .prc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); animation: prc-blink 1s infinite; }
#chat:not(.prc-mcp) .prc-typing i:nth-child(2) { animation-delay: .2s; }
#chat:not(.prc-mcp) .prc-typing i:nth-child(3) { animation-delay: .4s; }
#chat:not(.prc-mcp) .prc-suggest { display: flex; gap: 6px; padding: 10px 20px 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line-2); }
#chat:not(.prc-mcp) .prc-suggest::-webkit-scrollbar { display: none; }
#chat:not(.prc-mcp) .prc-suggest:empty { display: none; }
#chat:not(.prc-mcp) .prc-chip { flex: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
#chat:not(.prc-mcp) .prc-chip:hover, #chat:not(.prc-mcp) .prc-chip:focus-visible { border-color: var(--purple); color: var(--purple); background: var(--purple-tint); outline: none; }
#chat:not(.prc-mcp) .prc-chip:disabled { opacity: .5; cursor: default; }
#chat:not(.prc-mcp) .prc-input { display: flex; gap: 8px; padding: 10px 20px 8px; align-items: flex-end; }
#chat:not(.prc-mcp) .prc-input textarea { flex: 1; font: inherit; font-size: 14px; resize: none; height: 42px; max-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: var(--fill); color: var(--text); }
#chat:not(.prc-mcp) .prc-input textarea::placeholder { color: var(--placeholder); }
#chat:not(.prc-mcp) .prc-input textarea:focus { border-color: var(--purple); background: var(--white); }
#chat:not(.prc-mcp) .prc-input button { flex: none; height: 42px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--purple); color: var(--white); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .15s; }
#chat:not(.prc-mcp) .prc-input button:hover { opacity: .9; }
#chat:not(.prc-mcp) .prc-input button:disabled { opacity: .35; cursor: not-allowed; }
#chat:not(.prc-mcp) .prc-foot { margin: 0; padding: 0 20px 12px; font-size: 10.5px; color: var(--faint); }
#chat:not(.prc-mcp) .prc-foot a { color: var(--faint); }
#chat:not(.prc-mcp) .prc-modal { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(26,26,46,.32); animation: prc-fade .2s ease-out; }
#chat:not(.prc-mcp) .prc-modal-card { position: relative; width: min(380px, 100%); padding: 26px 24px 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(26,26,46,.2); text-align: center; }
#chat:not(.prc-mcp) .prc-modal-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--placeholder); margin-bottom: 6px; }
#chat:not(.prc-mcp) .prc-modal-card h3 { margin: 0 0 8px; color: var(--text); font-size: 20px; font-weight: 400; line-height: 1.3; }
#chat:not(.prc-mcp) .prc-modal-text { margin: 0 0 18px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
#chat:not(.prc-mcp) .prc-modal-actions { display: grid; gap: 6px; }
#chat:not(.prc-mcp) .prc-modal-cta { display: block; padding: 11px 18px; border-radius: 12px; background: linear-gradient(90deg,var(--purple),var(--purple-2)); color: var(--white); font-weight: 700; font-size: 14px; text-decoration: none; transition: opacity .15s; }
#chat:not(.prc-mcp) .prc-modal-cta:hover, #chat:not(.prc-mcp) .prc-modal-cta:focus-visible { opacity: .9; outline: none; box-shadow: 0 0 0 3px var(--purple-line); }
#chat:not(.prc-mcp) .prc-modal-later { font: inherit; font-size: 13px; padding: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
#chat:not(.prc-mcp) .prc-modal-later:hover { color: var(--purple); }
#chat:not(.prc-mcp) .prc-modal-close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 20px; line-height: 1; color: var(--faint); cursor: pointer; }
#chat:not(.prc-mcp) .prc-modal-close:hover { background: var(--fill); color: var(--text); }
@media (max-width: 600px) {
  body:has(#chat:not(.prc-mcp)) .prc-stage { padding: 20px 12px; }
  #chat:not(.prc-mcp) { height: var(--widget-h); }
  #chat:not(.prc-mcp) .prc-top { padding: 12px 14px 10px; }
  #chat:not(.prc-mcp) .prc-status { font-size: 11px; padding: 3px 9px; }
  #chat:not(.prc-mcp) .prc-log { padding: 12px 14px; }
  #chat:not(.prc-mcp) .prc-suggest { padding: 8px 14px 0; }
  #chat:not(.prc-mcp) .prc-input { padding: 8px 14px 6px; }
  #chat:not(.prc-mcp) .prc-input textarea { font-size: 16px; }
  #chat:not(.prc-mcp) .prc-input button { padding: 0 14px; }
  #chat:not(.prc-mcp) .prc-foot { padding: 0 14px 10px; }
  #chat:not(.prc-mcp) .prc-bubble { max-width: 94%; }
}
@media (max-width: 380px) { #chat:not(.prc-mcp) .prc-label { display: none; } }

#chat.prc-mcp, #chat.prc-mcp * { box-sizing: border-box; }
#chat.prc-mcp {
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.prc-stage.prc-mcp-stage { box-sizing: border-box; min-height: 100dvh; display: grid; place-items: center; padding: 12px; }
#chat.prc-mcp {
  position: relative;
  width: min(var(--widget-w), 100%);
  height: min(var(--widget-h), calc(100dvh - 24px));
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: visible;
}

@media (max-width: 680px) {
  .prc-stage.prc-mcp-stage { padding: 8px; }
}

@scope (#chat.prc-mcp) {
.prc-status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .01em; color: #534c68; background: #fbfaff; border: 1px solid #e9e3f4; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.prc-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(35, 138, 105, .12); }
.prc-account { flex: none; display: flex; justify-content: center; padding: 11px 0 0; }

/* Messages occupy the only elastic region; the prompt shelf below always keeps its footprint. */
.prc-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 12px 16px; position: relative; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #d7cee9 transparent; }
.prc-empty { min-height: 100%; display: grid; align-content: center; justify-items: center; gap: 15px; text-align: center; color: var(--muted); max-width: 540px; margin: 0 auto; padding: 12px 12px 20px; }
.prc-empty p { margin: 0; font-family: Manrope, "DM Sans", sans-serif; font-size: clamp(19px, 2.7vw, 25px); line-height: 1.35; letter-spacing: -.035em; font-weight: 650; color: #302b45; }
.prc-empty > span:last-child { color: #6e697d; font-size: 13px; }
.prc-empty-icon { position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #fff; background: radial-gradient(circle at 31% 24%, #fff 0%, #f1e8ff 23%, #c2a9f4 50%, #9872df 70%, #e8dcfb 93%); box-shadow: inset 2px 3px 5px rgba(255, 255, 255, .9), inset -3px -4px 8px rgba(95, 58, 166, .2), 0 0 0 5px #f9f6ff, 0 8px 24px rgba(104, 73, 199, .16); }
.prc-empty-icon svg { width: 26px; height: 26px; visibility: hidden; }
.prc-empty-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 52%; height: 58%; transform: translate(-50%, -50%); background: url("/assets/white-p.png") center / contain no-repeat; filter: drop-shadow(0 1px 2px rgba(37, 21, 83, .2)); }
.prc-msg { display: flex; margin: 0 0 12px; }
.prc-msg.user { justify-content: flex-end; }
.prc-bubble { max-width: min(660px, 90%); padding: 11px 15px; border-radius: 15px; overflow-x: auto; font-size: 14px; }
.prc-msg.user .prc-bubble { background: #6849c7; color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 4px 12px rgba(88, 62, 165, .15); }
.prc-msg.bot .prc-bubble { background: #fbfaff; border: 1px solid #e9e4f1; color: var(--text); border-bottom-left-radius: 5px; }
.prc-msg.error .prc-bubble { background: #fff5f5; border: 1px solid #f0d4da; color: var(--error); }
.prc-msg.error > .prc-bubble {
  width: min(100%, 520px);
  max-width: min(520px, 96%);
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 17px 18px 15px;
  overflow: visible;
  border: 1px solid #e5dcf1;
  border-left: 3px solid #8068bd;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff 0%, #faf8ff 100%);
  color: #413a51;
  box-shadow: 0 5px 16px rgba(72, 54, 119, .07);
}
.prc-error-title {
  margin: 0;
  color: #3d3452;
  font-family: Manrope, "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.prc-error-description {
  margin: 0;
  max-width: 54ch;
  color: #575165;
  font-size: 13px;
  line-height: 1.6;
}
.prc-error-refresh {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  padding: 0 15px;
  border: 1px solid #5e43b4;
  border-radius: 10px;
  background: #6849c7;
  color: #fff;
  font: 700 13px/1 "DM Sans", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(82, 58, 125, .12);
  transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.prc-error-refresh::before {
  content: "↻";
  font-size: 17px;
  line-height: 1;
}
.prc-error-refresh:hover {
  background: #573bab;
  box-shadow: 0 3px 8px rgba(82, 58, 125, .2);
  transform: translateY(-1px);
}
.prc-error-refresh:active { transform: translateY(0); }
.prc-error-refresh:focus-visible {
  outline: 3px solid #c3b3e8;
  outline-offset: 3px;
}
.prc-error-note {
  max-width: 56ch;
  color: #5b5365;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}
.prc-error-reference {
  max-width: 100%;
  color: #716b7a;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.prc-bubble p { margin: 0 0 8px; }
.prc-bubble p:last-child { margin-bottom: 0; }
.prc-bubble ul, .prc-bubble ol { margin: 4px 0 8px; padding-left: 18px; }
.prc-bubble li { margin: 2px 0; }
.prc-bubble strong { font-weight: 700; }
.prc-bubble code { background: #f0ebfb; color: #5138a7; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.prc-bubble a { color: #5138a7; font-weight: 700; text-underline-offset: 2px; }
.prc-bubble table { border-collapse: collapse; margin: 8px 0; font-size: 13px; min-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.prc-bubble th, .prc-bubble td { padding: 6px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.prc-bubble th { background: #f5f2fb; color: #5f5872; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.prc-bubble tr:last-child td { border-bottom: 0; }
.prc-bubble tbody tr:hover { background: #faf8fe; }
.prc-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.prc-tool { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #533ca5; background: #f0ebfb; border: 1px solid #e4dcf5; border-radius: 999px; padding: 2px 9px; }
.prc-typing { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.prc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); animation: prc-blink 1s infinite; }
.prc-typing i:nth-child(2) { animation-delay: .2s; }
.prc-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes prc-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.prc-suggest {
  flex: 0 0 108px;
  min-height: 108px;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 7px 10px;
  padding: 7px 10px;
  overflow: hidden;
  border-bottom: 1px solid transparent;
  background: #fff;
}
:scope.prc-results-scrollable .prc-suggest { border-bottom-color: #f0edf5; }
.prc-chip {
  min-width: 0;
  width: auto;
  max-width: none;
  min-height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #544e64;
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(68, 52, 105, .09), 0 1px 2px rgba(68, 52, 105, .045);
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.prc-chip::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background-color: #9b86ce;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1.4 9.35 6.65 14.6 8l-5.25 1.35L8 14.6 6.65 9.35 1.4 8l5.25-1.35L8 1.4Z' fill='%23000'/%3E%3Cpath d='m12.65 1 .55 2.05 2.05.55-2.05.55-.55 2.05-.55-2.05-2.05-.55 2.05-.55L12.65 1Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 1.4 9.35 6.65 14.6 8l-5.25 1.35L8 14.6 6.65 9.35 1.4 8l5.25-1.35L8 1.4Z' fill='%23000'/%3E%3Cpath d='m12.65 1 .55 2.05 2.05.55-2.05.55-.55 2.05-.55-2.05-2.05-.55 2.05-.55L12.65 1Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prc-chip svg { display: none; }
.prc-chip span { min-width: 0; }
.prc-chip:hover { color: #493785; background: #fff; box-shadow: 0 3px 10px rgba(74, 54, 126, .14), 0 1px 3px rgba(74, 54, 126, .07); transform: translateY(-1px); }
.prc-chip:hover::before, .prc-chip:focus-visible::before { background-color: #775bc0; }
.prc-chip:focus-visible { outline: 2px solid #b9a9e2; outline-offset: 3px; color: #493785; }
.prc-chip:disabled { opacity: .5; cursor: default; transform: none; }

#turnstile { flex: none; }
.prc-input {
  flex: none;
  display: flex;
  gap: 9px;
  margin-inline: 12px;
  min-height: 63px;
  padding: 7px;
  align-items: flex-end;
  border: 1px solid #e7e1ef;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(79, 57, 132, .05), 0 0 13px rgba(132, 103, 204, .09), 0 0 18px rgba(177, 161, 217, .07);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.prc-input:focus-within {
  border-color: #c9b9ec;
  box-shadow: 0 5px 16px rgba(79, 57, 132, .07), 0 0 15px rgba(132, 103, 204, .12), 0 0 18px rgba(177, 161, 217, .09);
}
.prc-input textarea { flex: 1; min-width: 0; font: inherit; font-size: 14px; resize: none; height: 45px; max-height: 96px; padding: 11px 12px; border: 0; border-radius: 12px; outline: none; background: transparent; color: var(--text); line-height: 1.5; }
.prc-input textarea::placeholder { color: #777286; }
.prc-input textarea:focus-visible { box-shadow: none; background: transparent; }
.prc-input button { flex: none; min-width: 84px; height: 44px; padding: 0 15px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #8763df, #6240ba); color: #fff; font-family: Manrope, sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), 0 3px 8px rgba(65, 43, 133, .2); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.prc-input button:hover { background: linear-gradient(135deg, #7953d1, #573bab); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), 0 4px 9px rgba(65, 43, 133, .22); }
.prc-input button:active { transform: translateY(1px); }
.prc-input button:focus-visible { outline: 3px solid rgba(104, 73, 199, .32); outline-offset: 2px; }
.prc-input button:disabled { opacity: .42; cursor: not-allowed; }
.prc-foot { flex: none; margin: 0; padding: 10px 4px 2px; font-size: 10.5px; line-height: 1.45; color: #6e697d; text-align: center; }
.prc-foot a { color: #523a9e; text-underline-offset: 2px; }
.prc-foot a:hover { color: #392579; }
.prc-foot a:focus-visible { outline: 2px solid #8f76d6; outline-offset: 2px; border-radius: 2px; }

.prc-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(57, 46, 81, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: prc-fade .2s ease-out; }
.prc-modal-card { position: relative; width: min(380px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 26px 24px 20px; border-radius: 20px; background: linear-gradient(145deg, #fff 0%, #fcfaff 100%); border: 1px solid #e6def2; box-shadow: 0 24px 64px rgba(56, 42, 94, .18), 0 3px 10px rgba(56, 42, 94, .06); text-align: center; }
.prc-modal-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #62558a; margin-bottom: 6px; }
.prc-modal-card h3 { margin: 0 0 8px; color: #302b45; font-family: Manrope, sans-serif; font-size: 20px; font-weight: 650; line-height: 1.3; }
.prc-modal-text { margin: 0 0 18px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.prc-modal-actions { display: grid; gap: 6px; }
.prc-modal-cta { display: block; padding: 11px 18px; border-radius: 12px; background: linear-gradient(105deg, #6042bb, #795dd0); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: 0 4px 12px rgba(88, 62, 165, .18); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.prc-modal-cta:hover, .prc-modal-cta:focus-visible { background: linear-gradient(105deg, #5135a8, #6849c0); transform: translateY(-1px); outline: none; box-shadow: 0 0 0 3px var(--purple-line), 0 5px 13px rgba(88, 62, 165, .2); }
.prc-modal-later { font: inherit; font-size: 13px; padding: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.prc-modal-later:hover { color: #4d369d; }
.prc-modal-later:focus-visible, .prc-modal-close:focus-visible { outline: 3px solid rgba(104, 73, 199, .3); outline-offset: 2px; }
.prc-modal-close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; font-size: 20px; line-height: 1; color: var(--faint); cursor: pointer; }
.prc-modal-close:hover { background: #f2eef9; color: var(--text); }
@keyframes prc-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 680px) {
  .prc-stage.prc-mcp-stage { padding: 8px; }
  :scope { height: min(var(--widget-h), calc(100dvh - 16px)); }
  .prc-status { font-size: 10px; padding: 4px 8px; gap: 6px; }
  .prc-log { padding: 8px 4px 12px; }
  .prc-empty { gap: 12px; }
  .prc-empty-icon { width: 49px; height: 49px; border-radius: 50%; }
  .prc-suggest { flex-basis: 188px; min-height: 188px; gap: 7px 8px; padding: 7px 8px 11px; }
  .prc-chip { min-height: 32px; gap: 5px; padding: 4px 9px 4px 8px; font-size: 11px; }
  .prc-chip::before { width: 12px; height: 12px; flex-basis: 12px; }
  .prc-input { min-height: 59px; padding: 6px; gap: 6px; border-radius: 999px; }
  .prc-input textarea { height: 43px; font-size: 16px; padding: 10px; }
  .prc-input button { min-width: 72px; height: 42px; padding: 0 12px; border-radius: 999px; }
  .prc-foot { padding: 8px 2px 1px; font-size: 10px; }
  .prc-bubble { max-width: 96%; }
}
@media (max-width: 390px) {
  .prc-suggest { gap: 6px 7px; padding-inline: 5px; }
  .prc-chip { min-height: 30px; gap: 4px; padding-inline: 7px; font-size: 10.5px; }
}
@media (max-height: 520px) {
  .prc-suggest { flex-basis: 144px; min-height: 144px; gap: 5px 8px; }
  .prc-chip { min-height: 28px; font-size: 10.5px; }
  .prc-empty { gap: 8px; }
  .prc-empty-icon { width: 40px; height: 40px; border-radius: 50%; }
  .prc-empty-icon svg { width: 22px; height: 22px; }
  .prc-empty p { font-size: 18px; }
  .prc-foot { padding-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  .prc-suggest { flex-basis: 252px; min-height: 252px; gap: 6px 7px; padding: 7px 5px 11px; }
}
}
