:root {
  color-scheme: light;
  --paper: #f4f6f2;
  --paper-deep: #e9eee8;
  --surface: #ffffff;
  --surface-muted: #edf1ec;
  --ink: #17201c;
  --ink-soft: #5e6862;
  --ink-faint: #89928d;
  --line: #dce2dc;
  --line-strong: #c7d0c9;
  --company: #176b59;
  --company-soft: #e4f2ed;
  --research: #315d9c;
  --research-soft: #e7eef9;
  --warning: #b75622;
  --warning-soft: #fff0e8;
  --danger: #a63b35;
  --danger-soft: #fae9e7;
  --success: #287553;
  --success-soft: #e5f4eb;
  --shadow-sheet: 0 -16px 46px rgba(23, 32, 28, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-ui: "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", sans-serif;
  --font-number: "SF Pro Rounded", "SF Pro Display", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  background: #dfe5df;
  font-size: 16px;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 34%, transparent 66%, rgba(255, 255, 255, 0.34)),
    #dfe5df;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  touch-action: manipulation;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.app-frame {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

@supports not (height: 100dvh) {
  .app-frame {
    height: 100vh;
  }
}

.app-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: calc(78px + env(safe-area-inset-top));
  align-items: flex-end;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid rgba(220, 226, 220, 0.82);
  background: rgba(244, 246, 242, 0.9);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
}

.app-frame.is-subflow .app-header,
.app-frame.is-detail .app-header {
  display: none;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(23, 107, 89, 0.15);
  border-radius: 13px;
  color: var(--company);
  background: var(--company-soft);
}

.brand-symbol svg {
  width: 22px;
  height: 22px;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.brand-copy strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.brand-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.app-main {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: calc(92px + env(safe-area-inset-top)) 0 calc(150px + env(safe-area-inset-bottom));
  scroll-behavior: smooth;
}

.app-main:focus {
  outline: none;
}

.page {
  padding: 0 16px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 14px;
}

.page-head-copy {
  min-width: 0;
}

.page-kicker {
  margin: 0 0 2px;
  color: var(--company);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
}

.page-title {
  margin: 0;
  font-size: 27px;
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-summary {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.page-action,
.text-action {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--company);
  background: var(--company-soft);
  font-size: 13px;
  font-weight: 650;
}

.page-action svg,
.text-action svg {
  width: 16px;
  height: 16px;
}

.capture-button {
  position: absolute;
  z-index: 30;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 16px;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #115849;
  border-radius: 17px;
  color: #ffffff;
  background: var(--company);
  box-shadow: 0 12px 30px rgba(23, 107, 89, 0.22);
  font-size: 16px;
  font-weight: 720;
  transition: transform 160ms ease, background 160ms ease;
}

.capture-button:active {
  transform: scale(0.98);
  background: #135e50;
}

.capture-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.capture-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.tab-bar {
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  min-height: calc(72px + env(safe-area-inset-bottom));
  padding: 5px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(210, 218, 211, 0.9);
  background: rgba(250, 251, 248, 0.94);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

.tab-item {
  display: flex;
  min-width: 0;
  min-height: 57px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 14px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.tab-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.tab-item.is-active {
  color: var(--company);
  background: var(--company-soft);
}

.search-box {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px rgba(39, 56, 48, 0.035);
}

.search-box > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-left: 14px;
  color: var(--ink-faint);
}

.search-box input {
  min-width: 0;
  flex: 1;
  align-self: stretch;
  padding: 0 40px 0 10px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.search-box input::placeholder {
  color: #9ba39e;
}

.clear-search {
  position: absolute;
  right: 7px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink-faint);
  background: var(--surface-muted);
}

.clear-search svg {
  width: 15px;
  height: 15px;
}

.filter-strip {
  display: flex;
  gap: 8px;
  margin: 0 -16px 13px;
  padding: 0 16px 1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  min-height: 35px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 620;
}

.filter-chip svg {
  width: 14px;
  height: 14px;
}

.filter-chip.is-active {
  border-color: var(--ink);
  color: #ffffff;
  background: var(--ink);
}

.filter-chip.company.is-active {
  border-color: var(--company);
  background: var(--company);
}

.filter-chip.research.is-active {
  border-color: var(--research);
  background: var(--research);
}

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 8px;
  color: var(--ink-faint);
  font-size: 12px;
}

.list-meta strong {
  color: var(--ink-soft);
  font-weight: 650;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 0 5px 8px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 620;
}

.sort-button svg {
  width: 14px;
  height: 14px;
}

.customer-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(39, 56, 48, 0.045);
}

.customer-row {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
}

.customer-row:last-child {
  border-bottom: 0;
}

.customer-row:active {
  background: #f0f4f0;
}

.next-rail {
  align-self: stretch;
  border-radius: 0 3px 3px 0;
  background: var(--line-strong);
}

.customer-row.is-overdue .next-rail,
.reminder-row.is-overdue .reminder-rail {
  background: var(--warning);
}

.customer-row.is-today .next-rail,
.reminder-row.is-today .reminder-rail {
  background: var(--company);
}

.customer-row.is-future .next-rail,
.reminder-row.is-future .reminder-rail {
  background: var(--research);
}

.customer-row.is-complete .next-rail {
  background: var(--success);
}

.customer-row-body {
  min-width: 0;
  padding: 14px 0 13px;
}

.customer-row-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-name {
  overflow: hidden;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-badge {
  display: inline-flex;
  min-height: 23px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 720;
}

.type-badge svg {
  width: 12px;
  height: 12px;
}

.type-badge.company {
  color: var(--company);
  background: var(--company-soft);
}

.type-badge.research {
  color: var(--research);
  background: var(--research-soft);
}

.customer-subline {
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-follow {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
}

.customer-follow svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.customer-follow.is-overdue {
  color: var(--warning);
}

.customer-follow.is-today {
  color: var(--company);
}

.customer-follow.is-future {
  color: var(--research);
}

.stage-inline {
  color: var(--ink-faint);
  font-weight: 500;
}

.row-tail {
  display: flex;
  align-items: center;
  padding-right: 11px;
  color: var(--line-strong);
}

.row-tail svg {
  width: 18px;
  height: 18px;
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  background: rgba(255, 255, 255, 0.54);
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 18px;
  color: var(--company);
  background: var(--company-soft);
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty-state h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 260px;
  margin: 7px auto 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.empty-state button {
  margin-top: 18px;
}

.section-block {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.section-count {
  color: var(--ink-faint);
  font-size: 12px;
}

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

.record-option {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 7px 20px rgba(39, 56, 48, 0.04);
}

.record-option:active {
  background: var(--company-soft);
}

.record-option .option-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--company);
  background: var(--company-soft);
}

.record-option .option-icon svg {
  width: 19px;
  height: 19px;
}

.record-option strong {
  display: block;
  margin-top: 15px;
  font-size: 14px;
  font-weight: 700;
}

.record-option small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11px;
}

.quick-client-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.quick-client {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
}

.quick-client:last-child {
  border-bottom: 0;
}

.quick-client-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--company);
  background: var(--company-soft);
  font-size: 13px;
  font-weight: 750;
}

.quick-client-copy {
  min-width: 0;
  flex: 1;
}

.quick-client-copy strong,
.quick-client-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-client-copy strong {
  font-size: 14px;
}

.quick-client-copy span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
}

.reminder-groups {
  display: grid;
  gap: 20px;
}

.reminder-group {
  display: grid;
  gap: 9px;
}

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

.reminder-group-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 720;
}

.reminder-group-title span {
  color: var(--ink-faint);
  font-size: 11px;
}

.reminder-group.is-overdue .reminder-group-title h2 {
  color: var(--warning);
}

.reminder-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.reminder-row {
  display: grid;
  width: 100%;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
}

.reminder-row:last-child {
  border-bottom: 0;
}

.reminder-rail {
  background: var(--line-strong);
}

.reminder-main {
  min-width: 0;
  padding: 13px 8px 12px 12px;
}

.reminder-main strong {
  display: block;
  font-size: 14px;
}

.reminder-main span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 0 8px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: right;
}

.reminder-date strong {
  color: var(--ink-soft);
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 700;
}

.mine-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
}

.mine-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: var(--ink);
  font-size: 17px;
  font-weight: 760;
}

.mine-profile-copy {
  min-width: 0;
}

.mine-profile-copy strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.mine-profile-copy span {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.mine-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.mine-row {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
}

.mine-row:last-child {
  border-bottom: 0;
}

.mine-row:active {
  background: var(--surface-muted);
}

.mine-row-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--company);
  background: var(--company-soft);
}

.mine-row-icon.research {
  color: var(--research);
  background: var(--research-soft);
}

.mine-row-icon.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.mine-row-icon svg {
  width: 17px;
  height: 17px;
}

.mine-row-copy {
  min-width: 0;
}

.mine-row-copy strong,
.mine-row-copy span {
  display: block;
}

.mine-row-copy strong {
  font-size: 14px;
}

.mine-row-copy span {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-row-tail {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 12px;
}

.mine-row-tail svg {
  width: 17px;
  height: 17px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.stat-cell {
  padding: 15px 12px;
  border-right: 1px solid var(--line);
}

.stat-cell:last-child {
  border-right: 0;
}

.stat-cell strong {
  display: block;
  font-family: var(--font-number);
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.stat-cell span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
}

.flow-screen,
.detail-screen {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
}

.flow-screen::before,
.detail-screen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--paper);
}

.flow-header,
.detail-header {
  display: grid;
  min-height: calc(66px + env(safe-area-inset-top));
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: end;
  padding: calc(8px + env(safe-area-inset-top)) 8px 8px;
  border-bottom: 1px solid rgba(220, 226, 220, 0.88);
  background: rgba(244, 246, 242, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.flow-header-copy {
  min-width: 0;
  padding: 0 4px 1px;
  text-align: center;
}

.flow-header-copy strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-header-copy span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: var(--ink-soft);
  background: transparent;
}

.icon-button:active {
  background: var(--surface-muted);
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.flow-header .icon-button:last-child {
  justify-self: end;
}

.flow-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 20px 16px 28px;
}

.flow-footer {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 10px;
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250, 251, 248, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.flow-footer.single {
  grid-template-columns: 1fr;
}

.flow-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flow-progress span {
  height: 3px;
  flex: 1;
  border-radius: 999px;
  background: var(--line);
}

.flow-progress span.is-active {
  background: var(--company);
}

.flow-title {
  margin: 0;
  font-size: 27px;
  font-weight: 770;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.flow-lead {
  max-width: 330px;
  margin: 8px 0 22px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.type-choice-grid {
  display: grid;
  gap: 12px;
}

.type-choice {
  position: relative;
  display: grid;
  min-height: 150px;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 19px 18px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(39, 56, 48, 0.045);
}

.type-choice:active {
  transform: scale(0.99);
}

.type-choice.company.is-selected,
.type-choice.company:hover {
  border-color: var(--company);
  background: linear-gradient(135deg, #ffffff 55%, #eaf5f1);
}

.type-choice.research.is-selected,
.type-choice.research:hover {
  border-color: var(--research);
  background: linear-gradient(135deg, #ffffff 55%, #edf2fa);
}

.type-choice-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
}

.type-choice-icon svg {
  width: 27px;
  height: 27px;
}

.type-choice.company .type-choice-icon {
  color: var(--company);
  background: var(--company-soft);
}

.type-choice.research .type-choice-icon {
  color: var(--research);
  background: var(--research-soft);
}

.type-choice-copy strong {
  display: block;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.type-choice-copy p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.type-choice-status {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
}

.type-choice-status strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.choice-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
}

.choice-check svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

.type-choice.is-selected .choice-check {
  border-color: currentColor;
  color: #ffffff;
}

.type-choice.company.is-selected .choice-check {
  background: var(--company);
}

.type-choice.research.is-selected .choice-check {
  background: var(--research);
}

.form-section {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.form-section-head {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  text-align: left;
  background: transparent;
}

.form-section-head strong {
  display: block;
  font-size: 14px;
  font-weight: 720;
}

.form-section-head span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.form-section-head svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--ink-faint);
  transition: transform 180ms ease;
}

.form-section.is-open .form-section-head svg {
  transform: rotate(180deg);
}

.form-section-body {
  display: none;
  padding: 2px 14px 14px;
  border-top: 1px solid var(--line);
}

.form-section.is-open .form-section-body {
  display: block;
}

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

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.required-mark {
  margin-left: 3px;
  color: var(--danger);
}

.field input,
.field select,
.field textarea,
.standalone-input,
.standalone-select,
.standalone-textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea,
.standalone-textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.standalone-input:focus,
.standalone-select:focus,
.standalone-textarea:focus {
  border-color: var(--company);
  box-shadow: 0 0 0 3px rgba(23, 107, 89, 0.1);
}

.field input.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(166, 59, 53, 0.08);
}

.field-help,
.field-error {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.field-help {
  color: var(--ink-faint);
}

.field-error {
  color: var(--danger);
}

.field-prefix {
  position: relative;
}

.field-prefix input {
  padding-left: 30px;
}

.field-prefix > span {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--ink-faint);
  font-size: 13px;
  transform: translateY(-50%);
}

.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.segmented button {
  min-height: 35px;
  padding: 4px 7px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.segmented button.is-active {
  color: var(--company);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(39, 56, 48, 0.08);
}

.segmented.research button.is-active {
  color: var(--research);
}

.chip-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-option {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 11px;
  font-weight: 620;
}

.chip-option.is-selected {
  border-color: var(--company);
  color: var(--company);
  background: var(--company-soft);
}

.chip-option.research.is-selected {
  border-color: var(--research);
  color: var(--research);
  background: var(--research-soft);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.primary-button svg,
.secondary-button svg,
.danger-button svg,
.ghost-button svg {
  width: 18px;
  height: 18px;
}

.primary-button {
  border: 1px solid #115849;
  color: #ffffff;
  background: var(--company);
}

.primary-button.research {
  border-color: #264c85;
  background: var(--research);
}

.primary-button:active,
.danger-button:active {
  transform: translateY(1px);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: #ffffff;
}

.danger-button {
  border: 1px solid #8f332e;
  color: #ffffff;
  background: var(--danger);
}

.ghost-button {
  border: 1px solid transparent;
  color: var(--company);
  background: var(--company-soft);
}

.wide-button {
  width: 100%;
}

.duplicate-warning,
.type-switch-note,
.inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.5;
}

.duplicate-warning {
  border: 1px solid #f1cfb9;
  color: #86401b;
  background: var(--warning-soft);
}

.type-switch-note,
.inline-notice {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface-muted);
}

.duplicate-warning svg,
.type-switch-note svg,
.inline-notice svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.duplicate-warning strong,
.type-switch-note strong {
  color: inherit;
}

.record-composer {
  min-height: 156px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}

.record-composer:focus {
  border-color: var(--company);
  box-shadow: 0 0 0 3px rgba(23, 107, 89, 0.1);
}

.capture-preview {
  display: grid;
  min-height: 180px;
  margin-bottom: 12px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.capture-preview img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.capture-preview svg {
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
}

.capture-preview span {
  display: block;
  padding: 0 24px;
  font-size: 12px;
}

.voice-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  text-align: center;
}

.voice-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--company);
  box-shadow: 0 10px 30px rgba(23, 107, 89, 0.22);
}

.voice-button svg {
  width: 37px;
  height: 37px;
}

.voice-button.is-recording {
  background: var(--warning);
  animation: pulse 1.3s ease-in-out infinite;
}

.voice-state strong {
  display: block;
  margin-top: 16px;
  font-size: 15px;
}

.voice-state span {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 11px;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 14px rgba(183, 86, 34, 0.12);
  }
}

.detail-header {
  grid-template-columns: 46px minmax(0, 1fr) 46px;
}

.detail-header-actions {
  display: flex;
  justify-content: flex-end;
}

.detail-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
}

.detail-hero {
  padding: 22px 18px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.detail-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-title {
  min-width: 0;
}

.detail-title h1 {
  margin: 8px 0 0;
  font-size: 27px;
  font-weight: 780;
  line-height: 1.13;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.detail-title p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.detail-follow-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.detail-follow-summary svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--company);
}

.detail-follow-summary strong {
  display: block;
  font-size: 14px;
}

.detail-follow-summary span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
}

.action-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  padding: 11px 7px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 242, 0.96);
}

.action-rail button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
  font-weight: 620;
  white-space: nowrap;
}

.action-rail button:active {
  color: var(--company);
}

.action-rail .action-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--company);
  background: #ffffff;
}

.action-rail svg {
  width: 17px;
  height: 17px;
}

.detail-section {
  margin: 0 16px 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.detail-section:first-of-type {
  margin-top: 14px;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 720;
}

.detail-section-head button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  color: var(--company);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.detail-section-head svg {
  width: 14px;
  height: 14px;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.info-row span:first-child {
  color: var(--ink-faint);
  font-size: 11px;
}

.info-row strong,
.info-row a,
.info-row p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.info-row p {
  line-height: 1.55;
  white-space: pre-wrap;
}

.contact-list,
.todo-list,
.attachment-list,
.timeline {
  display: grid;
  gap: 10px;
}

.contact-person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.contact-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--company);
  background: var(--company-soft);
  font-size: 13px;
  font-weight: 750;
}

.contact-person.research .contact-avatar {
  color: var(--research);
  background: var(--research-soft);
}

.contact-copy {
  min-width: 0;
}

.contact-copy strong,
.contact-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-copy strong {
  font-size: 13px;
}

.contact-copy span {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.contact-actions {
  display: flex;
  gap: 5px;
}

.contact-actions button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--company);
  background: #ffffff;
}

.contact-actions svg {
  width: 15px;
  height: 15px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 29px;
  bottom: -13px;
  left: 14px;
  width: 1px;
  background: var(--line);
}

.timeline-dot {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--company);
  background: #ffffff;
}

.timeline-dot svg {
  width: 14px;
  height: 14px;
}

.timeline-copy {
  min-width: 0;
  padding: 1px 0 2px;
}

.timeline-copy strong {
  display: block;
  font-size: 12px;
}

.timeline-copy p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.timeline-time {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 9px;
}

.attachment-chip {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-muted);
  font-size: 11px;
}

.attachment-chip svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--ink-soft);
}

.attachment-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.todo-check {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: transparent;
  background: #ffffff;
}

.todo-check svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.todo-row.is-done .todo-check {
  border-color: var(--success);
  color: #ffffff;
  background: var(--success);
}

.todo-copy strong {
  display: block;
  font-size: 12px;
}

.todo-row.is-done .todo-copy strong {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.todo-copy span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.priority-mark {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 9px;
  font-weight: 700;
}

.priority-mark.high {
  color: var(--warning);
  background: var(--warning-soft);
}

.sheet-dialog {
  position: fixed;
  z-index: 100;
  inset: auto 0 0;
  width: 100%;
  max-width: 430px;
  max-height: min(86dvh, 760px);
  margin: auto auto 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.sheet-dialog::backdrop {
  background: rgba(17, 27, 22, 0.36);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sheet-shell {
  max-height: min(86dvh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: var(--shadow-sheet);
}

.sheet-grabber {
  width: 38px;
  height: 5px;
  margin: 8px auto 2px;
  border-radius: 999px;
  background: var(--line-strong);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.sheet-head p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.sheet-content {
  max-height: calc(min(86dvh, 760px) - 72px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom));
}

.sheet-options {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.sheet-option {
  display: grid;
  width: 100%;
  min-height: 57px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
}

.sheet-option:last-child {
  border-bottom: 0;
}

.sheet-option:active {
  background: var(--surface-muted);
}

.sheet-option-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--company);
  background: var(--company-soft);
}

.sheet-option.research .sheet-option-icon {
  color: var(--research);
  background: var(--research-soft);
}

.sheet-option.warning .sheet-option-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.sheet-option svg {
  width: 17px;
  height: 17px;
}

.sheet-option-copy strong,
.sheet-option-copy span {
  display: block;
}

.sheet-option-copy strong {
  font-size: 13px;
}

.sheet-option-copy span {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
}

.sheet-option-tail {
  color: var(--ink-faint);
}

.toast {
  position: fixed;
  z-index: 150;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 16px;
  display: flex;
  min-height: 48px;
  max-width: 398px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(23, 32, 28, 0.94);
  box-shadow: 0 12px 30px rgba(23, 32, 28, 0.2);
  font-size: 12px;
  line-height: 1.4;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toast-in 180ms ease-out;
}

.toast button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 700;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (min-width: 560px) {
  body {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: 16px;
  }

  .app-frame {
    height: min(900px, calc(100dvh - 32px));
    border: 1px solid rgba(28, 43, 35, 0.12);
    border-radius: 30px;
    box-shadow: 0 26px 70px rgba(28, 43, 35, 0.18);
  }

  .sheet-dialog {
    bottom: calc((100dvh - min(900px, calc(100dvh - 32px))) / 2);
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 370px) {
  .page {
    padding-right: 13px;
    padding-left: 13px;
  }

  .page-title {
    font-size: 24px;
  }

  .capture-button {
    right: 13px;
    left: 13px;
  }

  .type-choice {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px 14px;
  }

  .type-choice-icon {
    width: 48px;
    height: 48px;
  }

  .field-grid {
    gap: 10px 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
