:root {
  --primary: #0052d9;
  --primary-weak: #eaf2ff;
  --primary-deep: #003fa3;
  --text: #1f2329;
  --text-secondary: #5f6b7a;
  --text-muted: #8b96a6;
  --line: #e5e9f0;
  --surface: #ffffff;
  --page: #f5f7fa;
  --success: #00a870;
  --success-weak: #e8f8f1;
  --warning: #ed7b2f;
  --warning-weak: #fff2e8;
  --danger: #d54941;
  --danger-weak: #fff0ed;
  --shadow: 0 12px 28px rgba(22, 46, 90, 0.1);
  --radius: 10px;
  --radius-small: 8px;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e8edf5;
  color: var(--text);
}

body {
  min-width: 320px;
}

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

button {
  cursor: pointer;
}

.prototype-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.miniapp {
  position: relative;
  width: min(100%, 390px);
  min-height: min(844px, calc(100vh - 48px));
  overflow: hidden;
  background: var(--page);
  border: 1px solid #d8e0eb;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.app-page {
  position: relative;
  display: flex;
  min-height: min(844px, calc(100vh - 48px));
  flex-direction: column;
  background: var(--page);
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 96px;
  scrollbar-width: none;
}

.page-content::-webkit-scrollbar,
.next-bus-rail::-webkit-scrollbar,
.screen-list::-webkit-scrollbar,
.line-station-list::-webkit-scrollbar {
  display: none;
}

.page-content.no-tabbar {
  padding-bottom: 20px;
}

.statusbar {
  display: flex;
  height: 26px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
  color: #101828;
  font-size: 12px;
  font-weight: 700;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.signal-bars {
  display: inline-flex;
  height: 10px;
  align-items: end;
  gap: 1px;
}

.signal-bars i {
  display: block;
  width: 2px;
  background: currentColor;
}

.signal-bars i:nth-child(1) { height: 3px; }
.signal-bars i:nth-child(2) { height: 5px; }
.signal-bars i:nth-child(3) { height: 7px; }
.signal-bars i:nth-child(4) { height: 9px; }

.battery {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.battery::before {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  left: 1px;
  content: "";
  background: currentColor;
  border-radius: 1px;
}

.battery::after {
  position: absolute;
  top: 2px;
  right: -3px;
  width: 2px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 0 1px 1px 0;
}

.mini-header {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--surface);
}

.page-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.page-title {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.back-button,
.icon-button,
.query-button,
.wechat-capsule,
.close-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
}

.back-button {
  width: 28px;
  height: 32px;
  margin-left: -6px;
  font-size: 28px;
  line-height: 1;
}

.wechat-capsule {
  display: flex;
  width: 76px;
  height: 30px;
  align-items: center;
  justify-content: space-evenly;
  border: 1px solid #dce2eb;
  border-radius: 16px;
  color: #697586;
}

.wechat-capsule .dots {
  transform: translateY(-3px);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

.wechat-capsule .mini-circle {
  width: 15px;
  height: 15px;
  border: 1.6px solid #8893a1;
  border-radius: 50%;
}

.tabbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: grid;
  height: 76px;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 6px 4px 7px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.tab-item {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
}

.tab-item.active {
  color: var(--primary);
}

.tab-icon {
  display: grid;
  width: 30px;
  height: 28px;
  place-items: center;
  line-height: 1;
}

.tab-svg {
  width: 20px;
  height: 20px;
}

.tab-item:not(.tab-ai) .tab-icon {
  border-radius: 8px;
}

.tab-item.active:not(.tab-ai) .tab-icon {
  background: var(--primary-weak);
}

.tab-ai .tab-icon {
  width: 30px;
  height: 30px;
  margin-top: -16px;
  border: 3px solid var(--page);
  border-radius: 50%;
  background: var(--primary);
  color: white;
  box-shadow: 0 3px 8px rgba(0, 82, 217, 0.28);
}

.tab-ai .tab-svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.1;
}

.tab-ai span:last-child {
  margin-top: -2px;
}

.notice-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin: 0 -4px 12px;
  padding: 0 8px 0 12px;
  border-radius: var(--radius-small);
  background: var(--primary-weak);
  color: var(--primary-deep);
}

.notice-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.notice-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.query-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #bed2fb;
  border-radius: 7px;
  background: var(--surface);
  color: var(--primary);
}

.query-button .tab-svg {
  width: 18px;
  height: 18px;
}

.section-head {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  margin: 3px 0 8px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.section-meta,
.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}

.section-meta {
  color: var(--text-muted);
}

.next-bus-carousel {
  margin: 0 -16px 16px;
}

.next-bus-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0;
  padding: 0 16px 4px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.next-bus-carousel-footer {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.bus-page-dots,
.bus-scroll-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bus-page-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c7d1df;
}

.bus-page-dot.active {
  width: 16px;
  border-radius: 4px;
  background: var(--primary);
}

.bus-scroll-button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7e0ed;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
}

.arrival-card {
  position: relative;
  display: flex;
  width: 262px;
  min-height: 140px;
  flex: 0 0 262px;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 14px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(30, 45, 70, 0.06);
  scroll-snap-align: start;
  text-align: left;
}

.arrival-card.primary-card {
  background: var(--primary);
  color: white;
}

.arrival-card.primary-card .muted,
.arrival-card.primary-card .card-footer,
.arrival-card.primary-card .route-direction {
  color: rgba(255, 255, 255, 0.78);
}

.card-top,
.arrival-body,
.card-footer,
.route-line,
.row-between,
.field-line,
.result-row,
.schedule-item,
.station-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.line-badge {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.primary-card .line-badge {
  background: white;
  color: var(--primary);
}

.route-direction,
.muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.status-tag,
.soft-tag,
.route-tag,
.vehicle-chip {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.status-tag.success,
.soft-tag.success {
  background: var(--success-weak);
  color: var(--success);
}

.status-tag.warning,
.soft-tag.warning {
  background: var(--warning-weak);
  color: var(--warning);
}

.status-tag.blue,
.soft-tag.blue,
.route-tag {
  background: var(--primary-weak);
  color: var(--primary);
}

.arrival-body {
  align-items: end;
}

.arrival-time {
  color: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.arrival-time small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 500;
}

.arrival-metrics {
  display: flex;
  color: inherit;
  font-size: 12px;
  gap: 10px;
}

.arrival-metrics span {
  white-space: nowrap;
}

.card-footer {
  color: var(--text-muted);
  font-size: 11px;
}

.service-panel,
.surface-panel,
.route-info-card,
.status-card,
.profile-card,
.line-summary,
.calendar-panel,
.announcement-card,
.form-panel,
.notification-card {
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(30, 45, 70, 0.04);
}

.service-cell,
.cell-button {
  display: flex;
  width: 100%;
  min-height: 53px;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.service-cell:last-child,
.cell-button:last-child {
  border-bottom: 0;
}

.service-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
}

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

.service-copy strong,
.cell-title {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.service-copy small,
.cell-desc {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  flex: 0 0 auto;
  color: #a1aabd;
  font-size: 19px;
}

.segmented {
  display: grid;
  min-height: 34px;
  grid-template-columns: repeat(2, 1fr);
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

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

.segment {
  min-width: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
}

.segment.active {
  background: var(--primary-weak);
  color: var(--primary);
  font-weight: 700;
}

.history-list,
.result-list,
.line-station-list,
.feedback-options {
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.history-item,
.result-row {
  width: 100%;
  min-height: 51px;
  padding: 0 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.history-item:last-child,
.result-row:last-child {
  border-bottom: 0;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.history-type {
  color: var(--text-muted);
  font-size: 11px;
}

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

.result-row .line-badge {
  min-width: 29px;
}

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

.result-copy strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-info-card {
  padding: 14px;
  background: var(--primary);
  color: white;
}

.route-info-card .route-line {
  align-items: flex-start;
}

.route-name-large {
  font-size: 20px;
  font-weight: 700;
}

.route-info-card .route-direction,
.route-info-card .mini-note,
.route-info-card .route-service-data {
  color: rgba(255, 255, 255, 0.8);
}

.route-service-data {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
}

.route-service-data span {
  display: block;
}

.route-service-data strong {
  display: block;
  margin-top: 3px;
  color: white;
  font-size: 13px;
}

.line-summary {
  padding: 12px 13px;
}

.line-summary h2,
.line-summary h3,
.form-panel h2,
.announcement-card h2,
.status-card h2,
.calendar-panel h2,
.notification-card h2 {
  margin: 0;
  font-size: 15px;
}

.line-summary p,
.announcement-card p,
.form-hint,
.status-description,
.note-text {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

.line-station-list {
  position: relative;
  padding: 4px 0;
}

.station-node {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 57px;
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 0 13px 0 4px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.station-rail {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15px;
}

.station-rail::after {
  position: absolute;
  top: 28px;
  bottom: -31px;
  width: 2px;
  content: "";
  background: #b5cdf9;
}

.station-node:last-child .station-rail::after {
  display: none;
}

.station-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: white;
}

.station-dot.vehicle {
  width: 21px;
  height: 21px;
  margin-top: -4px;
  border: 0;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.station-node.selected {
  background: #f4f8ff;
}

.station-node.selected .station-dot {
  width: 18px;
  height: 18px;
  margin-top: -2px;
  border: 4px solid #cfe0ff;
  background: var(--primary);
  box-shadow: 0 0 0 3px #edf4ff;
}

.station-content {
  min-width: 0;
  padding: 10px 0 7px;
}

.station-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.station-name-row strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-name-row span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 10px;
}

.vehicle-chip {
  margin-top: 4px;
  background: var(--primary-weak);
  color: var(--primary);
  font-weight: 600;
}

.station-selection-inline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 7px 0 2px;
  padding: 8px;
  border-radius: 7px;
  background: #e8f1ff;
}

.station-selection-inline span {
  color: var(--primary-deep);
  font-size: 11px;
  text-align: center;
}

.station-selection-inline strong {
  display: block;
  margin-top: 2px;
  color: var(--primary);
  font-size: 13px;
}

.expand-line-button {
  width: calc(100% - 26px);
  min-height: 36px;
  margin: 7px 13px 10px;
  border: 1px solid #c4d7fa;
  border-radius: 7px;
  background: #f5f8ff;
  color: var(--primary);
  font-size: 12px;
}

.station-location {
  padding: 13px;
}

.station-location h2 {
  margin: 0;
  font-size: 17px;
}

.station-location p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.station-arrival-list {
  display: grid;
  gap: 9px;
}

.station-arrival-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.station-arrival-card .arrival-time {
  color: var(--primary);
  font-size: 23px;
}

.station-arrival-card strong {
  display: block;
  font-size: 14px;
}

.station-arrival-card small {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  margin-bottom: 12px;
}

.query-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin-bottom: 14px;
}

.query-search-submit {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #bed2fb;
  border-radius: 8px;
  background: var(--primary-weak);
  color: var(--primary);
}

.query-search-submit .tab-svg {
  width: 19px;
  height: 19px;
}

.query-group {
  margin-bottom: 16px;
}

.query-group:last-child {
  margin-bottom: 0;
}

.query-group-head {
  display: grid;
  min-height: 30px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
}

.query-group-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.query-group-icon.muted-icon {
  background: #eef1f5;
  color: var(--text-secondary);
}

.query-group-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.query-group .result-list,
.query-group .history-list {
  margin-bottom: 0;
}

.search-box,
.text-input,
.text-area,
.date-input,
.time-input,
.number-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  outline: none;
  background: white;
  color: var(--text);
  font-size: 14px;
}

.search-box:focus,
.text-input:focus,
.text-area:focus,
.date-input:focus,
.time-input:focus,
.number-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.search-submit,
.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.primary-button.block,
.secondary-button.block {
  width: 100%;
}

.secondary-button {
  border: 1px solid #c4d7fa;
  background: white;
  color: var(--primary);
}

.danger-button {
  background: var(--danger);
}

.empty-state {
  padding: 34px 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.booking-hero {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
}

.booking-hero h2 {
  margin: 0;
  font-size: 20px;
}

.booking-hero p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.6;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 15px;
}

.booking-steps span {
  display: block;
  min-height: 42px;
  padding: 7px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 11px;
  text-align: center;
}

.booking-steps b {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.booking-entry-card {
  margin: 12px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: white;
}

.booking-entry-card h3 {
  margin: 0;
  font-size: 15px;
}

.booking-entry-card p {
  margin: 6px 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.confirmed-preview {
  padding: 13px;
  border-radius: var(--radius);
  background: var(--success-weak);
}

.confirmed-preview .row-between {
  align-items: flex-start;
}

.confirmed-preview h3 {
  margin: 0;
  color: #087451;
  font-size: 15px;
}

.confirmed-preview p {
  margin: 5px 0 0;
  color: #28785f;
  font-size: 12px;
  line-height: 1.5;
}

.form-panel {
  padding: 14px;
}

.form-panel + .form-panel {
  margin-top: -3px;
}

.field-block {
  margin-top: 14px;
}

.field-block:first-of-type {
  margin-top: 12px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.required {
  color: var(--danger);
}

.field-help,
.error-text {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

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

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

.schedule-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 74px;
  gap: 8px;
}

.schedule-controls .number-input {
  min-width: 0;
}

.schedule-list {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}

.schedule-item {
  padding: 8px 9px;
  border-radius: 7px;
  background: var(--primary-weak);
  color: var(--primary-deep);
  font-size: 12px;
}

.schedule-item button {
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
}

.fixed-action {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  z-index: 6;
}

.fixed-action.with-tabbar {
  bottom: 88px;
}

.fixed-action .primary-button {
  width: 100%;
  min-height: 46px;
  box-shadow: 0 8px 16px rgba(0, 82, 217, 0.24);
}

.status-card {
  padding: 18px 14px;
  text-align: center;
}

.result-symbol {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--success-weak);
  color: var(--success);
  font-size: 27px;
  font-weight: 700;
}

.result-symbol.blue {
  background: var(--primary-weak);
  color: var(--primary);
}

.status-card .status-description {
  margin-top: 6px;
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 17px 0 2px;
}

.progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.progress-step::before {
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 2px;
  content: "";
  background: #dce3ed;
}

.progress-step:first-child::before {
  display: none;
}

.progress-step.active::before {
  background: var(--primary);
}

.progress-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 16px;
  height: 16px;
  border: 3px solid #dce3ed;
  border-radius: 50%;
  background: white;
}

.progress-step.active {
  color: var(--primary);
  font-weight: 700;
}

.progress-step.active .progress-dot {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px white;
}

.detail-list {
  margin-top: 8px;
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
}

.detail-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

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

.detail-row span:first-child {
  color: var(--text-secondary);
}

.detail-row span:last-child {
  max-width: 61%;
  color: var(--text);
  text-align: right;
}

.announcement-priority {
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--warning-weak);
  color: #bd6100;
  font-size: 12px;
  line-height: 1.45;
}

.announcement-card {
  padding: 14px;
}

.announcement-card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 11px 0;
}

.announcement-time {
  display: block;
  margin-top: 13px;
  color: var(--text-muted);
  font-size: 11px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 13px;
}

.avatar {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}

.profile-card h2 {
  margin: 0;
  font-size: 16px;
}

.profile-card p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.role-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 16px;
}

.role-switcher > span {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 12px;
}

.role-switcher .segmented {
  width: 204px;
  flex: 0 1 204px;
}

.feedback-form {
  margin: 12px 0;
  padding: 13px;
  border-radius: var(--radius);
  background: white;
}

.feedback-form h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.feedback-options {
  margin-bottom: 10px;
  border: 1px solid var(--line);
}

.feedback-option {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 12px;
}

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

.feedback-option input {
  accent-color: var(--primary);
}

.text-area {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.driver-current {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
}

.driver-current .small-overline {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.driver-current h2 {
  margin: 6px 0 4px;
  font-size: 18px;
}

.driver-current p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.driver-current .departure-countdown {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 8px;
  border-radius: 5px;
  background: white;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.calendar-panel {
  padding: 13px;
}

.day-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 10px -2px 2px;
  padding: 0 2px 2px;
  scrollbar-width: none;
}

.day-tab {
  display: grid;
  min-width: 58px;
  min-height: 51px;
  place-items: center;
  gap: 1px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--text-secondary);
  font-size: 11px;
}

.day-tab strong {
  color: inherit;
  font-size: 12px;
}

.day-tab.active {
  border-color: var(--primary);
  background: var(--primary-weak);
  color: var(--primary);
}

.trip-list {
  overflow: hidden;
  border-radius: var(--radius);
  background: white;
}

.trip-row {
  display: grid;
  min-height: 65px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
}

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

.trip-row time {
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
}

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

.trip-row strong {
  font-size: 13px;
}

.trip-row span {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.subscription-card {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--primary-weak);
}

.subscription-card h2 {
  margin: 0;
  color: var(--primary-deep);
  font-size: 16px;
}

.subscription-card p {
  margin: 7px 0 12px;
  color: #315caa;
  font-size: 12px;
  line-height: 1.65;
}

.notification-card {
  padding: 15px;
}

.notification-sender {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.notification-sender .avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 12px;
}

.notification-sender strong {
  display: block;
  font-size: 14px;
}

.notification-sender small {
  color: var(--text-muted);
  font-size: 11px;
}

.ai-page {
  position: relative;
  display: flex;
  min-height: min(844px, calc(100vh - 48px));
  flex-direction: column;
  background: var(--page);
}

.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 98px;
}

.ai-intro {
  margin-bottom: 16px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--primary-weak);
}

.ai-intro h2 {
  margin: 0;
  color: var(--primary-deep);
  font-size: 16px;
}

.ai-intro p {
  margin: 6px 0 0;
  color: #3f66a9;
  font-size: 12px;
  line-height: 1.55;
}

.chat-list {
  display: grid;
  gap: 11px;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-avatar {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
}

.chat-bubble {
  max-width: 77%;
  padding: 9px 10px;
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.chat-row.user .chat-bubble {
  background: var(--primary);
  color: white;
}

.suggestion-label {
  margin: 18px 0 7px;
  color: var(--text-secondary);
  font-size: 12px;
}

.suggestion-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.suggestion-grid button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid #cfdbef;
  border-radius: 6px;
  background: white;
  color: var(--primary);
  font-size: 12px;
}

.ai-composer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 44px;
  gap: 7px;
  align-items: center;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: white;
}

.voice-button,
.send-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 16px;
}

.voice-button.listening {
  background: var(--danger-weak);
  color: var(--danger);
  box-shadow: 0 0 0 5px rgba(213, 73, 65, 0.12);
}

.send-button {
  width: 42px;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  font-size: 13px;
}

.ai-input {
  min-width: 0;
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid #d9e0ea;
  border-radius: 7px;
  outline: none;
  background: #f8fafc;
  font-size: 13px;
}

.screen-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(20, 31, 49, 0.42);
}

.screen-sheet {
  max-height: 78%;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: white;
}

.sheet-head {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  margin: 0;
  font-size: 16px;
}

.close-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f2f4f7;
  color: var(--text-secondary);
  font-size: 20px;
}

.screen-list {
  display: grid;
  max-height: 540px;
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px 26px;
}

.screen-choice {
  min-height: 59px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  text-align: left;
}

.screen-choice.active {
  border-color: var(--primary);
  background: var(--primary-weak);
}

.screen-code {
  display: block;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.screen-name {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
}

.toast {
  position: absolute;
  z-index: 30;
  right: 22px;
  bottom: 92px;
  left: 22px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(31, 35, 41, 0.9);
  color: white;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 520px) {
  .prototype-stage {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .miniapp,
  .app-page,
  .ai-page {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .page-content {
    min-height: calc(100vh - 78px);
  }
}
