:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #8795a8;
  --teal: #1c8090;
  --surface: #fff;
  --background: #f3f7fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--background);
}

button,
input {
  font: inherit;
}

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

.web-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 44px;
  color: #111;
  font-size: 16px;
  font-weight: 600;
  line-height: 44px;
  text-align: center;
  background: #fff;
}

.page-shell {
  width: 100%;
  max-width: 750px;
  min-height: calc(100vh - 44px);
  margin: 0 auto;
  padding-bottom: 24px;
  background: var(--background);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 20px 24px;
  color: #fff;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(135deg, #112b54 0%, #174f88 54%, #1c7e91 100%);
}

.hero-glow {
  position: absolute;
  top: -80px;
  right: -50px;
  width: 195px;
  height: 195px;
  border-radius: 50%;
  background: rgba(94, 232, 204, 0.2);
  filter: blur(4px);
}

.brand-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-icon {
  position: relative;
  flex: 0 0 41px;
  width: 41px;
  height: 50px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 17px rgba(0, 0, 0, 0.18);
}

.page-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 0 5px 0 4px;
  background: #bcdbe9;
}

.brand-mark {
  position: absolute;
  right: 0;
  bottom: 9px;
  left: 0;
  color: #185c8b;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

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

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #8fe1d4;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.hero-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero-copy {
  position: relative;
  display: block;
  max-width: 310px;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.7;
}

.feature-row {
  position: relative;
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.feature-pill {
  padding: 4px 9px;
  color: #d8faf4;
  font-size: 10.5px;
  border: 1px solid rgba(216, 250, 244, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.content {
  position: relative;
  z-index: 1;
  margin-top: -9px;
  padding: 0 14px;
}

.card {
  margin-bottom: 12px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid rgba(28, 63, 95, 0.06);
  border-radius: 14px;
  box-shadow: 0 8px 23px rgba(33, 59, 88, 0.08);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-heading > div {
  min-width: 0;
}

.section-index {
  margin-right: 7px;
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 800;
}

.section-title {
  color: #162942;
  font-size: 15px;
  font-weight: 700;
}

.section-note {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px 6px;
  border: 1px dashed #cddde9;
  border-radius: 11px;
  background: linear-gradient(180deg, #fafdff 0%, #f5f9fc 100%);
}

.upload-symbol {
  position: relative;
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: #e9f7f7;
}

.arrow-stem {
  position: absolute;
  top: 11px;
  left: 22px;
  width: 2.5px;
  height: 20px;
  border-radius: 2px;
  background: #1a8793;
}

.arrow-head {
  position: absolute;
  top: 13px;
  left: 17px;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid #1a8793;
  border-left: 2.5px solid #1a8793;
  transform: rotate(45deg);
}

.empty-title {
  color: #1b314c;
  font-size: 14.5px;
  font-weight: 700;
}

.empty-copy {
  margin-top: 5px;
  color: #8a98aa;
  font-size: 11.5px;
}

.choose-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-top: 14px;
}

.button-row {
  display: flex;
  gap: 7px;
  width: 100%;
}

.secondary-button,
.primary-button,
.result-button,
.remove-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.secondary-button {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  padding: 0 6px;
  color: #184861;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 38px;
  border: 1px solid #8fc4dc;
  border-radius: 8px;
  background: #b9def1;
  box-shadow: 0 3px 8px rgba(58, 123, 155, 0.12);
}

.secondary-button:hover {
  background: #a7d4ea;
}

.secondary-button:disabled,
.remove-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.file-card {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid #dce9ef;
  border-radius: 11px;
  background: #f8fbfd;
}

.file-badge {
  flex: none;
  width: 39px;
  height: 44px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 44px;
  text-align: center;
  border-radius: 6px 6px 10px 6px;
}

.file-badge.generic {
  color: #246c87;
  background: #dcecf5;
}

.file-badge.pdf {
  background: linear-gradient(160deg, #dc5b62, #b93848);
}

.file-badge.image {
  background: linear-gradient(160deg, #2fa69a, #19736f);
}

.file-info {
  min-width: 0;
  flex: 1;
  margin: 0 11px;
}

.file-name {
  display: block;
  overflow: hidden;
  color: #1a2e48;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: block;
  margin-top: 4.5px;
  color: #8a98a8;
  font-size: 11px;
}

.remove-button {
  display: inline-flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 28px;
  padding: 0;
  color: #a6555d;
  font-size: 11.5px;
  line-height: 28px;
  border-radius: 6px;
  background: #fff0f1;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c7d2df;
}

.status-dot.active {
  background: #238d9a;
  box-shadow: 0 0 0 4px rgba(35, 141, 154, 0.12);
}

.status-dot.success {
  background: #2ca26a;
  box-shadow: 0 0 0 4px rgba(44, 162, 106, 0.12);
}

.status-dot.error {
  background: #d6545f;
  box-shadow: 0 0 0 4px rgba(214, 84, 95, 0.1);
}

.status-panel {
  margin-bottom: 13px;
}

.status-copy-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.status-text,
.status-percent {
  font-size: 11.5px;
}

.status-text {
  color: #607087;
}

.status-percent {
  color: #1b7786;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 50px;
  background: #e8eff3;
}

.progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1e7c97, #37b9a9);
  transition: width 0.35s ease;
}

.primary-button {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 46px;
  border-radius: 9px;
  background: linear-gradient(100deg, #155b8c, #168e96);
  box-shadow: 0 6px 15px rgba(22, 124, 143, 0.2);
}

.primary-button:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.68);
  background: #a8bac9;
  box-shadow: none;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-button {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: #183f5b;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 42px;
  border: 1px solid #b9d8e7;
  border-radius: 9px;
  background: #dceff8;
  box-shadow: 0 4px 10px rgba(76, 133, 163, 0.12);
}

.result-button:hover {
  background: #cfe8f5;
}

.error-text {
  margin: 10px 0 0;
  padding: 9px 10px;
  color: #a63f49;
  font-size: 11.5px;
  line-height: 1.5;
  border-radius: 7px;
  background: #fff2f3;
}

.tips-card {
  margin: 4px 3px 16px;
  padding: 15px 14px;
  border-left: 2.5px solid #1c8d93;
  border-radius: 4px 10px 10px 4px;
  background: rgba(255, 255, 255, 0.62);
}

.tips-title {
  display: block;
  margin-bottom: 10px;
  color: #3e526b;
  font-size: 12.5px;
  font-weight: 700;
}

.tip-row {
  display: flex;
  align-items: flex-start;
  margin-top: 6.5px;
}

.tip-number {
  flex: none;
  width: 17px;
  height: 17px;
  margin-right: 6.5px;
  color: #2b7f88;
  font-size: 9.5px;
  line-height: 17px;
  text-align: center;
  border-radius: 50%;
  background: #e1f2f1;
}

.tip-copy {
  flex: 1;
  color: #798799;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.footer {
  display: block;
  margin: 0;
  color: #a2afbe;
  font-size: 9px;
  letter-spacing: 1px;
  text-align: center;
}

.support-text {
  display: block;
  margin: 0 12px 8px;
  color: #5d7189;
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.usage-counter {
  margin: 4px 14px 12px;
  padding: 12px 14px;
  text-align: center;
  border: 1px solid #d8e6ee;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.usage-line,
.usage-limit {
  margin: 0;
  line-height: 1.65;
}

.usage-line {
  color: #38536d;
  font-size: 11px;
}

.usage-limit {
  margin-top: 3px;
  color: #8190a1;
  font-size: 10px;
}

.privacy-mask {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: rgba(10, 24, 40, 0.54);
}

.privacy-dialog {
  width: 100%;
  padding: 20px 17px 12px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 12px 40px rgba(7, 24, 42, 0.24);
}

.privacy-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9px;
  background: linear-gradient(145deg, #1f788b, #33a895);
}

.privacy-icon.download {
  font-size: 20px;
  background: linear-gradient(145deg, #155b8c, #168e96);
}

.privacy-title {
  margin: 11px 0 0;
  color: #172d47;
  font-size: 17px;
}

.privacy-copy {
  margin: 9px 0 0;
  color: #64748a;
  font-size: 12.5px;
  line-height: 1.75;
}

.privacy-agree {
  margin-top: 12px;
}

.download-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  text-decoration: none;
}

.copy-download {
  margin-top: 8px;
}

.text-button {
  width: 100%;
  padding: 10px;
  color: #607087;
  font-size: 12px;
  background: transparent;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 30;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 10px 15px;
  color: #fff;
  font-size: 12.5px;
  border-radius: 9px;
  background: rgba(18, 39, 57, 0.94);
  transform: translateX(-50%);
  box-shadow: 0 6px 20px rgba(18, 39, 57, 0.2);
}

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 350px) {
  .hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-title {
    font-size: 19px;
  }

  .secondary-button {
    font-size: 11.5px;
  }
}
