:root {
  --bg: #eef4f5;
  --ink: #16272d;
  --muted: #66777f;
  --faint: #8c9ba1;
  --surface: #ffffff;
  --line: #d9e3e6;
  --teal: #0f9588;
  --teal-dark: #0d6f68;
  --green: #35a46f;
  --blue: #2f6fbd;
  --amber: #bb7a18;
  --red: #c74740;
  --shadow: 0 18px 44px rgba(20, 44, 52, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(15, 149, 136, 0.12), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.prototype-stage {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(390px, 1fr);
  gap: 44px;
  align-items: center;
  min-height: 100vh;
  padding: 48px min(6vw, 72px);
}

.brief-panel {
  display: grid;
  gap: 18px;
}

.overline {
  margin: 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 11em;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

.brief-panel > p:not(.overline) {
  max-width: 36em;
  color: var(--muted);
  font-size: 16px;
}

.flow-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flow-list button,
.chip,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.flow-list button {
  min-height: 34px;
  padding: 0 12px;
}

.flow-list button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.note {
  display: grid;
  gap: 4px;
  max-width: 420px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.note span {
  color: var(--muted);
}

.phone-shell {
  display: grid;
  place-items: center;
}

.phone {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(100%, 414px);
  height: min(860px, calc(100vh - 48px));
  min-height: 720px;
  border: 1px solid #c7d6da;
  border-radius: 30px;
  background: #f8fbfb;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 22px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px 12px;
  background: #f8fbfb;
}

.app-header p {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.app-header h2 {
  margin-top: 2px;
  font-size: 24px;
}

#messageButton {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal);
}

.screen {
  min-height: 0;
  padding: 0 14px 12px;
  overflow-y: auto;
}

.screen::-webkit-scrollbar {
  width: 0;
}

.bottom-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.bottom-tabs button {
  display: grid;
  gap: 3px;
  place-items: center;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.bottom-tabs button strong {
  font-size: 17px;
  line-height: 1;
}

.bottom-tabs button.active {
  background: #e7f5f3;
  color: var(--teal-dark);
  font-weight: 800;
}

.hero-card,
.card,
.task-card,
.list-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.hero-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(145deg, #0f9588, #126d72);
  color: #fff;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.82);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-stats div {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}

.quick-stats span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.74);
}

.quick-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--faint);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-button {
  width: 42px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.segmented button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.segmented button.active {
  border-color: var(--teal);
  background: #e7f5f3;
  color: var(--teal-dark);
  font-weight: 800;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 2px 8px;
}

.section-title h3 {
  font-size: 15px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

.task-list,
.stack {
  display: grid;
  gap: 10px;
}

.task-card {
  padding: 13px;
}

.task-card header,
.row-between {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.task-card h3 {
  margin-top: 8px;
  font-size: 16px;
}

.task-card p,
.muted {
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.meta-grid div {
  padding: 8px;
  border-radius: 9px;
  background: #f3f7f8;
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.meta-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.chip,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.chip.green,
.pill.green {
  background: #e4f6ee;
  color: var(--green);
  border-color: transparent;
}

.chip.blue,
.pill.blue {
  background: #e8f0fc;
  color: var(--blue);
  border-color: transparent;
}

.chip.amber,
.pill.amber {
  background: #fff2dc;
  color: var(--amber);
  border-color: transparent;
}

.chip.red,
.pill.red {
  background: #fdebea;
  color: var(--red);
  border-color: transparent;
}

.primary-button,
.ghost-button {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--teal-dark);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.card,
.list-card {
  padding: 14px;
}

.detail-cover {
  min-height: 150px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(15, 149, 136, 0.92), rgba(20, 68, 78, 0.88)),
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(255, 255, 255, 0.08) 18px 19px);
  color: #fff;
  padding: 18px;
}

.detail-cover p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
}

.kv-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.kv span:first-child {
  color: var(--muted);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e5edef;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

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

.step-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.step-no {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #e7f5f3;
  color: var(--teal-dark);
  font-weight: 900;
}

.device-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #10252a;
  color: #fff;
}

.device-card p {
  color: rgba(255, 255, 255, 0.74);
}

.income-card {
  padding: 16px;
  border-radius: 14px;
  background: #10252a;
  color: #fff;
}

.income-card span {
  color: rgba(255, 255, 255, 0.72);
}

.income-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.profile-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  z-index: 20;
  opacity: 0;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 999px;
  background: #10252a;
  color: #fff;
  box-shadow: var(--shadow);
  transition: 180ms ease;
}

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

@media (max-width: 860px) {
  .prototype-stage {
    display: block;
    padding: 0;
    background: #f8fbfb;
  }

  .brief-panel {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
