html,
body {
  touch-action: manipulation;
}

body {
  overflow: hidden;
}

button,
[role="button"],
a,
label,
input,
textarea,
select {
  touch-action: manipulation;
}

button,
[role="button"] {
  -webkit-user-select: none;
  user-select: none;
}

@supports (-webkit-touch-callout: none) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

#lookup-input {
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  color: var(--ink);
  caret-color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  -webkit-text-fill-color: var(--ink);
  opacity: 1;
}

#lookup-input::placeholder {
  color: #85878e;
  -webkit-text-fill-color: #85878e;
  opacity: 1;
}

.capture-input-shell {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.capture-input-shell .search-submit,
.capture-input-shell .input-clear {
  position: static;
  inset: auto;
  width: 40px;
  height: 44px;
  transform: none;
}

#view {
  height: 100dvh;
  overflow: hidden;
}

.record-result .example {
  padding-left: 0;
  border-left: 0;
}

.library-filter-bar .desktop-more-filter {
  display: none;
}

.metric-tile {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
}

.review-card {
  align-self: stretch;
  width: 100%;
}

.review-dialog,
.review-session {
  touch-action: manipulation;
  overscroll-behavior: none;
}

.review-controls {
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}

.review-answer-grid {
  gap: 10px;
}

.review-answer {
  min-height: 104px;
  border-radius: 8px;
}

.review-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.review-secondary-actions button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.review-secondary-actions button > svg {
  width: 18px;
  height: 18px;
  margin: auto;
}

.review-secondary-actions span,
.review-secondary-actions strong,
.review-secondary-actions small {
  display: block;
  min-width: 0;
}

.review-secondary-actions strong {
  font-size: 0.72rem;
}

.review-secondary-actions small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-action="speak"].is-loading,
[data-review-action="speak"].is-loading {
  opacity: 0.6;
}

[data-action="speak"].is-speaking,
[data-review-action="speak"].is-speaking {
  color: #238449;
}

.audio-prompt.is-speaking {
  color: #fff;
  background: #238449;
}

.audio-prompt.is-loading svg {
  animation: speech-pulse 800ms ease-in-out infinite alternate;
}

@keyframes speech-pulse {
  from {
    transform: scale(0.88);
    opacity: 0.62;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .audio-prompt.is-loading svg {
    animation: none;
  }
}

@media (max-height: 700px) {
  .review-card {
    min-height: 220px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .review-answer {
    min-height: 88px;
  }
}

.lookup-provider {
  margin: 6px 0 0;
  color: #8b8d94;
  font-size: 0.58rem;
}

.lookup-source-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  scrollbar-width: none;
}

.lookup-source-strip::-webkit-scrollbar {
  display: none;
}

.lookup-source-strip span {
  flex: 0 0 auto;
  color: #85878e;
  font-size: 0.6rem;
}

.lookup-source-strip button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.66rem;
  background: #f4f4f6;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.dictionary-manager-intro {
  padding: 4px 2px 8px;
}

.dictionary-manager-intro strong {
  font-size: 0.88rem;
}

.dictionary-manager-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

@media (min-width: 900px) {
  .library-filter-bar .desktop-more-filter {
    display: inline-flex;
  }
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-assist {
  min-height: 16px;
  margin: -8px 1px 0;
  color: #777a82;
  font-size: 0.68rem;
  line-height: 1.45;
}

.feature-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pack-content,
.smart-import-content,
.dictionary-list,
.settings-content {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.pack-content {
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
}

.pack-hero {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 4px 0 18px;
}

.pack-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: #101113;
  border-radius: 8px;
}

.pack-icon svg {
  width: 24px;
  height: 24px;
}

.pack-hero p,
.pack-hero h3,
.pack-hero span {
  margin: 0;
}

.pack-hero p {
  color: #7c7e85;
  font-size: 0.62rem;
  font-weight: 750;
}

.pack-hero h3 {
  margin-top: 3px;
  font-size: 1.12rem;
}

.pack-hero span {
  display: block;
  margin-top: 5px;
  color: #62646b;
  font-size: 0.72rem;
}

.pack-progress {
  height: 5px;
  overflow: hidden;
  background: #e9eaed;
  border-radius: 3px;
}

.pack-progress span {
  display: block;
  height: 100%;
  background: #111214;
  border-radius: inherit;
}

.pack-section {
  padding: 19px 0 5px;
  border-bottom: 1px solid #e7e8eb;
}

.pack-section h4 {
  margin: 0 0 10px;
  color: #25262a;
  font-size: 0.76rem;
}

.pack-category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.pack-category-list div,
.pack-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}

.pack-category-list div {
  color: #55575e;
  font-size: 0.74rem;
  border-bottom: 1px solid #f0f0f2;
}

.pack-category-list strong {
  color: #1c1d20;
}

.pack-source-row + .pack-source-row {
  border-top: 1px solid #f0f0f2;
}

.pack-source-row span {
  min-width: 0;
}

.pack-source-row strong,
.pack-source-row small {
  display: block;
}

.pack-source-row strong {
  overflow: hidden;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-source-row small {
  margin-top: 3px;
  color: #777a82;
  font-size: 0.66rem;
}

.pack-source-row button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #4f5157;
  background: transparent;
  border: 0;
}

.pack-source-row button svg {
  width: 16px;
  height: 16px;
}

.pack-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 20px;
}

.pack-actions .button {
  min-width: 128px;
}

.smart-import-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.smart-import-stages {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  min-width: 320px;
  margin: 0;
  padding: 12px 10px 11px;
  list-style: none;
  background: #fafafa;
  border-bottom: 1px solid #e5e6e9;
}

.smart-import-stages li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  color: #8a8d94;
  text-align: center;
}

.smart-import-stages li::after {
  position: absolute;
  z-index: 0;
  top: 11px;
  left: calc(50% + 13px);
  width: calc(100% - 26px);
  height: 1px;
  background: #d9dadd;
  content: "";
}

.smart-import-stages li:last-child::after {
  display: none;
}

.smart-import-stages li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-size: 0.61rem;
  font-weight: 700;
  background: #f2f2f3;
  border: 1px solid #d8d9dc;
  border-radius: 50%;
}

.smart-import-stages li > span svg {
  width: 12px;
  height: 12px;
}

.smart-import-stages li small {
  overflow-wrap: anywhere;
  font-size: 0.58rem;
  line-height: 1.25;
}

.smart-import-stages li.is-done,
.smart-import-stages li.is-active {
  color: #17181b;
}

.smart-import-stages li.is-done::after {
  background: #17181b;
}

.smart-import-stages li.is-done > span,
.smart-import-stages li.is-active > span {
  color: #fff;
  background: #17181b;
  border-color: #17181b;
}

.smart-import-stages li.is-active > span {
  box-shadow: 0 0 0 3px rgba(23, 24, 27, 0.1);
}

.smart-import-recovery {
  display: grid;
  flex: 1;
  min-height: 420px;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 30px 24px;
  text-align: center;
}

.smart-import-recovery-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 3px;
  place-items: center;
  color: #fff;
  background: #17181b;
  border-radius: 50%;
}

.smart-import-recovery-icon svg {
  width: 23px;
  height: 23px;
}

.smart-import-recovery h3,
.smart-import-recovery p {
  margin: 0;
}

.smart-import-recovery h3 {
  color: #17181b;
  font-size: 1rem;
}

.smart-import-recovery p:not(.system-kicker) {
  color: #555861;
  font-size: 0.76rem;
  line-height: 1.55;
}

.smart-import-recovery > small {
  max-width: 340px;
  color: #858890;
  font-size: 0.65rem;
  line-height: 1.5;
}

.smart-import-recovery-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 9px;
  width: min(100%, 340px);
  margin-top: 10px;
}

.smart-import-live {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: #f4f5f7;
  border-bottom: 1px solid #dde0e4;
}

.smart-import-live > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #17181b;
  border-radius: 50%;
}

.smart-import-live > span svg {
  width: 17px;
  height: 17px;
  animation: smart-import-spin 0.9s linear infinite;
}

.smart-import-live p {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
}

.smart-import-live strong {
  color: #17181b;
  font-size: 0.74rem;
}

.smart-import-live small {
  overflow: hidden;
  color: #696c74;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-import-live button {
  min-height: 36px;
  padding: 7px 10px;
  color: #17181b;
  font: inherit;
  font-size: 0.69rem;
  font-weight: 650;
  background: #fff;
  border: 1px solid #cfd1d6;
  border-radius: 6px;
}

.smart-import-input {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
}

.smart-import-input textarea {
  flex: 1;
  width: 100%;
  min-height: 260px;
  padding: 14px;
  color: #17181b;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.65;
  resize: none;
  background: #f7f7f8;
  border: 1px solid #dfe0e3;
  border-radius: 8px;
  outline: 0;
}

.smart-import-input textarea:focus {
  background: #fff;
  border-color: #1b1c1f;
  box-shadow: 0 0 0 2px rgba(17, 18, 20, 0.08);
}

.smart-import-input-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.smart-import-input-actions [data-smart-action="analyze"],
.smart-import-input-actions [data-smart-action="open-wechat-demo"] {
  grid-column: 1 / -1;
}

.smart-import-wechat-demo {
  position: relative;
  justify-content: flex-start;
  color: #202320;
  background: #f6fbf7;
  border-color: #c7dfce;
}

.smart-import-wechat-demo > svg {
  color: #079644;
}

.smart-import-wechat-demo small {
  margin-left: auto;
  padding: 3px 6px;
  color: #087a3a;
  font-size: 0.6rem;
  font-weight: 700;
  background: #e1f5e7;
  border-radius: 4px;
}

.wechat-import-dialog {
  width: min(430px, 100%);
  height: min(860px, calc(100dvh - 28px));
  max-width: 100%;
  max-height: 100dvh;
  padding: 0;
  overflow: hidden;
  color: #191b1e;
  background: #ededed;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.wechat-import-dialog[open] {
  display: block;
}

.wechat-import-dialog::backdrop {
  background: rgba(30, 32, 36, 0.58);
  backdrop-filter: blur(8px);
}

.wechat-import-content,
.wechat-demo-shell {
  width: 100%;
  height: 100%;
}

.wechat-demo-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #ededed;
}

.wechat-demo-shell.is-chat {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.wechat-demo-topbar {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  min-height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  background: #ededed;
  border-bottom: 1px solid #d7d7d7;
}

.wechat-demo-topbar.is-root {
  border-bottom-color: transparent;
}

.wechat-demo-topbar button,
.wechat-demo-composer button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: #17191b;
  background: transparent;
  border: 0;
}

.wechat-demo-topbar button svg,
.wechat-demo-composer button svg {
  width: 23px;
  height: 23px;
}

.wechat-demo-topbar h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 690;
  letter-spacing: 0;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-demo-topbar h2 small {
  color: #6f7275;
  font-size: 0.75em;
  font-weight: 560;
}

.wechat-demo-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  margin: 2px 10px 8px;
  color: #8c8f92;
  font-size: 0.82rem;
  background: #fff;
  border-radius: 5px;
}

.wechat-demo-search svg {
  width: 16px;
  height: 16px;
}

.wechat-demo-chat-list {
  overflow-y: auto;
  background: #fff;
}

.wechat-demo-chat-list > :is(button, .wechat-demo-chat-row) {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 8px 12px;
  color: inherit;
  font: inherit;
  text-align: left;
  background: #fff;
  border: 0;
}

.wechat-demo-chat-list > button:active {
  background: #e8e8e8;
}

.wechat-demo-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 720;
  border-radius: 5px;
}

.wechat-demo-avatar svg {
  width: 24px;
  height: 24px;
}

.wechat-demo-avatar.is-indigo { background: #5d649f; }
.wechat-demo-avatar.is-green { background: #3a9a68; }
.wechat-demo-avatar.is-coral { background: #d97c66; }
.wechat-demo-avatar.is-blue { background: #5484a8; }

.wechat-demo-chat-copy {
  display: grid;
  align-self: stretch;
  align-content: center;
  min-width: 0;
  padding-left: 10px;
  border-bottom: 1px solid #ededed;
}

.wechat-demo-chat-copy strong,
.wechat-demo-chat-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-demo-chat-copy strong {
  font-size: 0.93rem;
  font-weight: 570;
}

.wechat-demo-chat-copy small {
  margin-top: 4px;
  color: #989a9d;
  font-size: 0.73rem;
}

.wechat-demo-chat-meta {
  display: grid;
  align-self: stretch;
  justify-items: end;
  align-content: center;
  min-width: 46px;
  gap: 8px;
  border-bottom: 1px solid #ededed;
}

.wechat-demo-chat-meta time {
  color: #aaa;
  font-size: 0.62rem;
}

.wechat-demo-chat-meta i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  font-size: 0.62rem;
  font-style: normal;
  background: #f04444;
  border-radius: 50%;
}

.wechat-demo-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #f7f7f7;
  border-top: 1px solid #d7d7d7;
}

.wechat-demo-tabs span {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #6c6e71;
}

.wechat-demo-tabs span.is-active {
  color: #07a649;
}

.wechat-demo-tabs svg {
  width: 22px;
  height: 22px;
}

.wechat-demo-tabs small {
  font-size: 0.59rem;
}

.wechat-demo-conversation {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 14px 12px 24px;
  overflow-y: auto;
}

.wechat-demo-conversation > time {
  align-self: center;
  color: #939598;
  font-size: 0.65rem;
}

.wechat-demo-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.wechat-demo-message .wechat-demo-avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 0.82rem;
}

.wechat-demo-message > p {
  max-width: 72%;
  margin: 0;
  padding: 10px 12px;
  font-size: 0.83rem;
  line-height: 1.5;
  background: #fff;
  border-radius: 5px;
}

.wechat-demo-message.is-outgoing {
  justify-content: flex-end;
}

.wechat-demo-message.is-outgoing > p {
  background: #95ec69;
}

.wechat-demo-document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  width: min(270px, calc(100vw - 90px));
  padding: 13px 12px 0;
  overflow: hidden;
  color: #222;
  font: inherit;
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: 5px;
}

.wechat-demo-document:active {
  background: #f4f4f4;
}

.wechat-demo-document-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
}

.wechat-demo-document-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 570;
  line-height: 1.35;
}

.wechat-demo-document-copy small {
  color: #999;
  font-size: 0.64rem;
}

.wechat-demo-document-icon {
  display: grid;
  width: 44px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: #344b78;
  border-radius: 3px;
}

.wechat-demo-document-icon svg {
  width: 25px;
  height: 25px;
}

.wechat-demo-document em {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 7px 0;
  color: #aaa;
  font-size: 0.6rem;
  font-style: normal;
  border-top: 1px solid #ededed;
}

.wechat-demo-composer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
  align-items: center;
  min-height: calc(58px + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  background: #f7f7f7;
  border-top: 1px solid #d7d7d7;
}

.wechat-demo-composer > span {
  height: 38px;
  background: #fff;
  border-radius: 4px;
}

.wechat-demo-handoff {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background: #f7f7f7;
}

.wechat-demo-handoff-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #fff;
  background: #07a649;
  border-radius: 16px;
}

.wechat-demo-handoff-mark svg {
  width: 32px;
  height: 32px;
}

.wechat-demo-handoff strong {
  margin-top: 6px;
  font-size: 1rem;
}

.wechat-demo-handoff p {
  margin: 0;
  color: #777a7d;
  font-size: 0.75rem;
}

.wechat-demo-progress {
  width: 160px;
  height: 3px;
  margin-top: 10px;
  overflow: hidden;
  background: #dedede;
  border-radius: 2px;
}

.wechat-demo-progress i {
  display: block;
  width: 45%;
  height: 100%;
  background: #07a649;
  animation: wechat-demo-progress 850ms ease-in-out infinite;
}

@keyframes wechat-demo-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(330%); }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-demo-progress i {
    animation: none;
    transform: none;
  }
}

.smart-import-context-note {
  display: block;
  margin-top: 10px;
  padding: 9px 10px;
  color: #6f4b00;
  font-size: 0.68rem;
  line-height: 1.5;
  background: #fff8e1;
  border: 1px solid #f1dfa2;
  border-radius: 6px;
}

.smart-import-engine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: #777a82;
  font-size: 0.66rem;
}

.smart-import-engine svg {
  width: 14px;
  height: 14px;
}

.smart-import-consent {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  margin-top: 12px;
  padding: 12px;
  background: #f5f6f8;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
}

.smart-import-consent-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #111216;
  border-radius: 50%;
}

.smart-import-consent-icon svg {
  width: 17px;
  height: 17px;
}

.smart-import-consent-copy {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.smart-import-consent-copy strong {
  color: #17181b;
  font-size: 0.78rem;
}

.smart-import-consent-copy small {
  color: #6d7078;
  font-size: 0.65rem;
  line-height: 1.45;
}

.smart-import-consent-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8px;
}

.smart-import-send-preview {
  display: block;
  grid-column: 1 / -1;
  max-height: 78px;
  overflow: hidden;
  padding: 9px 10px;
  color: #555861;
  font-size: 0.64rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid #e1e3e7;
  border-radius: 6px;
}

.smart-import-send-preview b {
  display: block;
  margin-bottom: 3px;
  color: #25272c;
  font-size: 0.6rem;
}

.smart-import-sampling-note {
  display: block;
  padding: 8px 10px;
  color: #6f4b00;
  font-size: 0.64rem;
  line-height: 1.5;
  background: #fff8e1;
  border: 1px solid #f1dfa2;
  border-radius: 6px;
}

.smart-import-progress {
  display: grid;
  flex: 1;
  min-height: 420px;
  padding: 24px;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.smart-import-progress-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  place-items: center;
  color: #fff;
  background: #111216;
  border-radius: 50%;
}

.smart-import-progress-icon svg {
  width: 24px;
  height: 24px;
  animation: smart-import-spin 0.9s linear infinite;
}

.smart-import-progress strong {
  color: #17181b;
  font-size: 0.96rem;
}

.smart-import-progress p {
  max-width: 280px;
  margin: 0 0 8px;
  color: #73767d;
  font-size: 0.72rem;
  line-height: 1.55;
}

.smart-import-progress .button {
  min-width: 132px;
}

.smart-import-retry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #704a00;
  font-size: 0.72rem;
  line-height: 1.45;
  background: #fff7df;
  border-bottom: 1px solid #ead79e;
}

.smart-import-retry button {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: #111214;
  font: inherit;
  font-weight: 650;
  background: #fff;
  border: 1px solid #d6c17f;
  border-radius: 6px;
}

.mobile-word-swipe {
  position: relative;
  overflow: hidden;
  background: #d92d20;
  border-bottom: 1px solid #e7e8eb;
  touch-action: pan-y;
}

.mobile-word-swipe:last-child {
  border-bottom: 0;
}

.mobile-word-swipe .mobile-word-row {
  position: relative;
  z-index: 1;
  min-height: 64px;
  background: #fff;
  border-bottom: 0;
  transition: transform 180ms ease;
  will-change: transform;
}

.mobile-word-swipe.is-open .mobile-word-row {
  transform: translateX(-78px);
}

.swipe-delete-button {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  width: 78px;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 750;
  background: #d92d20;
  border: 0;
}

.swipe-delete-button[aria-hidden="true"] {
  visibility: hidden;
}

.swipe-delete-button svg {
  width: 18px;
  height: 18px;
}

.mobile-word-select-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 64px;
  gap: 11px;
  padding: 9px 11px;
  border-bottom: 1px solid #e7e8eb;
}

.mobile-word-select-row:last-child {
  border-bottom: 0;
}

.mobile-word-select-row > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mobile-word-select-row > time {
  color: #83858c;
  font-size: 0.58rem;
}

.library-select-check {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: transparent;
  border: 1.5px solid #b8bbc2;
  border-radius: 50%;
}

.library-select-check svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.mobile-word-select-row.is-selected {
  background: #f5f6f8;
}

.mobile-word-select-row.is-selected .library-select-check {
  color: #fff;
  background: #111216;
  border-color: #111216;
}

.library-selection-cancel {
  min-height: 40px;
  padding: 0 4px;
  font-size: 0.76rem;
  font-weight: 750;
}

.word-table-row.is-selected {
  background: #f3f4f6;
}

.library-batch-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  gap: 10px;
  padding: 8px 2px 0;
}

.library-batch-footer.is-confirming {
  display: block;
}

.library-batch-confirm {
  display: grid;
  min-height: 70px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: #5b1713;
  background: #fff4f2;
  border: 1px solid #f2c5c1;
  border-radius: 8px;
}

.library-batch-confirm > strong {
  font-size: 0.76rem;
  text-align: center;
}

.library-batch-confirm > div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.library-batch-confirm .button {
  width: 100%;
  min-height: 42px;
}

.word-delete-confirm {
  display: grid;
  gap: 8px;
  padding: 12px;
  color: #5b1713;
  background: #fff4f2;
  border: 1px solid #f2c5c1;
  border-radius: 8px;
}

.word-delete-confirm > strong {
  font-size: 0.82rem;
}

.word-delete-confirm > span {
  color: #7c3d38;
  font-size: 0.68rem;
}

.word-delete-confirm > div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.word-delete-confirm .button {
  width: 100%;
}

.inline-danger-confirm {
  display: grid;
  gap: 10px;
  padding: 12px;
  color: #5b1713;
  background: #fff4f2;
  border: 1px solid #f2c5c1;
  border-radius: 8px;
}

.inline-danger-confirm > strong {
  font-size: 0.76rem;
  line-height: 1.45;
}

.inline-danger-confirm > div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.inline-danger-confirm .button {
  width: 100%;
}

.library-batch-footer > button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 750;
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.library-batch-footer > button:last-child {
  justify-self: end;
}

.library-batch-footer > button svg {
  width: 17px;
  height: 17px;
}

.library-batch-footer > strong {
  color: #62646b;
  font-size: 0.7rem;
  text-align: center;
}

.library-batch-footer .library-delete-selected {
  color: #c8261b;
}

.library-batch-footer .library-delete-selected:disabled {
  color: #aaaeb6;
}

.library-batch-footer.is-confirming {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding-right: 0;
  padding-left: 0;
}

.library-batch-footer.is-confirming > strong {
  color: #24262b;
  text-align: left;
}

.library-batch-footer.is-confirming .button {
  min-width: 0;
  padding: 0 11px;
}

.manage-card-admin {
  padding: 0 20px 18px;
}

.manage-card-admin .section-header {
  margin-bottom: 8px;
}

.manage-card-admin .section-header > span {
  color: #777a82;
  font-size: 0.7rem;
}

.manage-admin-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  gap: 11px;
  padding: 10px 12px;
  color: #17181b;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e3e7;
  border-radius: 8px;
}

.manage-admin-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: #111216;
  border-radius: 50%;
}

.manage-admin-icon svg {
  width: 18px;
  height: 18px;
}

.manage-admin-row > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.manage-admin-row strong {
  font-size: 0.78rem;
}

.manage-admin-row small {
  color: #777a82;
  font-size: 0.64rem;
}

.manage-admin-row > svg {
  width: 17px;
  height: 17px;
  color: #8a8d94;
}

.snackbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}

.snackbar > span {
  min-width: 0;
}

.snackbar > button {
  flex: 0 0 auto;
  padding: 5px 2px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  background: transparent;
  border: 0;
}

.smart-import-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-height: 56px;
  padding: 8px 16px;
  color: #55575e;
  font-size: 0.74rem;
  border-bottom: 1px solid #e7e8eb;
}

.smart-import-toolbar > span {
  flex: 1 1 260px;
  min-width: 0;
  line-height: 1.5;
}

.smart-import-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.smart-import-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
  padding: 8px 9px;
  color: #151619;
  font: inherit;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.smart-import-toolbar button:active {
  background: #eceef1;
}

.smart-import-toolbar button:focus-visible {
  outline: 2px solid #151619;
  outline-offset: 1px;
}

.smart-import-toolbar button svg {
  width: 14px;
  height: 14px;
}

.smart-candidate-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}

.smart-candidate {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid #ececef;
}

.smart-candidate.is-new {
  animation: smart-candidate-arrive 420ms ease both;
}

@keyframes smart-candidate-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
    background: #fff8dc;
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smart-candidate.is-new {
    animation: none;
  }
}

.smart-candidate-select input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.smart-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: transparent;
  background: #fff;
  border: 1px solid #bfc1c6;
  border-radius: 5px;
}

.smart-check svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.smart-candidate-select input:checked + .smart-check {
  color: #fff;
  background: #101113;
  border-color: #101113;
}

.smart-candidate.is-duplicate {
  opacity: 0.48;
}

.smart-candidate.is-incomplete:not(.is-duplicate) .smart-check {
  background: #f1f1f3;
  border-color: #d5d6da;
}

.smart-candidate.is-low-confidence:not(.is-duplicate) {
  background: #fffaf2;
}

.smart-candidate.is-low-confidence:not(.is-duplicate) .smart-candidate-title em {
  color: #9a5b00;
}

.smart-candidate-copy {
  min-width: 0;
}

.smart-candidate-select {
  display: block;
}

.smart-candidate-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.smart-candidate-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.card-type-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 5px;
  padding: 1px 5px;
  color: #595c64;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  vertical-align: 2px;
  background: #f0f1f3;
  border: 1px solid #e0e1e4;
  border-radius: 5px;
}

.smart-import-input-actions [data-smart-action="analyze"]:disabled svg {
  animation: smart-import-spin 0.9s linear infinite;
}

.review-card-kind {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  color: #5d6068;
  font-size: 0.62rem;
  font-weight: 700;
  background: #eceef1;
  border-radius: 6px;
}

@keyframes smart-import-spin {
  to {
    transform: rotate(360deg);
  }
}

.smart-candidate-title em {
  flex: 0 0 auto;
  color: #6d7077;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 700;
}

.smart-candidate-copy small,
.smart-source {
  display: block;
  color: #777a82;
  font-size: 0.65rem;
}

.smart-candidate-copy small {
  margin-top: 3px;
}

.smart-candidate-copy p {
  margin: 7px 0 6px;
  color: #34353a;
  font-size: 0.76rem;
  line-height: 1.5;
}

.smart-candidate-front-editor,
.smart-candidate-kind-editor,
.smart-candidate-answer-editor,
.smart-import-batch-name input {
  width: 100%;
  min-width: 0;
  color: #17181b;
  font: inherit;
  background: #fff;
  border: 1px solid #d8dade;
  border-radius: 6px;
}

.smart-candidate-front-editor {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.84rem;
  font-weight: 700;
}

.smart-candidate-kind-editor {
  min-height: 34px;
  margin-top: 7px;
  padding: 5px 8px;
  font-size: 0.72rem;
}

.smart-candidate-answer-editor {
  min-height: 76px;
  margin-top: 7px;
  padding: 8px 9px;
  font-size: 0.76rem;
  line-height: 1.5;
  resize: vertical;
}

.smart-candidate-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.smart-candidate-actions button {
  padding: 4px 0;
  color: #555861;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.smart-evidence {
  display: block;
  margin: 8px 0 6px;
  padding: 8px 9px;
  color: #555861;
  font-size: 0.66rem;
  line-height: 1.45;
  background: #f4f5f7;
  border-left: 2px solid #aeb2ba;
}

.smart-evidence b {
  display: block;
  margin-bottom: 2px;
  color: #2c2e33;
  font-size: 0.61rem;
}

.smart-import-empty {
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #73767d;
}

.smart-import-empty svg {
  width: 30px;
  height: 30px;
}

.smart-import-empty strong {
  font-size: 0.8rem;
}

.smart-import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #dfe0e3;
  backdrop-filter: blur(16px);
}

.smart-import-batch-name {
  display: grid;
  flex: 1;
  gap: 4px;
}

.smart-import-batch-name input {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 0.76rem;
}

.smart-import-batch-name small {
  color: #777a82;
  font-size: 0.64rem;
}

.smart-import-footer span {
  color: #62646b;
  font-size: 0.74rem;
}

@media (max-width: 520px) {
  .wechat-import-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .smart-import-toolbar {
    align-items: stretch;
  }

  .smart-import-toolbar-actions {
    display: grid;
    flex: 1 1 100%;
    grid-template-columns: 1fr 1.25fr 0.75fr;
    width: 100%;
  }

  .smart-import-toolbar-actions.is-merge-mode {
    grid-template-columns: 1fr 1fr;
  }

  .smart-import-toolbar button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 5px;
    white-space: nowrap;
  }

  .feature-dialog {
    width: 100%;
    max-width: 100%;
    height: calc(100dvh - env(safe-area-inset-top));
    max-height: calc(100dvh - env(safe-area-inset-top));
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .pack-category-list {
    grid-template-columns: 1fr;
  }

  .pack-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pack-actions .button:only-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  input,
  textarea,
  select,
  .library-search-shell input,
  .smart-import-input textarea {
    font-size: 16px !important;
  }
}
