:root {
  color-scheme: light;
  --bar-height: 2.2rem;
  --toolbar-height: 1.72rem;
  --tab-height: 4.2rem;
  --line: #dcdcdc;
  --text: #333333;
  --muted: #8e8e8e;
  --accent: #ff6600;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: 20px;
}

body {
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: var(--bar-height) var(--toolbar-height) minmax(0, 1fr) calc(var(--tab-height) + env(safe-area-inset-bottom));
  background: #ffffff;
}

.top-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--bar-height);
  border-bottom: 0;
  background: #ff6600;
}

.brand-title {
  width: min(15rem, calc(100vw - 4rem));
  text-align: center;
  color: #ffffff;
  font-size: 0.92rem;
  line-height: 1.1;
  font-stretch: condensed;
}

.brand-title span {
  display: block;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.lang-link {
  position: absolute;
  right: 0.5rem;
  top: 0.36rem;
  display: grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  text-decoration: none;
  color: #333333;
  font-size: 0.62rem;
}

.lang-link img {
  width: 1.2rem;
  height: auto;
}

.text-link {
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pdf-toolbar {
  display: grid;
  grid-template-columns: 1.55rem 1.55rem minmax(4.9rem, 1fr) 1.4rem 1.4rem 1.4rem 1.4rem 1.4rem 1.4rem;
  align-items: center;
  height: var(--toolbar-height);
  border-top: 0.12rem solid #111111;
  border-bottom: 1px solid #bcbcbc;
  background: #f7f7f7;
  color: #333333;
  box-shadow: inset 0 -1px #e2e2e2;
}

.pdf-toolbar button {
  display: grid;
  height: 100%;
  min-width: 0;
  place-items: center;
  border: 0;
  border-right: 1px solid transparent;
  background: transparent;
  color: #464646;
  font: inherit;
  font-size: 1.08rem;
  line-height: 1;
}

.toolbar-icon {
  font-size: 0.9rem;
}

.search-icon {
  width: 0.72rem;
  height: 0.72rem;
  border: 0.12rem solid #505050;
  border-radius: 50%;
  transform: rotate(-40deg);
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 0.38rem;
  height: 0.12rem;
  background: #505050;
  transform: translate(0.42rem, 0.5rem);
}

.page-control {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #222222;
  font-size: 0.74rem;
}

.page-control input {
  width: 2.72rem;
  height: 1.38rem;
  border: 1px solid #c9d0d3;
  border-radius: 0.08rem;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 0.78rem;
  text-align: center;
  box-shadow: inset 0 0 0.06rem rgba(0, 0, 0, 0.18);
}

.viewer-wrap {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}

.report-pages {
  min-height: 100%;
  padding: 0;
  background: #b8b8b8;
}

.report-pages img {
  display: block;
  width: calc(100% - 0.22rem);
  height: auto;
  margin: 0 auto 0.12rem;
  background: #ffffff;
  border: 0.08rem solid #4a4a4a;
  box-shadow: none;
}

.bottom-tabs {
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: calc(var(--tab-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #f1f1f1;
  box-shadow: none;
  background: #ffffff;
}

.tab-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: #444444;
  text-decoration: none;
  font: inherit;
}

.tab-item:last-child {
  border-right: 0;
}

.tab-icon {
  display: grid;
  height: 2.1rem;
  min-width: 2.1rem;
  place-items: center;
  line-height: 1;
}

.tab-icon img {
  width: 2.1rem;
  max-height: 2.1rem;
}

.share-dot {
  color: #8c8c8c;
  font-size: 0.92rem;
  letter-spacing: 0;
}

.tab-label {
  width: 100%;
  overflow: hidden;
  padding: 0 0.15rem;
  font-size: 0.78rem;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 9;
  background: rgba(0, 0, 0, 0.35);
}

.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
}

.action-sheet.open {
  display: flex;
}

.sheet-spacer {
  flex: 1;
}

.sheet-panel {
  overflow: hidden;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  background: #ffffff;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 80%;
  margin: 0.95rem auto 0.75rem;
}

.share-actions button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: #333333;
  font: inherit;
  font-size: 0.62rem;
}

.share-actions img {
  width: 1.95rem;
  height: 1.95rem;
}

.cancel-button {
  width: 100%;
  height: 2.2rem;
  border: 0;
  border-top: 0.3rem solid #dcdcdc;
  background: #ffffff;
  color: #333333;
  font: inherit;
  font-size: 0.66rem;
}

.contact-panel {
  text-align: center;
}

.contact-panel p {
  margin: 0.65rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.contact-panel a {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: none;
}

.share-tip {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  background: rgba(0, 0, 0, 0.66);
  color: #ffffff;
  text-align: center;
}

.share-tip.open {
  display: block;
}

.share-tip img {
  position: absolute;
  top: 0;
  right: 1.1rem;
  width: 4.5rem;
}

.share-tip strong {
  position: absolute;
  top: 6.1rem;
  left: 0;
  right: 0;
  font-size: 0.78rem;
  line-height: 2.6rem;
}

.share-tip span {
  position: absolute;
  top: 8.25rem;
  left: 0.7rem;
  right: 0.7rem;
  font-size: 0.75rem;
}

@media (min-width: 760px) {
  body {
    overflow: auto;
    background: #f2f4f5;
  }

  .app-shell {
    position: relative;
    width: min(430px, 100vw);
    min-height: 100vh;
    margin: 0 auto;
    box-shadow: 0 0 1.2rem rgba(0, 0, 0, 0.12);
  }
}

@supports (-webkit-touch-callout: none) {
  .viewer-wrap {
    transform: translateZ(0);
  }
}
