:root {
  --cs-green: #07c160;
  --cs-green-deep: #057b3b;
  --cs-soft: #f2f5ef;
  --cs-paper: #fbfff8;
  --cs-line: #d9e8dd;
  --cs-ink: #223026;
  --cs-muted: #8a7866;
  --cs-card: #ffffff;
  --cs-red: #c44232;
  --cs-red-soft: #fff2ea;
  --phone-shell: #095831;
  --shadow: 0 18px 44px rgba(9, 88, 49, .14);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  justify-items: center;
  align-items: start;
  background: #f7ebd8;
  color: var(--cs-ink);
  font-family: var(--font);
  overflow: auto;
}

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

button {
  cursor: pointer;
}

.cs-app {
  position: relative;
  width: min(100vw, 430px);
  height: var(--cs-phone-fit-height, 879.91px);
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.phone {
  position: absolute;
  left: 50%;
  top: 0;
  width: 430px;
  max-width: 430px;
  height: 879.91px;
  max-height: none;
  aspect-ratio: 846 / 1732;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(9, 88, 49, .72);
  border-radius: 42px;
  background: var(--phone-shell);
  box-shadow: var(--shadow);
  transform: translateX(-50%) scale(var(--cs-phone-scale, 1));
  transform-origin: top center;
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 34px;
  background: var(--cs-soft);
}

.screen.chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
  background: var(--cs-soft);
}

.screen-scroll {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 68px;
  -webkit-overflow-scrolling: touch;
}

.screen.has-bottom-nav .screen-scroll {
  padding-bottom: 124px;
}

.screen.compact-y .screen-scroll {
  padding-bottom: 48px;
}

.screen.compact-y.has-bottom-nav .screen-scroll {
  padding-bottom: 96px;
}

.status {
  height: 27px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cs-soft);
  font-size: 10px;
  font-weight: 900;
}

.screen.compact-y .status {
  height: 19px;
  font-size: 9px;
}

.top {
  padding: 14px 15px;
  color: #fff;
  background: var(--cs-green);
}

.screen.compact-y .top {
  padding: 8px 12px;
}

.top-row,
.subtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

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

.top-back {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 16px rgba(5, 123, 59, .16);
  font-size: 19px;
  line-height: 1;
  font-weight: 1000;
}

.screen.compact-y .top-title-line {
  gap: 7px;
}

.screen.compact-y .top-back {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  font-size: 15px;
}

.top h1,
.top h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.16;
  letter-spacing: 0;
}

.screen.compact-y .top h1,
.screen.compact-y .top h2 {
  font-size: 16px;
  line-height: 1.08;
}

.top small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, .86);
  font-size: 10.5px;
  font-weight: 800;
}

.screen.compact-y .top small {
  margin-top: 2px;
  font-size: 9px;
}

.subtop {
  min-height: 54px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--cs-line);
  background: rgba(251, 255, 248, .9);
}

.screen.compact-y .subtop {
  min-height: 36px;
  padding: 4px 10px;
  gap: 8px;
}

.subtop b {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.screen.compact-y .subtop b {
  font-size: 13px;
  line-height: 1.08;
}

.subtop small {
  display: block;
  margin-top: 3px;
  color: var(--cs-muted);
  font-size: 10px;
  font-weight: 800;
}

.screen.compact-y .subtop small {
  margin-top: 2px;
  font-size: 8.5px;
  line-height: 1.1;
}

.back {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
}

.screen.compact-y .back {
  width: 22px;
  height: 22px;
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #e8f7ef;
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.screen.compact-y .pill {
  min-height: 15px;
  padding: 0 6px;
  font-size: 9px;
}

.pill.red,
.pill.danger {
  color: #fff;
  background: var(--cs-red);
}

.pill.gray {
  color: #55615a;
  background: #edf2ea;
}

.pill.warn {
  color: #a44417;
  background: #fff2d8;
}

.pill-button {
  border: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 0 12px 10px;
  overflow: hidden;
}

.tab {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #e7f5eb;
  font-size: 11px;
  font-weight: 900;
}

.tab.active {
  color: #fff;
  background: var(--cs-green);
}

.card,
.list-card,
.message-card,
.form-card {
  margin: 11px 12px;
  padding: 12px;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  background: var(--cs-card);
}

.screen.compact-y .card,
.screen.compact-y .list-card,
.screen.compact-y .message-card,
.screen.compact-y .form-card {
  margin: 8px 12px;
  padding: 8px;
  border-radius: 13px;
}

.screen.compact-y .list-card {
  padding: 0;
}

.list-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 76px;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--cs-line);
  background: #fff;
}

.screen.compact-y .row {
  min-height: 53px;
  gap: 7px;
  padding: 8px 10px;
}

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

.row[data-route],
.row[data-action] {
  cursor: pointer;
}

.row.simple {
  grid-template-columns: minmax(0, 1fr) auto;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: #2f8f63;
  font-size: 14px;
  font-weight: 900;
}

.row b,
.card h3,
.form-card h3 {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.25;
}

.owner {
  color: var(--cs-green-deep);
}

.owner.red { color: var(--cs-red); }

.owner.gray { color: var(--cs-muted); }

.conv-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 999px;
  color: #057b3b;
  background: var(--cs-soft);
  font-size: 9.5px;
  font-weight: 900;
  vertical-align: 1px;
}

.conv-tag.red {
  color: #fff;
  background: var(--cs-red);
}

.conv-tag.gray {
  color: #55615a;
  background: #edf2ea;
}

.row span,
.card p,
.form-card p,
.meta {
  color: var(--cs-muted);
  font-size: 11px;
  line-height: 1.45;
}

.action {
  min-width: 52px;
  min-height: 30px;
  border: 1px solid var(--cs-green);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.action.primary {
  color: #fff;
  background: var(--cs-green);
}

.action.primary.red {
  border-color: var(--cs-red);
  background: var(--cs-red);
}

.action.primary.gray {
  color: #55615a;
  border-color: #edf2ea;
  background: #edf2ea;
}

.action.red {
  border-color: var(--cs-red);
  color: #fff;
  background: var(--cs-red);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 11px 12px;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  background: var(--cs-line);
}

.metric {
  min-height: 66px;
  padding: 10px 5px;
  text-align: center;
  background: #fff;
}

.metric-button {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.metric-button:focus,
.metric-button:hover {
  box-shadow: inset 0 0 0 2px rgba(7, 193, 96, .16);
}

.metric b {
  display: block;
  margin-bottom: 4px;
  color: var(--cs-green-deep);
  font-size: 18px;
}

.metric span {
  color: var(--cs-muted);
  font-size: 10px;
  font-weight: 800;
}

.message-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.bubble {
  max-width: 238px;
  padding: 10px 11px;
  border-radius: 14px;
  color: var(--cs-ink);
  background: #fff;
  border: 1px solid var(--cs-line);
  font-size: 12px;
  line-height: 1.55;
}

.bubble.user {
  justify-self: end;
  color: var(--cs-ink);
  background: #bff0c9;
  border-color: #bff0c9;
}

.bubble.system {
  justify-self: center;
  max-width: 94%;
  color: var(--cs-muted);
  background: #eef5ec;
  text-align: center;
}

.order-card {
  padding: 10px;
  border: 1px solid #a9e5be;
  border-radius: 16px;
  background: #fff;
}

.order-card b {
  margin-bottom: 5px;
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field {
  padding: 10px;
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  background: #fff;
}

.field small,
.field label {
  display: block;
  margin-bottom: 4px;
  color: var(--cs-muted);
  font-size: 10px;
  font-weight: 800;
}

.field b,
.field-control {
  display: block;
  width: 100%;
  min-height: 19px;
  border: 0;
  padding: 0;
  color: var(--cs-ink);
  background: transparent;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
  outline: 0;
}

.field b.multi,
.field-control.multi {
  min-height: 48px;
  white-space: normal;
  font-size: 12.5px;
  line-height: 1.55;
  resize: none;
}

.field-control::placeholder,
.input-text::placeholder {
  color: var(--cs-muted);
  opacity: .82;
  transition: opacity .12s ease;
}

.field-control:focus::placeholder,
.input-text:focus::placeholder,
.search-input:focus::placeholder {
  opacity: .82;
}

.field-control:focus,
.input-text:focus,
.search-input:focus {
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .13);
}

.search-field {
  height: 37px;
  margin: 10px 12px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-muted);
  background: #fff;
  box-shadow: 0 8px 18px rgba(9, 88, 49, .05);
}

.search-field:focus-within {
  border-color: rgba(7, 193, 96, .58);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .12);
}

.search-field span {
  color: var(--cs-green-deep);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.search-input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--cs-ink);
  background: transparent;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
}

.search-input::placeholder {
  color: var(--cs-muted);
  opacity: .78;
  transition: opacity .12s ease;
}

textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  color: var(--cs-ink);
  background: #fff;
  resize: none;
}

.fixed-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--cs-line);
  background: rgba(247, 248, 250, .96);
}

.screen.has-bottom-nav .fixed-bar {
  bottom: 56px;
}

.fixed-bar.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.fixed-bar button {
  min-width: 0;
  min-height: 42px;
}

.fixed-bar.three .action {
  padding: 0 5px;
  font-size: 10.5px;
  line-height: 1.15;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 56px;
  border-top: 1px solid var(--cs-line);
  background: rgba(251, 255, 248, .96);
}

.bottom-nav button {
  position: relative;
  min-width: 0;
  height: 56px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  color: var(--cs-muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 900;
}

.bottom-nav button.active {
  color: var(--cs-green-deep);
}

.bottom-nav i {
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 7px;
  opacity: .84;
}

.bottom-nav span {
  line-height: 1;
}

.bottom-nav em {
  position: absolute;
  top: 5px;
  right: 15px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--cs-red);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}

.cs-app[data-prototype-page="CS-01"] .metric-grid,
.cs-app[data-prototype-page="CS-01"] .tabs + .card {
  display: none;
}

.time {
  margin: 2px 0 12px;
  color: var(--cs-muted);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px;
  -webkit-overflow-scrolling: touch;
}

.bubble-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.bubble-row.service-row {
  justify-content: flex-end;
}

.avatar.mini {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 12px;
}

.case-card,
.match-card {
  margin: 11px 0;
  padding: 12px;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  background: #fff;
}

.case-card b,
.match-card b {
  display: block;
  margin-bottom: 5px;
  color: var(--cs-ink);
  font-size: 14px;
  line-height: 1.3;
}

.case-card span,
.match-card p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.case-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.case-links .action {
  min-height: 34px;
}

.quick-replies,
.action-row,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inline-expand {
  margin: 9px 0 2px;
  padding: 10px;
  border: 1px solid rgba(7, 193, 96, .24);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(9, 88, 49, .08);
}

.screen-scroll > .inline-expand {
  margin: 9px 12px 12px;
}

.expand-head {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.expand-head b {
  color: var(--cs-ink);
  font-size: 13px;
  line-height: 1.2;
}

.expand-head span {
  color: var(--cs-muted);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 800;
}

.expand-grid {
  display: grid;
  gap: 7px;
}

.expand-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.expand-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expand-option {
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--cs-line);
  border-radius: 12px;
  color: var(--cs-ink);
  background: #fbfff8;
  text-align: left;
}

.expand-option.active,
.expand-option:focus {
  border-color: rgba(7, 193, 96, .7);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .1);
}

.expand-option b {
  display: block;
  margin-bottom: 4px;
  color: var(--cs-green-deep);
  font-size: 12px;
  line-height: 1.15;
}

.expand-option span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cs-muted);
  font-size: 9.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.choice-strip {
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.choice-strip button {
  min-width: 0;
  flex: 1;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #f6fbf4;
  font-size: 10px;
  font-weight: 900;
}

.choice-strip button.active {
  color: #fff;
  border-color: var(--cs-green);
  background: var(--cs-green);
}

.expand-summary {
  margin-top: 8px;
  padding: 9px;
  border-radius: 12px;
  background: #f4faf2;
}

.expand-summary b {
  display: block;
  margin-bottom: 3px;
  color: var(--cs-green-deep);
  font-size: 12px;
}

.expand-summary span {
  color: var(--cs-muted);
  font-size: 10px;
  line-height: 1.35;
}

.expand-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 7px;
  margin-top: 9px;
}

.mini-action {
  min-height: 32px;
  border: 1px solid var(--cs-green);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.mini-action.primary {
  color: #fff;
  background: var(--cs-green);
}

.chat-input {
  flex: 0 0 auto;
  min-height: 108px;
  padding: 9px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-top: 1px solid var(--cs-line);
  background: #f7f8fa;
}

.input-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: end;
}

.input-text {
  width: 100%;
  min-height: 64px;
  padding: 10px 11px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  color: var(--cs-ink);
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  resize: none;
  outline: 0;
}

.strong-card {
  border-color: rgba(7, 193, 96, .28);
  background: #fff;
}

.match-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.match-card.compact {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.match-card p {
  grid-column: 1 / -1;
}

.team-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 143, 99, .24);
  border-radius: 50%;
  color: var(--cs-green-deep);
  background: var(--cs-soft);
  font-size: 13px;
  font-weight: 1000;
}

.seal {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 1000;
  opacity: .3;
  transform: rotate(-11deg);
}

.seal.red {
  color: var(--cs-red);
}

.metric-grid {
  grid-template-columns: repeat(2, 1fr);
}

.metric {
  min-height: 58px;
  text-align: left;
}

.card-actions {
  margin: 11px 12px;
}

.screen.compact-y .avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 11px;
}

.screen.compact-y .row b,
.screen.compact-y .card h3,
.screen.compact-y .form-card h3 {
  margin-bottom: 3px;
  font-size: 12.5px;
  line-height: 1.16;
}

.screen.compact-y .row span,
.screen.compact-y .card p,
.screen.compact-y .form-card p,
.screen.compact-y .meta {
  font-size: 10px;
  line-height: 1.25;
}

.screen.compact-y .action {
  min-width: 42px;
  min-height: 23px;
  padding: 0 8px;
  font-size: 10.5px;
}

.screen.compact-y .field {
  min-height: 42px;
  padding: 7px 9px;
  border-radius: 11px;
}

.screen.compact-y .field small,
.screen.compact-y .field label {
  margin-bottom: 2px;
  font-size: 9px;
}

.screen.compact-y .field b,
.screen.compact-y .field-control {
  font-size: 12px;
  line-height: 1.2;
}

.screen.compact-y .field b.multi,
.screen.compact-y .field-control.multi {
  min-height: 34px;
  font-size: 11px;
  line-height: 1.28;
}

.screen.compact-y .search-field {
  height: 30px;
  margin: 7px 12px;
  padding: 0 10px;
  grid-template-columns: 28px minmax(0, 1fr);
}

.screen.compact-y .search-field span {
  font-size: 9.5px;
}

.screen.compact-y .search-input {
  font-size: 10.5px;
}

.screen.compact-y .metric-grid {
  margin: 8px 12px;
  border-radius: 13px;
}

.screen.compact-y .metric {
  min-height: 46px;
  padding: 7px 5px;
}

.screen.compact-y .metric b {
  margin-bottom: 2px;
  font-size: 14px;
}

.screen.compact-y .metric span {
  font-size: 9px;
  line-height: 1.2;
}

.screen.compact-y .match-card {
  margin: 8px 12px;
  padding: 8px;
  border-radius: 13px;
}

.screen.compact-y .match-card.compact {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  gap: 6px;
}

.screen.compact-y .team-mark {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.screen.compact-y .seal {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.screen.compact-y .quick-replies,
.screen.compact-y .action-row,
.screen.compact-y .card-actions {
  gap: 6px;
  margin-top: 7px;
}

.screen.compact-y .inline-expand {
  margin-top: 7px;
  padding: 8px;
  border-radius: 13px;
}

.screen.compact-y .screen-scroll > .inline-expand {
  margin: 7px 12px 10px;
}

.screen.compact-y .expand-head {
  margin-bottom: 6px;
}

.screen.compact-y .expand-head b {
  font-size: 11.5px;
}

.screen.compact-y .expand-head span {
  font-size: 9px;
  line-height: 1.25;
}

.screen.compact-y .expand-grid {
  gap: 5px;
}

.screen.compact-y .expand-option {
  min-height: 43px;
  padding: 6px;
  border-radius: 10px;
}

.screen.compact-y .expand-option b {
  margin-bottom: 2px;
  font-size: 10px;
}

.screen.compact-y .expand-option span {
  font-size: 8.5px;
  line-height: 1.22;
}

.screen.compact-y .choice-strip {
  gap: 4px;
}

.screen.compact-y .choice-strip button {
  min-height: 24px;
  padding: 0 5px;
  font-size: 8.6px;
}

.screen.compact-y .expand-summary {
  margin-top: 6px;
  padding: 7px;
  border-radius: 10px;
}

.screen.compact-y .expand-summary b {
  margin-bottom: 2px;
  font-size: 10px;
}

.screen.compact-y .expand-summary span {
  font-size: 8.8px;
  line-height: 1.24;
}

.screen.compact-y .expand-actions {
  gap: 6px;
  margin-top: 7px;
}

.screen.compact-y .mini-action {
  min-height: 25px;
  font-size: 9.5px;
}

.screen.compact-y .card-actions {
  margin: 8px 12px;
}

.screen.compact-y .fixed-bar {
  gap: 6px;
  padding: 7px 10px 10px;
}

.screen.compact-y .fixed-bar button {
  min-height: 30px;
}

.screen.compact-y .fixed-bar.three .action {
  padding: 0 4px;
  font-size: 9.2px;
}

.cs-app[data-prototype-page="CS-05"] .screen-scroll {
  padding-bottom: 58px;
}

.cs-app[data-prototype-page="CS-05"] .top {
  padding: 14px 15px;
}

.cs-app[data-prototype-page="CS-05"] .top-row {
  gap: 12px;
}

.cs-app[data-prototype-page="CS-05"] .top h1 {
  font-size: 20px;
  line-height: 1.18;
}

.cs-app[data-prototype-page="CS-05"] .top small {
  margin-top: 3px;
  font-size: 10.5px;
}

.cs-app[data-prototype-page="CS-05"] .pill {
  min-height: 21px;
  padding: 0 8px;
  font-size: 10.5px;
}

.cs-app[data-prototype-page="CS-05"] .metric-grid {
  gap: 6px;
  overflow: visible;
  margin: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cs-app[data-prototype-page="CS-05"] .metric {
  min-height: 46px;
  padding: 7px 9px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--cs-line);
  border-radius: 13px;
}

.cs-app[data-prototype-page="CS-05"] .metric-button {
  position: relative;
  border-color: rgba(7, 193, 96, .38);
}

.cs-app[data-prototype-page="CS-05"] .metric-button::after {
  content: "›";
  position: absolute;
  right: 8px;
  top: 6px;
  color: rgba(5, 123, 59, .62);
  font-size: 13px;
  font-weight: 1000;
}

.cs-app[data-prototype-page="CS-05"] .metric b {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.1;
  white-space: nowrap;
}

.cs-app[data-prototype-page="CS-05"] .metric span {
  font-size: 9.5px;
  line-height: 1.25;
}

.cs-app[data-prototype-page="CS-05"] .list-card,
.cs-app[data-prototype-page="CS-05"] .form-card {
  margin: 0 12px;
  border-radius: 18px;
}

.cs-app[data-prototype-page="CS-05"] .form-card {
  margin: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.cs-app[data-prototype-page="CS-05"] .form-card h3 {
  margin-bottom: 6px;
  font-size: 13.5px;
  line-height: 1.28;
}

.cs-app[data-prototype-page="CS-05"] .form-card p {
  font-size: 11.5px;
  line-height: 1.55;
}

.cs-app[data-prototype-page="CS-05"] .action-row {
  gap: 6px;
  margin-top: 6px;
}

.cs-app[data-prototype-page="CS-05"] .row {
  min-height: 56px;
  gap: 10px;
  padding: 10px 12px;
}

.cs-app[data-prototype-page="CS-05"] .row b {
  margin-bottom: 4px;
  font-size: 12.8px;
  line-height: 1.25;
}

.cs-app[data-prototype-page="CS-05"] .row span {
  font-size: 10.7px;
  line-height: 1.45;
}

.cs-app[data-prototype-page="CS-05"] .action {
  min-width: auto;
  min-height: 21px;
  padding: 0 8px;
  font-size: 10.5px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.cs-app[data-prototype-page="CS-05"] .action.wood,
.cs-app[data-prototype-page="CS-05"] .action.primary {
  color: var(--cs-green-deep);
  background: var(--cs-soft);
}

.cs-app[data-prototype-page="CS-05"] .action.water {
  color: #1f5f73;
  background: #dceff3;
}

.cs-app[data-prototype-page="CS-05"] .action.red {
  color: #fff;
  background: var(--cs-red);
}

.cs-app[data-prototype-page="CS-05"] .field {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cs-app[data-prototype-page="CS-05"] .field label {
  margin-bottom: 5px;
  font-size: 10.5px;
  font-weight: 900;
}

.cs-app[data-prototype-page="CS-05"] .field-control.multi {
  min-height: 78px;
  padding: 9px 10px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  background: #fff;
  color: var(--cs-muted);
  font-size: 11.7px;
  line-height: 1.45;
  font-weight: 700;
}

.cs-app[data-prototype-page="CS-05"] .bottom-nav {
  height: 56px;
}

.cs-app[data-prototype-page="CS-05"] .bottom-nav button {
  height: 56px;
}

.article-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 9px 12px;
}

.article-summary div {
  min-height: 50px;
  padding: 8px;
  border: 1px solid var(--cs-line);
  border-radius: 13px;
  background: #fff;
}

.article-summary b {
  display: block;
  color: var(--cs-green-deep);
  font-size: 14px;
  line-height: 1.1;
}

.article-summary span {
  color: var(--cs-muted);
  font-size: 9px;
  line-height: 1.25;
  font-weight: 850;
}

.article-list {
  display: grid;
  gap: 6px;
  margin: 8px 12px 12px;
}

.article-card {
  width: 100%;
  min-height: 52px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--cs-line);
  border-radius: 12px;
  color: var(--cs-ink);
  background: #fff;
  text-align: left;
}

.article-card:focus,
.article-card:hover {
  border-color: rgba(7, 193, 96, .52);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .09);
}

.article-card .compact-article-main {
  min-width: 0;
}

.article-card .compact-article-title {
  display: block;
  overflow: hidden;
  color: var(--cs-ink);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 1000;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
}

.article-card .compact-article-title em {
  margin-right: 3px;
  color: var(--cs-green-deep);
  font-style: normal;
  font-weight: 1000;
}

.article-card .compact-article-meta {
  display: block;
  margin-top: 5px;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 0;
  color: var(--cs-muted);
  background: #f3f5f1;
  font-size: 9px;
  line-height: 1.18;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.article-card-side {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 36px;
}

.article-card-side .pill {
  min-width: 28px;
  min-height: 18px;
  padding: 0 6px;
  font-size: 8.5px;
}

.article-card-side strong {
  color: var(--cs-green-deep);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}

.article-preview {
  margin: 10px 12px 74px;
  padding: 13px;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  background: #fff;
}

.article-preview-head {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cs-line);
}

.article-preview-head span,
.article-preview-head p,
.article-result-line small,
.article-note {
  color: var(--cs-muted);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 800;
}

.article-preview-head b {
  color: var(--cs-ink);
  font-size: 18px;
  line-height: 1.2;
}

.article-preview-head p {
  margin: 0;
}

.article-result-line {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 11px 0;
  padding: 10px;
  border-radius: 14px;
  background: #f5fbf3;
}

.article-result-line b {
  display: block;
  margin-bottom: 3px;
  color: var(--cs-green-deep);
  font-size: 13px;
}

.seal-small {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--cs-muted);
  font-size: 13px;
  font-weight: 1000;
}

.seal-small.red {
  color: var(--cs-red);
}

.seal-small.dark {
  color: #455047;
}

.article-preview > p {
  margin: 0;
  color: var(--cs-ink);
  font-size: 12px;
  line-height: 1.7;
}

.article-note {
  margin-top: 12px;
  padding: 9px;
  border-radius: 12px;
  background: var(--cs-soft);
}

.screen.compact-y .article-summary {
  gap: 6px;
  margin: 7px 12px;
}

.screen.compact-y .article-summary div {
  min-height: 42px;
  padding: 7px;
  border-radius: 11px;
}

.screen.compact-y .article-summary b {
  font-size: 12px;
}

.screen.compact-y .article-summary span {
  font-size: 8.4px;
}

.screen.compact-y .article-list {
  gap: 6px;
  margin-top: 7px;
}

.screen.compact-y .article-card {
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 12px;
}

.screen.compact-y .article-card .compact-article-title {
  font-size: 11px;
}

.screen.compact-y .article-card .compact-article-meta {
  margin-top: 4px;
  padding: 3px 5px;
  font-size: 8px;
  line-height: 1.12;
}

.screen.compact-y .article-card-side .pill {
  min-height: 16px;
  font-size: 8px;
}

.screen.compact-y .article-card-side strong {
  font-size: 8.3px;
}

.screen.compact-y .article-preview {
  margin: 8px 12px 58px;
  padding: 10px;
  border-radius: 14px;
}

.screen.compact-y .article-preview-head b {
  font-size: 15px;
}

.screen.compact-y .article-preview > p {
  font-size: 10.8px;
  line-height: 1.55;
}

.screen.compact-y .article-result-line {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  margin: 8px 0;
  padding: 8px;
}

.screen.compact-y .seal-small {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 20;
  max-width: 330px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(25, 35, 28, .88);
  font-size: 13px;
  line-height: 1.4;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 430px) {
  .cs-app { padding: 0; }
  .phone {
    min-height: 0;
    border: 2px solid rgba(9, 88, 49, .72);
    border-radius: 42px;
    padding: 8px;
  }
  .screen {
    border-radius: 34px;
  }
}

body {
  display: block;
  min-height: 100vh;
  overflow: hidden;
  background: #e9f0f5;
}

.cs-app {
  width: min(100vw, 430px);
  height: 100vh;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cs-soft);
  box-shadow: var(--shadow);
}

.phone {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--cs-soft);
  box-shadow: none;
  transform: none;
}

.screen {
  height: 100%;
  border-radius: 0;
}

.status {
  height: 27px;
  padding: 0 17px;
  font-size: 10px;
}

.top {
  padding: 8px 14px 10px;
}

.top h1,
.top h2 {
  font-size: 17px;
  line-height: 1.18;
}

.top small {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.2;
}

.top-back,
.back {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 17px;
}

.subtop {
  min-height: 46px;
  padding: 7px 12px;
}

.subtop b {
  font-size: 15px;
  line-height: 1.16;
}

.subtop small {
  font-size: 9.5px;
  line-height: 1.22;
}

.screen-scroll {
  padding-bottom: 62px;
}

.screen.has-bottom-nav .screen-scroll {
  padding-bottom: 104px;
}

.screen.compact-y .screen-scroll {
  padding-bottom: 56px;
}

.screen.compact-y.has-bottom-nav .screen-scroll {
  padding-bottom: 92px;
}

.tabs {
  gap: 7px;
  padding: 0 12px 8px;
}

.tab {
  min-height: 26px;
  padding: 0 11px;
  font-size: 10.5px;
}

.card,
.list-card,
.message-card,
.form-card,
.case-card,
.match-card {
  margin: 8px 12px;
  padding: 10px 11px;
  border-radius: 13px;
}

.list-card {
  padding: 0;
}

.row {
  min-height: 60px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 12px;
}

.row b,
.card h3,
.form-card h3,
.case-card b,
.match-card b {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.22;
}

.row span,
.card p,
.form-card p,
.meta,
.case-card span,
.match-card p {
  font-size: 10.5px;
  line-height: 1.42;
}

.pill {
  min-height: 21px;
  padding: 0 8px;
  font-size: 10.5px;
}

.action,
.mini-action {
  min-width: 46px;
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.metric-grid {
  gap: 8px;
  margin: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.metric {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--cs-line);
  border-radius: 13px;
}

.metric b {
  margin-bottom: 3px;
  font-size: 15px;
  line-height: 1;
}

.metric span {
  font-size: 9.5px;
  line-height: 1.2;
}

.field {
  padding: 9px 10px;
  border-radius: 13px;
}

.field small,
.field label {
  font-size: 10px;
}

.field b,
.field-control {
  font-size: 13px;
}

.search-field {
  height: 34px;
  margin: 8px 12px;
}

.fixed-bar {
  gap: 7px;
  padding: 8px 12px 10px;
}

.fixed-bar button {
  min-height: 36px;
}

.screen.has-bottom-nav .fixed-bar {
  bottom: 50px;
}

.bottom-nav,
.cs-app[data-prototype-page="CS-05"] .bottom-nav {
  height: 50px;
}

.bottom-nav button,
.cs-app[data-prototype-page="CS-05"] .bottom-nav button {
  height: 50px;
  gap: 3px;
  font-size: 9px;
}

.bottom-nav i {
  width: 15px;
  height: 15px;
  border-width: 1.5px;
  border-radius: 4px;
}

.bottom-nav em {
  top: 4px;
  right: 18px;
  min-width: 15px;
  height: 15px;
  font-size: 8px;
}

.chat-body {
  padding: 12px;
}

.chat-input {
  min-height: 96px;
  padding: 8px 10px 10px;
}

.input-text {
  min-height: 58px;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.42;
}

.screen.compact-y .top {
  padding: 7px 12px 8px;
}

.screen.compact-y .top h1,
.screen.compact-y .top h2 {
  font-size: 15px;
}

.screen.compact-y .status {
  height: 24px;
  font-size: 9.5px;
}

.screen.compact-y .subtop {
  min-height: 42px;
  padding: 6px 10px;
}

.screen.compact-y .subtop b {
  font-size: 13px;
}

.screen.compact-y .back,
.screen.compact-y .top-back {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.screen.compact-y .card,
.screen.compact-y .list-card,
.screen.compact-y .message-card,
.screen.compact-y .form-card,
.screen.compact-y .match-card {
  margin: 7px 12px;
  padding: 8px 9px;
  border-radius: 12px;
}

.screen.compact-y .list-card {
  padding: 0;
}

.screen.compact-y .row {
  min-height: 50px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  padding: 7px 9px;
}

.cs-message-panel {
  margin: 8px 12px 0;
}

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

.section-title h2 {
  margin: 0;
  color: var(--cs-ink);
  font-size: 16px;
  line-height: 1.2;
}

.section-title span {
  color: var(--cs-muted);
  font-size: 10.5px;
  font-weight: 900;
}

.hint-card {
  padding: 9px 10px;
  border: 1px dashed rgba(47, 143, 99, .26);
  border-radius: 12px;
  color: var(--cs-ink);
  background: rgba(255, 255, 255, .78);
  font-size: 10.5px;
  line-height: 1.42;
  font-weight: 800;
}

.conversation-list {
  display: grid;
  gap: 8px;
  margin: 8px 12px 10px;
}

.cs-message-reference-head {
  margin: 0 0 10px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: var(--cs-green);
}

.cs-message-reference-head h1,
.cs-message-reference-head p {
  margin: 0;
}

.cs-message-reference-head h1 {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.cs-message-reference-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, .86);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.cs-message-reference-head span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  justify-self: end;
  border-radius: 999px;
  color: #fff;
  background: #de2a38;
  font-size: 12px;
  font-weight: 1000;
}

.cs-conversation-card,
.cs-order-card {
  width: 100%;
  min-height: 72px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--cs-line);
  border-radius: 13px;
  color: var(--cs-ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 18px rgba(9, 88, 49, .05);
}

.cs-conversation-card.is-active,
.cs-order-card.is-active {
  border-color: rgba(7, 193, 96, .48);
  background: rgba(246, 255, 248, .9);
}

.cs-conversation-list .cs-conversation-card {
  min-height: 64px;
  padding: 9px 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 18px rgba(18, 91, 60, .06);
}

.cs-conversation-list .conversation-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.cs-conversation-list .conversation-main b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  line-height: 1.2;
}

.cs-conversation-list .conversation-main small,
.cs-conversation-list .conversation-main i {
  margin-top: 2px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.conversation-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cs-green-deep);
  background: var(--cs-soft);
  font-size: 13px;
  font-weight: 1000;
}

.conversation-avatar.red {
  color: #c44232;
  background: #fff1ef;
}

.conversation-avatar.gray {
  color: #66706b;
  background: #eef2f0;
}

.conversation-main {
  min-width: 0;
}

.conversation-main b,
.conversation-main small,
.conversation-main i {
  display: block;
}

.conversation-main b {
  color: var(--cs-ink);
  font-size: 13px;
  line-height: 1.25;
}

.conversation-main em {
  margin-left: 4px;
  color: var(--cs-green-deep);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 900;
}

.conversation-main small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--cs-muted);
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-main i {
  margin-top: 3px;
  color: #8a9a91;
  font-size: 9.5px;
  line-height: 1.25;
  font-style: normal;
  font-weight: 800;
}

.cs-conversation-card strong,
.cs-order-card strong {
  min-width: 25px;
  min-height: 25px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--cs-green);
  font-size: 10.5px;
  font-weight: 950;
  white-space: nowrap;
}

.cs-conversation-card strong.read,
.cs-order-card strong.read {
  color: var(--cs-green-deep);
  background: rgba(7, 193, 96, .12);
}

.cs-ticket-card {
  grid-template-columns: 40px minmax(0, 1fr) 78px;
  cursor: pointer;
}

.ticket-card-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.ticket-card-actions strong {
  white-space: nowrap;
}

.ticket-card-actions .action {
  min-width: 58px;
  min-height: 24px;
  padding: 0 7px;
  font-size: 9.5px;
  white-space: nowrap;
}

.conversation-bucket,
.case-status-section {
  display: grid;
  gap: 7px;
}

.case-status-section {
  padding: 8px 10px;
}

.conversation-bucket + .conversation-bucket,
.case-status-section + .case-status-section {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(198, 221, 204, .72);
}

.case-status-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  color: var(--cs-ink);
}

.case-status-title b {
  font-size: 12px;
  line-height: 1.2;
}

.case-status-title span {
  color: var(--cs-muted);
  font-size: 9.5px;
  font-weight: 900;
}

.empty-mini {
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(47, 143, 99, .22);
  border-radius: 12px;
  color: var(--cs-muted);
  background: rgba(255, 255, 255, .62);
  font-size: 10.5px;
  font-weight: 850;
}

.ticket-case-row {
  align-items: start;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticket-case-row .row-actions .action {
  min-width: 48px;
  min-height: 26px;
  padding: 0 8px;
  font-size: 10px;
  white-space: nowrap;
}

.cs-chat-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 8px;
  overflow: hidden;
  background: var(--cs-soft);
}

.chat-person-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 9px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18, 91, 60, .06);
}

.chat-person-head b,
.chat-person-head span {
  display: block;
}

.chat-person-head b {
  color: var(--cs-ink);
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-person-head span {
  margin-top: 3px;
  color: var(--cs-muted);
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-head-back {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.chat-head-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-head-main em {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: rgba(29, 185, 105, .1);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.2;
}

.chat-profile-button {
  min-height: 26px;
  padding: 0 10px;
  color: var(--cs-green-deep);
  background: rgba(29, 185, 105, .08);
}

.ghost-mini {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.order-mini-card {
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--cs-line);
  border-radius: 10px;
  color: var(--cs-ink);
  background: #fff;
  text-align: left;
}

.order-mini-card b,
.order-mini-card span,
.order-mini-card em {
  display: block;
}

.order-mini-card b {
  color: var(--cs-green-deep);
  font-size: 12px;
}

.order-mini-card span {
  margin-top: 4px;
  color: var(--cs-ink);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 950;
}

.order-mini-card em {
  margin-top: 3px;
  color: var(--cs-muted);
  font-size: 11px;
  line-height: 1.35;
  font-style: normal;
  font-weight: 800;
}

.cs-chat-highlight {
  margin-top: 8px;
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px dashed var(--cs-line);
}

.cs-chat-highlight-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.cs-chat-highlight-row i {
  color: var(--cs-muted);
  font-size: 10px;
  line-height: 1.7;
  font-style: normal;
  font-weight: 900;
}

.cs-chat-highlight-row span {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cs-chat-highlight-row b {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #e8f7ef;
  font-size: 9.5px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.cs-chat-highlight em {
  margin-top: 0;
  color: var(--cs-muted);
  font-size: 9.5px;
  line-height: 1.25;
  font-style: normal;
  font-weight: 800;
}

.chat-thread {
  flex: 1;
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 11px 10px;
  margin-bottom: 8px;
  overflow-y: auto;
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  background: rgba(241, 248, 243, .82);
}

.chat-bubble {
  max-width: 74%;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.chat-message-row {
  display: grid;
  gap: 3px;
  justify-self: start;
  justify-items: start;
}

.chat-message-row.expert {
  justify-self: end;
  justify-items: end;
}

.chat-message-time {
  color: var(--cs-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.chat-bubble span {
  display: block;
  margin-bottom: 3px;
  color: var(--cs-muted);
  font-size: 10px;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble.user {
  justify-self: start;
  border: 1px solid var(--cs-line);
  background: #fff;
}

.chat-bubble.expert {
  justify-self: end;
  color: #fff;
  background: var(--cs-green);
}

.chat-bubble.expert span {
  color: rgba(255, 255, 255, .76);
}

.chat-bubble.has-source-order-card {
  width: 82%;
  padding: 8px;
  color: var(--cs-ink);
  border: 1px solid rgba(29, 185, 105, .26);
  background: #fff;
}

.chat-bubble.has-source-order-card span {
  color: var(--cs-muted);
}

.cs-source-order-card {
  display: grid;
  gap: 6px;
}

.cs-source-order-card-head,
.cs-source-order-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cs-source-order-card-head b {
  font-size: 12px;
  color: var(--cs-ink);
}

.cs-source-order-card-head em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--cs-green);
  background: rgba(29, 185, 105, .12);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.cs-source-order-card-row {
  padding-top: 5px;
  border-top: 1px solid rgba(198, 222, 207, .72);
  font-size: 11px;
  line-height: 1.35;
}

.cs-source-order-card-row span {
  margin: 0;
  color: var(--cs-muted);
}

.cs-source-order-card-row strong {
  min-width: 0;
  text-align: right;
  color: var(--cs-ink);
  font-size: 11px;
  font-weight: 900;
}

.expert-chat-input {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--cs-line);
  border-radius: 18px;
  background: rgba(247, 252, 248, .96);
  backdrop-filter: blur(10px);
}

.chat-plus {
  width: 30px;
  height: 30px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-weight: 900;
}

.chat-reply {
  min-height: 34px;
  max-height: 92px;
  padding: 8px 10px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  color: var(--cs-ink);
  background: #fff;
  resize: none;
}

.chat-send {
  min-height: 34px;
  padding: 0 10px;
}

.cs-chat-order-detail,
.cs-chat-quick-panel {
  margin: 0 0 8px;
  padding: 9px;
  border: 1px solid var(--cs-line);
  border-radius: 14px;
  background: #fff;
}

.cs-chat-page {
  padding: 8px 10px 8px;
  background: #f6fbf5;
}

.cs-chat-page .chat-reference-head {
  min-height: 52px;
  grid-template-columns: 30px minmax(0, 1fr) 42px;
  gap: 7px;
  width: 100%;
  margin: 0 0 6px;
  padding: 6px 7px;
  border: 1px solid rgba(195, 222, 204, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: none;
}

.cs-chat-page .chat-head-back {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(195, 222, 204, .95);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1;
}

.cs-chat-page .chat-head-main {
  gap: 2px;
}

.cs-chat-page .chat-head-main b {
  gap: 4px;
  color: #1e2e27;
  font-size: 12.5px;
  line-height: 1.18;
}

.cs-chat-page .chat-head-main em {
  padding: 1px 5px;
  color: #16824d;
  background: #e6f5e9;
  font-size: 8.5px;
}

.cs-chat-page .chat-head-main span {
  color: #7a8780;
  font-size: 8.5px;
  line-height: 1.25;
}

.cs-chat-page .chat-profile-button {
  min-height: 24px;
  padding: 0 7px;
  color: #bd6a57;
  background: #fff5f1;
  border-color: #f2d5cb;
  font-size: 10px;
}

.cs-chat-page .expert-chat-thread {
  margin: 0;
  padding: 12px 10px;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: #f6fbf5;
}

.cs-chat-page .empty-card {
  justify-self: start;
  width: auto;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #e1e8e1;
  border-radius: 10px;
  color: #7b877f;
  background: #fff;
  font-size: 10.5px;
}

.cs-chat-page .chat-bubble {
  max-width: 67%;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 10.5px;
  line-height: 1.38;
  font-weight: 800;
}

.cs-chat-page .chat-message-row {
  max-width: 67%;
}

.cs-chat-page .chat-message-row .chat-bubble {
  max-width: 100%;
}

.cs-chat-page .chat-bubble.user {
  color: #2f3d35;
  border: 1px solid #e1e8e1;
  background: #fff;
}

.cs-chat-page .chat-bubble.expert {
  color: #fff;
  background: #22c165;
}

.cs-chat-page .chat-bubble span {
  margin-bottom: 2px;
  color: #77847c;
  font-size: 8.5px;
}

.cs-chat-page .chat-bubble.expert span {
  color: rgba(255, 255, 255, .82);
}

.cs-chat-page .expert-chat-input {
  min-height: 36px;
  grid-template-columns: 28px minmax(0, 1fr) 46px;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border: 0;
  border-top: 1px solid #e4ece4;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.cs-chat-page .chat-reply {
  min-height: 28px;
  max-height: 56px;
  padding: 6px 10px;
  border-color: #dfe7df;
  border-radius: 999px;
  color: #516058;
  font-size: 10.5px;
}

.cs-chat-page .chat-send {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10.5px;
}

.cs-chat-page .chat-plus {
  width: 28px;
  height: 28px;
  border: 1px solid #dfe7df;
  border-radius: 999px;
  color: #22a45c;
  background: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.cs-chat-page .cs-chat-quick-panel {
  flex: 0 0 auto;
  max-height: 58px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid #e4ece4;
  border-radius: 12px;
  background: #fff;
}

.cs-chat-page .cs-chat-quick-panel button,
.cs-chat-page .cs-chat-image-action {
  min-height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #19824e;
  background: #e8f8ec;
  font-size: 10px;
  font-weight: 900;
}

.expert-linked-order-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.expert-linked-order-head b {
  color: var(--cs-ink);
  font-size: 12px;
}

.expert-linked-order-head span {
  color: var(--cs-muted);
  font-size: 10px;
  font-weight: 850;
}

.expert-linked-order-actions,
.cs-chat-quick-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.expert-linked-order-actions .action,
.cs-chat-quick-panel button {
  min-height: 30px;
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  color: var(--cs-green-deep);
  background: #fff;
  font-size: 11px;
  font-weight: 950;
}

.cs-chat-quick-panel button:first-child,
.expert-linked-order-actions .action.primary {
  border-color: var(--cs-green);
  color: #fff;
  background: var(--cs-green);
}

.cs-expert-match-card {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  margin: 8px 10px;
  padding: 10px;
  border: 1px solid var(--cs-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(9, 88, 49, .05);
}

.cs-expert-match-main {
  min-width: 0;
}

.cs-expert-match-main b,
.cs-expert-match-main em {
  display: block;
}

.cs-expert-match-main b {
  overflow: hidden;
  color: var(--cs-ink);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cs-expert-match-main em {
  margin-top: 3px;
  color: var(--cs-muted);
  font-size: 10px;
  line-height: 1.25;
  font-style: normal;
  font-weight: 850;
}

.cs-expert-match-card > .pill {
  justify-self: end;
  min-height: 24px;
  padding: 0 9px;
}

.cs-expert-match-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cs-expert-match-grid span {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(47, 143, 99, .16);
  border-radius: 9px;
  color: var(--cs-muted);
  background: rgba(242, 248, 241, .9);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
}

.cs-expert-match-grid b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--cs-ink);
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cs-expert-match-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--cs-muted);
  font-size: 10.5px;
  line-height: 1.42;
}

.cs-expert-match-card .team-mark.away {
  display: none;
}

.cs-app[data-prototype-page="CS-14"] .screen-scroll {
  padding-bottom: 72px;
}

.cs-app[data-prototype-page="CS-14"] .aftersale-match-card {
  margin: 7px 10px 6px;
  padding: 9px 10px;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  gap: 6px;
  border-radius: 13px;
}

.cs-app[data-prototype-page="CS-14"] .aftersale-match-card .team-mark {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.aftersale-match-main {
  min-width: 0;
}

.cs-app[data-prototype-page="CS-14"] .aftersale-match-main > b {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.2;
}

.aftersale-match-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 6px;
}

.aftersale-match-meta span {
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid rgba(47, 143, 99, .16);
  border-radius: 9px;
  color: var(--cs-muted);
  background: rgba(242, 248, 241, .9);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.18;
}

.aftersale-match-meta b {
  display: block;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--cs-ink);
  font-size: 10.5px;
  line-height: 1.18;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cs-app[data-prototype-page="CS-14"] .aftersale-match-card p {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.42;
}

.aftersale-card-stack,
.compact-card-stack {
  display: grid;
  gap: 7px;
  margin: 0 10px 10px;
}

.aftersale-card,
.compact-status-card {
  padding: 9px 10px;
  border: 1px solid var(--cs-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(9, 88, 49, .05);
}

.aftersale-card-head,
.compact-status-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.aftersale-card-head b,
.compact-status-head b {
  color: var(--cs-ink);
  font-size: 13px;
  line-height: 1.2;
}

.aftersale-card p,
.compact-status-card p {
  margin: 5px 0 0;
  color: var(--cs-muted);
  font-size: 10.5px;
  line-height: 1.42;
}

.aftersale-card .action,
.aftersale-card .pill,
.compact-status-card .action,
.compact-status-card .pill {
  min-height: 25px;
  padding: 0 9px;
  font-size: 10.5px;
}

.cs-app[data-prototype-page="CS-09"] .screen-scroll,
.cs-app[data-prototype-page="CS-20"] .screen-scroll {
  padding-bottom: 72px;
}

.cs-app[data-prototype-page="CS-05"] .screen-scroll {
  padding-bottom: 62px;
}

.cs-app[data-prototype-page="CS-05"] .top {
  padding: 8px 14px 10px;
}

.cs-app[data-prototype-page="CS-05"] .top h1 {
  font-size: 17px;
  line-height: 1.18;
}

.cs-app[data-prototype-page="CS-05"] .top small {
  font-size: 10.5px;
  line-height: 1.2;
}

.cs-app[data-prototype-page="CS-05"] .list-card,
.cs-app[data-prototype-page="CS-05"] .form-card {
  border-radius: 13px;
}
