*{
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

:root{
  --vc:#137f77;
  --vc-dark:#0f6862;
  --vc-soft:#d9efec;
  --vc-soft-2:#eef8f6;
  --ink:#17302f;
  --muted:#647774;
  --line:#cfe0dd;
  --page:#f5faf9;
  --white:#ffffff;
}

html,
body{
  touch-action:manipulation;
  overscroll-behavior:none;
  -webkit-text-size-adjust:100%;
}

html{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--page);
  color:var(--ink);
}

body{
  margin:0;
  background:var(--page);
}

button,
input,
a{
  font:inherit;
}

button,
.no-page-zoom{
  touch-action:manipulation;
  -webkit-user-select:none;
  user-select:none;
}

.hidden{
  display:none!important;
}

/* Header */

.topbar{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 5vw;
  background:rgba(255,255,255,.96);
  border-top:3px solid var(--vc);
  border-bottom:1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand-logo{
  width:46px;
  height:46px;
  border-radius:11px;
  object-fit:cover;
  flex:0 0 auto;
}

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

.brand-copy strong,
.brand-copy span{
  display:block;
}

.brand-copy strong{
  font-size:17px;
  line-height:1.15;
}

.brand-copy span{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.support-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:9px 13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--white);
  color:var(--vc-dark);
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}

.support-btn:hover{
  background:var(--vc-soft-2);
}

/* Main */

.page-wrap{
  width:min(1120px,calc(100% - 32px));
  margin:0 auto;
  padding:42px 0 54px;
}

.hero{
  text-align:center;
  margin-bottom:30px;
}

.eyebrow{
  display:inline-block;
  padding:7px 12px;
  border-radius:999px;
  background:var(--vc-soft);
  color:var(--vc-dark);
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
}

.hero h1{
  margin:15px 0 9px;
  font-size:clamp(33px,5vw,50px);
  line-height:1.06;
  letter-spacing:-.025em;
}

.hero p{
  margin:0;
  color:var(--muted);
  font-size:16px;
}

/* Upload */

.upload-box{
  width:100%;
  min-height:310px;
  padding:36px 24px;
  border:2px dashed #b8d3cf;
  border-radius:20px;
  background:var(--white);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  transition:.15s ease;
}

.upload-box.drag-active{
  border-color:var(--vc);
  background:var(--vc-soft-2);
}

.upload-symbol{
  margin-bottom:12px;
  font-size:34px;
  line-height:1;
  font-weight:800;
  color:var(--vc);
}

.upload-box h2{
  margin:0 0 9px;
  font-size:26px;
}

.upload-box p{
  margin:0 0 16px;
  color:var(--muted);
}

.primary-btn{
  border:0;
  border-radius:11px;
  padding:12px 20px;
  background:var(--vc);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.primary-btn:hover{
  background:var(--vc-dark);
}

.primary-btn:disabled{
  opacity:.65;
  cursor:wait;
}

.upload-limit{
  margin-top:15px;
  color:var(--muted);
  font-size:13px;
}

.status{
  margin-top:17px;
  padding:13px 15px;
  border:1px solid #f0d4a4;
  border-radius:12px;
  background:#fff9ef;
  color:#8a5a16;
}

.status.error{
  border-color:#efc2c2;
  background:#fff2f2;
  color:#9b2d2d;
}

/* Viewer */

.viewer-section{
  margin-top:22px;
}

.viewer-toolbar{
  min-height:54px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:14px 14px 0 0;
}

.zoom-controls{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}

.viewer-toolbar button{
  min-width:40px;
  border:1px solid var(--line);
  border-radius:9px;
  padding:8px 11px;
  background:var(--white);
  color:var(--ink);
  font-weight:800;
  cursor:pointer;
}

.viewer-toolbar button:hover{
  background:var(--vc-soft-2);
}

.zoom-label{
  min-width:58px;
  text-align:center;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}

.new-file-btn{
  margin-left:auto;
  color:var(--vc-dark)!important;
}

.viewer-viewport{
  width:100%;
  height:auto;
  min-height:180px;
  max-height:740px;
  overflow:auto;
  overscroll-behavior:contain;
  touch-action:none;
  background:#edf4f3;
  border-left:1px solid var(--line);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  border-radius:0 0 14px 14px;
  position:relative;
  transition:height .15s ease;
}

.canvas-stage{
  min-width:100%;
  min-height:100%;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:20px;
  touch-action:none;
}

#pdfCanvas{
  display:block;
  background:#fff;
  box-shadow:0 5px 18px rgba(20,65,61,.10);
  touch-action:none;
}

/* Below-preview actions */

.preview-actions{
  display:flex;
  justify-content:flex-end;
  padding-top:8px;
}

.download-jpg-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--white);
  color:var(--vc-dark);
  font-size:11px;
  font-weight:800;
  text-decoration:none;
}

.download-jpg-btn:hover{
  background:var(--vc-soft-2);
}

/* Info */

.info-box{
  margin-top:20px;
  padding:16px 17px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--white);
  color:var(--muted);
}

.info-box strong,
.info-box span{
  display:block;
}

.info-box strong{
  margin-bottom:4px;
  color:var(--ink);
}

/* Footer */

footer{
  padding:22px 16px 32px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
}

/* Mobile */

@media(max-width:768px){

  .topbar{
    min-height:68px;
    padding:8px 14px;
  }

  .brand-logo{
    width:40px;
    height:40px;
    border-radius:10px;
  }

  .brand-copy strong{
    font-size:15px;
  }

  .support-btn{
    padding:8px 10px;
    font-size:12px;
  }

  .page-wrap{
    width:min(100% - 18px,1120px);
    padding-top:28px;
  }

  .hero{
    margin-bottom:22px;
  }

  .hero h1{
    font-size:32px;
  }

  .hero p{
    font-size:15px;
  }

  .upload-box{
    min-height:270px;
    padding:26px 16px;
  }

  .upload-box h2{
    font-size:22px;
  }

  .viewer-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .zoom-controls{
    justify-content:center;
  }

  .new-file-btn{
    width:100%;
    margin-left:0;
  }

  .viewer-viewport{
    min-height:180px;
    max-height:600px;
  }

  .canvas-stage{
    padding:14px;
  }

  .preview-actions{
    justify-content:center;
  }
}


/* Bilingual header controls */
.header-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.language-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:36px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--white);
  color:var(--vc-dark);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.language-btn:hover{
  background:var(--vc-soft-2);
}

.language-icon{
  font-size:15px;
  line-height:1;
}

@media(max-width:768px){
  .header-actions{gap:6px}
  .language-btn{padding:7px 9px}
  .language-icon{font-size:14px}
}


/* v2.6.2: allow normal page overscroll / pull-to-refresh again */
html,
body{
  overscroll-behavior-y:auto !important;
  overscroll-behavior-x:none;
}

/* Preview area keeps its own contained gestures. */
.viewer-viewport{
  overscroll-behavior:contain;
}

/* "How it works" was removed from the interface. */
.info-box{
  display:none !important;
}


.footer-link{
  color:var(--vc-dark);
  font-weight:700;
  text-decoration:none;
}

.footer-link:hover{
  text-decoration:underline;
}

/* Tools promo strip */
.tools-promo{
  background:var(--vc-soft-2);
  border-bottom:1px solid var(--line);
}
.tools-promo-inner{
  width:min(1120px,calc(100% - 32px));
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.tools-promo-inner::-webkit-scrollbar{display:none}
.tools-promo-items{
  display:flex;
  align-items:center;
  gap:10px;
  flex:none;
}
.tools-promo-label{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  white-space:nowrap;
  flex:none;
}
.tools-promo-item{
  position:relative;
  display:inline-flex;
  align-items:center;
  padding:6px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--white);
  color:var(--ink);
  font-size:12.5px;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
  flex:none;
}
a.tools-promo-item:hover{border-color:var(--vc);color:var(--vc-dark)}
.tools-promo-item.current{background:var(--vc);border-color:var(--vc);color:#fff}
.tools-promo-item.soon{background:var(--white);color:var(--muted);cursor:default}
.soon-badge{
  position:absolute;
  top:-7px;
  right:-6px;
  padding:1px 5px;
  font-size:8px;
  font-weight:900;
  letter-spacing:.02em;
  color:var(--vc-dark);
  background:var(--vc-soft);
  border:1px solid var(--white);
  border-radius:999px;
  line-height:1.4;
}
@media(max-width:640px){
  .tools-promo-inner{
    flex-direction:column;
    gap:8px;
    padding:10px 0;
  }
  .tools-promo-items{
    flex-wrap:wrap;
    justify-content:center;
    row-gap:8px;
  }
}
