:root {
  --phone-width: 485px;
  --ink: #111111;
  --muted: #a3a3a8;
  --line: #f0f0f3;
  --blue: #1d86ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #22262b;
}

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

button {
  font: inherit;
}

.phone-shell {
  position: relative;
  width: min(100vw, var(--phone-width));
  min-height: 1022px;
  margin: 0 auto;
  overflow: hidden;
  background: #ffffff;
}

.home-screen {
  min-height: 1022px;
  padding-bottom: 78px;
  background: #ffffff;
}

.top-area {
  height: 168px;
  border-bottom: 1px solid #ebebee;
  background: #ffffff;
}

.brand-row {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 25px 0;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-mark {
  width: 37px;
  height: 37px;
  display: block;
  border-radius: 9px;
  object-fit: contain;
  box-shadow: 0 3px 10px rgba(31, 111, 219, 0.18);
}

.brand-left h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 19px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111111;
}

.icon-button svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button-file {
  border: 2.2px solid #171717;
  border-radius: 5px;
  width: 28px;
  height: 31px;
  font-size: 15px;
  font-weight: 800;
}

.quick-tools {
  height: 82px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding: 0 17px 0;
}

.quick-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101010;
}

.quick-tool span:last-child {
  width: 100%;
  font-size: 15px;
  font-weight: 650;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

.quick-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.quick-icon svg {
  width: 37px;
  height: 37px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.import-icon svg {
  fill: #2387e8;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.voice-icon svg {
  fill: #645bd5;
  stroke: #3b6fd6;
  stroke-width: 1.9;
}

.form-icon svg {
  fill: #46c9c1;
  stroke: #2da8a3;
  stroke-width: 1.8;
}

.template-icon svg {
  fill: #f2b62d;
  stroke: #2f75df;
  stroke-width: 1.8;
}

.template-icon rect:nth-child(2) {
  fill: #366fe3;
}

.template-icon rect:nth-child(3) {
  fill: #cf5155;
}

.more-icon svg {
  fill: #6952c7;
  stroke: none;
}

.tabs {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 24px;
  border-bottom: 1px solid #eeeeef;
  background: #ffffff;
}

.tab {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8f8f96;
  font-size: 21px;
  font-weight: 650;
  line-height: 68px;
}

.tab.active {
  color: #111111;
  font-weight: 800;
}

.file-list {
  padding: 11px 0 0;
}

.file-row {
  min-height: 86px;
  display: grid;
  grid-template-columns: 56px 1fr 82px;
  align-items: center;
  gap: 0;
  padding: 0 23px 0 24px;
  color: inherit;
  text-decoration: none;
  background: #ffffff;
}

.file-row:active {
  background: #f7f8fa;
}

.doc-thumb {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(180deg, #7854e8 0%, #8e38e6 100%);
  box-shadow: 0 2px 5px rgba(91, 60, 195, 0.24);
}

.doc-thumb svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.file-main strong {
  display: block;
  overflow: hidden;
  color: #171717;
  font-size: 20px;
  font-weight: 760;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-main span {
  color: #a0a0a6;
  font-size: 15px;
  line-height: 18px;
}

.file-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  color: #cfcfd3;
  font-size: 18px;
}

.file-actions svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: var(--visible-bottom-offset, 0);
  z-index: 10;
  width: min(100vw, var(--phone-width));
  height: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr 86px 1fr 1fr;
  align-items: center;
  padding: 0 18px 5px;
  border-top: 1px solid #ececf0;
  background: rgba(255, 255, 255, 0.98);
  transform: translateX(-50%);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.03);
}

.bottom-item,
.bottom-plus {
  border: 0;
  background: transparent;
  color: #111111;
}

.bottom-item {
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  font-size: 12px;
  font-weight: 560;
}

.bottom-item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-item.active svg {
  fill: #191a1c;
}

.bottom-plus {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  justify-self: center;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #43a9ff 0%, #1a72ff 100%);
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(33, 119, 255, 0.28);
}

.bottom-plus svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
}

.viewer-body {
  background: #22262b;
}

.viewer-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f6f7f9;
}

.viewer-header {
  height: 68px;
  display: grid;
  grid-template-columns: 86px 1fr 86px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #e7e8eb;
  background: #ffffff;
}

.back-button {
  color: #111111;
  text-decoration: none;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 16px;
  font-weight: 650;
}

.back-button svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viewer-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.viewer-title strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-title span {
  color: #8e8f94;
  font-size: 12px;
}

.document-frame {
  position: relative;
  flex: 1;
  min-height: calc(100dvh - 68px);
  background: #dfe2e8;
}

.document-frame iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.pdf-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #555a61;
}

.pdf-fallback p {
  margin: 0;
  font-size: 15px;
}

.pdf-fallback a {
  color: var(--blue);
  font-weight: 700;
}

@media (max-width: 485px) {
  body {
    background: #ffffff;
  }

  .phone-shell,
  .home-screen {
    min-height: 100dvh;
  }
}

@media (max-width: 380px) {
  .tabs {
    gap: 24px;
  }

  .brand-left {
    gap: 14px;
  }

  .header-actions {
    gap: 13px;
  }

  .file-main strong {
    font-size: 18px;
  }
}
