@charset "UTF-8";
/* Shared accessibility and small-screen behavior; no fixed text clipping. */
html {
  scroll-padding-bottom: 140px;
}
body {
  overflow-wrap: anywhere;
}
main,
.card,
.form,
.section-head > *,
.brand > span {
  min-width: 0;
}
button,
input,
textarea,
select,
a {
  min-width: 0;
}
.brand img,
.topbar > .avatar {
  flex-shrink: 0;
}
.topbar > .avatar {
  min-width: 44px;
  min-height: 44px;
}
.form :is(input, textarea, select) {
  scroll-margin-top: 24px;
  scroll-margin-bottom: 150px;
}
.form :is(input, textarea, select):focus-visible {
  outline: 2px solid #8c65d9;
  outline-offset: 2px;
}
.signed-out .tabbar,
.signed-out #account-button {
  display: none;
}
.signed-out main {
  padding-bottom: 32px;
}
.keyboard-open .tabbar {
  display: none;
}
.keyboard-open main {
  padding-bottom: 28px;
}
.keyboard-open .toast {
  bottom: 12px;
}
.note,
.pill,
.balance strong,
.account-hero > div {
  overflow-wrap: anywhere;
}
.section-head,
.field-head {
  flex-wrap: wrap;
}
.field-head {
  gap: 6px;
}
.text-button,
.back {
  min-height: 44px;
}
dialog:not(.production-dialog) {
  max-height: calc(var(--visible-height, 100dvh) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog form {
  min-width: 0;
}
#confirm .actions {
  position: sticky;
  bottom: -1px;
  background: #fff;
  padding: 8px 0;
}
#confirm .actions > * {
  min-width: 0;
}
#knowledge-local-status {
  line-height: 1.7;
}
.account-hero > div:last-child {
  min-width: 0;
}
.list-row > strong {
  max-width: 40%;
  text-align: right;
}
:root {
  --mobile-gutter: 16px;
  --mobile-tabbar-height: 78px;
  --bg: #f5f4fa;
  --ink: #202335;
  --muted: #77798c;
  --purple: #713ee1;
  --line: #e9e7f1;
  --green: #07877f;
  --shadow: 0 8px 28px #30245106;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b5a0ef;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.topbar {
  max-width: 780px;
  margin: auto;
  padding: 22px 22px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.brand img {
  width: 38px;
  height: 38px;
  box-shadow: 0 5px 14px #7140de20;
  border-radius: 13px;
}
.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 500;
}
.ai {
  color: var(--purple);
  margin-left: 3px;
}
.avatar {
  width: 38px;
  height: 38px;
  background: #ece4fe;
  color: var(--purple);
  border: 1px solid #dfd1fb;
  border-radius: 50%;
  font-weight: 700;
}
main {
  max-width: 780px;
  margin: auto;
  padding: 8px 20px 112px;
  min-height: 70vh;
}
h1 {
  font-size: 27px;
  line-height: 1.4;
  letter-spacing: -0.8px;
  margin: 3px 0 8px;
}
h2 {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 12px;
}
h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
p {
  line-height: 1.75;
  margin: 6px 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--purple);
  font-weight: 700;
  margin: 5px 0 10px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.page-intro {
  margin-bottom: 23px;
}
.hero {
  background: linear-gradient(115deg, #ede6ff, #f6f2ff 60%, #e5f6f8);
  border: 1px solid #e3d8f8;
  border-radius: 23px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 23px;
}
.hero h2 {
  font-size: 23px;
  max-width: 75%;
  letter-spacing: -0.5px;
  position: relative;
}
.hero p {
  max-width: 80%;
  font-size: 12px;
  color: #726482;
  position: relative;
}
.hero::after {
  content: '✦';
  position: absolute;
  right: 15px;
  top: 22px;
  color: #ac88e63b;
  font-size: 112px;
  line-height: 1;
  transform: rotate(-15deg);
  pointer-events: none;
}
.hero .primary {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  position: relative;
}
.primary,
.secondary,
.danger {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 4px 12px #713ee11c;
}
.secondary {
  background: #f3f1f8;
  color: #5b536d;
  border: 1px solid #e4dfed;
}
.danger {
  background: #fff1f2;
  color: #ad3446;
  border: 1px solid #f2d8dd;
}
.full {
  width: 100%;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 25px 0 13px;
}
.section-head h2 {
  margin: 0;
  font-size: 17px;
}
.section-head a,
.text-button {
  background: none;
  color: var(--purple);
  font-size: 12px;
  padding: 8px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.tool {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  min-height: 144px;
  position: relative;
  text-align: left;
  display: block;
}
.tool .icon-box {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 14px;
  background: #f0eaff;
  color: #7e4dda;
}
.tool:nth-child(2) .icon-box {
  color: #169baf;
  background: #e7f7fa;
}
.tool:nth-child(3) .icon-box {
  color: #e19a32;
  background: #fff5e4;
}
.tool:nth-child(4) .icon-box {
  color: #339c7b;
  background: #e8f7f0;
}
.tool h3 {
  margin: 0 0 5px;
}
.tool p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.tool .arrow {
  position: absolute;
  right: 16px;
  top: 24px;
  color: #bdb5ce;
}
svg.icon {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card {
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 20px;
  background: white;
  box-shadow: var(--shadow);
  margin: 12px 0;
}
.card.compact {
  padding: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
}
.stats strong {
  font-size: 23px;
  display: block;
  letter-spacing: -0.7px;
  margin-bottom: 4px;
}
.stats span {
  font-size: 10px;
  color: var(--muted);
}
.status-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #63817e;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #24ac9d;
  flex-shrink: 0;
}
.note {
  border-radius: 12px;
  padding: 12px 14px;
  background: #f2f7f7;
  color: #517873;
  font-size: 12px;
  line-height: 1.7;
  margin: 12px 0;
}
.note.warn {
  background: #fff7e8;
  color: #957125;
}
.note.error {
  background: #fff0f1;
  color: #ab3e4e;
}
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  max-width: 780px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 6px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid #eae6f2;
  background: #ffffffed;
  backdrop-filter: blur(18px);
  z-index: 10;
}
.tabbar a {
  min-height: 49px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  color: #9997a6;
}
.tabbar a.active {
  color: var(--purple);
  font-weight: 700;
}
.tabbar a.active > span {
  background: #f0e9fc;
  border-radius: 9px;
  box-shadow: 0 0 0 5px #f0e9fc;
}
.tabbar .icon {
  width: 20px;
  height: 20px;
}
.form label {
  display: block;
  color: #4e485e;
  font-size: 12px;
  font-weight: 600;
  margin: 18px 0 8px;
}
.form input,
.form textarea,
.form select,
.search {
  width: 100%;
  border: 1px solid #e4e0eb;
  background: #faf9fc;
  color: var(--ink);
  padding: 13px 14px;
  border-radius: 11px;
  outline: 0;
  min-height: 46px;
  font-size: 15px;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: #9571e7;
  box-shadow: 0 0 0 3px #713ee10b;
}
.form textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.75;
}
.form textarea.short {
  min-height: 84px;
}
.form .primary {
  margin-top: 20px;
}
.form .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.field-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.field-head label {
  margin-bottom: 8px;
}
.field-head button {
  color: var(--purple);
  background: transparent;
  font-size: 11px;
  padding: 8px 0;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.actions > * {
  flex: 1;
  min-width: 110px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eee8fd;
  color: #774ad2;
  border-radius: 20px;
  font-size: 10px;
  padding: 5px 9px;
  font-weight: 600;
}
.pill.green {
  background: #e8f7f1;
  color: #21866a;
}
.pill.amber {
  background: #fff3dc;
  color: #9f711c;
}
.pill.red {
  background: #fff0f0;
  color: #b35353;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border: 0;
}
.list-row .grow {
  min-width: 0;
  flex: 1;
}
.list-row h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.list-row .muted {
  font-size: 11px;
}
.list-row button {
  flex-shrink: 0;
}
.empty {
  text-align: center;
  padding: 34px 16px;
}
.empty .icon-box {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #f1ecfa;
  color: #a18ac3;
  border-radius: 17px;
  margin: 0 auto 13px;
}
.empty h3 {
  font-weight: 500;
}
.empty p {
  color: var(--muted);
  font-size: 12px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  padding: 7px 0;
  color: #8a799c;
  font-size: 12px;
  margin-bottom: 8px;
}
.result-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  font-size: 14px;
}
.segment {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.segment:last-child {
  border: 0;
}
.segment .pill {
  margin-bottom: 8px;
}
.segment small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}
.login-mark {
  width: 61px;
  height: 61px;
  margin: 25px 0 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px #7644d624;
}
.login h1 {
  font-size: 30px;
}
.login {
  max-width: 440px;
  margin: auto;
}
.login .card {
  padding: 23px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.network {
  position: sticky;
  top: 0;
  padding: 9px 15px;
  text-align: center;
  background: #fff0d9;
  color: #8d641b;
  font-size: 12px;
  z-index: 20;
}
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  width: max-content;
  background: #292337ed;
  color: #fff;
  border-radius: 13px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.6;
  z-index: 50;
  box-shadow: 0 6px 25px #22103226;
}
.progress {
  height: 5px;
  background: #ede8f7;
  border-radius: 5px;
  overflow: hidden;
  margin: 15px 0;
}
.progress div {
  height: 100%;
  background: #8351e7;
  width: 35%;
  animation: load 2s infinite ease-in-out;
}
@keyframes load {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(400%);
  }
}
dialog {
  border: 0;
  border-radius: 22px;
  padding: 25px;
  max-width: calc(100vw - 38px);
  width: 370px;
  color: var(--ink);
  box-shadow: 0 24px 100px #22103540;
}
dialog::backdrop {
  background: #20153666;
  backdrop-filter: blur(2px);
}
dialog p {
  color: #71667e;
  font-size: 13px;
  white-space: pre-wrap;
}
.dialog-mark {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--purple);
  margin: 3px 0 12px;
}
.privacy {
  line-height: 1.9;
  font-size: 13px;
}
.privacy h3 {
  margin-top: 24px;
}
.account-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
}
.account-hero .avatar {
  width: 56px;
  height: 56px;
  font-size: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.account-hero h2 {
  font-size: 16px;
  word-break: break-all;
  margin: 0 0 6px;
}
.balance {
  background: #2f2549;
  color: #fff;
  border-radius: 20px;
  padding: 25px;
  margin: 20px 0;
}
.balance strong {
  font-size: 34px;
  display: block;
  margin: 10px 0;
}
.balance p {
  color: #c0b4d4;
  font-size: 11px;
}
.inline-link {
  color: var(--purple);
  text-decoration: underline;
}
.fineprint {
  font-size: 10px;
  color: #96909f;
  line-height: 1.8;
  text-align: center;
  margin-top: 21px;
}
.skeleton {
  color: #8e819f;
  text-align: center;
  padding: 35px 20px;
}
.skeleton::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 12px;
  border: 3px solid #dfd6f2;
  border-top-color: #7950d8;
  border-radius: 50%;
  animation: mobile-loading-spin 0.85s linear infinite;
}
@keyframes mobile-loading-spin {
  to { transform: rotate(360deg); }
}
.flow-step {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  align-items: start;
}
.flow-step b {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #efe9fc;
  color: var(--purple);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.flow-step p {
  margin: 0;
  font-size: 12px;
}
video {
  width: 100%;
  max-height: 400px;
  background: #15131e;
  border-radius: 12px;
}
.record-link {
  display: block;
  width: 100%;
  background: none;
  text-align: left;
  padding: 0;
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.chip {
  background: #fff;
  color: #7c708c;
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 20px;
  min-height: 44px;
  font-size: 12px;
}
.chip.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
/* Keep editable content native: Android selection handles and iOS long-press
   must work even when the surrounding app uses touch-oriented controls. */
input:not([type='checkbox']):not([type='radio']),
textarea,
[contenteditable='true'],
.result-text {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
textarea {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--purple);
}
@media (max-width: 599px) {
  html {
    scrollbar-gutter: auto;
    scroll-padding-top: calc(16px + env(safe-area-inset-top));
    scroll-padding-bottom: calc(var(--mobile-tabbar-height) + 32px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding: calc(16px + env(safe-area-inset-top)) max(var(--mobile-gutter), env(safe-area-inset-right)) 14px max(var(--mobile-gutter), env(safe-area-inset-left));
    gap: 12px;
  }
  .brand {
    font-size: 19px;
    line-height: 1.4;
    letter-spacing: -0.4px;
  }
  .brand img {
    object-fit: contain;
  }
  main {
    padding-left: max(var(--mobile-gutter), env(safe-area-inset-left));
    padding-right: max(var(--mobile-gutter), env(safe-area-inset-right));
    padding-bottom: calc(var(--mobile-tabbar-height) + 36px + env(safe-area-inset-bottom));
  }
  .card {
    padding: 17px;
  }
  .form .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .form :is(input, textarea, select),
  .search {
    font-size: 16px;
  }
  .form :is(input:not([type='checkbox']):not([type='radio']), select),
  .primary,
  .secondary,
  .danger {
    min-height: 48px;
  }
  .form textarea {
    min-height: 160px;
    max-height: max(180px, calc(var(--visible-height, 100dvh) - 150px));
    line-height: 1.8;
    scroll-margin-bottom: 100px;
  }
  .form textarea.short {
    min-height: 112px;
  }
  .field-head button,
  .section-head a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .actions > * {
    flex: 1 1 118px;
    text-align: center;
  }
  .tabbar {
    padding-left: max(6px, env(safe-area-inset-left));
    padding-right: max(6px, env(safe-area-inset-right));
  }
  .toast {
    bottom: calc(var(--mobile-tabbar-height) + 16px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 32px);
  }
  .network {
    padding-top: max(9px, env(safe-area-inset-top));
  }
  .list-row {
    align-items: flex-start;
    gap: 10px;
  }
  .list-row .grow {
    align-self: center;
  }
  .list-row > strong {
    font-size: 15px;
  }
  .checkline {
    min-height: 44px;
    padding: 6px 0;
  }
  .keyboard-open main {
    padding-bottom: 24px;
  }
  .keyboard-open .toast {
    bottom: 12px;
  }
  dialog:not(.production-dialog) {
    width: calc(100vw - 24px);
    max-width: 430px;
    padding: 20px;
    max-height: calc(var(--visible-height, 100dvh) - 24px - env(safe-area-inset-top));
  }
}
@media (min-width: 600px) {
  main {
    padding-left: 28px;
    padding-right: 28px;
  }
  .topbar {
    padding: 25px 30px;
  }
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero {
    padding: 32px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .form {
    max-width: 610px;
    margin: auto;
  }
  .login .form {
    max-width: none;
  }
}
@media (pointer: coarse) and (orientation: landscape) {
  .topbar,
  main {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .form :is(input, textarea, select),
  .search {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
.text-task-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.text-task-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text, #202537);
  font-size: 13px;
}
.text-task-filters :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line, #d9ddea);
  border-radius: 12px;
  padding: 10px;
  color: #202537;
  background: #fff;
  font: inherit;
  font-size: 16px;
}
.text-task-search { grid-column: 1 / -1; }
#text-record-list .grow { min-width: 0; overflow-wrap: anywhere; }
#text-record-list .pill { flex-shrink: 0; max-width: 45%; white-space: normal; }
.assistant-shortcuts { flex-wrap: wrap; }
@media (max-width: 340px) {
  .text-task-filters { grid-template-columns: minmax(0, 1fr); }
}
