.native-tool {
  --nt-ink: #152445;
  --nt-muted: #566580;
  --nt-blue: #294bd8;
  --nt-line: #dce3ef;
  width: min(100%, 880px);
  margin-inline: auto;
  color: var(--nt-ink);
  font: inherit;
}
.native-tool *, .native-tool *::before, .native-tool *::after { box-sizing: border-box; }
.native-tool [hidden] { display: none !important; }
.native-tool .nt-source-note {margin:10px 0;color:#65501b;background:#fff6dc;border-radius:12px;padding:9px 13px;font-size:.9rem;}
.native-tool button, .native-tool textarea, .native-tool a { font: inherit; }
.native-tool button { cursor: pointer; }
.native-tool button:disabled { cursor: default; }
.native-tool :focus-visible { outline: 3px solid #5e78ed; outline-offset: 3px; }
.native-tool .nt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.native-tool .nt-tools-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 clamp(1rem, 3vw, 2.2rem); }
.native-tool .nt-tools-head h1 { margin: 0; font-size: clamp(2.05rem, 4.2vw, 3.2rem); font-weight: 680; line-height: 1.06; letter-spacing: -.055em; color: var(--nt-ink); }
.native-tool .nt-head-actions, .native-tool .nt-result-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.native-tool .nt-text-btn, .native-tool .nt-copy {
  border: 0; background: transparent; color: var(--nt-blue); font-size: .92rem;
  padding: .65rem .6rem; border-radius: .65rem; font-weight: 650; text-decoration: none;
}
.native-tool .nt-text-btn:hover, .native-tool .nt-copy:hover { background: #edf1ff; }
.native-tool .nt-primary {
  display: inline-flex; justify-content: center; align-items: center; min-height: 46px;
  padding: .72rem 1.2rem; background: var(--nt-blue); border: 1px solid transparent;
  border-radius: .88rem; color: #fff; font-size: 1rem; font-weight: 680; text-decoration: none;
}
.native-tool .nt-primary:hover, .native-tool .nt-send:hover:enabled { background: #193ab8; }
.native-tool .nt-hint { display: block; color: var(--nt-muted); font-size: .85rem; line-height: 1.5; margin: .85rem 0; }
.native-tool .nt-chat-empty { text-align: center; display: grid; justify-items: center; align-content: center; padding: clamp(1.75rem, 5vh, 4rem) 1rem; }
.native-tool .nt-scout { width: clamp(92px, 11vw, 136px); height: auto; object-fit: contain; margin-bottom: 1.05rem; }
.native-tool h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); font-weight: 650; line-height: 1.15; letter-spacing: -.046em; margin: 0 0 .8rem; color: var(--nt-ink); }
.native-tool .nt-prompts { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.native-tool .nt-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border: 1px solid #d5def8; border-radius: 3rem; padding: .65rem .95rem;
  background: #f0f3ff; color: #283a75; font-size: .95rem; font-weight: 580; line-height: 1.35;
  transition: background-color .16s, transform .16s;
}
.native-tool .nt-chip:hover { background: #e4eaff; transform: translateY(-2px); }
.native-tool .nt-pick-action { display: flex; padding-block: .45rem .65rem; }
.native-tool .nt-pick { min-height: 44px; color: var(--nt-blue); background: #f4f6ff; font-weight: 650; }
.native-tool .nt-pick:disabled { background: #f2f4f9; border-color: var(--nt-line); color: var(--nt-muted); transform: none; }
.native-tool .nt-pick-time { margin: .4rem .55rem 0; color: var(--nt-muted); font-size: .8rem; }
.native-tool .nt-composer {
  display: flex; align-items: flex-end; gap: .75rem; background: #fff; border: 1px solid #ccd6ec;
  border-radius: 1.5rem; padding: .9rem; box-shadow: 0 8px 28px #3349780c; margin: 0;
}
.native-tool .nt-composer:focus-within { border-color: #7086e3; box-shadow: 0 0 0 3px #dfe6ff; }
.native-tool .nt-composer textarea {
  border: 0; resize: vertical; background: transparent; flex: 1; min-width: 0; border-radius: 0;
  color: var(--nt-ink); font-size: 1.08rem; line-height: 1.5; padding: .45rem; min-height: 3.8rem; max-height: 12rem;
}
.native-tool .nt-composer textarea:focus { outline: none; }
.native-tool textarea::placeholder { color: #687690; opacity: 1; }
.native-tool .nt-send {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; padding: 0;
  border-radius: 50%; background: var(--nt-blue); color: #fff;
}
.native-tool .nt-send:disabled { background: #e7ebf5; color: #78849e; }
.native-tool .nt-send svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.native-tool .nt-thread {
  display: flex; flex-direction: column; gap: 1.1rem; overflow-y: auto; overflow-x: hidden;
  max-height: max(42vh, 275px); padding: .35rem .55rem 1rem .15rem; overscroll-behavior: contain;
}
.native-tool .nt-message { display: grid; justify-items: start; max-width: 92%; margin: 0; }
.native-tool .nt-message.nt-user { align-self: flex-end; justify-items: end; }
.native-tool .nt-by { color: var(--nt-muted); margin: 0 .55rem .24rem; font-size: .78rem; font-weight: 650; }
.native-tool .nt-bubble { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--nt-line); padding: .85rem 1.1rem; border-radius: 1.1rem; font-size: 1.03rem; line-height: 1.52; }
.native-tool .nt-assistant { min-width: 0; }
.native-tool .nt-assistant .nt-bubble { max-width: 100%; min-width: 0; white-space: normal; }
.native-tool .nt-assistant .nt-bubble.nt-writing { white-space: pre-wrap; }
.native-tool .nt-bubble p, .native-tool .nt-bubble ul, .native-tool .nt-bubble ol, .native-tool .nt-bubble h3, .native-tool .nt-bubble pre { margin: 0 0 .65rem; }
.native-tool .nt-bubble > :last-child { margin-bottom: 0; }
.native-tool .nt-bubble ul, .native-tool .nt-bubble ol { padding-inline-start: 1.45rem; }
.native-tool .nt-bubble h3 { color: var(--nt-ink); font-size: 1.08rem; }
.native-tool .nt-bubble a { color: var(--nt-blue); text-decoration: underline; text-underline-offset: .15em; }
.native-tool .nt-bubble pre, .native-tool .nt-table-scroll { max-width: 100%; overflow-x: auto; }
.native-tool .nt-bubble pre, .native-tool .nt-bubble code { background: #f2f5fb; border-radius: .3rem; padding: .1rem .2rem; font-size: .9em; }
.native-tool .nt-bubble pre { padding: .65rem; }
.native-tool .nt-table-scroll { margin: .6rem 0; }
.native-tool .nt-table-scroll table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.native-tool .nt-table-scroll th, .native-tool .nt-table-scroll td { padding: .5rem .65rem; text-align: start; border-bottom: 1px solid var(--nt-line); }
.native-tool .nt-table-scroll th { background: #f4f6fc; }
.native-tool .nt-user .nt-bubble { border-color: #dce3fd; background: #e9eeff; color: #1f3578; }
.native-tool .nt-copy { min-height: 35px; font-size: .8rem; padding: .35rem .55rem; }
.native-tool .nt-error { padding: .7rem 1rem; border-radius: .75rem; color: #762936; background: #fff0f0; line-height: 1.55; font-size: .96rem; }
.native-tool .nt-error a, .native-tool .nt-hint a { color: inherit; text-decoration: underline; }
.native-tool .nt-confirm { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; background: #fff7e7; padding: .4rem .75rem; border-radius: .7rem; margin-bottom: .5rem; }
.native-tool .nt-danger { color: #982f3b; }
.native-tool .nt-working { display: inline-flex; align-items: center; gap: .65rem; color: #3c527e; padding: .75rem .15rem; font-size: .96rem; font-weight: 600; }
.native-tool .nt-working i { width: 19px; height: 19px; border-radius: 50%; border: 3px solid #dbe3ff; border-top-color: var(--nt-blue); animation: nt-spin .7s linear infinite; }
@keyframes nt-spin { to { transform: rotate(1turn); } }
.native-tool .nt-surface { background: #fff; border: 1px solid var(--nt-line); border-radius: 1.6rem; padding: clamp(1rem, 3vw, 2rem); }
.native-tool .nt-drop {
  display: grid; justify-items: center; align-content: center; gap: .6rem; min-height: 255px;
  padding: clamp(1rem, 3vw, 2rem); border: 1.5px dashed #bfcde7; border-radius: 1.1rem;
  background: linear-gradient(150deg, #f8f9ff, #f1f5ff); text-align: center;
}
.native-tool.nt-dragging .nt-drop { border-color: var(--nt-blue); background: #e4ecff; }
.native-tool .nt-drop h2, .native-tool .nt-drop p { margin: 0; }
.native-tool .nt-drop .nt-primary { margin-top: .35rem; }
.native-tool .nt-drop p, .native-tool .nt-drop small, .native-tool .nt-scan-form small { color: var(--nt-muted); }
.native-tool .nt-upload-icon { display: grid; place-items: center; font-size: 2.5rem; width: 4rem; height: 4rem; }
.native-tool .nt-thumbnails { display: flex; align-items: flex-start; justify-content: center; gap: .65rem; flex-wrap: wrap; }
.native-tool .nt-thumbnail { position: relative; width: 96px; margin: .3rem 0; }
.native-tool .nt-thumbnail img { display: block; width: 96px; height: 72px; object-fit: contain; background: #fff; border-radius: .55rem; border: 1px solid var(--nt-line); }
.native-tool .nt-thumbnail figcaption { font-size: .75rem; margin: .25rem 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.native-tool .nt-thumbnail button { position: absolute; right: -6px; top: -6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--nt-line); background: white; color: #182c57; font-size: 1rem; }
.native-tool .nt-scan-form { display: grid; gap: .5rem; padding-top: 1.3rem; }
.native-tool .nt-scan-form label { font-weight: 650; font-size: 1.05rem; }
.native-tool .nt-scan-form small { font-size: .78rem; font-weight: 500; margin-left: .25rem; }
.native-tool .nt-scan-form textarea { width: 100%; border: 1px solid var(--nt-line); border-radius: .9rem; background: #fff; padding: .65rem .85rem; resize: vertical; line-height: 1.5; font-size: 1rem; }
.native-tool .nt-analyze-actions { margin-top: .3rem; }
.native-tool .nt-sample-action { text-align: center; margin-top: .6rem; }
.native-tool.nt-vision > .nt-hint { text-align: center; }
.native-tool .nt-result-label { display: inline-block; color: #394fc4; margin-bottom: .6rem; font-weight: 650; font-size: .87rem; }
.native-tool .nt-summary, .native-tool .nt-result p, .native-tool .nt-detail li { font-size: 1.02rem; line-height: 1.6; overflow-wrap: anywhere; }
.native-tool .nt-market-rows { overflow-x: auto; }
.native-tool table { border-collapse: collapse; width: 100%; font-size: 1.07rem; }
.native-tool td, .native-tool th { padding: .7rem .25rem; text-align: left; border-bottom: 1px solid var(--nt-line); }
.native-tool thead th { font-size: .82rem; color: var(--nt-muted); font-weight: 580; }
.native-tool td:last-child, .native-tool thead th:last-child { text-align: right; }
.native-tool .nt-call { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.native-tool .nt-call strong { color: #2d4387; background: #ebeffe; padding: .4rem .7rem; border-radius: .6rem; }
.native-tool .nt-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: .7rem; }
.native-tool .nt-metrics div { padding: .75rem; border-radius: .7rem; background: #f3f5fc; }
.native-tool .nt-metrics dt { font-size: .78rem; color: var(--nt-muted); }
.native-tool .nt-metrics dd { font-weight: 650; margin: .25rem 0 0; }
.native-tool .nt-detail { padding: .75rem 0; border-bottom: 1px solid var(--nt-line); }
.native-tool summary { cursor: pointer; font-weight: 620; }
.native-tool .nt-result-actions { margin-top: 1.3rem; }
.native-tool .nt-history-row { display: flex; justify-content: space-between; align-items: center; gap: .7rem; width: 100%; background: #fff; color: var(--nt-ink); border: 0; border-bottom: 1px solid var(--nt-line); padding: .85rem .25rem; text-align: left; }
.native-tool .nt-history-row:hover { background: #f3f5fc; }
.native-tool .nt-history-row small { display: block; color: var(--nt-muted); margin-top: .2rem; }
@media(max-width:600px) {
  .native-tool .nt-tools-head { align-items: flex-start; }
  .native-tool .nt-head-actions { display: grid; justify-items: end; gap: 0; }
  .native-tool .nt-head-actions .nt-text-btn { font-size: .84rem; padding: .45rem; }
  .native-tool .nt-chip { font-size: .89rem; padding: .6rem .8rem; }
  .native-tool .nt-chat-empty { padding-inline: .1rem; }
  .native-tool .nt-message { max-width: 96%; }
  .native-tool .nt-composer { border-radius: 1.2rem; padding: .65rem; }
}
@media(prefers-reduced-motion:reduce) {
  .native-tool *, .native-tool *::before, .native-tool *::after { animation: none !important; transition: none !important; }
}
