.app-route {
  --zh-bg: #f3f6f9;
  --zh-paper: #fff;
  --zh-ink: #19212d;
  --zh-muted: #56637b;
  --zh-border: #e3e8ef;
  --zh-blue: #2457d7;
  --zh-link: #204fce;
  --zh-light-blue: #e8f0ff;
  --zh-bubble: #dbe7ff;
  --zh-warn: #ab4200;
  --zh-warn-bg: #fff0e0;
  --zh-good: #14613e;
  --zh-good-bg: #e7f7ed;
  --zh-radius: 15px;
  --zh-nav: 64px;
  --zh-safe-bottom: env(safe-area-inset-bottom, 0px);
  --zh-content-width: 510px;
  color-scheme: light;
}

.app-route .frame {
  background: var(--zh-bg);
}

.app-route .bottom {
  background: var(--zh-paper);
  border-color: var(--zh-border);
  padding-bottom: var(--zh-safe-bottom);
}

.app-route .bottom button {
  color: var(--zh-muted);
  min-height: var(--zh-nav);
  font-size: .86rem;
}

.app-route .bottom button.active {
  color: var(--zh-link);
}

.app-route .bottom button.active svg {
  background: none;
  box-shadow: none;
}

.app-route .bottom button[data-go="home"].active svg {
  fill: var(--zh-blue);
  stroke: var(--zh-blue);
}

.app-route:is([data-mobile-page="home"], [data-mobile-page="assistant"], [data-mobile-page="event"]) .topbar {
  display: none;
}

.app-route:is([data-mobile-page="home"], [data-mobile-page="assistant"], [data-mobile-page="event"]) #main {
  padding: 0;
  color: var(--zh-ink);
}

.app-route[data-mobile-page="home"] #main {
  padding-bottom: calc(var(--zh-nav) + var(--zh-safe-bottom) + 12px);
}

.app-route[data-mobile-page="assistant"] #main {
  padding-bottom: calc(var(--zh-nav) + var(--zh-safe-bottom) + 66px);
}

.app-route[data-mobile-page="event"] #main {
  padding-bottom: calc(var(--zh-nav) + var(--zh-safe-bottom) + 70px);
}

.zh-screen {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 0;
  color: var(--zh-ink);
  font-size: 1rem;
}

.zh-screen h1,
.zh-screen h2,
.zh-screen h3 {
  letter-spacing: 0;
  font-weight: 700;
  line-height: 1.3;
}

.zh-screen h1,
.zh-home h2 {
  font-size: 1.43rem;
}

.zh-screen h3 {
  font-size: 1.2rem;
}

.zh-screen button:focus-visible,
.zh-screen summary:focus-visible,
.zh-screen input:focus-visible,
.zh-dialog :focus-visible {
  outline: 2px solid var(--zh-blue);
  outline-offset: 2px;
}

.zh-screen button:active,
.zh-dialog button:active {
  filter: brightness(.97);
}

.zh-card {
  border-radius: var(--zh-radius);
  background: var(--zh-paper);
  min-width: 0;
}

.zh-primary,
.zh-screen .zh-primary,
.zh-dialog .zh-primary {
  background: var(--zh-blue);
  color: var(--zh-paper);
  font-size: 1.14rem;
  font-weight: 700;
  border-radius: 12px;
  min-height: 44px;
}

.zh-primary:disabled {
  opacity: .74;
}

.zh-project-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.zh-project-header > svg {
  flex: 0 0 auto;
  color: var(--zh-link);
}

.zh-project-info {
  flex: 1;
  min-width: 0;
}

.zh-project-info > p,
.zh-meta {
  color: var(--zh-muted);
  line-height: 1.5;
}

.zh-project-info > p {
  margin-top: 2px;
}

.zh-project-choice {
  position: relative;
}

.zh-project-choice > summary {
  display: flex;
  min-height: 32px;
  align-items: center;
  width: fit-content;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.zh-project-choice > summary::-webkit-details-marker {
  display: none;
}

.zh-project-choice > summary > svg {
  flex: 0 0 auto;
  transform: rotate(90deg);
}

.zh-project-choice > button {
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 0;
  min-height: 44px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  border: 1px solid var(--zh-border);
  border-radius: 10px;
  background: var(--zh-paper);
  box-shadow: 0 4px 16px #182b4a1c;
}

.zh-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
}

.zh-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .93rem;
}

.zh-home > .zh-meta {
  margin-top: 8px;
}

.zh-home > section {
  margin-top: 21px;
}

.zh-home > section > h2 {
  margin-bottom: 8px;
}

.zh-priorities {
  padding: 0 12px;
}

.zh-priority {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 64px;
  padding: 8px 0;
  text-align: left;
}

.zh-priority + .zh-priority {
  border-top: 1px solid var(--zh-border);
}

.zh-priority > strong {
  font-size: 1.14rem;
}

.zh-priority > svg {
  color: var(--zh-muted);
}

.zh-priority-icon {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: 9px;
  background: var(--zh-light-blue);
  color: var(--zh-link);
}

.zh-priority-stat {
  color: var(--zh-warn);
  font-weight: 550;
}

.zh-home .zh-ask-card {
  display: grid;
  gap: 7px;
  padding: 15px 12px 13px;
  border-radius: var(--zh-radius);
  background: var(--zh-light-blue);
}

.zh-ask-card > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zh-ask-card h2 svg,
.zh-chat-bubble > span svg {
  color: var(--zh-blue);
}

.zh-ask-card > button {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  text-align: left;
  border-radius: 10px;
  background: var(--zh-paper);
  font-size: 1.07rem;
  font-weight: 550;
}

.zh-ask-card > .zh-primary {
  position: relative;
  justify-content: center;
  margin-top: 4px;
  min-height: 48px;
  padding-inline: 35px;
  text-align: center;
}

.zh-ask-card > .zh-primary svg {
  position: absolute;
  right: 14px;
}

.zh-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px 0 11px;
}

.zh-shortcuts > button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 58px;
  padding: 4px;
}

.zh-shortcuts > button + button {
  border-left: 1px solid var(--zh-border);
}

.zh-assistant-header .zh-meta {
  margin-top: 1px;
}

.zh-assistant-reply {
  margin-top: 12px;
  padding: 12px 14px;
}

.zh-assistant-reply > h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.zh-assistant-reply > p {
  line-height: 1.6;
}

.zh-assistant-reply .assistant-answer-source {
  margin-top: 8px;
  color: var(--zh-muted);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.zh-question {
  width: fit-content;
  max-width: 90%;
  margin: 8px 0 0 auto;
  padding: 8px 10px;
  border-radius: 13px 13px 4px 13px;
  background: var(--zh-bubble);
  font-size: 1.07rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.zh-chat-bubble {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  margin: 12px 0 10px;
}

.zh-chat-bubble > span {
  margin-top: 5px;
}

.zh-chat-bubble > p {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--zh-paper);
  font-size: .96rem;
  line-height: 1.45;
}

.zh-answer {
  padding: 10px 12px 4px;
}

.zh-answer-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.zh-answer-total > strong {
  color: var(--zh-blue);
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.zh-answer-total > h2 {
  font-size: 1.43rem;
}

.zh-answer-source {
  padding-bottom: 3px;
  color: var(--zh-muted);
}

.zh-answer-scope {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 12px;
  margin-bottom: 8px;
  color: var(--zh-muted);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.zh-helmet-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 8px;
  padding: 7px;
  border-radius: 8px;
  background: var(--zh-light-blue);
  text-align: center;
}

.zh-helmet-metrics dt {
  font-size: .88rem;
  color: var(--zh-muted);
}

.zh-helmet-metrics dd {
  margin: 2px 0 0;
  color: var(--zh-link);
  font-weight: 700;
}

.zh-safety-notices {
  margin: 0 0 8px;
  padding: 7px 10px 7px 24px;
  border-radius: 8px;
  background: var(--zh-warn-bg);
  color: var(--zh-warn);
  font-size: .9rem;
  line-height: 1.45;
}

.zh-text-action {
  min-height: 44px;
  color: var(--zh-link);
  font-weight: 600;
}

.zh-classification,
.zh-evidence-list {
  border-top: 1px solid var(--zh-border);
  padding-top: 8px;
}

.zh-classification > h3,
.zh-evidence-list > h3 {
  margin-bottom: 3px;
}

.zh-classification > div {
  min-height: 34px;
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr) 2.1em;
  align-items: center;
  gap: 8px;
}

.zh-classification > div + div,
.zh-evidence-row + .zh-evidence-row {
  border-top: 1px solid var(--zh-border);
}

.zh-classification > div > strong {
  font-weight: 600;
  text-align: right;
}

.zh-meter {
  display: block;
  height: 8px;
  background: var(--zh-border);
  border-radius: 10px;
  overflow: hidden;
}

.zh-meter > i {
  display: block;
  height: 100%;
  background: var(--zh-blue);
  border-radius: inherit;
}

.zh-evidence-row {
  display: grid;
  grid-template-columns: minmax(60px, 44%) minmax(0, 1fr) 14px;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 7px 0;
  text-align: left;
}

.zh-evidence-row > svg {
  color: var(--zh-muted);
}

.zh-evidence-thumb {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border-radius: 6px;
  background: var(--zh-bg);
  color: var(--zh-muted);
}

.zh-evidence-thumb img,
.zh-event-media video,
.zh-event-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zh-evidence-thumb > span,
.zh-media-tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 6px;
  border-radius: 0 0 7px 0;
  background: #182028e8;
  color: #fff;
  font-size: .72rem;
}

.zh-evidence-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.zh-evidence-copy > strong {
  font-size: 1.07rem;
}

.zh-evidence-copy > span {
  color: var(--zh-muted);
  font-size: .87rem;
}

.zh-status-text[data-status="待核实"],
.zh-event-badge[data-status="待核实"] {
  color: var(--zh-warn);
}

.zh-status-text[data-status="已核实"],
.zh-event-badge[data-status="已核实"] {
  color: var(--zh-good);
}

.zh-result-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--zh-border);
  margin-top: 3px;
}

.zh-result-links > button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  color: var(--zh-link);
  font-weight: 600;
}

.zh-result-links > button + button {
  border-left: 1px solid var(--zh-border);
}

.zh-extra {
  padding: 0;
  border-top: 1px solid var(--zh-border);
}

.zh-extra > summary,
.zh-assistant-history > summary {
  display: list-item;
  padding: 13px 2px;
  min-height: 44px;
  color: var(--zh-muted);
  cursor: pointer;
}

.zh-query-source > p {
  color: var(--zh-muted);
  line-height: 1.5;
  padding-bottom: 8px;
  overflow-wrap: anywhere;
}

.zh-query-source > button {
  min-height: 44px;
  padding: 0;
  color: var(--zh-link);
}

.zh-assistant-start,
.zh-assistant-history,
.zh-loading {
  margin-top: 14px;
  padding: 12px;
}

.zh-assistant-start > h2 {
  margin-bottom: 7px;
  font-size: 1.34rem;
}

.zh-assistant-start > button,
.zh-assistant-history > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 5px 0;
  border-top: 1px solid var(--zh-border);
}

.zh-compose,
.zh-event-actions {
  position: fixed;
  z-index: 11;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--zh-content-width));
  padding: 7px 12px;
  border-top: 1px solid var(--zh-border);
  background: var(--zh-paper);
}

.zh-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  bottom: calc(var(--zh-nav) + var(--zh-safe-bottom) + 1px);
}

.zh-compose > input {
  min-width: 0;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--zh-border);
  padding: 6px 11px;
  color: var(--zh-ink);
  font-size: 16px;
}

.zh-compose > input::placeholder {
  color: var(--zh-muted);
}

.zh-compose > button {
  display: grid;
  place-items: center;
}

.zh-event-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  justify-items: center;
  align-items: center;
  margin-inline: -11px;
}

.zh-event-header h1 {
  text-align: center;
}

.zh-back svg {
  transform: rotate(180deg);
}

.zh-event-hero {
  padding: 11px 12px 12px;
}

.zh-event-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.zh-event-title h2 {
  font-size: 1.43rem;
}

.zh-event-title p {
  color: var(--zh-muted);
  margin-top: 4px;
}

.zh-event-badge {
  display: inline-block;
  padding: 4px 10px;
  white-space: nowrap;
  border-radius: 14px;
  background: var(--zh-bg);
  color: var(--zh-muted);
  font-size: .94rem;
}

.zh-event-badge[data-status="待核实"] {
  background: var(--zh-warn-bg);
}

.zh-event-badge[data-status="已核实"] {
  background: var(--zh-good-bg);
}

.zh-event-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #17202b;
}

.zh-event-media > button {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #182028c9;
  color: #fff;
}

.zh-event-media > button[hidden] {
  display: none;
}

.zh-event-media > button svg {
  fill: currentColor;
}

.zh-media-tag {
  font-size: .87rem;
  pointer-events: none;
}

.zh-no-media {
  padding: 8px;
  color: var(--zh-muted);
}

.zh-event > section {
  margin-top: 11px;
}

.zh-event > section > h2 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.zh-event-fields {
  margin: 0;
  padding: 3px 12px;
}

.zh-event-fields > div {
  display: grid;
  grid-template-columns: 6.65em minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  min-height: 28px;
  padding: 5px 0;
  line-height: 1.3;
}

.zh-event-fields > div + div {
  border-top: 1px solid var(--zh-border);
}

.zh-event-fields dt {
  color: var(--zh-muted);
}

.zh-event-fields dd {
  margin: 0;
  font-weight: 550;
}

.zh-description {
  padding: 8px 12px;
  font-size: 1.07rem;
  line-height: 1.5;
}

.zh-timeline {
  list-style: none;
  margin: 0;
  padding: 6px 12px 6px 42px;
}

.zh-timeline > li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px 14px;
  flex-wrap: wrap;
  min-height: 29px;
}

.zh-timeline > li + li {
  padding-top: 4px;
}

.zh-timeline > li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 4px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--zh-blue);
  border-radius: 50%;
  background: var(--zh-blue);
}

.zh-timeline > li:first-child::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 14px;
  bottom: -4px;
  border-left: 1px solid var(--zh-blue);
}

.zh-timeline > li:nth-child(2)::before {
  top: 6px;
  background: var(--zh-paper);
}

.zh-timeline > li.zh-timeline-done::before {
  background: var(--zh-blue);
}

.zh-timeline time,
.zh-timeline p {
  color: var(--zh-muted);
  font-size: .92rem;
}

.zh-timeline p {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}

.zh-event-actions {
  bottom: calc(var(--zh-nav) + var(--zh-safe-bottom) + 1px);
  display: flex;
  gap: 8px;
  padding: 5px 16px;
}

.zh-event-actions > button {
  min-height: 47px;
  flex: 2;
  min-width: 0;
  padding-inline: 6px;
}

.zh-event-actions > button:not(.zh-primary) {
  flex: 1.4;
  border: 1px solid #c6d0df;
  border-radius: 12px;
  color: var(--zh-muted);
  font-weight: 600;
}

.zh-dialog {
  width: min(calc(100% - 32px), 440px);
  max-height: calc(100% - 32px);
  border: 0;
  border-radius: 16px;
  padding: 18px;
  color: var(--zh-ink);
  background: var(--zh-paper);
}

.zh-dialog::backdrop {
  background: #141c2b9c;
}

.zh-dialog > h2 {
  font-size: 1.39rem;
  margin-bottom: 10px;
}

.zh-dialog form,
.zh-dialog label {
  display: grid;
  gap: 8px;
}

.zh-dialog input,
.zh-dialog textarea {
  border: 1px solid var(--zh-border);
  border-radius: 9px;
  padding: 9px;
  min-height: 44px;
  width: 100%;
  font-size: 16px;
}

.zh-dialog textarea {
  resize: vertical;
}

.zh-dialog-error {
  color: var(--zh-warn);
}

.zh-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.zh-dialog-actions > button,
.zh-options > button {
  min-height: 44px;
  padding: 6px 12px;
}

.zh-options > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--zh-border);
}

@media (min-width: 761px) {
  .app-route {
    background: #e7ecf4;
  }
}

@media (max-width: 340px) {
  .zh-screen {
    padding-inline: 11px;
  }
  .zh-priority {
    grid-template-columns: 36px minmax(0, 1fr) auto 12px;
    gap: 5px;
  }
  .zh-classification > div {
    grid-template-columns: 8.3em minmax(0, 1fr) 2em;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.app-route) {
    scroll-behavior: auto;
  }
  .app-route button {
    transition: none;
  }
}
